From 1facb30fc06876377c1db00c798079b8beba7f01 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 17 Jul 2022 14:56:52 +0800 Subject: [PATCH] ghc_bin_build,ghc_lib_build: defining %ghc_debuginfo allows debuginfo Needed for ghcX.Y which builds hadrian using %ghc_bin_build which accidently disabled debuginfo as a side-effect, which lead to ghcX.Y-compiler .build-id file conflicts: Error: Transaction test error: file /usr/lib/.build-id/4e/f85f81abfd9c031a34af8117ab8e14fcbae536 from install of ghc9.4-compiler-9.4.0.20220623-5.fc36.x86_64 conflicts with file from package ghc9.2-compiler-9.2.3-10.fc36.x86_64 due to missing debuginfo data --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b0b0ce4..777ab4a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.4.0 +Version: 2.4.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -183,6 +183,9 @@ EOF %changelog +* Sun Jul 17 2022 Jens Petersen - 2.4.1-1 +- ghc_bin_build,ghc_lib_build: use ghc_debuginfo to enable debuginfo + * Fri Jun 10 2022 Jens Petersen - 2.4.0-1 - change ghc-deps.sh, splitting buildroot path from ghclibdir so that the ghc version can be used more precisely diff --git a/macros.ghc b/macros.ghc index f967f60..0b2bc39 100644 --- a/macros.ghc +++ b/macros.ghc @@ -149,14 +149,18 @@ done\ # ghc_bin_build %ghc_bin_build\ %ghc_fix_doc_perms\ +%if %{undefined ghc_debuginfo}\ %undefine _enable_debug_packages\ +%endif\ %cabal_configure\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %ghc_fix_doc_perms\ +%if %{undefined ghc_debuginfo}\ %undefine _enable_debug_packages\ +%endif\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\