and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

This project is mirrored from git://git.sv.gnu.org/coreutils.git. Pull mirroring failed .
Last successful update .
  1. 02 Jul, 2018 1 commit
  2. 01 Jul, 2018 3 commits
    • Pádraig Brady's avatar
      tests: standardize perl usage in tests · 89f7fcd0
      Pádraig Brady authored
      * 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.
      89f7fcd0
    • Pádraig Brady's avatar
      maint: copy: avoid new static analyzer warnings · 3246bc08
      Pádraig Brady authored
      * 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.
      3246bc08
    • Pádraig Brady's avatar
      maint: fix recent stale comments and spelling mistakes · 68cf7ad5
      Pádraig Brady authored
      * doc/coreutils.texi: s/seperator/separator/.
      * tests/misc/env-S.pl: Likewise.
      * src/env.c: Fix stale comment.
      68cf7ad5
  3. 27 Jun, 2018 7 commits
  4. 25 Jun, 2018 4 commits
    • Carlos Santos's avatar
      maint: fix -Werror=suggest-attribute=malloc in expr.c · 2ed7c286
      Carlos Santos authored
      Add attribute 'malloc' to mpz_get_str to prevent
      the following on GCC 8.1.1
      
        src/expr.c:117:1: error: function might be candidate for attribute
          'malloc' if it is known to return normally
            [-Werror=suggest-attribute=malloc]
         mpz_get_str (char const *str, int base, mpz_t z)
         ^~~~~~~~~~~
        cc1: all warnings being treated as errors
      
      * src/expr.c (mpz_get_str): Add _GL_ATTRIBUTE_MALLOC.
      2ed7c286
    • Pádraig Brady's avatar
      maint: update gnulib to latest · 932ec637
      Pádraig Brady authored
      * 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.
      932ec637
    • Pádraig Brady's avatar
      maint: sync longlong.h from gmp repo · da077369
      Pádraig Brady authored
      * src/longlong.h: Sync changes.  No functional change.
      da077369
    • Pádraig Brady's avatar
      maint: avoid false positive in src/fs-magic-compare · 07df2604
      Pádraig Brady authored
      * 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`
      07df2604
  5. 23 Jun, 2018 1 commit
  6. 21 Jun, 2018 10 commits
    • Jim Meyering's avatar
      maint: do not depend directly on gnulib's now-unused ftello module · cb1f253e
      Jim Meyering authored
      * bootstrap.conf (gnulib_modules): Remove ftello, since it is
      no longer used directly, since v8.9-11-geab97b30.
      cb1f253e
    • Pádraig Brady's avatar
      tests: provide an option to relax the need for gdb · ac7bd90c
      Pádraig Brady authored
      * tests/rm/r-root.sh: gdb provides extra protection,
      but is not strictly necessary.  So provide an option
      for maintainers to relax the requirements.
      ac7bd90c
    • Pádraig Brady's avatar
      rm: add --preserve-root=all to protect mounts · c932e5c9
      Pádraig Brady authored
      * 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.
      c932e5c9
    • Adam Borowski's avatar
      cp: add --reflink=never to force standard copy mode · 163df41d
      Adam Borowski authored
      This mode is currently the default, but most if not all users of
      reflink-capable filesystems want --reflink=auto, which is often
      encapsulated into an alias.  Adding --reflink=never allows overriding
      such an alias.
      
      * doc/coreutils.texi (cp invocation): Describe the new option.
      * src/cp.c: Support --reflink=never.
      * tests/cp/reflink-auto.sh: Add a test case.
      * NEWS: Mention the new feature.
      163df41d
    • Assaf Gordon's avatar
      env: add -S/--split-string option · 668306ed
      Assaf Gordon authored
      Adopted from FreeBSD's env(1), useful for specifing multiple
      parameters on a shebang (#!) script line, e.g:
      
         #!/usr/bin/env -S perl -w -T
      
      Discussed in https://lists.gnu.org/r/coreutils/2018-04/msg00011.html
      
      * src/env.c (valid_escape_sequence,escape_char,scan_varname,
        extract_varname,validate_split_str,build_argv,
        parse_split_string): New functions.
        (main): Process new option and call parse_split_string.
        (usage): Mention new option.
      * tests/misc/env-S.pl: Test new option from the command line.
      * tests/misc/env-S-script.sh: Test new option from shebang scripts.
      * tests/local.mk (all_tests): Add new tests.
      * man/env.x (OPTIONS): Show a brief example of -S usage and point to
      the full documentation for more information.
      * doc/coreutils.texi (env invocation): Detail usage of -S/--split-string
      option.
      * NEWS: Mention new option.
      668306ed
    • Assaf Gordon's avatar
      env: add -v/--debug option · a0118a71
      Assaf Gordon authored
      Prints verbose information about each step:
      
        $ env -v -uFOO  -C /tmp BAR=BAZ date -u
        env: unset:    FOO
        env: setenv:   BAR=BAZ
        env: chdir:    '/tmp'
        env: executing: date
        env:    arg[0]= ‘date’
        env:    arg[1]= ‘-u’
        Sun Apr 22 08:52:30 UTC 2018
      
      Inspired by FreeBSD's env(1).
      
      * src/env.c (usage): Mention new option.
        (main): Print debug information if requested.
      * NEWS: Mention new option.
      * doc/coreutils.texi (env invocation): Mention -v/--debug.
      a0118a71
    • Assaf Gordon's avatar
      maint: refactor unsetenv call in env · 068b46e7
      Assaf Gordon authored
      Keep unset envvars (-uFOO) in an array for later deletion,
      instead of reiterating over argv.  Done in preparation for
      '-S string' feature. Related to '-u' discussion in
      https://lists.gnu.org/r/coreutils/2018-04/msg00013.html
      
      * src/env.c (append_unset_var,unset_envvars): New functions.
       (main): Use new functions.
      068b46e7
    • Kaxandra Labat's avatar
      ls: ignore case when coloring file extensions · 24053fbd
      Kaxandra Labat authored
      * src/ls.c (get_color_indicator): s/STREQ_LEN/c_strncasecmp/
      * src/dircolors.hin: Remove a now redundant entry.
      * tests/ls/color-ext.sh: Add a new test.
      * tests/local.mk: Reference the new test.
      * NEWS: Mention the change in behavior.
      24053fbd
    • Pádraig Brady's avatar
      md5sum,b2sum,sha*sum: support -z,--zero option · c744c65f
      Pádraig Brady authored
      * 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.
      c744c65f
    • Pádraig Brady's avatar
      wc: optimize processing of ASCII in multi byte locales · 77517a99
      Pádraig Brady authored
      ===== 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.
      77517a99
  7. 14 Jun, 2018 1 commit
  8. 13 Jun, 2018 1 commit
    • Paul Eggert's avatar
      doc: port man pages to doclifter · de73c801
      Paul Eggert authored
      Problem reported by Eric S. Raymond (Bug#31803).
      * man/test.x: Add SYNOPSIS section, since help2man
      understandably gets confused by the square brackets.
      * src/ln.c (usage): Omit parenthetical "(Nth form)" in usage,
      as it confuses doclifter.
      de73c801
  9. 03 Jun, 2018 1 commit
  10. 29 May, 2018 1 commit
  11. 26 May, 2018 1 commit
    • Bjarni Ingi Gislason's avatar
      doc: formatting fixes in "du.x" and "rm.x" · fb1ca341
      Bjarni Ingi Gislason authored
      Avoid warnings from: groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
      
      * man/du.x: Change ".BR" to ".B" if there is only one argument.
      Protect an end-of-sentence indicator (.?!) with '\&'
      if it does not mean an end of a sentence.
      Change '--' to '\-\-' if it indicates an option.
      * man/rm.x: Change '\=' to '='.
      fb1ca341
  12. 18 May, 2018 1 commit
    • Pádraig Brady's avatar
      cp: with --force; replace self referential symlinks · c732388f
      Pádraig Brady authored
      * 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
      c732388f
  13. 15 May, 2018 4 commits
    • Pádraig Brady's avatar
      cp: fix symlink checks when overwriting files · d3daa950
      Pádraig Brady authored
      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
      d3daa950
    • Pádraig Brady's avatar
      cp: ensure --remove-destination doesn't traverse symlinks · a3910075
      Pádraig Brady authored
      * 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
      a3910075
    • Pádraig Brady's avatar
      maint: make chmod/chgrp/chown leak free under valgrind · 694d10b7
      Pádraig Brady authored
      * 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.
      694d10b7
    • Pádraig Brady's avatar
      doc: improve formatting of nl --help · a5d158ab
      Pádraig Brady authored
      * src/nl.c (usage): Better delineate the information.
      a5d158ab
  14. 14 May, 2018 1 commit
  15. 04 May, 2018 2 commits
  16. 03 May, 2018 1 commit
    • Paul Eggert's avatar
      maint: port to GCC 8 · 9781fcd5
      Paul Eggert authored
      * src/chown-core.h (chopt_free, gid_to_name, uid_to_name):
      No longer const.
      * src/make-prime-list.c (xalloc): Add malloc attribute.
      * src/who.c (make_id_equals_comment): Work around GCC bug 85602
      by using mempcpy rather than strncat.  Although the old code
      was correct, strncat raises so many hackles that it’s not
      worth maintaining its use here.
      9781fcd5