Permalink
Commits on Jan 20, 2019
  1. build: ensure VLAs are not used

    pixelb committed Jan 14, 2019
    Fail developer builds if VLAs are used,
    as there are portability concerns to consider with them.
    
    * configure.ac: Enable -Wvla which is implicit in the full list added.
    * m4/jm-macros.m4: Define GNULIB_NO_VLA which disables use of
    VLAs within gnulib code.
  2. gnulib: update to the latest

    pixelb committed Jan 20, 2019
    * gnulib: Update to a version supporting GNULIB_NO_VLA
    * bootstrap: Sync with latest
Commits on Jan 13, 2019
  1. ls: with --group-directories-first, also group symlinked dirs

    pixelb committed Dec 27, 2018
    * src/ls.c (is_linked_directory): A new function to
    also consider symlinked directories.
    (main): Rename check_symlink_color to check_symlink_mode,
    and enable that with --group-directories-first.
    (DIRFIRST_CHECK): Adjust to use is_linked_directory,
    rather than just is_directory.
    (gobble_file): Simplify to always update f->linkmode
    if the stat() succeeds.
    * tests/ls/group-dirs.sh: A new test.
    * tests/local.mk: Reference the new test.
    * NEWS: Mention the change in behavior.
    Suggested by Amin Bandali in
    https://lists.gnu.org/r/coreutils/2018-12/msg00017.html
  2. tail: don't exit immediately with filters on AIX

    pixelb committed Jan 4, 2019
    * src/tail.c: Fix the check_output_available check on AIX.
    Note we don't use poll for all systems as the overhead
    of adding the gnulib poll module wouldn't be worth it
    just for this single use.
    * tests/tail-2/pipe-f.sh: Fix the test which always passed
    due to only the exit code of sleep being checked.
    * NEWS: Mention the bug fix and rearrange alphabetically.
    Fixes http://bugs.gnu.org/33946
Commits on Jan 4, 2019
  1. doc: adjust URLs in help to avoid wrapping

    pixelb committed Jan 1, 2019
    * src/system.h: Adjust lines containing URLs so that
    they don't wrap on 80 column terminals.  One could also
    use .UR macros, but these aren't universally available.
    Note the adjustments here need to be compatible with
    the pattern matching done in help2man.
    Addresses https://bugs.gnu.org/33914
Commits on Dec 31, 2018
  1. doc: mention that more than 8 colors are supported by ls

    pixelb committed Dec 31, 2018
    * src/dircolors.hin: Mention any codes supported by the terminal
    are allowed.
    Addresses https://bugs.gnu.org/33915
Commits on Oct 27, 2018
  1. echo: always process escapes when POSIXLY_CORRECT is set

    pixelb committed Sep 24, 2018
    * src/echo.c (main): Always enable backslash processing if
    POSIXLY_CORRECT is set.
    * tests/misc/echo.sh: Add (the first) test for the echo command.
    * tests/local.mk: Reference the new test.
    * tests/misc/printf.sh: Update a stale comment.
    * doc/coreutils.texi (echo invocation). Mention that POSIXLY_CORRECT
    now always enables backslash processing.
    * NEWS: Mention the change in behavior.
    Fixes https://bugs.gnu.org/32703
    Issue identified by Eric Blake.
Commits on Sep 24, 2018
  1. doc: csplit: clarify input may not be reproducible from output

    pixelb committed Sep 24, 2018
    * doc/coreutils.texi (csplit invocation): Clarify that
    portions of the input may be skipped and thus the input
    may not be reproducible by just concatenating the output files.
    Fixes https://bugs.gnu.org/32317
Commits on Jul 21, 2018
  1. tests: avoid false failure on sparc 32 bit

    pixelb committed Jul 15, 2018
    * tests/rm/rm-readdir-fail.sh: Skip the test entirely on 32 bit,
    so we avoid conflating the 32bit and 64 bit types, as that
    triggers alignment issues (SIGBUS) on Gentoo sparc.
    Fixes https://bugs.gnu.org/29886
Commits on Jul 5, 2018
  1. tests: fix skipping in some tests

    pixelb committed Jul 5, 2018
    * tests/cp/cp-a-selinux.sh: Use 'skip_' rather than the probably
    undefined 'skip'.
    * tests/du/2g.sh: Likewise.
    * tests/install/install-Z-selinux.sh: Likewise.
    * tests/misc/chcon.sh: Likewise.
    * tests/misc/selinux.sh: Likewise.
    * tests/mkdir/restorecon.sh: Likewise.
    * cfg.mk (sc_prohibit-skip): A new syntax check to catch the issue.
Commits on Jul 2, 2018
  1. maint: post-release administrivia

    pixelb committed Jul 2, 2018
    * NEWS: Add header line for next release.
    * .prev-version: Record previous version.
    * cfg.mk (old_NEWS_hash): Auto-update.
  2. version 8.30

    pixelb committed Jul 2, 2018
    * NEWS: Record release date.
Commits on Jul 1, 2018
  1. tests: standardize perl usage in tests

    pixelb committed Jul 1, 2018
    * tests/cp/fiemap-FMR.sh: Ensure perl is parameterized to $PERL,
    and ensure require_perl_ is used, so tests are skipped appropriately.
    * tests/cp/preserve-gid.sh: Likewise.
    * tests/du/long-from-unreadable.sh: Likewise.
    * tests/misc/env-S-script.sh: Likewise.
    * tests/misc/sort-benchmark-random.sh: Likewise.
    * tests/rm/deep-2.sh: Likewise.
  2. maint: copy: avoid new static analyzer warnings

    pixelb committed Jun 28, 2018
    * src/copy.c (copy_internal): Use the lint protected src_mode,
    rather than accessing the src_sb again.  Also unconditionally
    populate src_sb when !x->move_mode and in lint mode.
    Reported by Kamil Dudka with coverity and clang analyzer.
  3. maint: fix recent stale comments and spelling mistakes

    pixelb committed Jun 28, 2018
    * doc/coreutils.texi: s/seperator/separator/.
    * tests/misc/env-S.pl: Likewise.
    * src/env.c: Fix stale comment.
Commits on Jun 27, 2018
  1. maint: disable overly agressive sc_gitignore_redundant

    pixelb committed Jun 27, 2018
    * cfg.mk (sc_gitignore_redundant): Disabled for now as too
    aggressive flagging entries like /lib/arg-nonnull.h in
    a newly checked out repo.
  2. env: adjust diagnostics provided for shebang usage

    pixelb committed Jun 27, 2018
    * src/env.c (main): Don't process '-' specially since
    that causes an issue on the openbsd getopt implementation
    where a lone '-' is now processed as an option, and anyway
    it doesn't particuarly help diagnosing common shebang
    usage issues.  Also don't restrict the extra diagnostics
    for shebang usage to the case with 3 arguments, as
    further arguments can be passed to a script.
    * tests/misc/env-S.pl: Adjust accordingly.
  3. tests: fix false failures when perl not available

    pixelb committed Jun 26, 2018
    * tests/local.mk: Reference the stub that skips perl tests,
    with the correct path.
  4. tests: fix false failure with limited shebang lines

    pixelb committed Jun 26, 2018
    * tests/misc/env-S-script.sh: Provide a wrapper to
    emulate shebang processing, but without length limits,
    which are 127 on Linux for example.
  5. maint: update gnulib to latest

    pixelb committed Jun 27, 2018
    * gnulib: Update to latest, which incorporates
    a thread linking fix from Bruno Haible,
    which was seen on newer Ubuntu systems.
Commits on Jun 25, 2018
  1. maint: update gnulib to latest

    pixelb committed Jun 24, 2018
    * gnulib: Update to latest.
    * .gitignore: Add new entries.
    * bootstrap.conf: Enable wchar-single, which will enable more
    efficient replacements of wcwidth and mbrtowc, as we indicate
    that the charset will no change between invocations of these functions.
  2. maint: sync longlong.h from gmp repo

    pixelb committed Jun 24, 2018
    * src/longlong.h: Sync changes.  No functional change.
  3. maint: avoid false positive in src/fs-magic-compare

    pixelb committed Jun 24, 2018
    * src/local.mk (fs_normalize_perl_subst): `make src/fs-magic-compare`
    was reporting incorrectly that AFS was not being handled.
    Add a mapping to our KAFS identifier.
    * .gitignore: Add intermediate files from `make src/fs-magic-compare`
Commits on Jun 21, 2018
  1. tests: provide an option to relax the need for gdb

    pixelb committed Jun 21, 2018
    * tests/rm/r-root.sh: gdb provides extra protection,
    but is not strictly necessary.  So provide an option
    for maintainers to relax the requirements.
  2. rm: add --preserve-root=all to protect mounts

    pixelb committed Jun 11, 2018
    * src/remove.c (rm_fts): With the --preserve-root=all extension,
    reject command line arguments that are mount points.
    * src/remove.h (rm_options): Add preserve_all_root to store config.
    * src/mv.c (rm_option_init): Init preserve_all_root to false.
    * src/rm.c (main): Init preserve_all_root as per option.
    (usage): Describe the new option.
    * src/remove.c (rm_fts): Lookup the parent device id,
    and reject the cli argument if a separate file system.
    * tests/rm/one-file-system.sh: Add a test case.
    * NEWS: Mention the new feature.
  3. md5sum,b2sum,sha*sum: support -z,--zero option

    pixelb committed Jun 11, 2018
    * doc/coreutils.texi (md5sum invocation): Describe the new option,
    and how it's not supported by --check, and how it disables escaping.
    * src/md5sum.c (delim): A new global to parmeterize the out delimiter.
    (main): Don't enable file name escaping with -z, and output '\0'.
    * tests/misc/md5sum-newline.pl: Add a test case.
    * NEWS: Mention the new feature.
  4. wc: optimize processing of ASCII in multi byte locales

    pixelb committed May 18, 2018
    ===== Benchmark setup (on GNU/Linux) ====
    $ yes áááááááááááááááááááá | head -n100000 > mbc.txt
    $ yes 12345678901234567890 | head -n100000 > num.txt
    
    ===== Before ====
    $ time src/wc -Lm < mbc.txt
    real    0m0.186s
    $ time src/wc -m < mbc.txt
    real    0m0.186s
    $ time src/wc -Lm < num.txt
    real    0m0.055s
    $ time src/wc -m < num.txt
    real    0m0.056s
    
    ==== After ====
    $ time src/wc -Lm < mbc.txt
    real    0m0.196s
    $ time src/wc -m < mbc.txt
    real    0m0.173s
    $ time src/wc -Lm < num.txt
    real    0m0.031s
    $ time src/wc -m < num.txt
    real    0m0.028s
    
    * src/wc.c (wc): Only call wide variant functions like
    iswprint() and wcwidth() for non is_basic() characters.
    I.E. non ISO C "basic character set" characters.
    This is especially significant on OSX where wcwidth()
    is very expensive (about 10x in tests).
    * NEWS: Mention the improvement.
    Suggested by Eric Fischer.
Commits on Jun 3, 2018
  1. cp: preserve existing permissions with --no-preserve=mode

    pixelb committed Jun 3, 2018
    This issue was introduced in commit v8.19-145-g24ebca6
    
    * src/copy.c (copy_internal): With --no-preserve=mode,
    only reset permissions for newly created files.
    (copy_reg): Likewise.
    * NEWS: Mention the fix.
    * tests/cp/preserve-mode.sh: Add a test case.
    Fixes https://bugs.gnu.org/31675
Commits on May 29, 2018
  1. tests: fix periodic false failure in month alignment

    pixelb committed May 29, 2018
    * tests/ls/abmon-align.sh: Base relative month adjustment
    from the middle of the month, to avoid failures due
    to months being repeated.
    Fixes https://bugs.gnu.org/31644
Commits on May 18, 2018
  1. cp: with --force; replace self referential symlinks

    pixelb committed May 16, 2018
    * src/copy.c (copy_internal): Don't fail immediately upon
    getting ELOOP when running stat() on the destination,
    rather proceeding if -f specified, allowing the link
    to be removed.  If the loop is not in the final component
    of the destination path, we still fail but at the
    subsequent unlink() stage.
    * doc/coreutils.texi (cp invocation): Adjust wording to say
    that --force doesn't work with dangling links, rather than
    all links that can't be traversed.
    * tests/cp/thru-dangling.sh: Add a test case.
    * NEWS: Mention the change in behavior.
    Discussed in https://bugs.gnu.org/31335
Commits on May 15, 2018
  1. cp: fix symlink checks when overwriting files

    pixelb committed May 14, 2018
    Ensure this _does_ recreate the symlink
      Given "path1" and "path2" are on different devices.
      $ touch "path1/file"
      $ cd path2/; ln -s path1/file
      $ cp -dsf path1/file .
    
    Ensure this does _not_ overwrite file
      $ touch file
      $ ln -s file l1
      $ cp -sf l1 file
    
    * src/copy.c (same_file_ok): Remove device ids from consideration,
    instead deferring to future EXDEV with --link or allowing
    the first case above to work.
    Also ensure that we do not exist this function too early,
    when the destination file is not a symlink, which protects
    against the second case.
    * tests/cp/cross-dev-symlink.sh: Add a test for the first case.
    * tests/cp/same-file.sh: Add a test for the second case above.
    * NEWS: Mention the bug fixes.
    * THANKS.in: Mention the reporters who also analyzed the code.
    Fixes https://bugs.gnu.org/31364
  2. cp: ensure --remove-destination doesn't traverse symlinks

    pixelb committed May 4, 2018
    * src/cp.c (target_directory_operand): Allow through inaccessible
    arguments with -f or --remove.
    * doc/coreutils.texi (cp invocation): Clarify that -f doesn't directly
    impact the removal of non-traversable symlinks.
    * tests/cp/dir-rm-dest.sh: Test the new behavior.
    * tests/cp/thru-dangling.sh: Enforce -f behavior wrt symlinks.
    * NEWS: Mention the bug fix.
    Fixes https://bugs.gnu.org/31335
  3. maint: make chmod/chgrp/chown leak free under valgrind

    pixelb committed May 14, 2018
    * src/chmod.c: Deallocate the mode change array in dev mode.
    * src/chown.c: Make chopt_free() actually deallocate, but
    only call in dev mode.
    * src/chgrp.c: Likewise.
  4. doc: improve formatting of nl --help

    pixelb committed May 15, 2018
    * src/nl.c (usage): Better delineate the information.
Commits on May 4, 2018
  1. build: make GCC 8 adjustments more portable

    pixelb committed May 4, 2018
    * src/chown-core.h (chopt_free): Just define away this noop.
    * src/chown-core.c (chopt_free): Remove the empty implementation.