summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-02-12build: update gnulib, bootstrap, gl/lib/regcomp.c.diffJim Meyering
* gnulib: Update submodule to latest. * bootstrap: Update from gnulib. * gl/lib/regcomp.c.diff: Adapt to gnulib changes.
2012-02-12mv: "mv A B" would sometimes succeed, yet A would remain, ...Jim Meyering
But only when both A and B were hard links to the same symlink. * src/copy.c (same_file_ok): Handle another special case: the one in which we are moving a symlink onto a hard link to itself. In this case, we must explicitly tell the caller to unlink the source file. Otherwise, at least the linux-3.x kernel rename function would do nothing, as mandated by POSIX 2008. * tests/mv/symlink-onto-hardlink-to-self: New test. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. Reported by Bernhard Voelker in http://bugs.gnu.org/10686
2012-02-06maint: add braces as requested by HACKING coding standardJérémy Compostella
* src/dd.c (dd_copy): Braces were missing for this do/while statement.
2012-01-31doc: clarify --help output for some optional argumentsPádraig Brady
* src/pr.c (usage): Fix the -S description to indicate that the argument is optional for the short option. * doc/coreutils.texi (pr invocation): Likewise. * src/od.c (usage): Fix the -S description to indicate that the argument is required for the short option. Clarify -w takes an argument and that it is optional.
2012-01-30maint: sort: remove the last uses of "'%s'" in diagnosticsJim Meyering
* src/sort.c (key_warnings): Use quote (quote_n, since there are two) rather than literal single quotes ('%s') in diagnostic.
2012-01-30mv: allow moving symlink onto same-inode dest with >= 2 hard linksJim Meyering
Normally, mv detects a few subtle cases in which proceeding with a same-file rename would, with very high probability, cause data loss. Here, we have found a corner case in which one of these same-inode tests makes mv refuse to perform a useful operation. Permit that corner case. * src/copy.c (same_file_ok): Detect/exempt this case. * tests/mv/symlink-onto-hardlink: New test. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. Initially reported by: Matt McCutchen in http://bugs.gnu.org/6960. Raised again by Anders Kaseorg due to http://bugs.debian.org/654596. Improved-by: Paul Eggert.
2012-01-30build: update gnulib, for syntax-check vs canonicalize fixJim Meyering
2012-01-27maint: use single copyright year rangeJim Meyering
Run "make update-copyright".
2012-01-27maint: make copyright statements more consistent; update gnulibJim Meyering
* cfg.mk (update-copyright-env): Add UPDATE_COPYRIGHT_FORCE=1 to rejoin some split lines, and UPDATE_COPYRIGHT_USE_INTERVALS=2 to make update-copyright use only one year range. * gnulib: Update to latest, for newer update-copyright script.
2012-01-27maint: fix copyright in old fileutils ChangeLogJim Meyering
* old/fileutils/ChangeLog-1997: Insert omitted "Free Software" in the name of the copyright holder. Compress year range.
2012-01-26maint: remove some redundant automake _SOURCESPádraig Brady
* src/Makefile.am: Remove auto generated entries.
2012-01-25maint: cleanup an extraneous version output in a testPádraig Brady
* test/misc/stdbuf: Fixup the minor copy & paste issue introduced in commit ff7f0ff8
2012-01-25realpath: avoid the use of printfPádraig Brady
This was seen to give an 11% performance improvement. * src/realpath.c (relpath): Avoid using printf. (process_path): Likewise.
2012-01-25maint: use the standard require_perl_ functionPádraig Brady
* tests/cp/sparse-fiemap: Don't use a separate check.
2012-01-25realpath: remove extraneous '/' for --relative-to edge casesPádraig Brady
* src/realpath.c (path_common_prefix): Be consistent and always include a leading '/' in the count returned. (relpath): Account for the change in path_common_prefix() and avoid outputting extra '/' chars in relative paths that span the root dir. * tests/misc/realpath: Add the two reported cases. Reported by Mike Frysinger
2012-01-23build: update gnulib to latest, for test warning fixesJim Meyering
See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29810 for details.
2012-01-23tests: remove crufty test=test_name code from old testsJim Meyering
Before init.sh and similar, we would set test=test_name, and then construct temporary file names using $test. Now that each init.sh-using test is in its own directory, that practice is unwelcome. Remove bad examples. * tests/rm/f-1: Per above. * tests/rm/i-1: Likewise. * tests/rm/interactive-always: Likewise. * tests/rm/interactive-once: Likewise. * tests/rm/ir-1: Likewise. * tests/rm/r-1: Likewise.
2012-01-22maint: quote 'like this' or "like this", not `like this'Paul Eggert
* doc/coreutils.texi (Formatting the file names): coreutils now quotes 'like this'. * man/help2man: * src/timeout.c (usage): Quote 'like this' in diagnostics. * HACKING, Makefile.am, NEWS, README, README-hacking, TODO, cfg.mk: * doc/Makefile.am, doc/coreutils.texi, m4/jm-macros.m4: * man/Makefile.am, man/help2man, src/Makefile.am, src/copy.h: * src/extract-magic, src/ls.c, src/pinky.c, src/pr.c, src/sort.c: * src/split.c, src/timeout.c, src/who.c, tests/dd/skip-seek-past-file: * tests/pr/pr-tests: Quote 'like this' in commentary. * cfg.mk (old_NEWS_hash): Update due to changed old NEWS.
2012-01-20stat: clarify the description of the %o stat formatPádraig Brady
* src/stat.c (usage): Indicate this is a transfer size suggestion, rather than some persistent block size. * doc/coreutils.texi (stat invocation): Likewise.
2012-01-14doc: tweak an @uref so its alt reference text renders in infoJim Meyering
* doc/coreutils.texi (Opening the software toolbox): Remove commas from @uref argument, so the alternate text renders properly in info. Reported by Reuben Thomas.
2012-01-11maint: fix minor whitespace issuesPádraig Brady
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.
2012-01-11maint: adjust formatting of certain continued stringsJim Meyering
Add a rule to ding any source file that has a continued string with a word in the first column of the following line. Those tend to trigger malfunction in tools that try to map an arbitrary line number to an enclosing function name. Of course, very many strings do precisely this, *when they are part of the usage function*. So we exempt the body of each usage function. * src/dircolors.c (main): Separate a long, continued string into two separately-quoted parts. * src/od.c (decode_one_format): Likewise. (decode_one_format, main): Move a space from end of preceding line to the beginning of the continued line. * src/tr.c (unquote, string2_extend, validate): Likewise. * src/seq.c (main): Split in two and use string concatenation. * src/stat.c (default_format): Use a mix of techniques. * cfg.mk (sc_prohibit_continued_string_alpha_in_column_1): New rule. Exempt three files in src: system.h, od.c, printf.c.
2012-01-09maint: straggler *.[ch] files: convert more `...' to '...'Jim Meyering
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-09maint: src/*.[ch]: convert more `...' to '...'Jim Meyering
Run this (twice): git grep -E -l '`.+'\' src/*.[ch] \ |xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
2012-01-09maint: src/*.c: change remaining quotes (without embedded spaces)Jim Meyering
Run this (twice): git grep -E -l '`[^ ]+'\' src/*.c \ |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
2012-01-09maint: convert `...' to '...' in --help outputJim Meyering
All affected lines end with \ or \n\, so run this command until it produces no new changes (4 times): git grep -E -l '`[^ ]+'\''.*\\' src \ |xargs perl -pi -e 's/`([^ ]+'\''.*\\)/'\''$1/'
2012-01-09maint: adjust quoting: emit '...', not `...' in diagnosticsJim Meyering
* src/csplit.c (parse_repeat_count, extract_regexp): As above. * src/date.c (main): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (decode_one_format, main): Likewise. * src/pathchk.c (no_leading_hyphen): Likewise. * src/pr.c (main, getoptarg): Likewise. * src/rm.c (diagnose_leading_hyphen): Likewise. * src/sort.c (key_warnings, incompatible_options, main): Likewise. * src/stat.c (print_esc_char): Print '\x', not `\x' in diagnostic. * src/test.c (main): Likewise. * src/touch.c (main): Likewise. * src/tr.c (build_spec_list, validate, append_range): Likewise. * tests/misc/mktemp: This is an unusual case, since the affected string contains only the ` of an `...' string. So we change the long ` to a lone '. * tests/pr/pr-tests: Manual quote adapting fix-up. * tests/ln/hard-to-sym: Likewise. * tests/split/suffix-length: Likewise. * tests/mv/part-fail: Likewise. * tests/misc/chcon: Likewise. * tests/misc/stat-printf: Likewise.
2012-01-09tests: more automated quote adjustmentJim Meyering
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' The last disjunct in the above (...) filter is to exempt any line that contains this string: '\'' 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-09tests: change `...' to '...' on lines not matching /[=\$]/Jim Meyering
Exempt lines with '$' or '=', since those are prone to improper conversion. Run this: git grep -l "\`[^']*'" tests \ |xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
2012-01-09tests: adjust \`...' quoting to '...' to adapt to latest gnulibJim Meyering
Run this: git grep -l "\\\\\`[^']*'" tests \ |xargs perl -pi -e 's/\\\`(.*?'\'')/'\''$1/g
2012-01-09build: update gnulib submodule to latest (quoting change)Jim Meyering
This pulls in changes to the quote and quotearg modules that render quoted strings in diagnostics. `Old' vs 'new'.
2012-01-09maint: prep for global quoting changes: handle irregular cases manuallyJim Meyering
* src/chroot.c (usage): Change ``...'' to '...', and describe the default more accurately (also adding quotes): s,/bin/sh,'/bin/sh -i', * src/join.c (usage): Change ` ...'' ' to "...''". * src/fmt.c (isopen): Change `' to '` in list of bytes, so that a subsequent change can safely perform the `...' to '...' conversion. * src/truncate.c (main): Tweak quoting in comments to use '...', not `...`, for consistency with the rest of comments in coreutils.
2012-01-07maint: update quoting of "Try `prog --help'" to "Try 'prog --help'"Jim Meyering
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-07maint: use new emit_try_help in place of equivalent fprintfJim Meyering
Run this command: perl -0777 -pi -e \ 's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\ src/*.c
2012-01-07maint: factor out all `Try --help'-emitting statementsJim Meyering
* src/system.h (emit_try_help): New function.
2012-01-06maint: post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2012-01-06version 8.15Jim Meyering
* NEWS: Record release date.
2012-01-06scripts: allow one-line summary to start with "[Vv]ersion \d"Jim Meyering
* scripts/git-hooks/commit-msg: Do not reject the commit log message generated by our automated release-and-tag process. (bad_first_line): New function, extracted from... (check_msg): ... here. Use it.
2012-01-06build: update gnulib submodule to latestJim Meyering
2012-01-06tests: adjust quoting in expected output to match new gnulib policyJim Meyering
* tests/misc/xstrtol: Use '...' to match new quoting in most places. However, leave `9x' to match the sole comparison against output from the quote function, which still uses `...'. * tests/misc/sort-merge: Likewise, though here I had to leave `...'-quoted output to match output from four tests. * tests/pr/pr-tests: Convert a single `...' to '...'. * gnulib: Update submodule to latest.
2012-01-06maint: adjust ChangeLog to reflect earlier df requestJim Meyering
* build-aux/git-log-fix: Credit early reporter. * THANKS.in: Add a name.
2012-01-05tests: avoid stty icanon issues on some platformsPádraig Brady
* tests/misc/stty: Exclude 'icanon' for the list to check, as it's problematic on ppc*|sparc* platforms.
2012-01-05tests: avoid ulimit issue on bash 3.2 on OS XPádraig Brady
* tests/misc/sort-continue: Perform the glob before 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-05tests: avoid a false positive due to overflow on Linux/HPPAPádraig Brady
* 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-05tests: adjust setfacl usage to accommodate Solaris 10Jim Meyering
* cfg.mk (sc_prohibit_short_facl_mode_spec): New rule. * tests/cp/acl: Extend setfacl mode spec to have length 3. * tests/ls/slink-acl: Likewise. * tests/mv/acl: Likewise. Report and analysis by Bruno Haible.
2012-01-05split: avoid failure due to leftover 'errno' valueBruno Haible
* src/split.c (lines_chunk_split): Fix logic bug that led to unwarranted failure of "split -n l/2 /dev/zero" on NetBSD 5.1. The same would happen when splitting a growing file, where open/lseek-end gives one size, but by the time we read, there is more data available. (bytes_chunk_extract): Likewise. * NEWS (Bug fixes): Mention this. * tests/split/l-chunk: The latter case was not exercised. Add code to do that. Bug introduced with the chunk-selecting feature in v8.7-25-gbe10739. Co-authored-by: Jim Meyering <meyering@redhat.com>
2012-01-05doc: README: recommend GNU make to run tests on IRIX 6.5 and Solaris 9Jim Meyering
* README: Document vendor "make check" failure on those two systems. Reported by Bruno Haible.
2012-01-04maint: ignore *.trs files, lib/getopt.h and build-aux/test-driverJim Meyering
* .gitignore: Also ignore automake's new .trs files and its build-aux/test-driver, as well as lib/getopt.h.
2012-01-03doc: adjust NEWSJim Meyering
* NEWS (New programs): Move this small section to the top. (df): Reword entry, from Pádraig Brady.
2012-01-03df: work around long-named /dev/disk/by-uuid/... symlinksJim Meyering
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 tmpfs tmpfs 774M /dev/disk/by-uuid/828fc648-9f30-43d8-a0b1-f7096a2edb66 ext4 11G tmpfs tmpfs 1.6G /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 tmpfs tmpfs 774M 376K 774M 1% /run /dev/sda3 ext4 11G 1.9G 8.0G 19% / tmpfs tmpfs 1.6G 8.0K 1.6G 1% /run/shm /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, I would much prefer to see only the latter. Similarly, when using 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. It was explicitly given. However, with no non-option argument, 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 UUID-suffixed symlinks. * NEWS (Changes in behavior): Mention it. Reported by Dan Jacobson in http://bugs.gnu.org/10363