diff --git a/tar-1.31-dirrem-tests.patch b/tar-1.31-dirrem-tests.patch new file mode 100644 index 0000000..c6609a7 --- /dev/null +++ b/tar-1.31-dirrem-tests.patch @@ -0,0 +1,81 @@ +From f86722c34c92f265bc9a20cb171d2fcfeab7d341 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Mon, 14 Jan 2019 12:26:59 +0200 +Subject: [PATCH] Fix expected output in dirrem tests. + +In both tests, the "file changed as we read it" warning might be +produced for dir/sub, depending on the ctime resolution and timing. +The problem was fixed by 64b43fdf70d82c39eb2ca900cd4f8e49, but regressed +after e7cd377f7801d42aa8e07addff93d2150666c237, which removed 1 second +delays between each pair of checkpoints. Since the presense or absense +of this warning is irrelevant for the test, it is now suppressed. + +* tests/dirrem01.at: Suppress the file-changed warning. +* tests/dirrem02.at: Likewise. +--- + tests/dirrem01.at | 15 ++++++++++----- + tests/dirrem02.at | 5 +++-- + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/tests/dirrem01.at b/tests/dirrem01.at +index 0a9c9e5..24bf392 100644 +--- a/tests/dirrem01.at ++++ b/tests/dirrem01.at +@@ -27,9 +27,13 @@ + # it prints a warning and exits with TAREXIT_DIFFERS. + # + # This test checks whether this behaviour is mimicked for directories, too. +- +-# Remark: This file is based on 'filerem01.at', which is the test-case for +-# a vanishing file. ++# ++# Notes: ++# 1. This file is based on 'filerem01.at', which is the test-case for ++# a vanishing file. ++# 2. Depending on the stat.st_ctime resolution, the "file changed as we ++# read it" warning might be issued for dir/sub. The test takes care to ++# suppress it. + + AT_SETUP([directory removed before reading]) + AT_KEYWORDS([create incremental listed dirchange dirrem dirrem01]) +@@ -48,13 +52,14 @@ esac + + genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ + tar --blocking-factor=1 -c -f archive.tar \ +- --listed-incremental db -v dir >/dev/null ++ --listed-incremental db \ ++ --warning=no-file-changed \ ++ -v dir >/dev/null + ], + [1], + [ignore], + [tar: dir: Directory is new + tar: dir/sub: Directory is new +-tar: dir/sub: file changed as we read it + tar: dir/sub: File removed before we read it + ],[],[],[gnu,posix]) + +diff --git a/tests/dirrem02.at b/tests/dirrem02.at +index c314484..3c63bbe 100644 +--- a/tests/dirrem02.at ++++ b/tests/dirrem02.at +@@ -45,13 +45,14 @@ esac + + genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \ + tar --blocking-factor=1 -c -f archive.tar \ +- --listed-incremental db -v dir dir/sub >/dev/null ++ --listed-incremental db \ ++ --warning=no-file-changed \ ++ -v dir dir/sub >/dev/null + ], + [2], + [ignore], + [tar: dir: Directory is new + tar: dir/sub: Directory is new +-tar: dir/sub: file changed as we read it + tar: dir/sub: Cannot open: No such file or directory + tar: Exiting with failure status due to previous errors + ],[],[],[gnu,posix]) +-- +2.20.1 + diff --git a/tar.spec b/tar.spec index ea4ddfe..88ca156 100644 --- a/tar.spec +++ b/tar.spec @@ -5,7 +5,7 @@ Summary: A GNU file archiving program Name: tar Epoch: 2 Version: 1.31 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: Applications/Archiving URL: http://www.gnu.org/software/tar/ @@ -19,6 +19,7 @@ Patch2: tar-1.28-vfatTruncate.patch Patch3: tar-1.29-wildcards.patch Patch4: tar-1.28-atime-rofs.patch Patch9: tar-1.28-document-exclude-mistakes.patch +Patch10: tar-1.31-dirrem-tests.patch BuildRequires: gcc BuildRequires: autoconf automake texinfo gettext libacl-devel @@ -86,7 +87,8 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man8/rmt.8* %check %if %{with check} rm -f $RPM_BUILD_ROOT/test/testsuite -make check TESTSUITEFLAGS='-k \!dirrem01,\!dirrem02' || ( +# make check TESTSUITEFLAGS='-k \!dirrem01,\!dirrem02' || ( +make check || ( # get the error log set +x find -name testsuite.log | while read line; do @@ -111,6 +113,9 @@ make check TESTSUITEFLAGS='-k \!dirrem01,\!dirrem02' || ( %changelog +* Thu Jan 17 2019 Pavel Raiskup - 1.31-2 +- backport fix for dirrem tests, and reenable them again + * Thu Jan 10 2019 Pavel Raiskup - 1.31-1 - the latest upstream release, per release notes http://lists.gnu.org/archive/html/info-gnu/2019-01/msg00001.html