Compare commits

...

11 Commits
v7.3 ... v7.4

Author SHA1 Message Date
Jim Meyering
4e54ea0480 version 7.4
* NEWS (Build-related): Mention make check fixes.
2009-05-07 15:35:19 +02:00
Jim Meyering
5aa7858385 admin: update NEWS
* NEWS (Bug fixes): Mention the date-related fixes.
(Portability): Mention the ACL-related fixes on *BSD.
2009-05-07 15:20:56 +02:00
Pádraig Brady
a6c9dd74d8 doc: note the use of LC_COLLATE in comm, join and uniq
* doc/coreutils.texi (uniq invocation): Simplify the
text to remove the inconsequential mentioning of order,
while implying that LC_COLLATE can alter equality comparisons.
* src/comm.c (usage): Mention LC_COLLATE is significant.
* src/join.c (usage): Ditto.
* src/uniq.c (usage): Ditto. Also improve the summary.
Suggestion from Andries Brouwer
2009-05-05 17:14:51 +01:00
Jim Meyering
8d00fb26f1 tests: rm/one-file-system: umount more reliably
* tests/rm/one-file-system: Run umount via trap, so it runs
also upon irregular termination.
2009-05-05 08:52:09 +02:00
Andreas Schwab
1d02be3b9d tests: fix typo in check-AUTHORS rule
* src/Makefile.am (check-AUTHORS): Set locale.
2009-05-05 08:52:03 +02:00
Jim Meyering
3a9072079c build: use a gnulib SHA1 that is not private
* gnulib: Update submodule to latest *public*.
2009-05-04 07:47:56 +02:00
Jim Meyering
975a38a267 build: update from gnulib, for ACL-related fixes
* gnulib: Update submodule to latest.
2009-05-04 07:10:12 +02:00
David Bartley
6249eb0596 mv, rm: adapt to new and improved gnulib interfaces
Use gnulib's new priv-set module and updated write-any-file.
With them, the remove-called can_write_any_file function no
longer tries to drop the unlink-directory privilege, so now
each caller of remove must do that separately, calling
priv_set_remove_linkdir.
* bootstrap.conf (gnulib_modules): Add priv-set.
* src/rm.c: Include "priv-set.h".
(main): Call priv_set_remove_linkdir.
* src/mv.c (main): Likewise.
* gnulib: Update submodule to latest.
2009-05-03 19:12:16 +02:00
Jim Meyering
181615b22a tests: correct the "make check"-run check-AUTHORS test
* src/Makefile.am (check-AUTHORS): Revert back to using
en_US.UTF-8, to ease parsing (English-only) text around the
list of names, even when .po files are not installed.
Reported by Andreas Schwab.
Along the way, use $(AM_V_GEN), not "@".
(sc_tight_scope): Use $(AM_V_GEN) here, too.
* gnulib: Update submodule to latest, for the proper_name_utf8 fix
that makes --version output print the UTF-8 rendering of author names
in more cases.
2009-05-03 15:51:27 +02:00
Jim Meyering
59e8a5e2b2 tests: add tests of e.g., date -d 'next monday'
* tests/misc/date-next-dow: New file.
* tests/Makefile.am (TESTS): Add misc/date-next-dow.
* gnulib: Update submodule to latest, for getdate.y that
handles "next Monday" properly when run on a Monday.
2009-05-03 12:03:50 +02:00
Jim Meyering
40d50b821f post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2009-05-01 18:19:19 +02:00
15 changed files with 141 additions and 16 deletions

View File

@@ -1 +1 @@
7.2
7.3

26
NEWS
View File

@@ -1,5 +1,31 @@
GNU coreutils NEWS -*- outline -*-
* Noteworthy changes in release 7.4 (2009-05-07) [stable]
** Bug fixes
date -d 'next mon', when run on a Monday, now prints the date
7 days in the future rather than the current day. Same for any other
day-of-the-week name, when run on that same day of the week.
[This bug appears to have been present in "the beginning". ]
date -d tuesday, when run on a Tuesday -- using date built from the 7.3
release tarball, not from git -- would print the date 7 days in the future.
Now, it works properly and prints the current date. That was due to
human error (including not-committed changes in a release tarball)
and the fact that there is no check to detect when the gnulib/ git
submodule is dirty.
** Build-related
make check: two tests have been corrected
** Portability
There have been some ACL-related portability fixes for *BSD,
inherited from gnulib.
* Noteworthy changes in release 7.3 (2009-05-01) [stable]
** Bug fixes

View File

@@ -160,6 +160,7 @@ gnulib_modules="
posix-shell
posixtm
posixver
priv-set
progname
propername
putenv

2
cfg.mk
View File

@@ -44,7 +44,7 @@ bootstrap-tools = autoconf,automake,gnulib,bison
# Now that we have better tests, make this the default.
export VERBOSE = yes
old_NEWS_hash = 40279d1aa0a0ef3ca9d1f0a001eb9e2f
old_NEWS_hash = 2f661e60191e2c52ba73c22e5ac42b79
# Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete.
dd = $(srcdir)/src/dd.c

View File

@@ -4406,8 +4406,8 @@ duplicate lines, perhaps you want to use @code{sort -u}.
@xref{sort invocation}.
@vindex LC_COLLATE
Comparisons use the character collating sequence specified by the
@env{LC_COLLATE} locale category.
Comparisons honor the rules specified by the @env{LC_COLLATE}
locale category.
If no @var{output} file is specified, @command{uniq} writes to standard
output.

2
gnulib

Submodule gnulib updated: 278d609ead...c90c5cc82c

View File

@@ -382,15 +382,16 @@ check-duplicate-no-install: tr
test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
# Ensure that the list of programs and author names is accurate.
# We need a UTF8 locale, and any one should do, but since configure
# already tries to find a French one, use it. It's fine to skip this test.
# We need a UTF8 locale. If a lack of locale support or a missing
# translation inhibits printing of UTF-8 names, just skip this test.
au_dotdot = authors-dotdot
au_actual = authors-actual
.PHONY: check-AUTHORS
check-AUTHORS: $(all_programs)
@locale='$(LOCALE_FR_UTF8)'; \
case "$$locale" in \
''|none) echo "$@: skipping this check"; exit 0;; esac; \
$(AM_V_GEN)locale=en_US.UTF-8; \
LC_ALL="$$locale" ./cat --version \
| grep ' Torbjorn ' > /dev/null \
&& { echo "$@: skipping this check"; exit 0; }; \
rm -f $(au_actual) $(au_dotdot); \
for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
| $(ASSORT) -u`; do \
@@ -420,7 +421,7 @@ check-AUTHORS: $(all_programs)
# The second nm|grep checks for file-scope variables with `extern' scope.
.PHONY: sc_tight_scope
sc_tight_scope: $(bin_PROGRAMS)
@t=exceptions-$$$$; \
$(AM_V_GEN)t=exceptions-$$$$; \
trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \
src=`for f in $(SOURCES); do \
test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \

View File

@@ -129,6 +129,10 @@ and column three contains lines common to both files.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
fputs (_("\
\n\
Note, comparisons honor the rules specified by `LC_COLLATE'.\n\
"), stdout);
emit_bug_reporting_address ();
}
exit (status);

View File

@@ -204,6 +204,7 @@ separated by CHAR.\n\
\n\
Important: FILE1 and FILE2 must be sorted on the join fields.\n\
E.g., use `sort -k 1b,1' if `join' has no options.\n\
Note, comparisons honor the rules specified by `LC_COLLATE'.\n\
If the input is not sorted and some lines cannot be joined, a\n\
warning message will be given.\n\
"), stdout);

View File

@@ -32,6 +32,7 @@
#include "quote.h"
#include "remove.h"
#include "root-dev-ino.h"
#include "priv-set.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "mv"
@@ -354,6 +355,9 @@ main (int argc, char **argv)
cp_option_init (&x);
/* Try to disable the ability to unlink a directory. */
priv_set_remove_linkdir ();
/* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
we'll actually use backup_suffix_string. */
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");

View File

@@ -55,6 +55,7 @@
#include "remove.h"
#include "root-dev-ino.h"
#include "yesno.h"
#include "priv-set.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "rm"
@@ -241,6 +242,9 @@ main (int argc, char **argv)
rm_option_init (&x);
/* Try to disable the ability to unlink a directory. */
priv_set_remove_linkdir ();
while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1)
{
switch (c)

View File

@@ -135,8 +135,10 @@ Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\
"),
program_name);
fputs (_("\
Discard all but one of successive identical lines from INPUT (or\n\
standard input), writing to OUTPUT (or standard output).\n\
Filter adjacent matching lines from INPUT (or standard input),\n\
writing to OUTPUT (or standard output).\n\
\n\
With no options, matching lines are merged to the first occurrence.\n\
\n\
"), stdout);
fputs (_("\
@@ -170,6 +172,7 @@ characters. Fields are skipped before chars.\n\
\n\
Note: 'uniq' does not detect repeated lines unless they are adjacent.\n\
You may want to sort the input first, or use `sort -u' without `uniq'.\n\
Also, comparisons honor the rules specified by `LC_COLLATE'.\n\
"), stdout);
emit_bug_reporting_address ();
}

View File

@@ -133,6 +133,7 @@ TESTS = \
tail-2/tail-n0f \
misc/ls-misc \
misc/date \
misc/date-next-dow \
misc/ptx-overrun \
misc/xstrtol \
misc/od \

77
tests/misc/date-next-dow Executable file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/perl
# Test "date".
# Copyright (C) 2005-2009 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use POSIX qw(strftime);
(my $ME = $0) =~ s|.*/||;
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# Export TZ=UTC0 so that zone-dependent strings match.
$ENV{TZ} = 'UTC0';
my $now = time;
my @d = localtime ($now);
my @d_week = localtime ($now + 7 * 24 * 3600);
my $wday = $d[6];
my $wday_str = qw(sun mon tue wed thu fri sat)[$wday];
my @Tests =
(
# test-name, [option, option, ...] {OUT=>"expected-output"}
#
# Running "date -d mon +%a" on a Monday must print Mon.
['dow', "-d $wday_str +%a", {OUT => ucfirst $wday_str}],
# It had better be the same date, too.
['dow2', "-d $wday_str +%F", {OUT => strftime("%F", @d)}],
['next-dow', "-d 'next $wday_str' +%F", {OUT => strftime("%F", @d_week)}],
);
# Append "\n" to each OUT=> RHS if the expected exit value is either
# zero or not specified (defaults to zero).
foreach my $t (@Tests)
{
my $exit_val;
foreach my $e (@$t)
{
ref $e && ref $e eq 'HASH' && defined $e->{EXIT}
and $exit_val = $e->{EXIT};
}
foreach my $e (@$t)
{
ref $e && ref $e eq 'HASH' && defined $e->{OUT} && ! $exit_val
and $e->{OUT} .= "\n";
}
}
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};
my $prog = 'date';
my $fail = run_tests ($ME, $prog, \@Tests, $save_temps, $verbose);
# Skip the test if the starting and stopping day numbers differ.
my @d_post = localtime (time);
$d_post[7] == $d[7]
or (warn "$ME: test straddled a day boundary; skipped"), exit 77;
exit $fail;

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Demonstrate rm's new --one-file-system option.
# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# Copyright (C) 2006-2009 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,11 @@ fi
require_root_
# If used, these must *follow* test-lib.sh.
cleanup_() { rm -rf "$other_partition_tmpdir"; }
cleanup_()
{
umount "$other_partition_tmpdir"
rm -rf "$other_partition_tmpdir"
}
. "$abs_srcdir/other-fs-tmpdir"
t=$other_partition_tmpdir
@@ -41,7 +45,6 @@ fail=0
rm --one-file-system -rf a 2> out && fail=1
test -d $t/y || fail=1
umount $t
compare out exp || fail=1