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 {} ';'