Compare commits

...

18 Commits
rawhide ... f8

Author SHA1 Message Date
Fedora Release Engineering 7c7ce86789 dist-git conversion 2010-07-28 12:10:37 +00:00
Bill Nottingham edd5820169 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:33:10 +00:00
Ondrej Vasik b565c50668 fix several date issues, clarify ls exit statuses documentation (#446294),
added libattr requires(#465569) , preserving envvars DISPLAY and
    XAUTHORITY mentioned in documentation of su -l
2008-10-13 09:45:53 +00:00
Ondrej Vasik c85904b4ea forgot to add one patch 2008-08-07 13:46:01 +00:00
Ondrej Vasik 1f86fb305f forgotten release increase :( 2008-08-07 13:44:06 +00:00
Ondrej Vasik 6ce4e35edc various backports of bugfixes from F-9 2008-08-07 13:43:28 +00:00
Ondrej Vasik 7eda01a4d5 fixed harmless warning in atomic2 test 2008-03-25 18:17:34 +00:00
Ondrej Vasik f9529177d3 mv: never unlink a destination file before calling rename 2008-03-25 17:54:57 +00:00
Ondrej Vasik fd6777b973 fixed harmless double close stdout in dd, other way to keep user defined
LS_COLORS
2008-03-11 17:17:18 +00:00
Ondrej Vasik 856fdbe2ce rebuild because of missing 6.9-14.fc8 ppc64 rpm 2008-03-06 12:46:01 +00:00
Ondrej Vasik d55c5bada1 fixed missing doublequotes in colorls.csh, a bit documented su-l/runuser-l
pam files usage
2008-03-04 12:54:13 +00:00
Ondrej Vasik 7a8df7fa92 added several colored terms,file extension types, some optimalization, fix
of long options in certain commands, do not drop user-modified shell
    scripts - see changelog for related bugzillas
2008-02-19 12:34:54 +00:00
Ondrej Vasik 86cf409527 fix displaying of security context in stat(#411181) 2007-12-05 13:09:32 +00:00
Ondrej Vasik 47bd68fa87 completed fix of wrong colored broken symlinks in ls(#404511) 2007-11-29 15:47:11 +00:00
Ondrej Vasik 708af6701c various fixes from rawhide-details in changelog 2007-11-23 11:10:20 +00:00
Ondrej Vasik b6b8949027 fix for runuser (#232652), for sort -R(#249315), for cp -a rewrite on
NFS(#219900), License tag to GPLv2+
2007-10-30 16:47:35 +00:00
Ondrej Vasik 6f3358dce1 upstream patch - fixing cp -iu options(#248591) 2007-10-25 10:01:20 +00:00
Jesse Keating 6dce19cc9b Initialize branch F-8 for coreutils 2007-10-20 05:04:36 +00:00
29 changed files with 2313 additions and 84 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: coreutils
# $Id$
NAME := coreutils
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,83 @@
From 50654566c77d1335870206f657507a2d1c23f628 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik <at> redhat.com>
Date: Thu, 9 Oct 2008 10:56:54 +0200
Subject: [PATCH] doc: ls: clarify exit status description
* src/ls.c (exit_status): Clarify comments.
(usage): Clarify exit status description in --help output.
* doc/coreutils.texi (ls invocation): Clarify exit status documentation
Reported by Greg Metcalfe in <http://bugzilla.redhat.com/446294>.
---
THANKS | 1 +
doc/coreutils.texi | 7 +++++--
src/ls.c | 16 ++++++++++++----
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/THANKS b/THANKS
index e6e48b3..d06f755 100644
--- a/THANKS
+++ b/THANKS
@@ -201,6 +201,7 @@ Guochun Shi gshi@ncsa.uiuc.edu
GOTO Masanori gotom@debian.or.jp
Greg Louis glouis@dynamicro.on.ca
Greg McGary gkm@gnu.org
+Greg Metcalfe metcalfegreg@qwest.net
Greg Schafer gschafer@zip.com.au
Greg Troxel gdt@bbn.com
Greg Wooledge gawooledge@sherwin.com
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index a0d2202..b7e044d 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -6073,8 +6073,11 @@ ls invocation
@display
0 success
-1 minor problems (e.g., a subdirectory was not found)
-2 serious trouble (e.g., memory exhausted)
+1 minor problems (e.g., failure to access a file or directory not
+ specified as a command line argument. This happens when listing a
+ directory in which entries are actively being removed or renamed.)
+2 serious trouble (e.g., memory exhausted, invalid option or failure
+ to access file or directory specified as a command line argument)
@end display
Also see @ref{Common options}.
diff --git a/src/ls.c b/src/ls.c
index e107162..108d669 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -715,11 +715,14 @@ static int exit_status;
/* Exit statuses. */
enum
{
- /* "ls" had a minor problem (e.g., it could not stat a directory
- entry). */
+ /* "ls" had a minor problem. E.g., while processing a directory,
+ ls obtained the name of an entry via readdir, yet was later
+ unable to stat that name. This happens when listing a directory
+ in which entries are actively being removed or renamed. */
LS_MINOR_PROBLEM = 1,
- /* "ls" had more serious trouble. */
+ /* "ls" had more serious trouble (e.g., memory exhausted, invalid
+ option or failure to stat a command line argument. */
LS_FAILURE = 2
};
@@ -4527,7 +4530,12 @@ colors, and can be set easily by the dircolors command.\n\
"), stdout);
fputs (_("\
\n\
-Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.\n\
+Exit status:\n\
+0 if OK,\n\
+1 if minor problems (e.g., failure to access a file or directory not\n\
+ specified as a command line argument\n\
+2 if serious trouble (e.g., memory exhausted, invalid option or failure\n\
+ to access a file or directory specified as a command line argument).\n\
"), stdout);
emit_bug_reporting_address ();
}
--
1.6.0.2.514.g23abd3

View File

@ -330,7 +330,7 @@
+to set user ID, the command will fail.
+.TP
+-, \fB\-l\fR, \fB\-\-login\fR
+make the shell a login shell
+make the shell a login shell, uses runuser-l PAM file instead of default one.
+.TP
+\fB\-c\fR, \fB\-\-commmand\fR=\fICOMMAND\fR
+pass a single COMMAND to the shell with \fB\-c\fR

View File

@ -0,0 +1,381 @@
diff -urNp coreutils-6.12-orig/lib/getdate.y coreutils-6.12/lib/getdate.y
--- coreutils-6.12-orig/lib/getdate.y 2008-01-31 19:37:19.000000000 +0100
+++ coreutils-6.12/lib/getdate.y 2008-10-08 15:49:35.000000000 +0200
@@ -1,8 +1,8 @@
%{
/* Parse a string into an internal time stamp.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
- Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 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
@@ -60,7 +60,7 @@
# undef static
#endif
-#include <ctype.h>
+#include <c-ctype.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -205,7 +205,7 @@ typedef struct
union YYSTYPE;
static int yylex (union YYSTYPE *, parser_control *);
static int yyerror (parser_control const *, char const *);
-static long int time_zone_hhmm (textint, long int);
+static long int time_zone_hhmm (parser_control *, textint, long int);
/* Extract into *PC any date and time info from a string of digits
of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY,
@@ -246,6 +246,31 @@ digits_to_date_time (parser_control *pc,
}
}
+/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1). */
+static void
+apply_relative_time (parser_control *pc, relative_time rel, int factor)
+{
+ pc->rel.ns += factor * rel.ns;
+ pc->rel.seconds += factor * rel.seconds;
+ pc->rel.minutes += factor * rel.minutes;
+ pc->rel.hour += factor * rel.hour;
+ pc->rel.day += factor * rel.day;
+ pc->rel.month += factor * rel.month;
+ pc->rel.year += factor * rel.year;
+ pc->rels_seen = true;
+}
+
+/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */
+static void
+set_hhmmss (parser_control *pc, long int hour, long int minutes,
+ time_t sec, long int nsec)
+{
+ pc->hour = hour;
+ pc->minutes = minutes;
+ pc->seconds.tv_sec = sec;
+ pc->seconds.tv_nsec = nsec;
+}
+
%}
/* We want a reentrant parser, even if the TZ manipulation and the calls to
@@ -268,7 +293,7 @@ digits_to_date_time (parser_control *pc,
%token tAGO tDST
%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT
-%token <intval> tDAY_UNIT
+%token <intval> tDAY_UNIT tDAY_SHIFT
%token <intval> tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN
%token <intval> tMONTH tORDINAL tZONE
@@ -279,7 +304,7 @@ digits_to_date_time (parser_control *pc,
%type <intval> o_colon_minutes o_merid
%type <timespec> seconds signed_seconds unsigned_seconds
-%type <rel> relunit relunit_snumber
+%type <rel> relunit relunit_snumber dayshift
%%
@@ -313,7 +338,6 @@ item:
| day
{ pc->days_seen++; }
| rel
- { pc->rels_seen = true; }
| number
| hybrid
;
@@ -321,45 +345,32 @@ item:
time:
tUNUMBER tMERIDIAN
{
- pc->hour = $1.value;
- pc->minutes = 0;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
+ set_hhmmss (pc, $1.value, 0, 0, 0);
pc->meridian = $2;
}
| tUNUMBER ':' tUNUMBER o_merid
{
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
+ set_hhmmss (pc, $1.value, $3.value, 0, 0);
pc->meridian = $4;
}
| tUNUMBER ':' tUNUMBER tSNUMBER o_colon_minutes
{
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
+ set_hhmmss (pc, $1.value, $3.value, 0, 0);
pc->meridian = MER24;
pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ($4, $5);
+ pc->time_zone = time_zone_hhmm (pc, $4, $5);
}
| tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_merid
{
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds = $5;
+ set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec);
pc->meridian = $6;
}
| tUNUMBER ':' tUNUMBER ':' unsigned_seconds tSNUMBER o_colon_minutes
{
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds = $5;
+ set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec);
pc->meridian = MER24;
pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ($6, $7);
+ pc->time_zone = time_zone_hhmm (pc, $6, $7);
}
;
@@ -381,16 +392,9 @@ zone:
{ pc->time_zone = $1; }
| tZONE relunit_snumber
{ pc->time_zone = $1;
- pc->rel.ns += $2.ns;
- pc->rel.seconds += $2.seconds;
- pc->rel.minutes += $2.minutes;
- pc->rel.hour += $2.hour;
- pc->rel.day += $2.day;
- pc->rel.month += $2.month;
- pc->rel.year += $2.year;
- pc->rels_seen = true; }
+ apply_relative_time (pc, $2, 1); }
| tZONE tSNUMBER o_colon_minutes
- { pc->time_zone = $1 + time_zone_hhmm ($2, $3); }
+ { pc->time_zone = $1 + time_zone_hhmm (pc, $2, $3); }
| tDAYZONE
{ pc->time_zone = $1 + 60; }
| tZONE tDST
@@ -495,25 +499,11 @@ date:
rel:
relunit tAGO
- {
- pc->rel.ns -= $1.ns;
- pc->rel.seconds -= $1.seconds;
- pc->rel.minutes -= $1.minutes;
- pc->rel.hour -= $1.hour;
- pc->rel.day -= $1.day;
- pc->rel.month -= $1.month;
- pc->rel.year -= $1.year;
- }
+ { apply_relative_time (pc, $1, -1); }
| relunit
- {
- pc->rel.ns += $1.ns;
- pc->rel.seconds += $1.seconds;
- pc->rel.minutes += $1.minutes;
- pc->rel.hour += $1.hour;
- pc->rel.day += $1.day;
- pc->rel.month += $1.month;
- pc->rel.year += $1.year;
- }
+ { apply_relative_time (pc, $1, 1); }
+ | dayshift
+ { apply_relative_time (pc, $1, 1); }
;
relunit:
@@ -575,6 +565,11 @@ relunit_snumber:
{ $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
;
+dayshift:
+ tDAY_SHIFT
+ { $$ = RELATIVE_TIME_0; $$.day = $1; }
+ ;
+
seconds: signed_seconds | unsigned_seconds;
signed_seconds:
@@ -600,14 +595,7 @@ hybrid:
/* Hybrid all-digit and relative offset, so that we accept e.g.,
"YYYYMMDD +N days" as well as "YYYYMMDD N days". */
digits_to_date_time (pc, $1);
- pc->rel.ns += $2.ns;
- pc->rel.seconds += $2.seconds;
- pc->rel.minutes += $2.minutes;
- pc->rel.hour += $2.hour;
- pc->rel.day += $2.day;
- pc->rel.month += $2.month;
- pc->rel.year += $2.year;
- pc->rels_seen = true;
+ apply_relative_time (pc, $2, 1);
}
;
@@ -688,10 +676,10 @@ static table const time_units_table[] =
/* Assorted relative-time words. */
static table const relative_time_table[] =
{
- { "TOMORROW", tDAY_UNIT, 1 },
- { "YESTERDAY",tDAY_UNIT, -1 },
- { "TODAY", tDAY_UNIT, 0 },
- { "NOW", tDAY_UNIT, 0 },
+ { "TOMORROW", tDAY_SHIFT, 1 },
+ { "YESTERDAY",tDAY_SHIFT, -1 },
+ { "TODAY", tDAY_SHIFT, 0 },
+ { "NOW", tDAY_SHIFT, 0 },
{ "LAST", tORDINAL, -1 },
{ "THIS", tORDINAL, 0 },
{ "NEXT", tORDINAL, 1 },
@@ -814,15 +802,33 @@ static table const military_table[] =
/* Convert a time zone expressed as HH:MM into an integer count of
minutes. If MM is negative, then S is of the form HHMM and needs
- to be picked apart; otherwise, S is of the form HH. */
+ to be picked apart; otherwise, S is of the form HH. As specified in
+ http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow
+ only valid TZ range, and consider first two digits as hours, if no
+ minutes specified. */
static long int
-time_zone_hhmm (textint s, long int mm)
+time_zone_hhmm (parser_control *pc, textint s, long int mm)
{
+ long int n_minutes;
+
+ /* If the length of S is 1 or 2 and no minutes are specified,
+ interpret it as a number of hours. */
+ if (s.digits <= 2 && mm < 0)
+ s.value *= 100;
+
if (mm < 0)
- return (s.value / 100) * 60 + s.value % 100;
+ n_minutes = (s.value / 100) * 60 + s.value % 100;
else
- return s.value * 60 + (s.negative ? -mm : mm);
+ n_minutes = s.value * 60 + (s.negative ? -mm : mm);
+
+ /* If the absolute number of minutes is larger than 24 hours,
+ arrange to reject it by incrementing pc->zones_seen. Thus,
+ we allow only values in the range UTC-24:00 to UTC+24:00. */
+ if (24 * 60 < abs (n_minutes))
+ pc->zones_seen++;
+
+ return n_minutes;
}
static int
@@ -919,7 +925,7 @@ lookup_word (parser_control const *pc, c
for (p = word; *p; p++)
{
unsigned char ch = *p;
- *p = toupper (ch);
+ *p = c_toupper (ch);
}
for (tp = meridian_table; tp->name; tp++)
@@ -984,7 +990,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
for (;;)
{
- while (c = *pc->input, isspace (c))
+ while (c = *pc->input, c_isspace (c))
pc->input++;
if (ISDIGIT (c) || c == '-' || c == '+')
@@ -995,7 +1001,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
if (c == '-' || c == '+')
{
sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, isspace (c))
+ while (c = *++pc->input, c_isspace (c))
continue;
if (! ISDIGIT (c))
/* skip the '-' sign */
@@ -1099,7 +1105,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
}
}
- if (isalpha (c))
+ if (c_isalpha (c))
{
char buff[20];
char *p = buff;
@@ -1111,7 +1117,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
*p++ = c;
c = *++pc->input;
}
- while (isalpha (c) || c == '.');
+ while (c_isalpha (c) || c == '.');
*p = '\0';
tp = lookup_word (pc, buff);
@@ -1224,7 +1230,7 @@ get_date (struct timespec *result, char
if (! tmp)
return false;
- while (c = *p, isspace (c))
+ while (c = *p, c_isspace (c))
p++;
if (strncmp (p, "TZ=\"", 4) == 0)
@@ -1436,25 +1442,6 @@ get_date (struct timespec *result, char
goto fail;
}
- if (pc.zones_seen)
- {
- long int delta = pc.time_zone * 60;
- time_t t1;
-#ifdef HAVE_TM_GMTOFF
- delta -= tm.tm_gmtoff;
-#else
- time_t t = Start;
- struct tm const *gmt = gmtime (&t);
- if (! gmt)
- goto fail;
- delta -= tm_diff (&tm, gmt);
-#endif
- t1 = Start - delta;
- if ((Start < t1) != (delta < 0))
- goto fail; /* time_t overflow */
- Start = t1;
- }
-
/* Add relative date. */
if (pc.rel.year | pc.rel.month | pc.rel.day)
{
@@ -1477,6 +1464,27 @@ get_date (struct timespec *result, char
goto fail;
}
+ /* The only "output" of this if-block is an updated Start value,
+ so this block must follow others that clobber Start. */
+ if (pc.zones_seen)
+ {
+ long int delta = pc.time_zone * 60;
+ time_t t1;
+#ifdef HAVE_TM_GMTOFF
+ delta -= tm.tm_gmtoff;
+#else
+ time_t t = Start;
+ struct tm const *gmt = gmtime (&t);
+ if (! gmt)
+ goto fail;
+ delta -= tm_diff (&tm, gmt);
+#endif
+ t1 = Start - delta;
+ if ((Start < t1) != (delta < 0))
+ goto fail; /* time_t overflow */
+ Start = t1;
+ }
+
/* Add relative hours, minutes, and seconds. On hosts that support
leap seconds, ignore the possibility of leap seconds; e.g.,
"+ 10 minutes" adds 600 seconds, even if one of them is a

110
coreutils-6.9-cp-i-u.patch Normal file
View File

@ -0,0 +1,110 @@
When "cp -i --update old new" would do nothing because "new" is
newer than "old", cp would nonetheless prompt for whether it is
ok to overwrite "new". Then, regardless of the response (because
of the --update option), cp would do nothing.
The following patch eliminates the unnecessary prompt in that case.
diff --git a/src/copy.c b/src/copy.c
index b7bf73b..0e549d2 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name,
return false;
}
+ if (!S_ISDIR (src_mode) && x->update)
+ {
+ /* When preserving time stamps (but not moving within a file
+ system), don't worry if the destination time stamp is
+ less than the source merely because of time stamp
+ truncation. */
+ int options = ((x->preserve_timestamps
+ && ! (x->move_mode
+ && dst_sb.st_dev == src_sb.st_dev))
+ ? UTIMECMP_TRUNCATE_SOURCE
+ : 0);
+
+ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
+ {
+ /* We're using --update and the destination is not older
+ than the source, so do not copy or move. Pretend the
+ rename succeeded, so the caller (if it's mv) doesn't
+ end up removing the source file. */
+ if (rename_succeeded)
+ *rename_succeeded = true;
+ return true;
+ }
+ }
+
/* When there is an existing destination file, we may end up
returning early, and hence not copying/moving the file.
This may be due to an interactive `negative' reply to the
@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name,
return false;
}
}
-
- if (x->update)
- {
- /* When preserving time stamps (but not moving within a file
- system), don't worry if the destination time stamp is
- less than the source merely because of time stamp
- truncation. */
- int options = ((x->preserve_timestamps
- && ! (x->move_mode
- && dst_sb.st_dev == src_sb.st_dev))
- ? UTIMECMP_TRUNCATE_SOURCE
- : 0);
-
- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
- {
- /* We're using --update and the destination is not older
- than the source, so do not copy or move. Pretend the
- rename succeeded, so the caller (if it's mv) doesn't
- end up removing the source file. */
- if (rename_succeeded)
- *rename_succeeded = true;
- return true;
- }
- }
}
if (x->move_mode)
diff --git a/tests/mv/update b/tests/mv/update
index 0c06024..6c3d149 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure --update works as advertised
-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2007 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
@@ -46,11 +46,16 @@ fi
fail=0
-for cp_or_mv in cp mv; do
- # This is a no-op.
- $cp_or_mv --update old new || fail=1
- case "`cat new`" in new) ;; *) fail=1 ;; esac
- case "`cat old`" in old) ;; *) fail=1 ;; esac
+for interactive in '' -i; do
+ for cp_or_mv in cp mv; do
+ # This is a no-op, with no prompt.
+ # With coreutils-6.9 and earlier, using --update with -i would
+ # mistakenly elicit a prompt.
+ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1
+ test -s out && fail=1
+ case "`cat new`" in new) ;; *) fail=1 ;; esac
+ case "`cat old`" in old) ;; *) fail=1 ;; esac
+ done
done
# This will actually perform the rename.
--
1.5.3.rc1.16.g9d6f

View File

@ -0,0 +1,181 @@
From 9f8be4b0b83d1e0cbf1326f8cb7e077d026d9b0b Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 23 Jul 2008 11:29:21 +0200
Subject: [PATCH] dd: iflag=fullblock now read full blocks if possible
* src/dd.c (iread_fullblock): New function for reading full blocks.
(scanargs): Check for new parameter iflag=fullblock.
(skip): Use iread_fnc pointer instead of iread function.
(dd_copy): Use iread_fnc pointer instead of iread function.
* tests/dd/misc: Add test for dd - read full blocks.
* doc/coretuils.texi: Mention new parameter iflag=fullblock.
* NEWS: Mentioned the change.
---
NEWS | 4 ++++
doc/coreutils.texi | 6 ++++++
src/dd.c | 39 +++++++++++++++++++++++++++++++++++++--
tests/dd/misc | 9 +++++++++
4 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 81e3b91..b95f8dc 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7719,6 +7719,12 @@ platforms that distinguish binary from text I/O.
Use text I/O. Like @samp{binary}, this option has no effect on
standard platforms.
+@item fullblock
+@opindex fullblock
+Read full blocks from input if possible. read() may return early
+if a full block is not available, so retry until data is available
+or end of file is reached. This flag can be used only for the iflag option.
+
@end table
These flags are not supported on all systems, and @samp{dd} rejects
diff --git a/src/dd.c b/src/dd.c
index ead9574..1b620df 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -225,6 +225,9 @@ static sig_atomic_t volatile interrupt_signal;
/* A count of the number of pending info signals that have been received. */
static sig_atomic_t volatile info_signal_count;
+/* Function used for read (to handle iflag=fullblock parameter) */
+static ssize_t (*iread_fnc) (int fd, char *buf, size_t size);
+
/* A longest symbol in the struct symbol_values tables below. */
#define LONGEST_SYMBOL "fdatasync"
@@ -257,6 +260,7 @@ static struct symbol_value const conversions[] =
};
/* Flags, for iflag="..." and oflag="...". */
+#define O_FULLBLOCK 010000000 /* Read only full blocks from input */
static struct symbol_value const flags[] =
{
{"append", O_APPEND},
@@ -271,6 +275,7 @@ static struct symbol_value const flags[] =
{"nonblock", O_NONBLOCK},
{"sync", O_SYNC},
{"text", O_TEXT},
+ {"fullblock", O_FULLBLOCK}, /* Read only full blocks from input */
{"", 0}
};
@@ -762,6 +767,27 @@ iread (int fd, char *buf, size_t size)
}
}
+/* Wrapper around iread function which reads full blocks if possible */
+static ssize_t
+iread_fullblock (int fd, char *buf, size_t size)
+{
+ ssize_t nread = 0;
+
+ while (0 < size)
+ {
+ ssize_t ncurr = iread(fd, buf, size);
+ if (ncurr < 0)
+ return ncurr;
+ if (ncurr == 0)
+ break;
+ nread += ncurr;
+ buf += ncurr;
+ size -= ncurr;
+ }
+
+ return nread;
+}
+
/* Write to FD the buffer BUF of size SIZE, processing any signals
that arrive. Return the number of bytes written, setting errno if
this is less than SIZE. Keep trying if there are partial
@@ -1000,6 +1026,15 @@ scanargs (int argc, char *const *argv)
if (input_flags & (O_DSYNC | O_SYNC))
input_flags |= O_RSYNC;
+ if (output_flags & O_FULLBLOCK)
+ {
+ error (0, 0, "%s: %s", _("invalid output flag"), "'fullblock'");
+ usage (EXIT_FAILURE);
+ }
+ iread_fnc = (input_flags & O_FULLBLOCK)?
+ iread_fullblock:
+ iread;
+
if (multiple_bits_set (conversions_mask & (C_ASCII | C_EBCDIC | C_IBM)))
error (EXIT_FAILURE, 0, _("cannot combine any two of {ascii,ebcdic,ibm}"));
if (multiple_bits_set (conversions_mask & (C_BLOCK | C_UNBLOCK)))
@@ -1197,7 +1232,7 @@ skip (int fdesc, char const *file, uintmax_t records, size_t blocksize,
do
{
- ssize_t nread = iread (fdesc, buf, blocksize);
+ ssize_t nread = iread_fnc (fdesc, buf, blocksize);
if (nread < 0)
{
if (fdesc == STDIN_FILENO)
@@ -1508,7 +1543,7 @@ dd_copy (void)
(conversions_mask & (C_BLOCK | C_UNBLOCK)) ? ' ' : '\0',
input_blocksize);
- nread = iread (STDIN_FILENO, ibuf, input_blocksize);
+ nread = iread_fnc (STDIN_FILENO, ibuf, input_blocksize);
if (nread == 0)
break; /* EOF. */
diff --git a/tests/dd/misc b/tests/dd/misc
index d54fbfa..24e5eba 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -88,6 +88,15 @@ fi
outbytes=`echo x | dd bs=3 ibs=10 obs=10 conv=sync 2>/dev/null | wc -c`
test "$outbytes" -eq 3 || fail=1
+(echo a; sleep .1; echo b) \
+ | LC_ALL=C dd bs=4 status=noxfer iflag=fullblock > out 2> err || fail=1
+echo "a
+b" > out_ok
+echo "1+0 records in
+1+0 records out" > err_ok
+cmp out out_ok || fail=1
+cmp err err_ok || fail=1
+
test $fail -eq 0 && fail=$warn
(exit $fail); exit $fail
diff -ruN coreutils-6.12.old/doc/coreutils.info coreutils-6.12/doc/coreutils.info
--- coreutils-6.12.old/doc/coreutils.info 2008-07-24 12:49:57.000000000 +0200
+++ coreutils-6.12/doc/coreutils.info 2008-07-24 12:52:17.000000000 +0200
@@ -6112,6 +6112,12 @@
Use text I/O. Like `binary', this option has no effect on
standard platforms.
+ 'fullblock'
+ Read full blocks from input if possible. read() may return
+ early if a full block is not available, so retry until data
+ is available or end of file is reached. This flag can be used
+ only for the iflag option.
+
These flags are not supported on all systems, and `dd' rejects
attempts to use them when they are not supported. When reading
diff -ruN coreutils-6.12.old/man/dd.1 coreutils-6.12/man/dd.1
--- coreutils-6.12.old/man/dd.1 2008-07-24 12:51:06.000000000 +0200
+++ coreutils-6.12/man/dd.1 2008-07-24 12:59:06.000000000 +0200
@@ -111,6 +111,13 @@
.TP
direct
use direct I/O for data
+.PP
+FLAG symbols only for iflag option:
+.TP
+fullblock
+Read full blocks from input if possible. read() may return early
+if a full block is not available, so retry until data is available
+or end of file is reached.
.IP
directory fail unless a directory
dsync use synchronized I/O for data

View File

@ -0,0 +1,98 @@
Fixes some small bugs (merged upstream patches)
Fixed RedHat Bugzillas: 250089(fix by jplans@redhat.com), 239266
diff -Naurp coreutils-5.2.1/lib/fts.c coreutils-5.2.1.new/lib/fts.c
--- coreutils-5.2.1/lib/fts.c 2003-12-20 10:05:23.000000000 -0800
+++ coreutils-5.2.1.new/lib/fts.c 2007-06-14 11:38:00.696001000 -0700
@@ -685,7 +685,7 @@ fts_read(sp)
/* If fts_build's call to fts_safe_changedir failed
because it was not able to fchdir into a
subdirectory, tell the caller. */
- if (p->fts_errno)
+ if (p->fts_errno && p->fts_info != FTS_DNR)
p->fts_info = FTS_ERR;
LEAVE_DIR (sp, p, "2");
return (p);
}
diff -ur coreutils-6.9-orig/src/du.c coreutils-6.9/src/du.c
--- coreutils-6.9-orig/src/du.c
+++ coreutils-6.9/src/du.c
duinfo_add (&dulvl[level].ent, &dui);
/* Even if this directory is unreadable or we can't chdir into it,
- do let its size contribute to the total, ... */
+ do let its size contribute to the total. */
duinfo_add (&tot_dui, &dui);
- /* ... but don't print out a total for it, since without the size(s)
- of any potential entries, it could be very misleading. */
- if (ent->fts_info == FTS_DNR)
- return ok;
-
/* If we're not counting an entry, e.g., because it's a hard link
to a file we've already counted (and --count-links), then don't
print a line for it. */
diff -urNp coreutils-6.9-orig/src/dircolors.hin coreutils-6.9/src/dircolors.hin
--- coreutils-6.9-orig/src/dircolors.hin 2007-03-18 22:36:43.000000000 +0100
+++ coreutils-6.9/src/dircolors.hin 2007-11-02 12:27:03.000000000 +0100
@@ -27,6 +27,7 @@ TERM cons25
TERM console
TERM cygwin
TERM dtterm
+TERM eterm-color
TERM gnome
TERM konsole
TERM kterm
@@ -40,6 +40,7 @@ TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM screen
+TERM screen-256color
TERM screen-bce
TERM screen-w
TERM screen.linux
@@ -46,7 +47,9 @@ TERM screen-w
TERM screen.linux
TERM vt100
TERM xterm
+TERM xterm-16color
TERM xterm-256color
+TERM xterm-88color
TERM xterm-color
TERM xterm-debian
diff -ur a/src/ls.c b/src/ls.c
--- a/src/ls.c
+++ b/src/ls.c
@@ -1168,7 +1168,7 @@ main (int argc, char **argv)
{
/* Avoid following symbolic links when possible. */
if (is_colored (C_ORPHAN)
- || is_colored (C_EXEC)
+ || (is_colored (C_EXEC) && color_symlink_as_referent)
|| (is_colored (C_MISSING) && format == long_format))
check_symlink_color = true;
@@ -2570,7 +2574,8 @@ gobble_file (char const *name, enum file
|| ((print_inode || format_needs_type)
&& (type == symbolic_link || type == unknown)
&& (dereference == DEREF_ALWAYS
- || (command_line_arg && dereference != DEREF_NEVER)))
+ || (command_line_arg && dereference != DEREF_NEVER)
+ || color_symlink_as_referent || check_symlink_color))
/* Command line dereferences are already taken care of by the above
assertion that the inode number is not yet known. */
|| (print_inode && inode == NOT_AN_INODE_NUMBER)
@@ -2713,6 +2713,12 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
free (linkname);
}
+ /* When not distinguishing types of symlinks, pretend we know that
+ it is stat'able, so that it will be colored as a regular symlink,
+ and not as an orphan. */
+ if (S_ISLNK (f->stat.st_mode) && !check_symlink_color)
+ f->linkok = true;
+
if (S_ISLNK (f->stat.st_mode))
f->filetype = symbolic_link;
else if (S_ISDIR (f->stat.st_mode))

View File

@ -0,0 +1,91 @@
diff -urNp coreutils-6.9-orig/src/paste.c coreutils-6.9/src/paste.c
--- coreutils-6.9-orig/src/paste.c
+++ coreutils-6.9/src/paste.c
@@ -42,6 +42,7 @@
#include <sys/types.h>
#include "system.h"
#include "error.h"
+#include "quotearg.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "paste"
@@ -79,12 +80,17 @@ static struct option const longopts[] =
/* Set globals delims and delim_end. Copy STRPTR to DELIMS, converting
backslash representations of special characters in STRPTR to their actual
values. The set of possible backslash characters has been expanded beyond
- that recognized by the Unix version. */
+ that recognized by the Unix version.
+ Return 0 upon success.
+ If the string ends in an odd number of backslashes, ignore the
+ final backslash and return nonzero. */
-static void
+static int
collapse_escapes (char const *strptr)
{
char *strout = xstrdup (strptr);
+ bool backslash_at_end = false;
+
delims = strout;
while (*strptr)
@@ -123,6 +129,15 @@ collapse_escapes (char const *strptr)
*strout++ = '\v';
break;
+ case '\\':
+ *strout++ = '\\';
+ break;
+
+ case '\0':
+ backslash_at_end = true;
+ goto done;
+
+
default:
*strout++ = *strptr;
break;
@@ -130,7 +145,11 @@ collapse_escapes (char const *strptr)
strptr++;
}
}
+
+ done:;
+
delim_end = strout;
+ return backslash_at_end ? 1 : 0;
}
/* Report a write error and exit. */
@@ -481,7 +500,15 @@ main (int argc, char **argv)
if (optind == argc)
argv[argc++] = "-";
- collapse_escapes (delim_arg);
+ if (collapse_escapes (delim_arg))
+ {
+ /* Don't use the default quoting style, because that would double the
+ number of displayed backslashes, making the diagnostic look bogus. */
+ set_quoting_style (NULL, escape_quoting_style);
+ error (EXIT_FAILURE, 0,
+ _("delimiter list ends with an unescaped backslash: %s"),
+ quotearg_colon (delim_arg));
+ }
if (!serial_merge)
ok = paste_parallel (argc - optind, &argv[optind]);
diff -urNp coreutils-6.9-orig/src/ptx.c coreutils-6.9/src/ptx.c
--- coreutils-6.9-orig/src/ptx.c
+++ coreutils-6.9/src/ptx.c
@@ -387,6 +387,11 @@ copy_unescaped_string (const char *strin
string++;
break;
+ case '\0': /* lone backslash at end of string */
+ /* ignore it */
+ break;
+
+
default:
*cursor++ = '\\';
*cursor++ = *string++;

View File

@ -0,0 +1,13 @@
diff -urp coreutils-6.9-orig/lib/long-options.c coreutils-6.9/lib/long-options.c
--- coreutils-6.9-orig/lib/long-options.c
+++ coreutils-6.9/lib/long-options.c
@@ -57,8 +57,7 @@ parse_long_options (int argc,
/* Don't print an error message for unrecognized options. */
opterr = 0;
- if (argc == 2
- && (c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
{
switch (c)
{

View File

@ -0,0 +1,35 @@
diff -urp coreutils-6.9-orig/man/md5sum.1 coreutils-6.9/man/md5sum.1
--- coreutils-6.9-orig/man/md5sum.1
+++ coreutils-6.9/man/md5sum.1
@@ -19,6 +19,8 @@ read MD5 sums from the FILEs and check t
.TP
\fB\-t\fR, \fB\-\-text\fR
read in text mode (default)
+.br
+\fBNote:\fR There is no difference between binary and text mode option on GNU system.
.SS "The following two options are useful only when verifying checksums:"
.TP
\fB\-\-status\fR
diff -urp coreutils-6.9-orig/man/sort.1 coreutils-6.9/man/sort.1
--- coreutils-6.9-orig/man/sort.1
+++ coreutils-6.9/man/sort.1
@@ -56,7 +56,7 @@ compress temporaries with PROG;
decompress them with PROG \fB\-d\fR
.TP
\fB\-k\fR, \fB\-\-key\fR=\fIPOS1[\fR,POS2]
-start a key at POS1, end it at POS2 (origin 1)
+start a key at POS1, end it at POS2 (origin 1) - when no POS2 is specified, end of line is used
.TP
\fB\-m\fR, \fB\-\-merge\fR
merge already sorted files; do not sort
@@ -103,8 +103,8 @@ With no FILE, or when FILE is \-, read s
.PP
*** WARNING ***
The locale specified by the environment affects sort order.
-Set LC_ALL=C to get the traditional sort order that uses
-native byte values.
+Set LC_ALL=C (by "export LC_ALL=C") to get the traditional
+sort order that uses native byte values.
.SH AUTHOR
Written by Mike Haertel and Paul Eggert.
.SH "REPORTING BUGS"

View File

@ -0,0 +1,87 @@
diff -urNp coreutils-6.9-orig/src/md5sum.c coreutils-6.9/src/md5sum.c
--- coreutils-6.9-orig/src/md5sum.c 2007-11-25 14:23:31.000000000 +0100
+++ coreutils-6.9/src/md5sum.c 2008-04-15 21:04:09.000000000 +0200
@@ -205,6 +205,9 @@ bsd_split_3 (char *s, size_t s_len, unsi
{
size_t i;
+ if (s_len ==0)
+ return false;
+
*file_name = s;
/* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
diff -urNp coreutils-6.9-orig/src/md5sum.c coreutils-6.9/src/md5sum.c
--- coreutils-6.9-orig/src/md5sum.c 2008-05-13 15:09:09.000000000 +0200
+++ coreutils-6.9/src/md5sum.c 2008-05-13 15:10:59.000000000 +0200
@@ -343,16 +343,19 @@ split_3 (char *s, size_t s_len,
return true;
}
+/* Return true if S is a NUL-terminated string of DIGEST_HEX_BYTES hex digits.
+ Otherwise, return false. */
static bool
hex_digits (unsigned char const *s)
{
- while (*s)
+ unsigned int i;
+ for (i = 0; i < digest_hex_bytes; i++)
{
if (!isxdigit (*s))
return false;
++s;
}
- return true;
+ return *s == '\0';
}
/* An interface to the function, DIGEST_STREAM.
diff -urNp coreutils-6.9-orig/tests/sha1sum/basic-1 coreutils-6.9/tests/sha1sum/basic-1
--- coreutils-6.9-orig/tests/sha1sum/basic-1
+++ coreutils-6.9/tests/sha1sum/basic-1
@@ -29,7 +29,7 @@ exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
require 5.003;
use strict;
-(my $program_name = $0) =~ s|.*/||;
+my $prog = 'sha1sum';
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@@ -72,6 +72,8 @@ my @Tests =
['check-bsd3', '--check', '--status',
{IN=> {'f.sha1' => "SHA1 (f) = $sha_degenerate\n"}},
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
+ ['bsd-segv', '--check', {IN=> {'z' => "SHA1 ("}}, {EXIT=> 1},
+ {ERR=> "$prog: z: no properly formatted SHA1 checksum lines found\n"}],
);
# Insert the `--text' argument for each test.
@@ -86,7 +88,6 @@ foreach $t (@Tests)
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};
-my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
-my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
+my $fail = run_tests ($prog, $prog, \@Tests, $save_temps, $verbose);
exit $fail;
EOF
diff -urNp coreutils-6.9-orig/tests/md5sum/basic-1 coreutils-6.9/tests/md5sum/basic-1
--- coreutils-6.9-orig/tests/md5sum/basic-1
+++ coreutils-6.9/tests/md5sum/basic-1
@@ -70,6 +70,15 @@ my @Tests =
['check-bsd3', '--check', '--status',
{IN=> {'f.md5' => "MD5 (f) = $degenerate\n"}},
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
+ ['bsd-segv', '--check', {IN=> {'z' => "MD5 ("}}, {EXIT=> 1},
+ {ERR=> "md5sum: z: no properly formatted MD5 checksum lines found\n"}],
+ # Ensure that when there's a NUL byte among the checksum hex digits
+ # we detect the invalid formatting and don't even open the file.
+ # Up to coreutils-6.9, this would report:
+ # h: FAILED
+ # md5sum: WARNING: 1 of 1 computed checksum did NOT match
+ ['nul-in-cksum', '--check', {IN=> {'h'=>("\0"x32)." h\n"}}, {EXIT=> 1},
+ {ERR=> "md5sum: h: no properly formatted MD5 checksum lines found\n"}],
);
# Insert the `--text' argument for each test.

View File

@ -0,0 +1,160 @@
diff -ur coreutils-6.9-orig/src/install.c coreutils-6.9/src/install.c
--- a/src/install.c 2007-10-30 12:34:07.000000000 +0100
+++ b/src/install.c 2007-10-30 15:41:15.000000000 +0100
@@ -174,6 +174,7 @@
x->preserve_mode = false;
x->preserve_timestamps = false;
x->require_preserve = false;
+ x->require_preserve_context = false;
x->recursive = false;
x->sparse_mode = SPARSE_AUTO;
x->symbolic_link = false;
diff -ur coreutils-6.9-orig/src/mv.c coreutils-6.9/src/mv.c
--- a/src/mv.c 2007-10-30 12:34:07.000000000 +0100
+++ b/src/mv.c 2007-10-30 15:34:37.000000000 +0100
@@ -131,6 +131,7 @@
x->preserve_timestamps = true;
x->preserve_security_context = selinux_enabled;
x->require_preserve = false; /* FIXME: maybe make this an option */
+ x->require_preserve_context = false;
x->recursive = true;
x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */
x->symbolic_link = false;
diff -ur coreutils-6.9-orig/src/copy.c coreutils-6.9/src/copy.c
--- coreutils-6.9-orig/src/copy.c 2007-10-30 12:34:07.000000000 +0100
+++ coreutils-6.9/src/copy.c 2007-10-30 16:01:22.000000000 +0100
@@ -306,25 +307,33 @@
if (! *new_dst)
{
dest_desc = open (dst_name, O_WRONLY | O_TRUNC | O_BINARY);
#ifdef WITH_SELINUX
- if (dest_desc >= 0 && selinux_enabled &&
- (x->preserve_security_context || x->set_security_context))
+ if (x->preserve_security_context && 0 <= dest_desc)
{
- security_context_t con;
- if(getfscreatecon(&con) == -1)
+ security_context_t con = NULL;
+ if(getfscreatecon(&con) < 0)
{
- return_val = false;
- goto close_src_desc;
+ if (x->require_preserve_context)
+ {
+ error(0, errno, _("failed to get file system create context"));
+ return_val = false;
+ goto close_src_desc;
+ }
}
if (con)
{
- if(fsetfilecon(dest_desc, con) == -1)
+ if(fsetfilecon(dest_desc, con) < 0)
{
- return_val = false;
- freecon(con);
- goto close_src_desc;
+ if (x->require_preserve_context)
+ {
+ error(0, errno, _("failed to set security context of %s to %s"),
+ quote_n (0, dst_name), quote_n(1, con));
+ return_val = false;
+ freecon(con);
+ goto close_src_desc;
+ }
}
freecon(con);
}
@@ -1577,10 +1587,10 @@
{
if (setfscreatecon(con) < 0)
{
- error (0, errno, _("cannot set setfscreatecon %s"), quote (con));
- if (x->require_preserve) {
- freecon(con);
- return 1;
+ error (0, errno, _("cannot set default file creation context to %s"), quote (con));
+ if (x->require_preserve_context) {
+ freecon(con);
+ return false;
}
}
freecon(con);
@@ -1588,7 +1598,8 @@
else {
if (( errno != ENOTSUP ) && ( errno != ENODATA )) {
error (0, errno, _("cannot lgetfilecon %s"), quote (src_name));
- return 1;
+ if (x->require_preserve_context)
+ return false;
}
}
}
diff -ur coreutils-6.9-orig/src/copy.h coreutils-6.9/src/copy.h
--- coreutils-6.9-orig/src/copy.h 2007-10-30 12:34:07.000000000 +0100
+++ coreutils-6.9/src/copy.h 2007-10-30 15:52:59.000000000 +0100
@@ -150,6 +150,18 @@
it be zero. */
bool require_preserve;
+ /* Useful only when preserve_security_context is true.
+ If true, a failed attempt to preserve a file's security context
+ propagates failure "out" to the caller. If false, a failure to
+ preserve a file's security context does not change the invoking
+ application's exit status. Give diagnostics for failed syscalls
+ regardless of this setting. For example, with "cp --preserve=context"
+ this flag is "true", while with "cp -a", it is false. That means
+ "cp -a" attempts to preserve any security context, but does not
+ fail if it is unable to do so. */
+ bool require_preserve_context;
+
+
/* If true, copy directories recursively and copy special files
as themselves rather than copying their contents. */
bool recursive;
diff -ur coreutils-6.9-orig/src/cp.c coreutils-6.9/src/cp.c
--- coreutils-6.9-orig/src/cp.c 2007-10-30 12:42:13.000000000 +0100
+++ coreutils-6.9/src/cp.c 2007-10-30 16:00:33.000000000 +0100
@@ -766,7 +766,7 @@
x->preserve_security_context = false;
x->set_security_context = false;
#endif
-
+ x->require_preserve_context = false;
x->require_preserve = false;
x->recursive = false;
x->sparse_mode = SPARSE_AUTO;
@@ -844,6 +844,7 @@
case PRESERVE_CONTEXT:
x->preserve_security_context = on_off;
+ x->require_preserve_context = on_off;
break;
case PRESERVE_ALL:
@@ -851,7 +834,10 @@
x->preserve_timestamps = on_off;
x->preserve_ownership = on_off;
x->preserve_links = on_off;
- x->preserve_security_context = on_off;
+ if (selinux_enabled) {
+ x->preserve_security_context = on_off;
+ x->require_preserve_context = on_off;
+ }
break;
default:
@@ -915,8 +916,9 @@
x.preserve_ownership = true;
x.preserve_mode = true;
x.preserve_timestamps = true;
- x.preserve_security_context = true;
- x.require_preserve = true;
+ if (selinux_enabled)
+ x.preserve_security_context = true;
+ x.require_preserve = true;
x.recursive = true;
break;

View File

@ -0,0 +1,205 @@
diff -urp coreutils-6.9-orig/src/stat.c coreutils-6.9/src/stat.c
--- coreutils-6.9-orig/src/stat.c 2007-12-04 16:26:39.000000000 +0100
+++ coreutils-6.9/src/stat.c 2007-12-05 00:05:11.000000000 +0100
@@ -55,12 +55,7 @@
# include <fs_info.h>
#endif
-#ifdef WITH_SELINUX
#include <selinux/selinux.h>
-#define SECURITY_ID_T security_context_t
-#else
-#define SECURITY_ID_T char *
-#endif
#include "system.h"
@@ -179,6 +174,9 @@ static struct option const long_options[
char *program_name;
+/* Whether to follow symbolic links; True for --dereference (-L). */
+static bool follow_links = false;
+
/* Whether to interpret backslash-escape sequences.
True for --printf=FMT, not for --format=FMT (-c). */
static bool interpret_backslash_escapes;
@@ -402,10 +400,30 @@ out_uint_x (char *pformat, size_t prefix
printf (pformat, arg);
}
+/* Very specialized function (modifies FORMAT), just so as to avoid
+ duplicating this code between both print_statfs and print_stat. */
+static void
+out_file_context (char const *filename, char *pformat, size_t prefix_len)
+{
+ char *scontext;
+ if ((follow_links
+ ? getfilecon (filename, &scontext)
+ : lgetfilecon (filename, &scontext)) < 0)
+ {
+ error (0, errno, _("failed to get security context of %s"),
+ quote (filename));
+ scontext = NULL;
+ }
+ strcpy (pformat + prefix_len, "s");
+ printf (pformat, (scontext ? scontext : "?"));
+ if (scontext)
+ freecon (scontext);
+}
+
/* print statfs info */
static void
print_statfs (char *pformat, size_t prefix_len, char m, char const *filename,
- void const *data, SECURITY_ID_T scontext)
+ void const *data)
{
STRUCT_STATVFS const *statfsbuf = data;
@@ -481,8 +499,7 @@ print_statfs (char *pformat, size_t pref
out_int (pformat, prefix_len, statfsbuf->f_ffree);
break;
case 'C':
- strcat (pformat, "s");
- printf(scontext);
+ out_file_context (filename, pformat, prefix_len);
break;
default:
fputc ('?', stdout);
@@ -493,7 +510,7 @@ print_statfs (char *pformat, size_t pref
/* print stat info */
static void
print_stat (char *pformat, size_t prefix_len, char m,
- char const *filename, void const *data, SECURITY_ID_T scontext)
+ char const *filename, void const *data)
{
struct stat *statbuf = (struct stat *) data;
struct passwd *pw_ent;
@@ -607,8 +624,7 @@ print_stat (char *pformat, size_t prefix
out_uint (pformat, prefix_len, statbuf->st_ctime);
break;
case 'C':
- strcat (pformat, "s");
- printf(pformat,scontext);
+ out_file_context(filename, pformat, prefix_len);
break;
default:
fputc ('?', stdout);
@@ -656,9 +672,8 @@ print_esc_char (char c)
static void
print_it (char const *format, char const *filename,
- void (*print_func) (char *, size_t, char, char const *, void const *,
- SECURITY_ID_T ),
- void const *data, SECURITY_ID_T scontext)
+ void (*print_func) (char *, size_t, char, char const *, void const *),
+ void const *data)
{
/* Add 2 to accommodate our conversion of the stat `%s' format string
to the longer printf `%llu' one. */
@@ -699,7 +714,7 @@ print_it (char const *format, char const
putchar ('%');
break;
default:
- print_func (dest, len + 1, *fmt_char, filename, data, scontext);
+ print_func (dest, len + 1, *fmt_char, filename, data);
break;
}
break;
@@ -765,18 +780,6 @@ static bool
do_statfs (char const *filename, bool terse, bool secure, char const *format)
{
STRUCT_STATVFS statfsbuf;
- SECURITY_ID_T scontext = NULL;
-#ifdef WITH_SELINUX
- if(is_selinux_enabled()) {
- if (getfilecon(filename,&scontext)<0) {
- if (secure) {
- perror (filename);
- return false;
- }
- scontext = NULL;
- }
- }
-#endif
if (STATFS (filename, &statfsbuf) != 0)
{
@@ -812,43 +815,23 @@ do_statfs (char const *filename, bool te
}
}
- print_it (format, filename, print_statfs, &statfsbuf, scontext);
-#ifdef WITH_SELINUX
- if (scontext != NULL)
- freecon(scontext);
-#endif
+ print_it (format, filename, print_statfs, &statfsbuf);
return true;
}
/* stat the file and print what we find */
static bool
-do_stat (char const *filename, bool follow_links, bool terse, bool secure,
+do_stat (char const *filename, bool terse, bool secure,
char const *format)
{
struct stat statbuf;
- SECURITY_ID_T scontext = NULL;
-
+
if ((follow_links ? stat : lstat) (filename, &statbuf) != 0)
{
error (0, errno, _("cannot stat %s"), quote (filename));
return false;
}
-#ifdef WITH_SELINUX
- if(is_selinux_enabled()) {
- int i;
- if (!follow_links)
- i=lgetfilecon(filename, &scontext);
- else
- i=getfilecon(filename, &scontext);
- if (i == -1 && secure)
- {
- perror (filename);
- return false;
- }
- }
-#endif
-
if (format == NULL)
{
if (terse)
@@ -893,11 +876,7 @@ do_stat (char const *filename, bool foll
}
}
}
- print_it (format, filename, print_stat, &statbuf, scontext);
-#ifdef WITH_SELINUX
- if (scontext)
- freecon(scontext);
-#endif
+ print_it (format, filename, print_stat, &statbuf);
return true;
}
@@ -996,7 +975,6 @@ main (int argc, char *argv[])
{
int c;
int i;
- bool follow_links = false;
bool fs = false;
bool terse = false;
bool secure = false;
@@ -1065,7 +1043,7 @@ main (int argc, char *argv[])
for (i = optind; i < argc; i++)
ok &= (fs
? do_statfs (argv[i], terse, secure, format)
- : do_stat (argv[i], follow_links, terse, secure, format));
+ : do_stat (argv[i], terse, secure, format));
exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@ -0,0 +1,78 @@
From 63467fa18794f02497c7a46e3b7783ba1180f8fc Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 4 Jul 2008 16:34:39 +0200
Subject: [PATCH] who -r: don't print "last=" when the corresponding byte is unprintable
* src/who.c (print_runlevel): Print last=%c only when the "preceding
run-level" byte is printable. Reported by Gian Piero De Lolliis in
<http://bugzilla.redhat.com/453249>.
---
src/who.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/who.c b/src/who.c
index 5529618..0bba912 100644
--- a/src/who.c
+++ b/src/who.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include "system.h"
+#include "c-ctype.h"
#include "canon-host.h"
#include "readutmp.h"
#include "error.h"
@@ -511,7 +512,7 @@ print_runlevel (const STRUCT_UTMP *utmp_ent)
sprintf (comment, "%s%c", _("last="), (last == 'N') ? 'S' : last);
print_line (-1, "", ' ', -1, runlevline, time_string (utmp_ent),
- "", "", comment, "");
+ "", "", c_isprint (last) ? comment : "", "");
return;
}
--
1.5.6.1.206.g8dcaf96
From 10db2e5e05c67eea205b3ec76a2408f46356a7fd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik@redhat.com>
Date: Wed, 2 Jul 2008 14:11:05 +0200
Subject: [PATCH] doci: describe who's -p -r and -t options
* doc/coreutils.texi (who invocation):
---
doc/coreutils.texi | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 155ba8d..c0ea237 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12710,6 +12710,24 @@ automatic dial-up internet access.
@opindex --heading
Print a line of column headings.
+@item -p
+@itemx --process
+@opindex -p
+@opindex --process
+List active processes spawned by init.
+
+@item -r
+@itemx --runlevel
+@opindex -r
+@opindex --runlevel
+Print the current (and maybe previous) run-level of the init process.
+
+@item -t
+@itemx --time
+@opindex -t
+@opindex --time
+Print last system clock change.
+
@item -w
@itemx -T
@itemx --mesg
--
1.5.2.2

View File

@ -15,8 +15,9 @@ COLOR tty
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
@ -28,20 +29,34 @@ TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM console
TERM cygwin
TERM dtterm
TERM color_xterm
TERM ansi
TERM screen
TERM screen.linux
TERM kon
TERM kterm
TERM eterm-color
TERM gnome
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM screen
TERM screen-256color
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
@ -78,24 +93,71 @@ EXEC 01;32
.bat 01;32
.sh 01;32
.csh 01;32
.tar 01;31 # archives or compressed (bright red)
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.svgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.lzma 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
.bz2 01;31
.tbz2 01;31
.bz 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.rar 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.jpg 01;35 # image formats
.7z 01;31
.rz 01;31
# image formats (magenta)
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.png 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.svg 01;35

View File

@ -29,7 +29,11 @@ TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM xterm-16color
TERM xterm-88color
TERM xterm-256color
TERM rxvt
TERM rxvt-unicode
TERM xterm-color
TERM color-xterm
TERM vt100
@ -71,24 +75,70 @@ EXEC 00;32
.bat 00;32
.sh 00;32
.csh 00;32
.tar 00;31 # archives or compressed (red)
# archives or compressed (red)
.tar 00;31
.tgz 00;31
.svgz 00;31
.arj 00;31
.taz 00;31
.lzh 00;31
.lzma 00;31
.zip 00;31
.z 00;31
.Z 00;31
.dz 00;31
.gz 00;31
.bz2 00;31
.tbz2 00;31
.bz 00;31
.tz 00;31
.deb 00;31
.rpm 00;31
.jar 00;31
.rar 00;31
.ace 00;31
.zoo 00;31
.cpio 00;31
.jpg 00;35 # image formats
.7z 00;31
.rz 00;31
# image formats
.jpg 00;35
.jpeg 00;35
.gif 00;35
.bmp 00;35
.pbm 00;35
.pgm 00;35
.ppm 00;35
.tga 00;35
.xbm 00;35
.xpm 00;35
.png 00;35
.tif 00;35
.tiff 00;35
.png 00;35
.mng 00;35
.pcx 00;35
.mov 00;35
.mpg 00;35
.mpeg 00;35
.m2v 00;35
.mkv 00;35
.ogm 00;35
.mp4 00;35
.m4v 00;35
.mp4v 00;35
.vob 00;35
.qt 00;35
.nuv 00;35
.wmv 00;35
.asf 00;35
.rm 00;35
.rmvb 00;35
.flc 00;35
.avi 00;35
.fli 00;35
.gl 00;35
.dl 00;35
.xcf 00;35
.xwd 00;35
.yuv 00;35
.svg 00;35

59
coreutils-authors.patch Normal file
View File

@ -0,0 +1,59 @@
Signed-off-by: Ondřej Vašík <ovasik@redhat.com>
Signed-off-by: Jim Meyering <meyering@redhat.com>
* src/echo.c (AUTHORS) : Use bash builtin echo authors instead of FIXME unknown
* src/basename.c (AUTHORS): List David as the author.
* AUTHORS: Update here, too.
---
AUTHORS | 4 ++--
src/basename.c | 2 +-
src/echo.c | 4 +++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/basename.c b/src/basename.c
index 38e8879..69b708f 100644
--- a/src/basename.c
+++ b/src/basename.c
@@ -37,7 +37,7 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "basename"
-#define AUTHORS "FIXME unknown"
+#define AUTHORS "David MacKenzie"
/* The name this program was run with. */
char *program_name;
diff --git a/AUTHORS b/AUTHORS
index 404cf70..666edc1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,7 +3,7 @@ each followed by the name(s) of its author(s).
arch: David MacKenzie, Karel Zak
base64: Simon Josefsson
-basename: FIXME unknown
+basename: David MacKenzie
cat: Torbjorn Granlund, Richard M. Stallman
chcon: Russell Coker, Jim Meyering
chgrp: David MacKenzie, Jim Meyering
@@ -22,7 +22,7 @@ dir: Richard M. Stallman, David MacKenzie
dircolors: H. Peter Anvin
dirname: David MacKenzie, Jim Meyering
du: Torbjorn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
-echo: FIXME unknown
+echo: Brian Fox, Chet Ramey
env: Richard Mlynarik, David MacKenzie
expand: David MacKenzie
expr: Mike Parker
diff --git a/src/echo.c b/src/echo.c
index ebbf5b8..11e648e 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -24,7 +24,7 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "echo"
-#define AUTHORS "FIXME unknown"
+#define AUTHORS "Brian Fox", "Chet Ramey"
/* echo [-neE] [arg ...]
Output the ARGs. If -n is specified, the trailing newline is

View File

@ -1,4 +1,12 @@
# color-ls initialization
if ( $?USER_LS_COLORS ) then
if ( "$USER_LS_COLORS" != "" ) then
#when USER_LS_COLORS defined do not override user
#specified LS_COLORS and use them
goto finish
endif
endif
alias ll 'ls -l'
alias l. 'ls -d .*'
@ -7,11 +15,9 @@ if ($?TERM) then
if ( -e "/etc/DIR_COLORS.$TERM" ) set COLORS="/etc/DIR_COLORS.$TERM"
endif
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
if ($?TERM) then
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
endif
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
if ($?TERM) then
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
endif
@ -19,14 +25,16 @@ if ( ! -e "$COLORS" ) exit
eval `dircolors -c $COLORS`
if ( "$LS_COLORS" == '' ) then
exit
endif
if ( "$LS_COLORS" == '' ) exit
set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
if ( "$color_none" == '' ) then
alias ll 'ls -l --color=tty'
alias l. 'ls -d .* --color=tty'
alias ls 'ls --color=tty'
if ( "$color_none" != '' ) then
unset color_none
exit
endif
unset color_none
finish:
alias ll 'ls -l --color=auto'
alias l. 'ls -d .* --color=auto'
alias ls 'ls --color=auto'

View File

@ -1,21 +1,36 @@
# color-ls initialization
alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
if [ -z "$USER_LS_COLORS" ]; then
alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null
COLORS=/etc/DIR_COLORS
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
[ -e "$COLORS" ] || return
eval `dircolors --sh "$COLORS"`
[ -z "$LS_COLORS" ] && return
# Skip the rest for noninteractive shells.
[ -z "$PS1" ] && return
if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null ; then
alias ll='ls -l --color=tty' 2>/dev/null
alias l.='ls -d .* --color=tty' 2>/dev/null
alias ls='ls --color=tty' 2>/dev/null
COLORS=
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
"$HOME/.dir_colors" "$HOME/.dircolors"; do
[ -e "$colors" ] && COLORS="$colors" && break
done
if [ -z "$COLORS" ]; then
for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
[ -e "$colors" ] && COLORS="$colors" && break
done
fi
# Existence of $COLORS already checked above.
[ -n "$COLORS" ] || return
eval "`dircolors --sh "$COLORS" 2>/dev/null`"
[ -z "$LS_COLORS" ] && return
egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
fi
alias ll='ls -l --color=auto' 2>/dev/null
alias l.='ls -d .* --color=auto' 2>/dev/null
alias ls='ls --color=auto' 2>/dev/null

View File

@ -0,0 +1,45 @@
diff -urNp coreutils-6.9-orig/src/dd.c coreutils-6.9/src/dd.c
--- coreutils-6.9-orig/src/dd.c
+++ coreutils-6.9/src/dd.c
@@ -391,6 +391,25 @@ static char const ebcdic_to_ascii[] =
'\070', '\071', '\372', '\373', '\374', '\375', '\376', '\377'
};
+/* True if we need to close the standard output *stream*. */
+static bool close_stdout_required = true;
+
+/* The only reason to close the standard output *stream* is if
+ parse_long_options fails (as it does for --help or --version).
+ In any other case, dd uses only the STDOUT_FILENO file descriptor,
+ and the "cleanup" function calls "close (STDOUT_FILENO)".
+ Closing the file descriptor and then letting the usual atexit-run
+ close_stdout function call "fclose (stdout)" would result in a
+ harmless failure of the close syscall (with errno EBADF).
+ This function serves solely to avoid the unnecessary close_stdout
+ call, once parse_long_options has succeeded. */
+static void
+maybe_close_stdout (void)
+{
+ if (close_stdout_required)
+ close_stdout ();
+}
+
void
usage (int status)
{
@@ -1639,12 +1658,14 @@ main (int argc, char **argv)
textdomain (PACKAGE);
/* Arrange to close stdout if parse_long_options exits. */
- atexit (close_stdout);
+ atexit (maybe_close_stdout);
page_size = getpagesize ();
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
+ close_stdout_required = false;
+
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);

View File

@ -0,0 +1,124 @@
diff -urNp coreutils-6.9.orig/lib/getdate.y coreutils-6.9/lib/getdate.y
--- coreutils-6.9.orig/lib/getdate.y 2007-02-23 19:25:21.000000000 +0100
+++ coreutils-6.9/lib/getdate.y 2007-11-23 10:27:13.000000000 +0100
@@ -199,6 +199,42 @@ static int yylex (union YYSTYPE *, parse
static int yyerror (parser_control const *, char const *);
static long int time_zone_hhmm (textint, long int);
+static void
+digits_to_date_time (parser_control *pc, textint text_int)
+{
+ if (pc->dates_seen && ! pc->year.digits
+ && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits))
+ pc->year = text_int;
+ else
+ {
+ if (4 < text_int.digits)
+ {
+ pc->dates_seen++;
+ pc->day = text_int.value % 100;
+ pc->month = (text_int.value / 100) % 100;
+ pc->year.value = text_int.value / 10000;
+ pc->year.digits = text_int.digits - 4;
+ }
+ else
+ {
+ pc->times_seen++;
+ if (text_int.digits <= 2)
+ {
+ pc->hour = text_int.value;
+ pc->minutes = 0;
+ }
+ else
+ {
+ pc->hour = text_int.value / 100;
+ pc->minutes = text_int.value % 100;
+ }
+ pc->seconds.tv_sec = 0;
+ pc->seconds.tv_nsec = 0;
+ pc->meridian = MER24;
+ }
+ }
+}
+
%}
/* We want a reentrant parser, even if the TZ manipulation and the calls to
@@ -268,6 +304,7 @@ item:
| rel
{ pc->rels_seen = true; }
| number
+ | hybrid
;
time:
@@ -543,38 +580,23 @@ unsigned_seconds:
number:
tUNUMBER
+ { digits_to_date_time (pc, $1); }
+ ;
+
+hybrid:
+ tUNUMBER relunit_snumber
{
- if (pc->dates_seen && ! pc->year.digits
- && ! pc->rels_seen && (pc->times_seen || 2 < $1.digits))
- pc->year = $1;
- else
- {
- if (4 < $1.digits)
- {
- pc->dates_seen++;
- pc->day = $1.value % 100;
- pc->month = ($1.value / 100) % 100;
- pc->year.value = $1.value / 10000;
- pc->year.digits = $1.digits - 4;
- }
- else
- {
- pc->times_seen++;
- if ($1.digits <= 2)
- {
- pc->hour = $1.value;
- pc->minutes = 0;
- }
- else
- {
- pc->hour = $1.value / 100;
- pc->minutes = $1.value % 100;
- }
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = MER24;
- }
- }
+ /* Hybrid all-digit and relative offset, so that we accept e.g.,
+ "YYYYMMDD +N days" as well as "YYYYMMDD N days". */
+ digits_to_date_time (pc, $1);
+ pc->rel.ns += $2.ns;
+ pc->rel.seconds += $2.seconds;
+ pc->rel.minutes += $2.minutes;
+ pc->rel.hour += $2.hour;
+ pc->rel.day += $2.day;
+ pc->rel.month += $2.month;
+ pc->rel.year += $2.year;
+ pc->rels_seen = true;
}
;
diff -urNp coreutils-6.9.orig/tests/misc/date coreutils-6.9/tests/misc/date
--- coreutils-6.9.orig/tests/misc/date 2007-03-18 22:36:43.000000000 +0100
+++ coreutils-6.9/tests/misc/date 2007-11-23 10:14:19.000000000 +0100
@@ -135,6 +135,11 @@ my @Tests =
['next-mo', "-d '$d1 next month' '+%Y-%m-%d %T'", {OUT=>"$dm $t0"}],
['next-y', "-d '$d1 next year' '+%Y-%m-%d %T'", {OUT=>"$dy $t0"}],
+ # This has always worked, ...
+ ['rel-1', "-d '20050101 1 day' +%F", {OUT=>"2005-01-02"}],
+ # ...but up to coreutils-6.9, this was rejected due to the "+".
+ ['rel-1p', "-d '20050101 +1 day' +%F", {OUT=>"2005-01-02"}],
+
['utc-0', "-u -d '08/01/97 6:00' '+%D,%H:%M'", {OUT=>"08/01/97,06:00"},
{ENV => 'TZ=UTC+4'}],

View File

@ -2196,7 +2196,7 @@
{
struct keyfield const *key = keylist;
@@ -1875,6 +2265,177 @@
@@ -1875,6 +2265,179 @@
return key->reverse ? -diff : diff;
}
@ -2232,7 +2232,9 @@
+ size_t lenb = limb <= textb ? 0 : limb - textb;
+
+ /* Actually compare the fields. */
+ if (key->numeric | key->general_numeric)
+ if (key->random)
+ diff = compare_random (texta, lena, textb, lenb);
+ else if (key->numeric | key->general_numeric)
+ {
+ char savea = *lima, saveb = *limb;
+
@ -2373,7 +2375,7 @@
+
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -2744,7 +3305,7 @@
initialize_exit_failure (SORT_FAILURE);
@ -3947,8 +3949,8 @@
- FATAL_ERROR (_("the delimiter must be a single character"));
- delim = optarg[0];
- delim_specified = true;
+#if HAVE_MBRTOWC
+ {
+#if HAVE_MBRTOWC
+ if(MB_CUR_MAX > 1)
+ {
+ mbstate_t state;

117
coreutils-mvatomic.patch Normal file
View File

@ -0,0 +1,117 @@
src/copy.c | 5 +++--
tests/mv/Makefile.am | 4 ++--
tests/mv/atomic2 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 69 insertions(+), 4 deletions(-)
create mode 100755 tests/mv/atomic2
diff --git a/src/copy.c b/src/copy.c
index fd31b5c..208a674 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1339,10 +1339,11 @@ copy_internal (char const *src_name, char const *dst_name,
new_dst = true;
}
else if (! S_ISDIR (dst_sb.st_mode)
+ /* Never unlink dst_name when in move mode. */
+ && ! x->move_mode
&& (x->unlink_dest_before_opening
|| (x->preserve_links && 1 < dst_sb.st_nlink)
- || (!x->move_mode
- && x->dereference == DEREF_NEVER
+ || (x->dereference == DEREF_NEVER
&& S_ISLNK (src_sb.st_mode))
))
{
diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am
index c121911..92ec68e 100644
--- a/tests/mv/Makefile.am
+++ b/tests/mv/Makefile.am
@@ -1,7 +1,6 @@
# Make coreutils tests for "mv". -*-Makefile-*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -17,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
TESTS = \
+ atomic2 \
hard-verbose \
backup-dir \
dir2dir \
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2
new file mode 100755
index 0000000..d1029aa
--- /dev/null
+++ b/tests/mv/atomic2
@@ -0,0 +1,64 @@
+#!/bin/sh
+# ensure that mv doesn't first unlink a multi-hard-linked destination
+
+# Copyright (C) 2008 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/>.
+
+if test "$VERBOSE" = yes; then
+ set -x
+ mv --version
+fi
+
+pwd=`pwd`
+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
+trap '(exit $?); exit $?' 1 2 13 15
+
+# Before the fix, mv would unnecessarily unlink the destination symlink:
+# $ rm -f a b b2; touch a b; ln b b2; strace -e unlink /p/bin/mv a b
+# unlink("b") = 0
+#
+# With the fix, it doesn't call unlink:
+# $ rm -f a b b2; touch a b; ln b b2; strace -e unlink ./mv a b
+# $
+
+framework_failure=0
+touch a b || framework_failure=1
+ln b b2 || framework_failure=1
+if test $framework_failure = 1; then
+ echo "$0: failure in testing framework" 1>&2
+ (exit 1); exit 1
+fi
+
+# Skip this test on systems without strace.
+strace -V < /dev/null > ver 2>&1 || skip=1
+if test "$skip" = 1; then
+ echo "$0: no strace program, so skipping this test" 1>&2
+ (exit 77); exit 77
+fi
+
+fail=0
+
+strace -qe unlink mv a b > out 2>&1 || fail=1
+$EGREP 'unlink.*"b"' out && fail=1
+
+# Ensure that the source, "a", is gone.
+ls -dl a > /dev/null 2>&1 && fail=1
+
+# Ensure that the destination, "b", has link count 1.
+n_links=`stat --printf=%h b` || fail=1
+test "$n_links" = 1 || fail=1
+
+(exit $fail); exit $fail
--
1.5.5.rc0.7.g57e83

View File

@ -361,6 +361,15 @@
The program accepts the following options. Also see @ref{Common options}.
@@ -12815,6 +12815,8 @@
@env{PATH} to a compiled-in default value. Change to @var{user}'s home
directory. Prepend @samp{-} to the shell's name, intended to make it
read its login startup file(s).
+Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
+are preserved as well for PAM functionality.
@item -m
@itemx -p
@@ -13477,33 +13480,6 @@
the exit status of the subshell otherwise
@end display

View File

@ -1717,7 +1717,7 @@
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
--- /dev/null 2007-03-23 08:54:03.819414923 +0000
+++ coreutils-6.9/src/runcon.c 2007-03-23 11:59:21.000000000 +0000
@@ -0,0 +1,253 @@
@@ -0,0 +1,252 @@
+/*
+ * runcon [ context |
+ * ( [ -c ] [ -r role ] [-t type] [ -u user ] [ -l levelrange ] )
@ -1803,7 +1803,6 @@
+ textdomain (PACKAGE);
+
+ while (1) {
+ int c;
+ int this_option_optind = optind ? optind : 1;
+ int option_index = 0;
+ static struct option long_options[] = {
@ -1816,7 +1815,7 @@
+ { "version", 0, &show_version, 1 },
+ { 0, 0, 0, 0 }
+ };
+ c = getopt_long(argc, argv, "r:t:u:l:c", long_options, &option_index);
+ int c = getopt_long(argc, argv, "+r:t:u:l:c", long_options, &option_index);
+ if ( c == -1 ) {
+ break;
+ }
@ -2224,18 +2223,32 @@
+#endif
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
@@ -523,6 +613,10 @@
default:
@@ -503,6 +591,7 @@
static bool
change_attributes (char const *name)
{
+ bool ok = false;
/* chown must precede chmod because on some systems,
chown clears the set[ug]id bits for non-superusers,
resulting in incorrect permissions.
@@ -521,9 +610,14 @@
else if (chmod (name, mode) != 0)
error (0, errno, _("cannot change permissions of %s"), quote (name));
else
return true;
- return true;
+ ok = true;
+
+#ifdef WITH_SELINUX
+ if (use_default_selinux_context)
+ setdefaultfilecon(name);
+ setdefaultfilecon (name);
+#endif
return false;
- return false;
+ return ok;
}
/* Set the timestamps of file TO to match those of file FROM.
@@ -687,6 +781,11 @@
-T, --no-target-directory treat DEST as a normal file\n\
-v, --verbose print the name of each directory as it is created\n\

View File

@ -0,0 +1,70 @@
diff -urNp coreutils-6.9-orig/man/cp.1 coreutils-6.9/man/cp.1
--- coreutils-6.9-orig/man/cp.1
+++ coreutils-6.9/man/cp.1
@@ -19,7 +19,7 @@ Copy SOURCE to DEST, or multiple SOURCE(
Mandatory arguments to long options are mandatory for short options too.
.TP
\fB\-a\fR, \fB\-\-archive\fR
-same as \fB\-dpPR\fR
+same as \fB\-cdpPR\fR
.TP
\fB\-\-backup\fR[=\fICONTROL\fR]
make a backup of each existing destination file
@@ -55,6 +55,9 @@ never follow symbolic links in SOURCE
\fB\-p\fR
same as \fB\-\-preserve\fR=\fImode\fR,ownership,timestamps
.TP
+\fB\-c\fR
+same as \fB\-\-preserve\fR=context\fR
+.TP
\fB\-\-preserve\fR[=\fIATTR_LIST\fR]
preserve the specified attributes (default:
mode,ownership,timestamps), if possible
diff -urNp coreutils-6.9-orig/doc/coreutils.info coreutils-6.9/doc/coreutils.info
--- coreutils-6.9-orig/doc/coreutils.info
+++ coreutils-6.9/doc/coreutils.info
@@ -5642,7 +5642,7 @@ options::.
Preserve as much as possible of the structure and attributes of the
original files in the copy (but do not attempt to preserve internal
directory structure; i.e., `ls -U' may list the entries in a copied
- directory in a different order). Equivalent to `-dpPR'.
+ directory in a different order). Equivalent to `-cdpPR'.
`-b'
`--backup[=METHOD]'
@@ -5660,6 +5660,11 @@ options::.
cp --backup --force -- "$i" "$i"
done
+`-c'
+ Preserve SELinux security context of the original files if possible.
+ Note: Some file systems don't support storing of SELinux security
+ context.
+
`--copy-contents'
If copying recursively, copy the contents of any special files
(e.g., FIFOs and device files) as if they were regular files.
diff -urNp coreutils-6.9-orig/doc/coreutils.texi coreutils-6.9/doc/coreutils.texi
--- coreutils-6.9-orig/doc/coreutils.texi
+++ coreutils-6.9/doc/coreutils.texi
@@ -6957,7 +6957,7 @@ Preserve as much as possible of the stru
original files in the copy (but do not attempt to preserve internal
directory structure; i.e., @samp{ls -U} may list the entries in a copied
directory in a different order).
-Equivalent to @option{-dpPR}.
+Equivalent to @option{-cdpPR}.
@item -b
@itemx @w{@kbd{--backup}[=@var{method}]}
@@ -6981,6 +6981,11 @@ for i; do
done
@end example
+@item -c
+@cindex SELinux security context information, preserving
+Preserve SELinux security context of the original files if possible.
+Some file systems don't support storing of SELinux security context.
+
@item --copy-contents
@cindex directories, copying recursively
@cindex copying directories recursively

View File

@ -28,3 +28,30 @@ diff -uNrp -x '*~' coreutils-5.97-orig/src/su.c coreutils-5.97/src/su.c
PAM_BAIL_P;
#ifndef RUNUSER
diff -urp coreutils-6.9-orig/doc/coreutils.info coreutils-6.10/doc/coreutils.info
--- coreutils-6.9-orig/doc/coreutils.info
+++ coreutils-6.9/doc/coreutils.info
@@ -11006,7 +11006,8 @@ options::.
set, even for the super-user, as described above), and set `PATH'
to a compiled-in default value. Change to USER's home directory.
Prepend `-' to the shell's name, intended to make it read its
- login startup file(s).
+ login startup file(s). When this option is given, /etc/pam.d/su-l
+ PAM file is used instead of the default one.
`-m'
`-p'
diff -urp coreutils-6.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi
--- coreutils-6.9-orig/doc/coreutils.texi
+++ coreutils-6.9/doc/coreutils.texi
@@ -13670,7 +13670,9 @@ the exit status of @var{command} otherwi
@command{su} allows one user to temporarily become another user. It runs a
command (often an interactive shell) with the real and effective user
-ID, group ID, and supplemental groups of a given @var{user}. Synopsis:
+ID, group ID, and supplemental groups of a given @var{user}. When the -l
+option is given, the su-l PAM file is used instead of the default su PAM file.
+Synopsis:
@example
su [@var{option}]@dots{} [@var{user} [@var{arg}]@dots{}]

View File

@ -1,8 +1,8 @@
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Name: coreutils
Version: 6.9
Release: 7%{?dist}
License: GPL
Release: 19%{?dist}
License: GPLv2+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -19,9 +19,23 @@ Source203: coreutils-runuser-l.pamd
# From upstream
Patch1: coreutils-futimens.patch
Patch2: coreutils-ls-x.patch
Patch3: coreutils-6.9-cp-i-u.patch
Patch4: coreutils-6.9-du-ls-upstream.patch
Patch5: coreutils-dddoubleclose.patch
Patch6: coreutils-mvatomic.patch
Patch7: coreutils-authors.patch
Patch8: coreutils-6.9-md5sha1sum.patch
Patch9: coreutils-6.9-lonebackslash.patch
Patch10: coreutils-6.9-whorunlevel.patch
Patch11: coreutils-446294-lsexitstatuses.patch
# Our patches
Patch100: coreutils-chgrp.patch
Patch101: coreutils-getdateYYYYMMDD.patch
Patch102: coreutils-6.9-manpages.patch
#Patch103: coreutils-6.9-longoptions.patch
Patch104: coreutils-6.9-dd-fullblock.patch
Patch105: coreutils-6.12-date_timerelsnumber.patch
# sh-utils
Patch703: sh-utils-2.0.11-dateman.patch
@ -45,6 +59,11 @@ Patch916: coreutils-getfacl-exit-code.patch
#SELINUX Patch
Patch950: coreutils-selinux.patch
#SELINUX Patch fix to allow cp -a rewrite file on different filesystem
Patch951: coreutils-6.9-requiresecuritycontext.patch
Patch952: coreutils-6.9-statsecuritycontext.patch
Patch953: coreutils-selinuxmanpages.patch
BuildRequires: libselinux-devel >= 1.25.6-1
BuildRequires: libacl-devel
@ -53,6 +72,7 @@ BuildRequires: texinfo >= 4.3
BuildRequires: autoconf >= 2.58, automake >= 1.8
%{?!nopam:BuildRequires: pam-devel}
Requires: libattr
Requires(post): libselinux >= 1.25.6-1
Requires(pre): /sbin/install-info
Requires(preun): /sbin/install-info
@ -85,9 +105,23 @@ the old GNU fileutils, sh-utils, and textutils packages.
# From upstream
%patch1 -p1 -b .futimens
%patch2 -p1 -b .ls-x
%patch3 -p1 -b .cp-i-u
%patch4 -p1 -b .du-ls
%patch5 -p1 -b .doubleclose
%patch6 -p1 -b .mvatomic
%patch7 -p1 -b .authors
%patch8 -p1 -b .md5sum
%patch9 -p1 -b .backslash
%patch10 -p1 -b .whorunlevel
%patch11 -p1 -b .lsexit
# Our patches
%patch100 -p1 -b .chgrp
%patch101 -p1 -b .getdate
%patch102 -p1 -b .manpages
#%patch103 -p1 -b .longopts
%patch104 -p1 -b .dd-fullblock
%patch105 -p1 -b .getdate
# sh-utils
%patch703 -p1 -b .dateman
@ -109,6 +143,16 @@ the old GNU fileutils, sh-utils, and textutils packages.
#SELinux
%patch950 -p1 -b .selinux
%patch951 -p1 -b .require-preserve
%patch952 -p1 -b .statsecuritycontext
%patch953 -p1 -b .selinuxman
#fix typos/mistakes in localized documentation(#439410, #440056)
for pofile in $(find ./po/*.p*)
do
sed -i 's/-dpPR/-cdpPR/' "$pofile"
sed -i 's/commmand/command/' "$pofile"
done
# Don't run basic-1 test, since it breaks when run in the background
# (bug #102033).
@ -116,6 +160,7 @@ sed -i -e 's/basic-1//g' tests/stty/Makefile*
chmod a+x tests/sort/sort-mb-tests
chmod a+x tests/ls/x-option
chmod a+x tests/mv/atomic2
%build
%ifarch s390 s390x
@ -164,12 +209,12 @@ mkdir -p $RPM_BUILD_ROOT{/bin,%_bindir,%_sbindir,/sbin}
%{?!nopam:mkdir -p $RPM_BUILD_ROOT%_sysconfdir/pam.d}
for f in basename cat chgrp chmod chown cp cut date dd df echo env false link ln ls mkdir mknod mv nice pwd rm rmdir sleep sort stty sync touch true uname unlink
do
mv $RPM_BUILD_ROOT{%_bindir,/bin}/$f
mv $RPM_BUILD_ROOT{%_bindir,/bin}/$f
done
# chroot was in /usr/sbin :
mv $RPM_BUILD_ROOT{%_bindir,%_sbindir}/chroot
# {cat,sort,cut} were previously moved from bin to /usr/bin and linked into
# {cat,sort,cut} were previously moved from bin to /usr/bin and linked into
for i in env cut; do ln -sf ../../bin/$i $RPM_BUILD_ROOT/usr/bin; done
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
@ -181,6 +226,8 @@ install -p -c -m644 %SOURCE106 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.c
# su
install -m 4755 src/su $RPM_BUILD_ROOT/bin
install -m 755 src/runuser $RPM_BUILD_ROOT/sbin
# do not ship runuser in /usr/bin/runuser
rm -rf $RPM_BUILD_ROOT/usr/bin/runuser
# These come from util-linux and/or procps.
for i in hostname uptime kill ; do
@ -235,7 +282,7 @@ fi
%defattr(-,root,root,-)
%dir %{_datadir}/locale/*/LC_TIME
%config(noreplace) %{_sysconfdir}/DIR_COLORS*
%{_sysconfdir}/profile.d/*
%config(noreplace) %{_sysconfdir}/profile.d/*
%{?!nopam:%config(noreplace) %{_sysconfdir}/pam.d/su}
%{?!nopam:%config(noreplace) %{_sysconfdir}/pam.d/su-l}
%{?!nopam:%config(noreplace) %{_sysconfdir}/pam.d/runuser}
@ -280,6 +327,86 @@ fi
/sbin/runuser
%changelog
* Mon Oct 13 2008 Ondrej Vasik <ovasik@redhat.com> 6.9-19
- fix several date issues(e.g. countable dayshifts, ignoring
some cases of relative offset, locales conversions...)
- clarify ls exit statuses documentation (#446294)
- added requires for libattr (#465569)
- mention that DISPLAY and XAUTHORITY envvars are preserved
for pam_xauth in su -l (#450505)
* Thu Aug 07 2008 Ondrej Vasik <ovasik@redhat.com> 6.9-18
- fix typo in runuser manpages (#439410)
- mention that cp -a includes -c option + mention cp -c
option in manpages (#440056)
- fix possible build-failure typo in i18n patch(#442205)
- fix possible segfault in sha1sum/md5sum command
- fix wrong checksum line handling in sha1sum -c
command(#439531)
- who -r should not show last runlevel for nonprintable chars
(like \0) - #453249,add few missing who options to texinfo
documentation, add missing authors for basename and echo
- dd: iflag=fullblock now read full blocks if possible
(#431997, #449263)
- ptx with odd number of backslashes no longer leads to buffer
overflow
- paste -d'\' file" no longer ovveruns memory
* Tue Mar 25 2008 Ondrej Vasik <ovasik@redhat.com> 6.9-17
- mv: never unlink a destination file before calling rename
(upstream, #438076)
- defer usage of longoptions patch until final upstream
version (#43105)
* Tue Mar 11 2008 Ondrej Vasik <ovasik@redhat.com> 6.9-16
- other way to keep user defined LS_COLORS(#430827)
- fixed harmless double close stdout in dd(#436368)
* Thu Mar 6 2008 Ondrej Vasik <ovasik@redhat.com> - 6.9-15
- rebuild / unspotted 6.9-14 build failure on ppc64
* Tue Mar 4 2008 Ondrej Vasik <ovasik@redhat.com> - 6.9-14
- fixed missing doublequotes in colorls.csh (#435789)
- su-l/runuser-l pam file usage a bit documented(#368721)
* Tue Feb 19 2008 Ondrej Vasik <ovasik@redhat.com> - 6.9-13
- added several missing colored TERMS(#239266)
- added several missing image/compressed file extensions
- some optimalizations of colorls.sh
(#430813, #430827, #430823, #430189, #433190)
- fix unability of echo to display certain strings(
added -- separator, #431005) , do not require only one
long_opt for certain commands like sleep, yes - but
use first usable (#431005)
- keep old csh/sh usermodified colorls shell scripts
(#432154)
* Wed Dec 05 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-12
- fix displaying of security context in stat(#411181)
* Thu Nov 29 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-11
- completed fix of wrong colored broken symlinks in ls(#404511)
* Fri Nov 23 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-10
- fixed bug in handling YYYYMMDD date format with relative
signed offset(#377821)
- fixed bug in selinux patch which caused bad preserving
of security context in install(#319231)
- added some upstream supported dircolors TERMs(#239266)
- fixed du output for unaccesible dirs(#250089)
- a bit of upstream tunning for symlinks
* Tue Oct 30 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-9
- applied upstream patch for runuser to coreutils-selinux.patch(#232652)
- modified coreutils-i18n.patch because of sort -R in
a non C locales(fix by Andreas Schwab) (#249315)
- allow cp -a to rewrite file on different filesystem(#219900)
(based on upstream patch)
- License tag to GPLv2+
* Thu Oct 25 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-8
- applied upstream patch for cp and mv(#248591)
* Thu Aug 23 2007 Pete Graner <pgraner@redhat.com> - 6.9-7
- Fix typo in spec file. (CVS merge conflict leftovers)