summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-03-02maint: avoid gcc warning about missing attributesJim Meyering
* src/prog-fprintf.h (prog_fprintf): Declare with printf attribute. * src/system.h (usage): Declare with the "noreturn" attribute.
2009-03-02maint: avoid warnings about potentially-counterproductive "inline"Jim Meyering
* src/dd.c (quit): Remove "inline" attribute. * src/test.c (advance, unary_advance): Likewise.
2009-03-02maint: cp: avoid gcc warning about unused macro definitionsJim Meyering
* src/cp.c (INITIAL_HASH_MODULE, INITIAL_ENTRY_TAB_SIZE): Remove.
2009-03-02dist: do not emit MD5 or SHA1 checksums into announcement templateJim Meyering
* maint.mk (announcement): Use announce-gen's new --no-print-checksums.
2009-02-28maint: detect unnecessary inclusion of signal.hJim Meyering
* maint.mk (sc_prohibit_signal_without_use): New rule.
2009-02-28maint: remove an unnecessary inclusion of <signal.h>Jim Meyering
* src/operand2sig.c: Don't include <signal.h>.
2009-02-28tests: sort: Check skipping blanks in multibyte localesPádraig Brady
* tests/misc/sort: On Fedora 8 at least, sort -k1b,1 mishandles blanks in multibyte locales, so add test.
2009-02-27* HACKING: avoid trailing white spaceJim Meyering
2009-02-27cp: diagnose invalid "cp -rl dir dir" right away, once againJim Meyering
Running "mkdir dir; cp -rl dir dir" would create dir/dir/dir/... rather than diagnosing the "copy-into-self" failure. The easy fix would have been to revert this part of the change [3ece0355 2008-11-09 cp: use far less memory in some cases] that introduced the bug: - remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); + if (!x->hard_link) + remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); However, that would have induced the failure of the new cp/link-heap test, due to the added memory pressure of recording 10k dev/ino pairs. And besides, I liked that improvement and wanted to keep it. Now that it's obvious recording the just-created-directory dev/ino needn't depend on the setting of hard_link, I realized it is necessary to record the pair only for the first directory created for each source command-line argument. I made that change, then noticed the new test, cp -rl a d d, would pass when run once, yet output the into-self diagnostic twice. Also note the side effect: it creates d/a and d/d. However, running that same command a second time, now with the modified directory, would fail. That turned out to be due to the fact that although the first into-self failure was detected in copy_dir, that function would continue copying other entries regardless -- and that would make it fail (eventually) with the unwanted recursion. * src/copy.c (copy_internal): This function needed an indicator of whether, for a give command line argument, it had already created its first directory. If so, no more need to record dev/ino pairs. If this is the first, then do record its pair. Hence, the new parameter. (copy_dir, copy): Update callers. (copy_dir): Upon any into-self failure, break out of the loop. * tests/cp/into-self: Test for the above. Reported by Mikael Magnusson.
2009-02-26tests: stty-row-col would hang when run in the backgroundJim Meyering
* tests/misc/stty-row-col: Don't hang when run in background at least on Solaris 10 and OpenBSD.
2009-02-26sort: Fix two bugs with determining the end of fieldPádraig Brady
* src/sort.c: When no specific number of chars to skip is specified for the end field, always skip the whole field. Also never include leading spaces from next field. * tests/misc/sort: Add 2 new tests for these cases. * NEWS: Mention this bug fix. * THANKS: Add bug reporter. Reported by Davide Canova.
2009-02-26argv-iter: avoid variadic macroEric Blake
* gl/lib/argv-iter.h (_ATTRIBUTE_NONNULL_): Don't assume C99 variadic macros are portable yet; needed for at least IRIX/MIPSpro. * THANKS: Update. Reported by Stuart Shelton.
2009-02-26tests: Remove system specific error stringsPádraig Brady
* tests/dd/skip-seek-past-file: Just check for the non system specific part of the error strings. This was causing an erroneous failure on NetBSD 1.6 at least.
2009-02-25tests: using printf with \e for ESC isn't portableJim Meyering
* tests/ls/color-clear-to-eol: Use \33, not \e for ascii ESC. This test failed when using the built-in printf of /bin/sh from NetBSD 1.6.
2009-02-24Ensure comment for translators is included in po filePádraig Brady
Issue reported by Göran Uddeborg. * src/system.h: Move the translator comment adjacent to the translated string. * THANKS: Update Göran's email address.
2009-02-22truncate: fix typo in man pageTobias Stoeckmann
* man/truncate.x: Fix spelling. * THANKS: Update.
2009-02-22doc: describe dd's status=noxref optionAndrew Church
* doc/coreutils.texi (dd invocation): Describe status=noxref.
2009-02-22tests: reenable temporarily-disabled tests using e.g., trap '' TTOUJim Meyering
Revert "tests: skip newly-modified tests unconditionally..." This reverts commit 773a88d33f68e50a2919c8a8310c646a7e5fabc2. * tests/misc/stty: Don't skip. * tests/misc/stty-invalid: Likewise. * tests/mv/i-3: Likewise.
2009-02-22update James Youngman's email addressJames Youngman
* THANKS: Update James Youngman's email address
2009-02-21post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2009-02-21version 7.1Jim Meyering
* NEWS: Record release date.
2009-02-21* README: Mention that c99-to-c89.diff is no longer maintained.Jim Meyering
2009-02-21tests: skip new install-C test if working directory is set-gidJim Meyering
* tests/install/install-C: Use setgid-check.
2009-02-21tests: skip newly-modified tests unconditionally, just to be safeJim Meyering
* tests/misc/stty-invalid: Skip. * tests/misc/stty: Likewise. * tests/mv/i-3: Likewise.
2009-02-21tests: don't let SIGTTOU/TTIN hang a backgrounded "make check"Jim Meyering
Running "make check &" would hang due to SIGTTOU and SIGTTIN signals. * tests/misc/stty: Ignore SIGTTOU. * tests/misc/stty-invalid: Likewise. * tests/mv/i-3: Ignore SIGTTIN.
2009-02-20doc: ls: clarify description of -sJim Meyering
* src/ls.c (usage): Make the description of -s mention "allocated size", so that it's less likely to be confused with an apparent byte-count. Suggested by Vito Caputo.
2009-02-19doc: dd: document that the default block size is 512 bytesJim Meyering
* src/dd.c (usage): Document the default block size. * doc/coreutils.texi (dd invocation): Document that the default block size (bs, ibs, obs) is 512 bytes. Reported by Petr Uzel.
2009-02-18maint: changing NEWS' copyright date must not invalidate checksumJim Meyering
* maint.mk (NEWS_hash): Don't let the Copyright date line contribute to the checksum. * cfg.mk (old_NEWS_hash): Update to reflect the new policy.
2009-02-18doc: explain how to recover from changes committed to masterJim Meyering
* HACKING: A beginner's commit-to-master is so common, and causes enough confusion, that we describe how to recover.
2009-02-18maint: add copyright noticesJim Meyering
* HACKING: Add copyright notice. * tests/test-lib.sh: Likewise.
2009-02-18cp: -a now preserves SELinux context, with reduced diagnosticsOndřej Vašík
* copy.c (copy_reg): Reduce SELinux context diagnostics for 'cp -a'. (copy_internal): Likewise * copy.h (cp_options): Add boolean reduce_diagnostics. * cp.c (usage): Say that --archive (-a) behaves like -dR --preserve=all. (cp_option_init): Initialize added reduce_diagnostics. (main): Add reduce_diagnostics for the -a option, and preserve SELinux context, if possible. * mv.c (cp_options_init): Initialize new cp_options booleans. * install.c (cp_option_init): Likewise. * NEWS: Mention those behaviour changes. * doc/coreutils.texi: Document --preserve=context, document that diagnostics are not shown for failures of non-mandatory attributes (just SELinux at the moment). * tests/cp/cp-a-selinux: Check not only failures, but succesful use of preserving SELinux context in cp.
2009-02-18add missing copyright datesEric Blake
* NEWS: Add 2009 to copyright. * README: Likewise. * README-hacking: Likewise. * TODO: Likewise. * doc/Makefile.am: Likewise. * m4/prereq.m4: Likewise. * src/nl.c: Likewise. * src/seq.c: Likewise. * tests/cp/cp-i: Likewise. * tests/install/install-C: Likewise. * tests/install/install-C-root: Likewise. * tests/install/install-C-selinux: Likewise. * tests/misc/seq: Likewise. * tests/mv/mv-n: Likewise.
2009-02-17install: compare files in binary modeEric Blake
* src/install.c (need_copy): Use O_BINARY when it matters.
2009-02-17install: add --compare (-C) option to install file only when necessaryKamil Dudka
* src/install.c (have_same_content): New function to compare files content. (extra_mode): New function checking for non-permission bits in mode. (need_copy): New function to check if copy is necessary. (main): Handle new option --compare (-C). (copy_file): Skip file copying if not necessary. (usage): Show new option --compare (-C) in --help. * tests/install/install-C: Basic tests for install --compare (-C). * tests/install/install-C-root: Tests requiring root privileges. * tests/install/install-C-selinux: Tests requiring SELinux. * tests/Makefile.am: Add new tests for install --compare (-C). * doc/coreutils.texi: Document new install option --compare (-C). * NEWS: Mention the change.
2009-02-17nl: correct long-option name for -v in usageOndřej Vašík
* nl.c (usage): Use --starting-line-number, not --first-page for -v
2009-02-15doc: id: make --help and .man more descriptiveJim Meyering
* src/id.c (usage): Improve description, based on a suggestion from Brian M. Carlson in http://bugs.debian.org/514675 * man/id.x: Use a better one-liner, based on the one at top of id.c.
2009-02-14seq: Fix equal width calculation when '.' added to last numberPádraig Brady
Issue reported by Samuel Hapák. <http://lists.gnu.org/archive/html/bug-coreutils/2009-02/msg00139.html> * src/seq.c: Account for '.' added to "last" number. * tests/misc/seq: Add corresponding test. * NEWS: Mention the fix.
2009-02-13du,chgrp,chmod,chown: use FTS_DEFER_STATJim Meyering
* src/du.c (main): Use FTS_DEFER_STAT, for better locality of inode reference. Important when traversing file systems with fake inodes. * src/chgrp.c (main): Likewise. * src/chmod.c (main): Likewise. * src/chown.c (main): Likewise. The only remaining fts client, chcon, doesn't need this, since it goes further and uses FTS_NOSTAT, which suppresses all non- directory stat calls.
2009-02-13maint: mention how to run a single test in HACKING docsPádraig Brady
* HACKING: Give an example of how to run a test in isolation. * README: Fix/simplify example for running a single test. * README-hacking: Reference the HACKING file.
2009-02-11ln: add details to --help textEric Blake
* src/ln.c (usage): Mention more about symlink properties. * doc/coreutils.texi (ln invocation): Likewise. * THANKS: Update. Reported by Vitali Lovich. Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-10ls: clean up after wrapped+colored file names with clear-to-EOLJim Meyering
This change addresses a relatively unusual case: ls --color, with a highlighted name being printed initially in the last row of a terminal emulator (possibly followed by other lines of output) such that it is wrapped onto the following line, as the terminal emulator scrolls the output. That would cause the entire following line to be highlighted, even if the name happened to use only one position. The least-invasive patch would have made colorized output larger for all uses. The approach taken below is more invasive, but limits the increase in overhead to only those lines that are expected to wrap. * src/ls.c (enum indicator_no): Add C_CLR_TO_EOL. (indicator_name): Add "cl". (color_indicator): Add default escape codes for "cl". (print_long_format): Propagate width to print_name_with_quoting. (print_name_with_quoting): Print new C_CLR_TO_EOL string if needed. Return the width of what we're printing. (print_file_name_and_frills): Propagate width. (print_type_indicator): Return bool (aka width). (print_many_per_line): Pass column position to print_* function. (print_current_files): Likewise. (print_horizontal): Likewise. (print_with_commas): Likewise. * src/dircolors.c (slack_codes): Add "CLRTOEOL". (ls_codes): Add "cl". * tests/ls/color-clear-to-eol: New file. Test for this fix. * tests/Makefile.am (TESTS): Add ls/color-clear-to-eol. * THANKS: Update. Reported by Alexander V. Lukyanov. See thread for details: http://thread.gmane.org/gmane.linux.kernel/740021/focus=14824 Thanks to Jan Engelhardt for helping me reproduce the problem. Demonstrate with this in an 80-column xterm: seq 200 # to start in the "bottom" row touch zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo env LS_COLORS='*.foo=0;31;42' ls -og --color=always Before the fix, you'd see something like this: (where the file name is printed in red on a green background, and each "=" denotes a space on a green background) ... -rw-r--r-- 1 0 Feb 5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\ zzzzzzzzzzzzzz.foo=================================================== After the patch, the trailing green spaces are gone: -rw-r--r-- 1 0 Feb 5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\ zzzzzzzzzzzzzz.foo
2009-02-10* tests/test-lib.sh: Use skip_test_... in place of echo...;exit 77.Jim Meyering
2009-02-10tests: avoid skipping stty-* testsNix
* tests/test-lib.sh (require_controlling_input_terminal_): Check stdout, not stdin.
2009-02-09touch: deprecate --file option: equivalent to --reference (-r)Jim Meyering
* src/touch.c: Mark long-undocumented --file for removal in 2010. (main): Warn upon use of --file.
2009-02-06tests: fix dd skip=greater_max_file_size test on Solaris 10Pádraig Brady
* tests/dd/skip-seek-past-file: I had previously commented that on some systems lseek(> max file size) may succeed, but left the possibility of failure in that case, so that I could determine specific systems to put in the comments for both failure modes.
2009-02-05avoid spurious parentheses/arith-op-related warnings from newer gccJim Meyering
* src/copy.c (set_owner): Use && rather than &. * src/stty.c (main): Likewise. * src/wc.c (wc): Likewise.
2009-02-02maint: tighten atoi/atof-prohibiting regexp, clean up .x-sc- fileJim Meyering
* maint.mk (sc_prohibit_atoi_atof): Require "(" after token. * .x-sc_prohibit_atoi_atof: Remove names that no longer contain a match.
2009-02-02doc: preserve --help line breaks in 'REPORTING BUGS' man page sectionJim Meyering
* man/help2man: Insert .br between adjacent lines.
2009-02-02* src/system.h (emit_bug_reporting_address): Remove periods.Jim Meyering
2009-02-02update copyright dates from recent changesJim Meyering
* src/dd.c: Add 2009 to list of copyright years. * tests/dd/seek-skip-past-file: Likewise. * tests/dd/seek-skip-past-dev: Likewise. * m4/xattr.m4: Likewise. * src/copy.h: Likewise.