| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* cfg.mk (sc_prohibit_unhyphenated_eof): Add syntax-check rule.
* doc/find.texi: Change "end of file" to "end-of-file" in several places.
* xargs/xargs.1: Likewise.
* xargs/xargs.c (eof_str): Change comment to adhere to the new rule.
|
|
|
|
|
|
|
|
|
| |
* doc/find.texi (Multiple Files): Clarify better that xargs will stop when
reading the EOF marker string specified with the --eof option, or when a
launched command exists with status 255. Switch the two termination
conditions to reflect the behavior.
Fixes RT #1912852.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error diagnostic for wrong invocations with option that require
numeric arguments (-inum, -links, -gid, -uid) was wrong and not helpful:
$ find -gid
find: invalid argument `-gid' to `-gid'
* find/parser.c (parse_gid): Remove changing back of the ARG_PTR in
the error case; thus simplify.
(parse_inum,parse_links,parse_uid): Likewise.
(get_num): While at it, mention -gid and -uid in the comment as well.
(insert_num): Also improve the error diagnostic in the case the user
has provided a non-numeric argument. Previously, it was just "invalid
argument".
* tests/find/opt-numeric-arg.sh: Add test.
* tests/local.mk: Reference it.
* NEWS (Bug Fixes): Mention the fix.
Reported by Andreas Schwab <schwab@linux-m68k.org> in
<https://lists.gnu.org/r/bug-findutils/2023-01/msg00001.html>
|
|
|
|
|
|
|
|
|
| |
* xargs/xargs.1 (--max-args): Reset the bold formatting earlier
in two places.
Fixes https://sv.gnu.org/bugs/?62325
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
|
| |
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest', mainly to update the copyright
year numbers with:
> maint: run 'make update-copyright'
This also pulls in the splitting of bootstrap into autopull.sh,
autogen.sh and bootstrap.
* autogen.sh: Add file.
* autopull.sh: Likewise.
* bootstrap-funclib.sh: Likewise.
* bootstrap: Auto-update.
* gnulib: Update to latest.
* tests/init.sh: Sync from 'gnulib/tests/init.sh'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The upcoming gnulib update comes with the new syntax-check named
'sc_unportable_grep_q':
maint.mk: unportable 'grep -q', use >/dev/null instead
make: *** [maint.mk:1377: sc_unportable_grep_q] Error 1
Fix offending places.
* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
Replace unportable '-q' by redirecting grep output to /dev/null.
* doc/find.texi (node Adding Tests): Likewise.
* init.cfg (find_emits_warnings_): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* doc/Makefile.am (AM_MAKEINFOFLAGS): Add for --no-split option.
(find_mono.html): Remove --no-split from makeinfo invocation.
* NEWS (Documentation Changes): Document the change.
* doc/.gitignore (/find.info-1,/find.info-2): Remove entries.
Suggested by Antonio Diaz Diaz <antonio@gnu.org> in
https://lists.gnu.org/r/bug-findutils/2022-11/msg00001.html
|
|
|
|
|
|
| |
* doc/find-maint.texi (chapter Security): s/p[art/part/
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
| |
* doc/find.texi (section Starting points): Remove @deffnx; the @deffn
above it is sufficient.
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
| |
* find/find.1 (GLOBAL OPTIONS): Add "be" between "should" and
"specified".
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
|
| |
* tests/find/newer.sh: Add to improve test coverage.
* tests/local.mk (all_tests): Reference the test.
Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
|
| |
Avoid the following warning:
configure.ac:208: warning: The macro `AC_HEADER_STDC' is obsolete.
* configure.ac (AC_HEADER_STDC): Remove, and ...
(AC_CHECK_INCLUDES_DEFAULT): ... add this instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
findutils failed to build from source on musl-libc, because it failed
to detect gettext availability. Newer gettext fixes this:
Version 0.19.8 - June 2016
[...]
- The AM_GNU_GETTEXT Autoconf macro can now detect musl-libc's
gettext as a compatible implementation.
* configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.19.3 to 0.19.8.
(AM_GNU_GETTEXT_REQUIRE_VERSION): Add to make autopoint pull the latest
available version instead of the exact specified version.
* NEWS: Mention the change.
Reported via Andreas Metzler <ametzler@bebt.de> at:
https://sv.gnu.org/patch/?10203
Fixes: https://bugs.debian.org/1009874
Copyright-paperwork-exempt: Yes
|
|
|
|
| |
* doc/find.texi (LC_COLLATE): Change man-style `\-name' to @samp{-name}.
|
|
|
|
|
|
|
|
| |
Detected by `make findutils-check-smells` (ironically for itself):
error: ./Makefile.am:88: Spaces at start of makefile line
* Makefile.am (findutils-check-smells): Fix tab indentation of the
recipe, and re-indent for better reading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although usually a pattern containing a directory separator does not match
anything, a pattern solely consisting of one '/' still does (and has to)
for the root directory "/".
* find/parser.c (check_name_arg): Omit the warning in the case the
given pattern equals "/".
find/find.1 (-name): Clarify better that the pattern "/" is valid to
match the "/" directory.
* init.cfg (find_emits_warnings_): Add utility function.
* tests/find/name-slash.sh: Add test.
* tests/local.mk (all_tests): Reference it.
* MEWS (Bug Fixes): Mention the fix.
Fixes https://savannah.gnu.org/bugs/?62227
|
|
|
|
|
|
| |
* find/parser.c (check_name_arg): Change to void; remove return statement.
(parse_iname): Adjust caller.
(parse_name): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the above build environment, HAVE_ENDPWENT seems to be defined to 0
instead of being #undef'ed. Hence the build fails:
parser.c: In function 'parse_user':
parser.c:75:20: error: expected expression before ')' token
75 | # define endpwent ()
| ^
parser.c:2463:7: note: in expansion of macro 'endpwent'
2463 | endpwent ();
| ^~~~~~~~
* find/parser.c (HAVE_ENDGRENT,HAVE_ENDPWENT): Change from #ifndef to
"#if !", and define the replacement code to "(void) 0".
Fixes https://github.com/openwrt/packages/issues/17912
|
|
|
|
|
| |
* find/util.c (usage): Remove excess leading blank in the -mount line
of the "Normal options" block.
|
|
|
|
| |
* NEWS: Add new dummy release header.
|
|
|
|
|
| |
* NEWS: Prepare for the 4.9.0 release: minor re-ordering, and update
entries with bug numbers.
|
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest' in order to use the latest version
for the imminent release.
* bootstrap: Sync from gnulib/build-aux/bootstrap.
* gnulib: Update to latest.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/find.texi (Action -delete): Improve and re-structure:
Mention that -delete is able to remove directories (if they are empty),
that failure to delete a file changes the exit code to nonzero, and
clarify better the relation between -delete, -depth and -prune.
* find/find.1 (-delete): Align with the above mentioned section in the
Texinfo manual.
Fixes https://savannah.gnu.org/bugs/?61774
Originally reported by Chris Davies in
https://bugs.debian.org/1003339
Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://sparse.docs.kernel.org/
Running the tool against unviled the following warnings:
find/parser.c:328:7: warning: Using plain integer as NULL pointer
find/parser.c:328:10: warning: Using plain integer as NULL pointer
find/parser.c:328:13: warning: Using plain integer as NULL pointer
find/parser.c:466:49: warning: Using plain integer as NULL pointer
find/parser.c:656:45: warning: Using plain integer as NULL pointer
find/print.c:1024:30: warning: Using plain integer as NULL pointer
lib/regexprops.c:531:7: warning: symbol 'options' shadows an earlier one
lib/regextype.c:48:24: warning: symbol 'regex_map' was not declared. Should it be static?
locate/locate.c:131:25: warning: symbol 'check_existence' was not declared. Should it be static?
locate/locate.c:207:12: warning: symbol 'metacharacters' was not declared. Should it be static?
xargs/xargs.c:902:24: warning: symbol 'state' shadows an earlier one
xargs/xargs.c:542:23: warning: Using plain integer as NULL pointer
The fixes for these findings are all trivial, so let's apply them.
* find/parser.c (parse_table): Initialize pointer-type members of
the last element with NULL instead of 0.
(get_noop): Compare to NULL as end condition of for-loop.
(find_parser): Likewise.
* find/print.c (do_fprintf): Initialize linkname with NULL instead of 0.
* lib/regexprops.c (describe_all): Rename local variable options
to regopts to avoid name shadowing.
* lib/regextype.c (regex_map): Declare static.
* locate/locate.c (check_existence): Likewise.
(metacharacters): Likewise.
* xargs/xargs.c (main): Set eof_str to NULL instead of 0.
|
|
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest', mainly due to:
> license: fix GPLv3 texts to use a comma instead of semicolon.
* bootstrap: Sync from gnulib/build-aux/bootstrap.
* gnulib: Update to latest.
|
|
|
|
|
|
|
|
|
|
|
| |
See: https://www.gnu.org/licenses/gpl-3.0.html#howto
Run:
$ git grep -l 'Foundation; either version 3' \
| xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'
* bootstrap.conf: Adjust GPLv3 header via the above command.
* build-aux/gen-changelog.sh: Likewise.
* lib/die.h: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
The format of the copyright year number range in Texinfo files is
"YEAR1--YEAR2" now, i.e., with 2x '-'.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
|
|
|
|
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest', mainly to update the copyright
year numbers with:
> maint: run 'make update-copyright'
* bootstrap: Sync from gnulib/build-aux/bootstrap.
* gnulib: Update to latest.
* tests/init.sh: Sync from 'gnulib/tests/init.sh'.
|
|
|
|
|
|
|
|
|
| |
doc/find.texi (xargs options): Change 'grep -lz' to 'grep -lZ' as
input for 'xargs -0o' as only the latter will write a NUL after
each file name. Add -n1 to the xargs call.
Reported by Robin A. Meade in
https://savannah.gnu.org/bugs/?61341
|
|
|
|
|
|
|
|
|
|
| |
On most modern systems like GNU/Linux, read(2)-ing from a directory file
descriptor will fail with EISDIR, but it succeeds e.g. on GNU/Hurd and
AIX-7.1/AIX-7.2.
tests/find/files0-from.sh: Skip the test case excercising a directory
argument for the -files0-from option when the system allows reading
from a directory.
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest'.
* bootstrap: Sync from gnulib/build-aux/bootstrap.
* gnulib: Update to latest.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On GNU/Hurd, the value 0 is a valid inode number, and is e.g. used
for /dev/console and /dev/tty. The find(1) program aborted on this
platform when the user specified the -inum test and when the search
visited such a file.
$ find /dev/null /dev/tty -inum 40799 -printf '%i:%p\n'
40799:/dev/null
find: util.c:330: get_info: Assertion `p->st_ino' failed.
Aborted
Likewise, 'find -printf %i' aborted when hitting such a file.
* find/defs.h (get_info): Remove declaration.
* find/pred.c (pred_inum): Remove the redundant assert for ST_INO
as parse_inum sets need_inum=true which ensures that the inode number
is known.
* find/util.c (get_info): Declare static, and simplify: remove the
assertions for the inode number and file type.
While at it, add condition !state.have_stat in the need_stat case
for consistency.
* tests/find/inode-zero.sh: Add test.
* tests/local.mk (all_tests): Reference it.
Problem introduced by the inum optimisation in commit 2bf001636e6.
Reported by Andrea Monaco <andrea.monaco@autistici.org> in
https://lists.gnu.org/r/bug-findutils/2021-12/msg00008.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the '-D stat' debugging option turned on, 'find -L' determined the
SELinux context information as if the -L (or -H) option was not given:
$ strace -ve getxattr,lgetxattr find -L . -maxdepth 0 -printf '%Z:%p\n'
getxattr(".", "security.selinux", 0x55b29a2b2d40, 255) = -1 ENODATA (No data available)
...
$ strace -ve getxattr,lgetxattr find -D stat -L . -maxdepth 0 -printf '%Z:%p\n'
lgetxattr(".", "security.selinux", 0x5649c91d8d40, 255) = -1 ENODATA (No data available)
...
* find/parser.c (set_follow_state): Move the DebugStat handling after
the switch statement, thus eliminating the if/else.
Bug present since adding the SELinux implementation in v4.5.5-42-g1a05af6a.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
find(1) supports both searching for and printing of the birth time
of a file since 2007, but the documenation lacked the description
for the latter.
* doc/find.texi (node Time Directives): Add item for %B.
(node Time Formats): Mention that the described formats also apply to
the %B directive.
* find/find.1 (-printf format): Add description of %B.
* NEWS (Documentation Changes): Mention the change.
Fixes https://savannah.gnu.org/bugs/?61327
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do no longer output an error diagnostic when the input file of
the -files0-from option is empty.
* find/ftsfind.c (process_all_startpoints): Remove error diagnostic.
* doc/find.texi (node Starting points): Adjust documentation.
* find/find.1: Likewise.
* tests/find/files0-from.sh: Adjust test.
Suggested by Stephane Chazelas in
https://savannah.gnu.org/bugs/?60383#comment11
|
|
|
|
|
|
| |
* find/testsuite/config/unix.exp (safe_path): Change $PATH to PATH
as the message refers to the name of the environment variable, i.e.,
not its value.
|
|
|
|
|
|
|
|
|
|
| |
* find/testsuite/find.gnu/sv-bug-27563-execdir.exp: Guard test by
'safe_path' condition to avoid false-positive failures in case the
PATH variable contains the current directory '.' ... which lets the
`find -execdir` action fail with an error diagnostic.
Reported by Paxsali <akis.kapo@googlemail.com> in
https://savannah.gnu.org/bugs/?60383
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run 'make update-gnulib-to-latest' - thus pulling in 357 commits,
including the following which was also discussed in:
https://savannah.gnu.org/bugs/?60383
> test-framework-sh: remove unsafe entries from PATH
* gnulib: Update to latest.
* cfg.mk (local-checks-to-skip): Add and therefore disable sc_indent
as auto indent is too invasive for now.
* m4/mkinstalldirs.m4: Fix repeated word: s/can can/can/. Reported by
a new rule in sc_prohibit_doubled_word.
* m4/noreturn.m4: Likewise.
* tests/init.sh: Likewise.
|
|
|
|
|
| |
* doc/find-maint.texi (User Documentation): Add details how to
update the online manual from Git via the CVS web repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script to copy the documentation for the web to the CVS checkout
directory took the files from 'doc'. But as those files do not
reference the GNU stylesheet, the resulting online documentation
didn't look as fancy as usual.
Instead, copy the files from 'doc/manual' which gets created by the make
target 'web-manual'.
* build-aux/update-online-manual.sh: Call the 'web-manual' make target
instead of building the documentation files in 'doc/' explicitly.
Adjust the commands to copy the just-generated files accordingly.
Remove the PostScript format as that does not get generated by the
'web-manual' target; it is probably no longer used nowadays anyway.
* NEWS (Documentation Changes): Mention the change.
Reported by Charles Burkitt <cecburkitt@gmail.com> in
https://lists.gnu.org/r/bug-findutils/2021-10/msg00008.html
|
|
|
|
|
|
|
|
| |
* doc/find.texi (subsection Full Name Patterns): Change 2nd '-wholename'
to '-iwholename' to complete the enumeration of related options.
Fixes https://savannah.gnu.org/bugs/?61303
Copyright-paperwork-exempt: Yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FTS-based find is the default for a long time; oldfind has not been
installed since 4.5.18 (2015), and was only just used in tests.
* NEWS: Document the change.
* doc/find-maint.texi (Factor Out Repeated Code): Remove mentioning of
oldfind.
* find/.gitignore (/oldfind): Remove entry.
* find/Makefile.am (check_PROGRAMS): Remove.
(oldfind_SOURCES): Remove.
* find/defs.h (struct dir_id): Remove, it was only used in oldfind.c.
(symlink_handling): Likewise.
Adjust comments wrt oldfind otherwise.
* find/oldfind.c: Remove.
* find/testsuite/config/unix.exp: Remove the code to search for and
to run tests with oldfind.
* find/testsuite/find.posix/dotdotfiles.exp: Adjust comment.
* po/POTFILES.in (find/oldfind.c): Remove entry.
* tests/find/debug-missing-arg.sh: Remove run with oldfind.
* tests/find/exec-plus-last-file.sh: Likewise.
* tests/find/execdir-fd-leak.sh: Likewise.
* tests/find/many-dir-entries-vs-OOM.sh: Likewise.
* tests/find/name-lbracket-literal.sh: Likewise.
* tests/find/printf_escape_c.sh: Likewise.
* tests/find/printf_escapechars.sh: Likewise.
* tests/find/printf_inode.sh: Likewise.
* tests/find/refuse-noop.sh: Likewise.
* tests/find/type_list.sh: Likewise.
* tests/local.mk (built_programs): Remove oldfind from list.
|
|
|
|
|
|
|
|
| |
* find/util.c (usage): Start sentences with upper case.
Add extra newlines to put each section (operators, options, tests, and
actions) on its own line.
Move the typical generic options --help and --version to the end.
* NEWS (Documentation Changes): Mention the change.
|
|
|
|
|
|
| |
* build-aux/gen-changelog.sh: Call gitlog-to-changelog with the
--no-cluster option. The resulting ChangeLog reads better, because
each commit get its own date/author line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The struct state field exit_status is only set to 0 (EXIT_SUCCESS) or
to 1 (EXIT_FAILURE) throughout the code.
Therefore, remove the more complicated wrapper function error_severity
which was only used in very few cases anyway.
While at it, replace the above magic numbers by EXIT_OKAY/EXIT_SUCCESS.
* find/defs.h (error_severity): Remove.
* find/util.c (error_severity): Remove, and update all callers by replacing
it by the direct assignment to state.exit_status.
(get_statinfo): Use the above better names.
(report_file_err): Likewise.
* find/exec.c (launch): Likewise.
* find/ftsfind.c (consider_visiting): Likewise.
(find): Likewise.
(process_all_startpoints): Likewise.
(main): Likewise.
* find/pred.c (pred_delete): Likewise.
(pred_empty): Likewise.
(match_lname): Likewise.
(pred_xtype): Likewise.
* find/print.c (do_fprintf): Likewise.
|
|
|
|
|
|
|
| |
* find/tree.c (get_expr): Add missing closing paren.
* find/util.c (insert_primary): s/insure/ensure/
(fatal_nontarget_file_error): s/isssue/issue/
* xargs/xargs.c (XargsStatusValues): s/exites/exited/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prompted by the following warning of GCC-11.1.1:
tree.c: In function 'get_expr':
tree.c:140:31: warning: dereference of NULL 'prev_pred' [CWE-476] \
[-Wanalyzer-null-dereference]
140 | if ((UNI_OP == prev_pred->p_type
| ~~~~~~~~~^~~~~~~~
Former versions of find are not vulnerable to this, because a closing
parenthesis ')' without anything before was treated as a pathname
rather than an option.
But this is possible now with the recent introduction of the -files0-from
option (see commit 11576f4e6a) - yet still an invalid invocation.
Reproducer for a crash:
$ find -files0-from FILE ')' -print
Segmentation fault (core dumped)
In the similar case when the user didn't specify any action, and find(1)
adds the default action via '( user-expr ) -print', the error diagnostic
was very confusing, too:
$ find -files0-from FILE ')'
find: invalid expression; empty parentheses are not allowed.
* find/tree.c (get_expr): Handle the cases when there's no predicate
before CLOSE_PAREN, and output a useful error diagnostic.
* tests/find/files0-from.sh: Add a test case for it.
|
| |
|