summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-09-30maint: update gnulibEric Blake
* gnulib: Update to latest. * doc/coreutils.texi (date): Reflect new module name. * doc/Makefile.am (EXTRA_DIST): Likewise. * doc/.gitignore: Likewise.
2010-09-30maint: update gnulibEric Blake
* gnulib: Update to latest. * bootstrap.conf (gnulib_modules): Reflect new module name. * bootstrap: Resync from upstream.
2010-09-30maint: mention the du-exclude--vs--cycle-dir fixJim Meyering
* NEWS (Bug fixes): Mention the du-exclude--vs--cycle-dir fix. Reported by Graham Cobb in http://bugs.debian.org/598438, that bug was fixed by the 2010-07-24 commit, 77428214f, "du: tune, and fix some -L bugs with dangling or cyclic symlinks"
2010-09-29build: update gnulib submodule to latestJim Meyering
2010-09-29tr: fix various issues with case conversionPádraig Brady
This valid translation spec aborted: LC_ALL=en_US.iso-8859-1 tr '[:upper:]- ' '[:lower:]_' This invalid translation spec aborted: LC_ALL=en_US.iso-8859-1 tr '[:upper:] ' '[:lower:]' This was caused by commit 6efd1046, 05-01-2008, "Avoid tr case-conversion failure in some locales" This misaligned conversion spec was allowed: LC_ALL=C tr 'A-Y[:lower:]' 'a-z[:upper:]' This was caused by commit af5d0c36, 21-10-2007, "tr: do not reject an unmatched [:lower:] or [:upper:] in SET1" This misaligned spec was allowed by extending the class: LC_ALL=C tr '[:upper:] ' '[:lower:]' * src/tr.c (validate_case_classes): A new function to check alignment of case conversion classes. Also it adjusts the length of the sets so that locales with different numbers of upper and lower case characters, don't cause issues. (string2_extend): Disallow extending the case conversion class as in the above example. That is locale dependent and most likely not what the user wants. (validate): Do the simple test for "restricted" char classes earlier, so we don't redundantly do more expensive validation. (main): Remove the case class validation, and simplify. * tests/misc/tr-case-class: A new test to test the various alignment and locale issues, associated with case conversion. * tests/misc/tr: Move case conversion tests to new tr-case-class. * tests/Makefile.am: Reference the new test. * NEWS: Mention the fixes.
2010-09-20build: update gnulib submodule to latestPaul Eggert
2010-09-20sort: destroy spin locks portablyPaul Eggert
* src/sort.c (sortlines, sort): Use pthread_spin_destroy when a spin lock is no longer used. This isn't needed on GNU/Linux or Solaris, but POSIX says it may free up resources on some platforms.
2010-09-20tests: fix a printf portability issuePádraig Brady
* tests/misc/sort-debug-keys: Don't depend on printf supporting \xhh format, which isn't supported by dash for example. Also change from double quoted strings to single quoted, when we don't need any variable interpolation.
2010-09-20tests: fix an erroneous stat failure with bind mountsPádraig Brady
* tests/misc/stat-mount: Don't try to correlate the mount points output by df and stat, as they're similar, but sometimes different in the presence of bind mounts. * doc/coretuils.texi (stat invocation): Clarify the bind mount difference between stat and df.
2010-09-18build: update gnulib submodule to latestJim Meyering
2010-09-18tests: sync tests/init.sh from gnulibJim Meyering
* tests/init.sh: Update from gnulib.
2010-09-18build: use gnulib's new termios moduleJim Meyering
With it, we can remove the two sole tests of HAVE_TERMIOS_H. * bootstrap.conf (gnulib_modules): Add termios. * src/ls.c: Don't test HAVE_TERMIOS_H. * src/stty.c: Likewise. * m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Remove configure-time test for termios.h.
2010-09-18maint: don't use obsolete gnulib modulesJim Meyering
* bootstrap.conf (gnulib_modules): Use calloc-gnu, malloc-gnu and realloc-gnu modules, rather than calloc, malloc and realloc. The shorter-named modules are now deprecated. (obsolete_gnulib_modules): Remove. (gnulib_modules): Remove raise, strbprk; they're obsolete, too. Move strtod, strtol here, from obsolete_gnulib_modules.
2010-09-17maint: update to latest gnulibEric Blake
* gnulib: Update to latest. * src/copy.c (copy_reg): Use fdutimens instead of gl_futimens. * src/touch.c (touch): Adjust parameter order. * tests/init.sh: Resync from upstream.
2010-09-17rm: remove no-op -d optionEric Blake
* src/rm.c (long_opts, main): Resolve a fixme. * NEWS: Document the change. Based on a report by William Plusnick.
2010-09-17maint: update to latest gnulibEric Blake
* gnulib: Update to latest. * bootstrap.conf (gnulib_modules): Add fdutimensat. * src/touch.c (touch): Use fdutimensat instead of gl_futimens.
2010-09-13dircolors: add rxvt-unicode-256color terminal typeDmitry V. Levin
rxvt-unicode introduced new terminal type: http://cvs.schmorp.de/rxvt-unicode/src/rxvt.h?r1=1.398&r2=1.399 * src/dircolors.hin: Add rxvt-unicode-256color terminal type. Reported by Alexey I. Froloff in <http://bugzilla.altlinux.org/24052>. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2010-09-07tests: work around a failure with dash 0.5.4Pádraig Brady
* tests/misc/env: Check that the shell can support the operation, before filtering through `env`. Note dash 0.5.5 is unaffected by this issue.
2010-09-07tests: make various timeouts more robustPádraig Brady
* tests/init.cfg (retry_delay_): Describe the backoff method used. * tests/ls/readdir-mountpoint-inode: Add a timeout to the stat call to eliminate the chance of hangups. * tests/mv/i-3: Change the timeout required to pass from 1 second to a range of .1s - 3.1s. * tests/rm/dangling-symlink: Likewise.
2010-09-07tests: exclude some tests when running on NFSPádraig Brady
All tests currently pass on NFS on Linux kernel 2.6.22 at least, but some fail on 2.6.9, so we exclude those here. * tests/init.cfg (is_local_dir_): A new function returning if the specified directory is on a local file system. (require_local_dir_): A new function to skip tests if the current directory is not on a local file system. * tests/cp/existing-perm-race: Skip if non local. * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/cp/preserve-2: Likewise. * tests/mv/part-symlink: Likewise. * tests/du/basic: Use refactored function. * tests/install/basic-1: Likewise. * tests/mkdir/p-3: Likewise. * tests/dd/skip-seek-past-dev: Likewise. * tests/du/slink: Likewise. Remove redundant test for NFS file system. * tests/misc/join: s/local/locale/.
2010-09-04build: update gnulib submodule to latestJim Meyering
2010-09-04build: use gettext-h, not gettextJim Meyering
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext. The latter is overkill for a package that uses AM_GNU_GETTEXT([external]...
2010-09-01tac: suppress technically unneeded "free"Jim Meyering
* src/tac.c (main): Guard final free with #ifdef lint. Suggested by Paul Eggert.
2010-09-01join: improve performance when operating on whole linesPádraig Brady
Following on from commit f86bb696, 01-02-2010, "join: make -t '' operate on the whole line". Bypassing the delimiter search in this case, gives about an 8% performance boost. * src/join (xfields): Don't bother looking for '\n' in the data, which we know won't be present.
2010-08-28tac: avoid double freeJim Meyering
* src/tac.c (main): Reading a line longer than 16KiB would cause tac to realloc its primary buffer. Then, just before exit, tac would mistakenly free the original (now free'd) buffer. This bug was introduced by commit be6c13e7, "maint: always free a buffer, to avoid even semblance of a leak". * NEWS (Bug fixes): Mention it. * tests/misc/tac (double-free): New test, to exercise this. Reported by Salvo Tomaselli in <http://bugs.debian.org/594666>.
2010-08-27doc: clarify that stat -f implies -L (follows symlinks)Pádraig Brady
* doc/coreutils.texi (stat invocation). Since there is no lstatfs, document that -L is implicit with -f.
2010-08-27stat: add %m to output the mount point for a fileAaron Burgemeister
* src/find-mount-point.c: A new file refactoring find_mount_point() out from df.c * src/find-mount-point.h: Likewise. * src/df.c: Use the new find-mount-point module. * src/stat.c (print_stat): Handle the new %m format. (find_bind_mount): A new function to return the bind mount for a file if any. (out_mount_mount): Print the bind mount for a file, or else the standard mount point given by the find-mount-point module. (usage): Document the %m format directive. * src/Makefile.am: Reference the refactored find-mount-point.c * po/POTFILES.in: Add find_mount_point.c to the translation list * doc/coreutils.texi (stat invocation): Document %m, and how it may differ from the mount point that df outputs. * test/misc/stat-mount: A new test to correlate mount points output from df and stat. * tests/Makefile.am: Reference the new test. * NEWS: Mention the new feature * THANKS: Add the author Signed-off-by: Pádraig Brady <P@draigBrady.com>
2010-08-26maint: update to latest gnulibEric Blake
* gnulib: Update to latest, to avoid warnings with latest autoconf.git.
2010-08-26maint: avoid a hung 'make syntax-check' in VPATH buildEric Blake
* cfg.mk (sc_system_h_headers): Look for files in correct location.
2010-08-25df: always print the device name for bind mounted filesPádraig Brady
* src/df (show_point): Remove the optimization for comparing the specified path with the device name, as this produces inconsistent results in the presence of bind mounts. For bind mounts, the device name is populated with the bind mount target. * NEWS: Mention the change in behavior.
2010-08-23stat: fix a small memory leak with %NPádraig Brady
* src/stat.c (print_stat): Free the buffer returned from areadlink_with_size().
2010-08-15maint: exclude tests from the set_program_name syntax-checkPádraig Brady
* .x-sc_program_name: Exclude all current and future c files in gl/tests from this check * gl/tests/test-di-set.c: Remove the hack to work around the set_program_name syntax-check * gl/tests/test-ino-map.c: Likewise * gl/tests/test-rand-isaac.c: Likewise
2010-08-15doc: avoid a warning from newer texinfoRalf Wildenhues
* doc/coreutils.texi (sort invocation): Use @pxref inside parentheses.
2010-08-15doc: improve the info on md5sum security weaknessesBruno Haible
* doc/coreutils.texi (md5sum invocation): Mention currently known security problems. Don't recommend SHA-1 as alternative. * man/md5sum.x (BUGS): Warn about the vulnerabilities and reference the SHA-2 based alternatives. Reported by Simon Josefsson
2010-08-13* tests/misc/sort (use-nl): Fix comment to match the test case.Paul Eggert
2010-08-10sort, who: prefer free+malloc to realloc when contents are irrelevantPaul Eggert
This change was prompted by the previous one: I audited the code looking for similar examples. Too bad valgrind doesn't catch this. * src/sort.c (check, mergefps): xrealloc -> free + xmalloc * src/who.c (print_user): Likewise.
2010-08-10sort: free/xmalloc rather than xreallocPaul Eggert
* src/sort.c (compare_random): Use free/xmalloc rather than xrealloc, since the old buffer contents need not be preserved. Also, don't fail if the guessed-sized malloc fails. Suggested by Bruno Haible.
2010-08-10build: update to latest gnulibEric Blake
Fixes bug 6053 for NFS on HP-UX not recognizing ACL operations. * gnulib: Update to latest version.
2010-08-10sort: avoid gcc warning: explicitly ignore strtold resultJim Meyering
* src/sort.c: Include "ignore-value.h". (debug_key): Use ignore_value.
2010-08-09tests: silence 'make syntax-check'Eric Blake
* gl/tests/test-rand-isaac.c (main): Avoid warnings from syntax-check.
2010-08-09dircolors: add screen.rxvt & terminator to TERM listMike Frysinger
Resolves bug#6793. * src/dircolors.hin: Add screen.rxvt & terminator. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-09ls: fix a test failure that should have been skippedDan Hipschman
* tests/ls/readdir-mountpoint-inode: Check to see if skip_test_ is called in a helper function via $() instead of mistakenly failing. * THANKS: Update.
2010-08-08sort: speed up -R with long lines in hard localesPaul Eggert
* src/sort.c (compare_random): Guess that the output will be 3X the input. This avoids the overhead of calling strxfrm twice on typical implementations. Suggested by Bruno Haible.
2010-08-06sort: support all combinations of -d, -f, -i, -R, and -VPaul Eggert
* NEWS: Document this. * src/sort.c (getmonth): Omit LEN arg, as MONTH is now null-terminated. (compare_random): Don't null-terminate keys, as caller now does that. (compare_version): Remove. (debug_key): Null-terminate string for getmonth. (keycompare): Support combining -R with any of -d, -f, -i, -V. Also, support combining -V with any of -d, -i. (check_ordering_compatibility): Allow newly-supported combinations. * tests/misc/sort (02q, 02r, 02s): New tests, for new combinations. (incompat2): Now test -nR, since -fR are now compatible.
2010-08-05sort: tune and refactor --debug code, and fix minor underlining bugPaul Eggert
Formerly, the 'compare' function and some of its subroutines had a debugging flag, which caused them to output underlines. This change refactors the code so that debugging output is more-separated from the actual sorting. In the process, the change fixes a minor error in the debugging output. The change shortens the source code and executable size a tad, and improves CPU performance by 2.4% on my platform with a simple benchmark (C locale, line sorting, no debug). * src/sort.c (long_double, strtold): Move back to prelude, since they're now used by multiple functions again. (unit_order): Move to file scope, since it's now used by two functions. (find_unit_order, human_numcompare, numcompare, general_numcompare): Remove endptr parameter. All callers changed. (human_numcompare): Args are now const pointers. (getmonth): Endptr is now non-const. (key_numeric): Move up, since it's needed earlier. (debug_key): Take a line and a key as argument, instead of having the caller figure out where the field is. (debug_line): New function. (keycompare, compare): Omit debug parameter; debug output now done elsewhere. All callers changed. (write_line): Renamed from write_bytes; all callers changed. Use debug_line (not 'compare') to output debug info. Use a slightly faster check for whether output file is stdout. (check): Don't do debugging output; it's not that useful here, and it confuses the code. (main): Check for incompatibility between -c and --debug. Use standard diagnostic for incompatible options. * tests/misc/sort-debug-keys: Fix test case: "--Mi-1" is not a number, so its first character should not be underlined when debugging a numeric sort.
2010-08-04sort: -R now uses less memory on long lines with internal NULsPaul Eggert
* lib/Makefile.am (libcoreutils_a_SOURCES): Remove xmemxfrm.c, xmemxfrm.h. * lib/memxfrm.c, lib/memxfrm.h, lib/xmemxfrm.c, lib/xmemxfrm.h: Remove. * m4/memxfrm.m4: Likewise. * m4/prereq.m4 (gl_PREREQ): Remove gl_MEMXFRM. * po/POTFILES.in: Remove lib/xmemxfrm.c. * src/sort.c: Don't include xmemxfrm.h. (cmp_hashes): Remove. (xstrxfrm): New function. (compare_random): If a line contains NULs, don't create a big buffer that contains the strxfrm output of each string in the line. Instead, accumulate checksums and differences as we go, so that at any one time we have to store at most the output of a single strxfrm call when processing the line. This removes the need for an memxfrm function.
2010-08-03init.sh: work around trap limitation of some shellsPaul Eggert
* tests/init.sh (setup_): Move exit trap outside of shell function. This patch is imported from gnulib.
2010-08-03sort: fix bug in --debug when \0 is followed by \tPaul Eggert
* src/sort.c (debug_width): New function, which does not stop counting tabs at \0, and also invokes mbsnwidth. Stamp out strnlen! (count_tabs): Remove. (debug_key): Use debug_width instead of mbsnwidth and count_tabs. * tests/misc/sort-debug-keys: Check that \0 and \t intermix.
2010-08-02sort: revert recent -h changes and use a more-conservative approachPaul Eggert
* NEWS: Document changes to sort -h, which are now minor with respect to the pre-July-30th version. * doc/coreutils.texi (sort invocation): Likewise. The documentation now describes how -h comparison is done rather than being vague with border cases. * src/sort.c (long_double, strtold): Move back to general_numcompare. (LD, compute_human): Remove. (find_unit_order): Remove THOU_SEP parameter, since thousands separators are now allowed by all callers. Revert to previous behavior of sorting by suffix, and returning the order rather than 2 * order + binary, since we no longer care whether binary powers are being used. However, treat all zeros the same, instead of sorting 0M before 0G; this is more consistent with the desired behavior of sorting -1G before -1M. * tests/misc/sort (h1, h3, h6): Adjust to match mostly-reverted behavior. However, check that all zeros sort together. * tests/misc/sort-debug-keys: Omit a "_", since the trailing "i" in "1234Gi" is no longer part of the key.
2010-07-30sort: -h now handles comparisons such as 6000K vs 5M and 5MiB vs 5MBPaul Eggert
* NEWS: Document changes to sort -h. * doc/coreutils.texi (sort invocation): Likewise. * src/sort.c (long_double, strtold): Move to prelude, since they're now used by multiple functions. (LD): New macro. (struct keyfield.iec_present): Remove this member. All uses removed. (check_mixed_SI_IEC): Remove. This code was busted in the presence of multiple threads, as it had a race condition. (find_unit_order): Remove arg KEY; add arg THOU_SEP; arg ENDPTR is now char ** rather than char const **. Return an integer that distinguishes decimal from binary powers. Parse the number consistently with the intersection of strtold and strnumcmp. Set *ENDPTR unconditionally. (compute_human): New static function. (human_numcompare): Remove arg KEY. Remove 'const' from other args. Use strnumcmp if possible, but fall back on floating point if not. (numcompare, general_numcompare): Arg EA is now char ** rather than char const **. (numcompare): Adjust to new find_unit_order signature and behavior. (keycompare): Adjus to new human_numcompare signature. * tests/misc/sort (h1, h3, h4, h6): Adjust to new behavior. * tests/misc/sort-debug-keys: Likewise.