From 4f9638dd1d6e184af2bf1575e4d5a125a7700853 Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Tue, 3 Jun 2025 18:50:02 +0200 Subject: [PATCH] Downstream patch to fix failure in filerem01 test The previous change for some reason exposes a race in the filerem01 test: tar archives the file before genfile can remove it and thus succeeds. Newer versions of tar do not need this change, as the race in the tests was fixed in a more systematic way (commits e7cd377f7801d42aa8e07addff93d2150666c237 and f86722c34c92f265bc9a20cb171d2fcfeab7d341). Resolves: RHEL-85325 --- tar-1.30-filerem01.at-swap-actions.patch | 15 +++++++++++++++ tar.spec | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 tar-1.30-filerem01.at-swap-actions.patch diff --git a/tar-1.30-filerem01.at-swap-actions.patch b/tar-1.30-filerem01.at-swap-actions.patch new file mode 100644 index 0000000..44e43e7 --- /dev/null +++ b/tar-1.30-filerem01.at-swap-actions.patch @@ -0,0 +1,15 @@ +diff --git a/tests/filerem01.at b/tests/filerem01.at +index bf020538..6a9893a6 100644 +--- a/tests/filerem01.at ++++ b/tests/filerem01.at +@@ -43,8 +43,8 @@ genfile --file dir/file1 + genfile --file dir/sub/file2 + + genfile --run --checkpoint=3 --unlink dir/file1 -- \ +- tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ +- --checkpoint-action='echo' -c -f archive.tar \ ++ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='echo' \ ++ --checkpoint-action='sleep=1' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null + ], + [1], diff --git a/tar.spec b/tar.spec index af2de83..7865ad8 100644 --- a/tar.spec +++ b/tar.spec @@ -32,6 +32,12 @@ Patch17: tar-1.30-Fix-the-no-overwrite-dir-option Patch18: tar-1.30-remove-capabs-test.patch Patch19: tar-1.30-CVE-2022-48303.patch Patch20: tar-1.34-Warn-file-changed-as-we-read-it-less-often.patch +# inspired by upstream commit 64b43fdf70d82c39eb2ca900cd4f8e49b86c2020 +# "tests: fix race in dirrem01 and dirrem02" +# Patch20 for some reason exposes a race in the filerem01 test, +# use this to enforce the order where genfile wins the race +# and removes the test file before tar archives it. +Patch21: tar-1.30-filerem01.at-swap-actions.patch # run "make check" by default %bcond_without check