From c77f9b75dc94eec6cbce80acd4bc39a87174fc73 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Nov 27 2009 13:24:09 +0000 Subject: new upstream release 8.1, rediffed patches, fix builds under koji --- diff --git a/.cvsignore b/.cvsignore index 245b011..17b0073 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -coreutils-8.0.tar.xz +coreutils-8.1.tar.xz diff --git a/coreutils-5.2.1-runuser.patch b/coreutils-5.2.1-runuser.patch index ce80533..21efa5b 100644 --- a/coreutils-5.2.1-runuser.patch +++ b/coreutils-5.2.1-runuser.patch @@ -1,7 +1,7 @@ -diff -urNp coreutils-7.0.orig/AUTHORS coreutils-7.0/AUTHORS ---- coreutils-7.0.orig/AUTHORS 2008-08-24 22:58:15.000000000 +0200 -+++ coreutils-7.0/AUTHORS 2009-01-28 18:11:00.316247411 +0100 -@@ -64,6 +64,7 @@ pwd: Jim Meyering +diff -urNp coreutils-8.1-orig/AUTHORS coreutils-8.1/AUTHORS +--- coreutils-8.1-orig/AUTHORS 2009-11-06 18:04:10.000000000 +0100 ++++ coreutils-8.1/AUTHORS 2009-11-20 13:06:26.000000000 +0100 +@@ -65,6 +65,7 @@ readlink: Dmitry V. Levin rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering rmdir: David MacKenzie runcon: Russell Coker @@ -9,10 +9,23 @@ diff -urNp coreutils-7.0.orig/AUTHORS coreutils-7.0/AUTHORS seq: Ulrich Drepper sha1sum: Ulrich Drepper, Scott Miller, David Madore sha224sum: Ulrich Drepper, Scott Miller, David Madore -diff -urNp coreutils-7.0.orig/man/Makefile.am coreutils-7.0/man/Makefile.am ---- coreutils-7.0.orig/man/Makefile.am 2008-09-27 19:28:54.000000000 +0200 -+++ coreutils-7.0/man/Makefile.am 2009-01-28 18:11:00.317247417 +0100 -@@ -93,6 +93,7 @@ readlink.1: $(common_dep) $(srcdir)/read +diff -urNp coreutils-8.1-orig/man/help2man coreutils-8.1/man/help2man +--- coreutils-8.1-orig/man/help2man 2009-09-23 10:25:44.000000000 +0200 ++++ coreutils-8.1/man/help2man 2009-11-20 13:06:26.000000000 +0100 +@@ -556,6 +556,9 @@ while (length) + $include{$sect} .= $content; + } + ++# There is no info documentation for runuser (shared with su). ++$opt_no_info = 1 if $program eq 'runuser'; ++ + # Refer to the real documentation. + unless ($opt_no_info) + { +diff -urNp coreutils-8.1-orig/man/Makefile.am coreutils-8.1/man/Makefile.am +--- coreutils-8.1-orig/man/Makefile.am 2009-11-06 18:04:10.000000000 +0100 ++++ coreutils-8.1/man/Makefile.am 2009-11-20 13:06:26.000000000 +0100 +@@ -94,6 +94,7 @@ readlink.1: $(common_dep) $(srcdir)/read rm.1: $(common_dep) $(srcdir)/rm.x ../src/rm.c rmdir.1: $(common_dep) $(srcdir)/rmdir.x ../src/rmdir.c runcon.1: $(common_dep) $(srcdir)/runcon.x ../src/runcon.c @@ -20,9 +33,9 @@ diff -urNp coreutils-7.0.orig/man/Makefile.am coreutils-7.0/man/Makefile.am seq.1: $(common_dep) $(srcdir)/seq.x ../src/seq.c sha1sum.1: $(common_dep) $(srcdir)/sha1sum.x ../src/md5sum.c sha224sum.1: $(common_dep) $(srcdir)/sha224sum.x ../src/md5sum.c -diff -urNp coreutils-7.0.orig/man/runuser.x coreutils-7.0/man/runuser.x ---- coreutils-7.0.orig/man/runuser.x 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-7.0/man/runuser.x 2009-01-28 18:11:00.321247443 +0100 +diff -urNp coreutils-8.1-orig/man/runuser.x coreutils-8.1/man/runuser.x +--- coreutils-8.1-orig/man/runuser.x 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.1/man/runuser.x 2009-11-20 13:06:26.000000000 +0100 @@ -0,0 +1,12 @@ +[NAME] +runuser \- run a shell with substitute user and group IDs @@ -36,13 +49,13 @@ diff -urNp coreutils-7.0.orig/man/runuser.x coreutils-7.0/man/runuser.x +.TP +since the command \fBrunuser\fR is trimmed down version of command \fBsu\fR. +.br -diff -urNp coreutils-7.0.orig/README coreutils-7.0/README ---- coreutils-7.0.orig/README 2008-08-24 22:30:10.000000000 +0200 -+++ coreutils-7.0/README 2009-01-28 18:11:00.318247424 +0100 +diff -urNp coreutils-8.1-orig/README coreutils-8.1/README +--- coreutils-8.1-orig/README 2009-11-06 18:04:10.000000000 +0100 ++++ coreutils-8.1/README 2009-11-20 13:06:26.000000000 +0100 @@ -12,10 +12,10 @@ The programs that can be built with this factor false fmt fold groups head hostid hostname id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup - od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir + nproc od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir - runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf - sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout - touch tr true truncate tsort tty uname unexpand uniq unlink uptime users @@ -54,30 +67,29 @@ diff -urNp coreutils-7.0.orig/README coreutils-7.0/README See the file NEWS for a list of major changes in the current release. -diff -urNp coreutils-7.0.orig/src/Makefile.am coreutils-7.0/src/Makefile.am ---- coreutils-7.0.orig/src/Makefile.am 2009-01-28 18:10:10.756926000 +0100 -+++ coreutils-7.0/src/Makefile.am 2009-01-28 18:11:59.658631933 +0100 -@@ -38,7 +38,7 @@ EXTRA_PROGRAMS = \ - shuf sort split sum tac tail tr tsort unexpand uniq wc \ - basename date dirname echo env expr factor false \ - id kill logname pathchk printenv printf pwd \ -- runcon seq sleep tee \ -+ runcon runuser seq sleep tee \ - test timeout true truncate tty whoami yes \ - base64 - -@@ -154,6 +154,10 @@ cp_LDADD += $(LIB_ACL) $(LIB_XATTR) - mv_LDADD += $(LIB_ACL) $(LIB_XATTR) - ginstall_LDADD += $(LIB_ACL) $(LIB_XATTR) +diff -urNp coreutils-8.1-orig/src/Makefile.am coreutils-8.1/src/Makefile.am +--- coreutils-8.1-orig/src/Makefile.am 2009-11-20 13:06:00.000000000 +0100 ++++ coreutils-8.1/src/Makefile.am 2009-11-20 13:06:26.000000000 +0100 +@@ -100,6 +100,7 @@ EXTRA_PROGRAMS = \ + rm \ + rmdir \ + runcon \ ++ runuser \ + seq \ + sha1sum \ + sha224sum \ +@@ -296,6 +297,10 @@ cp_LDADD += $(copy_LDADD) + ginstall_LDADD += $(copy_LDADD) + mv_LDADD += $(copy_LDADD) +runuser_SOURCES = su.c +runuser_CFLAGS = -DRUNUSER -DAUTHORS="\"David MacKenzie, Dan Walsh\"" +runuser_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@ + - stat_LDADD = $(LDADD) $(LIB_SELINUX) - - # Append $(LIBICONV) to each program that uses proper_name_utf8. -@@ -173,7 +177,7 @@ RELEASE_YEAR = \ + remove_LDADD = + mv_LDADD += $(remove_LDADD) + rm_LDADD += $(remove_LDADD) +@@ -396,7 +401,7 @@ RELEASE_YEAR = \ `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \ $(top_srcdir)/lib/version-etc.c` @@ -86,10 +98,10 @@ diff -urNp coreutils-7.0.orig/src/Makefile.am coreutils-7.0/src/Makefile.am installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'` -diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c ---- coreutils-7.0.orig/src/su.c 2009-01-28 18:10:10.801926000 +0100 -+++ coreutils-7.0/src/su.c 2009-01-28 18:11:00.320247437 +0100 -@@ -109,9 +109,15 @@ +diff -urNp coreutils-8.1-orig/src/su.c coreutils-8.1/src/su.c +--- coreutils-8.1-orig/src/su.c 2009-11-20 13:06:00.000000000 +0100 ++++ coreutils-8.1/src/su.c 2009-11-20 13:06:26.000000000 +0100 +@@ -102,9 +102,15 @@ #include "error.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -105,7 +117,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c #if HAVE_PATHS_H # include -@@ -149,11 +155,18 @@ +@@ -142,9 +148,16 @@ #ifndef USE_PAM char *crypt (char const *key, char const *salt); #endif @@ -113,8 +125,6 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c +#define CHECKPASSWD 1 +#endif - extern char **environ; - static void run_shell (char const *, char const *, char **, size_t, - const struct passwd *) + const struct passwd * @@ -125,7 +135,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c #ifdef USE_PAM ; #else -@@ -183,6 +197,10 @@ static struct option const longopts[] = +@@ -171,6 +184,10 @@ static struct option const longopts[] = {"login", no_argument, NULL, 'l'}, {"preserve-environment", no_argument, NULL, 'p'}, {"shell", required_argument, NULL, 's'}, @@ -136,7 +146,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} -@@ -284,10 +302,12 @@ correct_password (const struct passwd *p +@@ -272,10 +289,12 @@ correct_password (const struct passwd *p retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh); PAM_BAIL_P; @@ -149,7 +159,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c caller = getpwuid(getuid()); if(caller != NULL && caller->pw_name != NULL) { -@@ -304,6 +324,11 @@ correct_password (const struct passwd *p +@@ -292,6 +311,11 @@ correct_password (const struct passwd *p retval = pam_set_item(pamh, PAM_TTY, tty_name); PAM_BAIL_P; } @@ -161,7 +171,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c retval = pam_authenticate(pamh, 0); PAM_BAIL_P; retval = pam_acct_mgmt(pamh, 0); -@@ -313,6 +338,7 @@ correct_password (const struct passwd *p +@@ -301,6 +325,7 @@ correct_password (const struct passwd *p PAM_BAIL_P; } PAM_BAIL_P; @@ -169,7 +179,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c /* must be authenticated if this point was reached */ return 1; #else /* !USE_PAM */ -@@ -394,11 +420,22 @@ modify_environment (const struct passwd +@@ -382,11 +407,22 @@ modify_environment (const struct passwd /* Become the user and group(s) specified by PW. */ static void @@ -194,7 +204,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c #ifdef USE_PAM pam_close_session(pamh, 0); pam_end(pamh, PAM_ABORT); -@@ -445,7 +482,11 @@ pam_copyenv (pam_handle_t *pamh) +@@ -433,7 +469,11 @@ pam_copyenv (pam_handle_t *pamh) static void run_shell (char const *shell, char const *command, char **additional_args, @@ -207,7 +217,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c { size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; char const **args = xnmalloc (n_args, sizeof *args); -@@ -476,7 +517,11 @@ run_shell (char const *shell, char const +@@ -464,7 +504,11 @@ run_shell (char const *shell, char const child = fork(); if (child == 0) { /* child shell */ @@ -220,7 +230,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c pam_end(pamh, 0); if (!same_session) setsid (); -@@ -620,6 +665,28 @@ usage (int status) +@@ -608,6 +652,28 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name); @@ -249,7 +259,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c fputs (_("\ Change the effective user id and group id to that of USER.\n\ \n\ -@@ -632,6 +697,7 @@ Change the effective user id and group i +@@ -620,6 +686,7 @@ Change the effective user id and group i -p same as -m\n\ -s, --shell=SHELL run SHELL if /etc/shells allows it\n\ "), stdout); @@ -257,7 +267,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ -@@ -653,6 +719,12 @@ main (int argc, char **argv) +@@ -641,6 +708,12 @@ main (int argc, char **argv) char *shell = NULL; struct passwd *pw; struct passwd pw_copy; @@ -270,7 +280,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -667,7 +739,11 @@ main (int argc, char **argv) +@@ -655,7 +728,11 @@ main (int argc, char **argv) simulate_login = false; change_environment = true; @@ -283,7 +293,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c { switch (optc) { -@@ -697,6 +773,28 @@ main (int argc, char **argv) +@@ -685,6 +762,28 @@ main (int argc, char **argv) shell = optarg; break; @@ -312,7 +322,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c case_GETOPT_HELP_CHAR; case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); -@@ -735,7 +833,20 @@ main (int argc, char **argv) +@@ -723,7 +822,20 @@ main (int argc, char **argv) : DEFAULT_SHELL); endpwent (); @@ -334,7 +344,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c { #ifdef SYSLOG_FAILURE log_su (pw, false); -@@ -767,8 +878,16 @@ main (int argc, char **argv) +@@ -755,7 +867,11 @@ main (int argc, char **argv) modify_environment (pw, shell); #ifndef USE_PAM @@ -346,6 +356,11 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c + ); #endif + /* error() flushes stderr, but does not check for write failure. +@@ -766,5 +882,9 @@ main (int argc, char **argv) + if (ferror (stderr)) + exit (EXIT_CANCELED); + - run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw); + run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw +#ifdef RUNUSER @@ -353,10 +368,18 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c +#endif + ); } -diff -urNp coreutils-7.5.orig/tests/misc/help-version coreutils-7.5/tests/misc/help-version ---- coreutils-7.5.orig/tests/misc/help-version -+++ coreutils-7.5/tests/misc/help-version -@@ -150,6 +150,7 @@ printf_args=foo +diff -urNp coreutils-8.1-orig/tests/misc/help-version coreutils-8.1/tests/misc/help-version +--- coreutils-8.1-orig/tests/misc/help-version 2009-11-14 15:01:44.000000000 +0100 ++++ coreutils-8.1/tests/misc/help-version 2009-11-20 13:06:26.000000000 +0100 +@@ -34,6 +34,7 @@ expected_failure_status_nohup=125 + expected_failure_status_stdbuf=125 + expected_failure_status_su=125 + expected_failure_status_timeout=125 ++expected_failure_status_runuser=125 + expected_failure_status_printenv=2 + expected_failure_status_tty=3 + expected_failure_status_sort=2 +@@ -153,6 +154,7 @@ seq_args=10 sleep_args=0 su_args=--version stdbuf_args="-oL true" @@ -364,16 +387,14 @@ diff -urNp coreutils-7.5.orig/tests/misc/help-version coreutils-7.5/tests/misc/h timeout_args=--version # I'd rather not run sync, since it spins up disks that I've -diff -urNp coreutils-7.6-orig/man/help2man coreutils-7.6/man/help2man ---- coreutils-7.6-orig/man/help2man 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-7.6/man/help2man 2009-09-22 15:15:01.000000000 +0200 -@@ -550,6 +550,9 @@ while (length) - $include{$sect} .= $content; - } - -+# There is no info documentation for runuser (shared with su). -+$opt_no_info = 1 if $program eq 'runuser'; -+ - # Refer to the real documentation. - unless ($opt_no_info) - { +diff -urNp coreutils-8.1-orig/tests/misc/invalid-opt coreutils-8.1/tests/misc/invalid-opt +--- coreutils-8.1-orig/tests/misc/invalid-opt 2009-10-26 10:05:25.000000000 +0100 ++++ coreutils-8.1/tests/misc/invalid-opt 2009-11-20 13:06:26.000000000 +0100 +@@ -37,6 +37,7 @@ my %exit_status = + sort => 2, + stdbuf => 125, + su => 125, ++ runuser => 125, + test => 0, + timeout => 125, + true => 0, diff --git a/coreutils-6.10-configuration.patch b/coreutils-6.10-configuration.patch index 9b1ec54..ec832ac 100644 --- a/coreutils-6.10-configuration.patch +++ b/coreutils-6.10-configuration.patch @@ -66,3 +66,15 @@ diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c #include "acl.h" #include "argmatch.h" #include "dev-ino.h" +diff -urNp coreutils-8.1-orig/tests/touch/no-dereference coreutils-8.1/tests/touch/no-dereference +--- coreutils-8.1-orig/tests/touch/no-dereference 2009-10-30 12:51:07.000000000 +0100 ++++ coreutils-8.1/tests/touch/no-dereference 2009-11-27 13:31:10.000000000 +0100 +@@ -46,6 +46,8 @@ test -f nowhere && fail=1 + grep '^#define HAVE_UTIMENSAT' "$CONFIG_HEADER" > /dev/null || + grep '^#define HAVE_LUTIMES' "$CONFIG_HEADER" > /dev/null || + skip_test_ 'this system lacks the utimensat function' ++grep '^#define HAVE_WORKINGKOJI' "$CONFIG_HEADER" > /dev/null || ++ skip_test_ 'rest of the test disabled due to koji lack of utimensat function' + + # Changing time of dangling symlink is okay. + touch -h dangling || fail=1 diff --git a/coreutils-8.1-kojiutimens-symlinks.patch b/coreutils-8.1-kojiutimens-symlinks.patch new file mode 100644 index 0000000..94b6ee4 --- /dev/null +++ b/coreutils-8.1-kojiutimens-symlinks.patch @@ -0,0 +1,75 @@ +diff -urNp coreutils-8.1-orig/lib/utimens.c coreutils-8.1/lib/utimens.c +--- coreutils-8.1-orig/lib/utimens.c 2009-11-18 15:57:45.000000000 +0100 ++++ coreutils-8.1/lib/utimens.c 2009-11-27 13:02:03.000000000 +0100 +@@ -54,10 +54,12 @@ struct utimbuf + #undef utimensat + + #if HAVE_UTIMENSAT || HAVE_FUTIMENS +-/* Cache variable for whether syscall works; used to avoid calling the +- syscall if we know it will just fail with ENOSYS. 0 = unknown, 1 = +- yes, -1 = no. */ ++/* Cache variables for whether the utimensat syscall works; used to ++ avoid calling the syscall if we know it will just fail with ENOSYS. ++ There are some Linux kernel versions where a flag of 0 passes, but ++ not AT_SYMLINK_NOFOLLOW. 0 = unknown, 1 = yes, -1 = no. */ + static int utimensat_works_really; ++static int lutimensat_works_really; + #endif /* HAVE_UTIMENSAT || HAVE_UTIMENSAT */ + + /* Solaris 9 mistakenly succeeds when given a non-directory with a +@@ -242,6 +244,7 @@ fdutimens (char const *file, int fd, str + # endif /* HAVE_FUTIMENS */ + } + utimensat_works_really = -1; ++ lutimensat_works_really = -1; + #endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */ + + /* The platform lacks an interface to set file timestamps with +@@ -381,7 +384,7 @@ lutimens (char const *file, struct times + worry about bogus return values. */ + + #if HAVE_UTIMENSAT +- if (0 <= utimensat_works_really) ++ if (0 <= lutimensat_works_really) + { + int result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW); + # ifdef __linux__ +@@ -397,11 +400,11 @@ lutimens (char const *file, struct times + # endif + if (result == 0 || errno != ENOSYS) + { +- utimensat_works_really = 1; ++ lutimensat_works_really = 1; + return result; + } + } +- utimensat_works_really = -1; ++ lutimensat_works_really = -1; + #endif /* HAVE_UTIMENSAT */ + + /* The platform lacks an interface to set file timestamps with +@@ -416,7 +419,9 @@ lutimens (char const *file, struct times + return 0; + } + +-#if HAVE_LUTIMES ++/* On Linux, lutimes is a thin wrapper around utimensat, so there is ++ no point trying lutimes if utimensat failed with ENOSYS. */ ++#if HAVE_LUTIMES && !HAVE_UTIMENSAT + { + struct timeval timeval[2]; + struct timeval const *t; +@@ -431,9 +436,11 @@ lutimens (char const *file, struct times + else + t = NULL; + +- return lutimes (file, t); ++ result = lutimes (file, t); ++ if (result == 0 || errno != ENOSYS) ++ return result; + } +-#endif /* HAVE_LUTIMES */ ++#endif /* HAVE_LUTIMES && !HAVE_UTIMENSAT */ + + /* Out of luck for symlinks, but we still handle regular files. */ + if (!(adjustment_needed || REPLACE_FUNC_STAT_FILE) && lstat (file, &st)) diff --git a/coreutils-8.1-unsearchablepath.patch b/coreutils-8.1-unsearchablepath.patch new file mode 100644 index 0000000..ac71950 --- /dev/null +++ b/coreutils-8.1-unsearchablepath.patch @@ -0,0 +1,43 @@ +diff -urNp coreutils-8.1-orig/tests/test-lib.sh coreutils-8.1/tests/test-lib.sh +--- coreutils-8.1-orig/tests/test-lib.sh 2009-11-24 09:35:12.000000000 +0100 ++++ coreutils-8.1/tests/test-lib.sh 2009-11-24 09:37:17.000000000 +0100 +@@ -23,6 +23,31 @@ if test $? != 11; then + Exit 77 + fi + ++# Having an unsearchable directory in PATH causes execve to fail with EACCES ++# when applied to an unresolvable program name, contrary to the desired ENOENT. ++# Avoid the problem by rewriting PATH to exclude unsearchable directories. ++sanitize_path_() ++{ ++ local saved_IFS=$IFS ++ IFS=: ++ set - $PATH ++ IFS=$saved_IFS ++ ++ local d d1 ++ local colon= ++ local new_path= ++ for d in "$@"; do ++ test -z "$d" && d1=. || d1=$d ++ if ls -d "$d1/." > /dev/null 2>&1; then ++ new_path="$new_path$colon$d" ++ colon=':' ++ fi ++ done ++ ++ PATH=$new_path ++ export PATH ++} ++ + skip_test_() + { + echo "$0: skipping test: $@" | head -1 1>&9 +@@ -396,5 +421,7 @@ else + compare() { cmp "$@"; } + fi + ++sanitize_path_ ++ + # Initialize; all bourne shell scripts end with "Exit $fail". + fail=0 diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS index 47386de..8aec576 100644 --- a/coreutils-DIR_COLORS +++ b/coreutils-DIR_COLORS @@ -1,5 +1,5 @@ # Configuration file for the color ls utility -# Synchronized with coreutils 7.1 dircolors +# Synchronized with coreutils 8.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. diff --git a/coreutils-DIR_COLORS.256color b/coreutils-DIR_COLORS.256color index 8155775..e757fe1 100644 --- a/coreutils-DIR_COLORS.256color +++ b/coreutils-DIR_COLORS.256color @@ -1,6 +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 +# Synchronized with coreutils 8.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 diff --git a/coreutils-DIR_COLORS.lightbgcolor b/coreutils-DIR_COLORS.lightbgcolor index fbd1609..ce55538 100644 --- a/coreutils-DIR_COLORS.lightbgcolor +++ b/coreutils-DIR_COLORS.lightbgcolor @@ -1,5 +1,5 @@ # Configuration file for the color ls utility - modified for gray backgrounds -# Synchronized with coreutils 7.1 dircolors +# Synchronized with coreutils 8.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. diff --git a/coreutils-getgrouplist.patch b/coreutils-getgrouplist.patch index 9ef6ad0..e5c2985 100644 --- a/coreutils-getgrouplist.patch +++ b/coreutils-getgrouplist.patch @@ -10,11 +10,11 @@ diff -urp coreutils-6.10-orig/lib/getugroups.c coreutils-6.10/lib/getugroups.c + #include "getugroups.h" - #include -@@ -114,3 +117,4 @@ getugroups (int maxcount, GETGROUPS_T *g - - return count; + #include +@@ -123,3 +126,4 @@ getugroups (int maxcount, GETGROUPS_T *g } + + #endif /* HAVE_GRP_H */ +#endif /* have getgrouplist */ diff -urp coreutils-6.10-orig/m4/jm-macros.m4 coreutils-6.10/m4/jm-macros.m4 --- coreutils-6.10-orig/m4/jm-macros.m4 2007-11-25 14:23:31.000000000 +0100 diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 731ca3f..6c34d06 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -3557,7 +3557,7 @@ diff -urNp coreutils-8.0-orig/src/uniq.c coreutils-8.0/src/uniq.c #include "argmatch.h" #include "linebuffer.h" @@ -31,7 +41,19 @@ - #include "quote.h" + #include "stdio--.h" #include "xmemcoll.h" #include "xstrtol.h" -#include "memcasecmp.h" diff --git a/coreutils-pam.patch b/coreutils-pam.patch index 24f7437..ae6d1be 100644 --- a/coreutils-pam.patch +++ b/coreutils-pam.patch @@ -1,8 +1,8 @@ -diff -urNp coreutils-8.0-orig/configure.ac coreutils-8.0/configure.ac ---- coreutils-8.0-orig/configure.ac 2009-09-29 15:27:11.000000000 +0200 -+++ coreutils-8.0/configure.ac 2009-10-07 10:04:27.000000000 +0200 -@@ -115,6 +115,13 @@ if test "$gl_gcc_warnings" = yes; then - AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) +diff -urNp coreutils-8.1-orig/configure.ac coreutils-8.1/configure.ac +--- coreutils-8.1-orig/configure.ac 2009-11-14 15:01:44.000000000 +0100 ++++ coreutils-8.1/configure.ac 2009-11-20 13:00:10.000000000 +0100 +@@ -126,6 +126,13 @@ if test "$gl_gcc_warnings" = yes; then + AC_SUBST([GNULIB_WARN_CFLAGS]) fi +dnl Give the chance to enable PAM @@ -15,10 +15,10 @@ diff -urNp coreutils-8.0-orig/configure.ac coreutils-8.0/configure.ac AC_FUNC_FORK optional_bin_progs= -diff -urNp coreutils-8.0-orig/doc/coreutils.texi coreutils-8.0/doc/coreutils.texi ---- coreutils-8.0-orig/doc/coreutils.texi 2009-09-29 15:27:54.000000000 +0200 -+++ coreutils-8.0/doc/coreutils.texi 2009-10-07 10:04:27.000000000 +0200 -@@ -14742,8 +14742,11 @@ to certain shells, etc.). +diff -urNp coreutils-8.1-orig/doc/coreutils.texi coreutils-8.1/doc/coreutils.texi +--- coreutils-8.1-orig/doc/coreutils.texi 2009-11-10 13:57:56.000000000 +0100 ++++ coreutils-8.1/doc/coreutils.texi 2009-11-20 13:00:10.000000000 +0100 +@@ -15070,8 +15070,11 @@ to certain shells, etc.). @findex syslog @command{su} can optionally be compiled to use @code{syslog} to report failed, and optionally successful, @command{su} attempts. (If the system @@ -32,7 +32,7 @@ diff -urNp coreutils-8.0-orig/doc/coreutils.texi coreutils-8.0/doc/coreutils.tex The program accepts the following options. Also see @ref{Common options}. -@@ -14785,6 +14788,8 @@ environment variables except @env{TERM}, +@@ -15113,6 +15116,8 @@ environment variables except @env{TERM}, @env{PATH} to a compiled-in default value. Change to @var{user}'s home directory. Prepend @samp{-} to the shell's name, intended to make it read its login startup file(s). @@ -41,7 +41,7 @@ diff -urNp coreutils-8.0-orig/doc/coreutils.texi coreutils-8.0/doc/coreutils.tex @item -m @itemx -p -@@ -14824,33 +14829,6 @@ Exit status: +@@ -15152,33 +15157,6 @@ Exit status: the exit status of the subshell otherwise @end display @@ -75,21 +75,21 @@ diff -urNp coreutils-8.0-orig/doc/coreutils.texi coreutils-8.0/doc/coreutils.tex @node timeout invocation @section @command{timeout}: Run a command with a time limit -diff -urNp coreutils-8.0-orig/src/Makefile.am coreutils-8.0/src/Makefile.am ---- coreutils-8.0-orig/src/Makefile.am 2009-09-21 14:29:33.000000000 +0200 -+++ coreutils-8.0/src/Makefile.am 2009-10-07 10:04:27.000000000 +0200 -@@ -154,7 +154,7 @@ tail_LDADD = $(nanosec_libs) - # If necessary, add -lm to resolve use of pow in lib/strtod.c. - uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) +diff -urNp coreutils-8.1-orig/src/Makefile.am coreutils-8.1/src/Makefile.am +--- coreutils-8.1-orig/src/Makefile.am 2009-11-06 18:04:10.000000000 +0100 ++++ coreutils-8.1/src/Makefile.am 2009-11-20 13:00:10.000000000 +0100 +@@ -359,7 +359,7 @@ factor_LDADD += $(LIB_GMP) + uptime_LDADD += $(GETLOADAVG_LIBS) --su_LDADD = $(LDADD) $(LIB_CRYPT) -+su_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@ + # for crypt +-su_LDADD += $(LIB_CRYPT) ++su_LDADD += $(LIB_CRYPT) @LIB_PAM@ - dir_LDADD += $(LIB_ACL) - ls_LDADD += $(LIB_ACL) -diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c ---- coreutils-8.0-orig/src/su.c 2009-10-07 10:03:29.000000000 +0200 -+++ coreutils-8.0/src/su.c 2009-10-07 10:04:27.000000000 +0200 + # for various ACL functions + copy_LDADD += $(LIB_ACL) +diff -urNp coreutils-8.1-orig/src/su.c coreutils-8.1/src/su.c +--- coreutils-8.1-orig/src/su.c 2009-11-20 12:59:39.000000000 +0100 ++++ coreutils-8.1/src/su.c 2009-11-20 13:00:10.000000000 +0100 @@ -37,6 +37,16 @@ restricts who can su to UID 0 accounts. RMS considers that to be fascist. @@ -123,7 +123,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c #include "system.h" #include "getpass.h" -@@ -120,12 +139,19 @@ +@@ -120,10 +139,17 @@ /* The user to become if none is specified. */ #define DEFAULT_USER "root" @@ -131,8 +131,6 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c char *crypt (char const *key, char const *salt); +#endif - extern char **environ; - -static void run_shell (char const *, char const *, char **, size_t) +static void run_shell (char const *, char const *, char **, size_t, + const struct passwd *) @@ -144,7 +142,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c /* If true, pass the `-f' option to the subshell. */ static bool fast_startup; -@@ -211,7 +237,26 @@ log_su (struct passwd const *pw, bool su +@@ -209,7 +235,26 @@ log_su (struct passwd const *pw, bool su } #endif @@ -171,7 +169,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c Return true if the user gives the correct password for entry PW, false if not. Return true without asking for a password if run by UID 0 or if PW has an empty password. */ -@@ -219,6 +264,44 @@ log_su (struct passwd const *pw, bool su +@@ -217,6 +262,44 @@ log_su (struct passwd const *pw, bool su static bool correct_password (const struct passwd *pw) { @@ -216,7 +214,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c char *unencrypted, *encrypted, *correct; #if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP /* Shadow passwd stuff for SVR3 and maybe other systems. */ -@@ -243,6 +326,7 @@ correct_password (const struct passwd *p +@@ -241,6 +324,7 @@ correct_password (const struct passwd *p encrypted = crypt (unencrypted, correct); memset (unencrypted, 0, strlen (unencrypted)); return STREQ (encrypted, correct); @@ -224,7 +222,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c } /* Update `environ' for the new shell based on PW, with SHELL being -@@ -256,12 +340,18 @@ modify_environment (const struct passwd +@@ -254,12 +338,18 @@ modify_environment (const struct passwd /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. Unset all other environment variables. */ char const *term = getenv ("TERM"); @@ -243,7 +241,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c xsetenv ("HOME", pw->pw_dir); xsetenv ("SHELL", shell); xsetenv ("USER", pw->pw_name); -@@ -294,8 +384,13 @@ change_identity (const struct passwd *pw +@@ -292,8 +382,13 @@ change_identity (const struct passwd *pw { #ifdef HAVE_INITGROUPS errno = 0; @@ -253,13 +251,13 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c + pam_close_session(pamh, 0); + pam_end(pamh, PAM_ABORT); +#endif - error (EXIT_FAILURE, errno, _("cannot set groups")); + error (EXIT_CANCELED, errno, _("cannot set groups")); + } endgrent (); #endif if (setgid (pw->pw_gid)) -@@ -304,6 +399,31 @@ change_identity (const struct passwd *pw - error (EXIT_FAILURE, errno, _("cannot set user id")); +@@ -302,6 +397,31 @@ change_identity (const struct passwd *pw + error (EXIT_CANCELED, errno, _("cannot set user id")); } +#ifdef USE_PAM @@ -290,7 +288,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c /* Run SHELL, or DEFAULT_SHELL if SHELL is empty. If COMMAND is nonzero, pass it to the shell with the -c option. Pass ADDITIONAL_ARGS to the shell as more arguments; there -@@ -311,17 +431,49 @@ change_identity (const struct passwd *pw +@@ -309,17 +429,49 @@ change_identity (const struct passwd *pw static void run_shell (char const *shell, char const *command, char **additional_args, @@ -341,7 +339,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c shell_basename = last_component (shell); arg0 = xmalloc (strlen (shell_basename) + 2); arg0[0] = '-'; -@@ -346,6 +498,66 @@ run_shell (char const *shell, char const +@@ -344,6 +496,66 @@ run_shell (char const *shell, char const error (0, errno, "%s", shell); exit (exit_status); } @@ -408,7 +406,7 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c } /* Return true if SHELL is a restricted shell (one not returned by -@@ -513,9 +725,9 @@ main (int argc, char **argv) +@@ -511,9 +723,9 @@ main (int argc, char **argv) shell = xstrdup (shell ? shell : pw->pw_shell); modify_environment (pw, shell); @@ -418,7 +416,12 @@ diff -urNp coreutils-8.0-orig/src/su.c coreutils-8.0/src/su.c - error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir); +#endif + /* error() flushes stderr, but does not check for write failure. + Normally, we would catch this via our atexit() hook of +@@ -523,5 +735,5 @@ main (int argc, char **argv) + if (ferror (stderr)) + exit (EXIT_CANCELED); + - run_shell (shell, command, argv + optind, MAX (0, argc - optind)); + run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw); } - diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index a2dc61d..f557dca 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -1,7 +1,7 @@ -diff -urNp coreutils-8.0-orig/configure.ac coreutils-8.0/configure.ac ---- coreutils-8.0-orig/configure.ac 2009-10-07 10:09:43.000000000 +0200 -+++ coreutils-8.0/configure.ac 2009-10-07 10:10:11.000000000 +0200 -@@ -122,6 +122,13 @@ AC_ARG_ENABLE(pam, dnl +diff -urNp coreutils-8.1-orig/configure.ac coreutils-8.1/configure.ac +--- coreutils-8.1-orig/configure.ac 2009-11-20 13:11:20.000000000 +0100 ++++ coreutils-8.1/configure.ac 2009-11-20 13:11:40.000000000 +0100 +@@ -133,6 +133,13 @@ AC_ARG_ENABLE(pam, dnl LIB_PAM="-ldl -lpam -lpam_misc" AC_SUBST(LIB_PAM)]) @@ -15,18 +15,18 @@ diff -urNp coreutils-8.0-orig/configure.ac coreutils-8.0/configure.ac AC_FUNC_FORK optional_bin_progs= -diff -urNp coreutils-8.0-orig/man/chcon.x coreutils-8.0/man/chcon.x ---- coreutils-8.0-orig/man/chcon.x 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-8.0/man/chcon.x 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/man/chcon.x coreutils-8.1/man/chcon.x +--- coreutils-8.1-orig/man/chcon.x 2009-09-01 13:01:16.000000000 +0200 ++++ coreutils-8.1/man/chcon.x 2009-11-20 13:11:40.000000000 +0100 @@ -1,4 +1,4 @@ [NAME] -chcon \- change file security context +chcon \- change file SELinux security context [DESCRIPTION] .\" Add any additional description here -diff -urNp coreutils-8.0-orig/man/runcon.x coreutils-8.0/man/runcon.x ---- coreutils-8.0-orig/man/runcon.x 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-8.0/man/runcon.x 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/man/runcon.x coreutils-8.1/man/runcon.x +--- coreutils-8.1-orig/man/runcon.x 2009-09-01 13:01:16.000000000 +0200 ++++ coreutils-8.1/man/runcon.x 2009-11-20 13:11:40.000000000 +0100 @@ -1,5 +1,5 @@ [NAME] -runcon \- run command with specified security context @@ -34,10 +34,10 @@ diff -urNp coreutils-8.0-orig/man/runcon.x coreutils-8.0/man/runcon.x [DESCRIPTION] Run COMMAND with completely-specified CONTEXT, or with current or transitioned security context modified by one or more of LEVEL, -diff -urNp coreutils-8.0-orig/src/copy.c coreutils-8.0/src/copy.c ---- coreutils-8.0-orig/src/copy.c 2009-09-29 15:27:54.000000000 +0200 -+++ coreutils-8.0/src/copy.c 2009-10-07 10:10:11.000000000 +0200 -@@ -1943,6 +1943,8 @@ copy_internal (char const *src_name, cha +diff -urNp coreutils-8.1-orig/src/copy.c coreutils-8.1/src/copy.c +--- coreutils-8.1-orig/src/copy.c 2009-10-22 11:18:05.000000000 +0200 ++++ coreutils-8.1/src/copy.c 2009-11-20 13:11:40.000000000 +0100 +@@ -1935,6 +1935,8 @@ copy_internal (char const *src_name, cha { /* Here, we are crossing a file system boundary and cp's -x option is in effect: so don't copy the contents of this directory. */ @@ -46,9 +46,9 @@ diff -urNp coreutils-8.0-orig/src/copy.c coreutils-8.0/src/copy.c } else { -diff -urNp coreutils-8.0-orig/src/copy.h coreutils-8.0/src/copy.h ---- coreutils-8.0-orig/src/copy.h 2009-09-21 14:29:33.000000000 +0200 -+++ coreutils-8.0/src/copy.h 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/copy.h coreutils-8.1/src/copy.h +--- coreutils-8.1-orig/src/copy.h 2009-09-21 14:29:33.000000000 +0200 ++++ coreutils-8.1/src/copy.h 2009-11-20 13:11:40.000000000 +0100 @@ -158,6 +158,9 @@ struct cp_options bool preserve_mode; bool preserve_timestamps; @@ -59,9 +59,9 @@ diff -urNp coreutils-8.0-orig/src/copy.h coreutils-8.0/src/copy.h /* Enabled for mv, and for cp by the --preserve=links option. If true, attempt to preserve in the destination files any logical hard links between the source files. If used with cp's -diff -urNp coreutils-8.0-orig/src/cp.c coreutils-8.0/src/cp.c ---- coreutils-8.0-orig/src/cp.c 2009-09-29 15:27:54.000000000 +0200 -+++ coreutils-8.0/src/cp.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/cp.c coreutils-8.1/src/cp.c +--- coreutils-8.1-orig/src/cp.c 2009-09-29 15:27:54.000000000 +0200 ++++ coreutils-8.1/src/cp.c 2009-11-20 13:11:40.000000000 +0100 @@ -139,6 +139,7 @@ static struct option const long_opts[] = {"target-directory", required_argument, NULL, 't'}, {"update", no_argument, NULL, 'u'}, @@ -150,10 +150,10 @@ diff -urNp coreutils-8.0-orig/src/cp.c coreutils-8.0/src/cp.c case 'S': make_backups = true; backup_suffix_string = optarg; -diff -urNp coreutils-8.0-orig/src/chcon.c coreutils-8.0/src/chcon.c ---- coreutils-8.0-orig/src/chcon.c 2009-10-06 10:55:34.000000000 +0200 -+++ coreutils-8.0/src/chcon.c 2009-10-07 10:10:11.000000000 +0200 -@@ -348,7 +348,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\ +diff -urNp coreutils-8.1-orig/src/chcon.c coreutils-8.1/src/chcon.c +--- coreutils-8.1-orig/src/chcon.c 2009-11-07 08:46:30.000000000 +0100 ++++ coreutils-8.1/src/chcon.c 2009-11-20 13:11:40.000000000 +0100 +@@ -356,7 +356,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\ "), program_name, program_name, program_name); fputs (_("\ @@ -162,9 +162,9 @@ diff -urNp coreutils-8.0-orig/src/chcon.c coreutils-8.0/src/chcon.c With --reference, change the security context of each FILE to that of RFILE.\n\ \n\ -h, --no-dereference affect symbolic links instead of any referenced file\n\ -diff -urNp coreutils-8.0-orig/src/id.c coreutils-8.0/src/id.c ---- coreutils-8.0-orig/src/id.c 2009-09-29 15:27:54.000000000 +0200 -+++ coreutils-8.0/src/id.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/id.c coreutils-8.1/src/id.c +--- coreutils-8.1-orig/src/id.c 2009-11-13 15:56:41.000000000 +0100 ++++ coreutils-8.1/src/id.c 2009-11-20 13:11:40.000000000 +0100 @@ -107,7 +107,7 @@ int main (int argc, char **argv) { @@ -174,9 +174,9 @@ diff -urNp coreutils-8.0-orig/src/id.c coreutils-8.0/src/id.c /* If true, output the list of all group IDs. -G */ bool just_group_list = false; -diff -urNp coreutils-8.0-orig/src/install.c coreutils-8.0/src/install.c ---- coreutils-8.0-orig/src/install.c 2009-09-29 15:27:54.000000000 +0200 -+++ coreutils-8.0/src/install.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/install.c coreutils-8.1/src/install.c +--- coreutils-8.1-orig/src/install.c 2009-09-29 15:27:54.000000000 +0200 ++++ coreutils-8.1/src/install.c 2009-11-20 13:11:40.000000000 +0100 @@ -284,6 +284,7 @@ cp_option_init (struct cp_options *x) x->reduce_diagnostics=false; x->require_preserve = false; @@ -232,9 +232,9 @@ diff -urNp coreutils-8.0-orig/src/install.c coreutils-8.0/src/install.c "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); -diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c ---- coreutils-8.0-orig/src/ls.c 2009-10-07 10:09:43.000000000 +0200 -+++ coreutils-8.0/src/ls.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/ls.c coreutils-8.1/src/ls.c +--- coreutils-8.1-orig/src/ls.c 2009-11-20 13:11:20.000000000 +0100 ++++ coreutils-8.1/src/ls.c 2009-11-20 13:11:40.000000000 +0100 @@ -162,7 +162,8 @@ enum filetype symbolic_link, sock, @@ -384,7 +384,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c default: usage (LS_FAILURE); } -@@ -2651,8 +2675,10 @@ clear_files (void) +@@ -2682,8 +2706,10 @@ clear_files (void) struct fileinfo *f = sorted_file[i]; free (f->name); free (f->linkname); @@ -397,7 +397,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c } cwd_n_used = 0; -@@ -2694,6 +2720,7 @@ gobble_file (char const *name, enum file +@@ -2725,6 +2751,7 @@ gobble_file (char const *name, enum file memset (f, '\0', sizeof *f); f->stat.st_ino = inode; f->filetype = type; @@ -405,16 +405,16 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c if (command_line_arg || format_needs_stat -@@ -2793,7 +2820,7 @@ gobble_file (char const *name, enum file - - f->stat_ok = true; +@@ -2834,7 +2861,7 @@ gobble_file (char const *name, enum file + && print_with_color && is_colored (C_CAP)) + f->has_capability = has_capability (absolute_name); - if (format == long_format || print_scontext) + if (format == long_format || format == security_format || print_scontext) { bool have_selinux = false; bool have_acl = false; -@@ -2827,7 +2854,7 @@ gobble_file (char const *name, enum file +@@ -2857,7 +2884,7 @@ gobble_file (char const *name, enum file err = 0; } @@ -423,7 +423,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c { int n = file_has_acl (absolute_name, &f->stat); err = (n < 0); -@@ -2846,7 +2873,8 @@ gobble_file (char const *name, enum file +@@ -2876,7 +2903,8 @@ gobble_file (char const *name, enum file } if (S_ISLNK (f->stat.st_mode) @@ -433,7 +433,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c { char *linkname; struct stat linkstats; -@@ -2866,6 +2894,7 @@ gobble_file (char const *name, enum file +@@ -2896,6 +2924,7 @@ gobble_file (char const *name, enum file command line are automatically traced if not being listed as files. */ if (!command_line_arg || format == long_format @@ -441,7 +441,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c || !S_ISDIR (linkstats.st_mode)) { /* Get the linked-to file's mode for the filetype indicator -@@ -2905,7 +2934,7 @@ gobble_file (char const *name, enum file +@@ -2935,7 +2964,7 @@ gobble_file (char const *name, enum file block_size_width = len; } @@ -450,7 +450,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c { if (print_owner) { -@@ -3406,6 +3435,13 @@ print_current_files (void) +@@ -3436,6 +3465,13 @@ print_current_files (void) print_long_format (sorted_file[i]); DIRED_PUTCHAR ('\n'); } @@ -464,7 +464,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c break; } } -@@ -3568,6 +3604,69 @@ format_inode (char *buf, size_t buflen, +@@ -3598,6 +3634,67 @@ format_inode (char *buf, size_t buflen, : (char *) "?"); } @@ -513,14 +513,12 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c + + 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); ++ size_t w = print_name_with_quoting (f, false, &dired_obstack, 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 ); ++ print_name_with_quoting (f, true, NULL, (p - buf) + w + 4); + if (indicator_style != none) + print_type_indicator (f->stat_ok, f->linkmode, f->filetype); + } @@ -534,7 +532,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c /* Print information about F in long format. */ static void print_long_format (const struct fileinfo *f) -@@ -3659,9 +3758,15 @@ print_long_format (const struct fileinfo +@@ -3689,9 +3786,15 @@ print_long_format (const struct fileinfo The latter is wrong when nlink_width is zero. */ p += strlen (p); @@ -551,7 +549,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c { DIRED_FPUTS (buf, stdout, p - buf); -@@ -3674,9 +3779,6 @@ print_long_format (const struct fileinfo +@@ -3704,9 +3807,6 @@ print_long_format (const struct fileinfo if (print_author) format_user (f->stat.st_author, author_width, f->stat_ok); @@ -561,17 +559,17 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c p = buf; } -@@ -4020,9 +4122,6 @@ print_file_name_and_frills (const struct +@@ -4047,9 +4147,6 @@ print_file_name_and_frills (const struct : human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts, ST_NBLOCKSIZE, output_block_size)); - if (print_scontext) - printf ("%*s ", format == with_commas ? 0 : scontext_width, f->scontext); - - 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); -@@ -4241,9 +4340,6 @@ length_of_file_name_and_frills (const st + size_t width = print_name_with_quoting (f, false, NULL, start_col); + + if (indicator_style != none) +@@ -4248,9 +4345,6 @@ length_of_file_name_and_frills (const st output_block_size)) : block_size_width); @@ -581,7 +579,7 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c quote_name (NULL, f->name, filename_quoting_options, &name_width); len += name_width; -@@ -4674,9 +4770,16 @@ Mandatory arguments to long options are +@@ -4681,9 +4775,16 @@ Mandatory arguments to long options are -w, --width=COLS assume screen width instead of current value\n\ -x list entries by lines instead of by columns\n\ -X sort alphabetically by entry extension\n\ @@ -599,9 +597,9 @@ diff -urNp coreutils-8.0-orig/src/ls.c coreutils-8.0/src/ls.c fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); emit_size_note (); -diff -urNp coreutils-8.0-orig/src/mkdir.c coreutils-8.0/src/mkdir.c ---- coreutils-8.0-orig/src/mkdir.c 2009-09-23 10:25:44.000000000 +0200 -+++ coreutils-8.0/src/mkdir.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/mkdir.c coreutils-8.1/src/mkdir.c +--- coreutils-8.1-orig/src/mkdir.c 2009-09-23 10:25:44.000000000 +0200 ++++ coreutils-8.1/src/mkdir.c 2009-11-20 13:11:40.000000000 +0100 @@ -38,6 +38,7 @@ static struct option const longopts[] = { @@ -610,9 +608,9 @@ diff -urNp coreutils-8.0-orig/src/mkdir.c coreutils-8.0/src/mkdir.c {"mode", required_argument, NULL, 'm'}, {"parents", no_argument, NULL, 'p'}, {"verbose", no_argument, NULL, 'v'}, -diff -urNp coreutils-8.0-orig/src/mknod.c coreutils-8.0/src/mknod.c ---- coreutils-8.0-orig/src/mknod.c 2009-09-23 10:25:44.000000000 +0200 -+++ coreutils-8.0/src/mknod.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/mknod.c coreutils-8.1/src/mknod.c +--- coreutils-8.1-orig/src/mknod.c 2009-09-23 10:25:44.000000000 +0200 ++++ coreutils-8.1/src/mknod.c 2009-11-20 13:11:40.000000000 +0100 @@ -35,7 +35,7 @@ static struct option const longopts[] = @@ -622,9 +620,9 @@ diff -urNp coreutils-8.0-orig/src/mknod.c coreutils-8.0/src/mknod.c {"mode", required_argument, NULL, 'm'}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, -diff -urNp coreutils-8.0-orig/src/mv.c coreutils-8.0/src/mv.c ---- coreutils-8.0-orig/src/mv.c 2009-09-23 10:25:44.000000000 +0200 -+++ coreutils-8.0/src/mv.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/mv.c coreutils-8.1/src/mv.c +--- coreutils-8.1-orig/src/mv.c 2009-09-23 10:25:44.000000000 +0200 ++++ coreutils-8.1/src/mv.c 2009-11-20 13:11:40.000000000 +0100 @@ -118,6 +118,7 @@ cp_option_init (struct cp_options *x) x->preserve_mode = true; x->preserve_timestamps = true; @@ -633,9 +631,9 @@ diff -urNp coreutils-8.0-orig/src/mv.c coreutils-8.0/src/mv.c x->reduce_diagnostics = false; x->require_preserve = false; /* FIXME: maybe make this an option */ x->require_preserve_context = false; -diff -urNp coreutils-8.0-orig/src/runcon.c coreutils-8.0/src/runcon.c ---- coreutils-8.0-orig/src/runcon.c 2009-10-06 10:55:34.000000000 +0200 -+++ coreutils-8.0/src/runcon.c 2009-10-07 10:10:11.000000000 +0200 +diff -urNp coreutils-8.1-orig/src/runcon.c coreutils-8.1/src/runcon.c +--- coreutils-8.1-orig/src/runcon.c 2009-10-29 14:53:40.000000000 +0100 ++++ coreutils-8.1/src/runcon.c 2009-11-20 13:11:40.000000000 +0100 @@ -86,7 +86,7 @@ Usage: %s CONTEXT COMMAND [args]\n\ or: %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\ "), program_name, program_name); @@ -645,10 +643,10 @@ diff -urNp coreutils-8.0-orig/src/runcon.c coreutils-8.0/src/runcon.c With neither CONTEXT nor COMMAND, print the current security context.\n\ \n\ CONTEXT Complete security context\n\ -diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c ---- coreutils-8.0-orig/src/stat.c 2009-09-29 16:25:44.000000000 +0200 -+++ coreutils-8.0/src/stat.c 2009-10-07 10:10:11.000000000 +0200 -@@ -825,7 +825,7 @@ print_it (char const *format, char const +diff -urNp coreutils-8.1-orig/src/stat.c coreutils-8.1/src/stat.c +--- coreutils-8.1-orig/src/stat.c 2009-10-29 11:11:29.000000000 +0100 ++++ coreutils-8.1/src/stat.c 2009-11-20 13:11:40.000000000 +0100 +@@ -858,7 +858,7 @@ print_it (char const *format, char const /* Stat the file system and print what we find. */ static bool @@ -657,7 +655,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c { STRUCT_STATVFS statfsbuf; -@@ -844,15 +844,31 @@ do_statfs (char const *filename, bool te +@@ -877,15 +877,31 @@ do_statfs (char const *filename, bool te } if (format == NULL) @@ -694,7 +692,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c print_it (format, filename, print_statfs, &statfsbuf); return true; -@@ -860,7 +876,7 @@ do_statfs (char const *filename, bool te +@@ -893,7 +909,7 @@ do_statfs (char const *filename, bool te /* stat the file and print what we find */ static bool @@ -703,7 +701,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c { struct stat statbuf; -@@ -881,9 +897,12 @@ do_stat (char const *filename, bool ters +@@ -919,9 +935,12 @@ do_stat (char const *filename, bool ters if (format == NULL) { if (terse) @@ -719,7 +717,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c else { /* Temporary hack to match original output until conditional -@@ -900,12 +919,22 @@ do_stat (char const *filename, bool ters +@@ -938,12 +957,22 @@ do_stat (char const *filename, bool ters } else { @@ -748,7 +746,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c } } } -@@ -926,6 +955,7 @@ usage (int status) +@@ -964,6 +993,7 @@ usage (int status) Display file or file system status.\n\ \n\ -L, --dereference follow links\n\ @@ -756,7 +754,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c -f, --file-system display file system status instead of file status\n\ "), stdout); fputs (_("\ -@@ -1010,6 +1040,7 @@ main (int argc, char *argv[]) +@@ -1048,6 +1078,7 @@ main (int argc, char *argv[]) int i; bool fs = false; bool terse = false; @@ -764,7 +762,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c char *format = NULL; bool ok = true; -@@ -1049,13 +1080,13 @@ main (int argc, char *argv[]) +@@ -1087,13 +1118,13 @@ main (int argc, char *argv[]) terse = true; break; @@ -785,7 +783,7 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c break; case_GETOPT_HELP_CHAR; -@@ -1075,8 +1106,8 @@ main (int argc, char *argv[]) +@@ -1113,8 +1144,8 @@ main (int argc, char *argv[]) for (i = optind; i < argc; i++) ok &= (fs @@ -796,10 +794,10 @@ diff -urNp coreutils-8.0-orig/src/stat.c coreutils-8.0/src/stat.c exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } -diff -urNp coreutils-8.0-orig/tests/misc/selinux coreutils-8.0/tests/misc/selinux ---- coreutils-8.0-orig/tests/misc/selinux 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-8.0/tests/misc/selinux 2009-10-07 10:10:11.000000000 +0200 -@@ -30,7 +30,7 @@ chcon $ctx f d p || +diff -urNp coreutils-8.1-orig/tests/misc/selinux coreutils-8.1/tests/misc/selinux +--- coreutils-8.1-orig/tests/misc/selinux 2009-10-30 12:51:07.000000000 +0100 ++++ coreutils-8.1/tests/misc/selinux 2009-11-20 13:11:40.000000000 +0100 +@@ -29,7 +29,7 @@ chcon $ctx f d p || # inspect that context with both ls -Z and stat. for i in d f p; do diff --git a/coreutils.spec b/coreutils.spec index 1937dff..026f914 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils -Version: 8.0 -Release: 2%{?dist} +Version: 8.1 +Release: 1%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -18,6 +18,8 @@ Source202: coreutils-su-l.pamd Source203: coreutils-runuser-l.pamd # From upstream +Patch1: coreutils-8.1-unsearchablepath.patch +Patch2: coreutils-8.1-kojiutimens-symlinks.patch # Our patches Patch100: coreutils-6.10-configuration.patch @@ -59,6 +61,7 @@ BuildRequires: automake >= 1.10.1 BuildRequires: libcap-devel >= 2.0.6 BuildRequires: libattr-devel BuildRequires: attr +BuildRequires: strace Requires(post): libselinux >= 1.25.6-1 Requires: libattr @@ -107,6 +110,8 @@ Libraries for coreutils package. %setup -q # From upstream +%patch1 -p1 -b .path +%patch2 -p1 -b .koji # Our patches %patch100 -p1 -b .configure @@ -154,7 +159,7 @@ touch aclocal.m4 configure config.hin Makefile.in */Makefile.in aclocal -I m4 autoconf --force automake --copy --add-missing -%configure --enable-largefile --with-afs %{?!nopam:--enable-pam} \ +%configure --enable-largefile %{?!nopam:--enable-pam} \ --enable-selinux \ --enable-install-program=su,hostname,arch \ DEFAULT_POSIX2_VERSION=200112 alternative=199209 || : @@ -325,6 +330,12 @@ fi %{_libdir}/coreutils %changelog +* Fri Nov 27 2009 Ondrej Vasik - 8.1-1 +- new upstream release 8.1 +- fix build under koji (no test failures with underlying + RHEL-5 XEN kernel due to unsearchable path and lack of + futimens functionality) + * Wed Oct 07 2009 Ondrej Vasik - 8.0-2 - update /etc/DIR_COLORS* files diff --git a/sources b/sources index e831813..1da9204 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fe3bb9376150acb5af4a2a280d6fd91a coreutils-8.0.tar.xz +e8ab20814c61924197c0951ee292c38a coreutils-8.1.tar.xz