summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-07-15build: shred.c: avoid i686-specific gcc -Wstrict-overflow warningJim Meyering
* src/shred.c: Avoid gcc -Wstrict-overflow warning. Addresses http://bugs.gnu.org/11927
2012-07-13doc: clarify meaning of '-parodd' in stty helpBruno Haible
* src/stty.c (usage): Disambiguate explanation of -parodd. * THANKS.in: Add reporter. Reported by Michael Stummvoll
2012-07-12doc: mention the improved sort memory allocationPádraig Brady
* NEWS: Mention the improvement.
2012-07-12doc: fix errors and warnings with Texinfo 5Stefano Lattarini
Or rather, with the development version 4.13.90, which will eventually become Texinfo 5.0. * doc/coreutils.texi: Use '@item' instead of '@itemx' in several places, as Texinfo 5 refuses to process an '@itemx' that is not preceded by an '@item'. Ensure that node extended names in menus and sectioning are consistent, and that ordering and presence of nodes in menus and in the actual text are consistent as well. Fixes http://bugs.gnu.org/11828
2012-07-11df: warn if soon-to-be-removed --megabyte option is usedBernhard Voelker
* src/df.c (MEGABYTES_OPTION): Add enum and mark it for removal in August 2013. (long_options): Use MEGABYTES_OPTION for --megabytes option. (main): Add a case for it and issue a deprecation warning if the long form is used. Document the short -m option to exist only for BSD compatibility.
2012-07-10sort: by default, do not exceed 3/4 of physical memoryPaul Eggert
* src/sort.c (default_sort_size): Do not exceed 3/4 of total memory. See Jeff Janes's bug report in <http://lists.gnu.org/archive/html/coreutils/2012-06/msg00018.html>.
2012-07-06tests: sort-merge-fdlimit: reduce the limit by onePádraig Brady
* tests/misc/sort-merge-fdlimit: As a consequence of commit v8.17-34-g59daf05, we can reduce the descriptor limit by one.
2012-07-05doc: document leap seconds betterPaul Eggert
* doc/coreutils.texi (touch invocation, Time conversion specifiers) (Options for date, Examples of date): Index "leap seconds" and improve their documentation a bit.
2012-07-05doc: fix spacingPaul Eggert
* doc/coreutils.texi: Use right amount of spacing after punctuation.
2012-07-04date: fails to diagnose invalid inputJim Meyering
date -d "$(printf '\xb0')" would print 00:00:00 with today's date rather than diagnosing the invalid input. Now it reports this: date: invalid date '\260' * gnulib: Update submodule to latest for fixed parse-datetime.y. * tests/misc/date [invalid-high-bit-set]: New test. * NEWS (Bug fixes): Mention it. * bootstrap, tests/init.sh: Also update to latest. Reported by Peter Evans in http://bugs.gnu.org/11843
2012-07-03maint: add syntax-check rule to help avoid misuse of EXIT_FAILUREJim Meyering
* cfg.mk (sc_some_programs_must_avoid_exit_failure): New rule, to help us avoid using EXIT_FAILURE in programs like sort, ls, nohup, timeout, env, etc. that use different exit codes in many cases.
2012-07-03maint: fix minor bugs in helper program, setuidgidJim Meyering
* src/setuidgid.c (main): Fix two error-before-usage calls not to exit. Exit with status SETUIDGID_FAILURE (not EXIT_FAILURE) consistently.
2012-07-02sort: fix exit-status typoPaul Eggert
* src/sort.c (stream_open): EXIT_FAILURE -> SORT_FAILURE. Suggested by Pádraig Brady in <http://bugs.gnu.org/11816#34>.
2012-07-02sort: simplify -o handling to avoid fdopen, assertPaul Eggert
* src/sort.c (outfd): Remove. All uses replaced by STDOUT_FILENO. (stream_open): When writing, use stdout rather than fdopen. (move_fd_or_die): Renamed from dup2_or_die, with the added functionality of closing its first argument. All uses changed. (avoid_trashing_input): Special case for !outfile no longer needed. (check_output): Arrange for standard output to go to the file, rather than storing the fd in outfd.
2012-07-02sort: avoid redundant processing with inaccessible inputs or outputPádraig Brady
* src/sort.c (check_inputs): A new function to verify all inputs are accessible before further processing. (check_output): A new function to open or create a specified output file, before futher processing. (stream_open): Adjust to truncating the previously opened output file rather than opening directly. (avoid_trashing_input): Optimize to stat the output file descriptor, rather than the file name. (main): Call the new functions to check accessibility of inputs and output, before processing starts. * tests/misc/sort: Adjust to the changed error message. * tests/misc/sort-merge-fdlimit: Account for the earlier opened file descriptor of the specified output file. * tests/misc/sort-exit-early: A new test to exercise the improvements. * tests/Makefile.am: Reference the new test. * NEWS: Mention the improvement. Suggested-by: Bernhard Voelker
2012-07-02maint: sc_prohibit_fail_0: update a stale commentPádraig Brady
* cfg.mk (sc_prohibit_fail_0): Following on from commit v8.0-79-g71c2f88, update the comment to match.
2012-07-02maint: avoid a -Wunsed-but-set warning on some systemsPádraig Brady
* src/stty.c (main): Mark speed_was_set as possibly unused, as is the case when CIBAUD is undefined (on ppc64 GNU/Linux for example). Reported-by: Stefano Lattarini
2012-06-30maint: avoid false-positive syntax-check failure due to fail=0 in .texiJim Meyering
* cfg.mk (exclude_file_name_regexp--sc_prohibit_fail_0): Exempt all .texi files.
2012-06-30stat,tail: recognize new file system type: aufsJim Meyering
* src/stat.c (human_fstype) [__linux__]: Add a 'case' for the new remote file system type: aufs (0x61756673). * NEWS (New features): Mention stat -f. (Bug fixes): Mention it for tail -f. Reported by Michael Mol in http://bugs.gnu.org/11823
2012-06-30doc: improve sample backup scriptJim Meyering
* doc/coreutils.texi (cp invocation): Make the backup script exit with an accurate reflection of any failure. Also, add --preserve=all. Improved-by: Bernhard Voelker
2012-06-26maint: avoid a static analysis warning in csplitPádraig Brady
The Canalyze static code analyzer correctly surmised that there is a use-after-free bug in free_buffer() at the line "struct line *n = l->next", if that function is called multiple times. This is not a runtime issue since a list of lines will not be present in the !lines_found case. * src/csplit.c (free_buffer): Set list head to NULL so that this function can be called multiple times. (load_buffer): Remove a redundant call to free_buffer(). Reported-by: Xu Zhongxing
2012-06-22doc: document multiplier for dd number options like count=NBernhard Voelker
* src/dd.c (usage): Add "N" to the description of multipliers. * doc/coreutils.texi (dd invocation): Likewise.
2012-06-22split: ensure output doesn't overwrite inputPádraig Brady
* src/split.c (create): Check if output file is the same inode as the input file. * tests/split/guard-input: New test case. * tests/Makefile.am: Reference new test case. * NEWS: Mention the fix. Improved-by: Jim Meyering Reported-by: François Pinard
2012-06-22maint: refactor common mode bits used to create filesPádraig Brady
* src/system.h (MODE_RW_UGO): The new refactored define (666). * src/mkfifo.c: Use the new define. * src/mknod.c: Likewise. * src/split.c: Likewise. * src/system.h: Likewise. * src/touch.c: Likewise. * src/truncate.c: Likewise. Suggested-by: Jim Meyering
2012-06-22maint: suppress echoing of sc_THANKS_in_duplicates implementationPádraig Brady
* cfg.mk (sc_THANKS_in_duplicates): Suppress the echoing of these commands run during `make syntax-check`
2012-06-20maint: sort: style adjustment to help clarify size determinationBernhard Voelker
* src/sort.c (default_sort_size): Move physmem code "down" to first use.
2012-06-12stty: portability: accommodate CILJim Meyering
* src/stty.c (main): Declare locals "mode" and "new_mode" to be static to ensure that each is initialized to zero, *including* all padding. While gcc clears padding of a local automatic initialized to "{ 0, }", CIL does not, and the C99 standard is not clear on this issue. Reported by Edward Schwartz. See http://bugs.gnu.org/11675 for details.
2012-06-10maint: remove su testing artifactSami Kerola
* tests/misc/help-version: Remove expected su exit code.
2012-06-10build: update gnulib to latest; correct comment grammarJim Meyering
* tests/misc/help-version: Fix comment grammar: s/all these/all of these/ * gl/lib/tempname.c.diff: Likewise.
2012-06-10maint: migrate strncpy-prohibiting rule to gnulibJim Meyering
* cfg.mk (sc_prohibit_strncpy): Remove rule. Now it's in gnulib.
2012-06-10maint: prohibit use of strncpyJim Meyering
* cfg.mk (sc_prohibit_strncpy): New syntax-check rule. Exempt pinky.c and who.c, at least for now.
2012-06-06su: remove program (util-linux is now the best source for it)Jim Meyering
* README: Omit "su" from list of programs. * src/su.c: Remove file. * src/Makefile.am: Remove su-related rules and variables. * tests/misc/su-fail: Remove test. * tests/Makefile.am (TESTS): Remove misc/su-fail. * tests/misc/invalid-opt: Remove su-related code. * src/.gitignore: Remove su. * man/su.x: Remove file. * man/Makefile.am (su.1): Remove rule. * po/POTFILES.in: Remove su.c from the list. * TODO: Remove ancient entry. * NEWS (Changes in behavior): Mention it. * doc/coreutils.texi: Remove su-related description. * AUTHORS: Remove su. * m4/lib-check.m4 (cu_LIB_CHECK): Remove file/macro. * configure.ac: Remove su-related code and sole use of cu_LIB_CHECK. * scripts/git-hooks/commit-msg: Remove su from this list, too.
2012-06-06maint: detect a new type of duplicate in THANKS.inJim Meyering
* cfg.mk (sc_THANKS_in_duplicates): New rule.
2012-06-05maint: mark new diagnostic for translationJim Meyering
* src/head.c (elide_tail_lines_seekable): Mark new diagnostic. I will look at the results of "make syntax-check", I will look...
2012-06-05head: with --lines=-N (-n-N) reset file pointer on seekable inputJim Meyering
* src/head.c (elide_tail_lines_seekable): Reset file pointer after printing up to an end-relative line-counted offset. Anoop Sharma reported the problem and suggested the fix. * tests/misc/head-pos: Add coverage via a very similar, existing test. Also add coverage for a previously untested block of code. * tests/misc/head-elide-tail ($READ_BUFSIZE): Update to 8192, to match the value of BUFSIZ I see today on Fedora 17/x86_64 (unrelated to this fix). * NEWS (Bug fixes): Mention it. Improved-by: Pádraig Brady
2012-06-01stat,tail: recognize new file system type: panfsJim Meyering
* src/stat.c (human_fstype) [__linux__]: Add a 'case' for the new remote file system type: panfs (0xAAD7AAEA). * NEWS (New features): Mention stat -f. (Bug fixes): Mention it for tail -f. Reported by Travis Gummels in http://bugzilla.redhat.com/827199
2012-05-31maint: fix typos in test comments and old ChangeLog filesJim Meyering
Culprits identified and fixed automatically using these commands: git ls-files|misspellings -f -|perl -nl \ -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \ -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\ -e 'print "sed -i $q${n}s!$l!$r!$q $file"' | bash using http://github.com/lyda/misspell-check * old/fileutils/ChangeLog: Fix typos. * old/textutils/ChangeLog: Likewise. * tests/misc/truncate-fail-diag: Likewise.
2012-05-28cksum: line-buffer the printed checksumsPádraig Brady
This utility was inadvertently omitted from commit v8.0-34-g710fe41 * src/cksum.c (main): Set stdout to line buffered mode, to ensure parallel running instances don't intersperse their output. * NEWS: Mention the fix. * THANKS.in: Add Anoop. Reported by Anoop Sharma.
2012-05-21maint: remove comment that suggested to remove support for mktemp -VJim Meyering
* src/mktemp.c (main): Don't suggest to remove support for -V, an undocumented alias for --version, since that would introduce a gratuitous incompatibility with the original mktemp program.
2012-05-21dircolors: add st/st-256color terminal typesMike Frysinger
See http://st.suckless.org/ * src/dircolors.hin: Add st and st-256color. Reported-by: Jeroen Roovers <jer@gentoo.org>, via Mike Frysinger <vapier@gentoo.org> in http://bugs.gnu.org/11498
2012-05-20id,groups: use gidtostr/uidtostr to avoid castsJim Meyering
* src/id.c (gidtostr, uidtostr): Define macros. (gidtostr_ptr, uidtostr_ptr): Define safer functions. Use gidtostr and uidtostr to print GID and UID without need/risk of casts. * src/group-list.c: Likewise.
2012-05-16tests: use $AWK, not awkJim Meyering
* tests/cp/sparse-fiemap: Don't hard-code "awk". Use $AWK. * tests/init.cfg: Likewise. * tests/misc/sort-rand: Likewise.
2012-05-16maint: tell xgettext that fputs arg "93% of..." is not a C format stringJim Meyering
* src/fmt.c (usage): Add a comment to tell xgettext that the "% o" in fputs argument string of "...93% of..." is not a C format string. Reported by Toomas Soome, Göran Uddeborg, Petr Pisar, Primoz PETERLIN and Chusslove Illich via http://bugs.gnu.org/11470
2012-05-16maint: add assertions to placate static analysis toolsJim Meyering
A static analysis tool (http://labs.oracle.com/projects/parfait/) produced some false positive diagnostics. Add assertions to help it understand that the code is correct. * src/stty.c: Include <assert.h>. (display_changed): Add an assertion to placate parfait. (display_all): Likewise. * src/sort.c: Include <assert.h>. (main): Add an assertion to placate parfait. * src/fmt.c: Include <assert.h>. (get_paragraph): Add an assertion to placate parfait.
2012-05-16stat: report the correct block size for file system usagePádraig Brady
struct statfs has the f_frsize member since Linux 2.6, so use that rather than f_bsize which can be different. Note the related df change mentioned in NEWS is handled in gnulib by using statvfs() rather than statfs() on Linux > 2.6.36 (where statvfs doesn't hang) and the same method as stat for Linux 2.6 kernels earlier than that. stat(1) doesn't use statvfs() on GNU/Linux as the f_type member isn't available there. Note the change to not use statvfs() on GNU/Linux was introduced in gnulib commit eda39b8 16-08-2003. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for the f_frsize member in the statfs structure. * src/stat.c: Use (struct statfs).f_frsize if available. * NEWS (Bug fixes): Mention this stat fix, and the related df fix coming in the next gnulib update. * THANKS.in: Add Nikolaus. Reported and Tested by Nikolaus Rath
2012-05-12ls: color each symlink-to-relative-name in / properlyJim Meyering
In order for ls --color to color each symlink, it must form the name of each referent and then stat it to see if the link is dangling, to a directory, to a file, etc. When the symlink is to a relative name, ls must concatenate the starting directory name and that relative name. When, in addition, the starting directory was "/" or "/some-name", the result was ill-formed, and the subsequent stat would usually fail, making the caller color it as a dangling symlink. * src/ls.c (make_link_name): Don't botch the case in which dir_name(NAME) == "/" and LINKNAME is relative. * tests/ls/root-rel-symlink-color: New file. Test for the above. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. Reported by Mike Frysinger in http://bugs.gnu.org/11453 Bug introduced by commit v8.16-23-gbcb9078.
2012-05-10maint: post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2012-05-10version 8.17Jim Meyering
* NEWS: Record release date.
2012-05-10tests: misc/tty-eof: increase timeout to avoid unwarranted failureJim Meyering
* 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.
2012-05-10stat,tail: recognize new FS types: bdevfs, inodefs, qnx6Jim Meyering
* 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.