mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e54ea0480 | ||
|
|
5aa7858385 | ||
|
|
a6c9dd74d8 | ||
|
|
8d00fb26f1 | ||
|
|
1d02be3b9d | ||
|
|
3a9072079c | ||
|
|
975a38a267 | ||
|
|
6249eb0596 | ||
|
|
181615b22a | ||
|
|
59e8a5e2b2 | ||
|
|
40d50b821f |
@@ -1 +1 @@
|
||||
7.2
|
||||
7.3
|
||||
|
||||
26
NEWS
26
NEWS
@@ -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
|
||||
|
||||
@@ -160,6 +160,7 @@ gnulib_modules="
|
||||
posix-shell
|
||||
posixtm
|
||||
posixver
|
||||
priv-set
|
||||
progname
|
||||
propername
|
||||
putenv
|
||||
|
||||
2
cfg.mk
2
cfg.mk
@@ -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
|
||||
|
||||
@@ -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
2
gnulib
Submodule gnulib updated: 278d609ead...c90c5cc82c
@@ -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`; \
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
4
src/mv.c
4
src/mv.c
@@ -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");
|
||||
|
||||
4
src/rm.c
4
src/rm.c
@@ -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)
|
||||
|
||||
@@ -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 ();
|
||||
}
|
||||
|
||||
@@ -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
77
tests/misc/date-next-dow
Executable 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;
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user