diff --git a/1.patch b/1.patch new file mode 100644 index 0000000..01af498 --- /dev/null +++ b/1.patch @@ -0,0 +1,25 @@ +https://github.com/opensuse-haskell/ghc-rpm-macros/pull/1 + +From ea3438d89744e6a741c420b1aaaed9004c69af65 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Sat, 15 Apr 2023 07:09:01 +0200 +Subject: [PATCH] Compile with only 1 thread + +parallel compile causes assignment of random symbol names +so we build single-threaded, which is slower, but gives reproducible results +--- + macros.ghc-suse | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/macros.ghc-suse b/macros.ghc-suse +index 3fe39a0..7c4a536 100644 +--- a/macros.ghc-suse ++++ b/macros.ghc-suse +@@ -29,4 +29,6 @@ mkdir -p %{buildroot}/usr/src/debug + %with_ghc_prof 1 + + # %%{?_smp_ncpus_max:--jobs=%%{?_smp_ncpus_max}} +-%ghc_smp_mflags %{?_smp_mflags} ++# parallel compile causes assignment of random symbol names ++# so we build single-threaded, which is slower, but gives reproducible results ++%ghc_smp_mflags -j1 diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index c3d2b33..3c225fa 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 26 03:34:18 UTC 2023 - Bernhard Wiedemann + +- Add 1.patch to make ghc builds reproducible (boo#1102408) + ------------------------------------------------------------------- Sat Mar 18 18:33:27 UTC 2023 - Ondřej Súkup diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 07d5301..42135d6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -26,6 +26,8 @@ Group: Development/Libraries/Other URL: https://fedoraproject.org/wiki/Haskell_SIG # source gets updated with osc service dr Source0: %{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM https://github.com/opensuse-haskell/ghc-rpm-macros/pull/1 +Patch1: 1.patch BuildRequires: xz Requires: rpm Requires: chrpath @@ -50,6 +52,7 @@ for example in ghc and haskell-platform. %prep %setup -q +%patch1 -p1 %build echo no build stage needed