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. 15 Mar, 2021 3 commits
    • Pádraig Brady's avatar
      cksum: don't exit immediately if a single file overflows · 86c8dc2e
      Pádraig Brady authored
      This behavior was introduced in commit FILEUTILS-4_0_44-4-g519b707b.
      
      * src/cksum.c (cksum_slice8): Only report the overflow, and continue.
      * src/cksum_pclmul.c (cksum_pclmul): Likewise.
      86c8dc2e
    • Pádraig Brady's avatar
      cksum: add --debug to diagnose which implementation used · b73b9fcb
      Pádraig Brady authored
      * src/cksum.c: (main): Use getopt_long to parse options,
      and handle the new --debug option.
      (pclmul_supported): Diagnose various failures and attempts.
      * NEWS: Mention the new option.
      b73b9fcb
    • Kristoffer Brånemyr's avatar
      cksum: use pclmul hardware instruction for CRC32 calculation · 4b9118cd
      Kristoffer Brånemyr authored
      Use cpuid to detect CPU support for hardware instruction.
      Fall back to slice by 8 algorithm if not supported.
      A 500MiB file improves from 1.40s to 0.67s on an i3-2310M
      
      * configure.ac [USE_PCLMUL_CRC32]: A new conditional,
      set when __get_cpuid() and clmul compiler intrinsics are supported.
      * src/cksum.c (pclmul_supported): A new function using __get_cpuid()
      to determine if pclmul instructions are supported.
      (cksum): A new function refactored from cksum_slice8(),
      which calls pclmul_supported() and then cksum_slice8()
      or cksum_pclmul() as appropriate.
      * src/cksum.h: Export the crctab array for use in the new module.
      * src/cksum_pclmul.c: A new module to implement using pclmul intrinsics.
      * po/POTFILES.in: Reference the new cksum_pclmul module.
      * src/local.mk: Likewise.  Note we build it as a separate library
      so that it can be portably built with separate -mavx etc. flags.
      * tests/misc/cksum.sh: Add new test modes for pertinent buffer sizes.
      4b9118cd
  2. 14 Mar, 2021 1 commit
    • Pádraig Brady's avatar
      maint: propagate DEPENDENCIES to libs in single binary mode · 90c4ef1f
      Pádraig Brady authored
      build-aux/gen-single-binary.sh (override_single): A new function
      to refactor the existing mappings for dir, vdir, and arch.
      This function now also sets the DEPENDENCIES variable so that these
      dependencies can be maintained later in the script, where
      we now propagate the automake generated $(src_$cmd_DEPENDENCIES)
      to our equivalent src_libsinglebin_$cmd_a_DEPENDENCIES.
      This will ensure that any required libs are built,
      which we require in a following change to cksum that
      builds part of it as a separate library.
      90c4ef1f
  3. 19 Feb, 2021 1 commit
    • Pádraig Brady's avatar
      rmdir: diagnose non following of symlinks with trailing slash · 9de1d153
      Pádraig Brady authored
      GNU/Linux is unusual here in that rmdir("symlink/") returns ENOTDIR,
      whereas Solaris and FreeBSD at least, will follow the symlink
      and remove the target directory.  We don't make the behavior
      on Linux kernels consistent, but at least clarify
      the confusing error message.
      
      * src/rmdir (main): Output a specific error message for the above case.
      (remove_parents): In the error message, don't assume intermediate paths
      are directories, as they could be symlinks.
      * tests/rmdir/symlink-errors.sh: Add a new test.
      * tests/local.mk: Reference the new test.
      * NEWS: Mention the improvement.
      9de1d153
  4. 18 Feb, 2021 1 commit
  5. 15 Feb, 2021 1 commit
  6. 10 Feb, 2021 1 commit
    • Pádraig Brady's avatar
      cat: extend --show-ends to show \r\n as ^M$ · 2de30c73
      Pádraig Brady authored
        - \r\n is common a line end combination
        - catting such a file without options causes it to display normally
        - overwriting the first char with $, loses info
      
      * src/cat.c (cat): Convert \r preceeding a \n to ^M.
      * tests/misc/cat-E.sh: New test.
      * tests/local.mk: Reference new test.
      * tests/misc/cat-proc.sh: Fix typo.
      * doc/coreutils.texi (cat invocation): Mention the new behavior.
      * NEWS: Mention the improvement.
      2de30c73
  7. 26 Jan, 2021 1 commit
    • Paul Eggert's avatar
      expr: fix bug with unmatched \(...\) · 735083ba
      Paul Eggert authored
      Problem reported by Qiuhao Li.
      * NEWS: Mention this.
      * doc/coreutils.texi (String expressions):
      Document the correct behavior, which POSIX requires.
      * src/expr.c (docolon): Treat unmatched \(...\) as empty.
      * tests/misc/expr.pl: New test.
      735083ba
  8. 25 Jan, 2021 1 commit
  9. 19 Jan, 2021 1 commit
  10. 15 Jan, 2021 1 commit
    • Paul Eggert's avatar
      mkdir: fix bug when -m's more generous than umask · e9789a1c
      Paul Eggert authored
      Problem reported by David McCall (Bug#45886).
      I introduced this problem when fixing Bug#14371.
      * NEWS: Mention the fix.
      * src/mkdir.c (struct mkdir_options): New members umask_ancestor,
      umask_self, replacing umask_value.
      (make_ancestor): Use them when temporarily adjusting umask.
      (main): Set them, and set the umask to umask_self instead
      of leaving it alone.
      * tests/mkdir/perm.sh (tests): Add test case for bug.
      e9789a1c
  11. 09 Jan, 2021 1 commit
    • Paul Eggert's avatar
      doc: modernize and fix regexp xref · 06f70d9e
      Paul Eggert authored
      * doc/coreutils.texi: Fix regexp cross-reference that had become
      out-of-date (Bug#45749).  Also, fix some obsolete references to
      SunOS and to /usr/dict/words, and change “Linux” to “GNU/Linux”
      where appropriate.  Unfortunately the pipeline example gets more
      complicated since /usr/share/dict/words is not sorted the way that
      ‘comm’ wants.
      06f70d9e
  12. 03 Jan, 2021 1 commit
  13. 02 Jan, 2021 1 commit
  14. 01 Jan, 2021 1 commit
    • Pádraig Brady's avatar
      maint: update all copyright year number ranges · 32ff1d13
      Pádraig Brady authored
      Run "make update-copyright" and then...
      
      * gnulib: Update to latest with copyright year adjusted.
      * tests/init.sh: Sync with gnulib to pick up copyright year.
      * bootstrap: Likewise.
      * tests/sample-test: Adjust to use the single most recent year.
      32ff1d13
  15. 28 Dec, 2020 2 commits
    • Pádraig Brady's avatar
      tests: add a test for cksum · ffb7ebfa
      Pádraig Brady authored
      * tests/misc/cksum.sh: Test basic operation.
      * tests/local.mk: Reference the new test.
      ffb7ebfa
    • Kristoffer Brånemyr's avatar
      cksum: use more efficient slice by 8 algorithm · a7533917
      Kristoffer Brånemyr authored
      A 100MB file improves from 2.50s to 1.80s on a Sparc T5220
      A 100MB file improves from 0.54s to 0.13s on an i3-2310M
      
      * bootstrap.conf: Explicitly depend on byteswap,
      since now used directly by coreutils.
      * src/cksum.c (cksum): Process in multiples of 8 bytes.
      (main): Adjust for generation of expanded crctab.
      * src/cksum.h: Split now larger crctab to separate header.
      * src/local.mk: Reference the new header.
      * NEWS: Mention the improvement.
      a7533917
  16. 25 Dec, 2020 1 commit
  17. 18 Dec, 2020 2 commits
    • Pádraig Brady's avatar
      doc: remove extraneous ./src/ prefix from examples · 08b59f31
      Pádraig Brady authored
      * doc/coreutils.texi (numfmt invocation): s|./src/numfmt|numfmt|
      08b59f31
    • Pádraig Brady's avatar
      doc: add `seq inf` and `sleep inf` examples to texinfo · e5cb4aaa
      Pádraig Brady authored
      * doc/coreutils.texi (seq invocation): Mention "inf" is supported,
      and describe that it's handled specially to generate infinite
      whole integer sequences.  Also mention that such infinite generation
      is supported for integer steps up to 200.
      (sleep invocation): Give `sleep inf` as an example to sleep forever.
      * src/seq.c: Add a comment on SEQ_FAST_STEP_LIMIT, to say it's
      reflected in the texinfo description.
      e5cb4aaa
  18. 15 Dec, 2020 4 commits
    • Paul Eggert's avatar
      doc: document mkdir -m -p better · 3e61d5dd
      Paul Eggert authored
      Chris Colohan wrote that the man page did not do enough to dispel
      a common misunderstanding that “contributed to one of the scariest
      outages Google has ever seen” (Bug#45258).
      * doc/coreutils.texi (mkdir invocation):
      * src/mkdir.c (usage): Document -m vs -p better.
      3e61d5dd
    • KOBAYASHI Takashi's avatar
      nl: fix --section-delimiter handling of single characters · 567fc2c2
      KOBAYASHI Takashi authored
      * src/nl.c (main): Enforce the POSIX specified
      behavior of assuming ':' is specified after a single
      character argument to -d.
      * tests/misc/nl.sh: Add a test case.
      * NEWS: Mention the bug fix.
      567fc2c2
    • Pádraig Brady's avatar
      doc: mention the GNU extensions to nl --section-delimiter · 1935528c
      Pádraig Brady authored
      * doc/coreutils.texi (nl invocation): Mention the GNU extensions
      of allowing arbitrary length and empty delimiter strings.
      * src/nl.c (usage): Likewise.
      * tests/misc/nl.sh: Add test cases for the GNU extensions.
      1935528c
    • Pádraig Brady's avatar
      maint: refactor nl section delimiter handling · b0d527fb
      Pádraig Brady authored
      * src/nl.c (main): Update the default delimiter characters
      when passed two characters with --section-delimiter.
      Avoid redundant copies for the body and footer delimiter strings,
      and instead, just offset into the header string.
      (check_section): Avoid redundant comparing of 2 bytes of memory
      for an empty delimiter.
      b0d527fb
  19. 12 Dec, 2020 1 commit
  20. 08 Dec, 2020 1 commit
  21. 01 Dec, 2020 1 commit
  22. 27 Nov, 2020 1 commit
  23. 26 Nov, 2020 2 commits
    • Nishant Nayan's avatar
      rm: do not skip files upon failure to remove an empty dir · 6bf10835
      Nishant Nayan authored
      When removing a directory fails for some reason, and that directory
      is empty, the rm_fts code gets the return value of the excise call
      confused with the return value of its earlier call to prompt,
      causing fts_skip_tree to be called again and the next file
      that rm would otherwise have deleted to survive.
      
      * src/remove.c (rm_fts): Ensure we only skip a single fts entry,
      when processing empty dirs.  I.e. only skip the entry
      having successfully removed it.
      * tests/rm/empty-immutable-skip.sh: New root-only test.
      * tests/local.mk: Add it.
      * NEWS: Mention the bug fix.
      Fixes https://bugs.gnu.org/44883
      6bf10835
    • Pádraig Brady's avatar
      maint: mention in NEWS about new df remote fs types · b8863909
      Pádraig Brady authored
      * NEWS: Mention new remote file system types
      recognized since gnulib commit dd1fc46b.
      b8863909
  24. 23 Nov, 2020 5 commits
    • Pádraig Brady's avatar
      maint: remove no longer needed se_const helper · e53bb7ad
      Pádraig Brady authored
      This was needed before libselinux-2.3 (May 2014),
      but modern releases have the correct const declarations.
      
      * src/chcon.c: Remove se_const() wrapper.
      * src/cp.c: Likewise.
      * src/install.c: Likewise.
      * src/mkdir.c: Likewise.
      * src/mkfifo.c: Likewise.
      * src/mknod.c: Likewise.
      * src/system.h: Likewise.
      * gnulib: update to pick up const correctness fixes in selinux stubs.
      e53bb7ad
    • Pádraig Brady's avatar
      maint: fix syntax-check failure · 38204419
      Pádraig Brady authored
      * po/POTFILES.in (src/selinux.c): Remove entry as this source doesn't
      contain any translatable strings anymore; avoids a sc_po_check failure.
      38204419
    • Paul Eggert's avatar
      install: suppress "Operation not supported" false alarms · d12f5da6
      Paul Eggert authored
      At least, I *think* they are false alarms.  An SELinux expert eye
      would be welcome.
      * src/install.c (setdefaultfilecon): If selabel_lookup fails
      due to either ENOTSUP or ENODATA, don’t diagnose the issue.
      Problem reported by Kamil Dudka in:
      https://lists.gnu.org/r/coreutils/2020-11/msg00050.html
      d12f5da6
    • Paul Eggert's avatar
      maint: propagate errno better in selinux.c · b8a543fe
      Paul Eggert authored
      * src/selinux.c: Don’t include die.h; no longer needed.
      (computecon, defaultcon, restorecon): Propagate errno.
      (defaultcon, restorecon): Don’t diagnose errors or exit, as that’s
      the caller’s responsibility.
      b8a543fe
    • Pádraig Brady's avatar
      maint: use absolute paths with selabel_lookup · 7b341f08
      Pádraig Brady authored
      * src/selinux.c: selabel_lookup requires absolute paths
      (while only older matchpathcon before libselinux < 2.1.5 2011-0826 did).
      * po/POTFILES.in: Readd src/selinux.c since we now have
      a translatable error message.
      7b341f08
  25. 22 Nov, 2020 4 commits
    • Bernhard Voelker's avatar
      maint: minor cleanup · 344cf0ee
      Bernhard Voelker authored
      The previous commit introduced a couple of syntax-check failures.
      
      * .gitignore (/lib/se-label.h): Add entry to silence the
      sc_gitignore_missing check.  Sort entries in C locale.
      * po/POTFILES.in (src/selinux.c): Remove entry as this source doesn't
      contain any translatable strings anymore; avoids a sc_po_check failure.
      * src/mv.c: Replace tabs by spaces to avoid complaints by
      sc_prohibit_tab_based_indentation.
      344cf0ee
    • Paul Eggert's avatar
      build: update gnulib submodule to latest · fc372b4b
      Paul Eggert authored
      fc372b4b
    • Paul Eggert's avatar
      maint: port from matchpathcon to selabel_lookup · 3aaa42de
      Paul Eggert authored
      Ubuntu 20.10 is using a newer version of libselinux that
      complains that matchpathcon is obsolete.  Rewrite the code
      that it uses the recommended selabel_lookup instead.
      * m4/jm-macros.m4 (coreutils_MACROS): Do not check for
      matchpathcon_init_prefix, as it is no longer used.
      * src/copy.c (set_file_security_ctx): Omit process_local arg,
      as it is equivalent to !x->set_security_context.  All callers changed.
      * src/copy.h (struct cp_options): set_security_context is now of
      type struct selabel_handle *, not bool.  All uses changed.
      * src/cp.c, src/install.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
      * src/mv.c: Include selinux/label.h.
      (main): Use selabel_open for set_security context.
      * src/install.c (matchpathcon_init_prefix): Remove; now unused.
      (get_labeling_handle): New static function.
      (setdefaultfilecon, main): Use it.
      (setdefaultfilecon): Do something regardless of
      ENABLE_MATCHPATHCON, which seems to be a revenant macro.
      (setdefaultfilecon): Use selabel_lookup instead of the obsolescent
      matchpathcon.  Report an error unless it fails due to ENOENT.
      * src/local.mk (src_ginstall_CPPFLAGS): Remove.
      * src/selinux.c: Include selinux/label.h
      Do not include die.h, error.h, canonicalize.h.
      (defaultcon, restorecon_private, restorecon):
      New arg HANDLE.  All callers changed.
      Use selabel_lookup rather than matchpathcon.
      (restorecon_private, restorecon): Don’t lose track of errno.
      * src/selinux.c, src/selinux.h:
      (restorecon): Don’t call ‘error’; that’s the caller’s job.
      Use HAVE_SELINUX_LABEL_H, not HAVE_SELINUX_SELINUX_H,
      in case there is some weird system with the former but not the latter.
      * src/selinux.h (struct selinux_handle): Add forward decl.
      3aaa42de
    • Paul Eggert's avatar
      build: port to Solaris 10 · 5c8e2716
      Paul Eggert authored
      * src/local.mk (src_ln_LDADD, src_mktemp_LDADD, src_tac_LDADD):
      Add $(LIB_CLOCK_GETTIME), since these use tempname which uses
      clock_gettime if getrandom fails.  On platforms like Solaris 10,
      clock_gettime is not in the standard C library.
      5c8e2716