From 7ec90df943456fe5cc61d68346de89c861a90e71 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Feb 07 2024 01:44:18 +0000 Subject: Skip 'pack' tests on F40+ On Fedora 40+ and RHEL 10+, we're using zlib-ng rather than zlib for compression. As a result, all of the pack tests fail due to checking the hashes of the packed data against static values that were created with zlib. https://github.com/libgit2/libgit2/issues/6728 Signed-off-by: Stephen Gallagher --- diff --git a/libgit2.spec b/libgit2.spec index 6ad1c39..dca516a 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -59,6 +59,15 @@ find examples -name ".gitignore" -delete -print # Don't run "online" tests sed -i '/-sonline/s/^/#/' tests/libgit2/CMakeLists.txt +%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 +# On Fedora 40+ and RHEL 10+, we're using zlib-ng rather than +# zlib for compression. As a result, all of the pack tests fail +# due to checking the hashes of the packed data against static +# values that were created with zlib. +# https://github.com/libgit2/libgit2/issues/6728 +sed -i 's/-xonline/-xonline -xpack/' tests/libgit2/CMakeLists.txt +%endif + # Remove bundled libraries (except libxdiff) pushd deps find . -maxdepth 1 -not -name xdiff -exec rm -rf {} ';'