public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ghc9.8] rawhide: use hadrian-bootstrap-sources and bundled Cabal to build hadrian (#2503917)
@ 2026-08-08 13:39 Jens Petersen
0 siblings, 0 replies; only message in thread
From: Jens Petersen @ 2026-08-08 13:39 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ghc9.8
Branch : rawhide
Commit : 59fe856fd3d1409adb4a3ac5228c36c2a72ba03a
Author : Jens Petersen <petersen@redhat.com>
Date : 2026-08-08T21:38:19+08:00
Stats : +125/-12 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/ghc9.8/c/59fe856fd3d1409adb4a3ac5228c36c2a72ba03a?branch=rawhide
Log:
use hadrian-bootstrap-sources and bundled Cabal to build hadrian (#2503917)
---
diff --git a/.gitignore b/.gitignore
index 0cf7fe8..3f609f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
/ghc-9.8.2-src.tar.lz
/ghc-9.8.3-src.tar.xz
/ghc-9.8.4-src.tar.xz
+/hadrian-bootstrap-sources-9.6.2.tar.gz
+/extra-1.7.16.tar.gz
diff --git a/extra.cabal b/extra.cabal
new file mode 100644
index 0000000..05a13a7
--- /dev/null
+++ b/extra.cabal
@@ -0,0 +1,87 @@
+cabal-version: 1.18
+build-type: Simple
+name: extra
+version: 1.7.16
+x-revision: 1
+license: BSD3
+license-file: LICENSE
+category: Development
+author: Neil Mitchell <ndmitchell@gmail.com>
+maintainer: Neil Mitchell <ndmitchell@gmail.com>
+copyright: Neil Mitchell 2014-2024
+synopsis: Extra functions I use.
+description:
+ A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.
+ .
+ The module "Extra" documents all functions provided by this library. Modules such as "Data.List.Extra" provide extra functions over "Data.List" and also reexport "Data.List". Users are recommended to replace "Data.List" imports with "Data.List.Extra" if they need the extra functionality.
+homepage: https://github.com/ndmitchell/extra#readme
+bug-reports: https://github.com/ndmitchell/extra/issues
+tested-with: GHC==9.8, GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8
+
+extra-doc-files:
+ CHANGES.txt
+ README.md
+extra-source-files:
+ Generate.hs
+
+source-repository head
+ type: git
+ location: https://github.com/ndmitchell/extra.git
+
+library
+ default-language: Haskell2010
+ hs-source-dirs: src
+ build-depends:
+ base >= 4.9 && < 4.21,
+ directory,
+ filepath,
+ process,
+ clock >= 0.7,
+ time
+ if !os(windows)
+ build-depends: unix
+
+ other-modules:
+ Partial
+ exposed-modules:
+ Extra
+ Control.Concurrent.Extra
+ Control.Exception.Extra
+ Control.Monad.Extra
+ Data.Foldable.Extra
+ Data.Either.Extra
+ Data.IORef.Extra
+ Data.List.Extra
+ Data.List.NonEmpty.Extra
+ Data.Monoid.Extra
+ Data.Tuple.Extra
+ Data.Typeable.Extra
+ Data.Version.Extra
+ Numeric.Extra
+ System.Directory.Extra
+ System.Environment.Extra
+ System.Info.Extra
+ System.IO.Extra
+ System.Process.Extra
+ System.Time.Extra
+ Text.Read.Extra
+
+test-suite extra-test
+ type: exitcode-stdio-1.0
+ default-language: Haskell2010
+ build-depends:
+ base == 4.*,
+ directory,
+ filepath,
+ extra,
+ QuickCheck >= 2.10,
+ quickcheck-instances >= 0.3.17
+ if !os(windows)
+ build-depends: unix
+ hs-source-dirs: test
+ ghc-options: -main-is Test -threaded "-with-rtsopts=-N4 -K1K"
+ main-is: Test.hs
+ other-modules:
+ TestCustom
+ TestGen
+ TestUtil
diff --git a/ghc9.8.spec b/ghc9.8.spec
index 99a1613..0b8cda3 100644
--- a/ghc9.8.spec
+++ b/ghc9.8.spec
@@ -16,10 +16,14 @@
%undefine with_haddock
%endif
+# tweak for ppc64le
+%global ghcplatform %(echo $(echo %{_arch} | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version_override})
+
%global ghc_major 9.8
%global ghc_name ghc%{ghc_major}
%global base_ver 4.19.2.0
+%global Cabal_ver 3.10.3.0
%global ghc_bignum_ver 1.3
%global ghc_compact_ver 0.1.0.0
%global hpc_ver 0.7.0.0
@@ -28,7 +32,7 @@
# bootstrap needs 9.4+
# can't build with f43 ghc-9.8.i686 (Unique Word64)
-%if 0%{?fedora} >= 43 || %{defined el9}
+%if %{undefined el10}
%global ghcboot_major 9.6
%endif
%global ghcboot ghc%{?ghcboot_major}
@@ -61,7 +65,7 @@ Version: 9.8.4
# - 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: 18%{?dist}
+Release: 19%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD-3-Clause AND HaskellReport
@@ -73,6 +77,10 @@ Source1: https://downloads.haskell.org/ghc/%{version}/ghc-%{version}-testsuite.t
Source5: ghc-pkg.man
Source6: haddock.man
Source7: runghc.man
+# hadrian bootstrap libraries
+Source10: https://downloads.haskell.org/ghc/9.8.4/hadrian-bootstrap-sources/hadrian-bootstrap-sources-9.6.2.tar.gz
+Source11: https://hackage.haskell.org/package/extra-1.7.16/extra-1.7.16.tar.gz
+Source12: https://hackage.haskell.org/package/extra-1.7.16/extra.cabal
# absolute haddock path (was for html/libraries -> libraries)
Patch1: ghc-gen_contents_index-haddock-path.patch
@@ -120,7 +128,7 @@ BuildRequires: %{ghcboot}-compiler
%if %{with abicheck}
BuildRequires: %{name}
%endif
-BuildRequires: ghc-rpm-macros-extra >= 2.6.5
+BuildRequires: ghc-rpm-macros-extra
BuildRequires: %{ghcboot}-array-devel
BuildRequires: %{ghcboot}-binary-devel
BuildRequires: %{ghcboot}-bytestring-devel
@@ -155,19 +163,13 @@ BuildRequires: autoconf automake
%if %{with build_hadrian}
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-base-devel
-BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
-BuildRequires: ghc-cryptohash-sha256-devel
BuildRequires: ghc-directory-devel
-BuildRequires: ghc-extra-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-mtl-devel
-BuildRequires: ghc-parsec-devel
-BuildRequires: ghc-shake-devel
BuildRequires: ghc-stm-devel
BuildRequires: ghc-transformers-devel
-BuildRequires: ghc-unordered-containers-devel
%else
BuildRequires: %{name}-hadrian
%endif
@@ -318,8 +320,8 @@ This provides the hadrian tool which can be used to build ghc.
# use "./libraries-versions.sh" to check versions
%if %{defined ghclibdir}
-%ghc_lib_subpackage -d -l BSD-3-Clause Cabal-3.10.3.0
-%ghc_lib_subpackage -d -l BSD-3-Clause Cabal-syntax-3.10.3.0
+%ghc_lib_subpackage -d -l BSD-3-Clause Cabal-%{Cabal_ver}
+%ghc_lib_subpackage -d -l BSD-3-Clause Cabal-syntax-%{Cabal_ver}
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.8.0
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
%ghc_lib_subpackage -d -l BSD-3-Clause binary-0.8.9.1
@@ -386,8 +388,24 @@ Installing this package causes %{name}-*-prof packages corresponding to
%prep
%setup -q -n ghc-%{version} %{?with_testsuite:-b1}
+
+%global hadrian_deps base16-bytestring-1.0.2.0 clock-0.8.4 cryptohash-sha256-0.11.102.1 extra-1.7.16 filepattern-0.1.3 hashable-1.4.4.0 heaps-0.4 js-dgtable-0.5.2 js-flot-0.8.3 js-jquery-3.3.1 os-string-2.0.2.1 primitive-0.9.0.0 splitmix-0.1.0.5 random-1.2.1.2 unordered-containers-0.2.20 utf8-string-1.0.2 shake-0.19.8
+
( cd hadrian
cabal-tweak-flag selftest False
+ cabal-tweak-dep-ver containers '< 0.7' '< 0.8'
+ mkdir deps
+ (cd deps
+ tar xf %SOURCE10
+ cp -p %SOURCE11 %SOURCE12 .
+ for i in %hadrian_deps; do
+ tar xf $i.tar.gz
+ mv -f $(echo $i | sed 's/\(.*\)-.*/\1.cabal/') $i
+ mv $i ..
+ done
+ )
+ ln -sf ../libraries/Cabal/Cabal-syntax Cabal-syntax-%{Cabal_ver}
+ ln -sf ../libraries/Cabal/Cabal Cabal-%{Cabal_ver}
)
%patch -P1 -p1 -b .orig
@@ -476,6 +494,7 @@ export LANG=C.utf8
%endif
(
cd hadrian
+%ghc_libs_build -H -P -W Cabal-syntax-%{Cabal_ver} Cabal-%{Cabal_ver} %{hadrian_deps}
%ghc_bin_build -W
)
%global hadrian hadrian/dist/build/hadrian/hadrian
@@ -487,7 +506,7 @@ cd hadrian
%global hadrian_llvm +llvm
%endif
%define hadrian_docs %{!?with_haddock:--docs=no-haddocks} --docs=%[%{?with_manual} ? "no-sphinx-pdfs" : "no-sphinx"]
-%if %{defined debug_flavor}
+%if %{with debug_flavor}
%define hadrian_debug +debug_info
%endif
# + hadrian/dist/build/hadrian/hadrian -j224 --flavour=perf --docs=no-sphinx-pdfs binary-dist-dir --hash-unit-ids
@@ -848,6 +867,9 @@ make test
%changelog
+* Sat Aug 08 2026 Jens Petersen <petersen@redhat.com> - 9.8.4-19
+- use hadrian-bootstrap-sources and bundled Cabal to build hadrian (#2503917)
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 9.8.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
diff --git a/sources b/sources
index 8a3f1aa..f8c6290 100644
--- a/sources
+++ b/sources
@@ -1 +1,3 @@
SHA512 (ghc-9.8.4-src.tar.xz) = f25bd9388cd9c404f33eef09a3c71f83a468ca6cf870bd5938d3f2b16c7b0a6bdc2817b6c188d047f68c0ac39105731b904b34ef267b315abf9572a6488d3b82
+SHA512 (hadrian-bootstrap-sources-9.6.2.tar.gz) = 504ad1c5db5730c7f6c1898b8581c0a0ab2fd5422c24164c8d7eaaeefcbbb50b6740513cf3a4db11b12dd6eb1e906baf3cfb59435063b8b79f1156cb2cc409d8
+SHA512 (extra-1.7.16.tar.gz) = ee10e9105b17a17980c76cf41225ac7a49b85c2a2a6847bb830a9e1ea142ad09a49766ad6aeb3b81b32e639d3093c79836adafd4e88b2db922b4a8d8260d5504
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-08 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-08 13:39 [rpms/ghc9.8] rawhide: use hadrian-bootstrap-sources and bundled Cabal to build hadrian (#2503917) Jens Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox