From c4b1fe4c8a42d9f2b8862f767f84047ec2cb70d5 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Tue, 24 Feb 2009 11:53:38 +0000 Subject: [PATCH] New upstream release 7.1, removed applied patches, amended patches and LS_COLORS files --- .cvsignore | 2 +- coreutils-446294-lsexitstatuses.patch | 83 -- coreutils-463883-chcon-changes.patch | 46 - coreutils-5.2.1-runuser.patch | 8 +- coreutils-6.10-configuration.patch | 19 - coreutils-6.10-longoptions.patch | 13 - coreutils-6.10-manpages.patch | 12 - coreutils-6.11-sparc-shafix.patch | 22 - coreutils-7.0-cp-mv-n.patch | 322 ------ coreutils-7.0-dftotal.patch | 115 -- coreutils-7.0-expr-removebignumoptions.patch | 1012 ------------------ coreutils-7.0-xattr.patch | 792 -------------- coreutils-DIR_COLORS | 61 +- coreutils-DIR_COLORS.256color | 55 +- coreutils-DIR_COLORS.xterm | 35 +- coreutils-i18n.patch | 11 +- coreutils-pam.patch | 8 +- coreutils-selinux.patch | 284 ++--- coreutils-selinuxmanpages.patch | 33 - coreutils.spec | 36 +- sources | 2 +- 21 files changed, 205 insertions(+), 2766 deletions(-) delete mode 100644 coreutils-446294-lsexitstatuses.patch delete mode 100644 coreutils-463883-chcon-changes.patch delete mode 100644 coreutils-6.10-longoptions.patch delete mode 100644 coreutils-6.11-sparc-shafix.patch delete mode 100644 coreutils-7.0-cp-mv-n.patch delete mode 100644 coreutils-7.0-dftotal.patch delete mode 100644 coreutils-7.0-expr-removebignumoptions.patch delete mode 100644 coreutils-7.0-xattr.patch diff --git a/.cvsignore b/.cvsignore index 57a1758..d2049a4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -coreutils-7.0.tar.lzma +coreutils-7.1.tar.gz diff --git a/coreutils-446294-lsexitstatuses.patch b/coreutils-446294-lsexitstatuses.patch deleted file mode 100644 index 50b692c..0000000 --- a/coreutils-446294-lsexitstatuses.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 50654566c77d1335870206f657507a2d1c23f628 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= 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 . ---- - 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 diff --git a/coreutils-463883-chcon-changes.patch b/coreutils-463883-chcon-changes.patch deleted file mode 100644 index b1cf9f5..0000000 --- a/coreutils-463883-chcon-changes.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urNp coreutils-6.12-orig/src/chcon.c coreutils-6.12/src/chcon.c ---- coreutils-6.12-orig/src/chcon.c 2008-10-08 14:45:59.000000000 +0200 -+++ coreutils-6.12/src/chcon.c 2008-10-08 16:28:36.000000000 +0200 -@@ -35,25 +35,6 @@ - proper_name ("Russell Coker"), \ - proper_name ("Jim Meyering") - --enum Change_status --{ -- CH_NOT_APPLIED, -- CH_SUCCEEDED, -- CH_FAILED, -- CH_NO_CHANGE_REQUESTED --}; -- --enum Verbosity --{ -- /* Print a message for each file that is processed. */ -- V_high, -- -- /* Print a message for each file whose attributes we change. */ -- V_changes_only, -- -- /* Do not be verbose. This is the default. */ -- V_off --}; - - /* If nonzero, and the systems has support for it, change the context - of symbolic links rather than any files they point to. */ -@@ -374,7 +355,6 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\ - Change the SELinux security context of each FILE to CONTEXT.\n\ - With --reference, change the security context of each FILE to that of RFILE.\n\ - \n\ -- -c, --changes like verbose but report only when a change is made\n\ - -h, --no-dereference affect symbolic links instead of any referenced file\n\ - "), stdout); - fputs (_("\ -@@ -435,7 +415,7 @@ main (int argc, char **argv) - - atexit (close_stdout); - -- while ((optc = getopt_long (argc, argv, "HLPRchvu:r:t:l:", long_options, NULL)) -+ while ((optc = getopt_long (argc, argv, "HLPRhvu:r:t:l:", long_options, NULL)) - != -1) - { - switch (optc) diff --git a/coreutils-5.2.1-runuser.patch b/coreutils-5.2.1-runuser.patch index 2e74d74..6ff3085 100644 --- a/coreutils-5.2.1-runuser.patch +++ b/coreutils-5.2.1-runuser.patch @@ -107,15 +107,15 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c # include @@ -149,6 +155,10 @@ #ifndef USE_PAM - char *crypt (); + char *crypt (char const *key, char const *salt); #endif +#ifndef CHECKPASSWD +#define CHECKPASSWD 1 +#endif + - char *getusershell (); - void endusershell (); - void setusershell (); + char *getusershell (void); + void endusershell (void); + void setusershell (void); @@ -156,7 +166,11 @@ void setusershell (); extern char **environ; diff --git a/coreutils-6.10-configuration.patch b/coreutils-6.10-configuration.patch index 97a7438..0818bd2 100644 --- a/coreutils-6.10-configuration.patch +++ b/coreutils-6.10-configuration.patch @@ -1,22 +1,3 @@ -diff -urNp coreutils-7.0-orig/tests/Makefile.am coreutils-7.0/tests/Makefile.am ---- coreutils-7.0-orig/tests/Makefile.am 2008-11-11 16:37:08.000000000 +0100 -+++ coreutils-7.0/tests/Makefile.am 2008-11-11 16:39:55.000000000 +0100 -@@ -217,7 +217,6 @@ TESTS = \ - misc/tee-dash \ - misc/test-diag \ - misc/timeout \ -- misc/timeout-parameters \ - misc/tr \ - misc/truncate-dangling-symlink \ - misc/truncate-dir-fail \ -@@ -285,7 +284,6 @@ TESTS = \ - dd/skip-seek \ - dd/skip-seek2 \ - dd/unblock-sync \ -- df/total \ - df/total-awk \ - du/2g \ - du/8gb \ diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut --- coreutils-6.12-orig/tests/misc/cut 2008-05-17 08:41:11.000000000 +0200 +++ coreutils-6.12/tests/misc/cut 2008-06-02 11:13:08.000000000 +0200 diff --git a/coreutils-6.10-longoptions.patch b/coreutils-6.10-longoptions.patch deleted file mode 100644 index ed5a2db..0000000 --- a/coreutils-6.10-longoptions.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urp coreutils-6.10-orig/lib/long-options.c coreutils-6.10/lib/long-options.c ---- coreutils-6.10-orig/lib/long-options.c 2007-10-17 15:47:26.000000000 +0200 -+++ coreutils-6.10/lib/long-options.c 2008-01-31 14:28:01.000000000 +0100 -@@ -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) - { diff --git a/coreutils-6.10-manpages.patch b/coreutils-6.10-manpages.patch index 066114e..792ce42 100644 --- a/coreutils-6.10-manpages.patch +++ b/coreutils-6.10-manpages.patch @@ -11,15 +11,3 @@ diff -urNp coreutils-6.12-orig/src/md5sum.c coreutils-6.12/src/md5sum.c fputs (_("\ \n\ The following three options are useful only when verifying checksums:\n\ -diff -urNp coreutils-6.12-orig/src/sort.c coreutils-6.12/src/sort.c ---- coreutils-6.12-orig/src/sort.c 2008-10-21 16:04:50.000000000 +0200 -+++ coreutils-6.12/src/sort.c 2008-10-22 10:52:30.000000000 +0200 -@@ -412,7 +413,7 @@ With no FILE, or when FILE is -, read st - \n\ - *** WARNING ***\n\ - The locale specified by the environment affects sort order.\n\ --Set LC_ALL=C to get the traditional sort order that uses\n\ -+Set LC_ALL=C (by \"export LC_LL=C\") to get the traditional sort order that uses\n\ - native byte values.\n\ - "), stdout ); - emit_bug_reporting_address (); diff --git a/coreutils-6.11-sparc-shafix.patch b/coreutils-6.11-sparc-shafix.patch deleted file mode 100644 index e24b48b..0000000 --- a/coreutils-6.11-sparc-shafix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up coreutils-6.11/src/Makefile.am.sparc coreutils-6.11/src/Makefile.am ---- coreutils-6.11/src/Makefile.am.sparc 2008-04-19 16:34:23.000000000 -0500 -+++ coreutils-6.11/src/Makefile.am 2008-05-29 18:40:36.000000000 -0500 -@@ -101,6 +101,7 @@ shred_LDADD = $(LDADD) $(LIB_GETHRXTIME) - shuf_LDADD = $(LDADD) $(LIB_GETHRXTIME) - tac_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) - vdir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_SELINUX) $(LIB_CAP) -+tac_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) - - ## If necessary, add -lm to resolve use of pow in lib/strtod.c. - sort_LDADD = $(LDADD) $(POW_LIB) $(LIB_GETHRXTIME) -diff -up coreutils-6.11/src/Makefile.in.sparc coreutils-6.11/src/Makefile.in ---- coreutils-6.11/src/Makefile.in.sparc 2008-04-19 16:50:10.000000000 -0500 -+++ coreutils-6.11/src/Makefile.in 2008-05-29 18:40:36.000000000 -0500 -@@ -1251,6 +1251,7 @@ shuf_LDADD = $(LDADD) $(LIB_GETHRXTIME) - vdir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_SELINUX) $(LIB_CAP) \ - $(LIB_ACL) - sort_LDADD = $(LDADD) $(POW_LIB) $(LIB_GETHRXTIME) -+tac_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) - - # for get_date and gettime - date_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) diff --git a/coreutils-7.0-cp-mv-n.patch b/coreutils-7.0-cp-mv-n.patch deleted file mode 100644 index c245b0f..0000000 --- a/coreutils-7.0-cp-mv-n.patch +++ /dev/null @@ -1,322 +0,0 @@ -diff -ruNp coreutils-7.0.orig/doc/coreutils.texi coreutils-7.0/doc/coreutils.texi ---- coreutils-7.0.orig/doc/coreutils.texi 2009-01-28 15:28:14.724301000 +0100 -+++ coreutils-7.0/doc/coreutils.texi 2009-01-28 16:42:36.319138655 +0100 -@@ -7295,6 +7295,9 @@ description of @option{--remove-destinat - This option is independent of the @option{--interactive} or - @option{-i} option: neither cancels the effect of the other. - -+This option is redundant if the @option{--no-clobber} or @option{-n} option is -+used. -+ - @item -H - @opindex -H - If a command line argument specifies a symbolic link, then copy the -@@ -7307,7 +7310,8 @@ via recursive traversal. - @opindex -i - @opindex --interactive - When copying a file other than a directory, prompt whether to --overwrite an existing destination file. -+overwrite an existing destination file. The @option{-i} option overrides -+a previous @option{-n} option. - - @item -l - @itemx --link -@@ -7321,6 +7325,14 @@ Make hard links instead of copies of non - @opindex --dereference - Follow symbolic links when copying from them. - -+@item -n -+@itemx --no-clobber -+@opindex -n -+@opindex --no-clobber -+Do not overwrite an existing file. The @option{-n} option overrides a previous -+@option{-i} option. This option is mutually exclusive with @option{-b} or -+@option{--backup} option. -+ - @item -P - @itemx --no-dereference - @opindex -P -@@ -8076,6 +8088,11 @@ The program accepts the following option - @opindex --force - @cindex prompts, omitting - Do not prompt the user before removing a destination file. -+@macro mvOptsIfn -+If you specify more than one of the @option{-i}, @option{-f}, @option{-n} -+options, only the final one takes effect. -+@end macro -+@mvOptsIfn - - @item -i - @itemx --interactive -@@ -8085,6 +8102,16 @@ Do not prompt the user before removing a - Prompt whether to overwrite each existing destination file, regardless - of its permissions. - If the response is not affirmative, the file is skipped. -+@mvOptsIfn -+ -+@item -n -+@itemx --no-clobber -+@opindex -n -+@opindex --no-clobber -+@cindex prompts, omitting -+Do not overwrite an existing file. -+@mvOptsIfn -+This option is mutually exclusive with @option{-b} or @option{--backup} option. - - @itemx @w{@kbd{--reply}=@var{how}} - @opindex --reply -diff -ruNp coreutils-7.0.orig/src/cp.c coreutils-7.0/src/cp.c ---- coreutils-7.0.orig/src/cp.c 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/src/cp.c 2009-01-28 16:43:08.501394935 +0100 -@@ -1,5 +1,5 @@ - /* cp.c -- file copying (main routines) -- Copyright (C) 89, 90, 91, 1995-2008 Free Software Foundation, Inc. -+ Copyright (C) 89, 90, 91, 1995-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 -@@ -129,6 +129,7 @@ static struct option const long_opts[] = - {"force", no_argument, NULL, 'f'}, - {"interactive", no_argument, NULL, 'i'}, - {"link", no_argument, NULL, 'l'}, -+ {"no-clobber", no_argument, NULL, 'n'}, - {"no-dereference", no_argument, NULL, 'P'}, - {"no-preserve", required_argument, NULL, NO_PRESERVE_ATTRIBUTES_OPTION}, - {"no-target-directory", no_argument, NULL, 'T'}, -@@ -182,8 +183,10 @@ Mandatory arguments to long options are - "), stdout); - fputs (_("\ - -f, --force if an existing destination file cannot be\n\ -- opened, remove it and try again\n\ -- -i, --interactive prompt before overwrite\n\ -+ opened, remove it and try again (redundant if\n\ -+ the -n option is used)\n\ -+ -i, --interactive prompt before overwrite (overrides a previous -n\n\ -+ option)\n\ - -H follow command-line symbolic links in SOURCE\n\ - "), stdout); - fputs (_("\ -@@ -191,6 +194,8 @@ Mandatory arguments to long options are - -L, --dereference always follow symbolic links in SOURCE\n\ - "), stdout); - fputs (_("\ -+ -n, --no-clobber do not overwrite an existing file (overrides\n\ -+ a previous -i option)\n\ - -P, --no-dereference never follow symbolic links in SOURCE\n\ - "), stdout); - fputs (_("\ -@@ -909,7 +914,7 @@ main (int argc, char **argv) - we'll actually use backup_suffix_string. */ - backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); - -- while ((c = getopt_long (argc, argv, "abdfHilLprst:uvxPRS:T", -+ while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:T", - long_opts, NULL)) - != -1) - { -@@ -965,6 +970,10 @@ main (int argc, char **argv) - x.dereference = DEREF_ALWAYS; - break; - -+ case 'n': -+ x.interactive = I_ALWAYS_NO; -+ break; -+ - case 'P': - x.dereference = DEREF_NEVER; - break; -@@ -1072,6 +1081,13 @@ main (int argc, char **argv) - usage (EXIT_FAILURE); - } - -+ if (make_backups && x.interactive == I_ALWAYS_NO) -+ { -+ error (0, 0, -+ _("options --backup and --no-clobber are mutually exclusive")); -+ usage (EXIT_FAILURE); -+ } -+ - if (backup_suffix_string) - simple_backup_suffix = xstrdup (backup_suffix_string); - -diff -ruNp coreutils-7.0.orig/src/mv.c coreutils-7.0/src/mv.c ---- coreutils-7.0.orig/src/mv.c 2008-08-24 22:30:10.000000000 +0200 -+++ coreutils-7.0/src/mv.c 2009-01-28 16:42:36.906143329 +0100 -@@ -1,5 +1,5 @@ - /* mv -- move or rename files -- Copyright (C) 86, 89, 90, 91, 1995-2008 Free Software Foundation, Inc. -+ Copyright (C) 86, 89, 90, 91, 1995-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 -@@ -76,6 +76,7 @@ static struct option const long_options[ - {"backup", optional_argument, NULL, 'b'}, - {"force", no_argument, NULL, 'f'}, - {"interactive", no_argument, NULL, 'i'}, -+ {"no-clobber", no_argument, NULL, 'n'}, - {"no-target-directory", no_argument, NULL, 'T'}, - {"reply", required_argument, NULL, REPLY_OPTION}, /* Deprecated 2005-07-03, - remove in 2008. */ -@@ -312,6 +313,8 @@ Mandatory arguments to long options are - -b like --backup but does not accept an argument\n\ - -f, --force do not prompt before overwriting\n\ - -i, --interactive prompt before overwrite\n\ -+ -n, --no-clobber do not overwrite an existing file\n\ -+If you specify more than one of -i, -f, -n, only the final one takes effect.\n\ - "), stdout); - fputs (_("\ - --strip-trailing-slashes remove any trailing slashes from each SOURCE\n\ -@@ -374,7 +377,7 @@ main (int argc, char **argv) - we'll actually use backup_suffix_string. */ - backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); - -- while ((c = getopt_long (argc, argv, "bfit:uvS:T", long_options, NULL)) -+ while ((c = getopt_long (argc, argv, "bfint:uvS:T", long_options, NULL)) - != -1) - { - switch (c) -@@ -396,6 +399,9 @@ main (int argc, char **argv) - error (0, 0, - _("the --reply option is deprecated; use -i or -f instead")); - break; -+ case 'n': -+ x.interactive = I_ALWAYS_NO; -+ break; - case STRIP_TRAILING_SLASHES_OPTION: - remove_trailing_slashes = true; - break; -@@ -468,6 +474,13 @@ main (int argc, char **argv) - quote (file[n_files - 1])); - } - -+ if (make_backups && x.interactive == I_ALWAYS_NO) -+ { -+ error (0, 0, -+ _("options --backup and --no-clobber are mutually exclusive")); -+ usage (EXIT_FAILURE); -+ } -+ - if (backup_suffix_string) - simple_backup_suffix = xstrdup (backup_suffix_string); - -diff -ruNp coreutils-7.0.orig/tests/cp/cp-i coreutils-7.0/tests/cp/cp-i ---- coreutils-7.0.orig/tests/cp/cp-i 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/tests/cp/cp-i 2009-01-28 16:42:37.092144811 +0100 -@@ -31,4 +31,40 @@ fail=0 - # coreutils 6.2 cp would neglect to prompt in this case. - echo n | cp -iR a b 2>/dev/null || fail=1 - -+# test miscellaneous combinations of -f -i -n parameters -+touch c d || framework_failure -+echo "\`c' -> \`d'" > out_copy -+> out_empty -+ -+# ask for overwrite, answer no -+echo n | cp -vi c d 2>/dev/null > out1 || fail=1 -+compare out1 out_empty || fail=1 -+ -+# ask for overwrite, answer yes -+echo y | cp -vi c d 2>/dev/null > out2 || fail=1 -+compare out2 out_copy || fail=1 -+ -+# -i wins over -n -+echo y | cp -vni c d 2>/dev/null > out3 || fail=1 -+compare out3 out_copy || fail=1 -+ -+# -n wins over -i -+echo y | cp -vin c d 2>/dev/null > out4 || fail=1 -+compare out4 out_empty || fail=1 -+ -+# ask for overwrite, answer yes -+echo y | cp -vfi c d 2>/dev/null > out5 || fail=1 -+compare out5 out_copy || fail=1 -+ -+# do not ask, prevent from overwrite -+echo n | cp -vfn c d 2>/dev/null > out6 || fail=1 -+compare out6 out_empty || fail=1 -+ -+# do not ask, prevent from overwrite -+echo n | cp -vnf c d 2>/dev/null > out7 || fail=1 -+compare out7 out_empty || fail=1 -+ -+# options --backup and --no-clobber are mutually exclusive -+cp -bn c d 2>/dev/null && fail=1 -+ - Exit $fail -diff -ruNp coreutils-7.0.orig/tests/Makefile.am coreutils-7.0/tests/Makefile.am ---- coreutils-7.0.orig/tests/Makefile.am 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/tests/Makefile.am 2009-01-28 16:42:37.596148824 +0100 -@@ -374,6 +374,7 @@ TESTS = \ - mv/into-self-3 \ - mv/into-self-4 \ - mv/leak-fd \ -+ mv/mv-n \ - mv/mv-special-1 \ - mv/no-target-dir \ - mv/part-fail \ -diff -ruNp coreutils-7.0.orig/tests/mv/mv-n coreutils-7.0/tests/mv/mv-n ---- coreutils-7.0.orig/tests/mv/mv-n 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/tests/mv/mv-n 2009-01-28 16:42:37.596148824 +0100 -@@ -0,0 +1,62 @@ -+#!/bin/sh -+# Test whether mv -n works as documented (not overwrite target). -+ -+# Copyright (C) 2006-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 . -+ -+if test "$VERBOSE" = yes; then -+ set -x -+ mv --version -+fi -+ -+. $srcdir/test-lib.sh -+ -+fail=0 -+ -+# test miscellaneous combinations of -f -i -n parameters -+touch a b || framework_failure -+echo "\`a' -> \`b'" > out_move -+> out_empty -+ -+# ask for overwrite, answer no -+touch a b || framework_failure -+echo n | mv -vi a b 2>/dev/null > out1 || fail=1 -+compare out1 out_empty || fail=1 -+ -+# ask for overwrite, answer yes -+touch a b || framework_failure -+echo y | mv -vi a b 2>/dev/null > out2 || fail=1 -+compare out2 out_move || fail=1 -+ -+# -n wins (as the last option) -+touch a b || framework_failure -+echo y | mv -vin a b 2>/dev/null > out3 || fail=1 -+compare out3 out_empty || fail=1 -+ -+# -n wins (as the last option) -+touch a b || framework_failure -+echo y | mv -vfn a b 2>/dev/null > out4 || fail=1 -+compare out4 out_empty || fail=1 -+ -+# -n wins (as the last option) -+touch a b || framework_failure -+echo y | mv -vifn a b 2>/dev/null > out5 || fail=1 -+compare out5 out_empty || fail=1 -+ -+# options --backup and --no-clobber are mutually exclusive -+touch a || framework_failure -+mv -bn a b 2>/dev/null && fail=1 -+ -+Exit $fail diff --git a/coreutils-7.0-dftotal.patch b/coreutils-7.0-dftotal.patch deleted file mode 100644 index 950dee8..0000000 --- a/coreutils-7.0-dftotal.patch +++ /dev/null @@ -1,115 +0,0 @@ -diff -urNp coreutils-7.0-orig/tests/df/total-awk coreutils-7.0/tests/df/total-awk ---- coreutils-7.0-orig/tests/df/total-awk 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/tests/df/total-awk 2008-11-11 16:54:49.000000000 +0100 -@@ -18,7 +18,7 @@ - - if test "$VERBOSE" = yes; then - set -x -- ls --version -+ df --version - fi - - . $srcdir/test-lib.sh -@@ -24,6 +24,8 @@ - - . $srcdir/test-lib.sh - -+ df || skip_test_ "df fails" -+ - fail=0 - - # Don't let a different umask perturb the results. -@@ -23,58 +25,44 @@ fi - - . $srcdir/test-lib.sh - --fail=0 -- --# Don't let a different umask perturb the results. --umask 22 -- --echo ' --BEGIN { -- total = 0 -- used = 0 -- available = 0 --} --{ -- if (NR==1 || $0==$1 || $0~/^total +(-?[0-9]+|-) +(-?[0-9]+|-) +(-?[0-9]+|-) +-?[0-9]+%$/) -- next -- if ($1~/^[0-9]/) -- { -- total += $1 -- used += $2 -- available += $3 -- } -- else -- { -- total += $2 -- used += $3 -- available += $4 -- } --} --END { -- print total -- print used -- print available --} --' > compute_sum.awk || fail=1 -- --echo ' --/^total +(-?[0-9]+|-) +(-?[0-9]+|-) +(-?[0-9]+|-) +-?[0-9]+%$/ { -- print $2; -- print $3; -- print $4 --} --' > parse_total.awk || fail=1 -+cat <<\EOF > check-df || framework_failure -+my ($total, $used, $avail) = (0, 0, 0); -+while (<>) -+ { -+ $. == 1 -+ and next; # skip first (header) line -+ # Recognize df output lines like these: -+ # /dev/sdc1 0 0 0 - /c -+ # tmpfs 1536000 12965 1523035 1% /tmp -+ # total 5285932 787409 4498523 15% -+ /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:- |[0-9]+%)(.*)$/ -+ or die "$0: invalid input line\n: $_"; -+ if ($1 eq 'total' && $5 eq '') -+ { -+ $total == $2 or die "$total != $2"; -+ $used == $3 or die "$used != $3"; -+ $avail == $4 or die "$avail != $4"; -+ my $line = <>; -+ defined $line -+ and die "$0: extra line(s) after totals\n"; -+ exit 0; -+ } -+ $total += $2 unless $2 eq '-'; -+ $used += $3 unless $3 eq '-'; -+ $avail += $4 unless $4 eq '-'; -+ } -+die "$0: missing line of totals\n"; -+EOF - - # Use --block-size=512 to keep df from printing rounded-to-kilobyte - # numbers which wouldn't necessarily add up to the displayed total. --df --block-size=512 --total |tee tmp || fail=1 --$AWK -f compute_sum.awk tmp > out1 || fail=1 --$AWK -f parse_total.awk tmp > out2 || fail=1 --compare out1 out2 || fail=1 -+fail=0 -+df --total -P --block-size=512 >space || fail=1 -+cat space # this helps when debugging any test failure -+df --total -i -P >inode || fail=1 -+cat inode - --df -i --block-size=512 --total |tee tmp || fail=1 --$AWK -f compute_sum.awk tmp > out1 || fail=1 --$AWK -f parse_total.awk tmp > out2 || fail=1 --compare out1 out2 || fail=1 -+$PERL -f check-df space || fail=1 -+$PERL -f check-df inode || fail=1 - - Exit $fail diff --git a/coreutils-7.0-expr-removebignumoptions.patch b/coreutils-7.0-expr-removebignumoptions.patch deleted file mode 100644 index 8916b47..0000000 --- a/coreutils-7.0-expr-removebignumoptions.patch +++ /dev/null @@ -1,1012 +0,0 @@ -diff -urNp coreutils-7.0-orig/doc/coreutils.texi coreutils-7.0/doc/coreutils.texi ---- coreutils-7.0-orig/doc/coreutils.texi 2008-12-03 23:57:52.000000000 +0100 -+++ coreutils-7.0/doc/coreutils.texi 2008-12-04 00:00:51.000000000 +0100 -@@ -11167,17 +11167,8 @@ types, but if a numeric overflow occurs - with support for the GNU MP library, @command{expr}, it - uses arbitrary-precision arithmetic. - --Apart from @option{--help} and @option{--version} (@pxref{Common --options}), the following options are supported: -- --@table @samp --@item --bignum --Perform arithmetic operations using unlimited precision via the GNU MP library. --@item --no-bignum --Use only limited-precision native operations. --In the event of numeric overflow, @command{expr} fails, --even if GNU MP is available. --@end table -+The only options are @option{--help} and @option{--version}. @xref{Common -+options}. Options must precede operands. - - @cindex exit status of @command{expr} - Exit status: -diff -urNp coreutils-7.0-orig/src/expr.c coreutils-7.0/src/expr.c ---- coreutils-7.0-orig/src/expr.c 2008-08-24 22:58:15.000000000 +0200 -+++ coreutils-7.0/src/expr.c 2008-10-21 15:47:06.000000000 +0200 -@@ -33,20 +33,122 @@ - #include - #include "system.h" - --#include - #include --#if HAVE_GMP --#include --#endif - #include "error.h" -+#include "long-options.h" - #include "quotearg.h" - #include "strnumcmp.h" - #include "xstrtol.h" - -+/* Various parts of this code assume size_t fits into unsigned long -+ int, the widest unsigned type that GMP supports. */ -+verify (SIZE_MAX <= ULONG_MAX); -+ -+static void integer_overflow (char) ATTRIBUTE_NORETURN; -+ -+#ifndef HAVE_GMP -+# define HAVE_GMP 0 -+#endif -+ -+#if HAVE_GMP -+# include -+#else -+/* Approximate gmp.h well enough for expr.c's purposes. */ -+typedef intmax_t mpz_t[1]; -+static void mpz_clear (mpz_t z) {} -+static void mpz_init_set_ui (mpz_t z, unsigned long int i) { z[0] = i; } -+static int -+mpz_init_set_str (mpz_t z, char *s, int base) -+{ -+ return xstrtoimax (s, NULL, base, z, NULL) == LONGINT_OK ? 0 : -1; -+} -+static void -+mpz_add (mpz_t r, mpz_t a0, mpz_t b0) -+{ -+ intmax_t a = a0[0]; -+ intmax_t b = b0[0]; -+ intmax_t val = a + b; -+ if ((val < a) != (b < 0)) -+ integer_overflow ('+'); -+ r[0] = val; -+} -+static void -+mpz_sub (mpz_t r, mpz_t a0, mpz_t b0) -+{ -+ intmax_t a = a0[0]; -+ intmax_t b = b0[0]; -+ intmax_t val = a - b; -+ if ((a < val) != (b < 0)) -+ integer_overflow ('-'); -+ r[0] = val; -+} -+static void -+mpz_mul (mpz_t r, mpz_t a0, mpz_t b0) -+{ -+ intmax_t a = a0[0]; -+ intmax_t b = b0[0]; -+ intmax_t val = a * b; -+ if (! (a == 0 || b == 0 -+ || ((val < 0) == ((a < 0) ^ (b < 0)) && val / a == b))) -+ integer_overflow ('*'); -+ r[0] = val; -+} -+static void -+mpz_tdiv_q (mpz_t r, mpz_t a0, mpz_t b0) -+{ -+ intmax_t a = a0[0]; -+ intmax_t b = b0[0]; -+ -+ /* Some x86-style hosts raise an exception for INT_MIN / -1. */ -+ if (a < - INTMAX_MAX && b == -1) -+ integer_overflow ('/'); -+ r[0] = a / b; -+} -+static void -+mpz_tdiv_r (mpz_t r, mpz_t a0, mpz_t b0) -+{ -+ intmax_t a = a0[0]; -+ intmax_t b = b0[0]; -+ -+ /* Some x86-style hosts raise an exception for INT_MIN % -1. */ -+ r[0] = a < - INTMAX_MAX && b == -1 ? 0 : a % b; -+} -+static char * -+mpz_get_str (char const *str, int base, mpz_t z) -+{ -+ char buf[INT_BUFSIZE_BOUND (intmax_t)]; -+ return xstrdup (imaxtostr (z[0], buf)); -+} -+static int -+mpz_sgn (mpz_t z) -+{ -+ return z[0] < 0 ? -1 : 0 < z[0]; -+} -+static int -+mpz_fits_ulong_p (mpz_t z) -+{ -+ return 0 <= z[0] && z[0] <= ULONG_MAX; -+} -+static unsigned long int -+mpz_get_ui (mpz_t z) -+{ -+ return z[0]; -+} -+static int -+mpz_out_str (FILE *stream, int base, mpz_t z) -+{ -+ char buf[INT_BUFSIZE_BOUND (intmax_t)]; -+ return fputs (imaxtostr (z[0], buf), stream) != EOF; -+} -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "expr" - --#define AUTHORS proper_name ("Mike Parker"), proper_name ("James Youngman") -+#define AUTHORS \ -+ proper_name ("Mike Parker"), \ -+ proper_name ("James Youngman"), \ -+ proper_name ("Paul Eggert") - - /* Exit statuses. */ - enum -@@ -61,14 +163,10 @@ enum - EXPR_FAILURE - }; - --/* The kinds of value we can have. -- In the comments below, a variable is described as "arithmetic" if -- it is either integer or mp_integer. Variables are of type mp_integer -- only if GNU MP is available, but the type designator is always defined. */ -+/* The kinds of value we can have. */ - enum valtype - { - integer, -- mp_integer, - string - }; - typedef enum valtype TYPE; -@@ -79,12 +177,7 @@ struct valinfo - TYPE type; /* Which kind. */ - union - { /* The value itself. */ -- /* We could use intmax_t but that would integrate less well with GMP, -- since GMP has mpz_set_si but no intmax_t equivalent. */ -- signed long int i; --#if HAVE_GMP -- mpz_t z; --#endif -+ mpz_t i; - char *s; - } u; - }; -@@ -98,34 +191,6 @@ static bool nomoreargs (void); - static bool null (VALUE *v); - static void printv (VALUE *v); - --/* Arithmetic is done in one of three modes. -- -- The --bignum option forces all arithmetic to use bignums other than -- string indexing (mode==MP_ALWAYS). The --no-bignum option forces -- all arithmetic to use native types rather than bignums -- (mode==MP_NEVER). -- -- The default mode is MP_AUTO if GMP is available and MP_NEVER if -- not. Most functions will process a bignum if one is found, but -- will not convert a native integer to a string if the mode is -- MP_NEVER. */ --enum arithmetic_mode -- { -- MP_NEVER, /* Never use bignums */ --#if HAVE_GMP -- MP_ALWAYS, /* Always use bignums. */ -- MP_AUTO, /* Switch if result would otherwise overflow */ --#endif -- }; --static enum arithmetic_mode mode = --#if HAVE_GMP -- MP_AUTO --#else -- MP_NEVER --#endif -- ; -- -- - void - usage (int status) - { -@@ -140,10 +205,6 @@ Usage: %s EXPRESSION\n\ - "), - program_name, program_name); - putchar ('\n'); -- fputs (_("\ -- --bignum always use arbitrary-precision arithmetic\n\ -- --no-bignum always use single-precision arithmetic\n"), -- stdout); - fputs (HELP_OPTION_DESCRIPTION, stdout); - fputs (VERSION_OPTION_DESCRIPTION, stdout); - fputs (_("\ -@@ -220,47 +281,23 @@ syntax_error (void) - static void - integer_overflow (char op) - { -- error (EXPR_FAILURE, 0, -- _("arithmetic operation %c produced an out of range value, " -- "but arbitrary-precision arithmetic is not available"), op); -+ error (EXPR_FAILURE, ERANGE, "%c", op); -+ abort (); /* notreached */ - } - --static void die (int exit_status, int errno_val, char const *msg) -+static void die (int errno_val, char const *msg) - ATTRIBUTE_NORETURN; - static void --die (int exit_status, int errno_val, char const *msg) -+die (int errno_val, char const *msg) - { -- assert (exit_status != 0); -- error (exit_status, errno_val, "%s", msg); -+ error (EXPR_FAILURE, errno_val, "%s", msg); - abort (); /* notreached */ - } - --static void --string_too_long (void) --{ -- die (EXPR_FAILURE, ERANGE, _("string too long")); --} -- --enum --{ -- USE_BIGNUM = CHAR_MAX + 1, -- NO_USE_BIGNUM --}; -- --static struct option const long_options[] = --{ -- {"bignum", no_argument, NULL, USE_BIGNUM}, -- {"no-bignum", no_argument, NULL, NO_USE_BIGNUM}, -- {GETOPT_HELP_OPTION_DECL}, -- {GETOPT_VERSION_OPTION_DECL}, -- {NULL, 0, NULL, 0} --}; -- - int - main (int argc, char **argv) - { - VALUE *v; -- int c; - - initialize_main (&argc, &argv); - set_program_name (argv[0]); -@@ -271,49 +308,23 @@ main (int argc, char **argv) - initialize_exit_failure (EXPR_FAILURE); - atexit (close_stdout); - -- /* The argument -0 should not result in an error message. */ -- opterr = 0; -- -- while ((c = getopt_long (argc, argv, "+", long_options, NULL)) != -1) -+ parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, VERSION, -+ usage, AUTHORS, (char const *) NULL); -+ /* The above handles --help and --version. -+ Since there is no other invocation of getopt, handle `--' here. */ -+ if (argc > 1 && STREQ (argv[1], "--")) - { -- /* "expr -0" should interpret the -0 as an integer argument. -- arguments like --foo should also be interpreted as a string -- argument to be "evaluated". -- */ -- if ('?' == c) -- { -- --optind; -- break; -- } -- else -- switch (c) -- { -- case USE_BIGNUM: --#if HAVE_GMP -- mode = MP_ALWAYS; --#else -- error (EXPR_FAILURE, 0, -- _("arbitrary-precision support is not available")); --#endif -- break; -- -- case NO_USE_BIGNUM: -- mode = MP_NEVER; -- break; -- -- case_GETOPT_HELP_CHAR; -- -- case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); -- } -+ --argc; -+ ++argv; - } - -- if (argc <= optind) -+ if (argc <= 1) - { - error (0, 0, _("missing operand")); - usage (EXPR_INVALID); - } - -- args = argv + optind; -+ args = argv + 1; - - v = eval (true); - if (!nomoreargs ()) -@@ -326,21 +337,11 @@ main (int argc, char **argv) - /* Return a VALUE for I. */ - - static VALUE * --int_value (long int i) -+int_value (unsigned long int i) - { - VALUE *v = xmalloc (sizeof *v); --#if HAVE_GMP -- if (mode == MP_ALWAYS) -- { -- /* all integer values are handled as bignums. */ -- mpz_init_set_si (v->u.z, i); -- v->type = mp_integer; -- return v; -- } --#endif -- - v->type = integer; -- v->u.i = i; -+ mpz_init_set_ui (v->u.i, i); - return v; - } - -@@ -355,42 +356,15 @@ str_value (char const *s) - return v; - } - -- --static VALUE * --substr_value (char const *s, size_t len, size_t pos, size_t nchars_wanted) --{ -- if (pos >= len) -- return str_value (""); -- else -- { -- VALUE *v = xmalloc (sizeof *v); -- size_t vlen = MIN (nchars_wanted, len - pos + 1); -- char *vlim; -- v->type = string; -- v->u.s = xmalloc (vlen + 1); -- vlim = mempcpy (v->u.s, s + pos, vlen); -- *vlim = '\0'; -- return v; -- } --} -- -- - /* Free VALUE V, including structure components. */ - - static void - freev (VALUE *v) - { - if (v->type == string) -- { -- free (v->u.s); -- } -- else if (v->type == mp_integer) -- { -- assert (mode != MP_NEVER); --#if HAVE_GMP -- mpz_clear (v->u.z); --#endif -- } -+ free (v->u.s); -+ else -+ mpz_clear (v->u.i); - free (v); - } - -@@ -402,21 +376,15 @@ printv (VALUE *v) - switch (v->type) - { - case integer: -- printf ("%ld\n", v->u.i); -+ mpz_out_str (stdout, 10, v->u.i); -+ putchar ('\n'); - break; - case string: - puts (v->u.s); - break; --#if HAVE_GMP -- case mp_integer: -- mpz_out_str (stdout, 10, v->u.z); -- putchar ('\n'); -- break; --#endif - default: - abort (); - } -- - } - - /* Return true if V is a null-string or zero-number. */ -@@ -427,11 +395,7 @@ null (VALUE *v) - switch (v->type) - { - case integer: -- return v->u.i == 0; --#if HAVE_GMP -- case mp_integer: -- return mpz_sgn (v->u.z) == 0; --#endif -+ return mpz_sgn (v->u.i) == 0; - case string: - { - char const *cp = v->u.s; -@@ -474,29 +438,16 @@ looks_like_integer (char const *cp) - static void - tostring (VALUE *v) - { -- char buf[INT_BUFSIZE_BOUND (long int)]; -- - switch (v->type) - { - case integer: -- snprintf (buf, sizeof buf, "%ld", v->u.i); -- v->u.s = xstrdup (buf); -- v->type = string; -- break; --#if HAVE_GMP -- case mp_integer: - { -- char *s = mpz_get_str (NULL, 10, v->u.z); -- if (!s) -- { -- xalloc_die (); -- } -- mpz_clear (v->u.z); -+ char *s = mpz_get_str (NULL, 10, v->u.i); -+ mpz_clear (v->u.i); - v->u.s = s; - v->type = string; - } - break; --#endif - case string: - break; - default: -@@ -504,8 +455,7 @@ tostring (VALUE *v) - } - } - --/* Coerce V to an arithmetic value. -- Return true on success, false on failure. */ -+/* Coerce V to an integer value. Return true on success, false on failure. */ - - static bool - toarith (VALUE *v) -@@ -513,40 +463,17 @@ toarith (VALUE *v) - switch (v->type) - { - case integer: -- case mp_integer: - return true; -- - case string: - { -- long int value; -+ char *s = v->u.s; - -- if (! looks_like_integer (v->u.s)) -+ if (! looks_like_integer (s)) - return false; -- if (xstrtol (v->u.s, NULL, 10, &value, NULL) != LONGINT_OK) -- { --#if HAVE_GMP -- if (mode != MP_NEVER) -- { -- char *s = v->u.s; -- if (mpz_init_set_str (v->u.z, s, 10)) -- abort (); /* Bug in looks_like_integer, perhaps. */ -- v->type = mp_integer; -- free (s); -- } -- else -- { -- error (EXPR_FAILURE, ERANGE, "%s", v->u.s); -- } --#else -- error (EXPR_FAILURE, ERANGE, "%s", v->u.s); --#endif -- } -- else -- { -- free (v->u.s); -- v->u.i = value; -- v->type = integer; -- } -+ if (mpz_init_set_str (v->u.i, s, 10) != 0 && !HAVE_GMP) -+ error (EXPR_FAILURE, ERANGE, "%s", s); -+ free (s); -+ v->type = integer; - return true; - } - default: -@@ -554,58 +481,23 @@ toarith (VALUE *v) - } - } - --/* Extract a size_t value from a positive arithmetic value, V. -- The extracted value is stored in *VAL. */ --static bool --getsize (const VALUE *v, size_t *val, bool *negative) --{ -- if (v->type == integer) -- { -- if (v->u.i < 0) -- { -- *negative = true; -- return false; -- } -- else -- { -- *negative = false; -- *val = v->u.i; -- return true; -- } -- } -- else if (v->type == mp_integer) -- { --#if HAVE_GMP -- if (mpz_sgn (v->u.z) < 0) -- { -- *negative = true; -- return false; -- } -- else if (mpz_fits_ulong_p (v->u.z)) -- { -- unsigned long ul; -- ul = mpz_get_ui (v->u.z); -- *val = ul; -- return true; -- } -- else -- { -- *negative = false; -- return false; -- } --#else -- abort (); --#endif -- -- } -- else -- { -- abort (); /* should not pass a string. */ -+/* Extract a size_t value from a integer value I. -+ If the value is negative, return SIZE_MAX. -+ If the value is too large, return SIZE_MAX - 1. */ -+static size_t -+getsize (mpz_t i) -+{ -+ if (mpz_sgn (i) < 0) -+ return SIZE_MAX; -+ if (mpz_fits_ulong_p (i)) -+ { -+ unsigned long int ul = mpz_get_ui (i); -+ if (ul < SIZE_MAX) -+ return ul; - } -+ return SIZE_MAX - 1; - } - -- -- - /* Return true and advance if the next token matches STR exactly. - STR must not be NULL. */ - -@@ -784,41 +676,14 @@ eval6 (bool evaluate) - } - else if (nextarg ("index")) - { -- size_t pos, len; -+ size_t pos; - - l = eval6 (evaluate); - r = eval6 (evaluate); - tostring (l); - tostring (r); - pos = strcspn (l->u.s, r->u.s); -- len = strlen (l->u.s); -- if (pos == len) -- { -- v = int_value (0); -- } -- else -- { -- if (pos < LONG_MAX) -- { -- v = int_value (pos + 1); -- } -- else -- { --#if HAVE_GMP -- if (mode != MP_NEVER -- && pos < ULONG_MAX) -- { -- v = xmalloc (sizeof *v); -- mpz_init_set_ui (v->u.z, pos+1); -- v->type = mp_integer; -- } -- else --#endif -- { -- string_too_long (); -- } -- } -- } -+ v = int_value (l->u.s[pos] ? pos + 1 : 0); - freev (l); - freev (r); - return v; -@@ -836,25 +701,21 @@ eval6 (bool evaluate) - v = str_value (""); - else - { -- size_t pos, len; -- bool negative = false; -+ size_t pos = getsize (i1->u.i); -+ size_t len = getsize (i2->u.i); - -- if (getsize (i1, &pos, &negative)) -- if (getsize (i2, &len, &negative)) -- if (pos == 0 || len == 0) -- v = str_value (""); -- else -- v = substr_value (l->u.s, llen, pos-1, len); -- else -- if (negative) -- v = str_value (""); -- else -- die (EXPR_FAILURE, ERANGE, _("string offset is too large")); -+ if (llen < pos || pos == 0 || len == 0 || len == SIZE_MAX) -+ v = str_value (""); - else -- if (negative) -- v = str_value (""); -- else -- die (EXPR_FAILURE, ERANGE, _("substring length too large")); -+ { -+ size_t vlen = MIN (len, llen - pos + 1); -+ char *vlim; -+ v = xmalloc (sizeof *v); -+ v->type = string; -+ v->u.s = xmalloc (vlen + 1); -+ vlim = mempcpy (v->u.s, l->u.s + pos - 1, vlen); -+ *vlim = '\0'; -+ } - } - freev (l); - freev (i1); -@@ -897,170 +758,6 @@ eval5 (bool evaluate) - } - } - -- --#if HAVE_GMP --static void --promote (VALUE *x) --{ -- if (x->type == integer) -- mpz_init_set_si (x->u.z, x->u.i); --} --#endif -- --/* L = L * R. Both L and R are arithmetic. */ --static void --domult (VALUE *l, VALUE *r) --{ -- if (l->type == integer && r->type == integer) -- { -- long int val = 0; -- val = l->u.i * r->u.i; -- if (! (l->u.i == 0 || r->u.i == 0 -- || ((val < 0) == ((l->u.i < 0) ^ (r->u.i < 0)) -- && val / l->u.i == r->u.i))) -- { -- /* Result would (did) overflow. Handle with MP if available. */ -- if (mode != MP_NEVER) -- { --#if HAVE_GMP -- mpz_init_set_si (l->u.z, l->u.i); -- mpz_mul_si (l->u.z, l->u.z, r->u.i); /* L*=R */ -- l->type = mp_integer; --#endif -- } -- else -- { -- integer_overflow ('*'); -- } -- } -- else -- { -- l->u.i = val; -- } -- } -- else -- { -- /* At least one operand is already mp_integer, so promote the other. */ --#if HAVE_GMP -- /* We could use mpz_mul_si here if R is not already mp_integer, -- but for the moment we'll try to minimise code paths. */ -- if (l->type == integer) -- mpz_init_set_si (l->u.z, l->u.i); -- if (r->type == integer) -- mpz_init_set_si (r->u.z, r->u.i); -- l->type = r->type = mp_integer; -- mpz_mul (l->u.z, l->u.z, r->u.z); /* L*=R */ --#else -- abort (); --#endif -- } --} -- --/* L = L / R or (if WANT_MODULUS) L = L % R */ --static void --dodivide (VALUE *l, VALUE *r, bool want_modulus) --{ -- if (r->type == integer && r->u.i == 0) -- error (EXPR_INVALID, 0, _("division by zero")); --#if HAVE_GMP -- if (r->type == mp_integer && mpz_sgn (r->u.z) == 0) -- error (EXPR_INVALID, 0, _("division by zero")); --#endif -- if (l->type == integer && r->type == integer) -- { -- if (l->u.i < - INT_MAX && r->u.i == -1) -- { -- /* Some x86-style hosts raise an exception for -- INT_MIN / -1 and INT_MIN % -1, so handle these -- problematic cases specially. */ -- if (want_modulus) -- { -- /* X mod -1 is zero for all negative X. -- Although strictly this is implementation-defined, -- we don't want to coredump, so we avoid the calculation. */ -- l->u.i = 0; -- return; -- } -- else -- { -- if (mode != MP_NEVER) -- { --#if HAVE_GMP -- /* Handle the case by promoting. */ -- mpz_init_set_si (l->u.z, l->u.i); -- l->type = mp_integer; --#endif -- } -- else -- { -- integer_overflow ('/'); -- } -- } -- } -- else -- { -- l->u.i = want_modulus ? l->u.i % r->u.i : l->u.i / r->u.i; -- return; -- } -- } -- /* If we get to here, at least one operand is mp_integer -- and R is not 0. */ --#if HAVE_GMP -- { -- int sign_l, sign_r; -- promote (l); -- promote (r); -- sign_l = mpz_sgn (l->u.z); -- sign_r = mpz_sgn (r->u.z); -- -- if (!want_modulus) -- { -- if (!sign_l) -- { -- mpz_set_si (l->u.z, 0); -- } -- else if (sign_l < 0 || sign_r < 0) -- { -- /* At least one operand is negative. For integer arithmetic, -- it's platform-dependent if the operation rounds up or down. -- We mirror what the implementation does. */ -- switch ((3*sign_l) / (2*sign_r)) -- { -- case 2: /* round toward +inf. */ -- case -1: /* round toward +inf. */ -- mpz_cdiv_q (l->u.z, l->u.z, r->u.z); -- break; -- case -2: /* round toward -inf. */ -- case 1: /* round toward -inf */ -- mpz_fdiv_q (l->u.z, l->u.z, r->u.z); -- break; -- default: -- abort (); -- } -- } -- else -- { -- /* Both operands positive. Round toward -inf. */ -- mpz_fdiv_q (l->u.z, l->u.z, r->u.z); -- } -- } -- else -- { -- mpz_mod (l->u.z, l->u.z, r->u.z); /* L = L % R */ -- -- /* If either operand is negative, it's platform-dependent if -- the remainer is positive or negative. We mirror what the -- implementation does. */ -- if (sign_l % sign_r < 0) -- mpz_neg (l->u.z, l->u.z); /* L = (-L) */ -- } -- } --#else -- abort (); --#endif --} -- -- - /* Handle *, /, % operators. */ - - static VALUE * -@@ -1089,71 +786,17 @@ eval4 (bool evaluate) - { - if (!toarith (l) || !toarith (r)) - error (EXPR_INVALID, 0, _("non-numeric argument")); -- switch (fxn) -- { -- case multiply: -- domult (l, r); -- break; -- case divide: -- case mod: -- dodivide (l, r, fxn==mod); -- break; -- } -+ if (fxn != multiply && mpz_sgn (r->u.i) == 0) -+ error (EXPR_INVALID, 0, _("division by zero")); -+ ((fxn == multiply ? mpz_mul -+ : fxn == divide ? mpz_tdiv_q -+ : mpz_tdiv_r) -+ (l->u.i, l->u.i, r->u.i)); - } - freev (r); - } - } - --/* L = L + R, or L = L - R */ --static void --doadd (VALUE *l, VALUE *r, bool add) --{ -- long int val = 0; -- -- if (!toarith (l) || !toarith (r)) -- error (EXPR_INVALID, 0, _("non-numeric argument")); -- if (l->type == integer && r->type == integer) -- { -- if (add) -- { -- val = l->u.i + r->u.i; -- if ((val < l->u.i) == (r->u.i < 0)) -- { -- l->u.i = val; -- return; -- } -- } -- else -- { -- val = l->u.i - r->u.i; -- if ((l->u.i < val) == (r->u.i < 0)) -- { -- l->u.i = val; -- return; -- } -- } -- } -- /* If we get to here, either the operation overflowed or at least -- one operand is an mp_integer. */ -- if (mode != MP_NEVER) -- { --#if HAVE_GMP -- promote (l); -- promote (r); -- if (add) -- mpz_add (l->u.z, l->u.z, r->u.z); -- else -- mpz_sub (l->u.z, l->u.z, r->u.z); --#endif -- } -- else -- { -- integer_overflow ('-'); -- } --} -- -- -- - /* Handle +, - operators. */ - - static VALUE * -@@ -1161,7 +804,7 @@ eval3 (bool evaluate) - { - VALUE *l; - VALUE *r; -- bool add; -+ enum { plus, minus } fxn; - - #ifdef EVAL_TRACE - trace ("eval3"); -@@ -1170,15 +813,17 @@ eval3 (bool evaluate) - while (1) - { - if (nextarg ("+")) -- add = true; -+ fxn = plus; - else if (nextarg ("-")) -- add = false; -+ fxn = minus; - else - return l; - r = eval4 (evaluate); - if (evaluate) - { -- doadd (l, r, add); -+ if (!toarith (l) || !toarith (r)) -+ error (EXPR_INVALID, 0, _("non-numeric argument")); -+ (fxn == plus ? mpz_add : mpz_sub) (l->u.i, l->u.i, r->u.i); - } - freev (r); - } -diff -urNp coreutils-7.0-orig/tests/misc/expr coreutils-7.0/tests/misc/expr ---- coreutils-7.0-orig/tests/misc/expr 2008-08-24 22:58:15.000000000 +0200 -+++ coreutils-7.0/tests/misc/expr 2008-10-21 15:47:06.000000000 +0200 -@@ -39,6 +39,15 @@ my @Tests = - ['f', '3 + -2', {OUT => '1'}], - ['g', '-2 + -2', {OUT => '-4'}], - -+ # Verify option processing. -+ # Added when option processing broke in the 7.0 beta release -+ ['opt1', '-- -11 + 12', {OUT => '1'}], -+ ['opt2', '-11 + 12', {OUT => '1'}], -+ ['opt3', '-- -1 + 2', {OUT => '1'}], -+ ['opt4', '-1 + 2', {OUT => '1'}], -+ # This evoked a syntax error diagnostic before 2.0.12. -+ ['opt5', '-- 2 + 2', {OUT => '4'}], -+ - ['paren1', '\( 100 % 6 \)', {OUT => '4'}], - ['paren2', '\( 100 % 6 \) - 8', {OUT => '-4'}], - ['paren3', '9 / \( 100 % 6 \) - 8', {OUT => '-6'}], -@@ -59,8 +68,6 @@ my @Tests = - # In 5.1.3 and earlier, this would output the empty string. - ['orempty', '"" \| ""', {OUT => '0'}, {EXIT => 1}], - -- # This evoked a syntax error diagnostic before 2.0.12. -- ['minus2', '-- 2 + 2', {OUT => '4'}], - - # This erroneously succeeded and output `3' before 2.0.12. - ['fail-a', '3 + -', {ERR => "$prog: non-numeric argument\n"}, -@@ -163,8 +170,8 @@ my @Tests = - ['bignum-div', "$big_prod / $big", {OUT => $big_p1}], - ); - --# If using --bignum fails, remove all /^bignum-/ tests --`expr --bignum 1` -+# If using big numbers fails, remove all /^bignum-/ tests -+`expr $big_prod '*' $big_prod '*' $big_prod` - or @Tests = grep {$_->[0] !~ /^bignum-/} @Tests; - - # Append a newline to end of each expected `OUT' string. diff --git a/coreutils-7.0-xattr.patch b/coreutils-7.0-xattr.patch deleted file mode 100644 index a1bd3a8..0000000 --- a/coreutils-7.0-xattr.patch +++ /dev/null @@ -1,792 +0,0 @@ -diff -ruNp coreutils-7.0.orig/doc/coreutils.texi coreutils-7.0/doc/coreutils.texi ---- coreutils-7.0.orig/doc/coreutils.texi 2009-01-28 17:10:24.453415000 +0100 -+++ coreutils-7.0/doc/coreutils.texi 2009-01-28 17:12:04.986109287 +0100 -@@ -7346,7 +7346,7 @@ symbolic links in the destination are al - @itemx @w{@kbd{--preserve}[=@var{attribute_list}]} - @opindex -p - @opindex --preserve --@cindex file information, preserving -+@cindex file information, preserving, extended attributes, xattr - Preserve the specified attributes of the original files. - If specified, the @var{attribute_list} must be a comma-separated list - of one or more of the following strings: -@@ -7373,6 +7373,11 @@ Preserve in the destination files - any links between corresponding source files. - @c Give examples illustrating how hard links are preserved. - @c Also, show how soft links map to hard links with -L and -H. -+@itemx xattr -+Preserve extended attributes if @command{cp} is built with xattr support, -+and xattrs are supported and enabled on your file system. If SELinux context -+and/or ACLs are implemented using xattrs, they are preserved as well by this -+option. - @itemx all - Preserve all file attributes. - Equivalent to specifying all of the above. -@@ -7912,6 +7917,9 @@ attributes of destination files. It is - copy programs into their destination directories. It refuses to copy - files onto themselves. - -+@cindex extended attributes, xattr -+@command{install} never preserves extended attributes (xattr). -+ - The program accepts the following options. Also see @ref{Common options}. - - @table @samp -@@ -8060,6 +8068,9 @@ directory succeeded, but the second didn - the destination partition and the second and third would be left on the - original partition. - -+@cindex extended attributes, xattr -+@command{mv} always tries to copy extended attributes (xattr). -+ - @cindex prompting, and @command{mv} - If a destination file exists but is normally unwritable, standard input - is a terminal, and the @option{-f} or @option{--force} option is not given, -diff -ruNp coreutils-7.0.orig/m4/prereq.m4 coreutils-7.0/m4/prereq.m4 ---- coreutils-7.0.orig/m4/prereq.m4 2008-06-21 19:04:15.000000000 +0200 -+++ coreutils-7.0/m4/prereq.m4 2009-01-28 17:12:04.987109294 +0100 -@@ -38,6 +38,7 @@ AC_DEFUN([gl_PREREQ], - # handles that; see ../bootstrap.conf. - AC_REQUIRE([gl_EUIDACCESS_STAT]) - AC_REQUIRE([gl_FD_REOPEN]) -+ AC_REQUIRE([gl_FUNC_XATTR]) - AC_REQUIRE([gl_FUNC_XFTS]) - AC_REQUIRE([gl_MEMXFRM]) - AC_REQUIRE([gl_STRINTCMP]) -diff -ruNp coreutils-7.0.orig/m4/xattr.m4 coreutils-7.0/m4/xattr.m4 ---- coreutils-7.0.orig/m4/xattr.m4 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/m4/xattr.m4 2009-01-28 17:12:04.988109301 +0100 -@@ -0,0 +1,36 @@ -+# xattr.m4 - check for Extended Attributes (Linux) -+ -+# Copyright (C) 2003, 2008 Free Software Foundation, Inc. -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# Originally written by Andreas Gruenbacher. -+# http://www.suse.de/~agruen/coreutils/5.91/coreutils-xattr.diff -+ -+AC_DEFUN([gl_FUNC_XATTR], -+[ -+ AC_ARG_ENABLE([xattr], -+ AC_HELP_STRING([--disable-xattr], -+ [do not support extended attributes]), -+ [use_xattr=$enableval], [use_xattr=yes]) -+ -+ if test "$use_xattr" = "yes"; then -+ AC_CHECK_HEADERS([attr/error_context.h attr/libattr.h]) -+ if test $ac_cv_header_attr_libattr_h = yes \ -+ && test $ac_cv_header_attr_error_context_h = yes; then -+ use_xattr=1 -+ else -+ use_xattr=0 -+ fi -+ AC_DEFINE_UNQUOTED([USE_XATTR], [$use_xattr], -+ [Define if you want extended attribute support.]) -+ xattr_saved_LIBS=$LIBS -+ AC_SEARCH_LIBS([attr_copy_file], [attr], -+ [test "$ac_cv_search_attr_copy_file" = "none required" || -+ LIB_XATTR=$ac_cv_search_attr_copy_file]) -+ AC_CHECK_FUNCS([attr_copy_file]) -+ LIBS=$xattr_saved_LIBS -+ AC_SUBST([LIB_XATTR]) -+ fi -+]) -diff -ruNp coreutils-7.0.orig/src/copy.c coreutils-7.0/src/copy.c ---- coreutils-7.0.orig/src/copy.c 2008-08-24 22:30:10.000000000 +0200 -+++ coreutils-7.0/src/copy.c 2009-01-28 17:12:04.990109315 +0100 -@@ -55,6 +55,13 @@ - #include "areadlink.h" - #include "yesno.h" - -+#if USE_XATTR -+# include -+# include -+# include -+# include "verror.h" -+#endif -+ - #ifndef HAVE_FCHOWN - # define HAVE_FCHOWN false - # define fchown(fd, uid, gid) (-1) -@@ -124,6 +131,70 @@ is_ancestor (const struct stat *sb, cons - return false; - } - -+#if USE_XATTR -+static void -+copy_attr_error (struct error_context *ctx, char const *fmt, ...) -+{ -+ int err = errno; -+ va_list ap; -+ -+ /* use verror module to print error message */ -+ va_start (ap, fmt); -+ verror (0, err, fmt, ap); -+ va_end (ap); -+} -+ -+static char const * -+copy_attr_quote (struct error_context *ctx, char const *str) -+{ -+ return quote (str); -+} -+ -+static void -+copy_attr_free (struct error_context *ctx, char const *str) -+{ -+} -+ -+static bool -+copy_attr_by_fd (char const *src_path, int src_fd, -+ char const *dst_path, int dst_fd) -+{ -+ struct error_context ctx = -+ { -+ .error = copy_attr_error, -+ .quote = copy_attr_quote, -+ .quote_free = copy_attr_free -+ }; -+ return 0 == attr_copy_fd (src_path, src_fd, dst_path, dst_fd, 0, &ctx); -+} -+ -+static bool -+copy_attr_by_name (char const *src_path, char const *dst_path) -+{ -+ struct error_context ctx = -+ { -+ .error = copy_attr_error, -+ .quote = copy_attr_quote, -+ .quote_free = copy_attr_free -+ }; -+ return 0 == attr_copy_file (src_path, dst_path, 0, &ctx); -+} -+#else /* USE_XATTR */ -+ -+static bool -+copy_attr_by_fd (char const *src_path, int src_fd, -+ char const *dst_path, int dst_fd) -+{ -+ return true; -+} -+ -+static bool -+copy_attr_by_name (char const *src_path, char const *dst_path) -+{ -+ return true; -+} -+#endif /* USE_XATTR */ -+ - /* Read the contents of the directory SRC_NAME_IN, and recursively - copy the contents to DST_NAME_IN. NEW_DST is true if - DST_NAME_IN is a directory that was created previously in the -@@ -682,6 +753,11 @@ copy_reg (char const *src_name, char con - - set_author (dst_name, dest_desc, src_sb); - -+ if (x->preserve_xattr && ! copy_attr_by_fd (src_name, source_desc, -+ dst_name, dest_desc) -+ && x->require_preserve_xattr) -+ return false; -+ - if (x->preserve_mode || x->move_mode) - { - if (copy_acl (src_name, source_desc, dst_name, dest_desc, src_mode) != 0 -@@ -1980,6 +2056,10 @@ copy_internal (char const *src_name, cha - - set_author (dst_name, -1, &src_sb); - -+ if (x->preserve_xattr && ! copy_attr_by_name (src_name, dst_name) -+ && x->require_preserve_xattr) -+ return false; -+ - if (x->preserve_mode || x->move_mode) - { - if (copy_acl (src_name, -1, dst_name, -1, src_mode) != 0 -diff -ruNp coreutils-7.0.orig/src/copy.h coreutils-7.0/src/copy.h ---- coreutils-7.0.orig/src/copy.h 2008-06-21 17:20:29.000000000 +0200 -+++ coreutils-7.0/src/copy.h 2009-01-28 17:12:04.991109322 +0100 -@@ -174,6 +174,19 @@ struct cp_options - fail if it is unable to do so. */ - bool require_preserve_context; - -+ /* If true, attempt to preserve extended attributes using libattr. -+ Ignored if coreutils are compiled without xattr support. */ -+ bool preserve_xattr; -+ -+ /* Useful only when preserve_xattr is true. -+ If true, a failed attempt to preserve file's extended attributes -+ propagates failure "out" to the caller. If false, a failure to -+ preserve file's extended attributes does not change the invoking -+ application's exit status. Give diagnostics for failed syscalls -+ regardless of this setting. For example, with "cp --preserve=xattr" -+ this flag is "true", while with "cp --preserve=all", it is false. */ -+ bool require_preserve_xattr; -+ - /* If true, copy directories recursively and copy special files - as themselves rather than copying their contents. */ - bool recursive; -diff -ruNp coreutils-7.0.orig/src/cp.c coreutils-7.0/src/cp.c ---- coreutils-7.0.orig/src/cp.c 2009-01-28 17:10:24.455415000 +0100 -+++ coreutils-7.0/src/cp.c 2009-01-28 17:12:04.992109329 +0100 -@@ -202,7 +202,8 @@ Mandatory arguments to long options are - -p same as --preserve=mode,ownership,timestamps\n\ - --preserve[=ATTR_LIST] preserve the specified attributes (default:\n\ - mode,ownership,timestamps), if possible\n\ -- additional attributes: context, links, all\n\ -+ additional attributes: context, links, xattr,\n\ -+ all\n\ - "), stdout); - fputs (_("\ - --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ -@@ -779,6 +780,8 @@ cp_option_init (struct cp_options *x) - x->preserve_timestamps = false; - x->preserve_security_context = false; - x->require_preserve_context = false; -+ x->preserve_xattr = false; -+ x->require_preserve_xattr = false; - - x->require_preserve = false; - x->recursive = false; -@@ -815,18 +818,20 @@ decode_preserve_arg (char const *arg, st - PRESERVE_OWNERSHIP, - PRESERVE_LINK, - PRESERVE_CONTEXT, -+ PRESERVE_XATTR, - PRESERVE_ALL - }; - static enum File_attribute const preserve_vals[] = - { - PRESERVE_MODE, PRESERVE_TIMESTAMPS, -- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_ALL -+ PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_XATTR, -+ PRESERVE_ALL - }; - /* Valid arguments to the `--preserve' option. */ - static char const* const preserve_args[] = - { - "mode", "timestamps", -- "ownership", "links", "context", "all", NULL -+ "ownership", "links", "context", "xattr", "all", NULL - }; - ARGMATCH_VERIFY (preserve_args, preserve_vals); - -@@ -867,6 +872,11 @@ decode_preserve_arg (char const *arg, st - x->require_preserve_context = on_off; - break; - -+ case PRESERVE_XATTR: -+ x->preserve_xattr = on_off; -+ x->require_preserve_xattr = on_off; -+ break; -+ - case PRESERVE_ALL: - x->preserve_mode = on_off; - x->preserve_timestamps = on_off; -@@ -874,6 +884,7 @@ decode_preserve_arg (char const *arg, st - x->preserve_links = on_off; - if (selinux_enabled) - x->preserve_security_context = on_off; -+ x->preserve_xattr = on_off; - break; - - default: -@@ -1121,6 +1132,12 @@ main (int argc, char **argv) - "without an SELinux-enabled kernel")); - } - -+#if !USE_XATTR -+ if (x.require_preserve_xattr) -+ error (EXIT_FAILURE, 0, _("cannot preserve extended attributes, cp is " -+ "built without xattr support")); -+#endif -+ - /* Allocate space for remembering copied and created files. */ - - hash_init (); -diff -ruNp coreutils-7.0.orig/src/install.c coreutils-7.0/src/install.c ---- coreutils-7.0.orig/src/install.c 2008-09-27 19:28:41.000000000 +0200 -+++ coreutils-7.0/src/install.c 2009-01-28 17:12:04.993109336 +0100 -@@ -200,6 +200,7 @@ cp_option_init (struct cp_options *x) - x->open_dangling_dest_symlink = false; - x->update = false; - x->preserve_security_context = false; -+ x->preserve_xattr = false; - x->verbose = false; - x->dest_info = NULL; - x->src_info = NULL; -diff -ruNp coreutils-7.0.orig/src/Makefile.am coreutils-7.0/src/Makefile.am ---- coreutils-7.0.orig/src/Makefile.am 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/src/Makefile.am 2009-01-28 17:15:23.106476067 +0100 -@@ -149,9 +149,9 @@ su_LDADD = $(LDADD) $(LIB_CRYPT) - dir_LDADD += $(LIB_ACL) - ls_LDADD += $(LIB_ACL) - vdir_LDADD += $(LIB_ACL) --cp_LDADD += $(LIB_ACL) --mv_LDADD += $(LIB_ACL) --ginstall_LDADD += $(LIB_ACL) -+cp_LDADD += $(LIB_ACL) $(LIB_XATTR) -+mv_LDADD += $(LIB_ACL) $(LIB_XATTR) -+ginstall_LDADD += $(LIB_ACL) $(LIB_XATTR) - - stat_LDADD = $(LDADD) $(LIB_SELINUX) - -@@ -226,7 +226,7 @@ uninstall-local: - fi; \ - fi - --copy_sources = copy.c cp-hash.c -+copy_sources = copy.c cp-hash.c verror.c xvasprintf.c - - # Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid - # confusion with the `install' target. The install rule transforms `ginstall' -diff -ruNp coreutils-7.0.orig/src/mv.c coreutils-7.0/src/mv.c ---- coreutils-7.0.orig/src/mv.c 2009-01-28 17:10:24.456415000 +0100 -+++ coreutils-7.0/src/mv.c 2009-01-28 17:12:04.994109343 +0100 -@@ -140,6 +140,7 @@ cp_option_init (struct cp_options *x) - x->preserve_security_context = selinux_enabled; - x->require_preserve = false; /* FIXME: maybe make this an option */ - x->require_preserve_context = false; -+ x->preserve_xattr = true; - x->recursive = true; - x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */ - x->symbolic_link = false; -diff -ruNp coreutils-7.0.orig/tests/Makefile.am coreutils-7.0/tests/Makefile.am ---- coreutils-7.0.orig/tests/Makefile.am 2009-01-28 17:10:24.457415000 +0100 -+++ coreutils-7.0/tests/Makefile.am 2009-01-28 17:12:04.994109343 +0100 -@@ -230,6 +230,7 @@ TESTS = \ - misc/tty-eof \ - misc/unexpand \ - misc/uniq \ -+ misc/xattr \ - chmod/c-option \ - chmod/equal-x \ - chmod/equals \ -diff -ruNp coreutils-7.0.orig/tests/misc/xattr coreutils-7.0/tests/misc/xattr ---- coreutils-7.0.orig/tests/misc/xattr 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/tests/misc/xattr 2009-01-28 17:12:04.995109350 +0100 -@@ -0,0 +1,111 @@ -+#!/bin/sh -+# Ensure that cp --preserve=xattr and mv preserve extended attributes and -+# install does not preserve extended attributes. -+ -+# Copyright (C) 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 . -+ -+if test "$VERBOSE" = yes; then -+ set -x -+ cp --version -+ mv --version -+ ginstall --version -+fi -+ -+. $srcdir/test-lib.sh -+ -+# Skip this test if cp was built without xattr support: -+touch src dest || framework_failure -+cp --preserve=xattr -n src dest 2>/dev/null \ -+ || skip_test_ "coreutils built without xattr support" -+ -+# this code was taken from test mv/backup-is-src -+cleanup_() { rm -rf "$other_partition_tmpdir"; } -+. "$abs_srcdir/other-fs-tmpdir" -+b_other="$other_partition_tmpdir/b" -+rm -f $b_other || framework_failure -+ -+# testing xattr name-value pair -+xattr_name="user.foo" -+xattr_value="bar" -+xattr_pair="$xattr_name=\"$xattr_value\"" -+ -+# create new file and check its xattrs -+touch a || framework_failure -+getfattr -d a >out_a || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_a >/dev/null && framework_failure -+ -+# try to set user xattr on file -+setfattr -n "$xattr_name" -v "$xattr_value" a >out_a \ -+ || skip_test_ "failed to set xattr of file" -+getfattr -d a >out_a || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_a >/dev/null \ -+ || skip_test_ "failed to set xattr of file" -+ -+fail=0 -+ -+# cp should not preserve xattr by default -+cp a b || fail=1 -+getfattr -d b >out_b || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_b >/dev/null && fail=1 -+ -+# test if --preserve=xattr option works -+cp --preserve=xattr a b || fail=1 -+getfattr -d b >out_b || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_b >/dev/null || fail=1 -+ -+rm b || framework_failure -+ -+# install should never preserve xattr -+ginstall a b || fail=1 -+getfattr -d b >out_b || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_b >/dev/null && fail=1 -+ -+# mv should preserve xattr when renaming within a filesystem. -+# This is implicitly done by rename () and doesn't need explicit -+# xattr support in mv. -+mv a b || fail=1 -+getfattr -d b >out_b || skip_test_ "failed to get xattr of file" -+grep -F "$xattr_pair" out_b >/dev/null || cat >&2 <out_a 2>/dev/null \ -+ || test_mv=0 -+getfattr -d $b_other >out_b 2>/dev/null || test_mv=0 -+grep -F "$xattr_pair" out_b >/dev/null || test_mv=0 -+rm -f $b_other || framework_failure -+ -+if test $test_mv -eq 1; then -+ # mv should preserve xattr when copying content from one partition to another -+ mv b $b_other || fail=1 -+ getfattr -d $b_other >out_b 2>/dev/null || skip_test_ "failed to get xattr of file" -+ grep -F "$xattr_pair" out_b >/dev/null || fail=1 -+else -+ cat >&2 <. */ -+ -+/* Written by Eric Blake. */ -+ -+#include -+ -+#include "verror.h" -+#include "xvasprintf.h" -+ -+#include -+#include -+#include -+ -+#if ENABLE_NLS -+# include "gettext.h" -+# define _(msgid) gettext (msgid) -+#endif -+ -+#ifndef _ -+# define _(String) String -+#endif -+ -+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)'; -+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). -+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. -+ Use the globals error_print_progname and error_message_count similarly -+ to error(). */ -+void -+verror (int status, int errnum, const char *format, va_list args) -+{ -+ verror_at_line (status, errnum, NULL, 0, format, args); -+} -+ -+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)'; -+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). -+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. -+ If FNAME is not NULL, prepend the message with `FNAME:LINENO:'. -+ Use the globals error_print_progname, error_message_count, and -+ error_one_per_line similarly to error_at_line(). */ -+void -+verror_at_line (int status, int errnum, const char *file, -+ unsigned int line_number, const char *format, va_list args) -+{ -+ char *message = xvasprintf (format, args); -+ if (message) -+ { -+ /* Until http://sourceware.org/bugzilla/show_bug.cgi?id=2997 is fixed, -+ glibc violates GNU Coding Standards when the file argument to -+ error_at_line is NULL. */ -+ if (file) -+ error_at_line (status, errnum, file, line_number, "%s", message); -+ else -+ error (status, errnum, "%s", message); -+ } -+ else -+ { -+ /* EOVERFLOW, EINVAL, and EILSEQ from xvasprintf are signs of -+ serious programmer errors. */ -+ error (0, errno, _("unable to display error message")); -+ abort (); -+ } -+ free (message); -+} -diff -ruNp coreutils-7.0.orig/src/verror.h coreutils-7.0/src/verror.h ---- coreutils-7.0.orig/src/verror.h 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/src/verror.h 2009-01-28 17:14:54.039275540 +0100 -@@ -0,0 +1,53 @@ -+/* Declaration for va_list error-reporting function -+ Copyright (C) 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 -+ 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 . */ -+ -+#ifndef _VERROR_H -+#define _VERROR_H 1 -+ -+#include "error.h" -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)'; -+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). -+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. -+ Use the globals error_print_progname and error_message_count similarly -+ to error(). */ -+ -+extern void verror (int __status, int __errnum, const char *__format, -+ va_list __args) -+ __attribute__ ((__format__ (__printf__, 3, 0))); -+ -+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)'; -+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). -+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. -+ If FNAME is not NULL, prepend the message with `FNAME:LINENO:'. -+ Use the globals error_print_progname, error_message_count, and -+ error_one_per_line similarly to error_at_line(). */ -+ -+extern void verror_at_line (int __status, int __errnum, const char *__fname, -+ unsigned int __lineno, const char *__format, -+ va_list __args) -+ __attribute__ ((__format__ (__printf__, 5, 0))); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* verror.h */ -diff -ruNp coreutils-7.0.orig/src/xvasprintf.c coreutils-7.0/src/xvasprintf.c ---- coreutils-7.0.orig/src/xvasprintf.c 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/src/xvasprintf.c 2009-01-28 17:15:06.809363638 +0100 -@@ -0,0 +1,110 @@ -+/* vasprintf and asprintf with out-of-memory checking. -+ Copyright (C) 1999, 2002-2004, 2006-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 . */ -+ -+#include -+ -+/* Specification. */ -+#include "xvasprintf.h" -+ -+#include -+#include -+#include -+#include -+ -+#include "xalloc.h" -+ -+/* Checked size_t computations. */ -+#include "xsize.h" -+ -+static inline char * -+xstrcat (size_t argcount, va_list args) -+{ -+ char *result; -+ va_list ap; -+ size_t totalsize; -+ size_t i; -+ char *p; -+ -+ /* Determine the total size. */ -+ totalsize = 0; -+ va_copy (ap, args); -+ for (i = argcount; i > 0; i--) -+ { -+ const char *next = va_arg (ap, const char *); -+ totalsize = xsum (totalsize, strlen (next)); -+ } -+ va_end (ap); -+ -+ /* Test for overflow in the summing pass above or in (totalsize + 1) below. -+ Also, don't return a string longer than INT_MAX, for consistency with -+ vasprintf(). */ -+ if (totalsize == SIZE_MAX || totalsize > INT_MAX) -+ { -+ errno = EOVERFLOW; -+ return NULL; -+ } -+ -+ /* Allocate and fill the result string. */ -+ result = XNMALLOC (totalsize + 1, char); -+ p = result; -+ for (i = argcount; i > 0; i--) -+ { -+ const char *next = va_arg (args, const char *); -+ size_t len = strlen (next); -+ memcpy (p, next, len); -+ p += len; -+ } -+ *p = '\0'; -+ -+ return result; -+} -+ -+char * -+xvasprintf (const char *format, va_list args) -+{ -+ char *result; -+ -+ /* Recognize the special case format = "%s...%s". It is a frequently used -+ idiom for string concatenation and needs to be fast. We don't want to -+ have a separate function xstrcat() for this purpose. */ -+ { -+ size_t argcount = 0; -+ const char *f; -+ -+ for (f = format;;) -+ { -+ if (*f == '\0') -+ /* Recognized the special case of string concatenation. */ -+ return xstrcat (argcount, args); -+ if (*f != '%') -+ break; -+ f++; -+ if (*f != 's') -+ break; -+ f++; -+ argcount++; -+ } -+ } -+ -+ if (vasprintf (&result, format, args) < 0) -+ { -+ if (errno == ENOMEM) -+ xalloc_die (); -+ return NULL; -+ } -+ -+ return result; -+} -diff -ruNp coreutils-7.0.orig/src/xvasprintf.h coreutils-7.0/src/xvasprintf.h ---- coreutils-7.0.orig/src/xvasprintf.h 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/src/xvasprintf.h 2009-01-28 17:15:06.809363638 +0100 -@@ -0,0 +1,56 @@ -+/* vasprintf and asprintf with out-of-memory checking. -+ Copyright (C) 2002-2004, 2006-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 . */ -+ -+#ifndef _XVASPRINTF_H -+#define _XVASPRINTF_H -+ -+/* Get va_list. */ -+#include -+ -+#ifndef __attribute__ -+/* This feature is available in gcc versions 2.5 and later. */ -+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -+# define __attribute__(Spec) /* empty */ -+# endif -+/* The __-protected variants of `format' and `printf' attributes -+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -+# define __format__ format -+# define __printf__ printf -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* Write formatted output to a string dynamically allocated with malloc(), -+ and return it. Upon [ENOMEM] memory allocation error, call xalloc_die. -+ On some other error -+ - [EOVERFLOW] resulting string length is > INT_MAX, -+ - [EINVAL] invalid format string, -+ - [EILSEQ] error during conversion between wide and multibyte characters, -+ return NULL. */ -+extern char *xasprintf (const char *format, ...) -+ __attribute__ ((__format__ (__printf__, 1, 2))); -+extern char *xvasprintf (const char *format, va_list args) -+ __attribute__ ((__format__ (__printf__, 1, 0))); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _XVASPRINTF_H */ diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS index d24a5a8..93da421 100644 --- a/coreutils-DIR_COLORS +++ b/coreutils-DIR_COLORS @@ -1,4 +1,5 @@ # Configuration file for the color ls utility +# Synchronized with coreutils 7.1 dircolors # This file goes in the /etc directory, and must be world readable. # You can copy this file to .dir_colors in your $HOME directory to override # the system defaults. @@ -34,6 +35,8 @@ TERM cygwin TERM dtterm TERM eterm-color TERM gnome +TERM gnome-256color +TERM jfbterm TERM konsole TERM kterm TERM linux @@ -63,22 +66,24 @@ EIGHTBIT 1 # Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: -# Attribute codes: +# Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white -NORMAL 00 # global default, although everything should be something. -FILE 00 # normal file -DIR 01;34 # directory -LINK 01;36 # symbolic link (If you set this to 'target' instead of a +#NORMAL 00 # no color code at all +#FILE 00 # normal file, use no color at all +RESET 0 # reset to "normal" color +DIR 01;34 # directory +LINK 01;36 # symbolic link (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) +HARDLINK 44;37 # regular file with more than one link FIFO 40;33 # pipe SOCK 01;35 # socket DOOR 01;35 # door BLK 40;33;01 # block device driver -CHR 40;33;01 # character device driver +CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file MISSING 01;05;37;41 # ... and the files they point to SETUID 37;41 # file that is setuid (u+s) @@ -90,13 +95,13 @@ STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # This is for files with execute permission: -EXEC 01;32 +EXEC 01;32 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. # (and any comments you want to add after a '#') # executables (bright green) -#.cmd 01;32 +#.cmd 01;32 #.exe 01;32 #.com 01;32 #.btm 01;32 @@ -104,9 +109,8 @@ EXEC 01;32 #.sh 01;32 #.csh 01;32 # archives or compressed (bright red) -.tar 01;31 +.tar 01;31 .tgz 01;31 -.svgz 01;31 .arj 01;31 .taz 01;31 .lzh 01;31 @@ -129,8 +133,9 @@ EXEC 01;32 .cpio 01;31 .7z 01;31 .rz 01;31 +.xz 01;31 # image formats (magenta) -.jpg 01;35 +.jpg 01;35 .jpeg 01;35 .gif 01;35 .bmp 01;35 @@ -164,21 +169,33 @@ EXEC 01;32 .flc 01;35 .avi 01;35 .fli 01;35 +.flv 01;35 .gl 01;35 .dl 01;35 .xcf 01;35 .xwd 01;35 .yuv 01;35 .svg 01;35 +.svgz 01;35 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axv 01;35 +.anx 01;35 +.ogv 01;35 +.ogx 01;35 # audio formats (cyan) -.aac 00;36 -.au 00;36 -.flac 00;36 -.mid 00;36 -.midi 00;36 -.mka 00;36 -.mp3 00;36 -.mpc 00;36 -.ogg 00;36 -.ra 00;36 -.wav 00;36 +.aac 01;36 +.au 01;36 +.flac 01;36 +.mid 01;36 +.midi 01;36 +.mka 01;36 +.mp3 01;36 +.mpc 01;36 +.ogg 01;36 +.ra 01;36 +.wav 01;36 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axa 01;36 +.oga 01;36 +.spx 01;36 +.xspf 01;36 diff --git a/coreutils-DIR_COLORS.256color b/coreutils-DIR_COLORS.256color index 34fbe33..af16bf6 100644 --- a/coreutils-DIR_COLORS.256color +++ b/coreutils-DIR_COLORS.256color @@ -1,5 +1,6 @@ # Configuration file for the 256color ls utility # This file goes in the /etc directory, and must be world readable. +# Synchronized with coreutils 7.1 dircolors # You can copy this file to .dir_colors in your $HOME directory to override # the system defaults. # In the case that you are not satisfied with supplied colors, please @@ -31,7 +32,7 @@ EIGHTBIT 1 # Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: -# Attribute codes: +# Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color(8 colors mode) codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white @@ -48,16 +49,18 @@ EIGHTBIT 1 # You may find following command useful to search the best one for you: # for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done -NORMAL 00 # global default, although everything should be something. -FILE 00 # normal file -DIR 01;38;5;27 # directory -LINK 01;38;5;51 # symbolic link (If you set this to 'target' instead of a +#NORMAL 00 # global default, no color code at all +#FILE 00 # normal file, use no color at all +RESET 0 # reset to "normal" color +DIR 01;38;5;27 # directory +LINK 01;38;5;51 # symbolic link (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) +HARDLINK 44;38;5;15; # regular file with more than one link FIFO 40;38;5;11 # pipe SOCK 01;38;5;13 # socket DOOR 01;38;5;5 # door BLK 01;48;5;232;38;5;11 # block device driver -CHR 01;48;5;232;38;5;3 # character device driver +CHR 01;48;5;232;38;5;3 # character device driver ORPHAN 01;48;5;232;38;5;9 # symlink to nonexistent file, or non-stat'able file MISSING 01;05;48;5;232;38;5;15 # ... and the files they point to SETUID 48;5;196;38;5;15 # file that is setuid (u+s) @@ -82,9 +85,8 @@ EXEC 01;38;5;34 #.sh 01;38;5;34 #.csh 01;38;5;34 # archives or compressed (bright red) -.tar 01;38;5;9 +.tar 01;38;5;9 .tgz 01;38;5;9 -.svgz 01;38;5;9 .arj 01;38;5;9 .taz 01;38;5;9 .lzh 01;38;5;9 @@ -107,8 +109,9 @@ EXEC 01;38;5;34 .cpio 01;38;5;9 .7z 01;38;5;9 .rz 01;38;5;9 +.xz 01;38;5;9 # image formats (magenta) -.jpg 01;38;5;13 +.jpg 01;38;5;13 .jpeg 01;38;5;13 .gif 01;38;5;13 .bmp 01;38;5;13 @@ -142,21 +145,33 @@ EXEC 01;38;5;34 .flc 01;38;5;13 .avi 01;38;5;13 .fli 01;38;5;13 +.flv 01;38;5;13 .gl 01;38;5;13 .dl 01;38;5;13 .xcf 01;38;5;13 .xwd 01;38;5;13 .yuv 01;38;5;13 .svg 01;38;5;13 +.svgz 01;38;5;13 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axv 01;38;5;13 +.anx 01;38;5;13 +.ogv 01;38;5;13 +.ogx 01;38;5;13 # audio formats (cyan) -.aac 00;38;5;45 -.au 00;38;5;45 -.flac 00;38;5;45 -.mid 00;38;5;45 -.midi 00;38;5;45 -.mka 00;38;5;45 -.mp3 00;38;5;45 -.mpc 00;38;5;45 -.ogg 00;38;5;45 -.ra 00;38;5;45 -.wav 00;38;5;45 +.aac 01;38;5;45 +.au 01;38;5;45 +.flac 01;38;5;45 +.mid 01;38;5;45 +.midi 01;38;5;45 +.mka 01;38;5;45 +.mp3 01;38;5;45 +.mpc 01;38;5;45 +.ogg 01;38;5;45 +.ra 01;38;5;45 +.wav 01;38;5;45 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axa 01;38;5;45 +.oga 01;38;5;45 +.spx 01;38;5;45 +.xspf 01;38;5;45 diff --git a/coreutils-DIR_COLORS.xterm b/coreutils-DIR_COLORS.xterm index dec01f9..dd189cf 100644 --- a/coreutils-DIR_COLORS.xterm +++ b/coreutils-DIR_COLORS.xterm @@ -1,4 +1,5 @@ # Configuration file for the color ls utility +# Synchronized with coreutils 7.1 dircolors # This file goes in the /etc directory, and must be world readable. # You can copy this file to .dir_colors in your $HOME directory to override # the system defaults. @@ -45,22 +46,24 @@ EIGHTBIT 1 # Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: -# Attribute codes: +# Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white -NORMAL 00 # global default, although everything should be something. -FILE 00 # normal file -DIR 00;34 # directory -LINK 00;36 # symbolic link (If you set this to 'target' instead of a +#NORMAL 00 # no color code at all +#FILE 00 # normal file, use no color at all +RESET 0 +DIR 00;34 # directory +LINK 00;36 # symbolic link (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) +HARDLINK 44;37 # regular file with more than one link FIFO 40;33 # pipe SOCK 00;35 # socket DOOR 00;35 # door BLK 40;33;01 # block device driver -CHR 40;33;01 # character device driver +CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file MISSING 01;05;37;41 # ... and the files they point to SETUID 37;41 # file that is setuid (u+s) @@ -72,7 +75,7 @@ STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # This is for files with execute permission: -EXEC 00;32 +EXEC 00;32 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. @@ -85,9 +88,8 @@ EXEC 00;32 #.sh 00;32 #.csh 00;32 # archives or compressed (red) -.tar 00;31 +.tar 00;31 .tgz 00;31 -.svgz 00;31 .arj 00;31 .taz 00;31 .lzh 00;31 @@ -110,8 +112,9 @@ EXEC 00;32 .cpio 00;31 .7z 00;31 .rz 00;31 +.xz 00;31 # image formats (magenta) -.jpg 00;35 +.jpg 00;35 .jpeg 00;35 .gif 00;35 .bmp 00;35 @@ -145,12 +148,19 @@ EXEC 00;32 .flc 00;35 .avi 00;35 .fli 00;35 +.flv 00;35 .gl 00;35 .dl 00;35 .xcf 00;35 .xwd 00;35 .yuv 00;35 .svg 00;35 +.svgz 00;35 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axv 00;35 +.anx 00;35 +.ogv 00;35 +.ogx 00;35 # audio formats (cyan) .aac 00;36 .au 00;36 @@ -163,3 +173,8 @@ EXEC 00;32 .ogg 00;36 .ra 00;36 .wav 00;36 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axa 00;36 +.oga 00;36 +.spx 00;36 +.xspf 00;36 diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 832eadc..4759add 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -331,7 +331,7 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am error (EXIT_FAILURE, errno, "-"); --- coreutils-6.8+/src/join.c.i18n 2007-01-14 15:41:28.000000000 +0000 +++ coreutils-6.8+/src/join.c 2007-03-01 15:08:24.000000000 +0000 -@@ -23,17 +23,31 @@ +@@ -23,16 +23,30 @@ #include #include @@ -347,7 +347,6 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am + #include "system.h" #include "error.h" - #include "hard-locale.h" #include "linebuffer.h" -#include "memcasecmp.h" #include "quote.h" @@ -2841,11 +2840,11 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c line of 1st page printed). */ @@ -696,6 +756,7 @@ -a|COLUMN|-m is a `space' and with the -J option a `tab'. */ - static char *col_sep_string = ""; + static char *col_sep_string = (char *) ""; static int col_sep_length = 0; +static int col_sep_width = 0; - static char *column_separator = " "; - static char *line_separator = "\t"; + static char *column_separator = (char *) " "; + static char *line_separator = (char *) "\t"; @@ -852,6 +913,13 @@ col_sep_length = (int) strlen (optarg_S); @@ -2927,7 +2926,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c @@ -1031,7 +1122,7 @@ old_s = false; /* Reset an additional input of -s, -S dominates -s */ - col_sep_string = ""; + col_sep_string = bad_cast (""); - col_sep_length = 0; + col_sep_length = col_sep_width = 0; use_col_separator = true; diff --git a/coreutils-pam.patch b/coreutils-pam.patch index 7825b25..5a5ebfb 100644 --- a/coreutils-pam.patch +++ b/coreutils-pam.patch @@ -49,11 +49,11 @@ #define DEFAULT_USER "root" +#ifndef USE_PAM - char *crypt (); + char *crypt (char const *key, char const *salt); +#endif - char *getusershell (); - void endusershell (); - void setusershell (); + char *getusershell (void); + void endusershell (void); + void setusershell (void); extern char **environ; diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index 95f0401..5b6c2db 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -49,71 +49,6 @@ diff -urp coreutils-7.0.orig/src/chcon.c coreutils-7.0/src/chcon.c diff -urp coreutils-7.0.orig/src/copy.c coreutils-7.0/src/copy.c --- coreutils-7.0.orig/src/copy.c 2009-01-28 17:18:16.748671000 +0100 +++ coreutils-7.0/src/copy.c 2009-01-28 17:18:52.762913947 +0100 -@@ -449,9 +449,10 @@ copy_reg (char const *src_name, char con - security_context_t con = NULL; - if (getfscreatecon (&con) < 0) - { -- error (0, errno, _("failed to get file system create context")); -+ //do not show error when we not require security context (-a option) - if (x->require_preserve_context) - { -+ error (0, errno, _("failed to get file system create context")); - return_val = false; - goto close_src_and_dst_desc; - } -@@ -461,11 +462,12 @@ copy_reg (char const *src_name, char con - { - if (fsetfilecon (dest_desc, con) < 0) - { -- error (0, errno, -- _("failed to set the security context of %s to %s"), -- quote_n (0, dst_name), quote_n (1, con)); -+ //do not show error when we not require security context (-a option) - if (x->require_preserve_context) - { -+ error (0, errno, -+ _("failed to set the security context of %s to %s"), -+ quote_n (0, dst_name), quote_n (1, con)); - return_val = false; - freecon (con); - goto close_src_and_dst_desc; -@@ -1714,11 +1716,12 @@ copy_internal (char const *src_name, cha - { - if (setfscreatecon (con) < 0) - { -- error (0, errno, -- _("failed to set default file creation context to %s"), -- quote (con)); -+ //do not show error when we not require security context (-a option) - if (x->require_preserve_context) - { -+ error (0, errno, -+ _("failed to set default file creation context to %s"), -+ quote (con)); - freecon (con); - return false; - } -@@ -1728,12 +1731,14 @@ copy_internal (char const *src_name, cha - else - { - if (errno != ENOTSUP && errno != ENODATA) -- { -- error (0, errno, -- _("failed to get security context of %s"), -- quote (src_name)); -- if (x->require_preserve_context) -- return false; -+ { -+ //do not show error when we not require security context (-a option) -+ if (x->require_preserve_context) { -+ error (0, errno, -+ _("failed to get security context of %s"), -+ quote (src_name)); -+ return false; -+ } - } - } - } @@ -1819,6 +1824,8 @@ copy_internal (char const *src_name, cha { /* Here, we are crossing a file system boundary and cp's -x option @@ -147,15 +82,6 @@ diff -urp coreutils-7.0.orig/src/cp.c coreutils-7.0/src/cp.c {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} -@@ -175,7 +176,7 @@ Copy SOURCE to DEST, or multiple SOURCE( - Mandatory arguments to long options are mandatory for short options too.\n\ - "), stdout); - fputs (_("\ -- -a, --archive same as -dpR\n\ -+ -a, --archive same as -cdpR\n\ - --backup[=CONTROL] make a backup of each existing destination file\n\ - -b like --backup but does not accept an argument\n\ - --copy-contents copy contents of special files when recursive\n\ @@ -206,6 +207,9 @@ Mandatory arguments to long options are all\n\ "), stdout); @@ -191,24 +117,6 @@ diff -urp coreutils-7.0.orig/src/cp.c coreutils-7.0/src/cp.c long_opts, NULL)) != -1) { -@@ -936,13 +942,15 @@ main (int argc, char **argv) - sparse_type_string, sparse_type); - break; - -- case 'a': /* Like -dpR. */ -+ case 'a': /* Like -dpRc. */ - x.dereference = DEREF_NEVER; - x.preserve_links = true; - x.preserve_ownership = true; - x.preserve_mode = true; - x.preserve_timestamps = true; -- x.require_preserve = true; -+ x.require_preserve = true; -+ if (selinux_enabled) -+ x.preserve_security_context = true; - x.recursive = true; - break; - @@ -956,6 +964,16 @@ main (int argc, char **argv) copy_contents = true; break; @@ -288,15 +196,15 @@ diff -urp coreutils-7.0.orig/src/install.c coreutils-7.0/src/install.c x->require_preserve = false; x->require_preserve_context = false; + x->set_security_context = false; + x->require_preserve_xattr = false; x->recursive = false; x->sparse_mode = SPARSE_AUTO; - x->symbolic_link = false; @@ -361,7 +362,7 @@ main (int argc, char **argv) we'll actually use backup_suffix_string. */ backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); -- while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pt:TvS:Z:", long_options, -+ while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pPt:TvS:Z:", long_options, +- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z:", long_options, ++ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z:", long_options, NULL)) != -1) { switch (optc) @@ -351,18 +259,6 @@ diff -urp coreutils-7.0.orig/src/ls.c coreutils-7.0/src/ls.c }; /* Display letters and indicators for each filetype. -@@ -182,8 +183,9 @@ struct fileinfo - exists, otherwise false. */ - bool linkok; - -- /* For long listings, true if the file has an access control list, -- or an SELinux security context. */ -+ /* For long listings, true if the file has an access control list. -+ Unlike with upstream not true for SELinux scontext(#430779) as -+ this removes possibility to detect ACL via ls */ - bool have_acl; - }; - @@ -246,6 +248,7 @@ static void queue_directory (char const static void sort_files (void); static void parse_ls_color (void); @@ -513,26 +409,6 @@ diff -urp coreutils-7.0.orig/src/ls.c coreutils-7.0/src/ls.c { bool have_acl = false; int attr_len = (do_deref -@@ -2708,9 +2735,7 @@ gobble_file (char const *name, enum file - f->scontext = xstrdup ("unlabeled"); - } - -- if (err == 0) -- have_acl = ! STREQ ("unlabeled", f->scontext); -- else -+ if (err != 0) - { - f->scontext = UNKNOWN_SECURITY_CONTEXT; - -@@ -2722,7 +2747,7 @@ gobble_file (char const *name, enum file - err = 0; - } - -- if (err == 0 && ! have_acl && format == long_format) -+ if (err == 0 && format == long_format) - { - int n = file_has_acl (absolute_name, &f->stat); - err = (n < 0); @@ -3297,6 +3322,13 @@ print_current_files (void) print_long_format (sorted_file[i]); DIRED_PUTCHAR ('\n'); @@ -590,9 +466,9 @@ diff -urp coreutils-7.0.orig/src/ls.c coreutils-7.0/src/ls.c - if (print_scontext) - printf ("%*s ", format == with_commas ? 0 : scontext_width, f->scontext); - - print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f), f->linkok, - f->stat_ok, f->filetype, NULL); - + size_t width = print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f), + f->linkok, f->stat_ok, f->filetype, + NULL, f->stat.st_nlink, start_col); @@ -4077,9 +4109,6 @@ length_of_file_name_and_frills (const st output_block_size)) : block_size_width); @@ -621,74 +497,6 @@ diff -urp coreutils-7.0.orig/src/ls.c coreutils-7.0/src/ls.c fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\n\ -@@ -4541,3 +4577,67 @@ Exit status:\n\ - } - exit (status); - } -+ -+static void -+print_scontext_format (const struct fileinfo *f) -+{ -+ char modebuf[12]; -+ -+ /* 7 fields that may require LONGEST_HUMAN_READABLE bytes, -+ 1 10-byte mode string, -+ 9 spaces, one following each of these fields, and -+ 1 trailing NUL byte. */ -+ -+ char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10 + 9 + 1]; -+ char *buf = init_bigbuf; -+ size_t bufsize = sizeof (init_bigbuf); -+ size_t s; -+ char *p; -+ const char *fmt; -+ char *user_name; -+ char *group_name; -+ int rv; -+ char *scontext; -+ -+ p = buf; -+ -+ if ( print_scontext ) { /* zero means terse listing */ -+ filemodestring (&f->stat, modebuf); -+ modebuf[10] = (f->have_acl ? '+' : ' '); -+ modebuf[11] = '\0'; -+ -+ /* print mode */ -+ -+ (void) sprintf (p, "%s ", modebuf); -+ p += strlen (p); -+ -+ /* print standard user and group */ -+ -+ DIRED_FPUTS (buf, stdout, p - buf); -+ format_user (f->stat.st_uid, owner_width, f->stat_ok); -+ format_group (f->stat.st_gid, group_width, f->stat_ok); -+ p = buf; -+ } -+ -+ (void) sprintf (p, "%-32s ", f->scontext ?: ""); -+ p += strlen (p); -+ -+ DIRED_INDENT (); -+ DIRED_FPUTS (buf, stdout, p - buf); -+ print_name_with_quoting (f->name, f->stat.st_mode, f->linkok, -+ f->stat_ok, f->filetype, &dired_obstack); -+ -+ if (f->filetype == symbolic_link) { -+ if (f->linkname) { -+ DIRED_FPUTS_LITERAL (" -> ", stdout); -+ print_name_with_quoting (f->linkname, f->linkmode, f->linkok - 1, -+ f->stat_ok, f->filetype, NULL); -+ if (indicator_style != none) -+ print_type_indicator (f->stat_ok, f->linkmode, f->filetype); -+ } -+ } -+ else { -+ if (indicator_style != none) -+ print_type_indicator (f->stat_ok, f->stat.st_mode, f->filetype); -+ } -+} diff -urp coreutils-7.0.orig/src/mkdir.c coreutils-7.0/src/mkdir.c --- coreutils-7.0.orig/src/mkdir.c 2008-08-24 22:58:15.000000000 +0200 +++ coreutils-7.0/src/mkdir.c 2009-01-28 17:18:52.771914007 +0100 @@ -720,9 +528,9 @@ diff -urp coreutils-7.0.orig/src/mv.c coreutils-7.0/src/mv.c x->preserve_timestamps = true; x->preserve_security_context = selinux_enabled; + x->set_security_context = false; + x->reduce_diagnostics = false; x->require_preserve = false; /* FIXME: maybe make this an option */ x->require_preserve_context = false; - x->preserve_xattr = true; diff -urp coreutils-7.0.orig/src/runcon.c coreutils-7.0/src/runcon.c --- coreutils-7.0.orig/src/runcon.c 2008-08-24 22:30:10.000000000 +0200 +++ coreutils-7.0/src/runcon.c 2009-01-28 17:18:52.774914027 +0100 @@ -891,7 +699,7 @@ diff -urp coreutils-7.0.orig/src/stat.c coreutils-7.0/src/stat.c diff -urp coreutils-7.0.orig/tests/misc/selinux coreutils-7.0/tests/misc/selinux --- coreutils-7.0.orig/tests/misc/selinux 2008-09-27 19:28:54.000000000 +0200 +++ coreutils-7.0/tests/misc/selinux 2009-01-28 17:18:52.776914041 +0100 -@@ -30,12 +30,10 @@ chcon $ctx f d p || +@@ -30,7 +30,7 @@ chcon $ctx f d p || # inspect that context with both ls -Z and stat. for i in d f p; do @@ -900,8 +708,76 @@ diff -urp coreutils-7.0.orig/tests/misc/selinux coreutils-7.0/tests/misc/selinux c=`stat --printf %C $i`; test x$c = x$ctx || fail=1 done --# ensure that ls -l output includes the "+". --c=`ls -l f|cut -c11`; test "$c" = + || fail=1 +diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c +--- coreutils-7.1-orig/src/ls.c 2009-02-23 17:11:01.000000000 +0100 ++++ coreutils-7.1/src/ls.c 2009-02-23 17:14:27.000000000 +0100 +@@ -3467,6 +3467,69 @@ format_group_width (gid_t g) + } - # Copy each to a new directory and ensure that context is preserved. - cp -r --preserve=all d f p s1 || fail=1 + ++/* Print info about f in scontext format */ ++static void ++print_scontext_format (const struct fileinfo *f) ++{ ++ char modebuf[12]; ++ ++ /* 7 fields that may require LONGEST_HUMAN_READABLE bytes, ++ 1 10-byte mode string, ++ 9 spaces, one following each of these fields, and ++ 1 trailing NUL byte. */ ++ ++ char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10 + 9 + 1]; ++ char *buf = init_bigbuf; ++ char *p; ++ ++ p = buf; ++ ++ if ( print_scontext ) { /* zero means terse listing */ ++ filemodestring (&f->stat, modebuf); ++ if (! any_has_acl) ++ modebuf[10] = '\0'; ++ else if (f->acl_type == ACL_T_SELINUX_ONLY) ++ modebuf[10] = '.'; ++ else if (f->acl_type == ACL_T_YES) ++ modebuf[10] = '+'; ++ modebuf[11] = '\0'; ++ ++ /* print mode */ ++ ++ (void) sprintf (p, "%s ", modebuf); ++ p += strlen (p); ++ ++ /* print standard user and group */ ++ ++ DIRED_FPUTS (buf, stdout, p - buf); ++ format_user (f->stat.st_uid, owner_width, f->stat_ok); ++ format_group (f->stat.st_gid, group_width, f->stat_ok); ++ p = buf; ++ } ++ ++ (void) sprintf (p, "%-32s ", f->scontext ?: ""); ++ p += strlen (p); ++ ++ DIRED_INDENT (); ++ DIRED_FPUTS (buf, stdout, p - buf); ++ size_t w = print_name_with_quoting (f->name, FILE_OR_LINK_MODE(f), f->linkok, ++ f->stat_ok, f->filetype, &dired_obstack, f->stat.st_nlink, p - buf); ++ ++ if (f->filetype == symbolic_link) { ++ if (f->linkname) { ++ DIRED_FPUTS_LITERAL (" -> ", stdout); ++ print_name_with_quoting (f->linkname, f->linkmode, f->linkok - 1, ++ f->stat_ok, f->filetype, NULL, f->stat.st_nlink, (p-buf) + w + 4 ); ++ if (indicator_style != none) ++ print_type_indicator (f->stat_ok, f->linkmode, f->filetype); ++ } ++ } ++ else { ++ if (indicator_style != none) ++ print_type_indicator (f->stat_ok, f->stat.st_mode, f->filetype); ++ } ++} ++ + /* Print information about F in long format. */ + + static void diff --git a/coreutils-selinuxmanpages.patch b/coreutils-selinuxmanpages.patch index c83a583..9cbc166 100644 --- a/coreutils-selinuxmanpages.patch +++ b/coreutils-selinuxmanpages.patch @@ -1,39 +1,6 @@ -diff -urNp coreutils-6.10-orig/doc/coreutils.info coreutils-6.10/doc/coreutils.info ---- coreutils-6.10-orig/doc/coreutils.info 2008-04-07 17:52:11.000000000 +0200 -+++ coreutils-6.10/doc/coreutils.info 2008-04-07 18:03:27.000000000 +0200 -@@ -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 `-dpR'. -+ directory in a different order). Equivalent to `-cdpR'. - - `-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.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi --- coreutils-6.10-orig/doc/coreutils.texi 2008-04-07 17:52:11.000000000 +0200 +++ coreutils-6.10/doc/coreutils.texi 2008-04-07 18:01:43.000000000 +0200 -@@ -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{-dpR}. -+Equivalent to @option{-cdpR}. - - @item -b - @itemx @w{@kbd{--backup}[=@var{method}]} @@ -6981,6 +6981,11 @@ for i; do done @end example diff --git a/coreutils.spec b/coreutils.spec index 7cb0fa8..187840d 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,12 +1,13 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils -Version: 7.0 -Release: 8%{?dist} +Version: 7.1 +Release: 1%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.lzma +#Using .tar.gz tarball until xz utils will be in Fedora +Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source101: coreutils-DIR_COLORS Source102: coreutils-DIR_COLORS.xterm Source103: coreutils-DIR_COLORS.256color @@ -18,17 +19,10 @@ Source202: coreutils-su-l.pamd Source203: coreutils-runuser-l.pamd # From upstream -Patch1: coreutils-446294-lsexitstatuses.patch -Patch2: coreutils-7.0-dftotal.patch -Patch3: coreutils-7.0-expr-removebignumoptions.patch -Patch4: coreutils-7.0-cp-mv-n.patch -Patch5: coreutils-7.0-xattr.patch # Our patches Patch100: coreutils-6.10-configuration.patch Patch101: coreutils-6.10-manpages.patch -#Patch102: coreutils-6.10-longoptions.patch -Patch103: coreutils-6.11-sparc-shafix.patch # sh-utils Patch703: sh-utils-2.0.11-dateman.patch @@ -54,15 +48,12 @@ Patch916: coreutils-getfacl-exit-code.patch #(upstream did some SELinux implementation unlike with RedHat patch) Patch950: coreutils-selinux.patch Patch951: coreutils-selinuxmanpages.patch -Patch952: coreutils-463883-chcon-changes.patch BuildRequires: libselinux-devel >= 1.25.6-1 BuildRequires: libacl-devel BuildRequires: gettext bison BuildRequires: texinfo >= 4.3 -BuildRequires: lzma BuildRequires: autoconf >= 2.58 -#dist-lzma required BuildRequires: automake >= 1.10.1 %{?!nopam:BuildRequires: pam-devel} BuildRequires: libcap-devel >= 2.0.6 @@ -107,17 +98,10 @@ the old GNU fileutils, sh-utils, and textutils packages. %setup -q # From upstream -%patch1 -p1 -b .lsexit -%patch2 -p1 -b .dftotal -%patch3 -p1 -b .bignum -%patch4 -p1 -b .cpmvn -%patch5 -p1 -b .xattr # Our patches %patch100 -p1 -b .configure %patch101 -p1 -b .manpages -#%patch102 -p1 -b .longopt -%patch103 -p1 -b .sparc # sh-utils %patch703 -p1 -b .dateman @@ -134,19 +118,16 @@ the old GNU fileutils, sh-utils, and textutils packages. %patch908 -p1 -b .getgrouplist %patch912 -p1 -b .overflow %patch915 -p1 -b .splitl -#%patch916 -p1 -b .getfacl-exit-code +%patch916 -p1 -b .getfacl-exit-code #SELinux %patch950 -p1 -b .selinux %patch951 -p1 -b .selinuxman -%patch952 -p1 -b .changeonly chmod a+x tests/misc/sort-mb-tests -chmod a+x tests/misc/id-context -chmod a+x tests/mv/mv-n -chmod a+x tests/misc/xattr sed -i 's/1.10a/1.10.1/' configure.ac +sed -i 's/dist-xz/dist-lzma/' configure.ac #fix typos/mistakes in localized documentation(#439410, #440056) find ./po/ -name "*.p*" | xargs \ @@ -328,6 +309,11 @@ fi /sbin/runuser %changelog +* Tue Feb 24 2009 Ondrej Vasik - 7.1-1 +- New upstream release 7.1 (temporarily using tar.gz tarball + as there are no xz utils in Fedora), removed applied + patches, amended patches and LS_COLORS files + * Tue Feb 24 2009 Fedora Release Engineering - 7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index d845788..3e7e413 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -81c7aecc0daa6cada78005108edb6502 coreutils-7.0.tar.lzma +cbb2b3d1718ee1237b808e00b5c11b1e coreutils-7.1.tar.gz