Linking on AIX7.2 fails:
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
Bruno Haible noticed that $(LIB_MBRTOWC) and $(LIB_SETLOCALE_NULL)
expand to -lpthread on that platform, so let's add them to LDADD.
Maybe we should better depend on a 'gnulib.mk' file generated by
'gnulib-import' in the long run, but let's fix this issue with the
simpler solution for now.
* find/Makefile.am (LDADD): Add $(LIB_SETLOCALE_NULL) and $(LIB_MBRTOWC).
* locate/Makefile.am (LDADD): Likewise.
* xargs/Makefile.am (LDADD): Likewise.
* lib/Makefile.am (regexprops_LDADD): Add definition.
* gnulib-local/lib/gcc-function-attributes.h: Rename
_GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
following gnulib's change:
https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=387d654c
* find/print.c (checked_fprintf): Use it.
Run 'make update-gnulib-to-latest'. Let's use this latest version
for the imminent 4.8.0 release.
* bootstrap: Sync from gnulib/build-aux/bootstrap.
* gnulib: Update to latest.
* xargs/xargs.c (warn_mutually_exclusive): Add function to output the
new warning diagnostic.
(main): Call the above new function in order to show a warning message
if conflicting options (-L -l -I -i -n) are specified.
* xargs/xargs.1: Explicitly document the fact that -L -l -I -i -n
options are mutually exclusive and how xargs behaves when more than one
of these options are specified.
* doc/find.texi (node Conflicting xargs options): Likewise, add this
section with examples.
* xargs/testsuite/config/unix.exp (xargs_start): Replace the full path
of the xargs executable in the stderr output file by its basename.
* xargs/testsuite/xargs.gnu/P3-n1-IARG.xe: Add file containing the
expected output with the new warning diagnostic.
* xargs/testsuite/xargs.posix/L2-n2.xe: Likewise.
* xargs/testsuite/xargs.posix/rc-123.xe: Likewise.
* xargs/testsuite/xargs.sysv/l1n4.xe: Likewise.
* xargs/testsuite/xargs/testsuite/xargs.gnu/P3-n1-IARG.exp: Ensure the
error diagnostic is in C locale to avoid false positives in other locales.
* xargs/testsuite/xargs.posix/L2-n2.exp: Likewise.
* xargs/testsuite/xargs.posix/rc-123.exp: Likewise.
* xargs/testsuite/xargs.sysv/l1n4.exp: Likewise.
* tests/xargs/conflicting_opts.sh: Add test coverage for combinations
of the mutually exclusive options -I -L and -n.
* xargs/testsuite/Makefile.am (EXTRA_DIST_EXP): Reference the new tests.
(EXTRA_DIST_XO): Reference the new *.xo files.
(EXTRA_DIST_XE): Reference the new *.xe files.
* NEWS (Improvements): Mention the change.
Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
Discussed at https://savannah.gnu.org/bugs/?52137
Duplicate of https://savannah.gnu.org/bugs/?58156
The type pid_t is defined as long on Solaris 11. Therefore, GCC
issued a -Wformat warning there when attempting to print as %d.
* find/exec.c: (launch): When writing the debug message, treat child_pid
as the wider long type.
'ls -i' outputs leading blanks before the inode number on Solaris 11.
The 'exp' reference file should not contain them.
* tests/find/printf_inode.sh (make_canonical): Strip off leading
blanks.
"Overfull \hbox" results lines exceeding the page width, and therefore
may not even be readable. At least they are ugly.
* doc/find.texi (node O_NOFOLLOW): Break long example lines into
the next lines. While at it, update the version in that example to
4.8.0 (in good faith we'll have it in 2021), because we shouldn't
have a "*-git" version there.
* xargs/xargs.c (usage): Amend the -I description to mention that
the input is split at newlines.
* NEWS: Mention the change.
Fixes https://savannah.gnu.org/bugs/?58149
Run 'make update-gnulib-to-latest', mainly for these two commits:
> free-posix: Work around GCC mis-optimization bug.
> getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10.
* gnulib: Update to latest.
This test was prone to false-positive errors due to sub-second rounding
issues. Failures have been seen on openSUSE's build system.
* tests/find/used.sh: Use larger time intervals for the future access
times of the test files (compared to the '-used N' search), and adjust
the expected output accordingly.
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'.
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: Likewise, here to avoid starting a year number range.
* All other files: Update copyright years via the above make run.
The user probably doesn't know that the reference to "Finding Files"
means to consult the Texinfo manual. It seems to be sufficient to
note that -exec is more insecure than -execdir, so remove the reference,
* find/find.1 (.SH BUGS): Remove reference as described above.
While at it, remove the empty .P and the end of the section.
Namely:
- When referencing C system or library functions, refer to their
man pages.
- Avoid oddly boldfaced ',' after a filename value.
- Remove superfluous ',' in the description of %h.
- Avoid extra space before comme after a boldfaced value.
* find/find.1: Do the above.
Reported by Helge Kreutzmann in
https://savannah.gnu.org/bugs/?59745
Two side notes in brackets in one sentence are disturbing the
reading flow.
* find/find.1 ("-exec command {} +"): Avoid having two bracketed side
notes in one sentence; borrow the better description from the Texinfo
manual.
Reported by Helge Kreutzmann in
https://savannah.gnu.org/bugs/?59745
In the description of -name patterns matching "hidden" files, i.e.,
those beginning with a dot, avoid talking in the future.
The change was back in version 4.2.2.
Maybe we should drop this hint about historic behavior at all.
* doc/find.texi (Base Name Patterns): Remove the word "will".
* find/find.1 (.SH STANDARDS CONFORMANCE): Likewise.
(.SH HISTORY): Likewise.
The EXAMPLES sesction was hard to read because it was not clear to
which sentence a sample command belonged. Use '.SS' and '.IP' markup,
and also indent the sample commands nicer.
Furthermore, change the formatting of file names as italice consistently.
Avoid empty lines, by either explicitly marking as empty via '.', or
by adding the invisible zero-width character '\&'.
* find/find.1 (.SH EXAMPLES): Do the above.
Mark whitespace in commands as non-breakable in more cases to avoid
unwanted hyphenation in the middle of commands. For this to work,
some cases need to have some consecutive lines joined into one '.B'
or '.BR', the latter may require quoting the first argument within "...".
* find/find.1: Do the above.
(.IP -path): Improve indentation using '.in +4m', and set filename
as italic.
(.BR "ls -l"): Escape the minus of the option.
(.BR "\-size\ \-1\|048\|576c"): Add space before dot '.', the 2nd arg.
(.B \-exec ... \e+): No need to escape '+': remove '\e'.
(.B \-execdir ... \e+): Likewise.
(POSIXLY_CORRECT): Set the strings '+zzz' and '/zzz' in the -perm
description as italic.
man-pages(7) says:
Filenames [...] are always in italics, except in the SYNOPSIS
section, [...]
Set filenames in italics, respectively change from boldface to italics.
While at it, mark whitespaces in commands as non-breakable via '\ '
to avoid unwanted hyphenation in the middle of commands.
* find/find.1 (-regex): Do the above.
(-exec,-execdir,-fprint): Likewise.
A sentence starting with an option looks odd:
"... starting-points. -maxdepth 0 means only apply ..."
* doc/find.texi (-maxdepth): Add "Using " to avoid having an option
at the start of the sentence.
(-mindepth): Likewise.
* find/find.1: Likewise.
While at it, mark the whitespace as non-breakable via '\ '.
Reported by Helge Kreutzmann in
https://savannah.gnu.org/bugs/?59745
The "BUGS" section also documented how to report bugs. This is better
done in a separate "REPORTING BUGS" section. Add this section where
missing. In it, redirect the user to the "How to get help" section
("#get-help") of the GNU findutils online page; also mention where
to report translation issues.
Bring the sections "SEE ALSO" and "COPYRIGHT" into the correct order,
which is: "REPORTING BUGS", "COPYRIGHT" and finally "SEE ALSO".
See 'man-pages(7)'.
The "SEE ALSO" section now refers to both the corresponding node in
the online HTML version of the Texinfo manual and lists the 'info' command.
Sort the entries referring to other man pages: first by their manual
section numbers, then alphabetically.
While at it, add an empty line (directive '.') before all '.SH' section
headers.
* find/find.1: Do the above.
* locate/locate.1: Likewise.
* locate/locatedb.5: Likewise.
* locate/updatedb.1: Likewise.
* xargs/xargs.1: Likewise.
Avoid using fopen_safer and opendir_safer directly in favor of
letting gnulib transparently doing the work via "dirent--.h" and
"stdio--.h".
* find/oldfind.c (dirent-safer.h): Replace include ...
(dirent--.h): ... by this.
(process_dir): Change opendir_safer to the regular opendir call.
* find/sharefile.c (stdio-safer.h): Replace include ...
(stdio--.h): ... by this.
(sharefile_fopen): Change fopen_safer to regular fopen call.
* lib/fdleak.c (dirent-safer.h): Replace include ...
(dirent--.h): ... by this.
(get_proc_max_fd): Change opendir_safer to regular opendir call.
See section "Handling closed standard file descriptors" in the gnulib
manual.
* bootstrip.conf (gnulib_modules): Add fcntl-safer, openat-safer
and unistd-safer.
* find/exec.c: Include "fcntl--.h" to use the *-safer variant of open()
or openat().
* find/pred.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise, and include "unustd--.h" to use the *-safer
variant of pipe().
* doc/find.texi (Comparing Timestamps): Clarify that the above options
are equivalent to the options -neweram, -newercm and -newermm.
Suggested by Reuben Thomas.
* build-aux/git-log-fix (v4.7.0-15-g6e55ad98): Tweak ChangeLog entry
for this commit during 'make dist' to reference the bug system on
Savannah instead of that on debbugs.gnu.org.
Reported by Axel Beckert in
https://sv.gnu.org/bugs/?57291
Run 'make update-gnulib-to-latest', mainly for these two commits:
> selinux-at, selinux-h: port to SELinux 3.1
> parse-datetime: Make the build rule work with parallel 'make'.
* gnulib: Update to latest.
GCC-10.2.1 complains about format strings it was not able to check:
print.c:529:11: warning: format not a string literal, format string not \
checked [-Wformat-nonliteral]
529 | strftime (altbuf, buf_size, timefmt, &altered_time);
| ^~~~~~~~
* configure.ac (compiler-warnings): Add -Wformat-nonliteral.
* find/find.1 (-printf): Make it clear that the list of conversion
specification characters of '%Ak' is incomplete; refer to the
strftime() documentation. While at it, document the F conversion
character which yields 'yyyy-mm-dd'.
* doc/find.texi (Time Formats): Likewise.
* NEWS: Mention the improvement.
Suggested in https://bugzilla.redhat.com/1882695
Previously, 'find -D exec' only gave helpful output right before the
invocation of complete_pending_execdirs, i.e., not for every child
execution of the -exec, -execdir, -ok and -okdir predicates.
Make the 'exec' debug output more useful and consistent.
* find/exec.c (launch): Output DebugExec diagnostics right before spawning
the child process, and after getting its exit status (unless we already
have regular error diagnotstic anyway, e.g. if the child has been
terminated by a signal).
* find/ftsfind.c (show_outstanding_execdirs): Remove.
(find): Remove invocation of the above function, and simplify.
* NEW: Mention the improvement.
Suggested by Philip Rowlands in https://sv.gnu.org/bugs/?59083
* find/find.1 (EXAMPLES): Use (aq...(aq consistently around the -exec
arguments containing the placeholder '{}/...'.
Suggested in https://sv.gnu.org/bugs/?59012
* find/find.1 (TESTS): Improve the description of tests accepting a
numeric argument that they match "less than, more than or exactly" the
given 'n', thus helping the user to remind to use '-n', '+n' or a bare
'n' (as decribed at the top).
* doc/find.texi (section find Expressions): Move section from chapter
"Introduction" to "Finding Files". The description about the general
syntax of a find expression fits more naturally there, including the
already existing part about numeric arguments.
* NEWS: Mention the change.
Suggested in https://sv.gnu.org/bugs/?57025 .
* find/find.1: Document that the '--' option is not much useful for
find, because if a path name following that would start with a `-',
then find would treat it as an expression argument.
* NEWS: Mention it.
Reported by Andreas Metzler <ametzler@bebt.de> in
https://sv.gnu.org/bugs/?58205
The first page of the Texinfo documentation should display the package
version the documentation corresponds to. Also change the title
from "Finding Files" to "GNU Findutils ..." to better reflect the
package name. These changes align the documentation better with
that of other GNU packages like e.g. grep.
* doc/find.texi: Do the above. Furthermore, display the VERSION also
in the first sentence after the @direntry list.
While at it, enclose the FDL licence text in a @quotation block.
* doc/find-maint.texi: Likewise.