From 2e67bb2ce57f3c470ca4c453ec65c8db65581235 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 11 Jul 2013 10:41:16 +0900 Subject: [PATCH] check for bindir before looking for executables in ghc_clear_execstack --- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e4918c7..97317bb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -106,7 +106,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_clear_execstack %ghc_clear_execstack\ -find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\; +if [ -d "%{buildroot}%{_bindir}" ]; then\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\;\ +fi # install bin package %ghc_bin_install()\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f345e0f..71a65d4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.3 +Version: 1.0.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -89,8 +89,12 @@ EOF %changelog +* Thu Jul 11 2013 Jens Petersen - 1.0.4-1 +- check for bindir before looking for executables in ghc_clear_execstack + * Wed Jul 10 2013 Jens Petersen - 1.0.3-1 - add ghc_clear_execstack and use it also in ghc_lib_install (#973512) + and require prelink for execstack * Tue Jul 9 2013 Jens Petersen - 1.0.2-1 - drop doc and prof obsoletes and provides from ghc_lib_subpackage