The package rpms/ghc9.0.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/ghc9.0.git/commit/?id=bb1d62d3137e87....
Change: -%ifarch armv7hl
Thanks.
Full change: ============
commit b94ac30b646203ecf33bb93269a61500abe7ab63 Author: Jens Petersen petersen@redhat.com Date: Wed Feb 15 16:09:28 2023 +0800
move shared library into ghc libdir
diff --git a/ghc9.0.spec b/ghc9.0.spec index 7717fd3..c4a440e 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -39,6 +39,10 @@ # no longer build testsuite (takes time and not really being used) %bcond_with testsuite
+%if %{?fedora} >= 38 +%global _ghcdynlibdir %{ghclibdir} +%endif + # 9.0.2 recommends llvm 9-12 %global llvm_major 12 %global ghc_llvm_archs armv7hl aarch64 @@ -51,7 +55,7 @@ Version: 9.0.2 # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 12%{?dist} +Release: 13%{?dist} Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport @@ -503,7 +507,7 @@ echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files %endif
# add rts libs -%if %{defined _ghcdynlibdir} +%if "%{?_ghcdynlibdir}" == "%_libdir" echo "%{ghclibdir}/rts" >> %{name}-base-devel.files %else echo "%%dir %{ghclibdir}/rts" >> %{name}-base.files @@ -511,7 +515,7 @@ ls -d %{buildroot}%{ghclibdir}/rts/lib*.a >> %{name}-base-devel.files %endif ls %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibdir}/rts}/libHSrts*.so >> %{name}-base.files %if %{defined _ghcdynlibdir} -sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_libdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf +sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynlibdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %endif ls -d %{buildroot}%{ghclibdir}/package.conf.d/rts.conf >> %{name}-base-devel.files
@@ -755,6 +759,9 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog +* Wed Feb 15 2023 Jens Petersen petersen@redhat.com - 9.0.2-13 +- move shared libraries into ghc libdir + * Sat Feb 11 2023 Jens Petersen petersen@redhat.com - 9.0.2-12 - self boot with ghc9.0 - use llvm12 (for ARM)
commit 83477610a28d28cc4a3be5216ce9b4f52cdaea3f Author: Jens Petersen petersen@redhat.com Date: Sat Feb 11 14:54:37 2023 +0800
subpackage ghc-bignum
diff --git a/ghc9.0.spec b/ghc9.0.spec index bac1a97..7717fd3 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -9,6 +9,7 @@ %global ghc_name ghc%{ghc_major}
%global base_ver 4.15.1.0 +%global ghc_bignum_ver 1.1 %global ghc_compact_ver 0.1.0.0 %global hpc_ver 0.6.1.0 %global xhtml_ver 3000.2.2.1 @@ -279,7 +280,7 @@ This package provides the User Guide and Haddock manual. %ghc_lib_subpackage -d -l BSD filepath-1.4.2.1 # in ghc not ghc-libraries: %ghc_lib_subpackage -d -x ghc-%{ghc_version_override} -# see below for ghc-bignum +%ghc_lib_subpackage -d -x -l BSD ghc-bignum-%{ghc_bignum_ver} %ghc_lib_subpackage -d -x -l BSD ghc-boot-%{ghc_version_override} %ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override} %ghc_lib_subpackage -d -x -l BSD ghc-compact-%{ghc_compact_ver} @@ -470,6 +471,7 @@ done echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files
%ghc_gen_filelists ghc %{ghc_version_override} +%ghc_gen_filelists ghc-bignum %{ghc_bignum_ver} %ghc_gen_filelists ghc-boot %{ghc_version_override} %ghc_gen_filelists ghc-compact %{ghc_compact_ver} %ghc_gen_filelists ghc-heap %{ghc_version_override} @@ -477,7 +479,6 @@ echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files %ghc_gen_filelists hpc %{hpc_ver} %ghc_gen_filelists libiserv %{ghc_version_override}
-%ghc_gen_filelists ghc-bignum 1.1 %ghc_gen_filelists ghc-prim 0.7.0 %ghc_gen_filelists integer-gmp 1.1
@@ -494,7 +495,6 @@ cp -p libraries/%1/LICENSE libraries/LICENSE.%1\ echo "%%license libraries/LICENSE.%1" >> %{name}-%2.files\ %{nil}
-%merge_filelist ghc-bignum base %merge_filelist ghc-prim base %merge_filelist integer-gmp base
commit 4890088b8c180ba1af96378f848a3b425790ac32 Author: Jens Petersen petersen@redhat.com Date: Sat Feb 11 12:26:06 2023 +0800
revise the ld.so.conf.d and chrpath changes
diff --git a/ghc9.0.spec b/ghc9.0.spec index e1a32e8..bac1a97 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -443,12 +443,12 @@ for i in %{buildroot}%{ghclibdir}/package.conf.d/*.conf; do sed -i -e 's!^dynamic-library-dirs: .*!dynamic-library-dirs: %{_ghcdynlibdir}!' $i done sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynlibdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf +%endif
-%if "%_ghcdynlibdir" != "%_libdir" +%if "%{?_ghcdynlibdir}" != "%_libdir" mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_ghcdynlibdir}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf -%endif -# avoid 'E: binary-or-shlib-defines-rpath' +echo "%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf +%else for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" ; -print); do chrpath -d $i done @@ -498,11 +498,9 @@ echo "%%license libraries/LICENSE.%1" >> %{name}-%2.files\ %merge_filelist ghc-prim base %merge_filelist integer-gmp base
-%if %{defined _ghcdynlibdir} -%if "%_ghcdynlibdir" != "%_libdir" +%if "%{?_ghcdynlibdir}" != "%_libdir" echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files %endif -%endif
# add rts libs %if %{defined _ghcdynlibdir} @@ -622,6 +620,11 @@ make test
%if %{defined ghclibdir} +%if "%{?_ghcdynlibdir}" != "%_libdir" +%post base -p /sbin/ldconfig +%postun base -p /sbin/ldconfig +%endif + %transfiletriggerin compiler -- %{ghclibdir}/package.conf.d %ghc_pkg_recache %end
commit 4f75e9824194c21c82511ab2ae362f551e165031 Author: Jens Petersen petersen@redhat.com Date: Sat Feb 11 12:23:06 2023 +0800
self-build with ghc9.0
diff --git a/ghc9.0.spec b/ghc9.0.spec index 4e20452..e1a32e8 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -14,7 +14,7 @@ %global xhtml_ver 3000.2.2.1
# bootstrap needs 8.8+ -%global ghcboot_major 8.10 +%global ghcboot_major 9.0 %global ghcboot ghc%{ghcboot_major}
# build profiling libraries @@ -426,7 +426,7 @@ export CC=%{_bindir}/gcc %ifarch %{ghc_unregisterized_arches} --enable-unregisterised \ %endif - GHC=%{_bindir}/ghc-%{ghcboot_major} \ + GHC=%{_bindir}/ghc-%{ghcboot_major}.2 \ %{nil}
# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)" @@ -753,7 +753,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog * Sat Feb 11 2023 Jens Petersen petersen@redhat.com - 9.0.2-12 -- boot with self +- self boot with ghc9.0 - use llvm12 (for ARM) - sync changes from ghc8.10 and ghc 9.2 - debian buildpath-abi-stability-2 & haddock-remove-googleapis-fonts patches
commit bb1d62d3137e8751ce0f6282f1e00136d7136f7a Author: Jens Petersen petersen@redhat.com Date: Sat Feb 11 12:19:23 2023 +0800
move and enable the C99 patch
diff --git a/ghc9.0.spec b/ghc9.0.spec index 0cb1a5e..4e20452 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -71,6 +71,10 @@ Patch6: ghc-8.6.3-sphinx-1.8.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7689 (from ghc-9.0) Patch7: 7689.patch
+# https://fedoraproject.org/wiki/Toolchain/PortingToModernC +# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394 +Patch8: ghc-configure-c99.patch + # Arch dependent patches # arm Patch12: ghc-armv7-VFPv3D16--NEON.patch @@ -95,8 +99,6 @@ Patch25: buildpath-abi-stability-2.patch Patch26: no-missing-haddock-file-warning.patch Patch27: haddock-remove-googleapis-fonts.patch
-Patch27: ghc-configure-c99.patch - # fedora ghc has been bootstrapped on # %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64 # and retired arches: alpha sparcv9 armv5tel @@ -134,10 +136,8 @@ BuildRequires: python3-sphinx %ifarch %{ghc_llvm_archs} BuildRequires: llvm%{llvm_major} %endif -%ifarch armv7hl -# patch12 +# patch8 and patch12 BuildRequires: autoconf automake -%endif Requires: %{name}-compiler = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} Requires: %{name}-ghc-devel = %{version}-%{release} @@ -344,6 +344,7 @@ rm -r libraries/containers/containers/dist-install %patch2 -p1 -b .orig %patch6 -p1 -b .orig %patch7 -p1 -b .orig +%patch8 -p1
rm -r libffi-tarballs
@@ -367,8 +368,6 @@ rm -r libffi-tarballs %patch26 -p1 -b .orig %patch27 -p1 -b .orig
-%patch27 -p1 - %if %{with haddock} %global gen_contents_index gen_contents_index.orig if [ ! -f "libraries/%{gen_contents_index}" ]; then @@ -410,10 +409,8 @@ BUILD_SPHINX_PDF = NO EOF
%build -# for patch12 -%ifarch armv7hl +# for patch8 and patch12 autoreconf -%endif
%ghc_set_gcc_flags export CC=%{_bindir}/gcc
commit d68adbf8cccc8237cb9a5425110ffeb6bc2213a9 Author: Jens Petersen petersen@redhat.com Date: Wed Feb 1 00:59:36 2023 +0800
ghc_devel_prof deprecated
diff --git a/ghc9.0.spec b/ghc9.0.spec index 3d9f470..0cb1a5e 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -487,8 +487,10 @@ echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files %define merge_filelist()\ cat %{name}-%1.files >> %{name}-%2.files\ cat %{name}-%1-devel.files >> %{name}-%2-devel.files\ -%if %{defined ghc_devel_prof}\ +%if %{with haddock}\ cat %{name}-%1-doc.files >> %{name}-%2-doc.files\ +%endif\ +%if %{with ghc_prof}\ cat %{name}-%1-prof.files >> %{name}-%2-prof.files\ %endif\ cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
commit f0f26ce2a4cc72208ea1b0fcdcea68f546e52af9 Author: Jens Petersen petersen@redhat.com Date: Sat Feb 11 11:55:45 2023 +0800
bump release
diff --git a/ghc9.0.spec b/ghc9.0.spec index 8994ba5..3d9f470 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -50,7 +50,7 @@ Version: 9.0.2 # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 11%{?dist} +Release: 12%{?dist} Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport @@ -753,6 +753,12 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog +* Sat Feb 11 2023 Jens Petersen petersen@redhat.com - 9.0.2-12 +- boot with self +- use llvm12 (for ARM) +- sync changes from ghc8.10 and ghc 9.2 +- debian buildpath-abi-stability-2 & haddock-remove-googleapis-fonts patches + * Sun Feb 05 2023 Florian Weimer fweimer@redhat.com - 9.0.2-11 - Port configure script to C99
commit a0a19ba54e3834aa4d9611c9a34f28b806e21cd6 Author: Jens Petersen petersen@redhat.com Date: Sun Jan 15 00:02:43 2023 +0800
backport ld.so.conf.d and chrpath changes for _ghcdynlibdir
also reset *.files
diff --git a/ghc9.0.spec b/ghc9.0.spec index 7d66d23..8994ba5 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -442,18 +442,26 @@ make DESTDIR=%{buildroot} install
%if %{defined _ghcdynlibdir} mv %{buildroot}%{ghclibdir}/*/libHS*ghc%{ghc_version}.so %{buildroot}%{_ghcdynlibdir}/ -for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" ; -print); do - chrpath -d $i -done for i in %{buildroot}%{ghclibdir}/package.conf.d/*.conf; do sed -i -e 's!^dynamic-library-dirs: .*!dynamic-library-dirs: %{_ghcdynlibdir}!' $i done sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynlibdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf + +%if "%_ghcdynlibdir" != "%_libdir" +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_ghcdynlibdir}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf +%endif +# avoid 'E: binary-or-shlib-defines-rpath' +for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" ; -print); do + chrpath -d $i +done %endif
# containers src moved to a subdir cp -p libraries/containers/containers/LICENSE libraries/containers/LICENSE
+rm -f %{name}-*.files + # FIXME replace with ghc_subpackages_list for i in %{ghc_packages_list}; do name=$(echo $i | sed -e "s/(.*)-.*/\1/") @@ -491,6 +499,12 @@ echo "%%license libraries/LICENSE.%1" >> %{name}-%2.files\ %merge_filelist ghc-prim base %merge_filelist integer-gmp base
+%if %{defined _ghcdynlibdir} +%if "%_ghcdynlibdir" != "%_libdir" +echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files +%endif +%endif + # add rts libs %if %{defined _ghcdynlibdir} echo "%{ghclibdir}/rts" >> %{name}-base-devel.files @@ -502,7 +516,9 @@ ls %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibdir}/rts}/libHSrts*.so %if %{defined _ghcdynlibdir} sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_libdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %endif -ls -d %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %{buildroot}%{ghclibdir}/include >> %{name}-base-devel.files +ls -d %{buildroot}%{ghclibdir}/package.conf.d/rts.conf >> %{name}-base-devel.files + +ls -d %{buildroot}%{ghclibdir}/include >> %{name}-base-devel.files
%if %{with ghc_prof} ls %{buildroot}%{ghclibdir}/bin/ghc-iserv-prof* >> %{name}-base-prof.files
commit ac4ef37ef8b7ffbd3891895ebdaf7ae8ebe585c6 Author: Jens Petersen petersen@redhat.com Date: Fri Jan 13 20:53:12 2023 +0800
obsolete xhtml when no haddock
diff --git a/ghc9.0.spec b/ghc9.0.spec index a8a075e..7d66d23 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -11,6 +11,7 @@ %global base_ver 4.15.1.0 %global ghc_compact_ver 0.1.0.0 %global hpc_ver 0.6.1.0 +%global xhtml_ver 3000.2.2.1
# bootstrap needs 8.8+ %global ghcboot_major 8.10 @@ -191,6 +192,10 @@ Requires: %{name}-filesystem = %{version}-%{release} %else Obsoletes: %{name}-doc-index < %{version}-%{release} Obsoletes: %{name}-filesystem < %{version}-%{release} +Obsoletes: %{name}-xhtml < %{xhtml_ver}-%{release} +Obsoletes: %{name}-xhtml-devel < %{xhtml_ver}-%{release} +Obsoletes: %{name}-xhtml-doc < %{xhtml_ver}-%{release} +Obsoletes: %{name}-xhtml-prof < %{xhtml_ver}-%{release} %endif %ifarch %{ghc_llvm_archs} Requires: llvm%{llvm_major} @@ -297,7 +302,7 @@ This package provides the User Guide and Haddock manual. %ghc_lib_subpackage -d -l BSD transformers-0.5.6.2 %ghc_lib_subpackage -d -l BSD unix-2.7.2.2 %if %{with haddock} -%ghc_lib_subpackage -d -l BSD xhtml-3000.2.2.1 +%ghc_lib_subpackage -d -l BSD xhtml-%{xhtml_ver} %endif %endif
commit c73158eea82beb941445c9d55cac3ecc33c8e714 Author: Jens Petersen petersen@redhat.com Date: Fri Jan 13 19:46:46 2023 +0800
add debian buildpath-abi-stability-2.patch & haddock-remove-googleapis-fonts
diff --git a/buildpath-abi-stability-2.patch b/buildpath-abi-stability-2.patch new file mode 100644 index 0000000..a2e8fa7 --- /dev/null +++ b/buildpath-abi-stability-2.patch @@ -0,0 +1,87 @@ +Description: Don't include BufPos in interface files +Author: Matthew Pickering +Origin: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8972 +Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22162 +Index: b/compiler/GHC/Iface/Ext/Types.hs +=================================================================== +--- a/compiler/GHC/Iface/Ext/Types.hs ++++ b/compiler/GHC/Iface/Ext/Types.hs +@@ -746,5 +746,5 @@ toHieName name + | isKnownKeyName name = KnownKeyName (nameUnique name) + | isExternalName name = ExternalName (nameModule name) + (nameOccName name) +- (nameSrcSpan name) +- | otherwise = LocalName (nameOccName name) (nameSrcSpan name) ++ (removeBufSpan $ nameSrcSpan name) ++ | otherwise = LocalName (nameOccName name) (removeBufSpan $ nameSrcSpan name) +Index: b/compiler/GHC/Types/SrcLoc.hs +=================================================================== +--- a/compiler/GHC/Types/SrcLoc.hs ++++ b/compiler/GHC/Types/SrcLoc.hs +@@ -72,6 +72,7 @@ module GHC.Types.SrcLoc ( + getBufPos, + BufSpan(..), + getBufSpan, ++ removeBufSpan, + + -- * Located + Located, +@@ -397,6 +398,10 @@ data UnhelpfulSpanReason + | UnhelpfulOther !FastString + deriving (Eq, Show) + ++removeBufSpan :: SrcSpan -> SrcSpan ++removeBufSpan (RealSrcSpan s _) = RealSrcSpan s Nothing ++removeBufSpan s = s ++ + {- Note [Why Maybe BufPos] + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + In SrcLoc we store (Maybe BufPos); in SrcSpan we store (Maybe BufSpan). +Index: b/compiler/GHC/Utils/Binary.hs +=================================================================== +--- a/compiler/GHC/Utils/Binary.hs ++++ b/compiler/GHC/Utils/Binary.hs +@@ -1444,19 +1444,6 @@ instance Binary RealSrcSpan where + return (mkRealSrcSpan (mkRealSrcLoc f sl sc) + (mkRealSrcLoc f el ec)) + +-instance Binary BufPos where +- put_ bh (BufPos i) = put_ bh i +- get bh = BufPos <$> get bh +- +-instance Binary BufSpan where +- put_ bh (BufSpan start end) = do +- put_ bh start +- put_ bh end +- get bh = do +- start <- get bh +- end <- get bh +- return (BufSpan start end) +- + instance Binary UnhelpfulSpanReason where + put_ bh r = case r of + UnhelpfulNoLocationInfo -> putByte bh 0 +@@ -1475,10 +1462,11 @@ instance Binary UnhelpfulSpanReason wher + _ -> UnhelpfulOther <$> get bh + + instance Binary SrcSpan where +- put_ bh (RealSrcSpan ss sb) = do ++ put_ bh (RealSrcSpan ss _sb) = do + putByte bh 0 ++ -- BufSpan doesn't ever get serialised because the positions depend ++ -- on build location. + put_ bh ss +- put_ bh sb + + put_ bh (UnhelpfulSpan s) = do + putByte bh 1 +@@ -1488,8 +1476,7 @@ instance Binary SrcSpan where + h <- getByte bh + case h of + 0 -> do ss <- get bh +- sb <- get bh +- return (RealSrcSpan ss sb) ++ return (RealSrcSpan ss Nothing) + _ -> do s <- get bh + return (UnhelpfulSpan s) + diff --git a/ghc9.0.spec b/ghc9.0.spec index 2661044..a8a075e 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -90,7 +90,9 @@ Patch18: Disable-unboxed-arrays.patch
# Debian patches: Patch24: buildpath-abi-stability.patch +Patch25: buildpath-abi-stability-2.patch Patch26: no-missing-haddock-file-warning.patch +Patch27: haddock-remove-googleapis-fonts.patch
Patch27: ghc-configure-c99.patch
@@ -356,7 +358,9 @@ rm -r libffi-tarballs
#debian %patch24 -p1 -b .orig +%patch25 -p1 -b .orig %patch26 -p1 -b .orig +%patch27 -p1 -b .orig
%patch27 -p1
diff --git a/haddock-remove-googleapis-fonts.patch b/haddock-remove-googleapis-fonts.patch new file mode 100644 index 0000000..1429063 --- /dev/null +++ b/haddock-remove-googleapis-fonts.patch @@ -0,0 +1,26 @@ +Description: Remove hard-coded googleapis font URL +Bug: https://github.com/haskell/haddock/issues/1211 +Bug-Debian: https://bugs.debian.org/963690 + +Index: b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs +=================================================================== +--- a/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs ++++ b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs +@@ -137,7 +137,7 @@ headHtml docTitle themes mathjax_url bas + , thetype "text/css" + , href (withBaseURL base_url quickJumpCssFile) ] + << noHtml +- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml ++ -- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml + , script ! [ src (withBaseURL base_url haddockJsFile) + , emptyAttr "async" + , thetype "text/javascript" ] +@@ -146,7 +146,7 @@ headHtml docTitle themes mathjax_url bas + , script ! [src mjUrl, thetype "text/javascript"] << noHtml + ] + where +- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" ++ -- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" + mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-A..." mathjax_url + mjConf = unwords [ "MathJax.Hub.Config({" + , "tex2jax: {"
commit 2084388213fc9412bdd40481952ca4cd5069335c Author: Jens Petersen petersen@redhat.com Date: Fri Jan 13 19:42:24 2023 +0800
sync with ghc8.10 and ghc-9.2.5
- boot with ghc8.10 - bump llvm to 12 - update/enable buildpath-abi-stability.patch - add ghc_major bin symlinks - abicheck tweaks
diff --git a/buildpath-abi-stability.patch b/buildpath-abi-stability.patch index 1d45c72..07305e9 100644 --- a/buildpath-abi-stability.patch +++ b/buildpath-abi-stability.patch @@ -1,8 +1,10 @@ Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
---- a/compiler/iface/MkIface.hs -+++ b/compiler/iface/MkIface.hs -@@ -681,7 +681,7 @@ addFingerprints hsc_env mb_old_fingerpri +Index: b/compiler/GHC/Iface/Recomp.hs +=================================================================== +--- a/compiler/GHC/Iface/Recomp.hs ++++ b/compiler/GHC/Iface/Recomp.hs +@@ -1071,7 +1071,7 @@ addFingerprints hsc_env iface0 iface_hash <- computeFingerprint putNameLiterally (mod_hash, ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache @@ -11,13 +13,12 @@ Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424 sorted_deps, mi_hpc iface0)
-@@ -714,6 +714,9 @@ addFingerprints hsc_env mb_old_fingerpri +@@ -1106,6 +1106,8 @@ addFingerprints hsc_env iface0 + (non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph (mi_rules iface0) (non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0) - fix_fn = mi_fix_fn iface0 ann_fn = mkIfaceAnnCache (mi_anns iface0) + -- Do not allow filenames to affect the interface + usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ] -+
-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules -- (in particular, the orphan modules which are transitively imported by the diff --git a/ghc9.0.spec b/ghc9.0.spec index ad1fed7..2661044 100644 --- a/ghc9.0.spec +++ b/ghc9.0.spec @@ -1,19 +1,21 @@ -# disable prof, docs, perf build, debuginfo -# NB This must be disabled (bcond_with) for all koji production builds +# disable prof, docs, perf build +# bcond_with for production builds: disable quick build %bcond_with quickbuild
# make sure ghc libraries' ABI hashes unchanged %bcond_with abicheck
-%global ghc_name ghc9.0 - -# to handle RCs -%global ghc_release %{version} +%global ghc_major 9.0 +%global ghc_name ghc%{ghc_major}
%global base_ver 4.15.1.0 %global ghc_compact_ver 0.1.0.0 %global hpc_ver 0.6.1.0
+# bootstrap needs 8.8+ +%global ghcboot_major 8.10 +%global ghcboot ghc%{ghcboot_major} + # build profiling libraries # build haddock # perf production build (disable for quick build) @@ -21,7 +23,6 @@ %undefine with_ghc_prof %undefine with_haddock %bcond_with perf_build -%undefine _enable_debug_packages %else %bcond_without ghc_prof %bcond_without haddock @@ -30,14 +31,14 @@
# locked together since disabling haddock causes no manuals built # and disabling haddock still created index.html -# https://ghc.haskell.org/trac/ghc/ticket/15190 +# https://gitlab.haskell.org/ghc/ghc/-/issues/15190 %{?with_haddock:%bcond_without manual}
# no longer build testsuite (takes time and not really being used) %bcond_with testsuite
# 9.0.2 recommends llvm 9-12 -%global llvm_major 11 +%global llvm_major 12 %global ghc_llvm_archs armv7hl aarch64
%global ghc_unregisterized_arches s390 s390x %{mips} riscv64 @@ -53,9 +54,9 @@ Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport URL: https://haskell.org/ghc/ -Source0: https://downloads.haskell.org/ghc/%%7Bghc_release%7D/ghc-%%7Bversion%7D-src.... +Source0: https://downloads.haskell.org/ghc/%%7Bversion%7D/ghc-%%7Bversion%7D-src.tar.... %if %{with testsuite} -Source1: https://downloads.haskell.org/ghc/%%7Bghc_release%7D/ghc-%%7Bversion%7D-test... +Source1: https://downloads.haskell.org/ghc/%%7Bversion%7D/ghc-%%7Bversion%7D-testsuit... %endif Source5: ghc-pkg.man Source6: haddock.man @@ -74,14 +75,14 @@ Patch7: 7689.patch Patch12: ghc-armv7-VFPv3D16--NEON.patch
# for unregisterized -# https://ghc.haskell.org/trac/ghc/ticket/15689 +# https://gitlab.haskell.org/ghc/ghc/-/issues/15689 Patch15: ghc-warnings.mk-CC-Wall.patch
# bigendian (s390x and ppc64) # https://gitlab.haskell.org/ghc/ghc/issues/15411 # https://gitlab.haskell.org/ghc/ghc/issues/16505 # https://bugzilla.redhat.com/show_bug.cgi?id=1651448 -# https://ghc.haskell.org/trac/ghc/ticket/15914 +# https://gitlab.haskell.org/ghc/ghc/-/issues/15914 # https://gitlab.haskell.org/ghc/ghc/issues/16973 # https://bugzilla.redhat.com/show_bug.cgi?id=1733030 # https://gitlab.haskell.org/ghc/ghc/-/issues/16998 @@ -99,21 +100,21 @@ Patch27: ghc-configure-c99.patch # see also deprecated ghc_arches defined in ghc-srpm-macros # /usr/lib/rpm/macros.d/macros.ghc-srpm
-BuildRequires: ghc-compiler > 8.8 +BuildRequires: %{ghcboot}-compiler # for ABI hash checking %if %{with abicheck} BuildRequires: %{name} %endif -BuildRequires: ghc-rpm-macros-extra >= 2.3.11 -BuildRequires: ghc-binary-devel -BuildRequires: ghc-bytestring-devel -BuildRequires: ghc-containers-devel -BuildRequires: ghc-directory-devel -BuildRequires: ghc-pretty-devel -BuildRequires: ghc-process-devel -BuildRequires: ghc-stm-devel -BuildRequires: ghc-template-haskell-devel -BuildRequires: ghc-transformers-devel +BuildRequires: ghc-rpm-macros-extra +BuildRequires: %{ghcboot}-binary-devel +BuildRequires: %{ghcboot}-bytestring-devel +BuildRequires: %{ghcboot}-containers-devel +BuildRequires: %{ghcboot}-directory-devel +BuildRequires: %{ghcboot}-pretty-devel +BuildRequires: %{ghcboot}-process-devel +BuildRequires: %{ghcboot}-stm-devel +BuildRequires: %{ghcboot}-template-haskell-devel +BuildRequires: %{ghcboot}-transformers-devel BuildRequires: alex BuildRequires: gmp-devel BuildRequires: libffi-devel @@ -132,7 +133,7 @@ BuildRequires: llvm%{llvm_major} %endif %ifarch armv7hl # patch12 -BuildRequires: autoconf, automake +BuildRequires: autoconf automake %endif Requires: %{name}-compiler = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} @@ -304,6 +305,7 @@ This package provides the User Guide and Haddock manual. Summary: GHC development libraries meta package License: BSD and HaskellReport Requires: %{name}-compiler = %{version}-%{release} +Obsoletes: %{name}-libraries < %{version}-%{release} Provides: %{name}-libraries = %{version}-%{release} %{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/([^ ]*)-([^ ]*)/%{name}-\1-devel = \2-%{release},/g")}
@@ -342,7 +344,7 @@ rm -r libffi-tarballs %patch12 -p1 -b .orig12 %endif
-# remove s390x after switching to llvm +# remove s390x after complete switching to llvm %ifarch %{ghc_unregisterized_arches} s390x %patch15 -p1 -b .orig %endif @@ -353,7 +355,7 @@ rm -r libffi-tarballs %endif
#debian -#%%patch24 -p1 -b .orig +%patch24 -p1 -b .orig %patch26 -p1 -b .orig
%patch27 -p1 @@ -366,7 +368,7 @@ if [ ! -f "libraries/%{gen_contents_index}" ]; then fi %endif
-# http://ghc.haskell.org/trac/ghc/wiki/Platforms +# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms cat > mk/build.mk << EOF %if %{with perf_build} %ifarch %{ghc_llvm_archs} @@ -418,6 +420,7 @@ export CC=%{_bindir}/gcc %ifarch %{ghc_unregisterized_arches} --enable-unregisterised \ %endif + GHC=%{_bindir}/ghc-%{ghcboot_major} \ %{nil}
# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)" @@ -427,6 +430,7 @@ make %{?_smp_mflags}
%install make DESTDIR=%{buildroot} install + %if %{defined _ghcdynlibdir} mv %{buildroot}%{ghclibdir}/*/libHS*ghc%{ghc_version}.so %{buildroot}%{_ghcdynlibdir}/ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" ; -print); do @@ -524,6 +528,19 @@ for i in hp2ps hpc hsc2hs runhaskell; do ln -s $i-%{version} %{buildroot}%{_bindir}/$i done
+( +cd %{buildroot}%{_bindir} +for i in *; do + case $i in + *-%{version}) ;; + *) + if [ -f $i-%{version} ]; then + ln -s $i-%{version} $i-%{ghc_major} + fi + esac +done +) +
%check export LANG=C.utf8 @@ -549,10 +566,10 @@ $GHC --info
# check the ABI hashes %if %{with abicheck} -if [ "%{version}" = "$(ghc --numeric-version)" ]; then +if [ "%{version}" = "$(ghc-%{version} --numeric-version)" ]; then echo "Checking package ABI hashes:" for i in %{ghc_packages_list}; do - old=$(ghc-pkg field $i id --simple-output || :) + old=$(ghc-pkg-%{ghc_version} field $i id --simple-output || :) if [ -n "$old" ]; then new=$(/usr/lib/rpm/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field $i id --simple-output) if [ "$old" != "$new" ]; then @@ -571,7 +588,7 @@ if [ "%{version}" = "$(ghc --numeric-version)" ]; then exit 1 fi else - echo "ABI hash checks skipped: GHC changed from $(ghc --numeric-version) to %{version}" + echo "ABI hash checks skipped: GHC changed from $(ghc-%{ghc_version} --numeric-version) to %{version}" fi %endif
@@ -615,6 +632,14 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index %{_bindir}/hsc2hs-%{version} %{_bindir}/runghc-%{version} %{_bindir}/runhaskell-%{version} +%{_bindir}/ghc-%{ghc_major} +%{_bindir}/ghc-pkg-%{ghc_major} +%{_bindir}/ghci-%{ghc_major} +%{_bindir}/runghc-%{ghc_major} +%{_bindir}/runhaskell-%{ghc_major} +%{_bindir}/hp2ps-%{ghc_major} +%{_bindir}/hpc-%{ghc_major} +%{_bindir}/hsc2hs-%{ghc_major} %dir %{ghclibdir}/bin %{ghclibdir}/bin/ghc %{ghclibdir}/bin/ghc-iserv @@ -679,12 +704,12 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index %{ghc_html_libraries_dir}/gen_contents_index %verify(not size mtime) %{ghc_html_libraries_dir}/doc-index*.html %verify(not size mtime) %{ghc_html_libraries_dir}/index*.html -%endif
%files filesystem %dir %_ghc_doc_dir %dir %ghc_html_dir %dir %ghc_html_libraries_dir +%endif
%if %{with manual} %files manual
arch-excludes@lists.fedoraproject.org