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. 10 May, 2012 6 commits
    • Jim Meyering's avatar
      version 8.17 · e9024b7d
      Jim Meyering authored
      * NEWS: Record release date.
      e9024b7d
    • Jim Meyering's avatar
      tests: misc/tty-eof: increase timeout to avoid unwarranted failure · 3a696dee
      Jim Meyering authored
      * tests/misc/tty-eof: Increase timeout from 1s to 10s, to avoid
      unwarranted failure under heavy load.
      * tests/Makefile.am (TESTS): Move misc/tty-eof "up" to nearer the
      beginning of the list (from near the middle) so that it is started
      earlier in parallel test runs.  Otherwise, it would frequently be
      among the last two tests to complete.
      3a696dee
    • Jim Meyering's avatar
      stat,tail: recognize new FS types: bdevfs, inodefs, qnx6 · e1210714
      Jim Meyering authored
      * src/stat.c (human_fstype) [__linux__]: Add 'case's for these local
      file system types: bdevfs (0x62646576), inodefs (0x42494E4D),
      qnx6 (0x68191122).
      Now that the kernel has a name for S_MAGIC_BINFMTFS, use
      theirs in place of our S_MAGIC_BINFMT_MISC.
      * NEWS (New features): Mention it.
      e1210714
    • Jim Meyering's avatar
      scripts: encourage use of shorter "bugs.gnu.org" in bug URLs · 53276320
      Jim Meyering authored
      * scripts/git-hooks/commit-msg: Also ding debbugs.gnu.org URLs.
      53276320
    • Paul Eggert's avatar
      maint: handle file sizes more reliably · 9d308df1
      Paul Eggert authored
      Problem reported by Samuel Thibault in <http://bugs.gnu.org/11424>.
      * NEWS: Document this.
      * src/dd.c (skip): Handle skipping past EOF on shared or typed
      memory objects the same way as with regular files.
      (dd_copy): It's OK to truncate shared memory objects.
      * src/du.c (duinfo_add): Check for overflow.
      (print_only_size): Report overflow.
      (process_file): Ignore negative file sizes in the --apparent-size case.
      * src/od.c (skip): Fix comment about st_size.
      * src/split.c (main):
      * src/truncate.c (do_ftruncate, main):
      On files where st_size is not portable, fall back on using lseek
      with SEEK_END to determine the size.  Although strictly speaking
      POSIX says the behavior is implementation-defined, in practice
      if lseek returns a nonnegative value it's a reasonable one to
      use for the file size.
      * src/system.h (usable_st_size): Symlinks have reliable st_size too.
      * tests/misc/truncate-dir-fail: Don't assume that getting the size
      of a dir is not allowed, as it's now allowed on many platforms,
      e.g., GNU/Linux.
      9d308df1
    • Paul Eggert's avatar
      stat: don't report negative file size as huge positive number · 2c436dec
      Paul Eggert authored
      * src/stat.c (print_stat): Use out_int, not out_uint for stat.st_size.
      * NEWS (Bug fixes): Mention it.
      2c436dec
  2. 08 May, 2012 5 commits
    • Jim Meyering's avatar
      split: avoid apparent infloop when splitting /dev/zero w/-n on the Hurd · a6f94fce
      Jim Meyering authored
      * src/split.c (main): Use stat.st_size only for regular files.
      Samuel Thibault reported in http://bugs.gnu.org/11424 that the
      /dev/zero-splitting tests would appear to infloop on GNU/Hurd,
      because /dev/zero's st_size is LONG_MAX.  It was only a problem
      when using the --number (-n) option.
      * NEWS (Bug fixes): Mention it.
      This bug was introduced with the --number option, via
      commit v8.7-25-gbe107398
      a6f94fce
    • Jim Meyering's avatar
      build: update gnulib submodule to latest; also bootstrap and init.sh · 30071b2f
      Jim Meyering authored
      * bootstrap: Update from gnulib.
      * tests/init.sh: Likewise.
      30071b2f
    • Pádraig Brady's avatar
      doc: clarify dd conv=sparse usage with devices · be2dabef
      Pádraig Brady authored
      * doc/coreutils.texi (dd invocation): Clarify that NUL blocks
      are not copied for devices either, and give examples of where
      it might be useful.
      be2dabef
    • Jim Meyering's avatar
      maint: new function: usable_st_size · 452dc6b5
      Jim Meyering authored
      452dc6b5
    • Kevin Lyda's avatar
      maint: fix common spelling errors · aa078afc
      Kevin Lyda authored
      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.
      * src/pr.c: Likewise.
      * src/tac.c: Likewise.
      * src/test.c: Likewise.
      * src/ChangeLog-2005: Likewise.
      * src/ChangeLog-2007: Likewise.
      * src/NEWS: Likewise.
      * src/doc/coreutils.texi: Likewise.
      * src/lib/ChangeLog-2007: Likewise.
      * src/man/help2man: Likewise.
      * src/old/fileutils/ChangeLog-1997: Likewise.
      * src/old/fileutils/NEWS: Likewise.
      * src/old/sh-utils/ChangeLog.0: Likewise.
      * src/old/textutils/ChangeLog: Likewise.
      * src/tests/misc/comm: Likewise.
      * src/tests/misc/uniq: Likewise.
      * src/tests/mv/dir2dir: Likewise.
      * src/cfg.mk (old_NEWS_hash): update with `make update-NEWS-hash`
      aa078afc
  3. 07 May, 2012 3 commits
  4. 04 May, 2012 2 commits
    • Jim Meyering's avatar
      build: update gnulib submodule to latest · bdc99991
      Jim Meyering authored
      bdc99991
    • Jim Meyering's avatar
      maint: rely on gnulib's new sys_resource module · c999133e
      Jim Meyering authored
      * bootstrap.conf (gnulib_modules): Add sys_resource.
      * src/sort.c: Remove #if HAVE_SYS_RESOURCE_H guard around inclusion
      of <sys/resource.h> and move the inclusion "up" into the alphabetized
      list of its peers.  This also avoids a failure of the
      sc_prohibit_always_true_header_tests syntax-check rule.
      * m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Remove sys/resource.h.
      c999133e
  5. 02 May, 2012 4 commits
    • Pádraig Brady's avatar
      cp,mv,install: provide POSIX_FADV_SEQUENTIAL hint to input · 15f1d0c9
      Pádraig Brady authored
      This was inadvertently omitted from v8.5-104-g47076e3c,
      and gives the same 5% speedup when copying from an SSD.
      
      * src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint.
      15f1d0c9
    • Jim Meyering's avatar
      maint: prohibit an operator at end of line · e744f4b7
      Jim Meyering authored
      Many coding standards, including GNU's, advocate that when
      splitting a line near a binary operator, one should put the
      operator at the beginning of the continued line, rather than
      at the end of the preceding one.  This is for readability:
      such operators are relatively important to readability, and
      they are more apparent at the beginning of a line than
      at the varying-column end of line,
      * cfg.mk (sc_prohibit_operator_at_end_of_line): New rule.
      Exempt test.c and head.c.
      e744f4b7
    • Jim Meyering's avatar
      maint: adjust comments to avoid FP match on binary-operator-at-EOL · 57e0a882
      Jim Meyering authored
      * src/ls.c (print_long_format): Reformat comment to avoid "=="
      at end of line.
      Also, "sortkey" is not a word: s/sortkey/sort key/.
      * src/ioblksize.h: Likewise, for "|" from a shell snippet.
      * src/runcon.c: Likewise, for "|" in grammar-like usage.
      57e0a882
    • Jim Meyering's avatar
      maint: with split lines, don't leave an operator at end of line · b8a6996e
      Jim Meyering authored
      * src/copy.c (copy_reg): Split an expression before a binary operator,
      not after it.
      * src/cut.c (set_fields): Likewise.
      * src/id.c (main): Likewise.
      * src/install.c (setdefaultfilecon): Likewise.
      * src/join.c (ignore_case): Likewise.
      * src/pr.c (cols_ready_to_print, init_parameters, print_page): Likewise.
      * src/stty.c (set_window_size): Likewise.
      * src/wc.c (SUPPORT_OLD_MBRTOWC): Likewise.
      * src/who.c (scan_entries): Likewise.
      * src/test.c (binary_operator): Join a split line.
      * src/extent-scan.c (extent_scan_read): Move an ">" from end of line
      to beginning of the following.
      Likewise for two other expressions.
      b8a6996e
  6. 30 Apr, 2012 1 commit
  7. 27 Apr, 2012 4 commits
    • Jim Meyering's avatar
      id: -Zn/-Zr: avoid an invalid diagnostic · c83f7232
      Jim Meyering authored
      * src/id.c (main): Using -Z with -r or -n would fail with "id: cannot
      print only names or real IDs in default format", in spite of that "-Z",
      which specifies a non-default format.  Now, it succeeds and ignores
      the -n or -r option.  The error was that the test for default_format
      was not updated when I added the new --context (-Z) option in
      commit v6.9-33-g5320d0fe.
      c83f7232
    • Jim Meyering's avatar
      id: don't call getcon unnecessarily · c8b8279d
      Jim Meyering authored
      * src/id.c (main): Invocations like "id" and "id -G" would call getcon
      to determine the current security context even though that result would
      not be used.  Similarly, when POSIXLY_CORRECT is set.  Rearrange
      conditionals and hoist the POSIXLY_CORRECT test so that we call
      getcon only when necessary.
      c8b8279d
    • Jim Meyering's avatar
      maint: id: minor factorization · a6719d9f
      Jim Meyering authored
      * src/id.c (main): Factor out uses of "argc - optind".
      Move option-consistency checks to precede the potential getcon call.
      a6719d9f
    • Jim Meyering's avatar
      id,groups: with no user name, print only real and/or effective IDs, · 032a5494
      Jim Meyering authored
      ... 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.
      When not using the password database, don't call getpwuid.
      * NEWS (Bug fixes): Mention it.
      * tests/misc/id-setgid: New file.
      * tests/Makefile.am (TESTS): Add it.
      (root_tests): It's a root-only test, so add it here, too.
      Originally reported by Brynnen Owen as http://bugs.gnu.org/7320.
      Raised again by Marc Mengel in http://bugzilla.redhat.com/816708.
      032a5494
  8. 22 Apr, 2012 1 commit
  9. 19 Apr, 2012 7 commits
    • Jim Meyering's avatar
      doc: fix a grammar nit · 6539e156
      Jim Meyering authored
      * doc/coreutils.texi (split invocation): s/are/is/ in "P or Q are".
      6539e156
    • Bernhard Voelker's avatar
      tests: factor out expensive "pairs" code of misc/stty · fdf0a449
      Bernhard Voelker authored
      * tests/Makefile.am (TESTS): Add misc/stty-pairs.
      * tests/init.cfg (stty_reversible_init_): New function.
      (stty_reversible_query_): New function.
      * tests/misc/stty: Factor out expensive "pairs" code into new test.
      Use new stty_reversible_* functions instead of evaluating static
      REV_* variables.
      * tests/misc/stty-pairs: Add new test.  Code added from misc/stty.
      Mark this as an expensive test.  Skip 'parenb' and 'cread' options,
      as these tests are known to fail.  Like in misc/stty, also use
      the new stty_reversible_* functions.
      fdf0a449
    • Bernhard Voelker's avatar
      tests: add iutf8 option to misc/stty · 26996738
      Bernhard Voelker authored
      * tests/misc/stty: Add iutf8 to the list of REV_* options.
      That option has been implemented in commit v5.2.1-193-g733e79ed.
      26996738
    • Jim Meyering's avatar
      maint: tac: use memcpy, not strcpy · 219b894d
      Jim Meyering authored
      * src/tac.c (main): Use memcpy, not strcpy, since we know the length.
      219b894d
    • Jim Meyering's avatar
      maint: ls: use stpncpy/stpcpy, not strncpy/strcpy · bcb9078e
      Jim Meyering authored
      * src/ls.c (gobble_file): Move a decl "down".
      (make_link_name): Do not hard-code '/'.  Use IS_ABSOLUTE_FILE_NAME
      and dir_len instead.
      Use stpcpy/stpncpy in place of strncpy/strcpy.
      bcb9078e
    • Jim Meyering's avatar
      maint: modernize/clean-up a small function in ls.c · 280aa28c
      Jim Meyering authored
      * src/ls.c (make_link_name): Adjust comment style to refer to VARIABLE
      names, not 'variable'.
      Move each of two declarations "down" to first use.
      Compare pointer to NULL, not to 0.
      Don't reuse local, "linkbuf" for a different purpose.
      280aa28c
    • Jim Meyering's avatar
      doc: tweak README-hacking · e50751d8
      Jim Meyering authored
      * README-hacking: Don't say "...on your hard drive".
      That is unnecessary, and now, borderline anachronistic.
      e50751d8
  10. 17 Apr, 2012 1 commit
  11. 16 Apr, 2012 1 commit
  12. 14 Apr, 2012 1 commit
  13. 12 Apr, 2012 2 commits
    • Bruce Korb's avatar
      fmt: accept new --goal=WIDTH (-g) option · 0092d5d8
      Bruce Korb authored
      Accept -g for BSD/Plan9 compatibility.
      * NEWS (New features): Mention it.
      * tests/fmt/goal-option: New test.
      * tests/fmt/long-line: Rename from tests/fmt-long-line.
      * tests/fmt/base: Rename from tests/misc/fmt.
      * doc/coreutils.texi: Document it.
      * src/fmt.c (main): Accept the new option
      (check_for_goals): new function to implement the operands
      Based on BSD's and Plan-9's fmt programs.
      0092d5d8
    • Pádraig Brady's avatar
      cp: change --attributes-only to not truncate existing files · 3d53e7fe
      Pádraig Brady authored
      * src/copy.c (copy_reg): Don't truncate an existing file,
      to support copying attributes between existing files.
      The original use case only considered creating new files,
      and it would be a very unusual use case to be relying
      on the truncating behavior.
      * doc/coreutils.texi (cp invocation): Mention the non
      truncating behavior.
      * tests/cp/attr-existing: A new test to ensure O_TRUNC skipped.
      * tests/Makefile.am: Reference the new test.
      * NEWS: Mention the change in behavior.
      3d53e7fe
  14. 04 Apr, 2012 2 commits