From db0d821b08507dcb22a2039741f2ffe9a45fea71 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 10 Jul 2021 01:37:03 +0800 Subject: [PATCH] fix ghc_fix_doc_perms only to touch files not dirs testcase: MissingH announcements/ --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 56fb3f7..1d7e10f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.2.2 -Release: 2%{?dist} +Version: 2.2.3 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -184,6 +184,9 @@ EOF %changelog +* Sat Jul 10 2021 Jens Petersen - 2.2.3-1 +- fix ghc_fix_doc_perms only to touch files not dirs + * Thu Jun 17 2021 Jens Petersen - 2.2.2-2 - haddock has not used hscolour for a long time diff --git a/macros.ghc b/macros.ghc index 9736686..497168c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,7 +128,7 @@ fi\ # 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\ +if [ -f $f -a -x $f ]; then chmod a-x $f; fi\ done\ %{nil}