From fda84dfe6db12c2bc374f75a88ee10b50b90d5fa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mar 12 2022 05:17:41 +0000 Subject: patch testsuite on s390x for rawformat (#2045430) https://github.com/haskell/zlib/issues/46 seems modern z15 uses native compression instruction --- diff --git a/ghc-zlib.spec b/ghc-zlib.spec index bd90c5a..8ea67b2 100644 --- a/ghc-zlib.spec +++ b/ghc-zlib.spec @@ -16,6 +16,8 @@ Url: https://hackage.haskell.org/package/%{pkg_name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # End cabal-rpm sources +# https://github.com/haskell/zlib/issues/46 +Patch0: zlib-0.6.2.3-test-rawformat-s390x-z15.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -83,6 +85,9 @@ This package provides the Haskell %{pkg_name} profiling library. %prep # Begin cabal-rpm setup: %setup -q -n %{pkgver} +%ifarch s390x +%patch0 -p1 -b.orig +%endif # End cabal-rpm setup #remove the copy library rm -r cbits diff --git a/zlib-0.6.2.3-test-rawformat-s390x-z15.patch b/zlib-0.6.2.3-test-rawformat-s390x-z15.patch new file mode 100644 index 0000000..f9da1fb --- /dev/null +++ b/zlib-0.6.2.3-test-rawformat-s390x-z15.patch @@ -0,0 +1,11 @@ +--- zlib-0.6.2.3/test/Test.hs~ 2001-09-09 09:46:40.000000000 +0800 ++++ zlib-0.6.2.3/test/Test.hs 2022-03-12 13:04:22.643542774 +0800 +@@ -190,7 +190,7 @@ + let decomp = decompressIO rawFormat defaultDecompressParams + err <- assertDecompressError hnd decomp + msg <- assertDataFormatError err +- msg @?= "invalid code lengths set" ++ msg @?= "Operation-Ending-Supplemental Code is 0x27" + + withSampleData "not-gzip" $ \hnd -> do + let decomp = decompressIO gzipOrZlibFormat defaultDecompressParams