From 8ed58df419491ead2b8a23fa9c9985edbd935d8c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 30 Jan 2021 00:27:39 +0800 Subject: [PATCH] %ghc_fix_doc_perms to workaround Cabal extra-source-files perm issue --- macros.ghc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/macros.ghc b/macros.ghc index aed8d80..c15d449 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,14 +128,23 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. fi\ %{nil} +# workaround Cabal bug causing executable extra-source-files +%ghc_fix_doc_perms\ +for f in $(ls | grep -i -e "^\(ANNOUNCE\|AUTHORS\|CHANGELOG\|CHANGES\|CONTRIBUTORS\|README\|TODO\)"); do\ +if [ -x $f ]; then chmod a-x $f; fi\ +done\ +%{nil} + # ghc_bin_build %ghc_bin_build\ +%ghc_fix_doc_perms\ %undefine _enable_debug_packages\ %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\ %undefine _enable_debug_packages\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\