From 5fd0b055f56d6b710b7350a22352ce352dc94003 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Aug 24 2009 08:38:17 +0000 Subject: Better fix than workaround the koji insufficient utimensat support issue to prevent failures in other packages --- diff --git a/coreutils-7.5-kojiutimensatskip.patch b/coreutils-7.5-kojiutimensatskip.patch index 9ca38f8..e8e3af2 100644 --- a/coreutils-7.5-kojiutimensatskip.patch +++ b/coreutils-7.5-kojiutimensatskip.patch @@ -1,26 +1,18 @@ -diff -urNp coreutils-7.5-orig/tests/cp/preserve-slink-time coreutils-7.5/tests/cp/preserve-slink-time ---- coreutils-7.5-orig/tests/cp/preserve-slink-time 2009-08-15 17:25:32.000000000 +0200 -+++ coreutils-7.5/tests/cp/preserve-slink-time 2009-08-21 12:45:41.000000000 +0200 -@@ -28,6 +28,10 @@ grep '^#define HAVE_UTIMENSAT' "$CONFIG_ - - ln -s no-such dangle || framework_failure - -+cp -Pp dangle d3 2>error -+grep 'Function not implemented' error > /dev/null && -+ skip_test_ 'utimensat function not implemented' -+ - # If the current file system lacks sub-second resolution, sleep for 2s to - # ensure that the times on the copy are different from those of the original. - case $(stat --format=%y dangle) in -diff -urNp coreutils-7.5-orig/tests/mv/part-symlink coreutils-7.5/tests/mv/part-symlink ---- coreutils-7.5-orig/tests/mv/part-symlink 2009-08-15 17:25:32.000000000 +0200 -+++ coreutils-7.5/tests/mv/part-symlink 2009-08-21 12:52:13.000000000 +0200 -@@ -201,6 +201,8 @@ cat <<\EOF > $expected - - EOF - -+grep 'Function not implemented' $actual > /dev/null && -+ skip_test_ 'utimensat function not implemented' - # Redirect to stderr, since stdout is already taken. - compare $expected $actual 1>&2 || fail=1 - +diff -urNp coreutils-7.5-orig/src/copy.c coreutils-7.5/src/copy.c +--- coreutils-7.5-orig/src/copy.c ++++ coreutils-7.5/src/copy.c +@@ -124,7 +124,13 @@ static inline int + utimens_symlink (char const *file, struct timespec const *timespec) + { + #if HAVE_UTIMENSAT +- return utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW); ++ int err = utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW); ++ /* When configuring on a system with new headers and libraries, and ++ running on one with a kernel that is old enough to lack the syscall, ++ utimensat fails with ENOTSUP. Ignore that. */ ++ if (err && errno == ENOSYS) ++ err = 0; ++ return err; + #else + /* Don't set errno=ENOTSUP here as we don't want + to output an error message for this case. */ diff --git a/coreutils.spec b/coreutils.spec index 0c83a76..02d8ad6 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: 7.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -18,12 +18,12 @@ Source202: coreutils-su-l.pamd Source203: coreutils-runuser-l.pamd # From upstream +Patch1: coreutils-7.5-kojiutimensatskip.patch # Our patches Patch100: coreutils-6.10-configuration.patch Patch101: coreutils-6.10-manpages.patch Patch102: coreutils-7.4-sttytcsadrain.patch -Patch103: coreutils-7.5-kojiutimensatskip.patch # sh-utils Patch703: sh-utils-2.0.11-dateman.patch @@ -108,12 +108,12 @@ Libraries for coreutils package. %setup -q # From upstream +%patch1 -p1 -b .kojiutimensat # Our patches %patch100 -p1 -b .configure %patch101 -p1 -b .manpages %patch102 -p1 -b .tcsadrain -%patch103 -p1 -b .kojiutimensat # sh-utils %patch703 -p1 -b .dateman @@ -328,6 +328,10 @@ fi %{_libdir}/coreutils %changelog +* Mon Aug 24 2009 Ondrej Vasik - 7.5-2 +- Better fix than workaround the koji insufficient utimensat + support issue to prevent failures in other packages + * Fri Aug 21 2009 Ondrej Vasik - 7.5-1 - New upstream release 7.5, remove already applied patches, defuzz few others, xz in default set(by dependencies),