Bo Borgerson [Mon, 16 Jun 2008 22:30:25 +0000 (18:30 -0400)]
HACKING: Add section for tips on reducing translator workload.
* HACKING (Be nice to translators): New section.
Add Jim's suggestion to avoid changing translatable strings if possible.
Jim Meyering [Tue, 17 Jun 2008 06:18:49 +0000 (08:18 +0200)]
* THANKS: Add name and email for Carl Roth.
Eric Blake [Tue, 17 Jun 2008 03:16:07 +0000 (21:16 -0600)]
ls, od: avoid redundant const
* src/ls.c (long_time_format, sort_functions): Avoid redundant const.
* src/od.c (charname): Likewise.
* maint.mk (sc_redundant_const): Add rule to detect this.
Bo Borgerson [Tue, 22 Apr 2008 20:19:58 +0000 (16:19 -0400)]
join: improve memory management
* src/join.c (struct seq): Use a (struct line **) for `lines' rather than
one long (struct line *). This allows individual lines to be swapped out
if necessary.
(reset_line): Get a line ready for new input.
(init_linep): Create a new line and assign it to the the pointer passed in.
(spareline[2]): Hold a spare line for each input file.
(free_spareline): Clean up.
(get_line): Take a (struct line **) instead of a (struct line *). If the
line to be overwritten is the previous line for the current file then swap
it out for the spare.
(join): Accomodate new structure of SEQs and new parameters to get_line;
Don't free stale lines until the end -- they're re-usable now.
(dup_line): Remove function.
* NEWS: Mention the performance improvement.
Ralf Wildenhues [Mon, 16 Jun 2008 17:58:18 +0000 (19:58 +0200)]
* doc/coreutils.texi (join invocation): Drop leading blanks.
Jim Meyering [Mon, 16 Jun 2008 12:55:06 +0000 (14:55 +0200)]
remove redundant const directives
In
1463824d8e7f72c31f1d803d7cfe2b608ccafc5c, I added some
missing "const" directives, as well as some new, redundant ones.
This removes the redundant ones. Pointed out by Eric Blake.
* base64.c, cat.c, chcon.c, chgrp.c, chmod.c, chown.c, comm.c:
* cp.c, csplit.c, cut.c, date.c, dd.c, df.c, dircolors.c, du.c:
* env.c, expand.c, fmt.c, fold.c, groups.c, head.c, id.c:
* install.c, join.c, kill.c, ln.c, ls.c, md5sum.c, mkdir.c:
* mkfifo.c, mknod.c, mktemp.c, mv.c, nice.c, nl.c, od.c:
* paste.c, pathchk.c, pinky.c, pr.c, ptx.c, readlink.c, rm.c:
* rmdir.c, runcon.c, seq.c, shred.c, shuf.c, sort.c, split.c:
* stat.c, stty.c, su.c, sum.c, tac.c, tail.c, tee.c, timeout.c:
* touch.c, tr.c, truncate.c, tty.c, uname.c, unexpand.c, uniq.c:
* wc.c, who.c: Remove redundant const directives.
* maint.mk (sc_const_long_option): Don't require redundant "const".
Jim Meyering [Mon, 16 Jun 2008 11:03:07 +0000 (13:03 +0200)]
chcon: correct --verbose output to include newlines
* src/chcon.c (process_file): Append "\n" to --verbose diagnostic.
* tests/misc/chcon: Add a test for the above.
* NEWS: mention the bug fix
Reported by Carl D. Roth in http://bugzilla.redhat.com/451478.
Jim Meyering [Sun, 15 Jun 2008 16:57:13 +0000 (18:57 +0200)]
address root cause of compilation failures:
The affected code wasn't even being compiled on my system,
because HAVE_NL_LANGINFO was not defined. On other systems, where
vasnprintf.m4 determines it needs %A or %a replacement support, it
_would_ check for nl_langinfo, and expose the compilation failure.
* m4/jm-macros.m4: Check for nl_langinfo, required by sort.c.
Jim Meyering [Sun, 15 Jun 2008 16:52:27 +0000 (18:52 +0200)]
fix the compilation failure for real
* src/sort.c (monthtab): Neither "const" may be added.
Jim Meyering [Sun, 15 Jun 2008 14:28:48 +0000 (16:28 +0200)]
fix a const-related compilation failure in sort.c
* src/sort.c (monthtab): Remove overzealous "const".
Table entries are modified in an #if HAVE_NL_LANGINFO block.
Introduced by
1463824d8e7f72c31f1d803d7cfe2b608ccafc5c.
Jim Meyering [Sun, 15 Jun 2008 14:01:04 +0000 (16:01 +0200)]
update HACKING guidelines
* HACKING: Don't suggest --signoff; it's redundant.
(log requirements): Specify preferred forms.
Mention preference for "<" over ">".
Mention the "const placement" preference.
Jim Meyering [Fri, 13 Jun 2008 18:31:46 +0000 (20:31 +0200)]
run gnulib-tests in parallel
* tests/Makefile.am: Define AUTOMAKE_OPTIONS, so check.mk can append.
* tests/check.mk: Define SUFFIXES, so check.mk can append.
* build-aux/check.mk (SUFFIXES): Append, so as not to evoke
automake warning the prior definition in gnulib-tests/gnulib.mk.
(AUTOMAKE_OPTIONS): Likewise.
* gnulib-tests/Makefile.am (TEST_LOGS): Define.
Include build-aux/check.mk
Jim Meyering [Sat, 14 Jun 2008 20:26:29 +0000 (22:26 +0200)]
* maint.mk (sc_proper_name_utf8_requires_ICONV) Fix typo in diagnostic.
Jim Meyering [Thu, 12 Jun 2008 20:06:15 +0000 (22:06 +0200)]
add "const" attribute, where possible
* maint.mk (sc_const_long_option): New rule. Enforce global change.
* src/base64.c (long_options): Use "const" where possible.
* src/cat.c (main): Likewise.
* src/chcon.c (long_options): Likewise.
* src/chgrp.c (long_options): Likewise.
* src/chmod.c (long_options): Likewise.
* src/chown.c (long_options): Likewise.
* src/comm.c (long_options, OUTPUT_DELIMITER_OPTION): Likewise.
* src/cp.c (long_opts): Likewise.
* src/csplit.c (longopts): Likewise.
* src/cut.c (longopts): Likewise.
* src/date.c (long_options): Likewise.
* src/dd.c (conversions, flags, statuses): Likewise.
* src/df.c (long_options): Likewise.
* src/dircolors.c (long_options): Likewise.
* src/du.c (long_options): Likewise.
* src/env.c (longopts): Likewise.
* src/expand.c (longopts): Likewise.
* src/fmt.c (long_options): Likewise.
* src/fold.c (longopts): Likewise.
* src/groups.c (longopts): Likewise.
* src/head.c (long_options): Likewise.
* src/id.c (longopts): Likewise.
* src/install.c (long_options): Likewise.
* src/join.c (longopts): Likewise.
* src/kill.c (long_options): Likewise.
* src/ln.c (long_options): Likewise.
* src/ls.c (long_time_format, long_options, sort_functions): Likewise.
* src/md5sum.c (long_options): Likewise.
* src/mkdir.c (longopts): Likewise.
* src/mkfifo.c (longopts): Likewise.
* src/mknod.c (longopts): Likewise.
* src/mktemp.c (longopts): Likewise.
* src/mv.c (long_options): Likewise.
* src/nice.c (longopts): Likewise.
* src/nl.c (longopts): Likewise.
* src/od.c (charname, long_options): Likewise.
* src/paste.c (longopts): Likewise.
* src/pathchk.c (longopts): Likewise.
* src/pinky.c (longopts): Likewise.
* src/pr.c (long_options): Likewise.
* src/ptx.c (long_options): Likewise.
* src/readlink.c (longopts): Likewise.
* src/rm.c (long_opts): Likewise.
* src/rmdir.c (longopts): Likewise.
* src/runcon.c (long_options): Likewise.
* src/seq.c (long_options): Likewise.
* src/shred.c (long_opts): Likewise.
* src/shuf.c (long_opts): Likewise.
* src/sort.c (monthtab, long_options): Likewise.
* src/split.c (longopts): Likewise.
* src/stat.c (long_options): Likewise.
* src/stty.c (mode_info, control_info, longopts, set_mode) Likewise.
(set_control_char, speeds): Likewise.
* src/su.c (longopts): Likewise.
* src/sum.c (longopts): Likewise.
* src/tac.c (longopts): Likewise.
* src/tail.c (long_options): Likewise.
* src/tee.c (long_options): Likewise.
* src/timeout.c (long_options): Likewise.
* src/touch.c (longopts): Likewise.
* src/tr.c (long_options): Likewise.
* src/truncate.c (longopts): Likewise.
* src/tty.c (longopts): Likewise.
* src/uname.c (uname_long_options, arch_long_options): Likewise.
* src/unexpand.c (longopts): Likewise.
* src/uniq.c (longopts): Likewise.
* src/wc.c (longopts): Likewise.
* src/who.c (longopts): Likewise.
Jim Meyering [Sat, 14 Jun 2008 09:04:41 +0000 (11:04 +0200)]
revert previous change, "don't use "const" with scalar types"
* src/truncate.c: There is nothing wrong with that construct.
This reverts commit
d7d80c5b7b122377fe250357a3ab182e8fbde20a.
Jim Meyering [Sat, 14 Jun 2008 07:46:47 +0000 (09:46 +0200)]
don't use "const" with scalar types
* src/truncate.c: Several vendor compilers reject that.
See http://article.gmane.org/gmane.comp.lib.gnulib.bugs/13876
Eric Blake [Thu, 12 Jun 2008 17:05:09 +0000 (11:05 -0600)]
od: improve handling of padding
* src/od.c (decode_one_format): Alter the format, again.
(FMT_BYTES_ALLOCATED): Reduce size by adjusting to new format.
(MAX_INTEGRAL_TYPE_SIZE): Move earlier in the file.
(charname): Turn it into a 2D array, since there's no need for
pointers now.
(PRINT_TYPE, print_named_ascii, print_ascii): Add a width
parameter.
(write_block): Account for width parameter.
Using ideas from Paul Eggert.
Eric Blake [Wed, 11 Jun 2008 15:14:26 +0000 (09:14 -0600)]
od: align multiple -t specs
* src/od.c (struct tspec): Add pad_width field, and adjust
print_function prototype.
(decode_one_format): Rewrite all fmt_string values to account for
pad width.
(FMT_BYTES_ALLOCATED): Adjust to new format style.
(main): Compute pad width per spec.
(write_block): Account for pad width.
(dump): Don't print padding-only fields.
(PRINT_TYPE, print_named_ascii, print_ascii): All print functions
adjusted to use variable pad width.
* tests/Makefile.am (TESTS): Add test.
* tests/misc/od-multiple-t: New file.
* THANKS: Update.
* NEWS: Mention the improvement.
Reported by Gary Johnson.
Eric Blake [Wed, 11 Jun 2008 21:02:20 +0000 (15:02 -0600)]
od: use gnulib printf replacement as necessary
* src/od.c (includes): Add xprintf.h.
(PRINT_TYPE): New macro, using xprintf instead of printf.
(print_s_char, print_char, print_s_short, print_short, print_int)
(print_long, print_long_long, print_float, print_double)
(print_long_double): Factor into PRINT_TYPE macro.
(print_named_ascii, print_ascii): Use xprintf.
* NEWS: Mention this as a bug fix.
Eric Blake [Wed, 11 Jun 2008 17:45:16 +0000 (11:45 -0600)]
od: simplify long double support
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Remove obsolete check for
AC_C_LONG_DOUBLE.
* src/od.c (LONG_DOUBLE): Delete.
(width_bytes, MAX_FP_TYPE_SIZE, decode_one_format, main): Just use
'long double' directly.
(print_long_double): No longer protect by HAVE_LONG_DOUBLE.
Eric Blake [Wed, 11 Jun 2008 14:01:31 +0000 (08:01 -0600)]
doc: od defaults to -toS, not -td2
* src/od.c (usage): Correct description of default.
Jim Meyering [Fri, 13 Jun 2008 20:26:15 +0000 (22:26 +0200)]
skip (don't fail) root-only tests for common set-up failures
Address 2 of 4 failures reported by Jarod Wilson in
http://bugzilla.redhat.com/442352. More details here:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803
* tests/cp/cp-a-selinux: Skip the test if "mkfs -t ext2" fails.
* tests/rm/fail-2eperm: Skip the test if "rm" is not accessible.
Jim Meyering [Thu, 12 Jun 2008 19:38:17 +0000 (21:38 +0200)]
tweak to conform with syntax policy
Use "<" or "<=" rather than ">" or ">=".
Use "Type const *", rather than "const Type *".
Bo Borgerson [Wed, 23 Apr 2008 03:47:42 +0000 (23:47 -0400)]
comm: accept new option: --output-delimiter=STR
* src/comm.c (delimiter): New global.
(writeline): Use delimiter string instead of single TAB character.
(main): Initialize delimiter.
* tests/misc/comm: Add tests for comm output delimiter specification.
* doc/coreutils.texi: Document new option.
* NEWS: Advertise new option.
* TODO: Remove associated item.
Bo Borgerson [Mon, 21 Apr 2008 01:24:16 +0000 (21:24 -0400)]
comm: ensure that input files are sorted
* NEWS: List new behavior.
* doc/coreutils.texi (checkOrderOption) New macro for
describing `--check-order' and `--nocheck-order', used in
both join and comm.
* src/comm.c (main): Initialize new options.
(usage): Describe new options.
(compare_files): Keep an extra pair of buffers for the previous
line from each file to check the internal order.
(check_order): If an order-check is required, compare and handle
the result appropriately.
(copylinebuffer): Copy a linebuffer; used for copy before read.
* tests/misc/Makefile.am: List new test.
* tests/misc/comm: Tests for the comm program, including the
new order-checking functionality and attendant command-line options.
Jim Meyering [Wed, 11 Jun 2008 12:04:45 +0000 (14:04 +0200)]
fix another unportable use of 'tr'
* configure.ac [EXTRA_PROGRAMS]: Add omitted space in tr's STRING2.
Spotted by Denis Excoffier, upon Solaris 8 build failure.
Jim Meyering [Wed, 11 Jun 2008 09:52:03 +0000 (11:52 +0200)]
tests: skip a chown test on FreeBSD 6.x
* tests/chown/separator: Skip this test if is likely to fail
due to the combination of a bogus group name and a broken
getgrnam function.
Jim Meyering [Wed, 11 Jun 2008 09:02:32 +0000 (11:02 +0200)]
tests: remove duplicate mention of misc/selinux
* tests/Makefile.am (TESTS): Remove misc/selinux, since it's
already listed in $(root_tests).
Bruno Haible [Wed, 11 Jun 2008 06:06:56 +0000 (08:06 +0200)]
fix build failure on AIX 4
* configure.ac: Fix unportable invocation of 'tr', introduced on
2008-04-22. Affects tr from at least AIX 4.3.2.
Pádraig Brady [Mon, 9 Jun 2008 15:36:38 +0000 (16:36 +0100)]
remove test for specific diagnostic when truncating missing directory
Solaris 10 returns ENOTDIR when truncating a nonexistent directory,
whereas Linux returns EISDIR (because it has a trailing /).
* tests/misc/truncate-fail-diag: Remove the test for the specific error.
Pádraig Brady [Mon, 9 Jun 2008 15:10:47 +0000 (16:10 +0100)]
timeout: use system-independent exit values
Change exit values from ETIMEDOUT and ECANCELED,
the values of which are system dependent, to
124 and 125 respectively.
* src/timeout.c (EXIT_TIMEDOUT, EXIT_CANCELED): Define.
(usage, main): Adjust.
* coreutils.texi (timeout invocation): Update.
* tests/misc/timeout: Adjust.
Jim Meyering [Mon, 9 Jun 2008 08:52:20 +0000 (10:52 +0200)]
enforce the proper_name_utf8-requires-ICONV link rule
* maint.mk (sc_proper_name_utf8_requires_ICONV): New rule.
* src/Makefile.am (timeout_LDADD, truncate_LDADD): Add $(LIBICONV).
Bruno Haible [Mon, 9 Jun 2008 07:10:06 +0000 (09:10 +0200)]
* NEWS (Improvements): Mention improved (via gnulib) ACL support.
Jim Meyering [Sun, 8 Jun 2008 10:33:28 +0000 (12:33 +0200)]
maint.mk: my-distcheck runs $(MAKE) syntax-check once again
* maint.mk (my-distcheck): Run $(MAKE) syntax-check once again.
Run "$(MAKE) check" _after_ the less expensive syntax-check.
Bo Borgerson [Fri, 4 Apr 2008 15:13:13 +0000 (11:13 -0400)]
standardize some error messages
* maint.mk: (sc_error_message_warn_fatal, sc_error_message_uppercase):
(sc_error_message_period): Add automatic checks for non-standard error
messages.
* .x-sc_error_message_uppercase: explicit exclusion for this check
* src/cp.c: Standardize some error messages.
* src/date.c: Likewise.
* src/dircolors.c: Likewise.
* src/du.c: Likewise.
* src/expr.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/ln.c: Likewise.
* src/mv.c: Likewise.
* src/od.c: Likewise.
* src/pr.c: Likewise.
* src/split.c: Likewise.
* src/truncate.c: Likewise.
* src/wc.c: Likewise.
* tests/du/files0-from: Expect new error message.
* tests/misc/join: Likewise.
* tests/misc/split-a: Likewise.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/xstrtol: Likewise.
* lib/xmemxfrm.c: Likewise.
Jim Meyering [Sun, 8 Jun 2008 08:30:50 +0000 (10:30 +0200)]
syntax-check: detect anachronistic Perl-based tests
* maint.mk (sc_no_exec_perl_coreutils): Rename and rewrite.
Pádraig Brady [Fri, 28 Mar 2008 22:55:31 +0000 (22:55 +0000)]
Add new program: truncate
* AUTHORS: Register as the author
* NEWS: Mention this change
* README: Add truncate command to list
* src/truncate.c: New command
* src/Makefile.am: Add truncate command to list to build
* src/.gitignore: Add truncate binary to list to ignore
* doc/coreutils.texi (truncate invocation): Add truncate info
* man/Makefile.am: Add truncate man page to list to build
* man/truncate.x: Add truncate man page template
* po/POTFILES.in: Add truncate to list to translate
* tests/Makefile.am: Add truncate tests
* tests/misc/help-version: Add support for new truncate command
* tests/misc/truncate-dangling-symlink: check dangling link ok
* tests/misc/truncate-dir-fail: ensure dirs fail
* tests/misc/truncate-fail-diag: validate messages for missing paths
* tests/misc/truncate-fifo: ensure fifos ignored
* tests/misc/truncate-no-create-missing: ensure -c option honoured
* tests/misc/truncate-overflow: check signed integer overflows
* tests/misc/truncate-owned-by-other: root permissions check
* tests/misc/truncate-parameters: check invalid parameter combinations
* tests/misc/truncate-relative: check invalid relative sizes
Eric Blake [Fri, 6 Jun 2008 00:33:26 +0000 (18:33 -0600)]
improve 'date +%C' documentation
* src/date.c (usage): Use 20, not 21, for current century.
* THANKS: Update.
Reported by Dameon G. Rogers, fix suggested by Philip Rowlands.
Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering [Tue, 3 Jun 2008 11:58:07 +0000 (13:58 +0200)]
nice.c: avoid a cast
* src/nice.c (main): Use argv[0], rather than
"program_name with a cast". Suggestion from Eric Blake.
Jim Meyering [Tue, 3 Jun 2008 08:33:17 +0000 (10:33 +0200)]
adjust c99-to-c89 patch as well as the code to generate it
* maint.mk (patch-check) [REGEN_PATCH]: Eliminate date-related
differences in generated diffs.
* src/c99-to-c89.diff: Adjust offsets.
Jim Meyering [Tue, 3 Jun 2008 06:34:09 +0000 (08:34 +0200)]
use gnulib's progname module
* bootstrap.conf (gnulib_modules): Add progname.
* src/*.c (program_name): Remove declaration.
* (main): Call set_program_name rather than setting program_name.
* src/nice.c (main): Cast program_name to "(char *)".
* src/prog-fprintf.c: Include "system.h"
* src/system.h: Include "progname.h".
* maint.mk (sc_program_name): Adjust rule.
Suggestion from Eric Blake.
Jim Meyering [Tue, 3 Jun 2008 05:44:09 +0000 (07:44 +0200)]
remove duplicate definition of matchpathcon_init_prefix
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Remove definition.
It is already defined there. Reported by Eric Blake.
Jim Meyering [Mon, 2 Jun 2008 19:47:19 +0000 (21:47 +0200)]
fix cpp indentation policy violations
* src/copy.c (mkfifo): Indent nested "# define".
* src/timeout.c (ECANCELED): Likewise.
Jim Meyering [Mon, 2 Jun 2008 19:17:57 +0000 (21:17 +0200)]
accommodate older SELinux which lacks matchpathcon_init_prefix
* m4/jm-macros.m4: Check for matchpathcon_init_prefix.
* src/install.c [!HAVE_MATCHPATHCON_INIT_PREFIX]
(matchpathcon_init_prefix): Define away.
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
Reported by Ilya N. Golubev in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13686>.
Jim Meyering [Mon, 2 Jun 2008 15:48:11 +0000 (17:48 +0200)]
each file with a "main" must also declare program_name
* maint.mk (sc_program_name): New rule.
* .x-sc_program_name: New file.
* Makefile.am (EXTRA_DIST): Add .x-sc_program_name.
Jim Meyering [Mon, 2 Jun 2008 15:47:32 +0000 (17:47 +0200)]
declare program_name consistently
* src/base64.c: Likewise.
* src/basename.c: Likewise.
* src/cat.c: Likewise.
* src/chcon.c: Likewise.
* src/chgrp.c: Likewise.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/chroot.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cp.c: Likewise.
* src/csplit.c: Likewise.
* src/cut.c: Likewise.
* src/date.c: Likewise.
* src/dd.c: Likewise.
* src/df.c: Likewise.
* src/dircolors.c: Likewise.
* src/dirname.c: Likewise.
* src/du.c: Likewise.
* src/echo.c: Likewise.
* src/env.c: Likewise.
* src/expand.c: Likewise.
* src/expr.c: Likewise.
* src/factor.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/groups.c: Likewise.
* src/head.c: Likewise.
* src/hostid.c: Likewise.
* src/hostname.c: Likewise.
* src/id.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/kill.c: Likewise.
* src/link.c: Likewise.
* src/ln.c: Likewise.
* src/logname.c: Likewise.
* src/ls.c: Likewise.
* src/md5sum.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
* src/mktemp.c: Likewise.
* src/mv.c: Likewise.
* src/nice.c: Likewise.
* src/nl.c: Likewise.
* src/nohup.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/pathchk.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/printenv.c: Likewise.
* src/printf.c: Likewise.
* src/ptx.c: Likewise.
* src/pwd.c: Likewise.
* src/readlink.c: Likewise.
* src/rm.c: Likewise.
* src/rmdir.c: Likewise.
* src/runcon.c: Likewise.
* src/seq.c: Likewise.
* src/setuidgid.c: Likewise.
* src/shuf.c: Likewise.
* src/sleep.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/su.c: Likewise.
* src/sum.c: Likewise.
* src/sync.c: Likewise.
* src/tac.c: Likewise.
* src/tail.c: Likewise.
* src/tee.c: Likewise.
* src/test.c: Likewise.
* src/timeout.c: Likewise.
* src/touch.c: Likewise.
* src/tr.c: Likewise.
* src/true.c: Likewise.
* src/tsort.c: Likewise.
* src/tty.c: Likewise.
* src/uname.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/unlink.c: Likewise.
* src/uptime.c: Likewise.
* src/users.c: Likewise.
* src/wc.c: Likewise.
* src/who.c: Likewise.
* src/whoami.c: Likewise.
* src/yes.c: Likewise.
Eric Blake [Mon, 2 Jun 2008 13:53:26 +0000 (07:53 -0600)]
export program_name, required by gnulib
* src/timeout.c (program_name): Export.
Jim Meyering [Mon, 2 Jun 2008 13:05:38 +0000 (15:05 +0200)]
revert inadvertent change in last patch
* configure.ac (AM_INIT_AUTOMAKE): Restore accidentally-modified
options. Spotted by Eric Blake.
Pádraig Brady [Fri, 28 Mar 2008 11:05:55 +0000 (11:05 +0000)]
new program: timeout
* AUTHORS: Register as the author.
* NEWS: Mention this change.
* README: Add timeout command to list.
* src/timeout.c: New file.
* src/kill.c (operand2sig): Move function to its own file,
now that timeout.c will also use it.
* src/operand2sig.c (operand2sig): New file, extracted from kill.c.
* src/operand2sig.h (operand2sig): Declare.
* src/Makefile.am (EXTRA_PROGRAMS): Add timeout.
* src/.gitignore: Add timeout binary to list to ignore.
* doc/coreutils.texi (timeout invocation): Add timeout info.
(Signal specifications): New section, also referenced by kill.
* man/Makefile.am (timeout.1): Add dependency.
* man/timeout.x: New file.
* po/POTFILES.in: Add timeout.c and operand2sig.c to list to translate.
* tests/Makefile.am (TESTS): Add the two new tests.
* tests/misc/help-version: Add support for new timeout command.
* tests/misc/invalid-opt: Add support for new timeout command.
* tests/misc/timeout: New file: check basic timeout operation.
* tests/misc/timeout-parameters: New file: check invalid parameter
combinations.
Jim Meyering [Mon, 2 Jun 2008 12:12:59 +0000 (14:12 +0200)]
spell author names consistently
* src/comm.c (AUTHORS): Use RMS' middle initial.
* src/ls.c (AUTHORS): Likewise.
* src/rm.c (AUTHORS): Likewise.
* src/uniq.c (AUTHORS): Likewise.
* src/cut.c (AUTHORS): Use David M. Ihnat's middle initial.
* AUTHORS: Update to match.
Reported by Michael Piefel.
Simon Josefsson [Sun, 1 Jun 2008 11:51:14 +0000 (13:51 +0200)]
doc: adjust base64 documentation
* coreutils.texi (base64 invocation): Use RFC 4648 as the specification.
Move the URL down a bit in the text.
Erik Auerswald [Sun, 1 Jun 2008 10:40:40 +0000 (12:40 +0200)]
md5sum: new option, --quiet, to suppress OK messages
sha1sum, sha224sum, sha384sum, and sha512sum accept it, too.
* src/md5sum.c: add option --quiet to suppress OK messages
* doc/coreutils.texi: document option --quiet
* tests/misc/md5sum: add test for option --quiet
* NEWS: mention new option --quiet for md5sum+sha*sum in "New
features" section
Jim Meyering [Sun, 1 Jun 2008 12:48:07 +0000 (14:48 +0200)]
add rules to commit three post-release changes automatically
* maint.mk (noteworthy): Define.
(emit-commit-log): Define.
(alpha beta major): Also update NEWS and cfg.mk automatically,
and commit all three changes at once.
Jim Meyering [Sun, 1 Jun 2008 12:44:50 +0000 (14:44 +0200)]
update old_NEWS_hash
* cfg.mk (old_NEWS_hash): Update by running "make update-NEWS-hash".
Reported by Erik Auerswald.
Simon Josefsson [Sun, 1 Jun 2008 11:08:20 +0000 (13:08 +0200)]
src/base64.c: Improve comments.
Jim Meyering [Sun, 1 Jun 2008 09:00:51 +0000 (11:00 +0200)]
* NEWS: add header line for next release
Jim Meyering [Sun, 1 Jun 2008 08:39:13 +0000 (10:39 +0200)]
adjust format of .prev-version commit message
* maint.mk (alpha beta major): Start with "*", omit version number.
Jim Meyering [Sun, 1 Jun 2008 08:11:01 +0000 (10:11 +0200)]
* .prev-version: Record previous version.
Jim Meyering [Sat, 31 May 2008 21:20:56 +0000 (23:20 +0200)]
Version 6.12.
* NEWS: Record release date.
Jim Meyering [Sat, 31 May 2008 20:42:20 +0000 (22:42 +0200)]
install: reenable matchpathcon-related code
The underlying performance problem is being dealt with in Automake
by limiting the number of install invocations, and in SELinux with
incremental changes as well as a potential new implementation.
* src/Makefile.am (ginstall_CPPFLAGS) [ENABLE_MATCHPATHCON]: Define.
* src/install.c [ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
Rename to ENABLE_MATCHPATHCON.
* NEWS: mention this change
Jim Meyering [Fri, 30 May 2008 12:14:43 +0000 (14:14 +0200)]
configure.ac: remove explicit use of AB_INIT
* configure.ac: Don't invoke AB_INIT directly, now that it's
done automatically via gl_INIT.
Jim Meyering [Fri, 30 May 2008 08:45:45 +0000 (10:45 +0200)]
tests: ignore known failure on all Darwin 8.x / Mac OS X v10.4.x
* tests/chgrp/basic: Update comment and host_triplet version test.
Jim Meyering [Fri, 30 May 2008 07:45:53 +0000 (09:45 +0200)]
tests: avoid failure with older version of Perl's File::Temp
* tests/CuTmpdir.pm (import): Use &File::Temp::cleanup only
if it is defined. Reported by Bruno Haible in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13652
Jim Meyering [Fri, 30 May 2008 07:08:51 +0000 (09:08 +0200)]
NEWS: mention that cp -p copies permissions more portably
Based on wording suggested by Bruno Haible.
Jim Meyering [Thu, 29 May 2008 19:32:40 +0000 (21:32 +0200)]
improve description of du's--separate-dirs option
* coreutils.texi (du invocation): Prompted by Volker Badziong's
report in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13646
Jim Meyering [Thu, 29 May 2008 16:01:05 +0000 (18:01 +0200)]
du.c: tiny cleanup (no semantic change)
* src/du.c (process_file): Use "file", rather than
equivalent "ent->fts_path".
Jim Meyering [Tue, 27 May 2008 11:45:44 +0000 (13:45 +0200)]
in 280+ tests/* files, use $srcdir, not $top_srcdir/tests
Jim Meyering [Tue, 27 May 2008 11:24:20 +0000 (13:24 +0200)]
prefer abs_srcdir over abs_top_srcdir, ...
so that e.g., tests/* may refer to absolute names without
hard-coding the name of the containing directory (tests/, here).
* tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir.
* tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr.
* tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests.
* tests/cp/cp-parents: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/into-self-2: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/sample-test: Likewise.
Jim Meyering [Tue, 27 May 2008 10:29:57 +0000 (12:29 +0200)]
tests: generalize my-distcheck
* maint.mk (my-distcheck): Accommodate missing gnulib-tests.
Jim Meyering [Mon, 26 May 2008 12:35:56 +0000 (14:35 +0200)]
reflect renaming of acl.c in gnulib
* POTFILES.in: s/acl.c/set-mode-acl.c/
Jim Meyering [Wed, 21 May 2008 21:08:11 +0000 (23:08 +0200)]
test installation results more thoroughly
* maint.mk (my-distcheck): Ensure that properly-named binaries
are installed. Also check all man pages, except [.1.
Move configure-time --prefix= to install-time prefix=.
(my-instcheck, install-transform-check): Define.
Jim Meyering [Wed, 21 May 2008 21:08:11 +0000 (23:08 +0200)]
install many binaries at once, when possible
* src/Makefile.am (install-exec-am): Override the standard
automake-generated target, so we can decide whether to use
the usual install-one-by-one rule, or whether we can use
the new install-many-at-once rule:
(cu-install-binPROGRAMS): New rule.
Jim Meyering [Mon, 19 May 2008 15:02:12 +0000 (17:02 +0200)]
* src/runcon.c: Add copyright comment.
Jim Meyering [Mon, 19 May 2008 17:39:30 +0000 (19:39 +0200)]
adjust AUTHORS and check-AUTHORS rule to accommodate
* AUTHORS: Add coding: utf-8 comment at end.
Spell François' and Torbjörn's names properly.
* src/Makefile.am: Parse AUTHORS file more carefully.
Use perl to join now-split lines.
Use en_US.UTF-8 to generate --version output.
Jim Meyering [Mon, 19 May 2008 15:34:56 +0000 (17:34 +0200)]
* src/c99-to-c89.diff: Adjust offsets.
Jim Meyering [Mon, 19 May 2008 14:49:35 +0000 (16:49 +0200)]
adjust copyright dates
Jim Meyering [Mon, 19 May 2008 14:43:32 +0000 (16:43 +0200)]
convert the rest to use proper_name -- manually
* src/base64.c (AUTHORS): Rename from AUTHOR, for consistency.
Jim Meyering [Mon, 19 May 2008 14:28:14 +0000 (16:28 +0200)]
convert 3-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+", "[^,]+", "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+"), ("[^,]+"), ("[^,]+")$/$1 \\\n proper_name ($2), \\\n proper_name ($3), \\\n proper_name ($4)/'
Jim Meyering [Mon, 19 May 2008 14:26:25 +0000 (16:26 +0200)]
convert 2-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+", "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+"), ("[^,]+")$/$1 \\\n proper_name ($2), \\\n proper_name ($3)/'
Jim Meyering [Mon, 19 May 2008 14:24:27 +0000 (16:24 +0200)]
convert single-author programs to use proper_name
g grep -E -l 'define AUTHORS "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+")$/$1 proper_name ($2)/'
Jim Meyering [Mon, 19 May 2008 14:14:13 +0000 (16:14 +0200)]
use gnulib's proper_name_utf8 function, but *not* proper_name
* bootstrap.conf (gnulib_modules): Add propername.
(XGETTEXT_OPTIONS): Add options to tell xgettext about the functions.
* src/cat.c, src/cp.c, src/df.c, src/du.c, src/split.c:
Mark Torbjörn Granlund's name.
* src/ptx.c: Mark François Pinard's name.
Use "TRANSLATORS:" comment marker, rather than "Note to translators:".
* src/system.h: Include propername.h.
(proper_name): Define away.
* src/Makefile.am (cat_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
Initialize, so we can...
(cat_LDADD, cp_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
...Use "+=" to append $(LIBICONV) for each program that uses
proper_name_utf8.
Jim Meyering [Thu, 22 May 2008 22:30:46 +0000 (00:30 +0200)]
* POTFILES.in: Add lib/copy-acl.c.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Jim Meyering [Tue, 20 May 2008 15:58:42 +0000 (17:58 +0200)]
install: avoid a leak in currently-ifdef'd-out code
* src/install.c (setdefaultfilecon)
[ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
Call matchpathcon_init_prefix only once.
Suggestion from Stephen Smalley. Reported by Ben Webb in
<http://bugzilla.redhat.com/447410>.
Jim Meyering [Mon, 19 May 2008 17:50:34 +0000 (19:50 +0200)]
use gnulib's base64 module, now that it's sync'd to match this one
* gl/lib/base64.c: Remove file.
* gl/lib/base64.h: Remove file.
Pádraig Brady [Mon, 19 May 2008 06:54:07 +0000 (07:54 +0100)]
doc: clarify field delimiter description in uniq --help output
* src/uniq.c: Clarify in help output that field delimiters are
blanks and not the larger set of whitespace characters.
Jim Meyering [Fri, 16 May 2008 20:55:27 +0000 (22:55 +0200)]
tests: skip when a debian libc6-2.7-11 bug makes printf segfault
* tests/misc/printf-surprise: Detect case of a low-memory-provoked
segfault and skip the test (this is actually a bug in snprintf).
For details, see http://bugs.debian.org/481543
Jim Meyering [Thu, 15 May 2008 09:43:18 +0000 (11:43 +0200)]
tests: sync and update wc and du --files0-from tests
* tests/du/files0-from: Sync from tests/misc/wc-files0-from.
(minus-in-minus): New test.
Adjust for new diagnostics.
* tests/misc/wc-files0-from: Adjust for new diagnostics.
Jim Meyering [Thu, 15 May 2008 09:19:44 +0000 (11:19 +0200)]
du, wc: merge improved --files0-from=F-related diagnostics
du gave a better diagnostic for one unusual case,
and wc gave a better diagnostic for a different one.
Now each diagnoses both unusual cases.
* src/du.c (main): Disallow '-' as file name when reading from stdin.
* src/wc.c (main): Give a better diagnostic for a zero-length file name.
Jim Meyering [Mon, 12 May 2008 12:43:23 +0000 (14:43 +0200)]
test invalid-option handling in all programs
* tests/Makefile.am (TESTS): Add misc/invalid-opt.
* tests/misc/invalid-opt: New file.
Jim Meyering [Wed, 14 May 2008 07:37:02 +0000 (09:37 +0200)]
tests: remove ugly /bin/sh wrapper around each perl-based test script
* tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around
envvar-check, so that the few scripts that require $TMPDIR don't fail.
This is also good to let a user's default TMPDIR setting be used e.g.,
in the search for an 'other-partition'.
FIXME: this is pretty ugly. maybe undo it and find a better way.
(TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T
if the script requires that. Otherwise, use $(SHELL).
* tests/misc/md5sum-newline: Create a file whose name contains
a newline in Perl (resort to using "system", since open refuses).
Fix old brokenness exposed by this change:
* tests/du/files0-from: Correct test not to rely on stdin
being attached to a non-tty.
* tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file.
Avoid warnings about using qw()-around-commas.
* tests/rm/fail-eperm: Now that this test is run from a temporary
subdirectory, adjust the full name of the "rm" program we're going
to run.
Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines
of boilerplate code to invoke perl. Do not "require 5.00x";
a configure-time Perl test handles that
* tests/dd/skip-seek:
* tests/misc/base64:
* tests/misc/basename:
* tests/misc/cut:
* tests/misc/date:
* tests/misc/dircolors:
* tests/misc/dirname:
* tests/misc/expand:
* tests/misc/expr:
* tests/misc/factor:
* tests/misc/fmt:
* tests/misc/fold:
* tests/misc/head:
* tests/misc/head-elide-tail:
* tests/misc/join:
* tests/misc/ls-misc:
* tests/misc/md5sum:
* tests/misc/md5sum-newline:
* tests/misc/mktemp:
* tests/misc/od:
* tests/misc/paste:
* tests/misc/pr:
* tests/misc/printf-cov:
* tests/misc/seq:
* tests/misc/sha1sum:
* tests/misc/sha1sum-vec:
* tests/misc/sha224sum:
* tests/misc/sha256sum:
* tests/misc/sha384sum:
* tests/misc/sha512sum:
* tests/misc/sort-merge:
* tests/misc/stat-printf:
* tests/misc/sum:
* tests/misc/tac:
* tests/misc/tail:
* tests/misc/test:
* tests/misc/test-diag:
* tests/misc/tr:
* tests/misc/tsort:
* tests/misc/tty-eof:
* tests/misc/unexpand:
* tests/misc/uniq:
* tests/misc/wc:
* tests/misc/wc-files0-from:
* tests/misc/xstrtol:
* tests/mv/i-1:
* tests/pr/pr-tests:
* tests/rm/empty-name:
* tests/rm/fail-eperm:
* tests/rm/unreadable:
Jim Meyering [Mon, 12 May 2008 12:39:55 +0000 (14:39 +0200)]
tests: allow to run Perl tests more cleanly
Before this change, perl tests were run via a #!/bin/sh script
in which perl was invoked via $(PERL) ... -- - <<\EOF.
That made some stty tests fail due to the way stdin was usurped.
* build-aux/check.mk (am__check_pre): Don't append $(SHELL) to this
nominally automake-internal variable.
* tests/check.mk (TESTS_ENVIRONMENT): Instead, define a shell function
here, and append it to the more user-visible $(TESTS_ENVIRONMENT).
Jim Meyering [Mon, 12 May 2008 06:49:58 +0000 (08:49 +0200)]
tests: env-related clean up
* tests/Coreutils.pm: tiny clean-up: s/env/env --/
* tests/misc/help-version: Use "env" rather than an absolute file
name prefix.
* tests/misc/printf-surprise: Likewise.
Jim Meyering [Sun, 11 May 2008 22:27:37 +0000 (00:27 +0200)]
tests: improve coverage of printf.c
* tests/misc/printf-cov: New file.
* tests/Makefile.am (TESTS): Add misc/printf-cov.
* tests/misc/help-version: Use env rather than abs file name prefix.
Jim Meyering [Sun, 11 May 2008 22:28:28 +0000 (00:28 +0200)]
make HACKING slightly more generic
* HACKING: remove some uses of "coreutils"
Point to git's own SubmittingPatches URL.
Bruno Haible [Thu, 15 May 2008 07:32:07 +0000 (09:32 +0200)]
doc: some Unicode characters cannot be specified via \u or \U
* doc/coreutils.texi (printf invocation): Clarify invalid ranges for
Unicode character escape syntax.
Jim Meyering [Sun, 11 May 2008 07:00:59 +0000 (09:00 +0200)]
move sha256 and sha512 modules to gnulib
* bootstrap.conf (gnulib_modules) [sha256, sha512]: Add "crypto/"
prefix to module name, now that they come from gnulib.
* gl/lib/sha256.c: Remove file.
* gl/lib/sha256.h: Likewise.
* gl/lib/sha512.c: Likewise.
* gl/lib/sha512.h: Likewise.
* gl/lib/u64.h: Likewise.
* gl/m4/sha256.m4: Likewise.
* gl/m4/sha512.m4: Likewise.
* gl/modules/sha256: Likewise.
* gl/modules/sha512: Likewise.
Jim Meyering [Sat, 10 May 2008 09:57:22 +0000 (11:57 +0200)]
now that the last of the mk-script-using tests is gone...
* tests/Makefile.am (EXTRA_DIST): Remove Makefile.am.in and mk-script.
Move/adjust SUBDIRS-related comments.
* tests/Makefile.am.in: Remove file, no longer used.
* tests/mk-script: Likewise.
* bootstrap: Remove coreutils-specific SUBDIRS-related code.
Jim Meyering [Sat, 10 May 2008 10:11:52 +0000 (12:11 +0200)]
tests: remove directory, tests/join/
* configure.ac (AC_CONFIG_FILES): Remove tests/join/Makefile.
* tests/misc/join: New file, with tests from...
* tests/join/Test.pm: ...here. Remove file.
* tests/Makefile.am (SUBDIRS): Remove definition.
Jim Meyering [Sat, 10 May 2008 09:50:04 +0000 (11:50 +0200)]
* tests/misc/tac: Also perform stdin and piped tests.
Jim Meyering [Sat, 10 May 2008 09:38:07 +0000 (11:38 +0200)]
tests: convert pr tests
* configure.ac (AC_CONFIG_FILES): Remove tests/pr/Makefile.
* tests/Makefile.am (SUBDIRS): Remove pr.
* tests/pr/pr-tests: New file, with tests from...
* tests/pr/Test.pm: ...here. Remove file.
* tests/Makefile.am (EXTRA_DIST): Add $(pr_data).
(pr_data): List all of the pr's test-related data files.