summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2012-01-03tests: adjust realpath test to avoid "make distcheck" failureJim Meyering
* tests/misc/realpath: Quote lhs of test ... = ..., so that when $PWD contains a space (like it does via "make distcheck"), the test does not fail
2012-01-03realpath: a new program to print the resolved pathPádraig Brady
This program is compatible with other realpath(1) implementations, and also incorporates relpath like support, through the --relative options. The relpath support was suggested by Peng Yu, who also provided an initial implemenation of that functionality. * AUTHORS: Add my name. * NEWS: Mention the new command. * README: Likewise. * doc/coreutils.texi (realpath invocation): Add realpath info. * man/Makefile.am (realpath.1): Add dependency. * man/realpath.x: New template. * man/.gitignore: Ignore generated man page. * po/POTFILES.in: Add src/realpath.c. * src/.gitignore: Exclude realpath. * src/Makefile.am (EXTRA_PROGRAMS): Add realpath. * src/realpath.c: New file. * scripts/git-hooks/commit-msg: Add realpath to the list of prefixes. * tests/Makefile.am (TESTS): Add misc/realpath. * tests/misc/realpath: New file.
2012-01-03build: update gnulib for canonicalize_filename_mode improvementsPádraig Brady
This is required for the new realpath command.
2012-01-02build: tail: avoid type/format mismatch warning from gccJim Meyering
Without this change, gcc's -Werror=format would complain that the '%lx' format requires 'long unsigned int', not 'int'. * src/tail.c (fremote): Use a temporary variable.
2012-01-01tests: also print chmod's --versionJim Meyering
* tests/rm/many-dir-entries-vs-OOM: This test also exercises chmod.
2012-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2012-01-01tests: change copyright year from 2011 to 2012 in sample-testJim Meyering
This file is special. We don't want to use a range, but merely the current year number. * tests/sample-test: s/2011/2012/
2011-12-31tests: fix a missing-dependency problemJim Meyering
* tests/check.mk (.built-programs): Depend on src/Makefile.am, so that when we add a program, this file is updated, and the new program is tested via misc/help-version. Spotted by Pádraig Brady.
2011-12-30build: avoid spurious test.c warning with -Wsuggest-attribute=pureJim Meyering
* src/test.c: Add pragma to suppress gcc-4.6.2's warning that "advance" might be candidate for attribute 'pure'.
2011-12-28tail: avoid theoretically undefined behaviorJim Meyering
* src/tail.c (start_lines): Do not form potentially-invalid address. Use safe_read's return value as a pointer offset only after ensuring that it is not SAFE_READ_ERROR (size_t)(-1). Spotted by coverity. Also, move declaration of "p" to be closer to first use.
2011-12-28tests: also unset _STDBUF_E, _STDBUF_I and _STDBUF_OJim Meyering
* tests/envvar-check (vars): Add these to the list of envvars we ignore: _STDBUF_E, _STDBUF_I, _STDBUF_O, used by libstdbuf.
2011-12-26doc: homologize ch{con,grp,mod,own} option descriptionsPádraig Brady
* src/chgrp.c (usage): Group associated options together, to aid users. Also minimize the differences between individual messages across these four commands, to aid translators. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/chcon.c (usage): Likewise. Document the --dereference option. Suggested by Paul Eggert and Jari Aalto
2011-12-26stat,tail: recognize new FS type: pipefsJim Meyering
* src/stat.c (human_fstype) [S_MAGIC_PIPEFS]: New case. * NEWS (Bug fixes): Mention this.
2011-12-24doc: stat: clarify that %t and %T expand to the file system typeJim Meyering
* src/stat.c (usage): Mention "file system type", not just "type" for %t and %T. Do not capitalize the first letter of each description.
2011-12-23tail: with -f, use polling when a file is on an FS of unknown typeJim Meyering
Before, we would use inotify in that case, which would work as long as updates were taking place locally, but not at all when remote. Move hard-coded list of known remote FS types into a more maintainable table in stat.c, alongside the list of FS names and magic numbers. Generate a new is_local_fs_type function. * src/Makefile.am (fs-is-local.h): New rule, generated file. * src/extract-magic: Revamp to parse local/remote keyword after each magic number in src/stat.c's case statements. Accept new --local option. * src/.gitignore: Ignore the generated fs-is-local.h. * src/tail.c [HAVE_INOTIFY]: Include fs-is-local.h. (fremote) [HAVE_INOTIFY]: Use the new function in place of the switch stmt with hard-coded list of FS types. Emit a warning when processing a file on a file system of unknown type. * NEWS (Changes in behavior): Mention it. Suggested by Sven Breuner.
2011-12-22doc: update README-release with process to check for new FS magicJim Meyering
* README-release: Run the Makefile rule that checks for new file system magic numbers.
2011-12-22tail,stat: add support for FhGFSJim Meyering
* src/stat.c (human_fstype): Add a case: fhgfs, 0x19830326. * src/tail.c (fremote): Add S_MAGIC_FHGFS. * NEWS (Bug fixes): Update the entry for GPFS to mention FhGFS, too. Reported by Sven Breuner.
2011-12-20doc: improve factor exampleJim Meyering
* doc/coreutils.texi (factor invocation): Adjust example to use $(...) consistently, not a mix of `...` and $(...). Separate the computation of the product and the actual factorization, so the timing of the latter doesn't include the cost of the former.
2011-12-17build: remove now-useless code from bootstrap.confJim Meyering
* bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary, snippet that edited gnulib-tests/gnulib.mk. This snippet was rendered unnecessary by commit v8.14-73-g5bf2c0e.
2011-12-17build: merge in bootstrap changes from gnulibJim Meyering
* bootstrap: Pull in the combination of gnulib's "bootstrap: detect tools required by gnulib-tool" patch and the related fix.
2011-12-14du: -x should not count files in other file systemsPaul Eggert
This fixes Bug#10293, which I guess was introduced in commit 95c948b06a dated 2003-10-02. * NEWS: Document fix. * src/du.c (process_file): Don't count files in different file systems if -x is given. * tests/du/one-file-system: Test for this bug.
2011-12-12doc: document 'touch' and timestamps betterPaul Eggert
* doc/coreutils.texi (touch invocation): Explain file timestamps better. Problem reported by Nelson H.F. Beebe (Bug#7999).
2011-12-12ls: give a more useful diagnostic for a bogus --time-style argJim Meyering
* src/ls.c (decode_switches): Replace our use of XARGMATCH with open-coded version so that we can give a better diagnostic. * tests/ls/time-style-diag: New file. * tests/Makefile.am (TESTS): Add it. Reported by Dan Jacobson in http://bugs.gnu.org/10253 with suggestions from Eric Blake and Paul Eggert.
2011-12-09maint: remove a misleading comment from shred.cJim Meyering
* src/shred.c: Remove obsolete TODO comment. The first two and the last item were done, adding --recursive (-r) is neither necessary nor appropriate, and I don't want to add --interactive. I don't see a need for the others. Prompted by comments from Amr Ali.
2011-12-08ls: be responsive to interrupts when color-listing large directoriesJim Meyering
Starting with commit adc30a83, when using --color, ls inhibited interrupts to avoid corrupting the state of an output terminal. However, for very large directories, that inhibition rendered ls uninterruptible for too long, including a potentially long period even before any output is generated. * src/ls.c: Two phases of processing are time-consuming enough that they can provoke this: the readdir loop and the printing loop. The printing was supposed to be covered by a call to process_signals in (print_name_with_quoting): ... but that call was mistakenly guarded by a condition that might be false for many or even all files being processed. Call process_signals unconditionally. (print_dir): Also call process_signals in the readdir loop. * NEWS (Bug fixes): Mention it. Reported by Arkadiusz Miśkiewicz in http://bugs.gnu.org/10243 Co-authored-by: Eric Blake <eblake@redhat.com>
2011-12-05ln: clarify usage of -L, -n, -TPaul Eggert
* src/ln.c (usage): Use clearer wording to describe the -L, -n, and -T options (Bug#9896).
2011-12-05maint: don't assume GNU make \# syntax (fix previous)Paul Eggert
* src/Makefile.am (fs_normalize_perl_subst, fs-magic, fs-kernel-magic): Undo previous patch; it missed a \#. (fs_normalize_perl_subst): Use \043 rather than \#. \043 is portable to all ASCIIish platforms, whereas \# is portable only to platforms that are compatible with GNU make (and are incompatible with POSIX make). Porting this to EBCDIC is left as an exercise for the reader....