summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-02-18split: support optional start value for --numeric-suffixesJérémy Compostella
Allow changing the --numeric-suffixes start number from the default of 0. * src/split.c (next_file_name): Initialize the suffix index and the output filename according to start value. (main): Check that the suffix length is large enough for the numerical suffix start value. * doc/coreutils.texi (split invocation): Mention it. * NEWS (New features): Mention it. * tests/split/numeric: New file. Test --numeric-suffixes[=FROM]. * tests/Makefile.am (TESTS): Reference the new test.
2012-02-17doc: fix a typo about seek_bytes in NEWSPádraig Brady
* NEWS: s/count_bytes/seek_bytes/2
2012-02-16doc: improve 'rm -f' descriptionBernhard Voelker
* doc/coreutils.texi (rm invocation): Mention that the -f option also silences the message for missing operands, which is useful in scripts e.g., for "rm -f $file_list" when $file_list is empty. * src/rm.c (usage): Likewise. Reported by Jérémy Magrin in http://bugs.gnu.org/10819
2012-02-13dd: fix issues in the count_bytes and seek_bytes flags changePádraig Brady
These edge cases were missed in the previous commit 140eca15c. * src/dd.c (main): Include the bytes slop when truncating without further I/O. Don't invalidate the whole file cache in the case where 0 < count < ibs. * tests/dd/bytes: Change to using the independent truncate command to generate the file for comparison. Remove a redundant test case and replace with one testing the truncation only logic.
2012-02-12dd: add count_bytes, skip_bytes and seek_bytes flagsJérémy Compostella
dd now accepts the count_bytes and skip_bytes input flag and the seek_bytes output flag, to more easily allow processing portions of a file. * src/dd.c (scanargs): Compute skip_records and skip_bytes when 'skip_bytes' iflag is used. Compute max_records and max_bytes when 'count_bytes' iflag is used. Compute seek_records and seek_bytes when 'seek_bytes' oflag is used. (skip_via_lseek): Use new 'bytes' parameter and handle potential 'records' equals to zero. Update the bytes parameter when called with 'fdesc' equal to STDOUT_FILENO. Update the header comments. (dd_copy): Skip accordingly to skip_records AND skip_bytes. Count accordingly to max_records AND max_bytes. Seek on output accordingly to seek_records AND seek_bytes. * NEWS (New features): Mention it. * doc/coreutils.texi (dd invocation): Detail new flags and behaviors. * tests/dd/bytes: New file. Tests for these new flags. * tests/Makefile.am (TESTS): Add it.
2012-02-12build: correct @@-,length values in last hunk of regcomp.c.diffJim Meyering
* gl/lib/regcomp.c.diff: Correct invalid hunk lengths (s/1/7/g) in the last hunk's @@-line.
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