diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:17:09 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:17:09 +0300 |
commit | cc78bdc31749e9754120ae5a9d4849f4832b40a4 (patch) | |
tree | 4f9e3f2064e56651ed8d41ae9d8ce8b08fc5241b /ChangeLog | |
parent | 8425beb209e6fedf50bcdd934ced14dfa0d7b596 (diff) | |
parent | 71cd8e3a743046573744123777061b64881bf372 (diff) | |
download | coreutils-cc78bdc31749e9754120ae5a9d4849f4832b40a4.tar.gz |
Merge tag 'upstream/8.24'
Upstream version 8.24
Conflicts:
INSTALL
Makefile.in
aclocal.m4
build-aux/config.guess
build-aux/config.rpath
build-aux/config.sub
build-aux/depcomp
build-aux/missing
build-aux/test-driver
build-aux/texinfo.tex
doc/coreutils.info
doc/stamp-vti
doc/version.texi
gnulib-tests/Makefile.in
po/Makefile.in.in
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 3891 |
1 files changed, 2827 insertions, 1064 deletions
@@ -1,5 +1,2832 @@ +2015-07-03 Pádraig Brady <P@draigBrady.com> + + version 8.24 + * NEWS: Record release date. + + maint: fix distclean-check failure due to THANKS + * Makefile.am: Remove our dependence on src/sort which + induces awkward dependencies for `make dist` since + THANKS will be rebuilt once src/sort is newer. + Instead we remove the problematic -f option to sort + which actually doesn't change the order given + our current input. + + maint: avoid false syntax-check failure in distcheck + * cfk.mk (sc_tests_executable): Restrict the check to git files, + so we don't flag any gnulib files added to test/ during + `make distcheck`. + + tests: update gnulib submodule and tests/init.sh to latest + * gnulib: Update to latest, with fixes to tests edge cases. + * tests/init.sh: Update from gnulib. + + tests: avoid side effects of $SHELL environment variable + Since non interactive shells don't generally set $SHELL, + its value is propagated through the tests and may cause issues; + for example if $SHELL implicitly adjusts $PATH when run. + Instead we set $SHELL to that determined by the posix-shell module, + and use that consistently for all test sub scripts, + including those created thorugh the `split --filter` command. + * tests/local.mk: Explicitly set $SHELL to $(PREFERABLY_POSIX_SHELL) + which defaults to $CONFIG_SHELL and thus usually /bin/sh. + * tests/envvar-check: Remove bash environment variables with + side effects, in case /bin/bash was selected for $SHELL. + * tests/misc/help-version.sh: Remove redundant initialization of $SHELL. + * tests/install/strip-program.sh: Use $SHELL for sub script. + * tests/misc/sort-compress-hang.sh: Likewise. + * tests/misc/sort-compress-proc.sh: Likewise. + * tests/misc/sort-compress.sh: Likewise. + * tests/misc/timeout-group.sh: Likewise. + * tests/rm/fail-eperm.xpl: Remove redundant elision of bash env vars. + * tests/misc/pwd-long.sh: Likewise. + +2015-07-02 Pádraig Brady <P@draigBrady.com> + + tests: avoid false failures on OpenBSD 5.7 + * tests/du/threshold.sh: Homogenize getopt error messages. + * tests/misc/numfmt.pl: Likewise. + * tests/mv/i-3.sh: Skip on *BSD not just FreeBSD. + + wc: fix reading of /proc files on aarch64 + tests/misc/wc-proc.sh fails when the page size is 64K + * src/wc.c (wc): The lseek adjustment should be based on st_blksize, + rather than on the internal buffer size. This is significant on + aarch64 where st_blksize in /proc is the 64K (the page size) and + thus larger than the internal buffer. + * src/split.c (main): Even though the similar processing is done + on the internal buffer size, that's based on st_blksize and + so fine in this regard. Add an assert to enforce this. + Avoid this path for the undocumented ---io-blksize option. + +2015-07-01 Pádraig Brady <P@draigBrady.com> + + build: update gnulib submodule to latest + Mainly with build fixes for FreeBSD and OS X. + + numfmt: increase precision on 32 bit FreeBSD + * m4/jm-macros.m4 (HAVE_FPSETPREC): Define if needed. + * src/numfmt.c (main): Call fpsetprec() if needed. + Fixes large-15 and large-16 test failures on 32 bit FreeBSD. + + tests: avoid false failure on FreeBSD systems + * tests/misc/stty.sh: FreeBSD returns ENOTTY for + the TIOCEXT ioctl, so just avoid this option for now. + + factor: ensure atomic output through pipes + The new tests/misc/factor-parallel.sh test was + seen to fail on FreeBSD (derived) systems, which was + due to split(1) --filter reading partial lines + through pipes, as factor(1) was writing a little + over PIPE_BUF each time. + * src/factor.c (lbuf): A new structure to internally buffer lines. + (lbuf_alloc): A new function to allocate enough at program start. + (lbuf_putint): A new function to buffer a uintmax_t. + (lbuf_flush): A new function to write directly to standard output. + (lbuf_putc): A new function to buffer a character and if enough + lines are buffered, then output complete lines <= PIPE_BUF, + and continue to buffer the rest. + (main): Call the internal buffer allocator, and register + the final flush from the internal buffer at program exit. + + tests: fix false failure on slower systems + * tests/dd/stats.sh: Wait 20s for dd to write 250MB through a fifo, + rather than 10s for 500MB. The failure was seen often on + a lightly loaded SPARC-Enterprise-T5220 running Solaris 10. + +2015-06-29 Jim Meyering <meyering@fb.com> + + maint: stdbuf.c: avoid the OS X putenv function + * bootstrap.conf (gnulib_modules): Add setenv, to make this + module dependency explicit; setenv is also used by split. + * src/stdbuf.c (set_LD_PRELOAD) [__APPLE__]: Use the OS X setenv + function, rather than putenv, per that documentation: + https://developer.apple.com/\ + library/mac/documentation/Darwin/Reference/ManPages/man3/putenv.3.html + + build: numfmt.c: avoid a shadowing warning + * src/numfmt.c (parse_field_arg): Rename parameter s/optarg/arg/, + to avoid shadowing getopt's global variable. + Otherwise, building on OS X, with --enable-gcc-warnings, I saw this: + In file included from src/numfmt.c:19:0: + src/numfmt.c: In function 'parse_field_arg': + ./lib/config.h:3109:25: error: declaration of 'rpl_optarg' shadows\ + a global declaration [-Werror=shadow] + +2015-06-29 Assaf Gordon <assafgordon@gmail.com> + + numfmt: fix printf argument order + * src/numfmt.c (double_to_human): Fix the argument order + passed to snprintf, which happened to work on amd64 with + its separate va_arg storage area for floats¹, + but would fail tests for example on i686. + ¹ https://blog.nelhage.com/2010/10/amd64-and-va_arg/ + +2015-06-28 Pádraig Brady <P@draigBrady.com> + + maint: clarify df's use of device IDs from /proc/self/mountinfo + * src/df.c (filter_mount_list): Clarify why we still stat even + though devices IDs may already be available. Note using + /proc/self/mountinfo is still an advantage to get filtered items + with accurate device patchs in chroots and with bind mounts. + I.E. on older setups with static /etc/mtab, df will now + bypass that to get the more accuracte and dynamic info. + +2015-06-26 Pádraig Brady <P@draigBrady.com> + + chroot: quote argument in error diagnostic + * src/chroot.c (main): Quote the passed argument, + to avoid confusing error messages. + +2015-06-25 Pádraig Brady <P@draigBrady.com> + + maint: clarify integer operations in recent commit + * src/factor.c (print_uintmaxes): Comment that the + value of n_out doesn't matter on error, and add an + explicit cast to avoid any future warnings. + Suggested by Jim Meyering RE commit v8.23-229-g4d2d6c5 + + tests: avoid false failure when running as root + * tests/misc/sync.sh: Ensure dir is unreadable before + including the permission check. + + tests: avoid false failures with LD_PRELOAD=libasan.so.2 + The LD_PRELOAD checks by -fsanitize=address are overly strict: + https://groups.google.com/forum/#!topic/address-sanitizer/jEvOJgkDqQk + A workaround is to first export LD_PRELOAD=libasan.so.2 + The tests below are adjusted so that workaround is not discarded. + * tests/cp/no-ctx.sh: Append to $LD_PRELOAD. + * tests/df/no-mtab-status.sh: Likewise. + * tests/df/skip-duplicates.sh: Likewise. + * tests/ls/getxattr-speedup.sh: Likewise. + * tests/rm/r-root.sh: Likewise. + * tests/cp/nfs-removal-race.sh: Likewise. Also check that + LD_PRELOAD is effective to aid future maintainability + and avoid false failure if libasan.so.2 is not preloaded. + + build: update to latest gnulib + Mainly for -fsanitize=address and -fsanitize=undefined fixes + + build: allow build to complete with -fsanitize=address + * src/make-prime-list.c (main): When building with + the above option, avoid this build stopping error: + "LeakSanitizer: detected memory leaks" + +2015-06-24 Pádraig Brady <P@draigBrady.com> + + maint: avoid undefined behavior in qsort call + GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning: + "runtime error: null pointer passed as argument 1, + which is declared to never be null" + * src/ptx.c (sort_found_occurs): Avoid the call with no entries. + + factor: avoid interspersed lines for parallel runs + * src/factor.c (n_out): A new global variable to track + how much data has been written to stdout. + (print_factors_single): Use n_out to determine whether + to flush the current (and previous) lines. + * tests/misc/factor-parallel.sh: Add a new test. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug fix. + + seq: handle exponents more consistently + src/seq.c (scan_arg): Set precision and width _after_ exponentiation. + For example, this will make '1.1e1 12' and '11 1.2e1' equivalent. + One can still set the precision by specifying extra precision on + the start value, or more naturally with a precision on a step value. + * tests/misc/seq-precision.sh: Add new cases. + + seq: use consistent output format with hex integers + * src/seq.c (scan_arg): Set precision to 0 for hex constants + (while avoiding hex floats). This will use then use the + fast path for these arguments. Note we also set the precision + of inf to 0 here, which ensures we use consistent precision + on output where possible. + * tests/misc/seq-precision.sh: Add corresponding test cases. + + seq: support inf last item more generally/efficiently + * src/seq.c (main): Call seq_fast for infinite last value. + This implicitly avoids format conversion on the + 999999 -> 1000000 transition. + * src/seq.c (seq_fast): Generalize the buffer handling, + and adjust to handle the "inf" last value specifics. + * tests/misc/seq-precision.sh: A new test. + * tests/local.mk: Reference the new test. + +2015-06-22 Pádraig Brady <P@draigBrady.com> + + doc: list numfmt in the main menu with "Numeric operations" + * doc/coreutils.texi (main menu): Add numfmt. + + numfmt: don't hardcode floating point limits + * src/numfmt.c (MAX_UNSCALED_DIGITS): Set this to LDBL_DIG + rather than hardcoding at 18 for better portability. + * tests/misc/numfmt.pl: Restrict limit tests to supported platforms. + + numfmt: handle leading zeros correctly + * src/numfmt.c (simple_strtod_int): Don't count leading zeros + as significant digits. Also have leading zeros as optional + for floating point numbers. + * tests/misc/numfmt.pl: Add test cases. + * NEWS: Mention the fix. + + numfmt: avoid integer overflow when rounding + Due to existing limits this is usually triggered + with an increased precision. We also add further + restrictions to the output of increased precision numbers. + * src/numfmt.c (simple_round): Avoid intmax_t overflow. + (simple_strtod_int): Count digits consistently + for precision loss and overflow detection. + (prepare_padded_number): Include the precision + when excluding numbers to output, since the precision + determines the ultimate values used in the rounding scheme + in double_to_human(). + * tests/misc/numfmt.pl: Add previously failing test cases. + * NEWS: Mention the fix. + +2015-06-21 Pádraig Brady <P@draigBrady.com> + + numfmt: support user specified output precision + * src/numfmt.c (usage): Update the --format description + to indicate precision is allowed. + (parse_format_string): Parse a precision specification + like the standard printf does. + (double_to_human): Honor the precision in --to mode. + * tests/misc/numfmt.pl: New tests. + * doc/coreutils.texi (numfmt invocation): Mention the new feature. + * NEWS: Likewise. + +2015-06-19 Dylan Cali <calid1984@gmail.com> + + numfmt: implement support for field ranges + * src/numfmt.c: Replace field handling code with logic that understands + field range specifiers. Instead of processing a single field and + printing line prefix/suffix around it, process each field in the line + checking whether it has been included for conversion. If so convert and + print, otherwise just print the unaltered field. + (extract_fields): Removed. + (skip_fields): Removed. + (process_line): Gutted and heavily reworked. + (process_suffixed_number): FIELD is now passed as an arg instead of + using a global. + (parse_field_arg): New function that parses field range specifiers. + (next_field): New function that returns pointers to the next field in + a line. + (process_field): New function that wraps the field conversion logic + (include_field): New function that checks whether a field should be + converted + (compare_field): New function used for field value comparisons in a + gl_list. + (free_field): New function used for freeing field values in a gl_list. + Global variable FIELD removed. + New global variable all_fields indicates whether all fields should be + processed. + New global variable all_fields_after stores the first field of a N- + style range. + New global variable all_fields_before stores the last field of a -M + style range. + New global variable field_list stores explicitly specified fields to + process (N N,M or N-M style specifiers). + (usage): Document newly supported field range specifiers. + * bootstrap.conf: Include xlist and linked-list modules. numfmt now + uses the gl_linked_list implementation to store the field ranges. + * tests/misc/numfmt.pl: Add tests for 'cut style' field ranges. + Adjust existing tests as partial output can occur before an error + Remove test for the 'invalid' field -5.. this is now a valid range. + * gnulib: update to avoid compiler warnings in linked-list. + * NEWS: Mention the new feature. + +2015-06-19 Pádraig Brady <P@draigBrady.com> + + doc: use correct units in df | numfmt example + * src/numfmt.c (usage): Don't scale output from df + so that numfmt outputs the correct values. + + numfmt: handle suffixes consistently with --{from,to}-unit + * src/numfmt.c (unit_to_umax): Support SI (power of 10) suffixes + with the --from-unit and --to-unit options. Treat suffixes like + is done with --from=auto, which for example will change the meaning + of --to-unit=G to that of --to-unit=Gi. The suffix support was + previously undocumented and it's better to avoid the traditional + coreutils suffix handling in numfmt by default. + * doc/coreutils.texi: Document the new behavior. Also fix a typo + mentioning {from,to}=units=. + * tests/misc/numfmt.pl: Adjust accordingly. + * NEWS: Mention the change in behavior. + +2015-06-17 Pádraig Brady <P@draigBrady.com> + + maint: remove stale online manual items at release + * gnulib: Update to get the new gnu-web-doc-update with --mirror option. + * README-release: Use the --mirror option in the instructions. + Also clarify and update various release steps. + +2015-06-09 Pádraig Brady <P@draigBrady.com> + + tail: display consistent diagnostics upon file replacement + * src/tail.c (recheck): Display diagnostices for replaced files + even with reused inodes which is a common case. + * tests/tail-2/F-vs-missing.sh: Use correct diagnostic in comment. + * tests/tail-2/F-vs-rename.sh: Likewise. + + tail: display file headers correctly with inotify + * src/tail.c (tail_forever_inotify): Use the fspec pointer to + distinguish previously output files, rather than a descriptor + from the inotify event. That event descriptor was that of + the parent directory when files were created or renamed etc. + (check_fspec): Adjust for the new comparison. Also show the + header when the file is truncated, since we show data + in this case also. + * tests/tail-2/F-headers.sh: A new test case. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug fix. + +2015-06-07 Pádraig Brady <P@draigBrady.com> + + maint: sync .gitignore items with gnulib entries + * .gitignore: Add entries for potentially generated headers. + Also remove a couple of items already present in lib/.gitignore. + * cfg.mk (sc_gitignore_missing): A new syntax check rule to + identify missing .gitignore entries. + (sc_gitignore_redundant): A new syntax check rule to + identify redundant .gitignore entries. + Reported by Tomas Nordin. + +2015-06-06 Pádraig Brady <P@draigBrady.com> + + tests: fix false failure in recent test adjustment + * configure.ac: Comment on why we link rather than run the test, + and remove the moot __ELF__ check since we never ran it anyway, + and the new CFLAGS and LDFLAGS are a more direct test of support. + * tests/misc/wc-parallel.sh: Fix a syntax error in the previous change. + * tests/misc/md5sum-parallel.sh: Use better error checking, consistent + with that used in wc-parallel.sh. + +2015-06-06 Paul Eggert <eggert@cs.ucla.edu> + + build: port to AIX + Problems reported by Michael Felt, and and part of this fix taken + from code suggested by Pádraig Brady in: + http://bugs.gnu.org/20733#112 + * configure.ac (stdbuf_supported): Check for warnings, and + for -fPIC and -shared, for AIX. + * src/stat.c (STRUCT_STATVFS): Define to struct statvfs64 if + STATFS is statvfs64. + * src/sync.c (sync_arg) [_AIX]: Open in write mode, + since AIX fsync doesn't work on read-only file descriptors. + * tests/misc/wc-parallel.sh: Skip test if xargs -P does not work. + + build: update gnulib submodule to latest + +2015-06-05 Paul Eggert <eggert@cs.ucla.edu> + + build: update gnulib submodule to latest + +2015-06-04 Paul Eggert <eggert@cs.ucla.edu> + + build: port single_binary_prog to POSIX shell + Problem reported privately by Michael Felt. + * Makefile.am (install-exec-hook): + * src/local.mk (src/coreutils_symlinks, src/coreutils_shebangs) + (clean-local): + Port to POSIX shell, which doesn't allow 'for i in ; do ...'. + +2015-06-03 Pádraig Brady <P@draigBrady.com> + + build: add a dependency on the gnulib tempname module + * bootstrap.conf: Add "tempname" which is needed by mktemp(1). + The explicit dependency supports running gnulib-tool with + the --conditional-dependencies option, used to minimize built + modules. Note on a Fedora 22 system, that results in avoiding + redundant builds of: areadlinkat.o asnprintf.o fd-hook.o + fseterr.o printf-args.o printf-parse.o sockets.o vasnprintf.o. + However --conditional-dependencies is not enabled, since it + currently precludes the inclusion of gnulib tests. + +2015-06-02 Pádraig Brady <P@draigBrady.com> + + build: update to latest gnulib + Mainly with build fixes for Mac OS X. + +2015-06-01 Pádraig Brady <P@draigBrady.com> + + tests: fix race in tail test without inotify + * tests/tail-2/wait.sh: Without inotify, skip a portion of the test + that checks that -F never outputs from a tailed descriptor + after the followed name is recreated, because tail_forever() + doesn't guarantee that. + Noticed at http://hydra.nixos.org/build/22766288 + + tests: fix false failure on loaded systems + * tests/misc/uniq-perf.sh: Use our standard 10s timeout, + which is sufficient to trigger the failure and also + avoids a false failure on slow/loaded systems. + Noticed at http://hydra.nixos.org/build/22766288 + +2015-05-30 Pádraig Brady <P@draigBrady.com> + + maint: avoid new coverity warnings + * src/sync.c (sync_arg): Initialise variable to avoid + unitialized access if assert is disabled. + * src/head.c (elide_tail_bytes_file): Support this function + with ---presume-input-pipe and larger files, + which regressed with commit v8.23-47-g2662702. + (elide_tail_lines_file): Likewise. + * src/dd.c (dd_copy): Explicitly don't try to ftruncate() + upon failure to lseek() (the existing check against + st_size was already protecting that). + * src/factor.c (factor_using_squfof): Assert (only when + linting due to performance) to avoid the implication of + divide by zero. + * src/od.c (read_block): Remove dead code. + * src/tac.c (tac_seekable): Likewise. + * src/ls.c (gobble_file): Likewise. + +2015-05-28 Pádraig Brady <P@draigBrady.com> + + build: remove workarounds for unsupported gettext versions + Now that we depend on gettext >= 0.19.2 remove the workaround + for issues in autopoint 0.18.3. Note the scheme currently used in + newer gettext (autopoint) to avoid these issues requires + autoconf >= 2.69, therefore we update this requirement also. + Note the gettext version dependence from gnulib comes from + gnulib using gettext macros, and coreutils indirectly depends on + the gettext module due to: + http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=41dca647 + bootstrap will then update m4/po.m4 and thus require a + supportng gettext version. + * bootstrap: Remove moot warning (resyncing with gnulib). + * configure.ac (AC_PREREQ): Change to 2.69 (now 3 years old). + + tests: ln/hard-to-sym FAIL rather than ERROR when ln fails + * tests/ln/hard-to-sym.sh: Only call framework_failure_ when ln + returns success. + + copy: prefer our hardlink to symlink emulation on OS X 10.10 + * src/copy.c (CAN_HARDLINK_SYMLINKS): Don't enable use of linkat() + on Darwin 14, as the gnulib fallback emulation there doesn't + preserve ownership and timestamps etc. This fixes a test failure + in tests/cp/link-symlink.sh + * tests/cp/link-deref.sh: Adjust accordingly. + +2015-05-26 Pádraig Brady <P@draigBrady.com> + + maint: remove sys/types.h include order check + * src/system.h: This was inadvertently ineffective due to + a typo in commit v8.9-10-ge1aaf89 (Jan 2011), but has + not caused any issues, so remove. + +2015-05-23 Pádraig Brady <P@draigBrady.com> + + mkdir: fix -pZ with existing parent directories + When the parent directory exists and has a different + default context to the final directory, the context + was incorrectly left as that of the parent directory. + * src/mkdir.c (process_dir): Because defaultcon() is called for + existing ancestors (as it must be to avoid races), then we must + unconditionally call restorecon() on the last component due to + the already documented caveat with make_dir_parents(). + Alternatively you could temp disable o->set_security_context + around make_dir_parents(), but that would be subject to races. + * tests (tests/mkdir/restorecon.sh): Add a TODO for improvement. + Reference mknod and mkfifo with print_ver_. + * NEWS: Mention the bug fix. + Fixes http://bugs.gnu.org/20616 + +2015-05-22 Assaf Gordon <assafgordon@gmail.com> + + tests: df-output: accept multiple spaces in header + * tests/df/df-output.sh: Allow for multiple spaces in the header line + of 'df', resulting from alignment with disk sizes >= 10TB. + +2015-05-19 Pádraig Brady <P@draigBrady.com> + + tests: fix non POSIX constructs causing failures with dash + * tests/cp/no-ctx.sh: Scope of `var=val func` is inconsistent + across shells, so avoid that construct with functions. + * tests/df/no-mtab-status.sh: Likewise. + * tests/tail-2/inotify-race.sh: `read` needs an argument. + * tests/tail-2/inotify-race2.sh: Likewise. + +2015-05-17 Pádraig Brady <P@draigBrady.com> + + build: fix 'dist' and 'syntax-check' targets in VPATH build + * cfg.mk: Various syntax-check adjustments so that it's + not assumed the $builddir is the base distribution directory. + * Makefile.am: Likewise for the 'dist' target. + + build: avoid issues with case insensitive file systems + * cfg.mk (sc_case_insensitive_file_names): A new syntax-check rule. + * tests/tail-2/descriptor-vs-rename.sh: Rename from + tests/tail-2/f-vs-rename.sh + * tests/local.mk: Reference the renamed test. + Reported by Jim Meyering. + +2015-05-14 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: fix check for local file system in inotify-rotate-resources.sh + * tests/tail-2/inotify-rotate-resources.sh: s/(is_local_dir)/\1_/ + +2015-05-14 Pádraig Brady <P@draigBrady.com> + + tests: fix async allocation race on BTRFS + * tests/dd/sparse.sh: Sync files before checking allocations, + which may be done asynchronously on NFS and BTRFS at least. + Also mark this test as very expensive on remote file systems. + * tests/du/2g.sh: Likewise, also use fallocate if available + to efficiently allocate the large file, otherwise skip + on remote file systems. + * tests/tail-2/inotify-rotate-resources.sh: Use the more + standard is_local_dir_() to check remoteness. + * tests/cp/fiemap-empty.sh: Comment on the sync issue + for this currerntly unused test. + Fixes http://bugs.gnu.org/20570 + +2015-05-13 Pádraig Brady <P@draigBrady.com> + + timeout: with --foreground don't send SIGCONT + * src/timeout.c (cleanup): Don't send SIGCONT to the monitored program + when --foreground is specified, as it's generally not needed for + foreground programs, and can cause intermittent signal delivery + issues with monitors like GDB for example. + * doc/coreutils.texi (timeout invocation): Mention that SIGCONT + is not sent with --foreground. + * NEWS: Mention the behavior change. + + split: auto set suffix len for --numeric-suffixes=<N --number=N + Supporting `split --numeric-suffixes=1 -n100` for example. + * doc/coreutils.texi (split invocation): Mention the two + use cases for the FROM parameter, and the consequences on + the suffix length determination. + * src/split.c (set_suffix_length): Use the --numeric-suffixes + FROM parameter in the suffix width calculation, when it's + less than the number of files specified in --number. + * tests/split/suffix-auto-length.sh: Add test cases. + Fixes http://bugs.gnu.org/20511 + +2015-05-13 Assaf Gordon <assafgordon@gmail.com> + + doc: clarify the operation of wc -L + * src/wc.c (usage): State that it calculates display width. + * doc/coreutils.texi (wc invocation): Detail the distinct + items used to determine the display width. + +2015-05-11 Pádraig Brady <P@draigBrady.com> + + tail: consistently output all data for truncated files + Generally if logs are truncated, they're truncated to 0 length, + so output all existing data when our heuristic determines truncation. + Note with inotify, truncate() and write() are often determined + independently and so all data would be written if that was the case. + * src/tail.c (check_fspec): Reset file offset to 0 upon truncation. + (tail_forever): Likewise. + (recheck): Add a FIXME for the related issue where tail may lose + data due to tail discounting older log files too early. + * tests/tail-2/truncate.sh: A new test. + * tests/local.mk: Reference the new test. + * NEWS: Mention the fix. + + tail: fix inotify startup races + The previous fixes to races in the various tail tests, + identified actual races in the tail inotify implementation. + With --follow=descriptor, if the tailed file was replaced before + the inotify watch was added, then any subsequent changes were ignored. + Similarly in --follow=name mode, all changes to a new name were + effectively ignored if that name was created after the original open() + but before the inotify_add_watch(). + * src/tail.c (tail_forever_inotify): Fix 3 cases. + 1. With -f, don't stop tailing when file removed before watch. + 2. With -f, watch right file when file replaced before watch. + 3. With -F, inspect correct file when replaced before watch. + Existing tests identify these when tail compiled with TAIL_TEST_SLEEP. + * tests/tail-2/inotify-rotate-resources.sh: + This test also identifies the issue with --follow=name + when TAIL_TEST_SLEEP is used. Adjust so the test is immune + to such races, and also fail quicker on remote file systems. + * tests/tail-2/inotify-race2.sh: A new test using GDB, + based on inotify-race.sh, which tests the -F race + without needed recompilation with sleeps. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug. + + tests: cleanup background processes upon interruption + Reap background processes so that: + - Stray processes aren't left on the system + - Files aren't held open causing deletion issues on NFS + - Partitions used to run the tests from can be unmounted + * tests/tail-2/F-vs-missing.sh: Add the `kill && wait` of the + background $pid(s) to cleanup_(). + * tests/tail-2/F-vs-rename.sh: Likewise. + * tests/tail-2/f-vs-rename.sh: Likewise. + * tests/tail-2/append-only.sh: Likewise. + * tests/tail-2/assert-2.sh: Likewise. + * tests/tail-2/assert.sh: Likewise. + * tests/tail-2/flush-initial.sh: Likewise. + * tests/tail-2/inotify-hash-abuse.sh: Likewise. + * tests/tail-2/inotify-hash-abuse2.sh: Likewise. + * tests/tail-2/inotify-race.sh: Likewise. + * tests/tail-2/inotify-rotate-resources.sh: Likewise. + * tests/tail-2/inotify-rotate.sh: Likewise. + * tests/tail-2/pid.sh: Likewise. + * tests/tail-2/pipe-f2.sh: Likewise. + * tests/tail-2/retry.sh: Likewise. + * tests/tail-2/symlink.sh: Likewise. + * tests/tail-2/tail-n0f.sh: Likewise. + * tests/tail-2/wait.sh: Likewise. + * tests/cp/existing-perm-race.sh: Likewise. + * tests/cp/file-perm-race.sh: Likewise. + * tests/cp/parent-perm-race.sh: Likewise. + * tests/cp/sparse-to-pipe.sh: Likewise. + * tests/dd/stats.sh: Likewise. + * tests/du/move-dir-while-traversing.sh: Likewise. + * tests/misc/cat-buf.sh: Likewise. + * tests/misc/help-version.sh: Likewise. + * tests/misc/printf-surprise.sh: Likewise. + * tests/misc/sort-compress-proc.sh: Likewise. + * tests/misc/sort-spinlock-abuse.sh: Likewise. + * tests/misc/stdbuf.sh: Likewise. + * tests/misc/tac-continue.sh: Likewise. + * tests/misc/timeout-group.sh: Likewise. + * tests/mv/i-3.sh: Likewise. + * tests/rm/dangling-symlink.sh: Likewise. + * tests/rm/isatty.sh: Likewise. + * cfg.mk (sc_prohibit_test_background_without_cleanup_): + A new syntax-check to ensure cleanup_() is defined + when background tasks are created in a test. + + tests: avoid hung processes due to gdb SIGCONT handling + * tests/tail-2/inotify-race.sh: Add a `wait` to ensure that + we reap all background gdb and tail processes. That resulted + in the test hanging intermittently and upon investigation was + due to gdb intermittently failing to terminate the child process + due to receiving a SIGCONT signal. Therefore we avoid using + timeout(1) which sends that signal, and instead rely on tail's + inbuilt --pid monitoring on a background sleep process. + Given this new implementation, the VERY_EXPENSIVE guard was removed. + Related issues with this test hanging were previously discussed at: + https://lists.gnu.org/archive/html/bug-coreutils/2009-12/msg00025.html + + tests: fix races in and standardize the tail tests + * tests/tail-2/F-vs-missing.sh: Use standard "fastpoll" options + (-s.1 --max-unchanged-stats=1) to speedup the non-inotify case. + Add the non-inotify case to the test. `wait` on the background + tail process to terminate which should avoid the need for the + non standard `retry_delay_ cleanup ...` on NFS. + * tests/tail-2/F-vs-rename.sh: Remove 'out' at the start of the loop, + to avoid a race in checking its contents. Also ensure 'a' & 'b' + files are present before the tail process starts. Use the standard + "fastpoll" options as above. + * tests/tail-2/f-vs-rename.sh: Likewise. + * tests/tail-2/append-only.sh: Use more standard variable names. + * tests/tail-2/flush-initial.sh: Use "fastpoll" options for + non-inotify platforms. Also `wait` on the background tail to avoid + stray processes and file cleanup issues on NFS. + * tests/tail-2/inotify-hash-abuse.sh: Always run non-inotify case. + Use "fastpoll" options. Use a more standard retry_delay_ instead + of a hardcoded sleep loop. Add a `wait` on the background tail. + * tests/tail-2/inotify-hash-abuse2.sh: Likewise. + * tests/tail-2/inotify-rotate-resources.sh: Wait just on the + specific tail $pid needed. + * tests/tail-2/inotify-rotate.sh: Use "fastpoll" options. + * tests/tail-2/pid.sh: Use standard variable names. + Add a `wait` on the background tails. + * tests/tail-2/pipe-f2.sh: Likewise. + * tests/tail-2/tail-n0f.sh: Likewise. + * tests/tail-2/retry.sh: Use "fastpoll" options. + * tests/tail-2/symlink.sh: Likewise. + * tests/tail-2/wait.sh: Likewise. Speedup by using sub second + parameters to timeout(1). Improve the part ensuring that + -F never follows a renamed file. + * tests/tail-2/infloop-1.sh: Remove invalid test. tail(1) was not + being passed the --pid=$yes_pid option, retry_delay_ wasn't used + to avoid races, and yes could write huge files before being killed. + * tests/local.mk: Remove the invalid test reference. + * tests/tail-2/assert-2.sh: Rewrite using retry_delay_(). Since + no longer hardcoding large delays, remove the VERY_EXPENSIVE tag. + * tests/tail-2/assert.sh: Likewise. + +2015-05-10 Paul Eggert <eggert@cs.ucla.edu> + + build: rewrite is_ENOTSUP without an #if directive + * src/system.h (is_ENOTSUP): Avoid in-function #if directive. + +2015-05-10 Jim Meyering <meyering@fb.com> + + build: avoid a warning form gcc's new -Wlogical-op + Without this change, very recent gcc (e.g., version 6.0.0 20150509) + would print the following when configured with --enable-gcc-warnings: + src/copy.c:165:30: error: logical 'or' of equal expressions \ + [-Werror=logical-op] + && (errno == EOPNOTSUPP || errno == ENOTSUP || errno == ENOSYS)) + ^ + * src/system.h (is_ENOTSUP): New function. + * src/copy.c (punch_hole): Use it. + * src/ls.c (errno_unsupported, gobble_file): Use it. + +2015-04-30 Pádraig Brady <P@draigBrady.com> + + doc: standardize messages about the '-' stdin FILE + * src/system.h (emit_stdin_note): A new function, refactoring + the usage note about the '-' FILE implying stdin. + * src/base64.c (usage): Use the new function to emit the + note in a standard location and with standard separation. + * src/cat.c (usage): Likewise. + * src/csplit.c (usage): Likewise. + * src/cut.c (usage): Likewise. + * src/expand.c (usage): Likewise. + * src/fmt.c (usage): Likewise. + * src/head.c (usage): Likewise. + * src/md5sum.c (usage): Likewise. + * src/nl.c (usage): Likewise. + * src/od.c (usage): Likewise. + * src/paste.c (usage): Likewise. + * src/pr.c (usage): Likewise. + * src/ptx.c (usage): Likewise. + * src/shred.c (usage): Likewise. + * src/shuf.c (usage): Likewise. + * src/sort.c (usage): Likewise. + * src/sum.c (usage): Likewise. + * src/tac.c (usage): Likewise. + * src/tail.c (usage): Likewise. + * src/tsort.c (usage): Likewise. + * src/unexpand.c (usage): Likewise. + * src/wc.c (usage): Likewise. + * src/join.c (usage): Adjust the separation used for + the message referring to FILE1 or FILE2 as stdin. + * src/comm.c (usage): Add a message using the same + wording (translation) as used in join. + * src/split.c (usage): Reword to using FILE rather than + INPUT, allowing use of emit_stdin_note(). Also remove + the mention of "fixed-size" pieces as this isn't now + always the case. + Fixes http://pad.lv/1450179 + + tests: don't skip df tests with /proc/self/mountinfo + * tests/df/no-mtab-status.sh: getmntent is no longer called + when /proc/self/mountinfo is present, thus causing the test + to be skipped. Therefore wrap fopen() to ignore mountinfo, + and use the test genmntent table instead. + * tests/df/skip-duplicates.sh: Likewise. + +2015-04-28 Yunlian Jiang <yunlian@chromium.org> + + build: fix SINGLE_BINARY build when printf is a macro + * src/coreutils.c (usage): include coreutils.h outside + the printf call, because if it's a macro you will get the error: + embedding a #include directive within macro arguments is not supported + +2015-04-28 Pádraig Brady <P@draigBrady.com> + + maint: avoid a new -Werror=return-type warning in yes.c + * src/yes.c (main): Simplify the logic so that the + compiler can see this function always returns a value. + This was seen with GCC 5.0 in SINGLE_BINARY mode. + + tests: run ls capability coloring test irrespective of $LS_COLORS + * tests/ls/no-cap.sh: Ensure the test isn't skipped even if + capability coloring is disabled in the current $LS_COLORS. + Also just enable/disable capability coloring to avoid the + dircolors(1) overhead. + +2015-04-27 Pádraig Brady <P@draigBrady.com> + + maint: use gnulib styling with the online manual + The equivalent styling added in v8.23-155-g3b98ee7, + is now applied to gnulib using projects by default. + + build: rely on gnulib to determine printf routines are safe + gnulib now only checks that the printf routines never crash, + which is all coreutils currrently requires, and so we revert + commit v8.23-81-gf57bfbb to let gnulib decide whether to replace + the system printf routines. + + maint: fix printf format for signed integers + With GCC 5 and the newly added warnings from gnulib, ensure the + correct signed integer is passed for the printf format, + to avoid -Werror=format= failures. + + build: update gnulib submodule to latest + Fix file-has-acl build failure on RHEL/Centos 6. + Fix GCC 5 warnings with printf and in fts.c. + + build: reduce gettext dependency to 0.19.2 + * bootstrap.conf: 0.19.2 is available on openSUSE-13.2, + Debian-8.0, and Ubuntu-14.10. Given there were issues + with earlier 0.19 gettext releases, set this as the new minimum. + * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. + Reported by Bernhard Voelker + +2015-04-27 Paul Eggert <eggert@cs.ucla.edu> + + ls: on GNU/Linux, remove dependency on libacl + * src/local.mk (src_ls_LDADD): Change from LIB_ACL to LIB_HAS_ACL. + + build: update gnulib submodule to latest + * bootstrap.conf (gnulib_modules): Add file-has-acl. + (buildreq): Bump autopoint and gettext to 0.19.4. + * configure.ac (AM_GNU_GETTEXT_VERSION): + Bump to 0.19.4. + * gl/lib/tempname.c.diff, gl/lib/tempname.h.diff: + Merge recent gnulib changes. + +2015-04-23 Michael Witten <mfwitten@gmail.com> + + doc: fix grammar issue in truncate info + * doc/coreutils.texi (truncate invocation): The word 'their' is + incorrect; 'each file' is the antecedent, and is singular, + so 'its' is the correct pronoun. + +2015-04-22 Pádraig Brady <P@draigBrady.com> + + build: fix potential factor build failure on arm and mips + * src/longlong.h: Sync with the latest longlong.h from libgmp to: + - Use __builtin_c[lt]zl on arm64. + - Fix sparc64 vis3 build failure due to missing __clz_tab. + - Avoid a clang build issue on mips. + - Support thumb2 arm 32 bit system. + * src/cfg.mk (sc_ensure_comma_after_id_est): Exclude longlong.h + to ease merges. + + maint: avoid -Werror=strict-overflow warnings with GCC 5 + All warnings were of the form: "assuming signed overflow does not occur + when simplifying conditional to constant [-Werror=strict-overflow]" + * src/dd.c (cache_round): Use an appropriately sized unsigned type, + to avoid possibility of undefined signed overflow. + * src/mknod.c (main): Likewise. + * src/pr.c (pad_down): Likewise. + * src/wc.c (main): Likewise. + * src/tail.c (main): Assert that argc >= 0 thus allowing the + compiler to assume without implication that argc - optind + is positive. + +2015-04-17 Pádraig Brady <P@draigBrady.com> + + dircolors: add 'MISSING' to the default database + * src/dircolors.hin: Add the MISSING entry, to indicate + this as a possibility in new templates output from dircolors, + and also to ease comparison with existing databases that + generally do define a MISSING entry. + +2015-04-13 Andreas Gruenbacher <andreas.gruenbacher@gmail.com> + + doc: clarify how cp behaves with default ACLs + * doc/coreutils.texi (cp invocation): Mention that when copying files + without preserving permissions, the umask or a default ACL affect + the mode of new files. + * THANKS.in: Remove committer. + Related to http://bugs.gnu.org/8527 + +2015-04-13 Pádraig Brady <P@draigBrady.com> + + df: fix --local hanging with inaccessible remote mounts + * src/df.c (filter_mount_list): With -l, avoid stating remote mounts. + * init.cfg: Avoid test hangs with inaccessible remote mounts. + * tests/df/no-mtab-status.sh: Skip with inaccessible remote mounts. + * tests/df/skip-rootfs.sh: Likewise. + * tests/df/total-verify.sh: Likewise. + * NEWS: Mention the bug fix. + Reported at http://bugzilla.redhat.com/1199679 + +2015-04-09 Mitchel Humpherys <mitch.special@gmail.com> + + doc: correct pluralization for mkfifo and mknod + * doc/coreutils.texi: `mkfifo' and `mknod' use the optContext macro + which adds a description for the SELinux security context in addition to + the single option already described in each case. The result in both + cases is two options being introduced as `option' (singular). Fix this + by introducing them as `options' (plural). + +2015-04-03 Pádraig Brady <P@draigBrady.com> + + df: fix use of uninitialized variable reported by valgrind + Conditional jump or move depends on uninitialised value(s) + at 0x40380C: get_field_values (df.c:840) + by 0x403E16: get_dev (df.c:994) + by 0x404D65: get_all_entries (df.c:1364) + by 0x405926: main (df.c:1714) + * src/df.c (get_dev): Initialize the fsu.fsu_bavail_top_bit_set + member, when adding placeholder entries. + (main): Avoid a "definitely lost" memory leak warning from valgrind, + reported by Bernhard Voelker. + +2015-04-01 Pádraig Brady <P@draigBrady.com> + + doc: clarify that ls --sort=time is newest first + * src/ls.c (usage): Add punctuation to avoid ambiguity in the + description of the --time option. Mention that both the -u + and --sort=time default order is newest first. + +2015-03-31 Stephane Chazelas <stephane.chazelas@gmail.com> + + tail: fix -f to follow changes after a rename + * src/tail.c (tail_forever_inotify): Only monitor write()s and + truncate()s to files in --follow=descriptor mode, thus avoiding + the bug where we removed the watch on renamed files. + Also adjust the inotify event processing code that is + now significant only in --follow=name mode. + * tests/tail-2/F-vs-rename.sh: Improve this existing test by running + in both polling and inotify modes. + * tests/tail-2/f-vs-rename.sh: A new test based on the existing one. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug. + Fixes http://bugs.gnu.org/19760 + +2015-03-29 Pádraig Brady <P@draigBrady.com> + + doc: move numfmt info to the 'Numeric operations' section + * doc/coreutils.texi: Move numfmt info to this section, + as numfmt functionality aligns more with seq and factor, + than fmt and pr etc. + +2015-03-27 Paul Eggert <eggert@cs.ucla.edu> + + nohup: clarify stdin redirection + Problem reported by Isaac Schwabacher in: + http://bugs.gnu.org/20214 + * doc/coreutils.texi (nohup invocation): Clarify that when nohup's + stdin gets redirected, it's unreadable. + * doc/coreutils.texi (nohup invocation): + * src/nohup.c (usage): Don't promise /dev/null. + +2015-03-27 Assaf Gordon <assafgordon@gmail.com> + + tests: fix false test failure with df on Debian/kFreeBSD + * tests/fs/skip-duplicates.sh: On this platform .mnt_opts is significant + so define to empty to avoid a NULL deref in read_file_system_list(). + Fixes http://bugs.gnu.org/20210 + +2015-03-26 Christoph Anton Mitterer <calestyo@scientia.net> + + doc: disambiguate the ls --color description + * src/ls.c (usage): Avoid the implication that the + default ls behavior is to --color=always. + Reported in http://bugs.debian.org/781208 + +2015-03-26 Pádraig Brady <P@draigBrady.com> + + doc: clarify the date standard output formats + * src/date.c (usage): Use FMT rather than TIMESPEC as the parameter, + since it's simpler to understand and can be better aligned. + Give an example for the --iso-8601 output format. + Adjust the example used for the 3 standard formats to be unambiguous + with respect to day/mon ordering and use of leading zeros in the time. + Reorder the options descriptions slightly, so that the + 3 standards options are together. + Indent the multi-line descriptions so that grouping is obvious. + Remove a redundant description of the --rfc-3339 format, + which is obvious in the existing example. + Separate these 3 standards options to their own translatable string + to simplify translation. + Change 'date and time' to 'date/time' in the --iso-8601 description + to be consistent with --rfc-3339 and to help avoid the implication + that the time is always output or even output by default. + Fixes http://bugs.gnu.org/20203 + +2015-03-24 Pádraig Brady <P@draigBrady.com> + + maint: apply basic styling to online manual + * README-release: Reference http://www.gnu.org/s/coreutils/manual.css + to apply basic styling to the online coreutils manual, consistent + with the Emacs documentation. + + doc: clarify the uniq -D man page description + * src/uniq.c (usage): The description was very confusing in the man page + due to the stripped newlines. Add punctuation for clarification. + + wc: use a more adaptive wc -l implementation + * src/wc.c (wc): Allow any block to select the count implementation, + rather than just using the first 10 lines. This also simplifies + the code from 3 loops to 2. + +2015-03-23 Dan Jacobson <jidanni@jidanni.org> + + doc: clarify default order for ls --sort=size + * src/ls.c (usage): Mention that default order is largest first. + Fixes http://bugs.gnu.org/20172 + +2015-03-20 Pádraig Brady <P@draigBrady.com> + + maint: really fix wildcard quoting in sc_tests_executable + * cfg.mk (sc_tests_executable): The previous commit avoided + the globbing, but also passed on the quoted wildcards to find(1). + We could use eval to handle the quoting, though that's a bit + awkward and dangerous, so instead explicitly disable globbing + for the whole make target subshell. Note noglob is not available + on solaris, where we fall back to set -f. Note also that zsh + uses set -F for this, but that's moot here. Also correct the + find(1) expression to include the -o between each wildcard. + + maint: fix wildcard quoting in sc_tests_executable + * cfg.mk (sc_tests_executable): If there are files with + $TEST_EXTENSIONS in the current directory, then the + lack of quoting of the $test_extensions_rx contents + could result in globbing and an inconsequential run. + find(1) produces warnings only with more than one expansion. + +2015-03-20 Kristoffer Brånemyr <ztion1@yahoo.se> + + wc: speedup counting of short lines + Using a test file generated with: + yes | head -n100M > 2x100M.txt + before> time wc -l 2x100M.txt + real 0.842s + user 0.810s + sys 0.033s + after> time wc -l 2x100M.txt + real 0.142s + user 0.111s + sys 0.031s + * src/wc.c (wc): Split the loop that deals with -l into 3. + The first is used at the start of the input to determine if + the average line length is < 15, and if so the second loop is + used to look for '\n' internally to wc. For longer lines, + memchr is used as before to take advantage of system specific + optimizations which any outweigh function call overhead. + Note the first 2 loops could be combined, though in testing, + GCC 4.9.2 at least, wasn't sophisticated enough to separate + the loops based on the "check_len" invariant. + Note also __builtin_memchr() isn't significant here as + GCC currently only applies constant folding with that. + * NEWS: Mention the improvement. + +2015-03-10 Giuseppe Scrivano <gscrivano@gnu.org> + + yes: improve efficiency when all args aren't buffered + * src/yes.c (main): Even when the internal buffer isn't large enough, + output what we've buffered already, and interate over the rest. + This improves the performance in the edge case where there are + many small arguments that overflow the buffer. + * tests/misc/yes.sh: Add a test case for the many small arguments case. + +2015-03-10 Pádraig Brady <P@draigBrady.com> + + yes: output data more efficiently + yes(1) may be used to generate repeating patterns of text + for test inputs etc., so adjust to be more efficient. + Profiling the case where yes(1) is outputting small items + through stdio (which was the default case), shows the overhead + of continuously processing small items in main() and in stdio: + $ yes >/dev/null & perf top -p $! + 31.02% yes [.] main + 27.36% libc-2.20.so [.] _IO_file_xsputn@@GLIBC_2.2.5 + 14.51% libc-2.20.so [.] fputs_unlocked + 13.50% libc-2.20.so [.] strlen + 10.66% libc-2.20.so [.] __GI___mempcpy + 1.98% yes [.] fputs_unlocked@plta + Sending more data per stdio call improves the situation, + but still, there is significant stdio overhead due to memory copies, + and the repeated string length checking: + $ yes "`echo {1..1000}`" >/dev/null & perf top -p $! + 42.26% libc-2.20.so [.] __GI___mempcpy + 17.38% libc-2.20.so [.] strlen + 5.21% [kernel] [k] __srcu_read_lock + 4.58% [kernel] [k] __srcu_read_unlock + 4.27% libc-2.20.so [.] _IO_file_xsputn@@GLIBC_2.2.5 + 2.50% libc-2.20.so [.] __GI___libc_write + 2.45% [kernel] [k] system_call + 2.40% [kernel] [k] system_call_after_swapgs + 2.27% [kernel] [k] vfs_write + 2.09% libc-2.20.so [.] _IO_do_write@@GLIBC_2.2.5 + 2.01% [kernel] [k] fsnotify + 1.95% libc-2.20.so [.] _IO_file_write@@GLIBC_2.2.5 + 1.44% yes [.] main + We can avoid all stdio overhead by building up the buffer + _once_ and outputting that, and the profile below shows + the bottleneck moved to the kernel: + $ src/yes >/dev/null & perf top -p $! + 15.42% [kernel] [k] __srcu_read_lock + 12.98% [kernel] [k] __srcu_read_unlock + 9.41% libc-2.20.so [.] __GI___libc_write + 9.11% [kernel] [k] vfs_write + 8.35% [kernel] [k] fsnotify + 8.02% [kernel] [k] system_call + 5.84% [kernel] [k] system_call_after_swapgs + 4.54% [kernel] [k] __fget_light + 3.98% [kernel] [k] sys_write + 3.65% [kernel] [k] selinux_file_permission + 3.44% [kernel] [k] rw_verify_area + 2.94% [kernel] [k] __fsnotify_parent + 2.76% [kernel] [k] security_file_permission + 2.39% yes [.] main + 2.17% [kernel] [k] __fdget_pos + 2.13% [kernel] [k] sysret_check + 0.81% [kernel] [k] write_null + 0.36% yes [.] write@plt + Note this change also ensures that yes(1) will only write + complete lines for lines shorter than BUFSIZ. + * src/yes.c (main): Build up a BUFSIZ buffer of lines, + and output that, rather than having stdio process each item. + * tests/misc/yes.sh: Add a new test for various buffer sizes. + * tests/local.mk: Reference the new test. + Fixes http://bugs.gnu.org/20029 + +2015-03-07 Pádraig Brady <P@draigBrady.com> + + build: fix make dependencies for test.1 + In certain parallel build situations this would give the error: + help2man: can't get `--help' info from man/test.td/[ + Makefile:14189: recipe for target 'man/test.1' failed + * man/local.mk (test.1): Depend on `[` rather than `test`, + as `test --help` outputs nothing. Also move dir.1 and vdir.1 + back to the main list, as they're no more exceptions than + sha1sum etc. + +2015-03-05 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: be less strict about executable permissions of tests + With "umask 0027" or even "umask 0077", the git clone of coreutils + does not have the executable bit set for 'other' (or 'group). + Therefore, "make syntax-check" would fail. + * cfg.mk (sc_tests_executable): Change the -perm argument of find(1) + to only print the names of the files which are not executable by the + user, rather than insisting on ugo+x (octal 111). + +2015-03-05 Stéphane Aulery <saulery@free.fr> + + doc: mention persistence caveats in sync man page + * man/sync.x ([BUGS]): Mention the caveats and reference + the system call man pages for more details. + Fixes http://bugs.gnu.org/19995 + Debian bug #507085 reported by jidanni@jidanni.org + +2015-03-04 Pádraig Brady <P@draigBrady.com> + + tee: generalize the --write-error option to --output-error + Adjust commit v8.23-140-gfdd6ebf to add the --output-error option + instead of --write-error, and treat open() errors like write() errors. + * doc/coreutils.texi (tee invocation): s/write-error/output-error/. + * src/tee.c (main): Exit on open() error if appropriate. + * tests/misc/tee.sh: Add a case to test open() errors. + * NEWS: Adjust for the more general output error behavior. + Suggested by Bernhard Voelker. + +2015-03-04 Jarosław Gruca <jgruca1981@gmail.com> + + maint: update stale comment about ls color sequences + * src/ls.c (color_indicator[C_END]): Comment with the correct + sequence, which was used since commit v6.10-61-g483297d + Fixes http://bugs.gnu.org/19992 + +2015-02-27 Shane M Seymour <shane.seymour@hp.com> + + tail,stat: improve support for the IBRIX file system + Note that IBRIX used to have a different magic number 0x013111A7 + instead of the current 0x013111A8. However, the former is no longer + used and the version of IBRIX it was used in is really ancient, so + it's extremely unlikely anyone is still using it. Therefore, just + add the newer magic number. + Mark IBRIX as a 'remote' file system type as inotify support had + never been officially tested with it. + * src/stat.c (human_fstype): Add file system ID definition. + * NEWS: Mention the improvement. + Fixes http://bugs.gnu.org/19951 + +2015-02-24 Pádraig Brady <P@draigBrady.com> + + tee: add --write-error to control handling of closed pipes + tee is very often used with pipes and this gives better control + when writing to them. There are 3 classes of file descriptors + that tee can write to: files(1), pipes(2), and early close pipes(3). + Handling write errors to 1 & 2 is supported at present with the caveat + that failure writing to any pipe will terminate tee immediately. + Handling write errors to type 3 is not currently supported. + To improve the supported combinations we add these options: + --write-error=warn + Warn if error writing any output including pipes. + Allows continued writing to still open files/pipes. + Exit status is failure if any output had error. + --write-error=warn-nopipe, -p + Warn if error writing any output except pipes. + Allows continued writing to still open files/pipes. + Exit status is failure if any non pipe output had error. + --write-error=exit + Exit if error writing any output including pipes. + --write-error=exit-nopipe + Exit if error writing any output except pipes. + Use the "nopipe" variants when files are of types 1 and 3, otherwise + use the standard variants with types 1 and 2. A caveat with the above + scheme is that a combination of pipe types (2 & 3) is not supported + robustly. I.e. if you use the "nopipe" variants when using both type + 2 and 3 pipes, then any "real" errors on type 2 pipes will not be + diagnosed. + Note also a general issue with type 3 pipes that are not on tee's + stdout, is that shell constructs don't allow to distinguish early + close from real failures. For example `tee >(head -n1) | grep -m1 ..` + can't distinguish between an error or an early close in "head" pipe, + while the fail on the grep part of the pipe is distinguished + independently from the resulting pipe errors. This is a general + issue with the >() construct, rather than with tee itself. + * NEWS: Mention the new feature. + * doc/coreutils.texi (tee invocation): Describe the new option. + * src/tee.c (usage): Likewise. + (main): With --write-error ignore SIGPIPE, and handle + the various exit, diagnostics combinations. + * tests/misc/tee.sh: Tess all the new options. + Fixes http://bugs.gnu.org/11540 + +2015-02-23 Bernhard Voelker <mail@bernhard-voelker.de> + + tee: close "-" file + This is a cleanup to the previous commit v8.23-138-g7ceaf1d. + * src/tee.c (tee_files): Do not exempt the "-" file from being closed, + as this is no longer stdout but a normal file. + +2015-02-20 Bernhard Voelker <mail@bernhard-voelker.de> + + tee: treat '-' operand as file name as mandated by POSIX + Since v5.2.1-1247-g8dafbe5, tee(1) treated '-' as stdout while POSIX + explicitly requires to treat this as a file name. Revert this change, + as the interleaved output - due to sending another copy of input to + stdout - is not considered to be useful. Discussed in + http://lists.gnu.org/archive/html/coreutils/2015-02/msg00085.html + * src/tee.c (tee_files): Remove the special handling for "-" operands. + (usage): Remove the corresponding sentence. + * doc/coreutils.texi (common options): Remove the "tee -" example. + (tee invocation): Document that tee(1) now treats "-" as a file name. + * tests/misc/tee.sh: Add a test case for "tee -". + While at it, re-indent the above multi-argument processing case and + extend that to 13 operands, as POSIX mandates that, too. + * tests/misc/tee-dash.sh: Remove now-obsolete test. + * tests/local.mk (all_tests): Remove the above test. + * NEWS (Changes in behavior): Mention the change. + +2015-02-18 Pádraig Brady <P@draigBrady.com> + + tee: exit early if no more writable outputs + * src/tee.c (main): Don't continue reading if we can't + output anywhere. + * tests/misc/tee.sh: Ensure we exit when no more outputs. + * NEWS: Mention the change in behavior. + + tests: support stderr verification with returns_() + * tests/init.sh (returns_): Disable tracing for this wrapper + function, so that stderr of the wrapped command is unchanged, + allowing for verification of the contents. + +2015-02-17 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: prefer STREQ_LEN and STRPREFIX over strncmp in all cases + * cfg.mk (sc_prohibit_strncmp): Improve the search pattern: use + _sc_search_regexp to find all invocations of strncmp except when + used on a macro definition line; just match the function name with + an opening parenthesis. Before, the expression missed places where + the comparison against 0 was in a subsequent line. + * src/system.h (STRNCMP_LIT): Shorten 'literal' to 'lit' to move + the whole definition of the macro into one line - thus making + sc_prohibit_strncmp pass. + (STRPREFIX): Add space before parenthesis. + * src/du.c (main): Prefer STREQ_LEN over strncmp. + * src/pinky.c (scan_entries): Likewise. + * src/tac.c (tac_seekable): Likewise. + * src/who.c (scan_entries): Likewise. + +2015-02-17 Pádraig Brady <P@draigBrady.com> + + stty: fix setting of 'extproc' on BSD + This setting is unusual on BSD as it's read normally in the local + flags returned by tcgetattr(), but can only be set with an ioctl. + Setting with tcsetattr() is ignored. + * src/stty.c (NO_SETATTR): A new flag to indicate the setting + is read and displayed like a normal termios flag, but is set + in some other manner. + (main): Skip tcsetattr() for this setting when this flag is set. + Also fixup the exiting 'extproc' processing to handle the + '-extproc' case correctly. + (sane_mode): Skip setting '-extproc' for 'sane' to avoid the error. + This isn't ideal but matches the operation of the BSD native stty. + +2015-02-12 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: enhance '.mailmap' mappings for THANKS generation + * .mailmap (jeff.liu@oracle.com): There are 3 different names in the + 'git log' output for this email address; choose "Jeff Liu" as canonical + form. + (Алексей Шилин): Convert name to latin1 ("Aleksej Shilin") + to improve the sort order of the generated 'THANKS' file. + + maint: sort THANKS using our own gear + At least 'sort' on openSUSE/Fedora have a bug in the case-folding code + of their I18N downstream patch which leads to wrong sort results, + e.g. "Dániel" coming after "Dylan". + * Makefile.am (THANKS): Sort the final contributor list using our + own sort implementation - as others may result in a different order; + add a FIXME comment to remove this again once common platforms have + a functional 'sort -f'. Add '-k1,1' for a better sort order. + While at it, save a grep and perl call to prepare the list from + 'THANKS.in' by doing all in the first perl call. + +2015-02-11 Pádraig Brady <P@draigBrady.com> + + maint: remove redundant diff filtering from sc_long_lines + * cfg.mk (sc_long_lines): diff files are now completely excluded, + so no need to filter portions of them. + Reported by Bernhard Voelker. + + build: update to latest gnulib + This includes a change to require --with-libmount + to be used with configure, due to the many libmount dependencies. + * bootstrap: Sync with gnulib to exit early on gnulib-tool error. + * gl/lib/tempname.c.diff: Adjust for gnulib changes. + * gl/lib/tempname.h.diff: Likewise. + * gl/modules/tempname: Likewise. + * doc/.gitignore: Add new gendocs_template_min gnulib script. + + maint: exclude diff files from long lines check + * cfg.mk: Add .diff files to the exclusion expression + for sc_long_lines, since the gnulib code might be >= 80 chars. + Note 80 char lines trigger due to the added +/- diff marks. + Also normalize the $$ used in the other sc_long_lines exclusion + expressions. + + maint: avoid arbitrary memory access with buggy localtime() + * src/ls.c (align_nstrftime): Be defensive and validate the tm_mon + index before using to access the abmon array. This was _not_ seen + to be an issue any system. See https://bugzilla.redhat.com/1190454 + + doc: give an example of using a seed for random operations + * doc/coreutils.texi (Random sources): Give an example using openssl, + generating a reproducible arbitrary amount of randomly distributed + data, given a seed value. + +2015-02-09 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: make sc_dd_O_FLAGS more robust + The construct "diff ... || diff=1 || diff=" does not set the variable + in all cases. This could be triggered with: + $ env make diff=1 make sc_dd_O_FLAGS + dd_O_FLAGS + maint.mk: ./src/dd.c has inconsistent O_ flag lists + cfg.mk:59: recipe for target 'sc_dd_O_FLAGS' failed + make: *** [sc_dd_O_FLAGS] Error 1 + * cfg.mk (sc_dd_O_FLAGS): Remember $? of the diff command directly + and check its value later rather than using the above mentioned + mapping. + + maint: make sc_THANKS_in_duplicates more robust + The previous commit v8.23-124-g7b1ca5f made the above syntax-check rule + fail, because that took the whole content of THANKS.in for comparison. + * cfg.mk (sc_THANKS_in_duplicates): Strip off the header (all before the + first empty line) and the footer (all past the next empty line) from + 'THANKS.in' for the check. + + maint: sort contributors in THANKS.in + * THANKS.in: Document the preferred sort order as a comment + at the top of the file. Change "Марк Коренберг" to latin1 + ("Mark Korenberg"). Sort all entries. + * cfg.mk (sc_THANKS_in_sorted): Add rule to ensure that + 'THANKS.in' remains sorted. + +2015-02-06 Pádraig Brady <P@draigBrady.com> + + maint: document a caveat in the tail inotify implementation + * src/tail.c (main): Document another caveat with the + inotify implementation wrt multiple hardlinked files. + + tail: return inotify resources where possible + Each user has a maximum number of inotify watches, + so handle the cases where we exhaust these resources. + * src/tail.c (tail_forever_inotify): Ensure we inotify_rm_watch() + the watch for an inode, when replacing with a new watch for a name. + Return all used inotify resources when reverting to polling. + Revert to polling upon first indication of inotify resource exhaustion. + Revert to polling on any inotify resource exhaustion. + Diagnose resource exhaustion correctly in all cases. + Avoid redundant reinsertion in the hash for unchanged watches + (where only attributes of the file are changed). + * tests/tail-2/retry.sh: Avoid false failure when reverting to polling. + * tests/tail-2/inotify-rotate.sh: Likewise. + * tests/tail-2/symlink.sh: Likewise. + * tests/tail-2/inotify-rotate-resources.sh: New test to check + that we're calling inotify_rm_watch() for replaced files. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug fix. + * THANKS.in: Thanks for reporting and problem identification. + + tests: fix recent regression in tail inotify test + * tests/tail-2/inotify-rotate.sh (cleanup_fail_): Set fail=1 + so that failures are identified. Regression in v8.23-63-g111a2b9 + Also use print_ver_ rather than open coding --verbose support. + Also check for more than a single 'b' which seems brittle. + +2015-02-05 Yury Usishchev <y.usishchev@samsung.com> + + build: ensure make-prime-list doesn't access out of bounds memory + The -fsanitize=address run associated with v8.22-75-gf940fec + failed to check make-prime-list, as src/primes.h is not + regenerated with `make clean`. Running with -fsanitize=address + indicates a read 1 byte beyond the allocated buffer. + $ rm src/make-prime-list.o + $ make AM_CFLAGS=-fsanitize=address src/make-prime-list + $ src/make-prime-list 5000 + ================================================================= + ==13913==ERROR: AddressSanitizer: heap-buffer-overflow on address + 0x61e00000fa43 at pc 0x4016f5 bp 0x7fff9d9840e0 sp 0x7fff9d9840d0 + READ of size 1 at 0x61e00000fa43 thread T0 + #0 0x4016f4 in main src/make-prime-list.c:214 + #1 0x7f98892c5fdf in __libc_start_main (/lib64/libc.so.6+0x1ffdf) + #2 0x401774 (src/make-prime-list+0x401774) + 0x61e00000fa43 is located 0 bytes to the right of 2499-byte + region [0x61e00000f080,0x61e00000fa43) allocated by thread T0 here: + #0 0x7f98896ba7b7 in malloc (/lib64/libasan.so.1+0x577b7) + #1 0x400f3f in xalloc src/make-prime-list.c:163 + #2 0x400f3f in main src/make-prime-list.c:198 + SUMMARY: AddressSanitizer: heap-buffer-overflow + src/make-prime-list.c:214 main + Shadow bytes around the buggy address: + 0x0c3c7fff9ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 0x0c3c7fff9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 0x0c3c7fff9f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 0x0c3c7fff9f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 0x0c3c7fff9f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + =>0x0c3c7fff9f40: 00 00 00 00 00 00 00 00[03]fa fa fa fa fa fa fa + 0x0c3c7fff9f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x0c3c7fff9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x0c3c7fff9f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x0c3c7fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x0c3c7fff9f90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + Shadow byte legend (one shadow byte represents 8 application bytes): + Addressable: 00 + Partially addressable: 01 02 03 04 05 06 07 + Heap left redzone: fa + ... + ==13913==ABORTING + * src/make-prime-list.c (main): Bounds check the incremented index, + before using to access the buffer. + Fixes http://bugs.gnu.org/19784 + +2015-02-03 Pádraig Brady <P@draigBrady.com> + + build: fix invalid gnulib patch + * gl/lib/tempname.c.diff: Fix recent breakage so it applies again. + Invalid patch was noticed at http://hydra.nixos.org/eval/1172233 + * cfg.mk: Exempt diff files from these "id_est" syntax checks. + (sc_ensure_gl_diffs_apply): A new syntax check, to ensure all + patches under gl/ apply cleanly. Note we use --fuzz=0 to check + patches apply cleanly for safety, due to the patch(1) issue detailed + in commit v8.21-117-g46f7e05 + * gl/lib/regcomp.c.diff: Rediffed. + * gl/lib/regex_internal.c.diff: Likewise. + * gl/lib/regex_internal.h.diff: Likewise. + * gl/lib/regexec.c.diff: Likewise. + * gl/lib/tempname.h.diff: Likewise. + +2015-02-03 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: avoid a FP on aarch64 when comparing env/printenv output + The following test fails on aarch64 on openSUSE's OpenBuildService + due to glibc's execvp reversing the pointers of 'environ', i.e., + the output of "env|tac" equals "env env" on that platform. + * tests/misc/printenv.sh: Use 'env env' to work around the behavior + on that platform. + While at it, fix the grep pattern which suppressed all environment + variables starting with an underscore "_" instead of "$_" (and + "$LD_PRELOAD") only. + +2015-02-02 Pádraig Brady <P@draigBrady.com> + + dircolors: sync with Xiph file extensions + * src/dircolors.hin: Remove deprecated anx, axa, axv. Add opus. + Suggested by Scott Teal. + +2015-01-31 Bernhard Voelker <mail@bernhard-voelker.de> + + doc,maint: fix use of "i.e." in documentation and comments + To align with all other places (and correct grammar), change all + upper-case "I.E." to "I.e.". Furthermore, ensure that "i.e." is + followed by a comma. Finally, ensure to use a double-space before + "I.e.," at the beginning of a sentence. + The following was used to change all offending uses (apart from + old ChangeLog files): + $ git grep -liF 'i.e.' \ + | xargs sed -i \ + -e 's/I\.E\./I.e./g' \ + -e 's/\. \(I\.e\.\)/. \1/g' \ + -e 's/\([Ii]\.e\.\)\( \)/\1,\2/g' \ + -e 's/\([Ii]\.e\.\)$/\1,/g' + * cfg.mk (sc_prohibit_uppercase_id_est): Add new rule. + (sc_ensure_double_space_after_dot_before_id_est): Likewise. + (sc_ensure_comma_after_id_est): Likewise. + (old_NEWS_hash): Refresh hash via "make update-NEWS-hash". + * NEWS: Change use of "id est" abbreviation via the above command. + * README: Likewise. + * README-prereq: Likewise. + * doc/coreutils.texi: Likewise. + * gl/lib/rand-isaac.c: Likewise. + * gl/lib/tempname.c.diff: Likewise. + * man/stdbuf.x: Likewise. + * src/cat.c: Likewise. + * src/copy.c: Likewise. + * src/copy.h: Likewise. + * src/cp.c: Likewise. + * src/cut.c: Likewise. + * src/dd.c: Likewise. + * src/df.c: Likewise. + * src/fiemap.h: Likewise. + * src/longlong.h: Likewise. + * src/ls.c: Likewise. + * src/numfmt.c: Likewise. + * src/pr.c: Likewise. + * src/shred.c: Likewise. + * src/shuf.c: Likewise. + * src/split.c: Likewise. + * tests/Coreutils.pm: Likewise. + * tests/df/df-symlink.sh: Likewise. + * tests/df/skip-rootfs.sh: Likewise. + * tests/init.sh: Likewise. + * tests/ls/color-norm.sh: Likewise. + * tests/misc/basename.pl: Likewise. + * tests/misc/ls-misc.pl: Likewise. + * tests/misc/md5sum-bsd.sh: Likewise. + * tests/misc/shred-exact.sh: Likewise. + * tests/misc/sort.pl: Likewise. + * tests/misc/stdbuf.sh: Likewise. + * tests/misc/tac-continue.sh: Likewise. + * tests/rm/r-root.sh: Likewise. + * tests/tail-2/symlink.sh: Likewise. + +2015-01-29 Pádraig Brady <P@draigBrady.com> + + doc: clarify the output format for the *sum utilities + * src/md5sum.c (usage): Detail the reasons for the default + double space between checksum and file name. + * doc/coreutils.texi (md5sum invocation): Likewise. + Explicitly mention the 3 formats that --check supports. + Fixes http://bugs.gnu.org/19725 + +2015-01-28 Giuseppe Scrivano <gscrivano@gnu.org> + + sync: support syncing specified arguments + * m4/jm-macros.m4 (coreutils_MACROS): Check for syncfs(). + * man/sync.x: Add references to syncfs, fsync and fdatasync. + * doc/coreutils.texi (sync invocation): Document the new feature. + * src/sync.c: Include "quote.h". + (AUTHORS): Include myself. + (MODE_FILE, MODE_DATA, MODE_FILE_SYSTEM, MODE_SYNC): New enum values. + (long_options): Define. + (sync_arg): New function. + (usage): Describe that arguments are now accepted. + (main): Add arguments parsing and add support for fsync(2), + fdatasync(2) and syncfs(2). + * tests/misc/sync.sh: New (and only) test for sync. + * tests/local.mk: Reference the new test. + * AUTHORS: Add myself to sync's authors. + * NEWS: Mention the new feature. + +2015-01-25 Jim Meyering <meyering@fb.com> + + scripts: autotools-install: update + * scripts/autotools-install: Increase automake's version number + to 1.15 and add Stefano Lattarini's new GPG key ID. + Increase gettext's version to 0.19.4 and add Daiki Ueno's GPG key ID. + Also move VERSION definition "up" so that it is once again + automatically updated via the emacs hook snippet at the end + of the file. + +2015-01-24 Pádraig Brady <P@draigBrady.com> + + stty: only print supported options for combined options + * src/stty.c (usage): Don't reference unsupported options, + in the combined options descriptions. + * doc/coreutils.texi (stty invocation): Adjust for the + new order of the 'sane' and 'raw' combined options. + Also add -iutf8 to the 'sane' list. + + stty: document the 'status' character where supported + * src/stty.c (usage): On systems that support this setting (BSD), + display 'status' in the list of adjustable special characters. + * doc/coreutils.texi (stty invocation): Mention the option, and that + it's not currently supported on Linux. + + stty: document the 'discard' character setting + The equivalent of this is 'flush', but that was never documented + as an option (though was output with stty -a). Therefore use + the more descriptive name, also generally used on BSD systems. + Note even though this setting seems ineffective on Linux, supporting + the setting is useful to allow terminal programs to receive + the default ^O character code. + * doc/coreutils.texi (stty invocation): Document the 'discard' option. + * src/stty.c (struct control_info): Add 'discard'; same as 'flush'. + (display_all): Show 'discard' rather than 'flush' char. + (display_changed): Likewise. + (usage): Document the 'discard' option. + + stty: add support for extproc/LINEMODE + Add support for the "extproc" option which is well described at: + http://lists.gnu.org/archive/html/bug-readline/2011-01/msg00004.html + * src/stty.c (usage): Describe the extproc option if either the + Linux EXTPROC local option is defined, or the equivalent + BSD TIOCEXT ioctl is defined. + (main): Make the separate ioctl call for extproc on BSD. + * doc/coreutils.texi (stty invocation): Describe the option, + and reference the related RFC 1116. + * NEWS: Mention the new feature. + +2015-01-20 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: use returns_ function for new split test + * tests/split/record-sep.sh: Use the recently added returns_ function + to simplify the shell syntax in this test. Also remove the redirection + of stdout/stderr to /dev/null as this eases analyzing errors. + +2015-01-19 Assaf Gordon <assafgordon@gmail.com> + + split: new -t option to select record separator + * src/split.c (eolchar): A new variable to hold + the separator character (unibyte for now). + This is reference throughout rather than hardcoding '\n'. + (usage): Describe the new --separator option, and + mention records along with lines so there is no ambiguity + that all options treat lines and records equivalently. + (main): Have -t update eolchar, or default to '\n'. + * tests/split/record-sep.sh: New test case. + * tests/local.mk: Reference the new test. + * doc/coreutils.texi (split invocation): Document the new option. + Adjust --lines, --line-bytes, --number=[lr]/... to mention + they pertain to records if --separator is specified. + * NEWS: Mention the new feature. + +2015-01-19 Pádraig Brady <P@draigBrady.com> + + maint: fix typo in THANKS.in in previous commit + * THANKS.in: s/Stehpen/Stephen/ + + doc: clarify that du operands are interdependent + Following on from http://bugs.gnu.org/17546 + make it more obvious that du may elide specified operands + to avoid double counting in the set. + * src/du.c (usage): Specify that du operates on the set of + operands, rather than each independently. + * doc/coreutils.texi (du invocation): Likewise. Also state + that the number of entries printed may change due to the + order specified. Currently, deeper items specified earlier + will result in them being displayed, but don't mention that + implementation detail in the documentation. + * THANKS.in: Add reporter. + Reported by Stephen Shirley + +2015-01-14 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: use compare-vs-/dev/null instead of 'test -s' + When some program produces unexpected output, that use of + compare-vs-/dev/null will ensure that the surprising output is + printed in the test's output. With "test -s err" only, one + would have to instrument and rerun in order to see the offending + output. + * cfg.mk (sc_prohibit_and_fail_1): Exempt 'compare' from this check. + * tests/dd/misc.sh: Change "tests -s ... || fail=1" to + "compare /dev/null ... && fail=1". + * tests/misc/nice.sh: Likewise. + * tests/rm/read-only.sh: Likewise. + * tests/tail-2/inotify-race.sh: Likewise. + * tests/touch/no-dereference.sh: Likewise. + Suggested by Jim Meyering in + http://lists.gnu.org/archive/html/coreutils/2015-01/msg00042.html + +2015-01-14 Pádraig Brady <P@draigBrady.com> + + tests: add extra protection against unexpected exits + Many tests use `program ... && fail=1` to ensure expected + error situations are indicated. However that would mask + an unexpected exit (like a crash). Therefore explicitly + check the expected exit code. + Note where error messages are also verified, the extra + protection is not added. + * tests/init.sh (returns_): A new helper function to + check the return code of a command, and used + throughout the tests. + * cfg.mk (sc_prohibit_and_fail_1): Add a syntax check + to avoid new instances of this issue. + +2015-01-12 Pádraig Brady <P@draigBrady.com> + + tests: avoid skipping some df tests with libmount + * tests/df/no-mtab-status.sh: Provide libmount placeholders, + to avoid skipping the test when libmount is in use. + * tests/df/skip-duplicates.sh: Likewise. + * tests/df/skip-rootfs.sh: Comment that the test is moot + when libmount (/proc/self/mountinfo) is being used. + +2015-01-10 Pádraig Brady <P@draigBrady.com> + + maint: clean up some test issues identified with shellcheck + * tests/cp/cp-a-selinux.sh: Comment why unused variables are assigned. + Fix misspellings noticed while adjusting. + * tests/cp/fiemap-perf.sh: Fix quoting. + * tests/misc/shuf.sh: Avoid useless use of cat. + * tests/misc/printf-surprise.sh: Likewise. + +2015-01-08 Daiki Ueno <ueno@gnu.org> + + maint: adjustments related to previous shuf crash fix + * tests/misc/shuf.sh: Improve the test so it detects + crashes in more cases. + * NEWS: Mention the previous fix. + +2015-01-08 Assaf Gordon <assafgordon@gmail.com> + + maint: skip long-lines syntax-check if unsupported + * cfg.mk(sc_long_lines): Skip if required wc and sed options + are not supported, which is currently the case on OS X. + +2015-01-06 Paul Eggert <eggert@cs.ucla.edu> + + shuf: do not mishandle 'shuf -i0-0 1' + Problem reported by Daiki Ueno in: http://bugs.gnu.org/19520 + * src/shuf.c (main): Avoid core dump if !input_range. + * tests/misc/shuf.sh: Test for this bug. + +2015-01-01 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: update further copyright year number ranges + * bootstrap: Update copyright year manually (missing in previous + gnulib update). + * tests/init.sh: Likewise. + The entries in the exemption list are processed by + "grep -vEf ./.x-update-copyright", and therefore evaluated as an + extended regular expression (ERE). Thus, the "bootstrap" entry + also matched for bootstrap.conf which we want to be updated. + * .x-update-copyright: Change all entries to EREs, i.e. including + the caret ^ and dollar sign $ meta-characters matching the beginning + and the end of a line. + * bootstrap.conf: Update copyright year by "make update-copyright". + Finally, the only one showing up with the following command should + be the COPYING file: + $ git grep 'Copyright .* Free Software' | grep -v '2015 Free Software' + +2015-01-01 Pádraig Brady <P@draigBrady.com> + + doc: fix man page formatting for split CHUNKS options + * src/split.c (usage): Indent the info on CHUNKS so that + help2man can match it and align appropriately in its own section. + Fixes http://bugs.gnu.org/19228 + + build: update to latest gnulib + Pick up an errno adjustment in xstrtol() that fixes + a spurious test failure on Darwin 14.0.0. + Also update copyright year to 2015 avoiding a syntax-check failure. + + maint: update all copyright year number ranges + Run "make update-copyright" and then... + * tests/sample-test: Adjust to use the single most recent year. + * tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message, + so that year is updated automatically in future. + +2014-12-30 Pádraig Brady <P@draigBrady.com> + + tests: fix possible 8 minute running time of inotify-rotate.sh + Commit v8.23-63-g111a2b9 removed the expensive tag on this test, + as it runs quickly on systems with inotify. However without that + it would take about 8 minutes for the test to complete all iterations. + * tests/tail-2/inotify-rotate.sh: Tag as expensive without inotify. + Also adjust the polling parameters used on systems without inotify + so that the test completes within about 15 seconds. + + build: update to latest gnulib + Included in this are gnulib changes 3ea43e02 2768ceb7 + which make the device IDs from /proc/self/mountinfo + available to df. This can be leveraged by a subsequent + change to df to present a more accurate list of file systems. + * bootstrap: Merge from gnulib. + * src/ls.c (dev_ino_pop): s/obstack_blank/obstack_blank_fast/ + as this API/ABI has changed, giving memory exhausted errors + if negative (large positive) numbers are passed to obstack_blank(). + * tests/df/skip-duplicates.sh: Adjust as the new gnulib code + requires a non NULL mnt_opts even when mnt_type is not "none". + +2014-12-29 Pádraig Brady <P@draigBrady.com> + + maint: remove duplicate names from THANKS + * .mailmap: Adjust so that there is only a single + entry per name in the generated THANKS. + +2014-12-26 Pádraig Brady <P@draigBrady.com> + + doc: update the URL referencing SI prefixes + Identified at https://www.gnu.org/software/gnun/linc/linc.html + * doc/coreutils.texi (Block size): Fix the stale link. + +2014-12-25 Pádraig Brady <P@draigBrady.com> + + tests: fix error message check on some systems + http://hydra.nixos.org/build/18129583 identified (on OS X) + an incorrect test assumption in the previous commit. + * gl/lib/xdectoint.c (__xnumtoint): Suppress the EINVAL + error message as it's redundant in this context. + * tests/misc/tail.pl: Suppress _optionally_ appended + strerror messages. + * tests/fmt/base.pl: Likewise. + * tests/pr/pr-tests.pl: Likewise. + * tests/split/l-chunk.sh: Likewise. + +2014-12-19 Pádraig Brady <P@draigBrady.com> + + diagnose too-large numbers better + Following on from commit v8.23-82-gaddae94, consistently diagnose + numbers that are too large, so as to distinguish from other errors, + and make the limits obvious. + * gl/modules/xdectoint: A new module implementing xdecto[iu]max(), + which handles the common case of parsing a bounded integer and + exiting with a diagnostic on error. + * gl/lib/xdectoimax.c: The signed variant. + * gl/lib/xdectoint.c: The parameterized implementation. + * gl/lib/xdectoint.h: The interface. + * gl/lib/xdectoumax.c: The unsigned variant. + * bootstrap.conf: Reference the new module. + * cfg.mk (exclude_file_name_regexp--sc_require_config_h_first): + Exclude the parameterized templates. + * src/csplit.c: Output EOVERFLOW or ERANGE errors if appropriate. + * src/fmt.c: Likewise. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/ls.c: Likewise. + * src/nl.c: Likewise. + * src/nproc.c: Likewise. + * src/shred.c: Likewise. + * src/shuf.c: Likewise. + * src/stdbuf.c: Likewise. + * src/stty.c: Likewise. + * src/tail.c: Likewise. + * src/truncate.c: Likewise. + * src/split.c: Likewise. + * src/pr.c: Likewise. + * tests/pr/pr-tests.pl: Adjust to avoid matching errno diagnostic. + * tests/fmt/base.pl: Likewise. + * tests/split/l-chunk.sh: Likewise. + * tests/misc/shred-negative.sh: Likewise. + * tests/misc/tail.pl: Likewise. Also remove the redundant + existing ERR_SUBST from test err-6. + * tests/ls/hex-option.sh: Check HEX/OCT options. + * tests/misc/shred-size.sh: Likewise. + * tests/misc/stty-row-col.sh: Likewise. + +2014-12-19 KO Myung-Hun <komh@chollian.net> + + build: add $(EXEEXT) suffix to man page make targets + * man/local.mk: Add $(EXEEXT) suffix to the executables, + which is significant on OS/2 for example. + + build: don't call OS/2 routines on all systems + * src/system.h: Add a missing __OS2__ ifdef guard. + Also adjust spacing around () to avoid a syntax-check failure. + +2014-12-18 KO Myung-Hun <komh@chollian.net> + + build: expand a response file and a wildcard on OS/2 + OS/2 traditional shells(cmd) do not expand a response file(@file) + or a wildcard. Expand them in each utility itself. + * src/system.h (initialize_main): Define on OS/2. Expand a response + file and a wildcard. + +2014-12-16 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: fix how to request changes for THANKS.in + * THANKS.in: Change the comment at the top to send change requests + regarding this file to the main mailing list rather than referring + to cp's --help output for the mailing list's address - which does + not include that information anymore. + +2014-12-16 Paul Eggert <eggert@cs.ucla.edu> + + dd: fix typo in previous change + Reported by Bernhard Voelker in: + http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00191.html + * src/dd.c (scanargs): s/IN/OUT/. + + dd: diagnose too-large numbers better + Reported by Isabella Parakiss in: + http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00184.html + * src/dd.c (parse_integer): Return strtol_error code, not bool. + All callers changed. + (scanargs): Improve quality of diagnostic when a number is too large. + +2014-12-10 Pádraig Brady <P@draigBrady.com> + + build: use the system printf routines in most cases + glibc <= 2.5 would crash when passed invalid long double values, + therefore internal gnulib routines were used, essentially only by od, + to output such invalid values. Later glibc versions don't crash, + as per https://sourceware.org/bugzilla/show_bug.cgi?id=4586 + and subsequently od was adjusted to use the system printf routines + through the use of the ftoastr module with commit v8.7-22-ga71c22f. + Consequently our testing of this feature was moot, and use of + the gnulib printf replacement for printf(1), od(1) and error(3) etc. + was redundant. + * configure.ac (gl_printf_safe): Unset so that we don't check that + "nan" is output for these long double values. + * tests/misc/od-float.sh: Adjust all existing checks to fail if od + exits with failure status (like crashing for example). Add a new case + for one of the problematic invalid long double values for x86_64. + We only check that od exits successfully at present, which may change + if https://sourceware.org/bugzilla/show_bug.cgi?id=17661 is resolved. + +2014-12-03 Pádraig Brady <P@draigBrady.com> + + maint: avoid -fsanitize=undefined warning in rand-isaac + * gl/lib/rand-isaac.c (isaac_refill): readisaac() purposefully passes + unaligned pointers to avoid memory copies. This is only done on + platforms where this is defined, so avoid the associated + runtime warning generated with -fsanitize=undefined, which is: + lib/rand-isaac.c:125:182: runtime error: store to misaligned address + 0x63100003d7fd for type 'isaac_word', which requires 8 byte alignment + 0x63100003d7fd: note: pointer points here + 47 ce ed a4 be be be 00 00 00 00 00 00 00 00 ... + ^ + +2014-12-02 Pádraig Brady <P@draigBrady.com> + + maint: avoid signed overflow warning with -O3 + Prompted by the implicit -O3 added by american-fuzzy-lop, + seen with GCC 4.9.2 on x86_64. + src/pr.c: In function 'print_files.part.5': + src/pr.c:1781:6: error: assuming signed overflow does not occur + when simplifying conditional to constant [-Werror=strict-overflow] + if (cols_ready_to_print () == 0) + This happens because cols_ready_to_print() is inlined + thus reducing the comparison to the N variable in print_page(). + Now this can't overflow due to the protection when parsing the + specified column, but use an unsigned type to avoid the + apparent signed overflow. + * src/pr.c (cols_ready_to_print): Increment an unsigned type to + avoid the subsequent signed overflow warning. + +2014-12-02 Boris Ranto <branto@redhat.com> + + du: handle sub-bind-mount cycles gracefully + This patch fixes the handling of sub-bind-mount cycles which are + incorrectly detected as the file system errors. If you bind mount the + directory 'a' to its subdirectory 'a/b/c' and then run 'du a/b' you + will get the circular dependency warning even though nothing is wrong + with the file system. This happens because the first directory that is + traversed twice in this case is not a bind mount but a child of bind + mount. The solution is to traverse all the directories in the cycle + that fts detected and check whether they are not a (bind) mount. + * src/du.c (mount_point_in_fts_cycle): New function that checks whether + any of the directories in the cycle that fts detected is a mount point. + * src/du.c (process_file): Update the function to use the new function + that looks up all the directories in the fts cycle instead of only the + last one. + * tests/du/bind-mount-dir-cycle-v2.sh: New test case that exhibits the + described behavior. + * tests/local.mk: Reference the new root test. + * NEWS: Mention the bug fix. + +2014-11-29 Pádraig Brady <P@draigBrady.com> + + tests: avoid hardlink to symlink tests where not supported + These checks weren't correctly avoided in commit v8.23-66-g222d7ac + * tests/cp/same-file.sh: Avoid all hardlink to symlink tests + on platforms where that's not supported. + Identified by http://hydra.nixos.org/build/17636446 + +2014-11-28 Pádraig Brady <P@draigBrady.com> + + build: fix missing casts from recent change + * src/dd.c (alloc_[io]buf): I committed a stale patch that omitted + the casts needed on 32 bit. + Identified by http://hydra.nixos.org/build/17610188 + +2014-11-27 Pádraig Brady <P@draigBrady.com> + + rm: fix prompted number of arguments to remove on some platforms + "zu" was output on solaris 8 for example rather than the number, + since coreutils-8.22. + * cfg.mk: Disallow %z, since we don't currently use the gnulib + fprintf module, so any usage with it is non portable. Also + our usage with error() currently works only through an ancillary + dependency on the vfprintf gnulib module. + * src/rm.c (main): Use %PRIuMAX rather than %zu for portability. + * src/dd.c (alloc_[io]buf): Likewise for consistency. + * src/od.c (main): Likewise. + * src/split.c (set_suffix_length): Likewise. + * NEWS: Mention the rm bug fix. + Reported in http://bugs.gnu.org/19184 + +2014-11-26 Pádraig Brady <P@draigBrady.com> + + tests: fix portability issue in dd/ascii test + Solaris 8 was seen to issue this error: + "printf: `&': illegal format character" + * test/dd/ascii.sh: Use the coreutils printf in this test + rather than the system one, to avoid portability issues. + +2014-11-26 Paul Eggert <eggert@cs.ucla.edu> + + build: port new rule for coreutils.h to old Bash + Reported by Ted Carr in: http://bugs.gnu.org/19184 + * src/local.mk (src/coreutils.h): + Don't assume single_binary_progs is nonempty. + +2014-11-24 Tobias Stoeckmann <tobias@stoeckmann.org> + + paste: fix possible truncated output with large files + If '\n' was present at the size_t boundary of a file, + then that and subsequent data would be discarded. + * src/paste.c (paste_parallel): Avoid the overflow issue + by changing the flag to a boolean rather than a count. + * NEWS: Mention the bug fix. + +2014-11-24 Pádraig Brady <P@draigBrady.com> + + df: only suppress remote mounts of separate exports with --total + * src/df.c (filter_mount_list): Separate remote locations are + generally explicitly mounted, so list each even if they share + the same remote device and thus storage. However with --total + keep the suppression to give a more accurate value for the + total storage available. + (usage): Expand on the new implications of --total and move + it in the options list according to alphabetic order. + doc/coreutils.texi (df invocation): Mention that --total impacts + on deduplication of remote file systems and also move location + according to alphabetic order. + * tests/df/skip-duplicates.sh: Add remote test cases. + * NEWS: Mention the change in behavior. + Reported in http://bugs.debian.org/737399 + Reported in http://bugzilla.redhat.com/920806 + Reported in http://bugzilla.opensuse.org/866010 + Reported in http://bugzilla.opensuse.org/901905 + +2014-11-23 Pádraig Brady <P@draigBrady.com> + + df: ensure -a shows all remote file system entries + commit v8.22-125-g9d736f8 printed placeholder "-" values + for device names that didn't match the preferred device name + for a particular mount point. However that was seen to erroneously + suppress values for aliased host names or exports, common with + remote file systems. + * src/df.c (me_for_dev): Rename from devname_for_dev() so that + we can determine the remoteness as well as the name for the + preferred mount entry. + (get_dev): Don't output place holder values when both + current and preferred mount entries are remote. + Reported in http://bugs.debian.org/737399 + +2014-11-22 Pádraig Brady <P@draigBrady.com> + + tests: add a case verifying mv on case insensitive file systems + * NEWS: Update the recent entry to also mention the avoidance + of incorrectly unlinking a multi-hardlinked "source" file when + presented with source and dest that only differ in case. + * src/copy.c (same_file_ok): Mention the case issue with same_name(). + * tests/mv/hardlink-case.sh: Test the issue on HFS+. + * tests/local.mk: Reference the new test case. + * tests/mv/vfat: Remove an old related but unused test case. + +2014-11-21 Pádraig Brady <P@draigBrady.com> + + doc: mention how to avoid newlines impacting ls -1 + * src/ls.c (usage): Mention the -b and -q options + in the -1 description. + * doc/coreutils.texi (ls invocation): Likewise. + + tests: chcon: avoid false failure with newer selinux + file_t is now mapped to unlabeled_t as per: + http://danwalsh.livejournal.com/68189.html + Therefore use the latter to ensure we match correctly. + This is needed on >= Fedora 21 for example, + while it also works on earlier releases. + +2014-11-21 Boris Ranto <branto@redhat.com> + + mv: fail when moving a file to a hardlink + We may run into a race condition if we treat hard links to the same file + as distinct files. If we do 'mv a b' and 'mv b a' in parallel, both a + and b can disappear from the file system. The reason is that in this + case the unlink on src is called and the system calls can end up being + run in the order where unlink(a) and unlink(b) are the last two system + calls. Therefore exit with an error code so that we avoid the potential + data loss. + * src/copy.c (same_file_ok): Don't set unlink_src that was used by mv, + and return false for two hardlinks to a file in move_mode. + *src/copy.c (copy_internal): No longer honor the unlink_src option, + used only by mv. + NEWS: Mention the change in behavior. + * tests/cp/same-file.sh: Augment to cover the `cp -a hlsl1 sl1` case. + * tests/mv/hard-verbose.sh: Remove no longer needed test. + * tests/local.mk: Remove the reference to hard-verbose.sh. + * tests/mv/hard-4.sh: Adjust so we fail in this case. + * tests/mv/i-4.sh: Likewise. + * tests/mv/symlink-onto-hardlink-to-self.sh: Likewise. + +2014-11-18 Pádraig Brady <P@draigBrady.com> + + maint: run strftime syntax check on newer systems + * cfg.mk (sc_strftime_check): Adjust regex to handle + newer glibc info formatting with different indentation + and quoting. + +2014-10-30 Pádraig Brady <P@draigBrady.com> + + maint: tests: fix comments about retry_delay_ + * tests/tail-2/F-vs-missing.sh: Comment with the correct total delay. + * tests/tail-2/F-vs-rename.shi: Likewise. + * tests/tail-2/flush-initial.sh: Likewise. + * tests/tail-2/inotify-hash-abuse.sh: Likewise. + * tests/tail-2/pipe-f2.sh: Likewise. + * tests/misc/chroot-fail.sh: Initialize can_chroot_root in all cases. + + tests: make inotify-rotate more robust and efficient + * tests/tail-2/inotify-rotate.sh: Use retry_delay_ + to employ an exponential backoff with a total delay of + up to 25.5s. The 15s delay was seen to trigger a false + failure in http://hydra.nixos.org/build/16546517 + Also remove the .1s sleep in each of the 50 iterations + to reduce the running time of the test and thus the + expensive_ tag on this test was removed. + Also ensure that we use the standard exit procedure + upon failure to avoid any erroneous diagnostics due + to persistent files on NFS. + +2014-10-29 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: make du/move-dir-while-traversing more robust + * tests/du/move-dir-while-traversing.sh: Catch failure of retry_delay_ + when waiting for the watcher to get ready. + +2014-10-27 Pádraig Brady <P@draigBrady.com> + + doc: mention that df -a includes duplicate file systems + * src/df.c (usage): Mention that duplicate file systems are shown + with this option, not just dummy file systems. + * doc/coreutils.texi (df invocation): For the --all option, expand + on the class of normally suppressed mount entries that it includes. + Reported in http://bugs.debian.org/737399 + +2014-10-23 Pádraig Brady <P@draigBrady.com> + + maint: improve sc_long_lines syntax-check speed + sc_long_lines was the slowest syntax check + before$ time make sc_long_lines + long_lines + real 0m2.740s + after $ time make sc_long_lines + long_lines + real 0m0.677s + * src/cfg.mk (sc_dd_max_sym_length): s/--max-line-length/-L/ + for compat with BSDs. + (sc_long_lines): Prefilter with wc -L to only identify lines + in files that have lines longer than 80 characters. + +2014-10-23 Mike Frysinger <vapier@gentoo.org> + + tests: d_type-check: don't hardcode the C library name + * tests/d_type-check: The hardcoded name doesn't hold true for all + Linux/glibc platforms, let alone Linux/non-glibc. + Use ctypes.util.find_library() instead to search for the library. + +2014-10-17 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: avoid false failure when comparing /proc files + At least the MHz number in /proc/cpuinfo may change, thus leading to + a false positive failure when comparing the expected against the + actual output file. Use an invariant file instead: /proc/version. + * tests/misc/head-c.sh: s/cpuinfo/version/ + +2014-10-16 Pádraig Brady <P@draigBrady.com> + + tests: fix test hang with unstable inodes in /proc + * cp/proc-zero-len.sh: Search the 'err' file + for the error to ignore, not stdin. + + chroot: call chroot() unconditionally to handle bind mounted "/" + * src/chroot.c (is_root): Adjust to compare canonicalized paths + rather than inodes, to handle (return false in) the case where + we have a tree that is constructed by first bind mounting "/" + (thus having the same inode). + (main): Unconditionally call chroot() because it's safer + and of minimal performance benefit to avoid in this case. + This will cause inconsistency with some platforms + not allowing `chroot / true` for non root users. + * tests/misc/chroot-fail.sh: Adjust appropriately. + * NEWS: Mention the bug fixes. + Fixes http://bugs.gnu.org/18736 + +2014-10-15 Pádraig Brady <P@draigBrady.com> + + copy: avoid an extraneous error when reporting errors + * src/copy.c (copy_reg): If sparse_copy() failed, then an + erroneous error about failing to extend the file would be reported. + + cp: read sparse files more efficiently with non regular destination + * src.copy.c (copy_reg): Use fiemap to read sparse files, even + if the output is not to a regular file. + * NEWS: Mention the improvement. + + cp: avoid speculative preallocation with --sparse=always + With --sparse=always use fallocate(...PUNCH_HOLE...) to + avoid any permanent allocation due to speculative + preallocation employed by file systems such as XFS. + * m4/jm-macros.m4: Check for <linux/falloc.h> and fallocate(). + * src/copy.c (punch_hole): A new function to try and punch + a hole at the specified offset if supported. + (create_hole): Call punch_hole() after requesting a hole. + (extent_copy): Likewise. + * NEWS: Mention the improvement. + + copy: detect smaller holes than the copy buffer size + Previously cp would not detect runs of NULs that were + smaller than the buffer size used for I/O (currently 128KiB). + * src/copy.c (copy_reg): Use an independent hole_size, set to + st_blksize, to increase the chances of detecting a representable hole, + in a run of NULs read from the input. + (create_hole): A new function refactored from sparse_copy() and + extent_copy() so we have a single place to handle holes. + (sparse_copy): Adjust to loop over the larger input buffer + in chunks of the passed hole size. Also adjust to only call + lseek once per hole, rather than at least once per input buffer. + * tests/cp/sparse.sh: Add test cases for various sparse chunk sizes. + * NEWS: Mention the improvement. + +2014-10-09 Wieland Hoffmann <themineo@gmail.com> + + doc: clarify that timeout limits are not 2038 seconds + * man/timeout.x: The 2038 that the sentence is referring to is the year + 2038, not 2038 seconds (the default unit used for timeouts). + +2014-10-08 Pádraig Brady <P@draigBrady.com> + + maint: avoid new signed overflow warning on 32 bit + Prompted by http://hydra.nixos.org/build/15682577 + with GCC 4.8.3 on i686 + src/tac.c:557:6: error: assuming signed overflow does not occur + when simplifying conditional to constant [-Werror=strict-overflow] + if (bytes_copied < 0) + This happens because copy_to_temp() is inlined in tac_nonseekable(), + thus reducing the comparison to the bytes_copied variable in + copy_to_temp. Now this can't overflow on either 32 or 64 bit + due to the protection of the preceding fwrite(). We could use a + guard like "if (bytes_copied <= OFF_T_MAX - bytes_read)" to avoid + the warning, but rather than a runtime branch, just use an unsigned + type to avoid apparent signed overflow on systems where the accumulation + is not promoted to unsigned (32 bit size_t, 64 bit off_t). + * src/tac.c (copy_to_temp): Increment an unsigned type to + avoid the subsequent signed overflow warning. + +2014-10-08 Jim Meyering <meyering@fb.com> + + tests: split/b-chunk.sh: avoid spurious fail on non-Linux + * tests/split/b-chunk.sh: Skip each file that does not exist. + Some systems lack /proc/version or /sys/kernel/profiling + +2014-10-08 Pádraig Brady <P@draigBrady.com> + + maint: avoid syntax-check failures in previous patch + * tests/misc/od-j.sh: Non standard comparison order. + * tests/split/b-chunk.sh: Confusing input file name. + * tests/tail-2/tail-c.sh: Redundant require ulimit. + +2014-10-08 Paul Eggert <eggert@cs.ucla.edu> + + wc: don't miscount /sys and similar file systems + Fix similar problems in head, od, split, tac, and tail. + Reported by George Shuklin in: http://bugs.gnu.org/18621 + * NEWS: Document this. + * src/head.c (elseek): Move up. + (elide_tail_bytes_pipe, elide_tail_lines_pipe): New arg + CURRENT_POS. All uses changed. + (elide_tail_bytes_file, elide_tail_lines_file): + New arg ST and remove arg SIZE. All uses changed. + * src/head.c (elide_tail_bytes_file): + * src/od.c (skip): Avoid optimization for /sys files, where + st_size is bogus and st_size == st_blksize. + Don't report error at EOF when not optimizing. + * src/head.c, src/od.c, src/tail.c: Include "stat-size.h". + * src/split.c (input_file_size): New function. + (bytes_split, lines_chunk_split, bytes_chunk_extract): New arg + INITIAL_READ. All uses changed. Use it to double-check st_size. + * src/tac.c (tac_seekable): New arg FILE_POS. All uses changed. + (copy_to_temp): Return size of temp file. All uses changed. + * src/tac.c (tac_seekable): + * src/tail.c (tail_bytes): + * src/wc.c (wc): + Don't trust st_size; double-check by reading. + * src/wc.c (wc): New arg CURRENT_POS. All uses changed. + * tests/local.mk (all_tests): Add tests/misc/wc-proc.sh, + tests/misc/od-j.sh, tests/tail-2/tail-c.sh. + * tests/misc/head-c.sh: + * tests/misc/tac-2-nonseekable.sh: + * tests/split/b-chunk.sh: + Add tests for problems with /proc and /sys files. + * tests/misc/od-j.sh, tests/misc/wc-proc.sh, tests/tail-2/tail-c.sh: + New files. + +2014-10-04 Bernhard Voelker <mail@bernhard-voelker.de> + + doc: document stat's output with the --terse option + * doc/coreutils.texi (stat invocation): Add a paragraph documenting + stat's output format when the --terse option is specified, both in + normal and in --file-system mode. + Reported by Dan Jacobson <jidanni@jidanni.org> + in http://bugs.gnu.org/18624 + +2014-10-02 Nick Alcock <nick.alcock@oracle.com> + + tests: fix false failure for test referencing libdl + * init.cfg (gcc_shared_): -ldl has to be positioned after the object + files that may rely upon it. This fixes tests/cp/nfs-removal-race.sh + which references dlsym() from libdl. + +2014-10-02 Bernhard Voelker <mail@bernhard-voelker.de> + + maint: avoid double semicolon syntax check failure + A syntax-check recently added to gnulib would trigger a failure + (once gnulib gets updated here) for a statement introduced with + commit v8.23-43-gaf2a4ed: + src/dd.c:806: char const *time_fmt = _(", %g s, %s/s\n");; + maint.mk: Double semicolon detected + make: *** [sc_prohibit_double_semicolon] Error 1 + * src/dd.c (print_xfer_stats): s/;;/;/ + +2014-09-30 Federico Simoncelli <fsimonce@redhat.com> + + dd: new status=progress level to print stats periodically + * src/dd.c: Report the transfer progress every second when the + new status=progress level is used. Adjust the handling and + description of the status= option so that they're treated as + mutually exclusive levels, rather than flags with implicit precedence. + * doc/coreutils.texi (dd invocation): Document the new progress + status level. Reference the new level in the description of SIGUSR1. + * tests/dd/stats.sh: Add new test for status=progress. + * tests/dd/misc.sh: Change so status=none only takes precedence + if it's the last level specified. + * NEWS: Mention the feature. + +2014-09-30 Pádraig Brady <P@draigBrady.com> + + dd: use more robust SIGUSR1 handling + * src/dd.c (ifd_reopen): A new wrapper to ensure we + don't exit upon receiving a SIGUSR1 in a blocking open() + on a fifo for example. + (iftruncate): Likewise for ftruncate(). + (iread): Process signals also after a short read. + (install_signal_handlers): Install SIGINFO/SIGUSR1 handler + even if set to SIG_IGN, as this is what the parent can easily + set from a shell script that can send SIGUSR1 without the + possiblity of inadvertently killing the dd process. + * doc/coreutils.texi (dd invocation): Improve the example to + show robust usage wrt signal races and short reads. + * tests/dd/stats.sh: A new test for various signal races. + * tests/local.mk: Reference the new test. + * NEWS: Mention the fix. + +2014-09-24 Paul Eggert <eggert@cs.ucla.edu> + + test: check for Fedora 20 sort key bug + Problem reported by Göran Uddeborg in: http://bugs.gnu.org/18540 + * tests/misc/sort.pl: New test 23. + +2014-09-24 David Sterba <dsterba@suse.cz> + + mv: use reflink=auto mode by default + On some filesystems (BTRFS), moving a file within the filesystem may + cross subvolume boundaries and we can use a lightweight reflink copy, + similar to what cp(1) can do, which is faster than a full file copy. + This is enabled by default because it's only an optimization for + the fall back copy and does not break user expectations or usability. + * src/mv.c (cp_option_init): Set the reflink mode to AUTO. + * NEWS: Mention the improvement. + +2014-09-23 Pádraig Brady <P@draigBrady.com> + + stty: only list supported options in --help and man pages + * src/stty.c (usage): Exclude unsupported options from --help, + which for example impacts the "dsusp" and "cdtrdsr" options on Linux. + Fixes http://bugs.gnu.org/18506 + +2014-09-23 Michal Nazarewicz <mina86@mina86.com> + + doc: fix use of "e.g." in stdbuf help message + "E.g." stands for latin "exempli gratia" which is typically read + as "for example". "E.g." does not stand for the word "example". + As such, "for e.g." might be read as "for for example". + Fix this usage by simply replacing "e.g." with "example". + +2014-09-23 Bernhard Voelker <mail@bernhard-voelker.de> + + build: pass program name to help2man after other options + * man/local.mk (.x.1): Move the program name argument down after + the last option argument when calling $(run_help2man). + While the other way would be accepted for the GNU help2man program, + it is not for the 'dummy-man' script (called as a fallback on + systems lacking perl). + The wrong order was introduced in commit v8.21-119-gb3578fc while + adding the --info-page option. + + build: fix argument count check in dummy-man again + * man/dummy-man: Fix argument count check, now only permitting + exactly 1 argument, the program name. + Reported by Andreas Schwab <schwab@linux-m68k.org> + +2014-09-22 Alban Bedel <alban.bedel@avionic-design.de> + + build: fix an inverted test breaking dummy-man + * man/dummy-man: Fix argument count check, + allowing dummy-man to run (on systems without perl). + Fixes http://bugs.gnu.org/18531 + +2014-09-19 Pádraig Brady <P@draigBrady.com> + + build: fix dependency issues with man page generation + * .gitignore: Remove reference to no longer generated make file. + * configure.ac: Don't bother generating placeholder make file. + * man/local.mk: Hardcode the man page deps list for normal builds + to be compatible with all make implementations and configure options. + Note in SINGLE_BINARY mode, all man pages will be generated on + any change to the coreutils binary, but development will generally + not be done in this mode, so this shouldn't be an issue. + Fixes http://bugs.gnu.org/18055 + +2014-09-19 Jim Meyering <meyering@fb.com> + + maint: don't trigger gcc-5's new -Wlogical-not-parentheses warning + * src/dircolors.c (main): Parenthesize !VAR as LHS to "<", + to avoid triggering gcc's new -Wlogical-not-parentheses warning. + +2014-09-19 Pádraig Brady <P@draigBrady.com> + + cp: fix handling of -H with multiply specified source dirs + Following on from commit v5.92-729-g130dd06, also avoid + the erroneous directory hardlink warning with -H. + * src/copy.c (copy_internal): Also handle the -H case + for command line arguments. + * tests/cp/duplicate-sources.sh: Augment the test case. + * NEWS: Augment the news entry. + + cp: issue correct warning and ignore duplicate source dirs + * src/copy.c (copy_internal): Handle the case where we have the + same destination directory as already encountered, which can only + be due to the corresponding source directory being specified multiple + times. + * tests/cp/duplicate-sources.sh: Add a test for the new multiply + specified directory case, and the existing multiply specified file case. + * tests/local.mk: Reference the new test. + * NEWS: Mention the bug fix. + + doc: output correct --help references with --program-prefix + * src/system.h (emit_ancillary_info): Take the invariant PROGRAM_NAME + as a parameter, so that consistent references are made to online docs + and texinfo nodes, when a --program-prefix is in place. Note the + man pages don't need this fix as they're generated before the program + prefix is used. + * NEWS: Mention the improvements in references to online documentation. + + doc: ensure the correct texinfo nodes are referenced in --help + * src/system.h (emit_ancillary_info): For commands that don't have + a 1:1 mapping with the texinfo node names, provide a mapping to + the correct node. + * doc/coreutils.texi: Add some extra cross references noticed while + checking this. + Fixes http://bugs.debian.org/762092 + +2014-09-16 Bernhard Voelker <mail@bernhard-voelker.de> + + tests: fix false du failure on newer XFS + On XFS, when creating the ~2G test file 'big' in a for-loop by + appending 20M each time, the file ends up using ~4G - visible in + 'st_blocks'. The unused space would be reclaimed later. + This feature is called "speculative preallocation" which aims at + avoiding fragmentation. + According to the XFS FAQ [1], there are two particular aspects of + XFS speculative preallocation that are triggering this: + 1. "Applications that repeatedly trigger preallocation and reclaim + cycles [after file close] can cause fragmentation. + Therefore, this pattern is detected and causes the preallocation + to persist beyond the lifecycle of the file descriptor." + 2. "Preallocation sizes grow as files grow larger." + [1] http://xfs.org/index.php/XFS_FAQ + Avoid one of the above by only doing a single close (reclaim cycle). + * tests/du/2g.sh: Similar to the fix for a dd test (see commit + v8.22-65-g7c03fe2), avoid speculative preallocation by creating + the 'big' file in one go instead of appending to it in the loop. + Remove debugging statements as the output with 'set -x' is + sufficient nowadays. + +2014-09-11 Paul Eggert <eggert@cs.ucla.edu> + + cat: allow copying empty files to themselves + Problem reported by Vincent Lefevre in: http://bugs.gnu.org/18449 + * src/cat.c (main): Allow copying an empty file to itself. + * tests/misc/cat-self.sh: New test. + * tests/local.mk (all_tests): Add it. + +2014-09-11 Pádraig Brady <P@draigBrady.com> + + doc: reference online info pages directly from man pages + * src/system.h (emit_ancillary_info): Add a direct reference + to the corresponding online info documentation. Corresponding + redirects were put in place on www.gnu.org to allow for concise links. + * help2man: Adjust to add the "online help" link (and subsequent + translation bugs link) to a "REPORTING BUGS" section. + Also add the concise links for further information in --help + to the "SEE ALSO" section, and dispense with the more verbose + default for that. + +2014-09-10 Pádraig Brady <P@draigBrady.com> + + doc: adjust reference to info nodes in man pages + old form: coreutils '$cmd invocation' + new form: '(coreutils) $cmd invocation' + The old form erroneously referenced the node for the 'coreutils' + multi-call program. Now that problematic node name was renamed + in commit v8.23-18-g72e470b, but the newer less ambiguous form + also has the advantage of working with the pinfo viewer for example. + Full discussion at http://bugs.gnu.org/18428 + * man/local.mk: Adjust man page references to texinfo nodes. + * src/system.h: Adjust --help references to texinfo nodes. + + maint: include libstdbuf.c in extraneous headers check + * cfg.mk (sc_system_h_headers): Don't exclude libstdbuf.c. + * src/libstdbuf.c: Remove headers already included in system.h. + + build: adjust previous transformations on libstdbuf name + * src/local.mk (transform): commit v8.23-22-g6f9b018 discarded all + transformations on the libstdbuf.so name. Be more conservative and + only exclude the $(program_transform_name) portion for libstdbuf. + + build: avoid name transformations on libstdbuf + * src/local.mk (transform): Skip the transformation for libstdbuf + since that should not be subject to name clashes, and we need + to reference the name directly in LD_PRELOAD etc. + * configure.ac: Add a comment on the coupling of pkglibexec_PROGRAMS + to $(transform). + Issue reported at https://trac.macports.org/ticket/44922 + Improved by Nick Bowler + +2014-09-09 Pádraig Brady <P@draigBrady.com> + + maint: fix syntax-check issues in recent commit + Avoid 2 new syntax-check failures introduced in commit v8.23-19-g8defcee + * cfg.mk (sc_some_programs_must_avoid_exit_failure): s/exit/return/. + * src/whoami.c (main): Reinstate translation marker for diagnostic. + +2014-09-09 Paul Eggert <eggert@cs.ucla.edu> + + maint: avoid file-scope names of the form _[a-z]* + The C standard says this isn't portable, if you include + standard include files. + * build-aux/gen-single-binary.sh: + * src/coreutils-arch.c (single_binary_main_arch) + (single_binary_main_uname): + * src/coreutils-dir.c (single_binary_main_ls) + (_single_binary_main_dir): + * src/coreutils-vdir.c (single_binary_main_ls) + (_single_binary_main_vdir): + * src/coreutils.c (SINGLE_BINARY_PROGRAM): + Remove leading _ from single_binary prefix. + * src/numfmt.c (round_style): Rename from _round. All uses changed. + (inval_style): Rename from _invalid. All uses changed. + + maint: prefer 'return status;' to 'exit (status);' in 'main' + * build-aux/gen-single-binary.sh: Don't use ATTRIBUTE_NORETURN + for main functions. + * src/base64.c, src/basename.c, src/cat.c, src/chcon.c, src/chgrp.c: + * src/chmod.c, src/chown.c, src/chroot.c, src/cksum.c, src/comm.c: + * src/cp.c, src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: + * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: + * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: + * src/getlimits.c, src/groups.c, src/head.c, src/hostid.c: + * src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c: + * src/link.c, src/ln.c, src/logname.c, src/ls.c, src/make-prime-list.c: + * src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mktemp.c: + * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/nproc.c: + * src/numfmt.c, src/od.c, src/paste.c, src/pathchk.c, src/pinky.c: + * src/pr.c, src/printenv.c, src/printf.c, src/ptx.c, src/pwd.c: + * src/readlink.c, src/realpath.c, src/rm.c, src/rmdir.c, src/runcon.c: + * src/seq.c, src/shred.c, src/shuf.c, src/sleep.c, src/sort.c: + * src/split.c, src/stat.c, src/stdbuf.c, src/stty.c, src/sum.c: + * src/sync.c, src/tac.c, src/tail.c, src/tee.c, src/timeout.c: + * src/touch.c, src/tr.c, src/true.c, src/truncate.c, src/tsort.c: + * src/tty.c, src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c: + * src/uptime.c, src/users.c, src/wc.c, src/who.c, src/whoami.c: + In 'main' functions, Prefer 'return status;' to 'exit (status);'. + * src/coreutils-arch.c (_single_binary_main_uname) + (_single_binary_main_arch): + * src/coreutils-dir.c, src/coreutils-vdir.c (_single_binary_main_ls) + (_single_binary_main_dir, _single_binary_main_vdir): + Omit ATTRIBUTE_NORETURN. Return a value. + * src/coreutils.c (SINGLE_BINARY_PROGRAM): Omit ATTRIBUTE_NORETURN. + (launch_program): Now static. + * src/dd.c (finish_up): New function. + (quit, main): Use it. + * src/getlimits.c (main): Return a proper exit status. + * src/test.c (test_main_return): New macro. + (main): Use it. + * src/logname.c, src/nohup.c, src/whoami.c: + Use 'error' to simplify exit status in 'main' function. + * src/yes.c (main): Use 'return' rather than 'error' to exit, + so that GCC doesn't suggest ATTRIBUTE_NORETURN. + + doc: rename "coreutils invocation" to "Multi-call invocation" + This supports longstanding shell commands like + 'info coreutils "touch invocation"'. + Problem reported by Vincent Lefevre via Bob Proulx in: + http://bugs.gnu.org/18428 + * doc/coreutils.texi (Multi-call invocation): + Rename from "coreutils invocation". + + doc: mention which commands are optional + * doc/coreutils.texi (coreutils invocation, df invocation) + (stty invocation, whoami invocation, nproc invocation) + (arch invocation, hostname invocation, hostid invocation) + (uptime invocation, chroot invocation, nice invocation) + (stdbuf invocation): Document that the command is installed + optionally. + +2014-09-07 Bernhard Voelker <mail@bernhard-voelker.de> + + doc: fix typos + * doc/coreutils.texi: Fix normal typos: + s/pseudorandom/pseudo-random/; + s/behaviour/behavior/; + s/linux-based/Linux-based/; + s/nonnegative/non-negative/. + Fix IEC's long name: s/Electronical/Electrotechnical/. + Wrap 'getopt' into the @code{} macro. + Fix a grammatical error (from myself): s/splitted/split/. + +2014-09-03 Paul Eggert <eggert@cs.ucla.edu> + + doc: spell "indeterminate" correctly + * doc/coreutils.texi (timeout invocation): Fix misspelling. + Reported by Yureruchihirosan via OKANO Takayoshi in: + http://bugs.gnu.org/18394 + +2014-08-23 Pádraig Brady <P@draigBrady.com> + + maint: ensure fiemap extents flags are compared correctly + * src/extent-scan.c (extent_scan_read): Following on from the flags size + adjustment in commit v8.23-13-g1505b37, verify that the internal + representation of the flags is never truncated which could happen in the + unlikely case on 32 bit if the kernel flags ever expanded to 64 bits + which is theoretically possible given the reserved space. + +2014-08-22 Paul Eggert <eggert@cs.ucla.edu> + + maint: avoid int64_t and similar types unless they're needed + C11 doesn't require them, even POSIX doesn't strictly require the + 64-bit versions, and it makes the code a bit clearer if they're + used only when needed. + * src/copy.c (write_zeros, extent_copy): + * src/extent-scan.h (struct extent_info.ext_length): + Use off_t, not uint64_t, for a value derived from a file offset. + * src/extent-scan.h (struct extent_info.ext_flags) + Prefer plain unsigned int to uint32_t where either will do. + (struct extent_scan.ei_count): + Use size_t, not uint32_t, for a value bounded by SIZE_MAX. + * src/factor.c (MAGIC64, MAGIC63, MAGIC65): + Remove unnecessary casts to uint64_t. + +2014-08-21 Yurij Goncharuk <lnkgyv@gmail.com> + + maint: refactor ls QUOTING_STYLE env var handling + * src/ls.c (main): As per the FIXME comment, move the + QUOTING_STYLE handling to a separate function. + +2014-08-21 Fridolin Pokorny <fpokorny@redhat.com> + + doc: clarify that duplicate NFS mounts are skipped by df + * doc/coreutils.texi (df invocation): Add a sentence that eliding + duplicate entries for the same file system is not limited to bind + mounts, but also happens for remote file systems like NFS. + +2014-08-19 Pádraig Brady <P@draigBrady.com> + + df: improve mount point selection with inaccurate mount list + v8.23 has a test failure on Fedora rawhide build servers + in tests/df/skip-duplicate.sh. This was due to no '/' + entry being output by df. That was due to an inaccurate + /proc/mounts on the build environment as stat(/mnt/point) + identified all these /proc/mounts entries as having the + same device id: + / rootfs + / /dev/md1 + /dev devtmpfs + /run tmpfs + /boot /dev/md0 + /proc/filesystems /dev/md1 + Since the device name on the right changes for a given id, + that causes the entries to be continually replaced, thus + resulting in no '/' entry. I'm guessing this is due to + the mock environment bind mounting unneeded or sensitive + items to a dummy file on the host / (/dev/md1) though + have not looked into those details. + So rather than relying on an accurate /proc/mounts, + the attached patch takes a more conservative replacement + approach and only swaps a new device entry when the + mount point matches. That should handle all practical + cases while also avoiding this situation. + * src/df.c (filter_mount_list): Only replace entries with + different device names when the mount point also matches. + +2014-08-11 Rasmus Borup Hansen <rbh@intomics.com> + + cp: remove redundant possibly expensive heap deallocation + If the hash structures grow sufficiently large so that + the system is actively swapping, then the deallocation + can take a significant amount of time. Details at: + http://lists.gnu.org/archive/html/coreutils/2014-08/msg00012.html + * src/cp.c (main): Only call hash deallocation routines + when in lint checking mode. + * THANKS.in: Remove as now in the git author list. + +2014-08-04 Reuben Thomas <rrt@sc3d.org> + + doc: indicate that FILE arguments are optional with rm -f + * src/rm.c (usage): s/FILE/[FILE]/. + Fixes http://bugs.gnu.org/18187 + +2014-08-03 Anders Jonsson <anders.jonsson@norsjovallen.se> + + numfmt: fix misspelling in --debug message + * src/numfmt.c (parse_format_string): s/overridding/overriding/. + Fixes http://bugs.gnu.org/18050 + +2014-08-01 Paul Eggert <eggert@cs.ucla.edu> + + tests: fix typo in tail-2/inotify-race + Reported by Andreas Schwab in: http://bugs.gnu.org/18057 + * tests/tail-2/inotify-race.sh (break_src): + Use abs_top_srcdir, not abs_top_builddir. + +2014-08-01 Bernhard Voelker <mail@bernhard-voelker.de> + + chroot: perform chdir("/") again unless new --skip-chdir is specified + Since commit v8.22-94-g99960ee, chroot(1) skips the chroot(2) syscall + for "/" arguments (and synonyms). The problem is that it also skips + the following chdir("/") call in that case. The latter breaks existing + scripts which expect "/" to be the working directory inside the chroot. + While the first part of the change - i.e., skipping chroot("/") - is + okay for consistency with systems where it might succeed for a non-root + user, the second part might be malicious, e.g. + cd /home/user && chroot '/' bin/foo + In the "best" case, chroot(1) could not execute 'bin/foo' with ENOENT, + but in the worst case, chroot(1) would execute '/home/user/bin/foo' in + the case that exists - instead of '/bin/foo'. + Revert that second part of the patch, i.e., perform the chdir("/) + in the common case again - unless the new --skip-chdir option is + specified. Restrict this new option to the case of "/" arguments. + * src/chroot.c (SKIP_CHDIR): Add enum. + (long_opts): Add entry for the new --skip-chdir option. + (usage): Add --skip-chdir option, and while at it, move the other + to options into alphabetical order. + (main): Accept the above new option, allowing it only in the case + when NEWROOT is the old "/". + Move down the chdir() call after the if-clause to ensure it is + run in any case - unless --skip-chdir is specified. + Add a 'newroot' variable for the new root directory as it is used + in a couple of places now. + * tests/misc/chroot-fail.sh: Invert the last tests which check the + working directory of the execvp()ed program when a "/"-like + argument was passed: now expect it to be "/" - unless --skip-chdir + is given. + * doc/coreutils.texi (chroot invocation): Document the new option. + Document that chroot(1) usually calls chdir("/") unless the new + --skip-chdir option is specified. Sort options. + * NEWS (Changes in behavior): Mention the fix. + (New features): Mention the new option. + * init.cfg (nonroot_has_perm_): Add chroot's new --skip-chdir option. + * tests/cp/preserve-gid.sh (t1): Likewise. + * tests/cp/special-bits.sh: Likewise. + * tests/id/setgid.sh: Likewise. + * tests/misc/truncate-owned-by-other.sh: Likewise. + * tests/mv/sticky-to-xpart.sh: Likewise. + * tests/rm/fail-2eperm.sh: Likewise. + * tests/rm/no-give-up.sh: Likewise. + * tests/touch/now-owned-by-other.sh: Likewise. + Reported by Andreas Schwab in http://bugs.gnu.org/18062 + +2014-07-31 Pádraig Brady <P@draigBrady.com> + + build: avoid building stdbuf on cygwin + * configure.ac: Don't add stdbuf to the list of programs to build + if EXEEXT is set, as that is not handled in configure.ac for + libstdbuf.so yet (see bin_PRGRAMS handling in configure.ac). + Also the LD_PRELOAD mechanism will need to be adjusted to support + cygwin in any case, so avoid stdbuf completely in this case for now. + Problem reported by Eric Blake. + +2014-07-29 Eric Blake <eblake@redhat.com> + + doc: clarify that floating point parses "inf" + * doc/coreutils.texi (Floating point): Document handling of "inf", + "infinity", "NaN", and so on. + +2014-07-19 Paul Eggert <eggert@cs.ucla.edu> + + maint: fix message translation glitches + Problem reported by Sebastian Rasmussen in: http://bugs.gnu.org/18054 + * gl/lib/randread.c (randread_error): Don't put multiple string + literals inside _(...), as xgettext doesn't support that. + * src/chroot.c (main): In diagnostics, don't bother to distinguish + between setting the number of supplemental group IDs to a zero or + to a nonzero value, as the underlying system call is the same + either way. This also makes the string easier to translate correctly. + 2014-07-18 Pádraig Brady <P@draigBrady.com> + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + version 8.23 * NEWS: Record release date. @@ -12,12 +2839,9 @@ which would be the case if there are spaces in the directory hierarchy. This is triggered by `make distcheck` -2014-07-18 Pádraig Brady <P@draigBrady.com> - build: don't distribute generated coreutils.h This issue was identified by the manifest comparisons done by `make distcheck` - * src/local.mk (noinst_HEADERS): Remove coreutils.h from this always distributed list. (nodist_src_coreutils_SOURCES): Add coreutils.h as its contents @@ -27,20 +2851,15 @@ (DISTCLEANFILES): Add coreutils.h to this rather than CLEANFILES, as its contents are determined at configure time. -2014-07-18 Pádraig Brady <P@draigBrady.com> - tests: fix false failure in cp --preserve=context test With libselinux-2.2.1-6.fc20.x86_64, kernel-3.12.6-300.fc20.x86_64 `cp --preserve=context src dst` was seen to succeed when src and dst where on the same fixed context file system, as lsetfilecon() returned success in this case when the context wasn't being changed. - * tests/cp/cp-a-selinux.sh: Copy from a different file system to most likely have a different context that will test context setting logic correctly. -2014-07-18 Pádraig Brady <P@draigBrady.com> - maint: avoid a syntax-check warning in previous commit * cfg.mk: Avoid warning for @AMDEP_TRUE@ usage in man/local.mk @@ -74,7 +2893,6 @@ on cygwin, due to the is*() implementations used there, but the issue is present on all platforms defaulting to signed chars. * NEWS: Mention the bug fix. - Reported by Eric Blake 2014-07-14 Pádraig Brady <P@draigBrady.com> @@ -112,21 +2930,15 @@ http://bugs.gnu.org/17833 * NEWS: Detail the df bug fix. -2014-07-13 Pádraig Brady <P@draigBrady.com> - sort: avoid undefined operation with destroying locked mutex This didn't seem to cause any invalid operation on GNU/Linux at least, but depending on the implementation, mutex deadlocks could occur. For example this might be the cause of lockups seen on Solaris: http://lists.gnu.org/archive/html/coreutils/2013-03/msg00048.html - This was identified with valgrind 3.9.0 with this setup: - seq 200000 > file.sort valgrind --tool=drd src/sort file.sort -o file.sort - With that, valgrind would _intermittently_ report the following: - Destroying locked mutex: mutex 0x5419548, recursion count 1, owner 2. at 0x4C2E3F0: pthread_mutex_destroy(in vgpreload_drd-amd64-linux.so) by 0x409FA2: sortlines (sort.c:3649) @@ -140,7 +2952,6 @@ by 0x4090DD: merge_tree_init (sort.c:3234) by 0x40AA5A: sort (sort.c:3951) by 0x40C5D9: main (sort.c:4739) - Thread 2: The object at address 0x5419548 is not a mutex. at 0x4C2F4A4: pthread_mutex_unlock(in vgpreload_drd-amd64-linux.so) @@ -150,7 +2961,6 @@ by 0x409CE3: sortlines_thread (sort.c:3574) by 0x4E44F32: start_thread (in /usr/lib64/libpthread-2.18.so) by 0x514EEAC: clone (in /usr/lib64/libc-2.18.so) - * src/sort.c (sortlines): Move pthread_mutex_destroy() out to merge_tree_destroy(), so that we don't overlap mutex destruction with threads still operating on the nodes. @@ -163,13 +2973,10 @@ sort: fix two threading issues reported by valgrind Neither issue impacts on the correct operation of sort. The issues were detected by both valgrind 3.8.1 and 3.9.0 using: - seq 200000 > file.sort valgrind --tool=drd src/sort file.sort -o file.sort - For tool usage and error details see: http://valgrind.org/docs/manual/drd-manual.html - * src/sort.c (queue_insert): Unlock mutex _after_ signalling the associated condition variable. Valgrind flags this with: "Probably a race condition: condition variable 0xffeffffb0 has been @@ -181,7 +2988,6 @@ programming error which can cause subtle race conditions and unpredictable behavior." This should at least give more defined scheduling behavior. - (merge_tree_destroy): Make symmetrical with merge_tree_init() thus destroying the correct mutex. Valgrind flags this with: "The object at address 0x5476cf8 is not a mutex." @@ -207,7 +3013,6 @@ the selected tools. Which tool gets executed depends on the value of argv[0] which can be set implicitly through symlinks to the single program. - This setup reduces significantly the size of a complete coreutils install, since code from lib/libcoreutils.a is not duplicated in every one of the more than 100 binaries. Runtime overhead is @@ -217,7 +3022,6 @@ alleviated due to caching and lazy mmaping of unused blocks, and in fact the single binary should have better caching characteristics. - Comparing the size of the individual versus single binary on x86_64: $ cd src $ size coreutils @@ -226,7 +3030,6 @@ text data bss dec hex filename 1097416 5388 88432 1191236 122d44 src/coreutils 4901010 124964 163768 5189742 4f306e (TOTALS) - Storage requirements are reduced similarly: $ cd src $ du -h coreutils @@ -234,13 +3037,11 @@ grep -Ev '(coreutils|libstdbuf)') | tail -n1 1.2M coreutils 5.3M total - When installing, the makefile will create either symlinks or shebangs based on the --enable-single-binary setting, for each configured tool. In this way, all the tools are still callable individually, but they are all implemented by the same "coreutils" binary installed on the same directory. - * .gitignore: Add new generated files. * Makefile.am: New rules to generate build-aux/gen-single-binary.sh and install symlinks. @@ -273,7 +3074,6 @@ Avoid complicated and error-prone parsing of df's output via sed(1), cut(1), etc., and instead use df's more modern --output option. - * src/ioblksize.h (in a comment): Simplify the extraction of the device name of the mounted file system from df's output. * tests/dd/skip-seek-past-dev.sh: Likewise. @@ -292,13 +3092,9 @@ states that the default mode should be -L, common practice for stand-alone pwd implementations is to default to -P. - * src/pwd.c (usage): Retain mention of the default mode of operation. - Suggested by Bob Proulx -2014-07-02 Pádraig Brady <P@draigBrady.com> - tests: avoid false failure with spaces in mount point paths * tests/ls/readdir-mountpoint-inode.sh: Quote appropriately to process mount points with spaces in the path. @@ -331,7 +3127,6 @@ maint: fix context_t init warning on systems without selinux On systems without libselinux, context_t is defined as an int type, but defined as a pointer type by SELinux. - * src/chcon.c: Init with 0 rather than NULL to avoid warning. 2014-07-01 Jim Meyering <meyering@fb.com> @@ -357,7 +3152,6 @@ Here we replace security_context_t with char*, and also provide a wrapper function to cater for the const issue on older libselinux. - * src/system.h (se_const): A new function to avoid and identify the const issue on older libselinux. * src/copy.c: s/security_context_t/char */. @@ -378,18 +3172,13 @@ chcon: avoid redundant context allocations Since context is verified by security_check_context() it can be used in change_file_context() without converting to context_t every time. - * src/chcon.c (change_file_context): Use specified_context directly. -2014-07-01 Namhyung Kim <namhyung@gmail.com> - chcon: use security_check_context() for context validation context_new() and _free() are used for checking validity of a specified context. libselinux provides security_check_context for this purpose so use it. - Note that context_new() can fail for a valid context - e.g. ENOMEM. - * src/chcon.c (main): Use security_check_context(). 2014-06-30 Pádraig Brady <P@draigBrady.com> @@ -456,15 +3245,12 @@ not being accessible, while some of the other mount points are. Discussed at: http://bugs.gnu.org/16539#63 -2014-06-24 Pádraig Brady <P@draigBrady.com> - df: output placeholder values for inaccessible mount points A system provided mount entry may be unavailable due to TOCTOU race, or if another device has been over-mounted at that position, or due to access permissions. In all these cases output "-" placeholder values rather than either producing an error, or in the over-mount case outputting values for the wrong device. - * src/df.c (device_list): A new global list now updated by filter_mount_list(). (filter_mount_list): Adjust to take a parameter as to whether @@ -476,11 +3262,8 @@ (devname_for_dev): A new function to search the mount <-> dev mapping. * test/df/skip-duplicates.sh: Adjust accordingly. * NEWS: Mention the bug fixes. - Discussed at: http://bugs.gnu.org/16539 -2014-06-24 Pádraig Brady <P@draigBrady.com> - du: ignore directory cycles due to bind mounts * src/du.c (process_file): Treat cycles due to bind mounts like cycles due to following symlinks. @@ -524,11 +3307,9 @@ tail: fix --follow to use polling mode for VXFS Veritas File System can run in single instance or clustered mode, so mark as remote to avoid using inotify for the latter case. - * src/stat.c (human_fstype): Tag VXFS as remote, to use polling for the clustered variant (VXCFS). * NEWS: Mention the bug fix. - Reported by Ondřej Vašík in http://bugzilla.redhat.com/1104244 Fixes http://bugs.gnu.org/17770 @@ -573,8 +3354,6 @@ * gnulib: Update to latest. * tests/init.sh: Update from gnulib. -2014-06-11 Pádraig Brady <P@draigBrady.com> - build: update GCC warnings * configure.ac: Remove the -Wsuggest-attribute=pure enablement on GCC >= 4.7, as that was moot since @@ -582,14 +3361,11 @@ The false positive was seen with 4.6.2, but confirmed not present in 4.6.3, so that's sufficiently old to just leave this enabled unconditionally. - Remove the -Wsuggest-attribute={const,noreturn} enablement, as gnulib already has those in the default set. - Enable the -Wlogical-op warning for GCC >= 4.8.0 as that is confirmed OK with coreutils at least, due to fixing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772 - Remove the -Wno-logical-op override since the main -Wlogical-op flag is now sufficient to control this warning as of GCC 4.6.3 at least. @@ -630,16 +3406,13 @@ could be used to select arbitrary (ranges of) lines, so as to simplify and optimize the implementation while also matching the behavior of different cut(1) implementations. - However that GNU behavior was in place for a long time, and could be useful in certain cases like making a separated list like `seq 10 | cut -f1- -d$'\n' --output-delimiter=,` although other tools like head(1) and paste(1) are more suited to this operation. This patch reinstates that functionality but restricts the "line behind" buffering behavior to only the -d$'\n' case. - We also fix the following related edge case to be more consistent: - before> printf "\n" | cut -s -d$'\n' -f1- | wc -l 2 before> printf "\n" | cut -d$'\n' -f1- | wc -l @@ -648,7 +3421,6 @@ 1 after > printf "\n" | cut -d$'\n' -f1- | wc -l 1 - * src/cut.c (cut_fields): Adjust as discussed above. * tests/misc/cut.pl: Likewise. * NEWS: Mention the change in behavior both for v8.21 @@ -656,8 +3428,6 @@ * cfg.mk (old_NEWS_hash): Adjust for originally omitted v8.21 entry. * src/paste.c: s/delimeter/delimiter/ comment typo fix. -2014-06-01 Pádraig Brady <P@draigBrady.com> - stat: avoid redundant stat() calls * src/stat.c (find_bind_mount): NAME is invariant in the loop, so only stat(NAME) outside the loop. @@ -670,7 +3440,6 @@ mounted on a different device. Therefore honor the order of the mount list returned by the system and use the last reported device name. - * src/df.c (filter_mount_list): When discarding the current mount entry, ensure that a new device name is not also discarded. * tests/df/skip-duplicates.sh: Add a test case. Also fix @@ -740,7 +3509,6 @@ to be a consistent width and capitalization so that the src/fs-magic-compare target works without reporting false positives. * cfg.mk (sc_fs-magic-compare): A new syntax check to enforce this. - Improved by: Jim Meyering 2014-05-21 Pádraig Brady <P@draigBrady.com> @@ -748,12 +3516,10 @@ stdbuf: support compilers other than __GNUC__ __SUNPRO_C >= 0x590 /*12.0*/ supports __attribute((constructor)) required by stdbuf, so use a more direct check for this. - Note ensure that --libexecdir is set to the appropriate install location for libstdbuf.so so that stdbuf works when installed on the system like it does when running tests in the build directory. - * configure.ac (stdbuf_supported): Use a test prog to determine support. * src/libstdbuf.c (stdbuf): Define appropriately for non GCC compilers, and provide early feedback (compilation warning) if trying to compile @@ -763,11 +3529,8 @@ * cfg.mk (sc_prohibit-gl-attributes): Adjust so we can exclude libstdbuf.so from prohibiting '__attribute', since we want this form to avoid silently eliding this required attribute on non GCC. - Reported and tested by Rich Burridge. -2014-05-21 Pádraig Brady <P@draigBrady.com> - tests: use chroot --user rather than internal setuidgid tool * init.cfg (require_root_): Adjust to use chroot, and make `require_built_ chroot` implicit when chroot used in the test. @@ -797,22 +3560,17 @@ upon hitting a terminal issue, rather than diagnosing multiple issues lest users think previous failing actions are optional. -2014-05-21 Pádraig Brady <P@draigBrady.com> - chroot: with --userspec clear root's supplemental groups It's dangerous and confusing to leave root's supplemental groups in place when specifying other users with --userspec. In the edge case that that is desired one can explicitly specify --groups. - Also we implicitly set the system defined supplemental groups for a user. The existing mechanism where supplemental groups needed to be explicitly specified is confusing and not general when the lookup needs to be done within the chroot. - Also we extend the --groups syntax slightly to allow clearing the set of supplementary groups using --groups=''. - * src/chroot.c (setgroups): On systems without supplemental groups, clearing then is a noop and so should return success. (main): Lookup the primary GID with getpwuid() when just a numeric @@ -832,7 +3590,6 @@ while not changing the current working directory. It also makes `chroot / true` consistently succeed on all platforms for non root users. - * src/chroot.c (main): If the same root is specified. i.e. '/' then don't change the current working directory, and avoid the overhead of the other redundant calls. @@ -848,31 +3605,23 @@ clang "warning: comparison of constant -1 with expression of type 'display_field_t' is always false" -2014-05-13 Pádraig Brady <P@draigBrady.com> - df: ignore non file system entries in /proc/mounts Linux with network namespaces contains entries in /proc/mounts like: proc net:[4026532464] proc rw,nosuid,nodev,noexec,relatime 0 0 resulting in a failure to stat 'net:[...]', inducing a warning and an exit with failure status. - * src/df.c (get_dev): Ignore all relative mount points. * tests/df/skip-duplicates.sh: Add an entry to test relative dirs. -2014-05-13 Pádraig Brady <P@draigBrady.com> - df: fix handling of symlinks in mount list The symlink handling in commit v8.21-172-g33660b4 was incomplete in the case where there were symlinks in the mount list itself. For example, in the case where /dev/mapper/fedora-home was in the mount list and that in turn was a symlink to /dev/dm-2, we have: - before> df --out=source /dev/mapper/fedora-home devtmpfs - after > df --out=source /dev/mapper/fedora-home /dev/mapper/fedora-home - * src/df.c (get_disk): Compare canonicalized device names from the mount list. Note we still display the non canonicalized name, even if longer, as we assume that is the most representative. @@ -880,8 +3629,6 @@ depending on the content of the mount list, but adjust to fail on any system where symlinks are present in the mount list for the current dir. -2014-05-13 Pádraig Brady <P@draigBrady.com> - df: also deduplicate virtual file systems * src/df.c (filter_mountlist): Remove the constraint that a '/' needs to be in the device name for a mount entry to @@ -974,7 +3721,6 @@ * tests/tail-2/inotify-race.sh: Likewise. * tests/tail-2/wait.sh: Likewise. * tests/touch/no-dereference.sh: Likewise. - * cfg.mk (sc_prohibit_test_empty:): New syntax-check. * tests/cp/proc-zero-len.sh: Adjust to avoid false syntax-check failure. * tests/cp/proc-zero-len.sh: Likewise. @@ -1020,7 +3766,6 @@ The devmsg() calls that took quote_n() arguments, didn't normally output anything, but still incurred the overhead of those quote_n() calls. - * src/numfmt.c (devmsg): Move the inline function with _internal_ enablement check to... * src/system.h: ...here as a variadic macro, with @@ -1029,8 +3774,6 @@ performance change in this case. * NEWS: Mention the significant performance improvement. -2014-05-02 Pádraig Brady <P@draigBrady.com> - numfmt: support zero padding using --format="%010f" * src/numfmt.c (setup_padding_buffer): Simplify the code by not explicitly dealing with heap exhaustion. @@ -1057,24 +3800,17 @@ * src/pr.c (usage): Add a period to avoid ambiguity in the man page output. -2014-04-29 Pádraig Brady <P@draigBrady.com> - ptx: fix whitespace trimming with multiple files This issue was identified by running the test suite with http://code.google.com/p/address-sanitizer/ which is included in GCC 4.8 and enabled with -fsanitize=address - This was checked on Fedora 20 with GCC 4.8 as follows: - $ yum install libasan # http://bugzilla.redhat.com/991003 $ rm -f src/ptx.o $ make check AM_CFLAGS='-fsanitize=address' SUBDIRS=. VERBOSE=yes $ failure identified in tests/test-suite.log - To see this particular failure triggered with multiple files: - $ src/ptx <(echo a) <(echo a) 2>&1 | asan_symbolize.py -d - ================================================================= ==32178==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000e74f at pc 0x435442 bp 0x7fffe8a1b290 sp 0x7fffe8a1b288 @@ -1115,9 +3851,7 @@ Poisoned by user: f7 ASan internal: fe ==32178==ABORTING - The initial report and high level analysis were from Jim Meyering... - "The underlying problem is that swallow_file_in_memory() is setting the contents of the global text_buffer for the first file, then updating it (clobbering old value) for the second file. @@ -1125,7 +3859,6 @@ and later, one of them (keyafter) is presumed to point into the new "text_buffer", which it does not. The subsequent SKIP_WHITE_BACKWARDS use backs up "cursor" and goes out of bounds." - * src/ptx.c (text_buffers): Maintain references for the limits of each buffer corresponding to each file, rather than just the last processed. (struct OCCURS): Add a member to map back to the corresponding file. @@ -1167,11 +3900,9 @@ tests: make ls tests independent of COLORTERM env Since the recent commit v8.22-68-g08783f1, ls coloring is now dependent on the COLORTERM environment variable. - * tests/envvar-check: Unset COLORTERM from test environment. * tests/ls/color-dtype-dir.sh: Ensure coloring is used. * tests/misc/ls-misc.pl: Likewise. - Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/10397646 @@ -1187,7 +3918,6 @@ mach-color was replaced by mach-gnu-color in Hurd in 2012. mach-color is left for compatibility and corresponding definitions for mach-color are still found in ncurses. - * src/dircolors.hin: Add hurd and mach-gnu-color. 2014-04-17 Guilherme de Almeida Suckevicz <guito.linux@gmail.com> @@ -1196,7 +3926,6 @@ --colors controls whether to output colors depending on whether we're connected to a terminal or not, while this change gives control over which terminals we output colors to. - * NEWS: Mention the change in behavior. * src/ls.c (known_term_type): A new function to search the static list from dircolors.h @@ -1353,12 +4082,9 @@ Bug introduced in 1999-04-04 commit, SH-UTILS-1_16f-269-gd815c15. Spotted by coverity (MISSING_BREAK). -2014-03-26 Bernhard Voelker <mail@bernhard-voelker.de> - basename: mention that the -s option implies -a in usage * src/basename.c (usage): Mention that -s implies -a. (main): Add "fall through" comment to case 's'. - Spotted by coverity: MISSING_BREAK. 2014-03-25 Paul Eggert <eggert@cs.ucla.edu> @@ -1382,11 +4108,9 @@ the input buffer. This is significant when output is being further processed which could happen if split is writing to precreated fifos, or through --filter. - If input is arriving quickly from a pipe then this will already be buffered before we read it, so fast arriving input shouldn't be a performance issue. - * src/split.c (lines_split, lines_bytes_split, bytes_split, lines_chunk_split, bytes_chunk_extract): s/full_read/safe_read/. * THANKS.in: Mention the reporter. @@ -1396,13 +4120,10 @@ doc: clarify the operation of uniq -uD The description of -u was inaccurate when combined with -D: - $ printf '%s\n' '1 a' '2 a' | uniq -uD -f1 1 a - * doc/coreutils.texi (uniq invocation): Clarify that it's the last repeated line that is suppressed from the output. - Fixes http://bugs.gnu.org/17022 2014-03-19 Edward Welbourne <eddy@chaos.org.uk> @@ -1427,7 +4148,6 @@ file name in the wrong directory, giving an erroneous ENOENT diagnostic. This issue was introduced with commit v5.92-653-gc1994c1 which changed fts to not change directory on traversal. - * src/chmod.c (mode_changed): Use fts->fts_cwd_fd with fstatat rather than stat. All callers changed. * tests/chmod/c-option.sh: Add a test case. @@ -1451,7 +4171,6 @@ All uses changed. (get_birthtime): New function, for porting to Solaris 11. (print_stat): Use it. - * configure.ac (getattrat, LIB_NVPAIR): New checks. * src/local.mk (src_stat_LDADD): Add $(LIB_NVPAIR). @@ -1476,7 +4195,6 @@ * gl/lib/fadvise.c: Use a pragma to turn off this warning option: -Wsuggest-attribute=const. Without this change, building with --enable-gcc-warnings would evoke this error: - lib/fadvise.c:25:1: error: function might be candidate for\ attribute 'const' [-Werror=suggest-attribute=const] @@ -1499,7 +4217,6 @@ to complete the look-up inside the chroot. This can happen for example with a 32 bit chroot on a 64 bit system, where the 32 bit NSS plugins within the chroot fail to load. - * src/chroot.c (parse_additional_groups): A new function refactored from set_addition_groups(), to just do the parsing. The actual setgroups() call is separated out for calling from the chroot later. @@ -1531,11 +4248,9 @@ the framework_failure_ even if there was an error writing the file. shells which do evaluate the failure are ksh 93u+ and bash 4.2, while shells wich don't include bash 4.3, solaris, freebsd, dash. - Furthermore this construct is problematic on Solaris 10 sh, which will try to optimize away a `:' command in a loop after the first iteration, even if it is redirected. - * tests/cp/link-deref.sh: Remove the leading colon on redirections. * tests/cp/reflink-perm.sh: Likewise. * tests/id/zero.sh: Likewise. @@ -1555,8 +4270,6 @@ + cfg.mk (sc_prohibit_colon_redirection): A new syntax check to avoid further instances of this creeping in. -2014-03-05 Pádraig Brady <P@draigBrady.com> - tests: fix false failure in nohup.sh in non tty builds * tests/misc/nohup.sh: When running tests without a controlling tty, an exec failure is triggered in a subshell, which causes POSIX @@ -1582,7 +4295,6 @@ * gnulib: Update to incorporate the fix. This is the only change in this gnulib update. * tests/misc/date.pl: Add a test for this case. - Fixes http://bugs.gnu.org/16872 2014-02-27 Paul Eggert <eggert@cs.ucla.edu> @@ -1609,11 +4321,8 @@ * src/shuf.c (main): s/No/no/, introduced by commit v8.22-25-g9f60f37. * NEWS: Also adjust the NEWS for that recent commit to make it clear this was new bug rather than a regression. - Prompted by the syntax-check rule sc_error_message_uppercase -2014-02-26 Bernhard Voelker <mail@bernhard-voelker.de> - doc: add dd example for failing disks * doc/coreutils.texi (dd invocation): Add an example for how to call dd to save data from a failing disk. Mention GNU 'ddrescue' as one @@ -1651,7 +4360,6 @@ If we can't output more data, we should immediately diagnose the issue and exit rather than consuming all of input (in some cases). - * src/tail.c (xwrite_stdout): Also diagnose the case where only some data is written. Also clearerr() to avoid the redundant less specific error from atexit (close_stdout); @@ -1716,13 +4424,10 @@ build: remove no longer used spawn-pipe files from POTFILES.in This should have been part of the previous commit v8.22-14-gf18999b - * po/POTFILES.in: Remove gnulib files no longer used. Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/8288209/ -2014-01-17 Pádraig Brady <P@draigBrady.com> - build: avoid unneeded spawn-pipe gnulib module * bootstrap.conf: Reference the used pipe-posix module rather than the uneeded and larger spawn-pipe module, @@ -1807,7 +4512,6 @@ Prompted by a test framework failure of tests/mkdir/p-acl.sh on armv7l: The previous test for a working setfacl was not sufficient in some circumstances. - * init.cfg (require_setfacl_): Call setfacl twice with conflictive ACL specs, and use ACL specs which can't be mapped into regular file permission bits. Document the reasons. @@ -1818,11 +4522,9 @@ On emulated aarch64 systems like in the qemu-based OpenBuildService of openSUSE, cp fails to copy /proc/cpuinfo because the inode number changes between the initial stat() call and copying the file: - $ cp /proc/cpuinfo exp cp: skipping file '/proc/cpuinfo', as it was \ replaced while being copied - * tests/cp/proc-zero-len.sh: When cp fails, check on the above error message to skip the test. @@ -1839,17 +4541,12 @@ perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number. -2014-01-02 Bernhard Voelker <mail@bernhard-voelker.de> - maint: prevent update-copyright from updating files from gnulib The files 'bootstrap' and 'tests/init.sh' are taken from the gnulib submodule. Therefore, 'make update-copyright' there should already have updated the copyright year in these 2 files. - * .x-update-copyright: Add entries for the above mentioned files. -2014-01-02 Bernhard Voelker <mail@bernhard-voelker.de> - build: update gnulib submodule, bootstrap and tests/init.sh to latest * gnulib: Update to latest. * bootstrap: Update from gnulib. @@ -1865,18 +4562,13 @@ version 8.22 * NEWS: Record release date. -2013-12-13 Pádraig Brady <P@draigBrady.com> - stat,tail: improve support for hostfs and smackfs hostfs is provided by the Linux UML subsystem. smackfs is provided by the Linux Smack security module. - * src/stat.c (human_fstype): Add new file system ID definitions. * NEWS: Mention the improvement, and adjust for the fact that SNFS is a remote file system. -2013-12-13 Pádraig Brady <P@draigBrady.com> - tests: avoid unlikely deadlock in dd/no-allocate on some shells * test/dd/no-allocate.sh: Use 'wait' to ensure we don't have multiple writers to the fifo, which was seen to trigger @@ -1940,8 +4632,6 @@ * gnulib: Update to incorporate a build fix on platforms with only some of md5 and sha* implemented by libcrypto. -2013-12-09 Pádraig Brady <P@draigBrady.com> - tests: fix false failure due to gdb inline function handling Inline functions are awkward to breakpoint as mentioned at: https://sourceware.org/bugzilla/show_bug.cgi?id=10738 @@ -1951,15 +4641,12 @@ the test failed erroneously due to the breakpoint being successfully set on an "out of line" function, but an inline function was actually being called. - * tests/tail-2/inotify-race.sh: Switch to a line based breakpoint, rather than a symbol base one, which avoids issues with breakpoints on inline functions. Also skip_ on the initial breakpoint check in case the breakpoint is not traversed which would be the case on remote file systems for example. -2013-12-09 Pádraig Brady <P@draigBrady.com> - tail: use consistent diagnostics with and without inotify * src/tail.c: With inotify, when a file is initially absent, we fstat(-1) for that file spec, thus recording an errnum of EBADF, @@ -2001,10 +4688,8 @@ shuf: invalid input range ‘-e’ and therefore eclipsed the expected one: shuf: cannot combine -e and -i options - While at it, reindent a line with more than 80 characters, present since the previous commit to silence sc_long_lines. - * tests/misc/shuf.sh: Pass a valid range to the -i option. 2013-12-06 Paul Eggert <eggert@cs.ucla.edu> @@ -2024,17 +4709,13 @@ Since v8.21-172-g33660b4, df not only treats symbolic link arguments differently, as stated there, but now generally processes special file arguments in a non-canonicalized form correctly: - $ cd /dev && df-old sdb Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 1014572 48 1014524 1% /dev - $ cd /dev && df-new sdb Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb 10190136 6039532 3609932 63% /home - Document df's new behavior. - * doc/coreutils.texi (df invocation): In the paragraph describing df's behavior regarding special file arguments, relax the condition for such special files from "... is an absolute name of ..." to @@ -2046,7 +4727,6 @@ tests: fix false failure with disabled SELinux support This could trigger on SELinux systems where we build --qithout-selinux or where the SELinux development libraries are not installed. - * init.cfg (require_selinux_enforcing_): Call require_selinux_() to determine if the current build supports SELinux. This avoids a false failure in tests/mkdir/selinux.sh where only mkdir would @@ -2054,8 +4734,6 @@ (require_selinux_): Refactor a little to distinguish whether it's the build or the (file) system that doesn't support SELinux. -2013-12-05 Pádraig Brady <P@draigBrady.com> - selinux: fix --context=CTX for cp and diagnose defaultcon() errors * src/selinux.h (ignorable_ctx_err): A new function used to determine if a warning should be given after a call @@ -2074,38 +4752,30 @@ crypto hash routines particular to various systems. For example, testing sha1sum with openssl-1.0.0j on an i3-2310M, gives a performance boost of about 40%: - $ time sha1sum.old --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m4.692s user 0m4.499s sys 0m0.162s - $ time sha1sum.new --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m2.685s user 0m2.512s sys 0m0.170s - * configure.ac: By default, enable use of libcrypto if available. * src/local.mk: Link with libcrypto. * NEWS: Mention the md5sum and sha*sum improvements. -2013-12-04 Pádraig Brady <P@draigBrady.com> - df: handle bind mounts when processing device nodes * src/df.c (get_disk): Use the same heuristic used in get_point() to select the shortest file system mount point, in an attempt to show the base mounted file system. * NEWS: Mention the bug fix. -2013-12-04 Pádraig Brady <P@draigBrady.com> - df: dereference symlinks to disk device nodes This is so the matching for the device is done on the canonical name of the disk node, rather than on the path of the symlink. In any case the user will generally want to use the symlink target. - * src/df.c (get_disk): Canonicalize the passed file, before matching against the list of mounted file system devices. Note we pass the original symlink name to the "file" output field, @@ -2115,20 +4785,14 @@ * NEWS: Mention the fix. Reported by Ondrej Oprala -2013-12-04 Pádraig Brady <P@draigBrady.com> - build: update gnulib submodule to latest Note tests/init.sh and bootstrap are still in sync with gnulib. - * gnulib: Sync two configure check fixes. - Avoid generating core dumps from regex configure check - Fix compile error in getcwd configure check -2013-12-04 Pádraig Brady <P@draigBrady.com> - build: update gnulib submodule to latest Note tests/init.sh and bootstrap are still in sync with gnulib. - * gnulib: Sync many fixes/changes, including the base64 encoding speedup mentioned in commit v8.21-145-g9120845 Also included is support for enabling use of libcrypto hash routines @@ -2139,7 +4803,6 @@ maint: avoid '%s' quoting notation in diagnostic messages Add a new rule to ensure the use of quote() instead of '%s' or `%s' in format strings of diagnostics messages. - * cfg.mk (sc_prohibit_quotes_notation): Add rule. * TODO: Remove the entry regarding the '%s' notation. * src/mkfifo.c (main): Remove the offending and in this case even @@ -2172,28 +4835,20 @@ * tests/rm/r-root.sh: Add a non-root test. * tests/local.mk (all_tests): Mention the test. -2013-11-29 Bernhard Voelker <mail@bernhard-voelker.de> - maint: remove various FIXME comments * src/extent-scan.c (extent_need_sync): Remove the FIXME comment about removing the work around. As discussed in [1], the needed FIEMAP fix never made it into the Linux kernel. - * src/realpath.c (longopts): Remove the FIXME comment about deprecating the --strip option as it's a valid alias for --no-symlinks option. Also discussed in [1]. - [1] http://lists.gnu.org/archive/html/coreutils/2013-11/msg00103.html -2013-11-29 Bernhard Voelker <mail@bernhard-voelker.de> - df: remove long-obsolescent --megabytes option This option has been undocumented for 12 years [1], and warned about for a year [2]. - [1] commit FILEUTILS-4_1_4-23-gd177203 [2] commit v8.17-43-g453ce92 - * src/df.c (MEGABYTES_OPTION): Remove. (long_options): Remove "megabytes" element. (main): In the option parsing loop, remove the MEGABYTES_OPTION case. @@ -2220,7 +4875,6 @@ gnulib to provide the necessary stubs for use by this module, but it's more efficient to just stub out the module completely, when not using selinux. - * src/selinux.h: Define stubs for the two module functions, when SELinux is not available. * src/selinux.c: Exclude all logic in preference for the stubs @@ -2228,8 +4882,6 @@ don't use our conflicting static version of mode_to_security_class(). m4/jm-macros.m4: Check for the system mode_to_security_class(). -2013-11-27 Pádraig Brady <P@draigBrady.com> - build: avoid build failure on non selinux systems * src/selinux.c: This module introduced in commit v8.21-159-gd8e27ab doesn't need to include <selinux/flask.h>. That header file @@ -2238,14 +4890,11 @@ Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6920020 -2013-11-27 Pádraig Brady <P@draigBrady.com> - selinux: adjust utils to run restorecon with -Z cp, mv, install, mkdir, mkfifo, mknod are adjusted so that: -Z no longer accepts an argument. -Z or --context without an argument do not warn without SELinux. --context with an argument will warn without SELinux. - * src/local.mk: Reference the new selinux module where required. * src/system.h: Make the argument to --context optional. * src/mkdir.c: Likewise. Also handle the SMACK case for --context. @@ -2332,19 +4981,16 @@ I timed the following python script which indicated that each ext4 dir sync was taking about 2ms and 12ms, on an SSD and traditional disk respectively. - import os d=os.open(".", os.O_DIRECTORY|os.O_RDONLY) for i in range(1000): os.fdatasync(d) - So syncing for each character for each file can result in significant delays. Often this overhead is redundant, as only the data is sensitive and not the file name. Even if the names are sensitive, your file system may employ synchronous metadata updates, which also makes explicit syncing redundant. - * tests/misc/shred-remove.sh: Ensure all the new parameters actually unlink the file. * doc/coreutils.texi (shred invocation): Describe the new @@ -2356,14 +5002,11 @@ * NEWS: Mention the new feature. * THANKS.in: Add reporter Joseph D. Wagner -2013-11-27 Pádraig Brady <P@draigBrady.com> - tail: improve inotify handling of symlinks Previous behavior failed to read contents of a (re)appearing file, when symlinked by tail's watched file. Also we now diagnose other edge cases when running in inotify mode, where an initially missing or regular file changes to a symlink. - * src/tail.c (main): If any arg is a symlink, use polling mode. (recheck): Diagnose the edge case where a symlink appears during inotify processing. @@ -2372,8 +5015,6 @@ * NEWS: Mention the fix. Reported by: Ondrej Oprala -2013-11-27 Pádraig Brady <P@draigBrady.com> - df: add --output=file to directly output specified arguments * src/df.c (usage): Document the new 'file' --output field. (get_dev): Add a new parameter to pass the specified @@ -2427,7 +5068,6 @@ tests: enhance rm test regarding "." and ".." Recent commit 2da7009d changed the error diagnostic of rm(1) trying to remove "." or "..". Enhance the corresponding test. - * tests/rm/r-4.sh: Ensure rm(1) outputs the expected error diagnostic. 2013-11-21 Bernhard Voelker <mail@bernhard-voelker.de> @@ -2435,18 +5075,14 @@ maint: avoid perl warning in sc_check-AUTHORS With newer perl, "make syntax-check" issues many warnings like: -i used with no filenames on the command line, reading from STDIN. - * cfg.mk (sc_check-AUTHORS): Remove the -i flag in the perl invocation as it is reading from a pipe. -2013-11-21 Bernhard Voelker <mail@bernhard-voelker.de> - doc: enhance diagnostic when rm skips "." or ".." arguments The error diagnostic "rm: cannot remove directory: '.'" does not give the user a hint for the reason. Issue a clearer error message. - * src/remove.c (rm_fts): Enhance the error diagnostic in the above case to emphasize that skipping is done deliberately. In the corresponding comment, mention that POSIX mandates this @@ -2458,10 +5094,8 @@ tests: fix false rm -I test failure when run as root Fix a recent regression introduced in commit v8.21-127-g5ee7d8f - Also related to this is the recent query about root run `rm -I` ignoring the mode bits of a file: https://bugzilla.redhat.com/1013171 - * tests/rm/interactive-once.sh: Avoid the messages and corresponding file presence checks with write protected files when running as root. @@ -2470,7 +5104,6 @@ stty: add support for mark/space parity This adds support for using a constant or "stick" parity bit. - * src/stty.c (usage): Mention the new flag. * tests/misc/stty.sh: Adjust for the new flag. * NEWS: Mention the improvement. @@ -2484,19 +5117,16 @@ than fputc() to output '\n'. Time to process a 100MiB file was measured to decrease from 0.417s to 0.383s, i.e. an 8% improvement. - Related to these changes, is a processing improvement in gnulib, which increases throughput by 60% when processing full buffers, which improves processing of a 100MiB file with standard wrapped output, down to 0.256s. http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=43fd1e7b - Also increase the encoding buffer size from 3 to 30KiB. This was seen to give a further 8% improvement, taking processing time down to 0.235s in the wrapped output case. The decoding size buffer is not adjusted, due to the noted caveat with --ignore-garbage. - * src/base64.c (BLOCKSIZE): Split into ENC_ and DEC_ variants, with the former increased from 3KiB to 30KiB. (wrap_write): Use the simpler fputc() rather than fputs() @@ -2523,8 +5153,6 @@ I/O block size from 12KiB to 60KiB (also a multiple of 3 and 4096). * NEWS: Adjust accordingly. -2013-11-08 Pádraig Brady <P@draigBrady.com> - shred: fix direct I/O failures for last write to file Since direct I/O is now enabled with commit v8.21-139-gebaf961 we must handle the case where we write an odd size at the @@ -2535,7 +5163,6 @@ Theoretically this could have also been an issue after that on systems which didn't have alignment constraints, but did have size constraints for direct I/O. - * src/shred.c (dopass): On the first pass for a file, always retry a write that fails with EINVAL, so we handle direct I/O failure at either the start or end of the file. Adjust the comment @@ -2569,7 +5196,6 @@ * tests/cp/link-deref.sh: Add a new test. * tests/local.mk (all_tests): Reference the above new test. * NEWS (Changes in behavior): Mention the change. - This fixes http://bugs.gnu.org/15173 2013-11-06 Pádraig Brady <P@draigBrady.com> @@ -2587,7 +5213,6 @@ We want to use direct I/O when possible to avoid impacting the page cache at least, as we know we don't want to cache the data we're writing. - * src/shred.c (dopass): Allocate the buffer on the heap, while using a more general calculation to allow to have the output size independent from the fillpattern() size @@ -2621,14 +5246,12 @@ Although the above man pages depend on src/md5sum.c as a shared source, the build of the man pages directly requires their own executables to exist. - * man/local.mk (man/sha1sum.1): Change the dependency from 'src/md5sum' to 'src/sha1sum'. (man/sha224sum.1): s/md5sum/sha224sum/ (man/sha256sum.1): s/md5sum/sha256sum/ (man/sha384sum.1): s/md5sum/sha384sum/ (man/sha512sum.1): s/md5sum/sha512sum/ - Reported by Pádraig Brady in http://lists.gnu.org/archive/html/coreutils/2013-11/msg00006.html @@ -2681,13 +5304,10 @@ suppress only some subset of possible errors. The most useful separation here is with usage/internal errors, and errors due to file creation etc. (i.e. I/O errors). - * src/mktemp.c (main): Match the --help and info docs and only suppress the file/dir creation error messages. * tests/misc/mktemp.pl: Adjust accordingly. -2013-10-06 Pádraig Brady <P@draigBrady.com> - mktemp: synchronize the -p option with docs * src/mktemp.c (usage): Synchronize the -p option description with the logic and info docs. I.E. that -p is just an alias of --tmpdir. @@ -2706,7 +5326,6 @@ rm: with -I, prompt before deleting a write protected file This regression was introduced in commit v6.7-71-g0928c24 - * src/rm.c (main): Make the -I option behave like --interactive=once. * tests/rm/interactive-once.sh: Add cases for single and multiple files. * NEWS: Mention the bug fix. @@ -2743,21 +5362,15 @@ * NEWS: Mention the new feature. Addresses http://bugs.gnu.org/15421 -2013-09-22 Pádraig Brady <P@draigBrady.com> - build: update gnulib submodule to latest; also bootstrap to latest Notes tests/init.sh is still in sync with gnulib. - * bootstrap: Update to latest. * gnulib: Sync many fixes/changes, including: a fix for http://bugs.gnu.org/15066 and preparation for http://bugs.gnu.org/15421 -2013-09-22 Pádraig Brady <P@draigBrady.com> - tests: avoid a failure when there isn't a name for all user IDs * tests/misc/id-zero.sh: Don't check exit status when in -n mode. - Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6196762 @@ -2803,7 +5416,6 @@ done outside of help2man. Therefore, this commit partly reverts the recent separation of help2man into 'help2man.in' and 'help2man.diff', and instead uses the original help2man script. - * man/help2man.in: Rename to ... * man/help2man: ... this file. * man/help2man.diff: Remove. @@ -2827,34 +5439,26 @@ 'man/help2man.diff', exempt 'man/help2man'. * man/dummy-man: Recognize the option --info-page=... as no-op. -2013-09-12 Bernhard Voelker <mail@bernhard-voelker.de> - maint: use help2man configured with --disable-nls Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6038769 - The previously committed 'help2man' requires a Perl module which does not seem to be installed everywhere - and which is not needed for our purposes: - Can't locate Locale/gettext.pm in @INC BEGIN failed--compilation aborted at ./man/help2man line 28. - This module was pulled in automatically by the default configure call. Use the NLS-disabled version instead. - * man/help2man.in: Use help2man configured with the --disable-nls option to avoid the dependency to the above Perl module. * man/help2man.diff: Adapt the line numbers of the hunks in the coreutils-specific patch for help2man to apply without fuzz. - Reported by Pádraig Brady. 2013-09-10 Pádraig Brady <P@draigBrady.com> build: fix corrupted patch causing bootstrap failures The patch was corrupted in commit v8.21-50-g7b65f8e - * gl/modules/tempname.diff: Fix the offsets so that the patch applies cleanly. Note that this was only apparent with patch < 2.6. With patch >= 2.6, patch will not indicate an error applying @@ -2871,12 +5475,10 @@ Instead of diverging further from the upstream GNU help2man project (http://www.gnu.org/software/help2man/), hold a copy of the original script and keep track of our changes in a separate patch file. - The man pages created with the new version show the following, non-invasive differences: a) command options in the EXAMPLE sections are no longer in bold format, b) file names are underlined now consistently. - * man/help2man: Rename to ... * man/help2man.in: ... this file, and update content from the upstream GNU help2man project. @@ -2906,7 +5508,6 @@ then exit with the "less serious" exit code, rather than the "serious" exit code reserved for command line arguments. This issue was introduced in commit v5.2.1-1908-gb58dea5 - * src/ls.c (print_dir): Ensure that the command_line_arg param is false for directories being recursed into. * NEWS: Mention the bug fix. @@ -2956,7 +5557,6 @@ doc: more semicolons instead of periods in option descriptions Also slightly rephrase some descriptions for extra clarity, and add more consistent indentation. - * src/df.c (usage): Semicolon, no final period. * src/du.c (usage): Likewise, plus indentation and clarifying words. * src/ls.c (usage): Semicolon, rephrasings, added parentheses for @@ -2975,7 +5575,6 @@ maint: update copyright year number ranges of numfmt sources Run "make update-copyright". - * src/numfmt.c: Update copyright year number range. This file has obviously been added to coreutils after and without the annual update. * tests/misc/numfmt.pl: Likewise. @@ -2985,7 +5584,6 @@ doc: use semicolon instead of period in option descriptions Also do not end option descriptions with a period, properly indent continuation lines, and make some tiny clarifications. - * src/du.c (usage): Lowercase after semicolon. * src/ls.c (usage): Semicolons instead of periods, small rephrasing and two hyphens for clarity, proper indentation. @@ -3012,11 +5610,9 @@ tests: fix another test failure in test/du/inodes.sh Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/5584121 - du(1) uses the first file object of the two test files linked to the same inode, 'd/f' and 'd/h', whatever the system returns first. Use 'd/f' in both the expected and the actual output. - * test/du/inodes.sh: Change the expected output as described above when returning the --all directory entries (without -l). Also replace the name of the hardlink 'd/h' by 'd/f' in the actual output. @@ -3045,12 +5641,9 @@ (process_regexp): Avoid a redundant assignment of the "line" pointer. (process_line_count): Likewise. Also reduce the "line" pointer scope. -2013-07-28 Pádraig Brady <P@draigBrady.com> - tests: fix intermittent failure in test/du/inodes.sh Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/5582213 - * test/du/inodes.sh: Due to undefined order in returned directory entries, the expected output might not match, so sort both expected and actual output when returning --all directory entries. @@ -3063,7 +5656,6 @@ amount of files. The GNU find utility has the printf format "%h" which prints the number of entries in a directory, but this is non-cumulative and doesn't handle hard links. - * src/du.c (struct duinfo): Add new member for counting inodes. (duinfo_init): Initialize inodes member with Zero. (duinfo_set): Set inodes counter to 1. @@ -3103,14 +5695,11 @@ * src/du.c (fill_mount_table): Use free_mount_entry() instead of freeing struct members manually. -2013-07-22 Bernhard Voelker <mail@bernhard-voelker.de> - maint: make some shell and perl scripts executable in 'tests/' Some newer test scripts - partially ones from me - are not executable. It does not seem to be a problem, but for consistency and to avoid future problems on unusual platforms or shells change the permissions by adding the executable bit. - * cfg.mk (sc_tests_executable): Add new syntax-check rule to ensure that all test scripts are executable. * tests/df/df-output.sh: Change file mode from 644 to 755. @@ -3129,12 +5718,9 @@ where the arguments were not provided by hand, but instead were the result of various shell expansions. A simple, if somewhat contrived, example (assuming rm is aliased to rm -I) could be: - rm * .o - where the prompt "Remove 120 arguments?" is more likely to make the user catch the problem. - * src/rm.c (main): Include correctly pluralized n_files in the output message. Also remove the now redudant "all". * tests/rm/interactive-always.sh: Adjust to the new prompt. @@ -3161,8 +5747,6 @@ circuit code could not be reached due to logic error. Spotted by coverity. -2013-07-12 Pádraig Brady <P@draigBrady.com> - maint: avoid a valgrind memory leak warning from pinky Similarly to commit v8.21-84-g8d2da3f in src/uptime.c avoid a "definitely lost" error from valgrind. Note this @@ -3170,7 +5754,6 @@ in which case certain paths aren't eliminated casuing valgrind to trigger the message. Note also that coverity flags this "resource leak" too. - * src/pinky.c (short_pinky): free utmp_buf for developer builds. 2013-07-11 Anton Ovchinnikov <revolver112@gmail.com> @@ -3179,7 +5762,6 @@ Avoid Valgrind reports of "definitely lost" items and while at it, free all discarded mount entries to minimize the amount of memory used. - * src/df.c (filter_mount_list): Use the newly exported free_mount_entry() from gnulib to free all mount entries as they're discarded. @@ -3188,12 +5770,9 @@ build: update gnulib submodule to latest -2013-07-11 Pádraig Brady <P@draigBrady.com> - build: fix a build warning on 32 bit systems in shuf.c Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/5508873 - * src/shuf.c (write_random_numbers): Convert to an int type that matches the prinft format spec. @@ -3271,7 +5850,6 @@ Consolidate all smack routines and checks in a module. We replace and wrap the most commonly used smack routines, which allows removing ifdefs throughout the code. - * gl/lib/smack.h: A new header containing the implementation of the wrapped and replacement routines. Note the is_smack_enabled() routine should be optimized out at compile time when compiled @@ -3286,8 +5864,6 @@ * src/mkfifo.c: Likewise. * src/mknod.c: Likewise. -2013-07-02 Pádraig Brady <P@draigBrady.com> - id: don't show SMACK errors unless -Z is specified * src/id.c (main): Be consistent with the SELinux case, and only show errors in getting the security context @@ -3298,7 +5874,6 @@ mkdir,mkfifo,mknod: with -Z, create SMACK security context Enable creation of SMACK security context with -Z command-line switch if SMACK is enabled. - * mkdir.c (main): Set process security context to given SMACK label. * mkfifo.c (main): Likewise. * mknod.c (main): Likewise. @@ -3320,7 +5895,6 @@ if SMACK is enabled. Showing SMACK context of a file does not strictly require SMACK to be enabled but this required to make choice whether to show SELinux or SMACK security context. - * src/ls.c (getfilecon_cache): Retrieve SMACK context if available. (gobble_file): Handle SMACK context similarly to SELinux context. * src/local.mk: Link lsl with libsmack. @@ -3333,15 +5907,12 @@ This is consistent with the documented interface and avoids any ambiguity in a user thinking that stdbuf without options might reset to a "standard" buffering setup. - * src/stdbuf.c (set_libstdbuf_options): Indicate with the return value whether any env variables were actually set. (main): Fail unless some env variables were set. * tests/misc/stdbuf.sh: Ensure this constraint is enforced. * NEWS: Mention the small change in behavior. -2013-06-22 Pádraig Brady <P@draigBrady.com> - doc: clarify that truncate --size represents bytes by default * src/truncate.c (usage): Mention that --size is in bytes which is by far the most common usage. @@ -3355,7 +5926,6 @@ There was slight change to libsmack such that positive values are reserved for returning length of the label for smack_new_label_from_* functions. - * m4/jm-macros.m4: Set HAVE_SMACK when both smack_new_label_from_self() and recently added smack_new_label_from_path() are present. The latter's presence indicates the newer API of the former. @@ -3392,9 +5962,7 @@ For a file of size 1234 bytes, commit ca9aa759 had the side effect of changing 'stat -c "%'s" file' from outputting "?s" to the nicer "1,234", depending on locale. This is worth mentioning in the NEWS. - Resolves part of http://bugs.gnu.org/14556. - * NEWS: Mention 8.7 improvement in stat. * cfg.mk (old_NEWS_hash): Adjust accordingly. @@ -3402,7 +5970,6 @@ build: update gnulib submodule; also bootstrap to latest Notes tests/init.sh is still in sync with gnulib. - * bootstrap: Update to latest. * gnulib: Update avoiding gnulib-test failures. @@ -3411,7 +5978,6 @@ tests: avoid a race in tail --retry testing Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/5221053 - * tests/tail-2/retry.sh: Ensure the 'out' file is truncated, as it's used to arbitrate the run order of commands. Relying on the truncation in the background tail command @@ -3553,7 +6119,6 @@ id: with -Z, show SMACK security context Adds an optional dependency on libsmack. - * m4/jm-macros.m4: Look for the smack library/header. * src/id.c (main): Output the smack context if available. * src/local.mk: Link with libsmack if available. @@ -3564,11 +6129,8 @@ cut: improve performance, especially with --output-delimiter Use a sentinel value that's checked implicitly, rather than a bit array, to determine if an item should be output. - Benchmark results for this change are: - $ yes abcdfeg | head -n1MB > big-file - $ for c in orig sentinel; do src/cut-$c 2>/dev/null echo -ne "\n== $c ==" @@ -3578,12 +6140,10 @@ real 0m0.049s user 0m0.044s sys 0m0.005s - == sentinel == real 0m0.035s user 0m0.032s sys 0m0.002s - ## Again with --output-delimiter ## $ for c in orig sentinel; do src/cut-$c 2>/dev/null @@ -3594,12 +6154,10 @@ real 0m0.106s user 0m0.103s sys 0m0.002s - == sentinel == real 0m0.055s user 0m0.052s sys 0m0.003s - eol_range_start: Removed. 'n-' is no longer treated specially, and instead SIZE_MAX is set for the 'hi' limit, and tested implicitly. complement_rp: Used to complement 'rp' when '--complement' is specified. @@ -3613,7 +6171,6 @@ cut: fix handling of overlapping ranges This issue was introduced in commit v8.21-43-g3e466ad - * src/cut.c (set_fields): Process all range pairs when merging. * tests/misc/cut-huge-range.sh: Add a test for this edge case. Also fix an issue where we could miss reported errors due @@ -3631,34 +6188,27 @@ Ensure appropriate functions are inlined. This was seen to be required with gcc 4.6.0 with -O2 on x86_64 at least. It was reported that gcc 4.8.0 did inline these functions though. - Also reinstate the bit vector for the common case, to further improve performance. - Benchmark results for both aspects of this change are: - $ yes abcdfeg | head -n1MB > big-file $ for c in orig inline inline-array; do src/cut-$c 2>/dev/null echo -ne "\n== $c ==" time src/cut-$c -b1,3 big-file > /dev/null done - == orig == real 0m0.088s user 0m0.081s sys 0m0.007s - == inline == real 0m0.070s user 0m0.060s sys 0m0.009s - == inline-array == real 0m0.049s user 0m0.044s sys 0m0.005s - * src/cut.c (set_fields): Set up the printable_field bit vector for performance, but only when it's appropriate. I.E. not when either --output-delimeter or huge ranges are specified. @@ -3673,29 +6223,23 @@ determine if an item is to be output or not, so simplify it by moving some logic outside. Benchmark results for this change are: - $ yes abcdfeg | head -n1MB > big-file $ for c in orig split; do src/cut-$c 2>/dev/null echo -ne "\n== $c ==" time src/cut-$c -b1,3 big-file > /dev/null done - == orig == real 0m0.111s user 0m0.108s sys 0m0.002s - == split == real 0m0.088s user 0m0.081s sys 0m0.007s - * src/cut.c (print_kth): Refactor a branch to outside the function. Related to http://bugs.gnu.org/13127 -2013-04-29 Cojocaru Alexandru <xojoc@gmx.com> - cut: make memory allocation independent of range width The current implementation of cut, uses a bit array, an array of `struct range_pair's, and (when --output-delimiter @@ -3706,29 +6250,23 @@ memory for `printable_field'. 2. When --output-delimiter is specified, it will allocate 31 buckets. Even if only a few ranges are specified. - Note CPU overhead is increased to determine if an item is to be printed, as shown by: - $ yes abcdfeg | head -n1MB > big-file $ for c in with-bitarray without-bitarray; do src/cut-$c 2>/dev/null echo -ne "\n== $c ==" time src/cut-$c -b1,3 big-file > /dev/null done - == with-bitarray == real 0m0.084s user 0m0.078s sys 0m0.006s - == without-bitarray == real 0m0.111s user 0m0.108s sys 0m0.002s - Subsequent patches will reduce this overhead. - * src/cut.c (set_fields): Set and initialize RP instead of printable_field. * src/cut.c (is_range_start_index): Use CURRENT_RP rather than a hash. @@ -3741,7 +6279,6 @@ stat,tail: improve support for snfs The StorNext distributed file system was previously known as CVFS. - * src/stat.c (human_fstype): Add new file system ID definition. * NEWS: Mention the improvement. Fixes http://bugs.gnu.org/14251 @@ -3781,7 +6318,6 @@ This can happen, for example, when the argument file name appears as directory. Tail sets the 'ignore' flag of this file to true, but instead of exiting the program, tail would continue the loop. - * src/tail.c (any_live_files): Change the function to return true if any of the files is still tailable or if tail should continue to try to check again. @@ -3792,17 +6328,13 @@ then reset reopen_inaccessible_files to false. * tests/tail-2/retry.sh: Add test case. -2013-04-20 Bernhard Voelker <mail@bernhard-voelker.de> - tail: let -f --retry wait for inaccessible files The --retry option is indeed useful for both following modes by name and by file descriptor. The difference is that in the latter case, it is effective only during the initial open. - As a regression of the implementation of the inotify support, tail -f --retry would immediately exit if the given file is inaccessible. - * src/tail.c (usage): Change the description of the --retry option: remove the note that this option would mainly be useful when following by name. @@ -3821,7 +6353,6 @@ regarding the --retry option when combined with the following modes name versus descriptor. * NEWS (Bug fixes): Mention the fix. - Reported by Noel Morrison in: http://lists.gnu.org/archive/html/coreutils/2013-04/msg00003.html @@ -3832,7 +6363,6 @@ are set to a that of the directory rather than the current user. It's not currently understood when this happens, but it was confirmed that ACLs, extended attributes and setgid bits are _not_ involved. - * init.cfg (skip_if_nondefault_group_): A new function to detect and avoid this situation. Document with links to the discussions for hopefully future clarification. @@ -3840,8 +6370,6 @@ * tests/install/install-C-selinux.sh: Likewise. * tests/install/install-C.sh: Likewise. -2013-04-14 Pádraig Brady <P@draigBrady.com> - doc: mention caveats with using install --compare * doc/coreutils.texi (install invocation): Mention that install(1) may not correctly determine the default user or permissions for installed @@ -3872,7 +6400,6 @@ With --suppress-matched, the lines that match the pattern will not be printed in the output files. I.E. the first line from the second and subsequent splits will be suppressed. - * src/csplit.c: process_regexp(),process_line_count(): Don't output the matched lines. Since csplit includes "up to but not including" matched lines in each split, the first line (in the next group) is the matched @@ -3893,9 +6420,7 @@ which is not the case in the presence of POSIX default ACLs for e.g. In that case, chmod may print a warning like the following, and exit with failure status: - chmod: man/hostid.1-t: new permissions are r--rw-r--, not r--r--r-- - * man/local.mk: s/-w/a-w/ 2013-04-04 Pádraig Brady <P@draigBrady.com> @@ -3934,7 +6459,6 @@ Don't dereference an existing symlink being replaced. I.E. generate the symlink relative to the symlink's containing dir, rather than to some arbitrary place it points to. - * src/ln.c (convert_abs_rel): Don't consider the final component of the symlink name when canonicalizing, as we want to avoid dereferencing the final component. @@ -3948,7 +6472,6 @@ Reservoir sampling optimizes selecting K random lines from large or unknown-sized input: http://en.wikipedia.org/wiki/Reservoir_sampling Note this also avoids reading any input when -n0 is specified. - * src/shuf.c (main): Use reservoir-sampling when the number of output lines is known, and the input size is large or unknown. (input_size): A new function to get the input size for regular files. @@ -4150,7 +6673,6 @@ order, and defaulting to "vi" if none of them is set) to decide which editor should be invoked for the user when he has to or want to edit his commit message. - However, our commit-msg hook, when invoking an editor on behalf of the user to allow him to fix a non-policy-complaint commit message, only honoured the EDITOR environment variable. To avoid potential annoying @@ -4158,11 +6680,8 @@ selection of the editor. Luckily, we don't have to duplicate this logic (that would be brittle in the long term), as we can rely on the "git var" command, designed exactly to be used in situations like this. - * scripts/git-hooks ($editor): Adjust definition. -2013-02-18 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: don't reset PATH in the commit-msg git hook I have a custom 'editor' script in ~/bin, and a system-provided 'editor' program in /usr/bin (on Debian, this is a link set up the @@ -4173,7 +6692,6 @@ coreutils unconditionally resets its PATH to '/bin:/usr/bin', which causes it to call the "wrong" editor (the one in /usr/bin, not the one in ~/bin) when it makes me update a botched commit message. - * scripts/git-hooks: Don't reset $ENV{PATH} to '/bin:/usr/bin', which was only done to avoid failure when enabling Perl's taint checking. @@ -4201,13 +6719,10 @@ Also remove a redundant call to `tr` and avoid explicit setting of LANG=C which is done globally. -2013-02-14 Pádraig Brady <P@draigBrady.com> - build: avoid link failure in devmsg() on older linkers On linkers that don't remove unused functions, there will be a reference to a missing dev_debug symbol in the devmsg() function. So for now ... - * src/system.h: ... move devmsg() from here ... * src/numfmt.c: ... to here, and document future cleanup. * src/factor.c: Likewise. @@ -4242,7 +6757,6 @@ sort options alphabetically. * doc/coreutils.texi (numfmt invocation): Sort numfmt options alphabetically. Enforce double-blank-after-period style. - This addresses http://bugs.gnu.org/13681. Improved-by: Bernhard Voelker @@ -4260,7 +6774,6 @@ marked a couple. We really don't need these translated. So we fix the above issues here while renaming the enabling option for both commands to ---debug (still undocumented). - * src/factor.c (verbose): Rename to dev_debug and change from int to bool as it's just a toggle flag. (long_options): Rename --verbose to ---debug. @@ -4272,11 +6785,8 @@ * tests/misc/numfmt.pl: Adjust for the ---devdebug to ---debug change. * cfg.mk (sc_marked_devdiagnostics): Add a syntax check to ensure translations are not added to devmsg calls. - Reported by Göran Uddeborg in http://bugs.gnu.org/13665 -2013-02-10 Pádraig Brady <P@draigBrady.com> - tests: tail-2/inotify-rotate: fix a false failure on NFS * tests/tail-2/inotify-rotate.sh: Avoid a subshell with bash, which in turn causes the `kill` to be ineffective to the tail @@ -4303,7 +6813,6 @@ build: update gnulib submodule; also bootstrap to latest Notes tests/init.sh is still in sync with gnulib - * bootstrap: update to latest * gnulib: update avoiding secure_getenv and subsequent patches as these are reported to fail on FreeBSD at least. @@ -4313,7 +6822,6 @@ maint: improve error messages upon failed read, write, access, close Note we use "failed to {access,close}" for those single operations, and "error {read,writ}ing" for those partial operation failures. - * src/copy.c: Improve error messages for failing read, write and close. * src/cp.c: Improve error messages for failing access. * src/dd.c: Improve error messages for failing read, write and open. @@ -4333,7 +6841,6 @@ stty: add support for DTR/DSR hardware control flow Originally requested in Red Hat bugzilla #445213. - * src/stty.c (mode_info): Add support for DTR/DSR hardware flow control, if available. * doc/coreutils.texi: Document it. @@ -4345,7 +6852,6 @@ numfmt: correct a printf format Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/4010493 - * src/numfmt.c (parse_format_string): Correct both sign and size of a printf format, which only gives a warning on 32 bit builds. @@ -4371,7 +6877,6 @@ cut: fix a segfault with disjoint open ended ranges Fixes the issue introduced in unreleased commit v8.20-60-gec48bea. - * src/cut.c (set_fields): Don't access the bit array if we've an open ended range that's outside any finite range. * tests/misc/cut.pl: Add tests for this case. @@ -4393,7 +6898,6 @@ is not sufficient. As the rootfs entry is now elided by the general deduplication in filter_mount_list (commit v8.20-103-gbb116d3), all other references to rootfs can be removed again. - * src/df.c (show_rootfs): Remove global variable. (ROOTFS): Remove constant. (filter_mount_list): Remove case to handle rootfs specially. @@ -4460,13 +6964,10 @@ the last line if it doesn't contain a '\n'. * test/misc/cut.pl: Add tests for this edge case. -2013-01-26 Pádraig Brady <P@draigBrady.com> - cut: with -f, process each line independently Previously line N+1 was inspected before line N was fully output, which causes output ordering issues at the terminal or delays from intermittent sources like tail -f. - * src/cut.c (cut_fields): Adjust so that we record the previous output character so we can use that info to determine wether to output a '\n' or not. @@ -4495,17 +6996,13 @@ Furthermore, use the @itemx macro for the long options --max-depth and --threshold instead of @item. -2013-01-23 Bernhard Voelker <mail@bernhard-voelker.de> - maint: define usage note about mandatory args centrally Each program with at least one long option which is marked as 'required_argument' and which has also a short option for that option, should print a note about mandatory arguments. Define that well-known note centrally and use it rather than literal printf/fputs, and add it where it was missing. - * src/system.h (emit_mandatory_arg_note): Add new function. - * src/cp.c (usage): Use it rather than literal printf/fputs. * src/csplit.c, src/cut.c, src/date.c, src/df.c, src/du.c: * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/install.c: @@ -4515,7 +7012,6 @@ * src/split.c, src/stdbuf.c, src/tac.c, src/tail.c, src/timeout.c: * src/touch.c, src/truncate.c, src/unexpand.c, src/uniq.c: Likewise. - * src/base64.c (usage): Add call of the above new function because at least one long option has a required argument. * src/basename.c, src/chcon.c, src/date.c, src/env.c: @@ -4553,24 +7049,18 @@ names. This assumption is dependant on the underlying file system, and in some environments like XEN does not even work on file systems known to work otherwise. - The test for dereferencing and no-dereferencing symlinks is already covered by other tests (du/deref.sh, du/deref-args.sh, and du/no-deref.sh). Therefore, remove it. - * tests/du/slink.sh: Remove file. * tests/local.mk (all_tests): Remove the above test. - Discussed in: http://lists.gnu.org/archive/html/coreutils/2013-01/msg00053.html -2013-01-20 Bernhard Voelker <mail@bernhard-voelker.de> - maint: fix alphabetical order in .gitignore Since commit v8.20-67-g0f525b6, .gitignore sometimes showed up as changed because the entries "*.gcda" and "*.gcno" had not been in alphabetical order. - * .gitignore: Exchange the entries "*.gcda" and "*.gcno". 2013-01-12 Benno Schulenberg <bensberg@justemail.net> @@ -4593,11 +7083,9 @@ to avoid a build failure (http://bugs.gnu.org/13353) and on sparc with -mcpu >= v9 in 32 bit mode where for example, `factor 2123123123123123123123` would go into an infinite loop. - Since factor.c currently operates on uintmax_t, we restrict the use of the assembly in longlong.h to when 'long' has the same width, to provide a more general guard for this code. - * src/factor.c: Restrict the use of longlong.h assembly code, to when the width of intmax_t == long. * src/longlong.h: Remove the previous _LP64 guards to avoid @@ -4653,7 +7141,6 @@ factor: disable x86_64 assembly code for x32 builds The current x86_64 asm code does not work for x32 (__ILP32__) ABIs, so disable it. Note simply deleting the q suffix is not enough. - * src/longlong.h: Restrict x86_64 assembly to _LP64 targets, which is consistent with other checks in longlong.h and avoids this code on x32. @@ -4673,11 +7160,8 @@ and uintmax_t. This was flagged by -Wformat on a 64 bit host when compiling with CFLAGS=-m32. -2012-12-21 Pádraig Brady <P@draigBrady.com> - seq: fix newline output when -s specified This regression was introduced in commit v8.19-132-g3786fb6. - * src/seq.c (seq_fast): Don't use puts() to output the first number, and instead insert it into the buffer as for other numbers. Also output the terminator unconditionally. @@ -4690,7 +7174,6 @@ tests: add tests for basename's --zero option The -z option has been introduced in commit v8.15-60-ga3eb71a, i.e. in coreutils-8.16. Time to add some tests for it. - * tests/misc/basename.pl: Add tests exercising the -z option. In the foreach loop to append a newline to the end of each expected 'OUT' string, skip the -z tests. @@ -4744,15 +7227,12 @@ maint: consistently use @dots{} in coreutils.texi * doc/coreutils.texi: s/\.\.\./@dots{}/ except in code and examples. -2012-12-17 Pádraig Brady <P@draigBrady.com> - readlink: support multiple command line arguments This allows efficient processing of multiple files, while also increasing compatibility with BSD's readlink(1). We also add the -z, --zero option to delimit output items with the NUL character which disambiguates output in the presence of '\n' characters. - * src/readlink.c (usage): Add the --zero description, and also adjust the description of --no-newline accordingly. (main): Handle the -z option and iterate over multiple arguments. @@ -4785,14 +7265,11 @@ Teach tail -f that it must use polling on ceph file systems, and let stat -f --format=%T report the file system type name, "ceph". Website: http://ceph.com/ - * src/stat.c (human_fstype): Add a case: ceph, 0x00C36400, remote. * NEWS (Improvements): Mention it. * THANKS.in: Update. Reported by Konrad Wróblewski in http://bugs.gnu.org/13172. -2012-12-14 Bernhard Voelker <mail@bernhard-voelker.de> - maint: fix typos found by misspellings * doc/coreutils.texi (df invocation): s/occurence/occurrence/. * tests/df/skip-rootfs.sh: s/supressed/suppressed/ @@ -4812,7 +7289,6 @@ the tests which would have detected this error - namely link-preserve.sh and reserve-mode.sh - failed to test cp's exit code. - * src/copy.c (copy_reg): In the case x->explicit_no_preserve_mode, do only set return_val to false iff the previous set_acl () failed. @@ -4820,9 +7296,7 @@ * tests/cp/link-symlink.sh: Likewise. * tests/cp/preserve-mode.sh: Likewise. * NEWS: Mention the fix. - Bug introduced in commit v8.19-145-g24ebca6. - Reported by Florian Pritz in http://bugs.gnu.org/13119. 2012-12-07 Ondrej Oprala <ooprala@redhat.com> @@ -4872,10 +7346,8 @@ The regular expression failed to match for file systems that do not provide inode statistics, e.g. VFAT or CIFS (depending on the underlying peer file system). - * tests/df/total-verify.sh: Fix the regular expression to match a dash in the ipcent field again. - Reported by Assaf Gordon in http://bugs.gnu.org/13099. Bug introduced in commit v8.20-18-gdae8d22. @@ -4913,7 +7385,6 @@ maint: remove now auto-added entry from THANKS.in The syntax-check sc_THANKS_in_duplicates complained about that excess entry. - * THANKS.in (Colin Watson): Remove entry, now that it will be automatically included in the generated THANKS file. @@ -4928,12 +7399,10 @@ factor: fix infinite loop on 32 bit powerpc Both Debian and Ubuntu builds of coreutils 8.20 hang while running the test suite on powerpc, which is reproducible using 'factor 122'. - This turns out to be somewhat related to http://bugs.gnu.org/12754, but not quite the same. uintmax_t is 64 bits, but the cntlzw instruction takes 32-bit operands, and the cntlzd option is only available on 64-bit hardware. - * src/longlong.h: Add an _LP64 check around the PPC64 code, so that this falls back to the C implementations. * NEWS: Mention the fix. @@ -5014,7 +7483,6 @@ reading of the full df --output is easier when the block statistic fields come just left of the last field, the mount point. - * src/df.c (all_args_string): Move the inodes fields before the block fields. (usage): Likewise. @@ -5039,12 +7507,10 @@ nl: remove deprecated --page-increment option The above option has been deprecated since coreutils-7.5 by commit v7.4-129-g718b279. - * src/nl.c (PAGE_INCREMENT_OPTION_DEPRECATED): Remove enum. (longopts): Remove "page-increment" entry. (main): Remove PAGE_INCREMENT_OPTION_DEPRECATED case. * NEWS (Changes in behavior): Mention the change. - Reported by Marcel Böhme in <http://bugs.gnu.org/12940>. 2012-11-19 Bernhard Voelker <mail@bernhard-voelker.de> @@ -5060,13 +7526,11 @@ cut: do not accept the invalid range 0- The command "echo 12345 | cut -b 0-" prints an empty line while it should fail with "fields and positions are numbered from 1". - * src/cut.c (set_fields): Add a diagnostic for the invalid open range which starts with Zero, i.e., the range 0-. * tests/misc/cut.pl: Add tests to ensure the range 0- fails for fields (-f) and for positions (-b, -c). * NEWS: Mention the fix. - Reported by Marcel Böhme in <http://bugs.gnu.org/12903>. 2012-11-18 Daniel Schepler <dschepler@gmail.com> @@ -5162,15 +7626,12 @@ tests: fix factor's tests to use coreutil's own sha1sum The test used the shasum utility which seems to belong to the perl package. On SLES-10.4, perl doesn't include this yet: - + seq 0 10000000 + factor + shasum -c --status exp ./tests/factor/t00.sh: line 30: shasum: command not found + Exit 1 - It is better to use our own stuff anyway. - * tests/factor/run.sh: s/shasum/sha1sum/. Additionally, add sha1sum to the print_ver_ call. @@ -5178,12 +7639,9 @@ doc: chcon: add descriptions for three undocumented options These were missed in this related change v8.14-104-g44e20cd - * src/chcon.c (usage): Mention the two --preserve-root options. * doc/coreutils.texi (chcon invocation): Plus the --dereferece option. -2012-11-09 Benno Schulenberg <bensberg@justemail.net> - doc: with cp -n, option -f is not redundant but ignored * src/cp.c (usage): Replace "redundant" with "ignored". * doc/coreutils.texi (cp invocation): Likewise. @@ -5213,19 +7671,14 @@ (Changes in behvaior): Mention the new placeholder for fields in the "total" line. -2012-11-08 Bernhard Voelker <mail@bernhard-voelker.de> - df: add --output to select which fields to display This supports changing the order of the fields displayed, and also allows the simultaneous display of inode and block fields. - src/df.c (get_dev): Factor out calling get_header to ... (main): ... here. Call print_table only if file_systems_processed. - src/df.c (Displayable fields): Rename DEV_FIELD to SOURCE_FIELD. Rename TYPE_FIELD to FSTYPE_FIELD. Rename FREE_FIELD to AVAIL_FIELD. Rename MNT_FIELD to TARGET_FIELD. - * src/df.c (display_field_t): Turn loose enum definition of the displayable fields into a typedef. Add the inode fields ITOTAL_FIELD, IUSED_FIELD, IAVAIL_FIELD, IPCENT_FIELD. @@ -5263,24 +7716,19 @@ columns store along with the new width. (main): Use new get_field_list function to fill the list of output columns. - * src/df.c (print_table): Instead of fputs()ing directly, apply ambsalign on the last field, too. Use the new MBA_NO_RIGHT_PAD flag for this. - * src/df.c (TOTAL_OPTION): Add new enum value. (long_options): Use it for the "total" option instead of 'c'. (main): Likewise. - * src/df.c (get_dev): Remove condition to copy the fstype into the FSTYPE_FIELD - based on whether print_type is non-Null. Since the introduction of get_field_list(), there are only fields added to the columns array which have to be added. - * src/df.c (get_dev): Guard the summing up of the values for the grand total: only do it if we have to print the total and if the current invocation is not for processing it. - * src/df.c (main): Pass a hyphen "-" for the mount point name to get_dev. (get_dev): As the mount_point is now always there, @@ -5293,7 +7741,6 @@ * tests/df/total-verify.sh: Accommodate to the new "-" in the target field of the summary line. * NEWS: Mention the change in behavior. - * src/df.c (field_type_t): Add new typedef of 3 enums to distinguish between block, inode and other fields. (field_data_t): Add field_type member of the above new type. @@ -5329,27 +7776,21 @@ IAVAIL_FIELD and PCENT_FIELD/IPCENT_FIELD to use the field values where 'v' is pointing to, i.e., either the block_values or the inode_values. - * src/df.c (main): Remove setting of grand_fsu.fsu_blocks in the inode_format case as this is no longer needed and would lead to wrong results once when mixed block/inode fields will be used. - * src/df.c (main): Cleanup the code at the end regarding file_systems_processed to make the code clearer. - * src/df.c (inode_format): Remove variable. (main): Remove initialization of the above variable. In getopts loop, directly set the header_mode to INODES_MODE instead of using the above variable. Afterwards, remove the mapping to INODES_MODE as it is already set. - * src/df.c (posix_format): Move variable ... (main): ... to here. - * src/df.c (print_table): Enhance the comment about 2-line format in cases where the SOURCE_FIELD exceeds 20 chars, as such behavior has been removed long ago by commit v8.10-40-g99679ff. - * src/df.c (Display modes): Add OUTPUT_MODE, remove unused NMODES. (display_field_t): Remove unnecessary NFIELDS. (field_data_t): Add member 'arg' for the field name in the --output @@ -5380,13 +7821,11 @@ above and eventually passing the optarg to decode_output_arg. After the getopt_long loop, consider the OUTPUT_MODE case in order not to run into -h or -P mode. - * src/df.c (get_dev): Also xstrdup the dev_name, and free it afterwards to silence a valgrind warning about definitely lost memory. (main): Free the columns store to silence valgrind, guarded by the IF_LINT macro. - * src/df.c (main): Pass "total" as the mount point to get_dev if the SOURCE_FIELD is not among the columns to output. * tests/df/df-output.sh: Change the test to ensure the content of @@ -5396,11 +7835,9 @@ * NEWS (Changes in behavior): Enhance the exiting NEWS entry. * doc/coreutils.texi (df invocation): Document the content of the source and target field in the grand total line. - * src/df.c (main): Add another condition to the need_fs_type parameter of read_file_system_list whether the FSTYPE_FIELD is used or not. - * src/df.c (get_header): Indicate the block size used, in the "size" header, when using --output without -h. * tests/df/df-output.sh: Adjust for, and add an extra test for, @@ -5419,7 +7856,6 @@ amount of time, to not return a specific timeout exit status (124), and instead let the command handle the timeout signal and return a status for the work done so far. - * doc/coreutils.texi (timeout invocation): Describe the new option. * src/timeout.c (preserve_status): A new global boolean to enable the --preserve-status behavior. @@ -5442,19 +7878,14 @@ GCC CPU options. Reported by John David Anglin -2012-11-04 Pádraig Brady <P@draigBrady.com> - build: don't assume uintmax_t is 64 bits This was not seen to be an issue in practise, but to make the code more robust, don't assume uintmax_t is 64 bits. - * src/factor.c (W_TYPE_SIZE): Define based on integer limits. * src/make-prime-list.c (output_primes): Define format width based on integer limits. -2012-11-04 Pádraig Brady <P@draigBrady.com> - build: don't rely on support for '%j' printf format * src/factor.c (print_uintmaxes): Replace with PRIuMAX. * src/join.c (check_order): Likewise. @@ -5474,7 +7905,6 @@ sed: -e expression #1, char 2: extra characters after command Use "one" instead of "el". Bug introduced in v8.19-111-g51a4b04. - * init.cfg (setuidgid_has_perm_): s/ls/1s/. * NEWS (Build-related): Mention the fix. @@ -5484,7 +7914,6 @@ Besides what the subject says, this commit moves the test data for the factor tests from tests/local.mk into the directory tests/factor/ where it belongs. - * tests/local.mk (EXTRA_DIST): Add new tests/factor/create-test.sh. (p,q,t1,t2) Factor out the factor-related magic numbers. (factor_tests): Rename the test names to t{00..36}.sh. Factor out @@ -5506,7 +7935,6 @@ * cfg.mk (sc_tests_list_consistency): Exempt the new test. (exclude_file_name_regexp--sc_prohibit_test_backticks): Likewise. - Improved-by: Stefano Lattarini Improved by: Jim Meyering @@ -5519,22 +7947,16 @@ program 'src/foo'. That was done to accommodate systems without perl, which cannot run help2man to regenerate the manpage after its corresponding program has been built. - This seems a right and proper graceful degradation, in that the man pages dependencies are still 100% correct in a git checkout, while being more lax but "more portable" in a distribution tarball. Alas, that is not the case in practice, as it turns out the tweaked Makefile makes the building of man pages unreliable and potentially incorrect! - In fact, assume that instead of the correct a dependency: - man/ls.1: src/ls - we have the laxer one: - man/ls.1: src/ls.c - and think of what happens if a user modifies, say, 'src/ls.c', and then runs "make -j4" to rebuild everything. The make process will see that it has to rebuild the man page 'man/ls.1' (because its prerequisite @@ -5546,16 +7968,13 @@ out-of-date content. And what's even worse in all of this is that this problem will be present also for users who have perl installed: this is not a "graceful degradation" at all! - In our situation, the best and simplest way to implement a graceful degradation it to keep the correct dependencies for man pages (that is, "man/ls.1: src/ls"), and if perl is not present, just generate dummy man pages reporting that built-time issue and redirecting the user back to either the info documentation or the '--help' output. - As a consequence of this change, we also stop distributing man pages, since they will now be generated unconditionally. - * Makefile.am (do-not-require-help2man): Remove. (dist-hook): Don't depend on it. * man/local.mk: Remove an obsolete comment. @@ -5618,7 +8037,6 @@ When _FORTIFY_SOURCE is defined by the compiler or via flags, as it is on Gentoo, do not override it. Otherwise we get many redefinition warnings. - * configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined. This addresses http://bugs.gnu.org/12714 @@ -5704,7 +8122,6 @@ on integer overflow. While fixing that it was noticed that correct input validation wasn't done in all cases when falling back to the GMP code. - * src/factor.c (print_factors) Fallback to GMP on overflow. (strto2uintmax): Scan the string for invalid characters, so that case can be detected independently of overflow. @@ -5720,7 +8137,6 @@ The new factor code introduced usage of mpz_inits() and mpz_clears(), which are only available since GMP >= 5, and will result in a compile error when missing. - * m4/gmp.m4 (cu_GMP): Define HAVE_DECL_MPZ_INITS appropriately. * src/factor (mpz_inits): New function, defined where missing. (mpz_clears): Likewise. @@ -5754,8 +8170,6 @@ over 8 seconds to 5.75s. Run this command: seq $((10**7)) | env time factor > /dev/null -2012-10-04 Jim Meyering <meyering@redhat.com> - factor: merge with preexisting factor; integrate tests; avoid warnings * src/factor.c: Renamed from factor-ng.c, with the following changes: Adjust copyright header to be consistent with others. @@ -5782,14 +8196,11 @@ (noinst_HEADERS): Add longlong.h. Remove all wheel-related rules and files. * src/wheel-gen.pl: Remove file. - maint: mark set-but-not-used variables with ATTRIBUTE_UNUSED * src/factor-ng.c (redcify, prime_p, isqrt2): Mark them, so we don't have to disable -Wunused-but-set-variable. - maint: use __builtin_expect only if __GNUC__ * src/factor-ng.c (LIKELY, UNLIKELY) [__GNUC__]: Add #ifdef guard. - build: avoid warning about unused macro * src/factor-ng.c (__GMP_DECLSPEC): Don't define here * src/longlong.h (__GMP_DECLSPEC): Define if not already defined. @@ -5911,7 +8322,6 @@ of disabling core dumps using setrlimit() on Linux kernels. This new version instead uses prctl() where available to more reliably disable core dumps for the timeout process. - * m4/jm-macros.m4: Define HAVE_SETRLIMIT and HAVE_PRCTL. * src/timeout.c (disable_core_dumps): A new function that disables coredumps using prctl or setrlimit if available. @@ -5989,10 +8399,8 @@ and documentation for N was added again in v8.17-26-g4f2e9d5 without noticing that. Now, finally remove the word BLOCKS from the documentation. - * src/dd.c (usage): Remove the word BLOCKS. * doc/coreutils.texi (dd invocation): Likewise. - Improved by: Bernhard Voelker <mail@bernhard-voelker.de> 2012-09-18 Jim Meyering <meyering@redhat.com> @@ -6009,7 +8417,6 @@ are set to no coloring in LS_COLORS, then the symlinks would get no color rather than reverting to the standard symlink color. The issue was introduced in v8.13-19-g84457c4 - * src/ls.c (print_color_indicator): Use the standard method to check if coloring is specified for orphaned symlinks. The existing method would consider 'or=00' or 'or=0' as significant @@ -6057,33 +8464,25 @@ * gl/build-aux/prefix-gnulib-mk (prefix_assignment): Exempt the RHS of a "GPERF = ..." assignment from lib/ prefixing. -2012-09-14 Jim Meyering <meyering@redhat.com> - seq: 70x faster for non-negative whole numbers and incr==1 Handle non-negative whole numbers robustly and efficiently when the increment is 1 and when no format-changing option is specified. On the correctness front, for very large numbers, seq now works fine: - $ b=1000000000000000000000000000 $ src/seq ${b}09 ${b}11 100000000000000000000000000009 100000000000000000000000000010 100000000000000000000000000011 - while the old one would infloop, printing garbage: - $ seq ${b}09 ${b}11 | head -2 99999999999999999997315645440 99999999999999999997315645440 - The new code is much more efficient, too: Old vs new: 55.81s vs 0.82s - $ env time --f=%e seq $((10**8)) > /dev/null 55.81 $ env time --f=%e src/seq $((10**8)) > /dev/null 0.82 - * seq.c (incr): New function, inspired by the one in cat.c. (cmp, seq_fast): New functions, inspired by code in nt-factor by Torbjörn Granlund and Niels Möller. @@ -6094,12 +8493,9 @@ * NEWS (Bug fixes): Mention the correctness fix. (Improvements): Mention the speed-up. * tests/misc/seq.pl: Exercise the new code. - Improved by: Bernhard Voelker. http://thread.gmane.org/gmane.comp.gnu.coreutils.general/3340 -2012-09-14 Jim Meyering <meyering@redhat.com> - tests: reenable "make -C tests ..." commands The README-documented way to run individual tests was invalidated by the conversion of tests/ to non-recursive make. Add a GNUmakefile @@ -6139,26 +8535,19 @@ Initialize here, so we can append to them from each included local.mk (SUBDIRS): Remove "lib". -2012-09-11 Jim Meyering <meyering@redhat.com> - build: handle @ALLOCA@-vs-non-recursive make problems Here is a good reason to avoid alloca with non-recursive make. These: - $ grep @ALLOCA lib/gnulib.mk lib_libcoreutils_a_LIBADD += lib/@ALLOCA@ lib_libcoreutils_a_DEPENDENCIES += lib/@ALLOCA@ - would lead to this, when @ALLOCA@ expands to the empty string, which is essentially "always", now: - $ grep ' lib/$' Makefile lib_libcoreutils_a_LIBADD = $(gl_LIBOBJS) lib/ lib_libcoreutils_a_DEPENDENCIES = $(gl_LIBOBJS) lib/ - Tell the prefix-adding script not to add a prefix when the word it's prefixing is "@ALLOCA@". That is fine for most cases, but what about when the expansion of @ALLOCA@ is nonempty? - * build-aux/prefix-gnulib-mk (prefix_word): Exclude @ALLOCA@. * gl/m4/non-recursive-gnulib-prefix-hack.m4: Prefix non-empty $ALLOCA with "lib/". FIXME: I'm not sure this is required, @@ -6168,8 +8557,6 @@ would complain of failure to find aclocal.c, due to the use of AC_LIBSOURCES(alloca.c). -2012-09-11 Jim Meyering <meyering@redhat.com> - build: new module to convert lib/ to non-recursive make * gl/modules/non-recursive-gnulib-prefix-hack: New module. * gl/m4/non-recursive-gnulib-prefix-hack.m4: @@ -6278,23 +8665,18 @@ a now-obsolete version of GMP that did not pass proper arguments to the mpz_probab_prime_p function. It makes that code perform no more than 3 Miller-Rabin tests only, which is not sufficient. - A Miller-Rabin test will detect composites with at least a probability of 3/4. For a uniform random composite, the probability will actually be much higher. - Or put another way, of the N-3 possible Miller-Rabin tests for checking the composite N, there is no number N for which more than (N-3)/4 of the tests will fail to detect the number as a composite. For most numbers N the number of "false witnesses" will be much, much lower. - Problem numbers are of the form N=pq, p,q prime and (p-1)/(q-1) = s, where s is a small integer. (There are other problem forms too, involving 3 or more prime factors.) When s = 2, we get the 3/4 factor. - It is easy to find numbers of that form that cause coreutils' factor to fail: - 465658903 2242724851 6635692801 @@ -6309,11 +8691,9 @@ 114654168091 117225546301 ... - There are 9008992 composites of the form with s=2 below 2^64. With 3 Miller-Rabin tests, one would expect about 9008992/64 = 140766 to be invalidly recognized as primes in that range. - * src/factor.c (MR_REPS): Define to 25. (factor_using_pollard_rho): Use MR_REPS, not 3. (print_factors_multi): Likewise. @@ -6335,7 +8715,6 @@ environment, such that enabling gcc warnings by default will be useful. Tarballs still default to no warnings, and the defaults can still be overridden with --disable-gcc-warnings. - * configure.ac (gl_gcc_warnings): Set default based on environment. Suggested by Bernhard Voelker. @@ -6406,17 +8785,12 @@ * cfg.mk (exclude_file_name_regexp--sc_prohibit_test_backticks): Exempt 'tests/local.mk' rather than 'tests/Makefile.am'. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: vc_exe_in_TESTS should actually be a syntax check Because it requires the presence of the '.git' directory, that is, can be run only for maintainers working from checked-out sources. - * tests/local.mk (vc_exe_in_TESTS): Rename and move ... * cfg.mk (sc_tests_list_consistency): ... here, with minor adjustments. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - build: remove two now-useless convenience targets * src/local.mk (built_programs.list, all_programs.list): These. @@ -6441,11 +8815,8 @@ * tests/Coreutils.pm: Adjust similarly. * tests/pr/pr-tests.pl ($pfx): Likewise. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: list of names of built programs available in the Makefiles This is just a preparatory refactoring in view of future changes. - * configure.ac (AC_SUBST): New 'built_programs'. * tests/Makefile.am (AM_TESTS_ENVIRONMENT): Simply define the exported variable 'built_programs' to the expansion of the '$(built_programs)' @@ -6453,8 +8824,6 @@ (.built-programs): Remove this now-unneeded convenience target. (CLEANFILES, check_DATA): Delete, no longer needed. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: remove anachronistic syntax-check * cfg.mk (sc_no_exec_perl_coreutils): This. Our new testsuite layout (perl tests having '.pl' suffix, shell tests having '.sh' @@ -6464,13 +8833,10 @@ maint: remove duplicated declaration of the 'sc_check-AUTHORS' target * cfg.mk: Here. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: remove the unused 'root-hint' target * tests/Makefile.am (root-hint): Here. The interested user can see the reasons why some tests are skipped by looking at the messages they display on the console; here's an excerpt: - ... PASS: misc/id-groups.sh id-setgid.sh: skipped test: must be run as root @@ -6481,14 +8847,12 @@ 2g.sh: skipped test: very expensive: disabled by default SKIP: du/2g.sh ... - Clear enough, and more specific and precise that a generic "some tests might need to be run as root" message. And if that user is interested in making those tests run anyway, he'll just take a look to the README files to look for info. So there's no reason to pollute the stdout with another "hint" that is subsumed by those messages, and that might go unnoticed anyway. - Moreover, and possibly more importantly, that hint wasn't being displayed anyway, even before this change! That's because the 'root-hint' target was listed as prerequisite for the 'check-recursive' @@ -6496,8 +8860,6 @@ 'tests/Makefile.am', because that file contains no $(SUBDIRS) definition. -2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: use suffix, not exec-bit, to tell which files are tests * tests/Makefile.am (vc_exe_in_TESTS): Adjust to look, in the 'tests/' subdirectory, for files that have one of the extensions listed in @@ -6646,27 +9008,20 @@ Also call AM_SUBST_NOTMAKE on 'EXTRA_MANS', for consistency. * man/local.mk (man1_MANS): Simply define to '@man1_MANS@'. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: rename dist_man1_MANS -> man1_MANS And list $(man1_MANS) directly in $(EXTRA_DIST) instead. This is similar to what is done for $(EXTRA_MANS), thus improving consistency and readability. - * man/local.mk (dist_man1_MANS): Rename ... (man1_MANS): ... like this. (EXTRA_DIST): Add its contents. * cfg.mk (check-x-vs-1): Fix a botched comment. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: one less unneeded make variable * man/local.mk (man_aux): This was used only once, so inline its expansion at its sole point of use ... (EXTRA_DIST): ... here. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: simplify and make more portable to non-GNU make The AC_SUBST'd variable '$(NO_INSTALL_PROGS_DEFAULT)' is only used in makefile expressions expanding the list of manual pages that are not @@ -6677,10 +9032,8 @@ lesser vendor make implementations. So kill two birds with one stone, by getting rid of the $(NO_INSTALL_PROGS_DEFAULT) intermediate variable and improving makefile portability in the process. - While at it, we also clean up some other minor naming inconsistency and useless indirection. - * configure.ac (NO_INSTALL_PROGS_DEFAULT): Don't define or AC_SUBST anymore; instead ... (EXTRA_MANS): ... define and AC_SUBST these. @@ -6693,14 +9046,11 @@ * cfg.mk (check-x-vs-1, sc_option_desc_uppercase): Rely on $(ALL_MANS) rather than on $(NO_INSTALL_PROGS_DEFAULT) and $(dist_man1_MANS). -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: simplify: get rid of some indirection variables The code deciding which coreutils programs to build (depending on defaults, system capabilities, and user requests) is overly complex and rather confusing. Let's begin simplifying it by removing some non-strictly-necessary indirection variables. - * configure.ac: Adjust and improve few comments. (OPTIONAL_BIN_PROGS, OPTIONAL_PKGLIB_PROGS): Rename ... (bin_PROGRAMS, pkglibexec_PROGRAMS): ... like these, respectively. @@ -6710,8 +9060,6 @@ (bin_PROGRAMS, pkglibexec_PROGRAMS): Simply define to the corresponding '@substitution@'. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: update gitignore entries * src/.gitignore: Here, adding the '.dirstamp' file generated by the C compilation rules. @@ -6719,12 +9067,9 @@ maint: fix one stray reference to src/Makefile.am * build-aux/gen-lists-of-programs.sh: In heading comments here. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: fix and simplify maintainer checks Some of them can be simplified after the previous changes, some of them have been downright broken by them, and need fixing. - * src/local.mk: Adjust some comments. (EXTRA_DIST): Avoid SPACE-TAB sequences. (src/dircolors.h, src/fs.h src/fs-is-local.h): Avoid 8-SPACES @@ -6749,21 +9094,15 @@ 'sc_option_desc_uppercase': they are automatically declared phony by 'maint.mk', being recognized as syntax checks. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: remove unused target 'install-root' It was unneeded and broken since the removal of 'su' from GNU coreutils, in commit v8.17-16-g928dd73 of 2012-06-06, "su: remove program (util-linux is now the best source for it)". - * Makefile.am (install-root): Remove. (ALL_RECURSIVE_TARGETS): Update. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: improve remake rules for maintainers This is a follow up on today's commit v8.19-60-g4f2e62b". - * Makefile.am ($(top_srcdir)/m4/cu-progs.m4, $(srcdir)/src/cu-progs.mk): New, generate these files from the 'build-aux/gen-lists-of-programs.sh', the same way it's done @@ -6773,15 +9112,12 @@ here. Enhance those commands so to that the generated files are set read-only. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: fix generation of manpages for programs not built by default * src/local.mk (dist-hook): Don't use this to ensure all the programs, even the ones disabled by default or by the user, are built (doing so is required to ensure the distributed manpages are properly built). This would build those programs too late anyway, causing errors like: - $ make dist make dist-xz am__post_remove_distdir='@:' make[1]: Entering directory `~/src/coreutils' @@ -6790,15 +9126,12 @@ make[1]: *** [man/arch.1] Error 127 make[1]: Leaving directory `~/src/coreutils' make: *** [dist] Error 2 - Instead, ... * man/local.mk (extra_man_x, extra_man_1): define these ... ($(extra_man_1)): ... and make this depend on $(all_programs). (EXTRA_DIST): Adjust. Adjust some comments as well. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: don't use recursive make to build the 'src' subdirectory * Makefile.am (SUBDIRS): Remove 'src'. Ensure '.' is listed before 'tests' and 'gnulib-tests'. @@ -6823,16 +9156,12 @@ addition ... (all_programs): ... remove this now-unneeded convenience target. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - build: refactor how lists of coreutils programs are defined This is in preparation of future changes. Still, this patch leaves the build system in a better shape; true, with more indirections, but also with less convoluted and brittle hacks. - Unfortunately, this commit also makes some rebuild rules incomplete; that will son be fixed by follow-up patches. - * build-aux/gen-lists-of-programs.sh: New, generates autoconf and automake input fragments that define "lists" of all coreutils programs, with further distinctions about how and when these @@ -6857,11 +9186,8 @@ (EXTRA_DIST): Adjust definition. Adjust a comment. -2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: add our 'bootstrap_post_import_hook' function This is in preparation of future changes. - * bootstrap.conf (bootstrap_post_import_hook): New, will be executed by bootstrap after gnulib-tool but before the autotools. Move creation of dummy ChangeLog into it. @@ -6872,7 +9198,6 @@ Starting with glibc 2.15, the system headers refuse to compile unconditional use of FORTIFY_SOURCE if optimization is disabled but -Werror is in effect. - * configure.ac (FORTIFY_SOURCE): Make conditional. 2012-08-31 Jim Meyering <meyering@redhat.com> @@ -6887,18 +9212,13 @@ * bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently with the call to AM_GNU_GETTEXT_VERSION in configure.ac. -2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: get rid of obsolete script 'cvsu' It was useful only back when coreutils used CVS as its version control system. - * build-aux/cvsu: Delete. * Makefile.am (EXTRA_DIST): Remove it. * cfg.mk: Remove the two exemptions for this removed file. -2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com> - build: don't use '$<' in non-suffix rules * src/Makefile.am (fs-def): Here: it's not portable to some non-GNU make implementations. @@ -6910,34 +9230,25 @@ maint: remove unused variable in src/Makefile.am * src/Makefile.am (editpl): This. -2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com> - build: don't use foo_LDADD if there's no foo program For example, instead of factoring out the extra linker flags needed by 'cp', 'mv' ind 'install' into a '$(copy_LDADD)' variable, factor them out in a '$(copy_ldadd)' variable. - Partly a minor cleanup, partly a preparation for future changes. - * src/Makefile.am (copy_LDADD): Rename ... (copy_ldadd): ... like this. (remove_LDADD): Rename ... (remove_ldadd): ... like this. All uses adjusted. Some comments updated. -2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com> - build: some refactorings in cfg.mk Partly a minor cleanup, partly a preparation for future changes. - * Makefile.am (all_programs): Rename ... (all-progs-but-lbracket): ... like this, and re-define it to expand at make time rather than only at recipe time (i.e., using $(shell ...) instead of `...`). (check-programs-vs-x): Adjust. -2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com> - build: move definition of 'all_programs' in cfg.mk * Makefile.am: Move definition of target 'all_programs' from here ... * cfg.mk: ... to here, which is the only file where it is used. @@ -6982,7 +9293,6 @@ tests: get rid of the 'shell-or-perl' auxiliary script It's now easier and faster to simply run the perl ans shell test scripts directly with the appropriate interpreter and options. - * tests/shell-or-perl: Delete. * tests/Makefile.am (EXTRA_DIST): Remove it. (SH_LOG_COMPILER): Re-define to invoke the correct shell. @@ -6993,21 +9303,16 @@ their expansion. (LOG_COMPILER): Delete, no longer needed. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: add .sh and .pl suffixes to shell and perl tests, respectively Not only this shrinks the size of the generated Makefile (from > 6300 lines to ~3000), but will allow further simplifications in future changes. - * tests/Makefile.am (TEST_EXTENSIONS): Add '.sh' and '.pl'. (PL_LOG_COMPILER, SH_LOG_COMPILER): New, still defined simply to $(LOG_COMPILER) for the time being. (TESTS, root_tests): Adjust as described. * All tests: Rename as described. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: detect missing perl at configure runtime * configure.ac (AM_CONDITIONAL): Set the conditional 'HAVE_PERL' to true if the configure-time checks (as run by gl_PERL) have been able @@ -7039,37 +9344,26 @@ * configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.2. * bootstrap.conf ($buildreq): Likewise. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: prefer AM_TESTS_ENVIRONMENT over TESTS_ENVIRONMENT The latter should be reserved for user overrides. - * tests/Makefile.am (TESTS_ENVIRONMENT): Rename ... (AM_TESTS_ENVIRONMENT): ... like this. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: merge tests/check.mk into tests/Makefile.am The separation has become unnecessary after all the ancient 'tests/*/Makefile.am' makefiles have been merged into the "more-top-level" one 'tests/Makefile.am'. - * tests/check.mk: Merge ... * tests/Makefile.am: ... in here. Some comments tweaking while at it. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: enable the 'subdir-objects' Automake option globally This is not strictly required now (it will be once we make more parts of the coreutils build system non-recursive), but enabling it early helps to ensure that we don't unwittingly introduce any incompatibility or subtle breakage later. - * configure.ac (AM_INIT_AUTOMAKE): Add 'subdir-objects'. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: update gitignore entries * doc/.gitinore: Here, adding the '.dirstamp' file generated by the Texinfo rules. @@ -7080,7 +9374,6 @@ We may well want to switch from checking all *.texi to checking only version-controlled .texi files, so encapsulate this concept in one place. - * doc/local.mk (doc_srcdir): Delete. Use this instead: (texi_files): Define. All usages adjusted. @@ -7096,19 +9389,14 @@ $(dist_man1_MANS) entries before comparing them with the list of expected programs. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - maint: move man-related syntax checks in cfg.mk This is more natural, now that the top-level Makefile has access to all the variables and rules once defined only in 'man/Makefile.am' - * man/local.mk (all_programs, sc_option_desc_uppercase, sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move from here ... * cfg.mk: ... to here. Adjust some comments in the process. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: don't use recursive make to build the 'man' subdirectory * Makefile.am: Include 'man/local.mk'. (SUBDIRS): Remove 'man'. @@ -7128,43 +9416,31 @@ have made these recipes instable and not completely correct, but that will be fixed in later changes. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: rework some recipes in man/Makefile.am, for future changes This change is merely required to make future changes easier. - In particular, since we are going to merge the contents of 'man/Makefile.am' into the top-level Makefile, we need to avoid conflicts with the rules and variables in 'dist-check.mk', and to prepare for changes in the value of the '$*' variable as used in the recipe of the '.x -> .1' suffix rule. - * man/Makefile.am (t, mapped_name): Delete, inlining their use ... (.1.x): ... in the recipe of this suffix rule. Other adjustments to prepare to changes in the value of the '$*' automatic variable. While at it, made more resilient about unlikely but possible failure. Adjust and reorder few comments. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: provide convenience target 'all_programs' also at top-level This will be mostly useful in future changes. - * Makefile.am (all_programs): New, simply work by delegating to the same-named target in the 'src/' subdirectory. * cfg.mk (sc_option_desc_uppercase): Take advantage of it. (sc_man_file_correlation): Likewise. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: make a rule less dependent on exact source tree layout This is mostly a preparatory change in view of future ones. - * man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access the 'src' directory. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: rely on VPATH capabilities in man/Makefile * man/Makefile.am: In all the 'foo.1' targets, no need to depend explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care @@ -7173,17 +9449,12 @@ maint: typofix: s/it's/its/ * man/Makefile.am: Here. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: rename common_dep -> mandep in man/Makefile This is mostly a preparatory refactoring in view of future changes. - * man/Makefile.am (common_dep): Rename ... (mandep): ... like this. All usages adjusted. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: fix a stray usage of uninitialized $(ME) * man/Makefile.am (sc_option_desc_uppercase): Here. @@ -7225,18 +9496,13 @@ did so for an implementation detail rather than a documented behaviour, so relying on that was riskier a "unclean". -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc Makefile This is just a preparatory refactoring that will become useful in a future change (in which the doc/Makefile.am makefile will be merged with the top-level one). - * doc/Makefile.am (doc_srcdir): New, define to '$(top_srcdir)/doc'. Use it throughout instead of "bare" '$(srcdir)'. -2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com> - build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DIST * doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ... (EXTRA_DIST): ... listing them here. This ensures the rebuild rules @@ -7264,7 +9530,6 @@ tests: remove useless defn of REPLACE_GETCWD from TESTS_ENVIRONMENT It's last use had been removed in commit v8.12-3-g3ed91fc of 2011-04-28, "tests: remove useless test: misc/pwd-unreadable-parent". - * tests/check.mk (TESTS_ENVIRONMENT): Adjust. 2012-08-30 Nick Alcock <nick.alcock@oracle.com> @@ -7308,7 +9573,6 @@ md5sum, sha*sum: add --tag to output a format indicating the algorithm The format used is the BSD traditional format which looks like: MD5 (/dev/null) = d41d8cd98f00b204e9800998ecf8427e - * NEWS: Add new feature info. * doc/coreutils.texi (md5sum invocation): Add detailed information about the new --tag option. @@ -7340,7 +9604,6 @@ test. Some tests have been derived from others, while the argument(s) to print_ver_ have not been adapted. Add a new cfg.mk rule to prohibit this. - * cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument): New rule, to prohibit a test script from calling print_env_ for a program not actually used by that test. @@ -7359,7 +9622,6 @@ However, such cycles are relatively common, and can be detected efficiently, so now du emits a descriptive warning and arranges to exit nonzero. - * NEWS (Bug fixes): Mention it. * src/du.c: Include "mountlist.h". (di_mnt): New global set. @@ -7374,7 +9636,6 @@ This implements the proposal in http://bugs.gnu.org/11844. Originally reported in http://bugs.debian.org/563254 by Alan Jenkins and more recently as http://bugzilla.redhat.com/836557 - Improved by: Jim Meyering 2012-08-20 Jim Meyering <meyering@redhat.com> @@ -7437,7 +9698,6 @@ match the very next line, but if that next line were also the first in a series of identical, not-yet-printed lines, then the corrupted "saved" line value would result in the omission of all matching lines. - * src/sort.c (saved_line): New static/global, renamed and moved from... (write_unique): ...here. Old name was "saved", which was too generic for its new role as file-scoped global. @@ -7473,10 +9733,8 @@ Add new option to rm (-d/--dir), which allows removal of empty directories, while still safely disallowing removal of non-empty ones. - This improves compatibility with Mac OS X and BSD systems, which honor the -d option. - * src/remove.c (rm_fts): Remove empty directories when requested. * src/remove.h (rm_options) [remove_empty_directories]: New member. * src/rm.c (long_opts, usage, main): Update usage and option parsing. @@ -7540,22 +9798,17 @@ When the combination of the file system options with given files or devices does not lead to output, "df --total" would exit successfully although it should not. - Examples: $ df --total --type=xfs / # when / is not an XFS file system $ df --total --local -t nfs DIR # nfs is remote per se ... $ df --total -t qwerty /dev/sdb5 # typo in file system type - Furthermore, "df --total" would not print the error message "no file systems processed" when the file argument does not exist or is otherwise not accessible. - Example: $ df --total __not_exist__ - These 2 bugs are present since --total was added by commit v6.12-166-gea2887b. - * src/df.c (get_dev): Do not set file_systems_processed to true when force_fsu is true, i.e. when the row for the "total" line is processed. (main): Don't print totals unless we've processed a file system. @@ -7564,7 +9817,6 @@ * tests/df/total-unprocessed: Add a new test. * tests/Makefile.am: Reference the new test. * NEWS: Mention the fix. - Improved-by: Jim Meyering 2012-08-04 Jim Meyering <meyering@redhat.com> @@ -7578,24 +9830,18 @@ In addition, ignore failure to close that reference FD, since as long as the lseek succeeds, a close failure doesn't matter. Coverity spotted the potential FD leak. - Improved-by: Pádraig Brady. -2012-08-04 Jim Meyering <meyering@redhat.com> - tests: avoid FP ulimit failure with valgrind-wrapped tools * tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to 20MiB, to accommodate overhead of a valgrind-wrapped date program. Also declare this function's local variables "local". -2012-08-04 Jim Meyering <meyering@redhat.com> - split: plug nominal leaks * src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak. (main) [IF_LINT]: Free a usually-small (~70KB) buffer just before exit, mainly to take this off the radar of leak-detecting tools. - Improved-by: Pádraig Brady. 2012-08-03 Jim Meyering <meyering@redhat.com> @@ -7610,7 +9856,6 @@ We carry local adjustments for a few gnulib modules via the patches in gl/. Nearly all of those patches had become stale due to evolution of the originals in gnulib. - To refresh them, first make sure you have no local changes in gl/ or in the gnulib submodule, then run "make refresh-gnulib-patches". @@ -7628,12 +9873,10 @@ tests: add a test for a previously fixed output format bug in join Add a test and NEWS entry for a bug inadvertently fixed in a refactoring in commit v8.9-32-gd4db0cb - * tests/misc/join (v2-format): Add a new test. * THANKS.in: Add the reporter. * NEWS: Mention the old bug. * cfg.mk (old_NEWS_hash): Update. - Reported-by: Jean-Pierre Tosoni 2012-07-22 Pádraig Brady <P@draigBrady.com> @@ -7687,18 +9930,14 @@ maint: move two df tests from tests/misc to tests/df * test/Makefile.am: Reference the moved tests. -2012-07-16 Pádraig Brady <P@draigBrady.com> - df: don't output control characters in a mount point name It's awkward to read and problematic for scripts when control characters like '\n' are output. - Note other fields are already handled with mbsalign, which converts non printable chars to the replacement char. A caveat to note with that, is the replacement char takes a place in the field and so possibly truncates the field if it was the widest field in the records. - Note a more general replacement function, that handles all printable, or non white space characters, would require more sophisticated support for various @@ -7706,14 +9945,12 @@ deemed beneficial enough at present. Perhaps in future a more general replacement function could be shared between the various utilities. - Note <space> is unaffected in any field, which could impact scripts processing the output. However any of the number fields at least could have spaces considering `LANG=fr_FR df -B\'1`, so it's probably best to leave spaces, which also allows scripts to handle mount points with spaces without change. - * src/df.c (hide_problematic_chars): Replace control chars with '?'. * tests/df/problematic-chars: Add a new root only test. * tests/Makefile.am: Reference the new test. @@ -7760,13 +9997,11 @@ doc: fix errors and warnings with Texinfo 5 Or rather, with the development version 4.13.90, which will eventually become Texinfo 5.0. - * doc/coreutils.texi: Use '@item' instead of '@itemx' in several places, as Texinfo 5 refuses to process an '@itemx' that is not preceded by an '@item'. Ensure that node extended names in menus and sectioning are consistent, and that ordering and presence of nodes in menus and in the actual text are consistent as well. - Fixes http://bugs.gnu.org/11828 2012-07-11 Bernhard Voelker <mail@bernhard-voelker.de> @@ -7859,11 +10094,8 @@ * tests/misc/sort-exit-early: A new test to exercise the improvements. * tests/Makefile.am: Reference the new test. * NEWS: Mention the improvement. - Suggested-by: Bernhard Voelker -2012-07-02 Pádraig Brady <P@draigBrady.com> - maint: sc_prohibit_fail_0: update a stale comment * cfg.mk (sc_prohibit_fail_0): Following on from commit v8.0-79-g71c2f88, update the comment to match. @@ -7887,13 +10119,10 @@ (Bug fixes): Mention it for tail -f. Reported by Michael Mol in http://bugs.gnu.org/11823 -2012-06-30 Jim Meyering <meyering@redhat.com> - doc: improve sample backup script * doc/coreutils.texi (cp invocation): Make the backup script exit with an accurate reflection of any failure. Also, add --preserve=all. - Improved-by: Bernhard Voelker 2012-06-26 Pádraig Brady <P@draigBrady.com> @@ -7903,14 +10132,11 @@ that there is a use-after-free bug in free_buffer() at the line "struct line *n = l->next", if that function is called multiple times. - This is not a runtime issue since a list of lines will not be present in the !lines_found case. - * src/csplit.c (free_buffer): Set list head to NULL so that this function can be called multiple times. (load_buffer): Remove a redundant call to free_buffer(). - Reported-by: Xu Zhongxing 2012-06-22 Bernhard Voelker <mail@bernhard-voelker.de> @@ -7927,12 +10153,9 @@ * tests/split/guard-input: New test case. * tests/Makefile.am: Reference new test case. * NEWS: Mention the fix. - Improved-by: Jim Meyering Reported-by: François Pinard -2012-06-22 Pádraig Brady <P@draigBrady.com> - maint: refactor common mode bits used to create files * src/system.h (MODE_RW_UGO): The new refactored define (666). * src/mkfifo.c: Use the new define. @@ -7941,11 +10164,8 @@ * src/system.h: Likewise. * src/touch.c: Likewise. * src/truncate.c: Likewise. - Suggested-by: Jim Meyering -2012-06-22 Pádraig Brady <P@draigBrady.com> - maint: suppress echoing of sc_THANKS_in_duplicates implementation * cfg.mk (sc_THANKS_in_duplicates): Suppress the echoing of these commands run during `make syntax-check` @@ -8014,8 +10234,6 @@ * src/head.c (elide_tail_lines_seekable): Mark new diagnostic. I will look at the results of "make syntax-check", I will look... -2012-06-05 Jim Meyering <meyering@redhat.com> - head: with --lines=-N (-n-N) reset file pointer on seekable input * src/head.c (elide_tail_lines_seekable): Reset file pointer after printing up to an end-relative line-counted offset. @@ -8026,7 +10244,6 @@ match the value of BUFSIZ I see today on Fedora 17/x86_64 (unrelated to this fix). * NEWS (Bug fixes): Mention it. - Improved-by: Pádraig Brady 2012-06-01 Jim Meyering <meyering@redhat.com> @@ -8124,14 +10341,12 @@ member isn't available there. Note the change to not use statvfs() on GNU/Linux was introduced in gnulib commit eda39b8 16-08-2003. - * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for the f_frsize member in the statfs structure. * src/stat.c: Use (struct statfs).f_frsize if available. * NEWS (Bug fixes): Mention this stat fix, and the related df fix coming in the next gnulib update. * THANKS.in: Add Nikolaus. - Reported and Tested by Nikolaus Rath 2012-05-12 Jim Meyering <meyering@redhat.com> @@ -8241,7 +10456,6 @@ maint: fix common spelling errors These were identified using: https://github.com/lyda/misspell-check executed like: git ls-files | misspellings -f - - * src/cat.c: Correct a spelling error. * src/comm.c: Likewise. * src/expr.c: Likewise. @@ -8298,7 +10512,6 @@ cp,mv,install: provide POSIX_FADV_SEQUENTIAL hint to input This was inadvertently omitted from v8.5-104-g47076e3, and gives the same 5% speedup when copying from an SSD. - * src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint. 2012-05-02 Jim Meyering <meyering@redhat.com> @@ -8365,36 +10578,25 @@ * src/id.c (main): Factor out uses of "argc - optind". Move option-consistency checks to precede the potential getcon call. -2012-04-27 Jim Meyering <meyering@redhat.com> - id,groups: with no user name, print only real and/or effective IDs, ... i.e., don't use the getpw* functions. - Before this change, running groups or id with no user name argument would include a group name or ID from /etc/passwd. Thus, under unusual circumstances (default group is changed, but has not taken effect for a given session), those programs could print a name or ID that is neither real nor effective. - To demonstrate, run this: - echo 'for i in 1 2; do id -G; sleep 1.5; done' \ |su -s /bin/sh ftp - & sleep 1; perl -pi -e 's/^(ftp:x:\d+):(\d+)/$1:9876/' /etc/passwd - Those id -G commands printed the following: - 50 50 9876 - With this change, they print this: - 50 50 - Similarly, running those programs set-GID could make them print one ID too many. - * src/group-list.c (print_group_list): When username is NULL, pass egid, not getpwuid(ruid)->pw_gid), to xgetgroups, per the API requirements of xgetgroups callee, mgetgroups. @@ -8537,8 +10739,6 @@ * tests/misc/pwd-long: Likewise. * tests/misc/uniq: Likewise. -2012-04-04 Jim Meyering <meyering@redhat.com> - tests: convert nearly all `...` expressions to $(...) Exempt init.sh because it runs before we're assured to have a shell that groks $(...). Exempt *.mk because "$" would have to @@ -8546,17 +10746,14 @@ almost certainly evaluated before init.sh is run. Finally, also exempt the perl-based tests, because perl's `...` cannot be converted to $(...). Do that by running this command: - git grep -l '`.*`' tests \ | grep -Ev 'init\.sh|\.mk$' | xargs grep -Lw perl \ | xargs perl -pi -e 's/`(.*?)`/\$($1)/g' - One minor fix-up change was required after that, due to how quoting differs: diff --git a/tests/chmod/equals b/tests/chmod/equals - expected_perms=$(eval 'echo \$expected_'$dest) + expected_perms=$(eval 'echo $expected_'$dest) - Another was to make these required quoting adjustments: diff --git a/tests/misc/stty b/tests/misc/stty ... @@ -8567,10 +10764,8 @@ - rev2=$(eval echo "\\\$REV_$opt2") + rev1=$(eval echo "\$REV_$opt1") + rev2=$(eval echo "\$REV_$opt2") - Also, transform two files that were needlessly excluded above: (both use perl, but are mostly bourne shell) - perl -pi -e 's/`(.*?)`/\$($1)/g' \ tests/du/long-from-unreadable tests/init.cfg @@ -8645,7 +10840,6 @@ maint: avoid a doc syntax check failure Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/2315847 - * doc/coreutils.texi (ln invocation): s/path/file name/ 2012-03-22 Harald Hoyer <harald@redhat.com> @@ -8653,12 +10847,9 @@ ln: add the --relative option With the "--relative --symbolic" options, ln computes the relative symbolic link for the user. - So, ln works just as cp, but creates relative symbolic links instead of copying the file. - I miss this feature since the beginning of using ln. - $ tree ./ / `-- usr @@ -8666,12 +10857,9 @@ `-- lib `-- foo `-- foo - 4 directories, 1 file - $ ln -s -v --relative usr/lib/foo/foo usr/bin/foo ‘usr/bin/foo’ -> ‘../lib/foo/foo’ - $ tree ./ / `-- usr @@ -8680,12 +10868,9 @@ `-- lib `-- foo `-- foo - 4 directories, 2 files - $ ln -s -v --relative usr/bin/foo usr/lib/foo/link-to-foo ‘usr/lib/foo/link-to-foo’ -> ‘foo’ - $ tree ./ / `-- usr @@ -8695,9 +10880,7 @@ `-- foo |-- link-to-foo -> foo `-- foo - 4 directories, 3 files - * src/Makefile.am: Reference the relpath module. * src/ln.c (usage): Mention the new option. (do_link): Call the relative conversion if specified. @@ -8719,11 +10902,8 @@ * po/POTFILES.in: Likewise. * src/realpath.c: Adjust to the refactored relpath module. -2012-03-22 Pádraig Brady <P@draigBrady.com> - maint: ensure PATH_MAX is set correctly This reverts part of commit v8.12-103-g54cbe6e. - * src/system.h: Include gnulib's pathmax.h to honor system specific limits, and then we set PATH_MAX only if needed. Note pathmax.h no longer uses pathconf ("/", _PC_PATH_MAX). @@ -8757,7 +10937,6 @@ by omitting the framework for a posix check, this patch makes it so that the framework is omitted by default, while still giving instructions for maintainers to re-enable it. - It's been a while since we've used GNULIB_POSIXCHECK; see this email: https://lists.gnu.org/archive/html/coreutils/2012-03/msg00126.html Some of those failures are because we are intentionally avoiding @@ -8765,7 +10944,6 @@ like fprintf-posix), but until we work with gnulib to avoid particular warnings, wiring up an automatic GNULIB_POSIXCHECK to happen during 'make my-distcheck' is not feasible. - * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Conditionally define, according to whether $GNULIB_POSIXCHECK is in environment. @@ -8785,15 +10963,12 @@ doc: clarify current realpath --relative-base behavior For compatibility with MacOS relpath(1), as seen here: - http://opensource.apple.com/source/bootstrap_cmds/\ bootstrap_cmds-79/relpath.tproj/relpath.c - we implemented 'realpath --relative-base=dir1 --relative-to=dir2 file' in the same way as 'relpath -d dir1 dir2 file'. This can result in --relative-base rendering --relative-to as a no-op if dir1 is a child of dir2. Document this. - * doc/coreutils.texi (realpath invocation): Mention restriction. 2012-03-20 Pádraig Brady <P@draigBrady.com> @@ -8818,26 +10993,20 @@ realpath: optimize --relative-base usage There is no need to recompute for every path being visited whether the base is a prefix of the relative location. - * src/realpath.c (relpath): Hoist base check... (main): ...here. Based on a suggestion by Pádraig Brady. -2012-03-15 Eric Blake <eblake@redhat.com> - realpath: let --relative-to default to --relative-base Most of the time, if someone wants to filter which paths are relative while leaving all others absolute, they also want to to the filtering based on the same --relative-to directory. Make this easier to specify. - * src/realpath.c (main): Convert error to default. * doc/coreutils.texi (realpath invocation): Document this. * tests/misc/realpath: Adjust test to match. * NEWS: Document it. -2012-03-15 Eric Blake <eblake@redhat.com> - tests: cover more realpath scenarios 'realpath --relative-base --relative-to' is identical to --relative-base=--relative-to, so the test wasn't covering what @@ -8846,18 +11015,13 @@ exposes our design decision that --relative-base that is not a prefix of --relative-to is a no-op (if we later change behavior, we will also have to change that part of the test). - * tests/misc/realpath: Fix typo. Add some tests. -2012-03-15 Eric Blake <eblake@redhat.com> - realpath: fix problems with root handling When --relative-base is /, all other paths should be treated as relative (except for // where it matters). - Also, on platforms like Cygwin where / and // are distinct, realpath was incorrectly collapsing // into /. http://debbugs.gnu.org/10472. - * src/realpath.c (path_prefix, path_common_prefix): Treat / and // as having no common match. (relpath): Allow for no match even without --relative-base. @@ -8874,12 +11038,9 @@ if slashes separating the symlink from the rest of the name are elided (see http://austingroupbugs.net/view.php?id=541), as that is the only useful (and current) behavior on Cygwin. That is, - ln -s / root ls root/dev - must list the contents of /dev, not //dev. - * tests/misc/readlink-root: New test. * tests/Makefile.am (TESTS): Run it. @@ -8940,11 +11101,9 @@ Note that the problem arises only when processing a non-directory specified on the command line. Not surprisingly, "du -x" still works as expected for any directory argument. - When performing its same-file-system check, du may skip an entry only if it is at fts_level 1 or greater. Command-line arguments are at fts_level == 0 (FTS_ROOTLEVEL). - * src/du.c (process_file): Don't use the top-level FTS->fts_dev when testing for --one-file-system (-x). It happens to be valid for directories, but it is always 0 for a non-directory. @@ -8985,7 +11144,6 @@ tests: work around a block alignment issue in dd/sparse Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/2188210 (which uses XFS). - * tests/dd/sparse (alloc_equal): Add a block allocation comparison function that accounts for variations due to alignment. @@ -9014,9 +11172,7 @@ Notes: Small seeks are not coalesced to larger ones, like is done in cache_round() for example. - conv= is used rather then oflag= for FreeBSD compatibility. - * src/dd.c (final_op_was_seek): A new global boolean to flag whether the final "write" was converted to a seek. (usage): Describe the new conf=sparse option. @@ -9064,7 +11220,6 @@ split: add the --additional-suffix option Add the --additional-suffix option, to append an additional static suffix to output file names. - * src/split.c (next_file_name): Append suffix to output file names. (main): Handle new --additional-suffix option. * NEWS (New features): Mention it. @@ -9141,7 +11296,6 @@ split: support optional start value for --numeric-suffixes Allow changing the --numeric-suffixes start number from the default of 0. - * src/split.c (next_file_name): Initialize the suffix index and the output filename according to start value. (main): Check that the suffix length is large enough for the @@ -9169,7 +11323,6 @@ dd: fix issues in the count_bytes and seek_bytes flags change These edge cases were missed in the previous commit 140eca15c. - * src/dd.c (main): Include the bytes slop when truncating without further I/O. Don't invalidate the whole file cache in the case where 0 < count < ibs. @@ -9183,7 +11336,6 @@ dd now accepts the count_bytes and skip_bytes input flag and the seek_bytes output flag, to more easily allow processing portions of a file. - * src/dd.c (scanargs): Compute skip_records and skip_bytes when 'skip_bytes' iflag is used. Compute max_records and max_bytes when 'count_bytes' iflag is used. Compute seek_records and seek_bytes @@ -9285,16 +11437,11 @@ * test/misc/stdbuf: Fixup the minor copy & paste issue introduced in commit ff7f0ff8 -2012-01-25 Pádraig Brady <P@draigBrady.com> - realpath: avoid the use of printf This was seen to give an 11% performance improvement. - * src/realpath.c (relpath): Avoid using printf. (process_path): Likewise. -2012-01-25 Pádraig Brady <P@draigBrady.com> - maint: use the standard require_perl_ function * tests/cp/sparse-fiemap: Don't use a separate check. @@ -9359,7 +11506,6 @@ maint: fix minor whitespace issues The previous commit introduced a couple of spacing issues, luckily one of which caused a test to fail. - * src/stat.c (default_format): Add a space so times are aligned. * src/tr.c (string2_extentd): Remove an extraneous space. @@ -9388,12 +11534,9 @@ maint: straggler *.[ch] files: convert more `...' to '...' The preceding commands ignored .[ch] files in lib/ and gl/. This is what I should have been doing from the start: - git grep -l '`.*'\' $(g ls-files |grep '\.[ch]$') \ | xargs perl -pi -e 's/`(.+?'\'')/'\''$1/' -2012-01-09 Jim Meyering <meyering@redhat.com> - maint: src/*.[ch]: convert more `...' to '...' Run this (twice): git grep -E -l '`.+'\' src/*.[ch] \ @@ -9433,12 +11576,9 @@ * tests/misc/chcon: Likewise. * tests/misc/stat-printf: Likewise. -2012-01-09 Jim Meyering <meyering@redhat.com> - tests: more automated quote adjustment Relax initial regexp to match more instances, but add a filter to avoid some invalid conversions. Run this: - git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \ -e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \ -e ' s/\`([^'\''"]*?'\'')/'\''$1/g' @@ -9447,13 +11587,10 @@ With quoting like that, converting a ` to ' is likely to cause trouble, so we'll handle those manually. Here are three examples where the exemption is required: - *': `link-to-dir/'\'': hard link not allowed for directory'*) ;; printf 'creating file `%s'\''\n' $f 'mv: inter-device move failed: `%s'\'' to `%s'\'';'\ -2012-01-09 Jim Meyering <meyering@redhat.com> - tests: change `...' to '...' on lines not matching /[=\$]/ Exempt lines with '$' or '=', since those are prone to improper conversion. Run this: @@ -9483,12 +11620,9 @@ maint: update quoting of "Try `prog --help'" to "Try 'prog --help'" Automatically adjust both the source (now in only one place) and all tests that expect the resulting output via this: - git grep -l 'Try.*--help' src/system.h tests \ | xargs perl -pi -e 's/Try \\?`(\S+ --help)/Try '\''$1/' -2012-01-07 Jim Meyering <meyering@redhat.com> - maint: use new emit_try_help in place of equivalent fprintf Run this command: perl -0777 -pi -e \ @@ -9540,14 +11674,11 @@ the ulimit, as it was seen to make the glob fail on bash 3.2 on Mac OS X 10.6.8 at least. -2012-01-05 Pádraig Brady <P@draigBrady.com> - tests: avoid a false positive due to overflow on Linux/HPPA * tests/misc/timeout-parameters: Verify that the timer doesn't fire immediately in the problematic range, and avoid overflow checks in that case. * man/timeout.x: Mention the possible bug. - Reported by Bruno Haible 2012-01-05 Jim Meyering <meyering@redhat.com> @@ -9592,14 +11723,11 @@ * NEWS (New programs): Move this small section to the top. (df): Reword entry, from Pádraig Brady. -2012-01-03 Jim Meyering <meyering@redhat.com> - df: work around long-named /dev/disk/by-uuid/... symlinks On systems with recent kernel/tools, a symlink from /etc/mtab to /proc/mounts, and a by-UUID mount (i.e., soon, nearly everyone), you will see something like the following when running "df -hT": (this has been truncated to fit in a width-limited ChangeLog file) - Filesystem Type Siz... rootfs rootfs 11G udev devtmpfs 3.8G @@ -9609,10 +11737,8 @@ /dev/sda2 ext3 494M /dev/sda5 ext4 12G /dev/sda6 ext4 9.9G - Contrast that with what we're used to seeing (modulo the two entries mounted on "/", which is a separate problem): - Filesystem Type Size Used Avail Use% Mounted on rootfs rootfs 11G 1.9G 8.0G 19% / udev devtmpfs 3.8G 0 3.8G 0% /dev @@ -9622,7 +11748,6 @@ /dev/sda2 ext3 494M 78M 392M 17% /boot /dev/sda5 ext4 12G 7.6G 3.7G 68% /usr /dev/sda6 ext4 9.9G 6.6G 2.8G 71% /var - When that long /dev/disk/by-uuid/... name is merely a symlink to a much shorter (and often more useful) device name like "/dev/sda3", and when it's part of a listing of all file systems, @@ -9630,7 +11755,6 @@ an encrypted root file system, you would see a name like /dev/mapper/luks-828fc648-9f30-43d8-a0b1-f7196a2edb66 pointing to say, /dev/dm-0, I prefer the shorter name. - I.e., if I explicitly run "df -hT /dev/disk/by-uuid/828fc648-9f30-43d8-a0b1-f7096a2edb66", then, it's fine -- and expected -- to print to the long name. @@ -9638,7 +11762,6 @@ df should print the shorter name. Note that performing this translation at a lower level (via a change to gnulib's mountlist.c) would make it impossible to distinguish those two cases. - * src/df.c: Include "canonicalize.h". (get_dev): Add a parameter, telling when we're in process-all- mount-points mode; update all callers. When true, resolve @@ -9647,8 +11770,6 @@ Reported by Nao Nishijima in http://bugzilla.redhat.com/766461 and by Dan Jacobson in http://bugs.gnu.org/10363 -2012-01-03 Jim Meyering <meyering@redhat.com> - tests: adjust realpath test to avoid "make distcheck" failure * tests/misc/realpath: Quote lhs of test ... = ..., so that when $PWD contains a space (like it does via "make distcheck"), @@ -9662,7 +11783,6 @@ through the --relative options. The relpath support was suggested by Peng Yu, who also provided an initial implemenation of that functionality. - * AUTHORS: Add my name. * NEWS: Mention the new command. * README: Likewise. @@ -9678,8 +11798,6 @@ * tests/Makefile.am (TESTS): Add misc/realpath. * tests/misc/realpath: New file. -2012-01-03 Pádraig Brady <P@draigBrady.com> - build: update gnulib for canonicalize_filename_mode improvements This is required for the new realpath command. @@ -9740,7 +11858,6 @@ * src/chown.c: Likewise. * src/chcon.c (usage): Likewise. Document the --dereference option. - Suggested by Paul Eggert and Jari Aalto 2011-12-26 Jim Meyering <meyering@redhat.com> @@ -9919,11 +12036,9 @@ I didn't check how long these were documented as GNU extensions, nor when they were added by POSIX; but since they are all part of POSIX 2008, we no longer need call them out as extensions. - The next version of POSIX will standardize %s: http://austingroupbugs.net/view.php?id=169 but as that is not out yet, I didn't change %s. - * doc/coreutils.texi (Time conversion specifiers): %R and %z are now POSIX. (Date conversion specifiers): Likewise for %F, %g, %G. @@ -9952,17 +12067,13 @@ build: simplify warnings based on last gnulib update We no longer need to exclude this warning. - * configure.ac (WARN_CFLAGS): Gnulib dropped -Wunsuffixed-float-constants, as non-portable. -2011-11-29 Eric Blake <eblake@redhat.com> - build: update gnulib for syntax-check improvement Commit 5b3e538 proved useful enough to migrate to gnulib after enhancing it to be more generic, which in turn pointed out that commit a2c811db missed an offender. - * gnulib: Update to latest. * cfg.mk (sc_prohibit_reversed_compare_failure): Delete, now that gnulib provides it. @@ -10061,14 +12172,11 @@ not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 - Run these commands: - git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's/(compare) (\S+) (\/dev\/null)/$1 $3 $2/' - * tests/chgrp/no-x: As above. * tests/chmod/no-x: Likewise. * tests/chmod/silent: Likewise. @@ -10211,8 +12319,6 @@ * tests/touch/not-owner: Likewise. * tests/touch/relative: Likewise. -2011-11-22 Jim Meyering <meyering@redhat.com> - tests: use compare, not "diff", in a few stray tests * tests/install/basic-1: Use compare, not diff. * tests/mkdir/p-v: Likewise. @@ -10314,16 +12420,12 @@ id: undo previous commit, which was done by mistake * src/id.c (GETID_MAY_FAIL, main, print_full_info): Undo previous change. -2011-11-15 Paul Eggert <eggert@cs.ucla.edu> - doc: update for ISO/IEC 80000-13 * doc/coreutils.texi (Block size): IEC 60027-2 has been superseded by ISO/IEC 80000-13, so prefer the newer standard but also mention the old. The new standard specifies Zi and Yi, so they are no longer GNU extensions. Fix stale URL to BIPM. - 2011-11-14 Paul Eggert <eggert@cs.ucla.edu> - id: handle (uid_t) -1 more portably * src/id.c (GETID_MAY_FAIL): Remove. (main): Check for negative return values, not for -1. @@ -10448,30 +12550,24 @@ (kernel 2.6.22.5 x86_64, glibc 2.6.1-18, bash updated to 4.2), and also on a 64 bit SLES system with a 2.6.16 kernel. Both systems had 2 CPUs. - There were two issues seen. 1. Occasionally the timeout.cmd shell script would block SIGINT until the sleep command exited. 2. Much less frequently the signal handler in the timeout command itself was ignored, causing SIGALRM to kill the process. - * tests/misc/timeout-group: Detect the above two cases, and skip rather than fail. Note only issue 2. causes a failure unless skipped, but we skip for case 1. also, for diagnostic purposes. -2011-11-03 Pádraig Brady <P@draigBrady.com> - tests: fix a race in timeout-group This could cause a false failure, or even an infinite loop in rare circumstances. - * tests/misc/timeout-group: Increase the timeouts passed to the timeout command, so that they're effectively not used. Instead the command termination is triggered by the kill commands when everything is in the correct state. - Reported by Bernhard Voelker. 2011-11-02 Jim Meyering <meyering@redhat.com> @@ -10614,7 +12710,6 @@ At the moment, things like man/arch.1 are not included in the tarball. This makes perl a requirement if you want to build/install the arch helper. - * man/Makefile.am (EXTRA_DIST): Add $(NO_INSTALL_PROGS_DEFAULT:%=%.1). 2011-10-19 Jim Meyering <meyering@redhat.com> @@ -10802,29 +12897,23 @@ doc: mention the recent ls -L "argetm" fix in NEWS * NEWS: Mention the bug fix -2011-10-01 Pádraig Brady <P@draigBrady.com> - ls: fix output of dangling symlinks colored as target This is related to commit b7f2b51c, 2010-01-01, "ls: fix color of broken symlinks colored as target" which didn't handle the --dereference case. The simplest way to reproduce the resultant erroneous "argetm" is as follows: - $ ln -s /no-such dangle $ env LS_COLORS=ln=target ls --dereference --color ls: cannot access dangle: No such file or directory argetmdangle - This is also an issue with the `tree` utility, reported here: http://bugs.debian.org/586765 - * src/ls.c (print_color_indicator): Move the handling of 'ln=target' in $LS_COLORS (color_symlink_as_referent == true) to a higher scope, to handle all cases where type == C_LINK. * tests/misc/ls-misc: Add a test case for the specific issue, and 2 further test cases to verify other code paths in this area. - Reported by Jason Glassey. 2011-09-30 Jim Meyering <meyering@redhat.com> @@ -10898,7 +12987,6 @@ implicitly created when timer_settime() is used. This breaks our scheme to ignore signals we've sent ourselves. - * src/timeout.c (send_sig): Change the scheme used to ignore signals we've sent ourselves, to a more robust but perhaps limited scheme of ignoring all signals of @@ -11135,7 +13223,6 @@ timeout: revert signal propagation enhancement This effectively reverts the unreleased commit 5a647a05 - * src/timeout.c (main): Don't propagate signals from the monitored process, as on Linux /proc/sys/kernel/core_pattern could still handle them and cause false reports against `timeout` @@ -11164,12 +13251,10 @@ "Apply big patch (patch-20) from Roland Huebner" it was ignored when -t or -T were specified or when -l <= 10. - * src/pr.c (print_page): Increment the current page here. (print_header): Don't increment the current page here. * tests/pr/pr-tests: Add a test case. * NEWS: Mention the fix - Reported at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9347 2011-08-20 Erik Auerswald <auerswal@unix-ag.uni-kl.de> @@ -11268,12 +13353,9 @@ tests: complete the renaming framework_failure -> framework_failure_ These changes were mostly mechanical, made by running the following command: - git grep -lw framework_failure | grep -v ChangeLog \ | xargs perl -pi -e 's/\b(framework_failure)\b/${1}_/' - and then editing init.cfg and `tests/cp/cp-a-selinux' by hand. - * tests/init.cfg (framework_failure): Remove, `framework_failure_' from init.sh should be used instead in the tests. Remove now-obsolete "FIXME" comment. @@ -11325,12 +13407,9 @@ affecting at least glibc 2.13 and FreeBSD. Reported by Bernhard Voelker. Suggested by Eric Blake. -2011-07-29 Jim Meyering <meyering@redhat.com> - build: update gnulib, for "make syntax-check" fix Without the recent maint.mk fix, "make syntax-check" would fail like this: - src/dd.c:# define SA_RESETHAND 0 src/ls.c:# define SA_RESTART 0 src/timeout.c:# define SA_RESTART 0 @@ -11445,8 +13524,6 @@ * m4/jm-macros.m4: Remove gl_CLOCK_TIME as it's already done by the gettime gnulib module. -2011-07-20 Pádraig Brady <P@draigBrady.com> - unexpand: fix misalignment when spaces span a tabstop The following dropped the space from the first field printf "1234567 \t1\n" | unexpand -a @@ -11454,7 +13531,6 @@ Also a single trailing space should not be converted if the next field starts with non blank characters. So we enforce those rules too, with this change. - * src/unexpand.c (unexpand): Implement as per POSIX rules. * tests/misc/unexpand: Add tests, and adjust existing tests as per POSIX rules. @@ -11489,15 +13565,10 @@ Fix capiTalization in comments. -2011-07-16 Paul Eggert <eggert@cs.ucla.edu> - * src/timeout.c (main): Use waitpid, not wait (Bug#9098). Reported by Andreas Schwab. - * src/timeout.c (SA_RESTART): Define to 0 if not defined. -2011-07-16 Paul Eggert <eggert@cs.ucla.edu> - timeout: port to NonStop (Bug#9077) * src/timeout.c (SA_RESTART): Define to 0 if not defined. (main): Don't assume signal handling uses SA_RESTART. @@ -11559,12 +13630,9 @@ Reported by Jordi Pujol in http://bugs.debian.org/551093. Wording improvments from Eric Blake. -2011-07-13 Benoît Knecht <benoit.knecht@fsfe.org> - doc: note the order in which wc counts are printed This information has already been added to the Texinfo manual, but was missing from the --help output. - * src/wc.c (usage): As above, for --help. Reported by Vincent Lefevre in http://bugs.debian.org/395430. @@ -11604,7 +13672,6 @@ man-pages(7) explicitly says about SEE ALSO sections: "Do not terminate this with a period." This is also in line with all the other man pages in coreutils. - * man/cat.x: Remove period at the end of the SEE ALSO section. * man/tac.x: Likewise. @@ -11625,12 +13692,9 @@ * test/misc/timeout-group: Add a test case. * NEWS: Mention the fix. -2011-07-08 Pádraig Brady <P@draigBrady.com> - timeout: add --foreground to support interactive commands Or more accurately, commands not started from the shell prompt, that are interactive, or need to receive Ctrl-C etc. from the terminal. - * doc/coreutils.texi (timeout invocation): Document --foreground. * src/timeout.c (main): Set the foreground flag and don't create a separate group. @@ -11640,7 +13704,6 @@ * tests/misc/timeout-group: Add a new test. * tests/Makefile.am: Reference new test. NEWS: Mention the new option. - Reported by Shay Shimony Analysis by Alan Curry Fix suggested by Paul Eggert @@ -11665,7 +13728,6 @@ consist solely of checksum lines. With only --check, an invalid line evokes a warning, but the program can still exit successfully. With --strict, any invalid line makes the program exit non-zero. - * src/md5sum.c (strict, STRICT_OPTION): Declare/define. (long_options): Add "strict". (usage): Describe --strict. @@ -11806,8 +13868,6 @@ so add extra sanity checks, verifying that the test script exists and is readable, before trying to read from it. -2011-06-19 Stefano Lattarini <stefano.lattarini@gmail.com> - tests: make test runner a script, not a shell function This change implements a more correct and idiomatic use of the features of the Automake-provided 'parallel-tests' harness. @@ -11815,7 +13875,6 @@ continue to work with the new testsuite harness that is planned to be introduced in Automake 1.12 (which, as of the writing date, is still under development and in alpha state). - * tests/shell-or-perl: New auxiliary script. * tests/Makefile.am (EXTRA_DIST): Distribute it. * tests/check.mk (TESTS_ENVIRONMENT): Remove definition of the @@ -11985,7 +14044,6 @@ maint: remove unneeded includes Remove unneeded includes as reported by: http://code.google.com/p/include-what-you-use/ - * src/cp-hash.c: Remove unused include. * src/dd.c: Likewise. * src/du.c: Likewise. @@ -11996,8 +14054,6 @@ * src/timeout.c: Likewise. * src/truncate.c: Likewise. -2011-06-09 Pádraig Brady <P@draigBrady.com> - doc: add examples to date --help * src/date.c (usage): Add examples for TZ handling, and "seconds since epoch" parsing, neither of which @@ -12031,7 +14087,6 @@ I think it would be better to exit through the error() and not to call the exit() after the error(). This way we can get rid of one function call (and curly brackets). - * src/yes.c (main): Exit through the error(), remove exit() call after error(). @@ -12294,7 +14349,6 @@ of single quote characters combined with a numeric format. * THANKS.in: Add bug reporter. * NEWS: Mention the fix. - Reported-by: Paul Marinescu <paul.marinescu@imperial.ac.uk> 2011-05-17 Pádraig Brady <P@draigBrady.com> @@ -12479,17 +14533,12 @@ doc: remove a name from THANKS.in that is derived from git log * THANKS.in: Remove a now-duplicate name. -2011-05-03 Jim Meyering <meyering@redhat.com> - copy: fix my typo * src/copy.c (copy_reg): Fix my typo (mis-applied patch). The patch by Jeff Liu was fine, but I mis-applied it and introduced a compilation error in commit efa479c1. - 2011-05-03 Jim Meyering <meyering@redhat.com> -2011-05-03 Jim Meyering <meyering@redhat.com> - build: avoid bootstrap failure when $GZIP is set Running "GZIP=-9 ./bootstrap" would fail right away, because the tool-version-checking code would treat the upper-cased program name @@ -12629,7 +14678,6 @@ as an argument to awk's printf. Otherwise, gawk 3.0.1 and the one from debian stable's original-awk would get a syntax error. Reported by Dennis Clarke. - Copyright note: tiny change 2011-04-21 Jim Meyering <meyering@redhat.com> @@ -12895,8 +14943,6 @@ was thought too expensive in memory or time. * NEWS: Mention the fix -2011-04-01 Pádraig Brady <P@draigBrady.com> - copy: link rather than copy symlinks, when --link used This bug was introduced in commit ca9e212c, 2009-09-24, "cp, mv: use linkat to guarantee semantics", which @@ -12904,7 +14950,6 @@ However rather than implementing the intention of that commit and relying on gnulib linkat emulation, we'll revert to the previous emulation as that maintains ownership and timestamps. - * src/copy.c (copy_internal): Use our existing hardlink to symlink emulation when link() might dereference the symlink. Also ensure that we copy the timestamps of the original symlink @@ -12986,7 +15031,6 @@ This is already the case in GNU coreutils' expr, bash, ksh, busybox ash, FreeBSD-current /bin/sh and /bin/test, and OpenBSD's /bin/sh. - Before, env test a '==' a would fail with this diagnostic: "test: ==: binary operator expected". Now, it succeeds. * src/test.c: Accept "==" as a synonym for "=". @@ -13172,14 +15216,11 @@ * doc/coreutils.texi (dd invocation): Apply the same grouping as above, by splitting the "conv=" table in two. -2011-03-05 Pádraig Brady <P@draigBrady.com> - dd: warn when we disable oflag=direct not at EOF An alternative to this is to auto enable iflag=fullblock when oflag=direct and bs= is specified. It was thought better though, to warn about the specific issue, and give full control of dd's options to the user. - * src/dd.c (iwrite): Warn, when we write after having disabled O_DIRECT. See https://bugzilla.redhat.com/show_bug.cgi?id=614605 @@ -13263,12 +15304,9 @@ Don't depend on heuristics to detect sparse files if fiemap is available. Also don't scan for new holes unless --sparse=always has been specified. - * src/copy.c (extent_copy): Pass the user specified sparse mode, and handle as described above. -2011-02-11 Pádraig Brady <P@draigBrady.com> - copy: suppress redundant lseeks when using fiemap * src/copy.c (extent_copy): Suppress redundant lseek()s in both the source and dest files, when there is no hole between extents. @@ -13333,18 +15371,13 @@ * gl/tests/test-ino-map.c: Likewise. * gnulib: Update to latest, now that these two modules are there. -2011-02-07 Jim Meyering <meyering@redhat.com> - di-set: provide a lookup method This is required for patch, and hence is about to move to gnulib. * gl/lib/di-set.c (di_set_lookup): New function. * gl/lib/di-set.h: Declare it. * gl/tests/test-di-set.c (main): Exercise it. - The bug was introduced on 2004-12-04 via commit 7380cf79. -2011-02-07 Jim Meyering <meyering@redhat.com> - cut: don't segfault for large unbounded range * src/cut.c (set_fields): When computing the maximum range endpoint, take into consideration the start of any unbounded range, like "999-". @@ -13389,7 +15422,6 @@ sort: fix --debug key highlighting when key start after key end This case was overlooked in commit bdde34f9, 2010-08-05, "sort: tune and refactor --debug code, and fix minor underlining bug" - * src/sort.c (debug_key): Don't adjust the key end when it's before the key start. * tests/misc/sort-debug-keys: Add a test case. @@ -13575,7 +15607,6 @@ release the memory allocated to extent info which should be called combine with get_extents_info(), it just one line, so IMHO, define it as macro should be ok. - * src/extent-scan.c: New file; functions to read "extents". * src/extent-scan.h: Header file of extent-scan.c. * src/Makefile.am: Reference it and link it to copy_source. @@ -13656,12 +15687,9 @@ Also document a `join` hack, to achieve the same thing. Note the join options are ordered so as to be compatible with other systems. -2011-01-29 Pádraig Brady <P@draigBrady.com> - join: don't report disorder against an empty file This allows one to use join as a field extractor like: join -a1 -o 1.3,1.1 - /dev/null - * src/join.c (join): Don't flag unpairable lines when one of the files is empty. * tests/misc/join: Add a new test for empty input, and adjust @@ -13669,19 +15697,14 @@ * doc/coreutils.texi (join invocation): Document the change. * NEWS: Likewise. -2011-01-29 Pádraig Brady <P@draigBrady.com> - join: ensure --header skips the order check with empty files * src/join.c: Skip the header even if one of the files is empty. * tests/misc/join: Add a test case. * NEWS: Mention the fix -2011-01-29 Pádraig Brady <P@draigBrady.com> - join: add -o 'auto' to output a constant number of fields per line Lines with a different number of fields than the first line, will be truncated or padded. - * src/join.c (prfields): A new function refactored from prjoin(), to output all but the join field. (prjoin): Don't swap line1 and line2 when line1 is blank @@ -13906,8 +15929,6 @@ build: update gnulib for version-etc copyright year update * tests/sample-test: Update copyright to 2011, to appease syntax-check. -2011-01-01 Jim Meyering <meyering@redhat.com> - maint: generate much of the THANKS file Before this change, we had a tendency to manually list each contributor's name in THANKS. Now, each commit "Author" is @@ -13915,7 +15936,6 @@ of the old THANKS file is now a template, THANKS.in. We'll still have to manually list the names of people who report problems without a usable patch. - * THANKS.in: New file, derived from THANKS, but removing names of those who are listed as git log 'Author:'s. * THANKS: Remove file. @@ -13941,12 +15961,10 @@ coreutils has long preferred to use it as an external library). But that commit overlooked two places necessary to allow the use of gettext 0.17. - This does not force you to downgrade (using gettext 0.18.1.1 is still just fine), nor does it affect tarballs (once a tarball is built with a given gettext version, it can be built on other machines regardless of what gettext version is present). - * bootstrap.conf (buildreq): Relax prerequisite. * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. @@ -14357,7 +16375,6 @@ When -n l/N is used and long lines are present that both span partitions and multiple buffers, one would get inconsistent chunk sizes. - * src/split.c (main): Add a new undocumented ---io-blksize option to support full testing with varied buffer sizes. (cwrite): Refactor most handling of --elide-empty to here. @@ -14571,17 +16588,12 @@ tests: convert tests/misc/selinux manually -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: convert the multi-prog $VERBOSE/--version uses E.g., - -test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; } +print_ver_ pwd readlink - -test "$VERBOSE" = yes && { stdbuf --version; mv --version; } +print_ver_ stdbuf mv - Use this command: git grep -l 'VERBOSE.*--version'|xargs perl -ni \ -e '/^test "\$VERBOSE" = yes && { .*--version/ or print,next;' \ @@ -14589,30 +16601,20 @@ -e 's/test "\$VERBOSE" = yes && { /print_ver_ /;' \ -e ' s/(\w+) --version;/$1/g; s/ *}$//; print' -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: convert "... env -- prog --version" uses E.g., - -test "$VERBOSE" = yes && env -- pwd --version +print_ver_ pwd - git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \ 's/test "\$VERBOSE" = yes && env -- (\w+) --version/print_ver_ $1/' -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: substitute the single-program $VERBOSE/--version uses Automatically make all of the changes like this: - -test "$VERBOSE" = yes && chgrp --version +print_ver_ chgrp - git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \ 's/test "\$VERBOSE" = yes && (\w+) --version/print_ver_ $1/' -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: factor out VERBOSE-only --version-printing code * tests/init.cfg (print_ver_): New function. @@ -14628,15 +16630,12 @@ tests: convert 'if test "$VERBOSE" = yes; then' to test ... && -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: convert first batch of tests from test-lib.sh to init.sh Initially, I did this, git grep -l srcdir/test-lib.sh|xargs perl -p0i -e '~180-byte script' but that line would have been much longer than the maximum permitted by coreutils' commit hook, and wasn't readable besides, so here's a more readable version: - lhs=$(printf '%s\\n' \ 'if test "$VERBOSE" = yes; then' \ ' set -x' \ @@ -14645,16 +16644,12 @@ '' \ '. $srcdir/test-lib.sh' \ | sed 's/\$/\\\$/g;s/touch/(\\w+)/') - rhs=$(printf '%s\\n' \ '. "${srcdir=.}/init.sh"; path_prepend_ ../src' \ 'test "$VERBOSE" = yes && FIXME --version' \ | sed 's/\$/\\\$/g;s/FIXME/\$1/') - git grep -l srcdir/test-lib.sh|xargs perl -p0i -e "s,$lhs,$rhs," -2010-11-17 Jim Meyering <meyering@redhat.com> - tests: move a comment so automated conversion works maint: add a NEWS-checking syntax-check rule @@ -14680,13 +16675,10 @@ * src/csplit.c (max_out): Fix a new warning introduced with commit 6568b173, 2010-11-10, "csplit: do not rely on..." -2010-11-16 Pádraig Brady <P@draigBrady.com> - build: enable the -Wpointer-sign gcc warning ... when configured with the --enable-gcc-warnings option. This follows on from commit 34ef0a01, 2010-10-14, "sort: fix unportable cast of unsigned char * -> char *" - * configure.ac: -Wall implicitly enables this warning so remove the explicit disabling. @@ -14871,11 +16863,8 @@ cp: NEWS entry for previous fix Resolves bug#7324 - * NEWS: Document the extent of the Solaris crash. -2010-11-04 Eric Blake <eblake@redhat.com> - cp, mv, touch: fix file time manipulation on Solaris 10 * gnulib: Update to latest, for futimens fix. * .gitignore: Ignore another recent gnulib-generated file. @@ -14989,7 +16978,6 @@ md5sum: print a summary warning for improperly formatted lines And remove the now-superfluous totals from the other two warnings, so the plurals will also work in other languages than English. - * src/md5sum.c (digest_check): Change as above. * tests/misc/md5sum (check-quiet2): Adjust accordingly. @@ -15135,7 +17123,6 @@ split: fix reporting of read errors The bug was introduced with commit 23f6d41f, 19-02-2003. - * src/split.c (bytes_split, lines_split, line_bytes_split): Correctly check the return from full_read(). * tests/misc/split-fail: Ensure split fails when @@ -15210,7 +17197,6 @@ This touches all new tests added since commit b062bbd9, when init.cfg was added. Older tests still exist that could use conversion, but we can address those later. - * tests/sample-test: Restore hint for --version output. * tests/misc/stat-birthtime: Include --version if verbose. * tests/misc/tr-case-class: Likewise. @@ -15219,19 +17205,14 @@ * tests/misc/sort-benchmark-random: Likewise. Suggested by Jim Meyering. -2010-10-01 Eric Blake <eblake@redhat.com> - stat: print SELinux context when available * src/stat.c (default_format): Include context when present. * NEWS: Update blurb explaining the replacement for -Z. -2010-10-01 Eric Blake <eblake@redhat.com> - stat: optimize and translate default format strings Yes, this patch intentionally leaks the results of default_format(), since it is called only twice, and since the results are in scope until main() exits. Not worth the extra code to pacify valgrind. - * src/stat.c (main): Hoist default format computation out of loop. (do_statfs, do_stat): Move default format generation... (default_format): ...into new function. Allocate the result in @@ -15241,8 +17222,6 @@ file type. * NEWS: Document the translation aspect. -2010-10-01 Eric Blake <eblake@redhat.com> - stat: print timestamps to full resolution * src/stat.c (epoch_time): New function. (print_stat): Use it for %[WXYZ]. @@ -15265,7 +17244,6 @@ maint: ensure the mbsalign module is C89 compatible This module may be moved to gnulib at some stage, so keep it C89 compatible. - * gl/lib/mbsalign.c (mbsalign): Declare variables at start of scope (ambsalign): Likewise * gl/lib/mbsalign.h: Remove trailing comma from enum @@ -15305,15 +17283,12 @@ LC_ALL=en_US.iso-8859-1 tr '[:upper:] ' '[:lower:]' This was caused by commit 6efd1046, 05-01-2008, "Avoid tr case-conversion failure in some locales" - This misaligned conversion spec was allowed: LC_ALL=C tr 'A-Y[:lower:]' 'a-z[:upper:]' This was caused by commit af5d0c36, 21-10-2007, "tr: do not reject an unmatched [:lower:] or [:upper:] in SET1" - This misaligned spec was allowed by extending the class: LC_ALL=C tr '[:upper:] ' '[:lower:]' - * src/tr.c (validate_case_classes): A new function to check alignment of case conversion classes. Also it adjusts the length of the sets so that locales with different numbers of @@ -15403,7 +17378,6 @@ dircolors: add rxvt-unicode-256color terminal type rxvt-unicode introduced new terminal type: http://cvs.schmorp.de/rxvt-unicode/src/rxvt.h?r1=1.398&r2=1.399 - * src/dircolors.hin: Add rxvt-unicode-256color terminal type. Reported by Alexey I. Froloff in <http://bugzilla.altlinux.org/24052>. @@ -15423,12 +17397,9 @@ from 1 second to a range of .1s - 3.1s. * tests/rm/dangling-symlink: Likewise. -2010-09-07 Pádraig Brady <P@draigBrady.com> - tests: exclude some tests when running on NFS All tests currently pass on NFS on Linux kernel 2.6.22 at least, but some fail on 2.6.9, so we exclude those here. - * tests/init.cfg (is_local_dir_): A new function returning if the specified directory is on a local file system. (require_local_dir_): A new function to skip tests @@ -15469,7 +17440,6 @@ "join: make -t '' operate on the whole line". Bypassing the delimiter search in this case, gives about an 8% performance boost. - * src/join (xfields): Don't bother looking for '\n' in the data, which we know won't be present. @@ -15585,7 +17555,6 @@ build: update to latest gnulib Fixes bug 6053 for NFS on HP-UX not recognizing ACL operations. - * gnulib: Update to latest version. 2010-08-10 Jim Meyering <meyering@redhat.com> @@ -15645,7 +17614,6 @@ shortens the source code and executable size a tad, and improves CPU performance by 2.4% on my platform with a simple benchmark (C locale, line sorting, no debug). - * src/sort.c (long_double, strtold): Move back to prelude, since they're now used by multiple functions again. (unit_order): Move to file scope, since it's now used by two functions. @@ -15670,8 +17638,6 @@ a number, so its first character should not be underlined when debugging a numeric sort. -2010-08-05 Paul Eggert <eggert@cs.ucla.edu> - sort: -R now uses less memory on long lines with internal NULs * lib/Makefile.am (libcoreutils_a_SOURCES): Remove xmemxfrm.c, xmemxfrm.h. @@ -15891,7 +17857,6 @@ apply the same hint to all appropriate utils. This currently gives around a 5% speedup for reading large files from fast flash devices on GNU/Linux. - * src/base64.c: Call fadvise (..., FADVISE_SEQUENTIAL); * src/cat.c: Likewise. * src/cksum.c: Likewise. @@ -15915,8 +17880,6 @@ * src/uniq.c: Likewise. * src/wc.c: Likewise, unless we don't actually read(). -2010-07-22 Pádraig Brady <P@draigBrady.com> - fadvise: new module providing a simpler interface to posix_fadvise * bootstrap.conf: Include the new module * gl/lib/fadvise.c: Provide a simpler interface to posix_fadvise. @@ -16004,7 +17967,6 @@ Don't write NUL after the comparison buffers on each compare, which increases performance by about 3% for short lines on a pentium-m with gcc-4.4.1 - * src/sort.c: (fillbuf): Delimit input items with NUL. (write_bytes): Restore the item delimiter char which was replaced with NUL in fillbuf(). @@ -16055,11 +18017,9 @@ Nichols, based off of a patch by Paul Eggert, Glen Lenker, et. al., with a basic heap implementation based off of the GDSL heap, originally by Nicolas Darnis. - The number of sorts done in parallel is limited to the number of available processors by default, or can be further restricted with the --parallel option. - On a dual-die, 8 core Intel Xeon, results show sorting with 8 threads is almost 4 times faster than using a single thread. Timings when sorting a 96MB file: @@ -16068,7 +18028,6 @@ 2 2.87 4 1.75 8 1.31 - Single threaded sorting has also been improved, especially for cheaper comparison operations: COMMAND BEFORE (s) AFTER (s) @@ -16076,7 +18035,6 @@ sort -g 10.336 10.222 sort -n 3.077 2.961 LANG=C sort 2.169 2.066 - * bootstrap.conf: Add heap, pthread. * coreutils.texi (sort): Describe the new --parallel option. * gl/lib/heap.c: New file. Very basic heap implementation. @@ -16236,8 +18194,6 @@ containing 100,000 files, each with a link count greater than 1, all pointing to files in some other tree. -2010-07-04 Jim Meyering <meyering@redhat.com> - du: use less than half as much memory when tracking hard links When processing a hard-linked file, du must keep track of the file's device and inode numbers in order to avoid counting its storage @@ -16257,7 +18213,6 @@ dev,inode information and put those bits in place of the pointer, and thus do away with the need to allocate additional space for each dev,inode pair. - * src/du.c: Include "di-set.h". Don't include "hash.h"; it's no longer used. (INITIAL_DI_SET_SIZE): Define. @@ -16268,8 +18223,6 @@ * bootstrap.conf (gnulib_modules): Add the new di-set module. * NEWS (New features): Mention it. -2010-07-04 Jim Meyering <meyering@redhat.com> - di-set: manipulate sets of dev/inode pairs efficiently * gl/lib/di-set.c: Implementation. * gl/lib/di-set.h: Declarations. @@ -16540,7 +18493,6 @@ it may also do, but for `truncate` we should display all errors. Also we used the st_size from non regular files which is undefined, so we display an error when the user tries this. - * src/truncate (do_truncate): Error when referencing the size of non regular files or non shared memory objects. Display all errors returned by ftruncate(). @@ -16904,7 +18856,6 @@ tests: fix exit status of signal handlers in shell scripts The value of `$?' on entrance to signal handlers in shell scripts cannot be relied upon, so set the exit code explicitly. - * cfg.mk (sc_always_defined_macros, sc_system_h_headers): Set the exit code in signal handler explicitly to 128 + SIG<SIGNAL>. * src/Makefile.am (sc_tight_scope): Likewise. @@ -16917,7 +18868,6 @@ in that it clobbers O_APPEND, but it is no different than any other use of xfreopen to force binary mode, so all such uses should be fixed at once in a later patch. - * src/base64.c (main): Open input in binary mode. * THANKS: Update. Reported by Yutaka Amanai. @@ -16945,7 +18895,6 @@ "sort: Fix two bugs with determining the end of field". The specific regression being that we include 1 field too many when an end field is specified using obsolescent key syntax (+POS -POS). - * src/sort.c (struct keyfield): Clarify the description of the eword member, as suggested by Alan Curry. (main): When processing obsolescent format key specifications, @@ -16971,11 +18920,8 @@ * HACKING (Add tests): Change example name, "newtest" to "new-test". Not that anyone would confuse with something newt-related, but just because it is more readable that way. - doc: tweak HACKING -2010-04-16 Jim Meyering <meyering@redhat.com> - doc: tweak HACKING * HACKING (Curly braces): Tweak a sentence. Filter a few paragraphs through "fmt". @@ -16986,11 +18932,8 @@ * src/Makefile.am (kill_LDADD): Add $(LIBTHREAD) so that we link with the appropriate libraries to provide Thread Local Storage on platforms that replace strsignal (like AIX for example). - Tested-by: Daniel Richard G. <danielg@teragram.com> -2010-04-16 Pádraig Brady <P@draigBrady.com> - tests: avoid spurious failure of ls/color-norm test * tests/ls/color-norm: Use the "time" output by `ls -l` to check normal style. Previously we used the size from `ls -s`, @@ -17028,7 +18971,6 @@ The 2010-03-26 commit, 4c38625e, "doc: fix info on cp --preserve..." was not entirely correct as cp --preserve=all does produce some xattr warnings. - * src/copy.h: Update and clarify the comments for reduce_diagnostics and require_preserve_{xattr,context}. * doc/coreutils.texi (cp invocation): Update the -a and @@ -17302,7 +19244,6 @@ Rather than changing such a signal into a KILL, we provide the more general mechanism of sending the KILL after the specified grace period. - * src/timeout.c (cleanup): If a non zero kill delay is specified, (re)set the alarm to that delay, after which a KILL signal will be sent to the process group. @@ -17372,22 +19313,18 @@ sort: inform the system about our input access pattern Tell the system that we'll access input sequentially, so that we more efficiently process uncached files in a few cases: - Reading from faster flash devices. E.g. 21 MB/s key: NORMAL 31.6s (26.8 user) SEQUENTIAL 27.7s WILLNEED 27.7s - Processing in parallel with readahead when using a small 1M buffer: NORMAL 24.7s (21.1 user) SEQUENTIAL 22.7s WILLNEED 25.6s - A small benefit when merging: NORMAL 25.0s (16.9 user) SEQUENTIAL 24.6s (16.6 user) WILLNEED 38.4s (13.1 user) - Note WILLNEED is presented above for comparison to show it has some unwanted characteristics due to its synchronous prepopulation of the cache. It has a good benefit on a @@ -17398,7 +19335,6 @@ WILLNEED 05.22s However the scheduling differences causing this result are probably best explicitly managed using `nice` etc. - * m4/jm-macros.m4 (coreutils_MACROS): check for posix_fadvise(). * src/sort.c (fadvise_input): A new function to apply the POSIX_FADV_SEQUENTIAL hint to an input stream. @@ -17410,15 +19346,11 @@ * tests/envvar-check (vars): Add LANGUAGE to the list of envvars to unset. At least in glibc (as an extension to POSIX), its value actually trumps LC_ALL: - $ LC_ALL=es_ES LANGUAGE=fr_FR.UTF-8 /bin/cat no-such /bin/cat: no-such: Aucun fichier ou dossier de ce type - but only when the default locale is not C: - $ LC_ALL=C LANGUAGE=fr_FR.UTF-8 /bin/cat no-such /bin/cat: no-such: No such file or directory - Prompted by a report from Mads Kiilerich. 2010-03-01 Pádraig Brady <P@draigBrady.com> @@ -17475,7 +19407,6 @@ not otherwise be colored unless FILE is also set. The regression was introduced with commit 483297d5, 28-02-2009, "ls --color no longer outputs unnecessary escape sequences". - * src/ls.c (set_normal_color): A new function to output the NORMAL attribute sequence if it's enabled. (print_current_files): Output NORMAL before printing long format info. @@ -17495,7 +19426,6 @@ These checks were not being run as distcheck-hook targets are only supported in the top-level Makefile. Instead these tests are now run during a syntax-check. - * cfg.mk (sc_man_file_correlation): A new syntax check to call the 2 existing tests to check the correlation between the programs and man/*.[1x]. @@ -17507,8 +19437,6 @@ from the list of programs. This issue was not noticed as the checks were not actually being run. -2010-02-16 Pádraig Brady <P@draigBrady.com> - tests: fix an unlikely race in tail-2/inotify-hash-abuse2 * tests/tail-2/inotify-hash-abuse2: Explicitly kill the process by using cleanup_() rather than using a timeout which may trigger @@ -17597,7 +19525,6 @@ tests: fix various timeout races Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/277485 - * tests/misc/timeout: Set all expected timeouts to 1s and all unexpected timeouts to 10s. In this way, tests normally proceed quickly but may delay up to 10s before reporting failures. @@ -17618,15 +19545,12 @@ maint: fix a typo in NEWS * NEWS: s/contains/contain/ -2010-02-01 Pádraig Brady <P@draigBrady.com> - join: make -t '' operate on the whole line Previously passing an empty parameter to -t would raise an error, but now it means to treat each line as a single field for matching. This matches the default operation of `sort` which is usually used in conjunction with join. - * src/join.c (main): Set the field delimiter to '\n' if an empty parameter is passed to -t. (usage): Mention the operation of -t ''. @@ -17644,10 +19568,8 @@ Note join without --check-order will already handle the common case where headings do match in each file, however using --check-order will fail often when the header sorts after the first line of data. - Note also that this will join header lines from each file even if they don't match, with headings from the first file being used. - * NEWS: Mention the new option. * doc/coreutils.texi (join invocation): Describe the new option. * src/join.c (usage): Likewise. @@ -17704,7 +19626,6 @@ Enabled when coreutils is configured with --with-tty-group. Based on a patch written by Piotr Gackiewicz. Details at http://bugzilla.redhat.com/454261 - * src/who.c (is_tty_writable): A new function returning true if a TTY device is writable by the group. Additionally it checks the group to be the same as TTY_GROUP_NAME when compiled with --with-tty-group. @@ -17887,7 +19808,6 @@ field on the right, rather than leaving a one-space separator in each case. Fixes a regression introduced on Mar 6 2009, by commit a4053c5291d5797734b3e4f042f9e1adf3944fd6 - * src/pr.c (print_header): Ensure that there is at least one space before and after the file name part of the header line. * NEWS: Mention it. @@ -17895,8 +19815,6 @@ * THANKS: Update. Reported by Denis McKeon, in https://savannah.gnu.org/bugs/?28492. -2010-01-07 Eric Blake <ebb9@byu.net> - maint: apply correct license to auxiliary files * gnulib: Update, for maint.mk improvements. * HACKING: Use GFDL 1.3, not 1.2. @@ -18031,7 +19949,6 @@ This fixes a bug whereby tail -F would fail to track changes to a file that was a target of a rename, and when the source of the rename was another tailed file. - * src/tail.c (tail_forever_inotify): Ensure the wd is not already present in the hash table before trying to add it. When a new watch descriptor is added to the `wd_to_name' hash table, check that it is @@ -18085,12 +20002,9 @@ maint: ignore more built files Recent gnulib changes added new built files. - * .gitignore: Add arg-nonnull.h, link-warning.h, unused-parameter.h. -2009-12-26 Eric Blake <ebb9@byu.net> - tac: supply link dependency * src/Makefile.am (tac_LDADD): Add LIB_GETHRXTIME. * THANKS: Update. @@ -18170,7 +20084,6 @@ touch: fix ctime regression in 'touch -a' Regression introduced in coreutils 8.1 due to a bug in the Linux kernel implementation of utimensat with mtime of UTIME_OMIT. - * gnulib: Update to latest, to pick up utimensat fix. * NEWS: Mention the change. * THANKS: Update. @@ -18394,9 +20307,7 @@ Meanwhile, we were not using xalloc_die properly. Both issues are better solved in gnulib, by introducing xgetgroups; this patch uses the new interface. - Regression introduced by commit 6a31fd8d7. - * gnulib: Update, for mgetgroups improvments. * src/id.c (print_full_info): Adjust caller to die on allocation failure, and no longer worry about ENOSYS. @@ -18417,7 +20328,6 @@ sort: fix link failure on Solaris Commit f9d0bb8481 made sort depend on xnanosleep. - * src/Makefile.am (sort_LDADD): Add LIB_NANOSLEEP. 2009-12-01 Jim Meyering <meyering@redhat.com> @@ -18467,11 +20377,8 @@ tests: fix link failure on cygwin Counterpart to commit 8fe40b84bd8, since test-link.c uses rename, and we override gnulib with a rename() replacement that can xalloc_die. - * gl/modules/link-tests.diff: New file. -2009-11-24 Eric Blake <ebb9@byu.net> - build: fix link failure on cygwin Cygwin 1.5 has a broken sleep, and the gnulib tests dragged in rpl_sleep which then caused a link failure because it wasn't in @@ -18479,7 +20386,6 @@ However, sleep and usleep may interact poorly with SIGALRM, and they have less granularity; so it is better to adopt a policy that if we must sleep, prefer xnanosleep. - * src/sort.c (pipe_fork): Use xnanosleep, to avoid the need for rpl_sleep on cygwin, and to reduce granularity. (MAX_FORK_TRIES_COMPRESS, MAX_FORK_TRIES_DECOMPRESS): Increase, @@ -18533,7 +20439,6 @@ With commit 0cc04241, we took the alternate approach of untainting the incoming $ENV{PATH}, but that fails when it contains an other-writable directory. Instead, now we hard code it to '/bin:/usr/bin'. - * tests/misc/pwd-long: Hard code $ENV{PATH} to a safe value. * tests/rm/fail-eperm: Likewise. Reported by Gilles Espinasse, Andreas Schwab, and Bauke Jan Douma. @@ -18639,7 +20544,6 @@ A replacement getgroups is now guaranteed to exist, but it may fail with ENOSYS. mgetgroups is moved to gnulib, and now takes gid_t instead of GETGROUPS_T (but setgroups still needs GETGROUPS_T). - * gnulib: Update to latest. * gl/modules/mgetgroups: Delete, moved to gnulib. * gl/m4/mgetgroups.m4: Likewise. @@ -18679,7 +20583,6 @@ non executable files. Note passing absolute rather than relative names to cap_get_file() reduces the has_capability() overhead from around 33% to 30%. I.E. ls --color is now around 3% faster. - * src/ls.c (struct fileinfo): Add a has_capability member. (print_color_indicator): Refactor to pass just a fileinfo pointer and a flag to say if we're dealing with a symlink target. @@ -18702,7 +20605,6 @@ on stdout, and were potentially vulnerable. dircolors, du, and tsort only used it on stdin, which is unaffected by freopen_safer, but this covers all uses for consistency. - * cfg.mk (sc_require_stdio_safer): New rule. * gl/modules/xfreopen (Depends-on): Add freopen-safer. * gl/lib/xfreopen.c (includes): Use stdio--.h. @@ -18713,13 +20615,10 @@ * src/du.c (includes): Likewise. * src/tsort.c (includes): Likewise. -2009-11-07 Eric Blake <ebb9@byu.net> - mktemp: fix bug with -q and closed stdout If stdin or stdout is closed, then freopen(,stderr) can violate the premise that STDERR_FILENO==fileno(stderr), which in turn breaks mktemp -q. - * bootstrap.conf (gnulib_modules): Add freopen-safer. * src/mktemp.c (includes): Use stdio--.h. * tests/misc/close-stdout: Enhance test to catch bug. @@ -18769,16 +20668,12 @@ mktemp: use more robust means to avoid double-close of stdout Reverts earlier patch - fflush() can succeed but fclose() fail for some cases of write failures, and we want to catch those. - * src/mktemp.c (stdout_closed): New variable. (maybe_close_stdout): New function, borrowed from dd.c. (main): Track whether stdout has been closed. -2009-11-05 Eric Blake <ebb9@byu.net> - mktemp: enhance test to catch just-fixed typo behavior Penance for botching the conflict resolution while rebasing my series. - * tests/misc/mktemp (check_tmp): Test for the bug when wrong parameter is used. @@ -18797,7 +20692,6 @@ mktemp: add suffix handling Now that mkstemps is supported, we might as well use it. - * src/mktemp.c (TMPDIR_OPTION): New enum value. (longopts): Add new option. (usage): Document it. @@ -18812,13 +20706,10 @@ * NEWS: Likewise. Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316. -2009-11-05 Eric Blake <ebb9@byu.net> - build: reflect gnulib changes to tempname In glibc 2.11 and gnulib, gen_tempname added a parameter suffixlen (unfortunately, it is typed as int rather than size_t, for historical compatibility to a poor choice by BSD). - * gnulib: Import latest changes. * gl/lib/tempname.h.diff: Accommodate new suffixlen parameter. * gl/lib/tempname.c.diff (check_x_suffix): Allow for X in suffix @@ -18827,19 +20718,14 @@ (__gen_tempname): Update caller. * src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers. -2009-11-05 Eric Blake <ebb9@byu.net> - build: override gnulib tempname via diff Diffs are more robust than wholesale replacement, because bootstrap will inform us of any incompatible changes made in upstream gnulib. - * gl/lib/tempname.h: Change... * gl/lib/tempname.h.diff: ...to diff. * gl/lib/tempname.c: Change... * gl/lib/tempname.c.diff: ...to diff. -2009-11-05 Eric Blake <ebb9@byu.net> - mktemp: rearrange --help output * src/mktemp.c (usage): Align indentation and sort by long options. Describe valid templates. @@ -18983,7 +20869,6 @@ maint: avoid exiting with magic number Cope with gnulib's new sc_prohibit_magic_number_exit rule. - * .x-sc_prohibit_magic_number_exit: New file, to add exemptions. * Makefile.am (syntax_check_exceptions): Distribute it. * lib/euidaccess-stat.c (main): Fix culprits. @@ -19015,11 +20900,9 @@ exec'ing a subsidiary program. However, if we thought the situation warranted a diagnostic, we insist that the diagnostic be printed without error, rather than blindly exec, as it may be a security risk. - For an example, try 'nice -n -1 nice 2>/dev/full'. Failure to raise priority (by lowering niceness) is not fatal, but failure to inform the user about failure to change priority is dangerous. - * src/nice.c (main): Declare failure if writing advisory message to stderr fails. * src/nohup.c (main): Likewise. @@ -19066,7 +20949,6 @@ printenv: ignore bogus variable names Exposed by env a=b=c printenv a=b. - * src/printenv.c (main): Silently reject = in names. * tests/misc/printenv: Test for it. * NEWS: Document this. @@ -19083,12 +20965,9 @@ * doc/coreutils.texi (env invocation): ...into documentation. Suggested by Jim Meyering. -2009-10-28 Eric Blake <ebb9@byu.net> - env, printenv: add -0/--null option Allows for unambiguous processing when environment values (or even non-portable names!) contain newline. - * src/env.c (longopts): Add new option. (usage): Document it. (main): Implement it. @@ -19101,8 +20980,6 @@ * tests/misc/env-null: New test. * tests/Makefile.am (TESTS): Run it. -2009-10-28 Eric Blake <ebb9@byu.net> - tests: add printenv coverage * tests/misc/printenv: New test. * tests/Makefile.am (TESTS): Run it. @@ -19123,15 +21000,12 @@ tests: clean up tests of env -- handling The comment in env.c about -- handling has not matched the behavior in the code since the initial commit back in 1992. - * src/env.c: Fix bogus comment. * tests/misc/env: Further tweaks, avoiding PATH problems inherent in testing -i, and testing program name containing =. * doc/coreutils.texi (env invocation): Mention that intermediate program is needed to invoke program with name containing =. -2009-10-27 Eric Blake <ebb9@byu.net> - doc: document PATH interactions with env * doc/coreutils.texi (env invocation): Mention that PATH is modified prior to exec. @@ -19352,7 +21226,6 @@ could cause a configure-time and/or build-time malfunction. Typically, a configure-time function-in-library test is performed via code like this: - LIB_VAR= AC_SUBST([LIB_VAR]) prefix_saved_LIBS=$LIBS @@ -19360,7 +21233,6 @@ [test "$ac_cv_search_FUNC" = "none required" || LIB_VAR=$ac_cv_search_FUNC]) LIBS=$prefix_saved_LIBS - However, in each of the files affected by this change, the LIB_VAR= initialization was omitted. Thus, when set in the environment, its value would propagate into generated Makefiles when FUNC is not found @@ -19599,11 +21471,8 @@ tail -s.1 --pid=$PID_T_MAX does not wait forever, use a timeout longer than 1 second. A 1-second timeout could be too short on a very busy system, and result in a timeout, and hence false-positive failure. - 2009-09-30 Jim Meyering <meyering@redhat.com> -2009-09-30 Jim Meyering <meyering@redhat.com> - build: update gnulib submodule to latest build: translate diagnostics from two new files @@ -20163,11 +22032,8 @@ maint: remove unused file: lib/fdopendir-glibc.c * lib/fdopendir-glibc.c: Remove unused file. - 2009-09-05 Jim Meyering <meyering@redhat.com> -2009-09-05 Jim Meyering <meyering@redhat.com> - tests: ls/stat-vs-dirent: avoid spurious test failure * tests/ls/stat-vs-dirent: Avoid test failure when run from a directory whose name (or ancestor directory name) starts with ".". @@ -20361,7 +22227,6 @@ forgoing the readdir optimization, for any kernel (including linux!) with POSIX-nonconforming readdir. Note that currently, only Cygwin has been agile enough to conform. - * src/ls.c (RELIABLE_D_INO): Define. (print_dir): Use it. For plenty of discussion, see this long thread: @@ -20621,11 +22486,8 @@ tests: stdbuf: fix a bug in test script * tests/misc/stdbuf: Use skip_test_ only after it's defined. Reported by Berhnard Voelker. - (sc_check-AUTHORS): Rename rule from check-AUTHORS. -2009-08-18 Jim Meyering <meyering@redhat.com> - build: perform check-AUTHORS via syntax-check, not via "make check" * src/Makefile.am (check): Don't depend on check-AUTHORS. That check fails on systems for which a program like stdbuf is @@ -20749,12 +22611,9 @@ * gl/modules/selinux-at: Likewise. * gnulib: update to latest, to get the new module. -2009-08-06 Jim Meyering <meyering@redhat.com> - dd: work around buffer length restrictions with oflag=direct (O_DIRECT) dd oflag=direct would fail to copy a file with size that is not a multiple of 512 (destination file system specific) - * NEWS (Bug fixes): Mention it. * src/dd.c (iwrite): Turn off O_DIRECT for any smaller-than-obs-sized write. Don't bother to restore it. @@ -21730,15 +23589,12 @@ by optimizing away; 2005-11-24) appears to have been worth less than a 2% speed-up (and usually much less), so the impact of removing it is negligible. - * src/copy.c (copy_reg): Don't exit the loop early. * tests/cp/proc-short-read: New test, lightly based on a suggestion from Mike Frysinger, to exercise this fix. * tests/Makefile.am (TESTS): Add cp/proc-short-read. * NEWS (Improve robustness): Mention this change. -2009-04-22 Jim Meyering <meyering@redhat.com> - tests: avoid new "make distcheck" failure due to newer File::Temp With newer perl (e.g., Fedora 10's 4:5.10.0-68.fc10), tests/CuTmpdir.pm stopped removing its temporary directories, with diagnostics like this: @@ -22223,8 +24079,6 @@ Patch by Paul Eggert, Nima Nikzad, Max Chang, Alexander Nguyen, Sahil Amoli, and Nick Graham. -2009-03-18 Paul Eggert <eggert@CS.UCLA.EDU> - sort: handle fd exhaustion better when merging This is an alternative to my 9 March patch labeled "Silently lower nmerge; don't (sometimes incorrectly) range-check" @@ -22234,14 +24088,12 @@ until one of these calls fails due to file descriptor exhaustion; it then backs off by 1, does a merge with the files that it has opened, and then retries with the (now-smaller) number of files. - This patch requires quite a few more changes to the source code than the earlier patch, but it is in some sense "better" because it doesn't need to call "dup" ahead of time in order to decide whether "open" or "pipe" will fail. Also, it's more robust in the case where "open" or "pipe" fails with errno==EMFILE because some system-wide limit is exhausted. - * src/sort.c (create_temp_file): New arg SURVIVE_FD_EXHAUSTION. (stream_open): New function, containing guts of xfopen. (xfopen): Use it. @@ -22557,39 +24409,30 @@ * HACKING: avoid trailing white space -2009-02-27 Jim Meyering <meyering@redhat.com> - cp: diagnose invalid "cp -rl dir dir" right away, once again Running "mkdir dir; cp -rl dir dir" would create dir/dir/dir/... rather than diagnosing the "copy-into-self" failure. - The easy fix would have been to revert this part of the change [3ece0355 2008-11-09 cp: use far less memory in some cases] that introduced the bug: - - remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); + if (!x->hard_link) + remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); - However, that would have induced the failure of the new cp/link-heap test, due to the added memory pressure of recording 10k dev/ino pairs. And besides, I liked that improvement and wanted to keep it. - Now that it's obvious recording the just-created-directory dev/ino needn't depend on the setting of hard_link, I realized it is necessary to record the pair only for the first directory created for each source command-line argument. - I made that change, then noticed the new test, cp -rl a d d, would pass when run once, yet output the into-self diagnostic twice. Also note the side effect: it creates d/a and d/d. However, running that same command a second time, now with the modified directory, would fail. - That turned out to be due to the fact that although the first into-self failure was detected in copy_dir, that function would continue copying other entries regardless -- and that would make it fail (eventually) with the unwanted recursion. - * src/copy.c (copy_internal): This function needed an indicator of whether, for a give command line argument, it had already created its first directory. If so, no more need to record dev/ino pairs. If this @@ -22642,7 +24485,6 @@ Ensure comment for translators is included in po file Issue reported by Göran Uddeborg. - * src/system.h: Move the translator comment adjacent to the translated string. * THANKS: Update Göran's email address. @@ -22804,7 +24646,6 @@ seq: Fix equal width calculation when '.' added to last number Issue reported by Samuel Hapák. <http://lists.gnu.org/archive/html/bug-coreutils/2009-02/msg00139.html> - * src/seq.c: Account for '.' added to "last" number. * tests/misc/seq: Add corresponding test. * NEWS: Mention the fix. @@ -22868,26 +24709,20 @@ Reported by Alexander V. Lukyanov. See thread for details: http://thread.gmane.org/gmane.linux.kernel/740021/focus=14824 Thanks to Jan Engelhardt for helping me reproduce the problem. - Demonstrate with this in an 80-column xterm: seq 200 # to start in the "bottom" row touch zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo env LS_COLORS='*.foo=0;31;42' ls -og --color=always - Before the fix, you'd see something like this: (where the file name is printed in red on a green background, and each "=" denotes a space on a green background) ... -rw-r--r-- 1 0 Feb 5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\ zzzzzzzzzzzzzz.foo=================================================== - After the patch, the trailing green spaces are gone: - -rw-r--r-- 1 0 Feb 5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\ zzzzzzzzzzzzzz.foo -2009-02-10 Jim Meyering <meyering@redhat.com> - * tests/test-lib.sh: Use skip_test_... in place of echo...;exit 77. 2009-02-10 Nix <nix@esperi.org.uk> @@ -22973,7 +24808,6 @@ This patch was originally written by Andreas Grünbacher, nowadays available at http://www.suse.de/~agruen/coreutils/5.91/coreutils-xattr.diff - * bootstrap.conf: Add gnulib module verror. * po/POTFILES.in: Add lib/verror.c. * m4/xattr.m4: Check for libattr availability, new configure option @@ -23018,37 +24852,30 @@ * tests/misc/shred-passes: Verify the operations shred does by default to overwrite and remove a zero length file. -2009-01-28 Pádraig Brady <P@draigBrady.com> - dd: Better handle user specified offsets that are too big Following are the before and after operations for seekable files, for the various erroneous offsets handled by this patch: - skip beyond end of file before: immediately exit(0); after : immediately printf("cannot skip to specified offset"); exit(0); - skip > max file size before: read whole file and exit(0); after : immediately printf("cannot skip: Invalid argument"); exit(1); seek > max file size before: immediately printf("truncate error: EFBIG"); exit(1); after : immediately printf("truncate error: EFBIG"); exit(1); - skip > OFF_T_MAX before: read whole device/file and exit(0); after : immediately printf("cannot skip:"); exit(1); seek > OFF_T_MAX before: immediately printf("truncate error: offset too large"); exit(1); after : immediately printf("truncate error: offset too large"); exit(1); - skip > device size before: read whole device and exit(0); after : immediately printf("cannot skip: Invalid argument"); exit(1); seek > device size before: read whole device and printf("write error: ENOSPC"); exit(1); after : immediately printf("cannot seek: Invalid argument"); exit(1); - * NEWS: Summarize this change in behavior. * src/dd.c (skip): Add error checking for large seek/skip offsets on seekable files, rather than deferring to using read() to advance offset. @@ -23279,7 +25106,6 @@ (gl_CHECK_ALL_TYPES): Likewise. * m4/lib-check.m4 (cu_LIB_CHECK): Likewise. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Likewise. - FYI, I first ran this command: git ls-files | grep -E '\.(m4|ac)$' | xargs perl -pi \ -e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \ @@ -23375,7 +25201,6 @@ add configure-time --enable-gcc-warnings option; avoid warnings". Pádraig Brady spotted the contradiction between the log message and actual change. - This reverts commit 292d68565a34b237cd2bf586ace545b7cd3dbfcf. 2008-12-23 Pádraig Brady <P@draigBrady.com> @@ -23780,7 +25605,6 @@ for all but the C/POSIX locale. * src/system.h: Include "hard-locale.h". (emit_bug_reporting_address): Tell where to report translation bugs. - don't include "hard-locale.h", now that system.h does * src/comm.c: Likewise. * src/join.c: Likewise. @@ -23791,8 +25615,6 @@ * src/uniq.c: Likewise. * src/who.c: Likewise. -2008-11-10 Jim Meyering <meyering@redhat.com> - avoid warnings about discarding "qualifiers from pointer target type" Use the new "bad_cast" function or an actual cast-to-"(char *)" to avoid warnings. @@ -23909,7 +25731,6 @@ 'factor'. The case for removing --bignum isn't as strong as that for 'expr', but still, it seems to me that these options are not needed and complicate the documentation unnecessarily. - * doc/coreutils.texi (factor invocation): Remove --bignum, --no-bignum. * src/factor.c (algorithm, ALGORITHM_CHOICE, USE_BIGNUM, NO_USE_BIGNUM): Remove; all uses removed. @@ -23976,7 +25797,6 @@ Add better checks and docs for build tools Prompted by a report from Ed Avis: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14710> - * README-hacking: Organise LZMA and Valgrind as as optional requirements rather than in their own sections. Mention bootstrap will now check tool versions. @@ -24364,8 +26184,6 @@ * tests/rm/ext3-perf: New file. Test for the performance fix. * NEWS: mention the new feature -2008-09-26 Jim Meyering <meyering@redhat.com> - remove.c: don't use xmalloc; don't let obstack call exit on failure (obstack_chunk_alloc, obstack_chunk_free): Don't define. (top_dir): Param is no longer "const". @@ -24379,11 +26197,8 @@ (ds_free): Don't free DS, now that it's no longer malloc'd. (rm): Allocate DS on the stack. Arrange to handle ds_init allocation failure. - step1 -2008-09-26 Jim Meyering <meyering@redhat.com> - * maint.mk (my-distcheck): remove duplicate c99-related test code maint: allow more C99 constructs; stop maintaining c99-to-c89 patch set @@ -24391,26 +26206,20 @@ With the recent changes to remove.c, I no longer wish to maintain the c99-to-c89 patch set. -2008-09-26 Jim Meyering <meyering@redhat.com> - seq -0.1 0.1 2: print final number when locale's decimal point is "," * src/seq.c (print_numbers): Use strtold, not c_strtold to convert from just-formatted-using-asprintf string back to double, since asprintf may have used something other than "." as the decimal point. Reported by lsof@nodata.co.uk as <http://bugzilla.redhat.com/463556>. Thanks to Ondřej Vašík for discovering that the bug was locale-related. - $ LC_ALL=cs_CZ.UTF-8 seq -0.1 0.1 2|grep 2.0 [Exit 1] $ seq -0.1 0.1 2|grep 2.0 2.0 - * tests/check.mk (TESTS_ENVIRONMENT): Add LOCALE_FR_UTF8, for... * tests/misc/seq [locale-dec-pt]: New test for the above. * NEWS (bug fix): Mention it. -2008-09-26 Jim Meyering <meyering@redhat.com> - maint: relax a check so "make distcheck" succeeds again * maint.mk (makefile-check): Relax the check, in order to exempt the necessary use of a sole @...@-delimited Makefile.am variable. @@ -24555,21 +26364,15 @@ Avoid failure on Solaris 11, since their /bin/sh passes the tests in posix-shell.m4, yet does not support "local" (which is not POSIX). -2008-09-10 Jim Meyering <meyering@redhat.com> - tests: use "Exit $fail", not (exit $fail); exit $fail * tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63 * tests/**: Convert all uses: - This restrictive change converted the vast majority: - git grep -l '^(exit \$fail); exit \$fail$' \ | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/' - And this did the rest, plus a few undesirable ones, so I manually backed out the changes to ChangeLog-* and build-aux/check.mk: - git grep -l -E '\(exit [^)]+\); exit ' \ | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/' @@ -25131,7 +26934,6 @@ tests: expand: test for lines starting with both spaces and tabs The expand released in current distributions (Fedora Core 4 - Fedora 9 at least), doesn't expand --initial tabs if spaces are present. - tests/misc/expand: Add test to verify --initial works correctly with lines starting with both spaces and tabs. @@ -26153,8 +27955,6 @@ * tests/Makefile.am (TESTS): Add misc/invalid-opt. * tests/misc/invalid-opt: New file. -2008-05-17 Jim Meyering <meyering@redhat.com> - tests: remove ugly /bin/sh wrapper around each perl-based test script * tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around envvar-check, so that the few scripts that require $TMPDIR don't fail. @@ -26163,20 +27963,16 @@ FIXME: this is pretty ugly. maybe undo it and find a better way. (TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T if the script requires that. Otherwise, use $(SHELL). - * tests/misc/md5sum-newline: Create a file whose name contains a newline in Perl (resort to using "system", since open refuses). - Fix old brokenness exposed by this change: * tests/du/files0-from: Correct test not to rely on stdin being attached to a non-tty. * tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file. Avoid warnings about using qw()-around-commas. - * tests/rm/fail-eperm: Now that this test is run from a temporary subdirectory, adjust the full name of the "rm" program we're going to run. - Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines of boilerplate code to invoke perl. Do not "require 5.00x"; a configure-time Perl test handles that @@ -26394,18 +28190,13 @@ * tests/head/in-1024: Remove file. * tests/Coreutils.pm (triple_test): New function. -2008-05-06 Jim Meyering <meyering@redhat.com> - tests: Coreutils.pm improvements * tests/Coreutils.pm: Allow test names longer than 12. Print a useful diagnostic for bogus spec entry. - Handle the combination of IN_PIPE and ENV properly. * tests/Coreutils.pm (run_tests): Put ENV right before command, not before the "cat INPUT_FILE |" prefix. -2008-05-06 Jim Meyering <meyering@redhat.com> - tests: move "sparse-file" into test-lib.sh * tests/sparse-file: Remove file Move contents into ... * tests/test-lib.sh (require_sparse_support_): ...here. New function. @@ -26562,8 +28353,6 @@ * maint.mk (sc_prohibit_strcmp): Relax regexp to recognize other formatting styles. -2008-05-06 Jim Meyering <meyering@redhat.com> - avoid problems with sign-extended "char" operand to is* functions * src/cut.c (set_fields): Apply to_uchar to isblank operands. * src/uniq.c (find_field): Likewise. @@ -26574,19 +28363,14 @@ * configure.ac: Use gt_LOCALE_FR. * tests/check.mk (TESTS_ENVIRONMENT): Propagate LOCALE_FR to scripts. * NEWS: Mention the bug fixes. - Before this patch, on FreeBSD 6: - $ printf 'x y z\nx \xa0 y z\n' > in $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' . x.y.z x. .y.z - With the patch: - $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' . x.y.z - This also affected many other locales: for i in $(locale -a); do test $(LC_ALL=$i ./uniq -f1 in|wc -l) = $(LC_ALL=$i uniq -f1 in|wc -l) || echo $i ; done @@ -26802,7 +28586,6 @@ http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13345 This also reverts the bug-fix that applied solely to the new code used to avoid printing those IDs - Revert "id bug fix: don't point to potentially clobbered static storage" This reverts commit f7d1c59c224f81a8bab5fa2afcaf815988f50467. Revert "Work around AFS bug: id and groups would print invalid group number." @@ -26859,25 +28642,18 @@ * maint.mk (sc_root_tests): Adapt rule to new syntax used in tests/Makefile.am. -2008-04-20 Jim Meyering <meyering@redhat.com> - Revamp test-related Makefiles. One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). - Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. - A lot of these changes are like this: - -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default - -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh - * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... @@ -26887,8 +28663,6 @@ (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries. -2008-04-20 Jim Meyering <meyering@redhat.com> - * tests/misc/Makefile.am (built_programs): Remove. Unused. Use "env" to invoke potential built-ins. @@ -27643,7 +29417,6 @@ Make copyright comments consistent. * src/mktemp.c: Update copyright to use newer form. - Make first copyright lines consistent. Some did not end in ", Inc.". Due to that missing ", Inc" at end of line, emacs' copyright-updating code missed some opportunities. This corrects most of those, and @@ -27806,14 +29579,11 @@ * Makefile.am (check-ls-dircolors): New rule. (distcheck-hook): Depend on it. -2008-02-17 Jim Meyering <meyering@redhat.com> - Expand "ls --color" tests to also use the dircolors defaults. * tests/misc/ls-misc: Adjust this test so each is run twice. First, as usual, and the second time with LS_COLORS set using the default settings produced by running dircolors. * tests/Coreutils.pm: See below. - This required some changes: - save and restore $ENV{LS_COLORS} for each individual test that requires a specific value. @@ -27821,8 +29591,6 @@ than once, it has exposed that that function erroneously modifies the \@Tests array. Fix that in tests/Coreutils.pm. -2008-02-17 Jim Meyering <meyering@redhat.com> - Adjust dircolors to match ls.c. * src/dircolors.hin: comment out NORMAL and FILE, define RESET. * src/dircolors.c (slack_codes) Add "RESET". @@ -27995,8 +29763,6 @@ * Makefile.maint (sc_root_tests): Reflect this change: search for the new function name. -2008-02-09 Jim Meyering <meyering@redhat.com> - tests: factor out the perl-requiring code in many test scripts * tests/require-perl: New file. * tests/Makefile.am (EXTRA_DIST): Add require-perl. @@ -28044,11 +29810,8 @@ * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/unreadable: Likewise. - (EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script. -2008-02-09 Jim Meyering <meyering@redhat.com> - tests: call skip_test_ in place of echo+exit 77 * tests/mv/no-target-dir: Likewise. * tests/other-fs-tmpdir: Likewise. |