* doc/find.texi (node Leaf Optimisation): s/filssytems/filesystems/
Bug introduced in v4.5.10-9-gb28cc8c4 in 2011.
Reported by <firasuke@gmail.com> in
https://savannah.gnu.org/bugs/?66418
With newer gnulib, the sc_prohibit_always_true_header_tests check
fails with:
find/fstype.c:30:#if HAVE_MNTENT_H
maint.mk: do not test the above HAVE_<header>_H symbol(s);
with the corresponding gnulib module, they are always true
make: *** [maint.mk:969: sc_prohibit_always_true_header_tests] Error 1
* find/fstype.c (#include <mntent.h>): Remove as it is not actually used.
Now that <endian.h> is a part of POSIX 2024 it should become more
portable than <byteswap.h>.
* bootstrap.conf (gnulib_modules): Remove byteswap; add endian.
* locate/word_io.c: Include endian.h instead of byteswap.h.
(decode_value): Use htobe32 instead of bswap_32.
To avoid that new tests copied from the template sample-test lack the
executable bit, add the executable bit to that file.
* tests/sample-test: Set executable permission bit.
A "+" only terminates -exec when it immediately follows an argument
which is exactly "{}" (and not, for example, "{}x"). This fixes
Savannah bug 66365.
* NEWS: explain this change.
* doc/find.texi: update one place which omitted the '{}' before '+'.
* find/parser.c (insert_exec_ok): consider + to be special ony if it
follows an argument which is exactly '{}'.
* tests/find/sv-bug-66365-exec.sh: test for this bug.
* tests/local.mk: add the new test file.
The libgnulib.a library isn't (necessarily) below $(top_srcdir), it's
below $(top_builddir). This fixes a bug introduced in commit
85fc8966e5912390ad220d03b188dd319c85ed1e.
Seen on GCC 14.2.0:
tests/xargs/test-sigusr.c: In function 'run_xargs':
tests/xargs/test-sigusr.c:159:43: warning: declaration of 'optarg' \
shadows a global declaration [-Wshadow]
159 | run_xargs(const char *option, const char *optarg, int send_signal)
| ~~~~~~~~~~~~^~~~~~
...
/usr/include/bits/getopt_core.h:36:14: note: shadowed declaration is here
36 | extern char *optarg;
| ^~~~~~
* tests/xargs/test-sigusr.c (run_xargs): Rename 'optarg' parameter
to 'opt_arg'.
The postal address of the FSF has changed from Franklin Street to
Milk Street in Boston, yet according to RMS we shall better avoid
the postal address.
* build-aux/update-online-manual.sh (Copyright): Change from postal
address to the FSF URL.
Reproducer:
# Spin up lots of short-living processes.
$ while env true; do sleep .001; done &
# Invoke 'find' on the /proc file system;
# this pretty reliably gives the following error:
$ find /proc -ignore_readdir_race -maxdepth 3 > /dev/null
find: '/proc/845078': No such file or directory
* find/ftsfind.c (consider_visiting): Return when FTS returned ENOENT
with the option -ignore_readdir_race.
* NEWS (Bug Fixes): Mention the fix.
Fixes https://savannah.gnu.org/bugs/?45930
Building from git without bison available would result in
cc1: fatal error: ./parse-datetime.c: No such file or directory
which is not a very helpful error message.
Let gnulib bootstrap check for bison much earlier.
* README-hacking (Prerequisites): Add Bison explicitly.
* bootstrap.conf (buildreq): Add bison.
* cfg.mk (bootstrap-tools): Add gnulib variable with tools including
bison.
Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
Copyright-paperwork-exempt: Yes
'make syntax-check' complains:
maint.mk: use "end-of-file", not "end of file"
make: *** [cfg.mk:273: sc_prohibit_unhyphenated_eof] Error 1
* doc/find.texi (xargs options): Change as suggested by the SC rule.
The forthcoming Issue 8 of the POSIX standard includes find -print0
and xargs -0.
* doc/find.texi: find -print0 is no longer GNU-specific. Similarly
for xargs -0.
* xargs/xargs.1: Likewise.
* NEWS: mention these changes.
This check does not apply to gnulib code.
* cfg.mk (sc_spaces_not_tabs): add syntax check prohibiting
the use of tabs in Findutils code.
* build-aux/tabs-to-spaces.sh: Add small tool for converting
source file tabs to spaces.
The recent commit removed the variable 'all_tests' which is used by
sc_tests_list_consistency in cfg.mk.
* tests/local.mk (all_tests): Re-introduce and ...
(TESTS): ... use it here.
The ERE used lacks the grouping of the extensions and therefore would
also match files where the first two patterns are not at the end of
the line:
grep -E '\.sh|\.c$'
* cfg.mk (sc_tests_list_consistency): Add grouping (...) around the
sub-patterns. While at it, also remove the redundant escaping, i.e.,
\$$ -> $$ to be consistent with the rest of this file.
Run 'make update-gnulib-to-latest'; there have been 219 commits on gnulib
since the last update.
* gnulib: Update to latest.
* bootstrap-funclib.sh: Likewise.
While this is often described as a UK/US spelling difference, the
"-ise" spelling is described as a variant by the Oxford English
Dictionary. Therefore we prefer the "-ize" spelling.
* doc/find.texi: standardize on optimize.
* find/find.1: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* NEWS: Likewise (except for historical entries).
The cost-based optimiser re-orders predicates based on their expected
cost. This re-ordering (as currently implemented) results in
user-visible changes to the order of operations. An optimiser should
not do that. For example, "-empty -readable" and "-readable -empty"
don't actually have the same effect since "-empty" fails on an
unreadable directory. This fixes savannah bug #58427 (unless the user
specifies -O2).
* find/util.c(set_option_defaults): set default optimisation level to
1 instead of 2.
* find/tree.c(build_expression_tree): call do_arm_swaps (i.e. apply
cost-based optimisations) only at optimisation level 2 and above.
* find/find.1(-O): explain this change.
* doc/find.texi(Optimisation Options): explain this change.
* NEWS: mention this change.
* find/pred.c (pred_xtype): if lstat fails with ELOOP, -xtype should
behave in the same way as -type.
(err_signals_broken_link): new function, true for ENOENT and ELOOP.
* doc/find.texi: document the fact that the "infinite loop" case is
handled like the "symbolic link target does not exist" case.
* find/find.1: Likewise.
This improved message is intended to help diagnose Savannah bug #65796.
* tests/misc/help-version.sh: when the --version ouptut of some
findutils program doesn't match the value of the VERSION environment
variable during "make check", issue a more detailed error message.
The syntax-check complains:
$ make syntax-check -k
...
maint.mk: the above files do not call bindtextdomain
make: *** [maint.mk:869: sc_bindtextdomain] Error 1
...
maint.mk: the above files do not include <config.h>
make: *** [maint.mk:509: sc_require_config_h] Error 1
...
maint.mk: use EXIT_* values rather than magic number
make: *** [maint.mk:411: sc_prohibit_magic_number_exit] Error 1
...
maint.mk: found unmarked diagnostic(s)
make: *** [maint.mk:916: sc_unmarked_diagnostics] Error 1
...
make: *** [cfg.mk:111: sc_tests_list_consistency] Error 1
...
maint.mk: Please make test executable: tests/xargs/test-sigusr.c
make: *** [cfg.mk:124: sc_tests_executable] Error 1
* cfg.mk (exclude_file_name_regexp--sc_bindtextdomain): Add test-sigusr.
(exclude_file_name_regexp--sc_unmarked_diagnostics): Define with the
pattern of the test-sigusr source file.
(sc_tests_list_consistency): Strip off ".c" suffix.
(sc_tests_executable): Exempt C source from this rule.
* tests/local.mk (TEST_EXTENSIONS): Add .c sources, needed also for
sc_tests_list_consistency to work.
* tests/xargs/test-sigusr.c (#include <config.h>): Add to avoid
sc_require_config_h failure.
(verify_signal_ignored): Call exit with EXIT_FAILURE instead of 1 to
avoid sc_prohibit_magic_number_exit failure.
(verify_signal_is_fatal): Likewise.
(verify_signal_is_nonfatal_with_p): Likewise.
* tests/.gitignore (/xargs/test-sigusr): While at it, add an entry
for the built test program here.
The following syntax-check rule fails:
$ make syntax-check
...
maint.mk: Use #include <hdr.h>, not #include "hdr.h" for the above
make: *** [maint.mk:619: sc_prefer_angle_bracket_headers] Error 1
The rule suggests using '#include <header.h>' instead of
'#include "header.h"' for headers that override system headers.
See gnulib documentation, section "Style of #include statements".
* find/parser.c (#include "fnmatch.h": Change from "..." to <...> style.
* find/pred.c (#include "fnmatch.h"): Likewise.
* find/tree.c (#include "fnmatch.h"): Likewise.
* lib/system.h (#include "error.h"): Likewise.
* locate/locate.c (#include "fnmatch.h"): Likewise.
* tests/xargs/test-sigusr.c (#include "error.h"): Likewise.
While we do use the gnulib safe_read function, we read input from
stdin using stdio, not direct Unix syscalls, so safe_read is not
involved.
* xargs/xargs.c: If a stdin read fails with EINTR, do it again. Use
SA_RESTART when setting up signal handlers. This fixes Savannah
bug #64442.
If the user uses -P we're not using only POSIX options, so in that
case it is OK to handle SIGUSR1/2. Otherwise (without -P) don't
handle these signals, meaning that they could cause xargs to
terminate.
* xargs/xargs.c: set signal handlers for SIGUSR1 and SIGUSR2 only if
the -P option was used. Warn if SIGUSR1 or SIGUSR2 is not defined.
* tests/xargs/test-sigusr: a new test for this.
* tests/local.mk: build and run the new test.
* NEWS: mention these changes.
* xargs/xargs.c: fix Savannah bug #64451 (xargs -P exits before all
children have exited if one exits with status 255).
* xargs/xargs.1 (BUGS): mention this bug and the corrected behaviour.
* doc/find.texi: Likewise.
* NEWS: mention this bugfix.