diff --git a/coreutils-8.22-dd-sparsetest-xfsspeculativeprealloc.patch b/coreutils-8.22-dd-sparsetest-xfsspeculativeprealloc.patch new file mode 100644 index 0000000..8c5f4d7 --- /dev/null +++ b/coreutils-8.22-dd-sparsetest-xfsspeculativeprealloc.patch @@ -0,0 +1,20 @@ +diff -urNp coreutils-8.22-orig/tests/dd/sparse.sh coreutils-8.22/tests/dd/sparse.sh +--- coreutils-8.22-orig/tests/dd/sparse.sh 2013-12-04 06:48:30.000000000 -0800 ++++ coreutils-8.22/tests/dd/sparse.sh 2014-04-12 17:48:22.301975386 -0700 +@@ -61,8 +61,15 @@ if test $(kb_alloc file.in) -gt 3000; th + dd if=file.in of=file.out bs=2M conv=sparse + test 2500 -lt $(kb_alloc file.out) || fail=1 + ++ # Note we recreate a sparse file first to avoid ++ # speculative preallocation seen in XFS, where a write() that ++ # extends a file can preallocate some extra space that ++ # a subsequent seek will not convert to a hole. ++ rm -f file.out ++ truncate --size=3M file.out ++ + # Ensure that this 1MiB string of NULs *is* converted to a hole. +- dd if=file.in of=file.out bs=1M conv=sparse ++ dd if=file.in of=file.out bs=1M conv=sparse,notrunc + test $(kb_alloc file.out) -lt 2500 || fail=1 + + fi diff --git a/coreutils.spec b/coreutils.spec index 6a98af6..542695b 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.22 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -15,6 +15,7 @@ Source106: coreutils-colorls.csh # From upstream Patch1: coreutils-8.22-cp-selinux.patch Patch2: coreutils-8.22-datetzcrash.patch +Patch3: coreutils-8.22-dd-sparsetest-xfsspeculativeprealloc.patch # Our patches #general patch to workaround koji build system issues @@ -126,6 +127,7 @@ the old GNU fileutils, sh-utils, and textutils packages. # From upstream %patch1 -p1 -b .nullcontext %patch2 -p1 -b .tzcrash +%patch3 -p1 -b .xfs # Our patches %patch100 -p1 -b .configure @@ -372,6 +374,10 @@ fi %{_sbindir}/chroot %changelog +* Sat Apr 12 2014 Ondrej Vasik 8.22-14 +- fix dd sparse test failure on xfs filesystem(#1085727, + by P.Brady) + * Wed Mar 05 2014 Ondrej Vasik 8.22-13 - drop the util-linux requirements (smaller docker images), drop ancient obsoletes of -libs subpackage