new upstream release 8.2, remove applied patches

This commit is contained in:
Ondrej Vasik 2009-12-11 16:38:48 +00:00
parent c77f9b75dc
commit e6c89339d8
4 changed files with 6 additions and 124 deletions

View File

@ -1,75 +0,0 @@
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))

View File

@ -1,43 +0,0 @@
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

View File

@ -1,6 +1,6 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.1
Version: 8.2
Release: 1%{?dist}
License: GPLv3+
Group: System Environment/Base
@ -18,8 +18,6 @@ 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
@ -110,8 +108,6 @@ Libraries for coreutils package.
%setup -q
# From upstream
%patch1 -p1 -b .path
%patch2 -p1 -b .koji
# Our patches
%patch100 -p1 -b .configure
@ -330,6 +326,10 @@ fi
%{_libdir}/coreutils
%changelog
* Fri Dec 11 2009 Ondrej Vasik <ovasik@redhat.com> - 8.2-1
- new upstream release 8.2
- removed applied patches
* Fri Nov 27 2009 Ondrej Vasik <ovasik@redhat.com> - 8.1-1
- new upstream release 8.1
- fix build under koji (no test failures with underlying

View File

@ -1 +1 @@
e8ab20814c61924197c0951ee292c38a coreutils-8.1.tar.xz
e037fcb353de2df7762406e0a170b152 coreutils-8.2.tar.xz