diff --git a/tar-1.30-disk-read-error.patch b/tar-1.30-disk-read-error.patch new file mode 100644 index 0000000..d2ad3f6 --- /dev/null +++ b/tar-1.30-disk-read-error.patch @@ -0,0 +1,51 @@ +From: Ondrej Dubaj +Date: Tue, 13 Apr 2021 11:47:32 +0200 +Subject: [PATCH] do not report read disk error as file shrank + +diff --git a/src/create.c b/src/create.c +index 181f7d9..7be10a9 100644 +--- a/src/create.c ++++ b/src/create.c +@@ -1097,7 +1097,7 @@ dump_regular_file (int fd, struct tar_stat_info *st) + size_left -= count; + set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE); + +- if (count != bufsize) ++ if (count == 0) + { + char buf[UINTMAX_STRSIZE_BOUND]; + memset (blk->buffer + count, 0, bufsize - count); +diff -rup tar-1.34/tests/Makefile.am.old tar-1.34/tests/Makefile.am +--- tar-1.34/tests/Makefile.am.old 2022-06-27 09:21:40.881574517 +0000 ++++ tar-1.34/tests/Makefile.am 2022-06-27 09:23:31.444574517 +0000 +@@ -247,7 +247,6 @@ TESTSUITE_AT = \ + sptrdiff01.at\ + time01.at\ + time02.at\ +- truncate.at\ + update.at\ + update01.at\ + update02.at\ +diff -rup tar-1.34/tests/Makefile.in.old tar-1.34/tests/Makefile.in +--- tar-1.34/tests/Makefile.in.old 2022-06-27 09:21:48.626574517 +0000 ++++ tar-1.34/tests/Makefile.in 2022-06-27 09:22:03.127574517 +0000 +@@ -1622,7 +1622,6 @@ TESTSUITE_AT = \ + sptrdiff01.at\ + time01.at\ + time02.at\ +- truncate.at\ + update.at\ + update01.at\ + update02.at\ +diff --git a/tests/testsuite.at b/tests/testsuite.at +index 2a83757..52f73a6 100644 +--- a/tests/testsuite.at ++++ b/tests/testsuite.at +@@ -424,7 +424,6 @@ m4_include([comprec.at]) + m4_include([shortfile.at]) + m4_include([shortupd.at]) + +-m4_include([truncate.at]) + m4_include([grow.at]) + m4_include([sigpipe.at]) + m4_include([comperr.at]) diff --git a/tar.spec b/tar.spec index 045434b..3255682 100644 --- a/tar.spec +++ b/tar.spec @@ -20,6 +20,7 @@ Patch4: tar-1.28-atime-rofs.patch Patch9: tar-1.28-document-exclude-mistakes.patch Patch10: tar-1.33-fix-capabilities-test.patch Patch11: tar-1.30-padding-zeros.patch +Patch12: tar-1.30-disk-read-error.patch BuildRequires: make BuildRequires: gcc @@ -116,6 +117,7 @@ make check || ( %changelog * Mon Jun 27 2022 Lukas Javorsky - 2:1.34-4 - added "padding with zeros" info message (#2089298) +- do not report disk error as file shrank (#2089316) * Tue Aug 10 2021 Mohan Boddu - 2:1.34-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags