From fcc973bd3308a2dfc636390cd22b4c2a30f409a2 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 11 Mar 2025 16:28:27 -0300 Subject: [PATCH] Take patches into account when comparing the source tarball The distributed source tarball for gcc must be modified by all downstream patches applied because some of these patches may be needed in order to fix bugs downstream. Replace the previous code with another one based on "diff -r", which compares the contents of the extracted tarball, ignoring modified times of the files. --- .../bz2067148-support_syncing_with_gcc/runtest.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Sanity/bz2067148-support_syncing_with_gcc/runtest.sh b/Sanity/bz2067148-support_syncing_with_gcc/runtest.sh index b178d6b..4ca32c9 100755 --- a/Sanity/bz2067148-support_syncing_with_gcc/runtest.sh +++ b/Sanity/bz2067148-support_syncing_with_gcc/runtest.sh @@ -107,14 +107,22 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest SOURCES_ATTACHED - # annobin sources tarball should exist and match the SRPM's sources + # annobin sources tarball should exist and its contents should match + # SRPM's source + patches. rlAssertExists "$SRC_TARBALL" - rlAssertNotDiffer "$SRC_TARBALL" "my_rpmbuild/SOURCES/annobin-${ANNOBIN_VERSION}.tar.xz" + rlRun "PrepDir=${PWD}/my_rpmbuild/BUILD/annobin-${ANNOBIN_VERSION}-build/annobin-${ANNOBIN_VERSION}" + rlAssertExists "${PrepDir}" + rlRun "TmpDir2=\$(mktemp -d)" + rlRun "pushd $TmpDir2" + rlRun "tar xaf $SRC_TARBALL" + rlRun "popd" + # Use diff in order to compare contents and not modified times of the files. + rlRun "diff -qr ${TmpDir2}/annobin-${ANNOBIN_VERSION} $PrepDir" rlPhaseEnd rlPhaseStartCleanup rlRun "popd" - rlRun "rm -r $TmpDir" + rlRun "rm -r $TmpDir $TmpDir2" rlPhaseEnd rlJournalPrintText rlJournalEnd