From 49912b0df573bb4b2b9c175226bc8fb287055dec Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 Jul 2013 16:32:39 +0900 Subject: [PATCH] add ghc_clear_execstack and use it also in ghc_lib_install --- ghc-rpm-macros.ghc | 21 ++++++++++++--------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ebbf3ee..e4918c7 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -77,12 +77,6 @@ mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %{nil} -# ghc_strip_dynlinked -%ghc_strip_dynlinked\ -%if %{undefined __debug_package}\ -find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ -%endif - # ghc_bin_build %ghc_bin_build\ %global debug_package %{nil}\ @@ -104,15 +98,23 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %endif\ %{nil} +# ghc_strip_dynlinked +%ghc_strip_dynlinked\ +%if %{undefined __debug_package}\ +find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ +%endif + +# ghc_clear_execstack +%ghc_clear_execstack\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\; + # install bin package %ghc_bin_install()\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ -%if %{undefined ghc_executable_stack}\ -execstack -c %{_buildroot}%{_bindir}/*\ -%endif\ +%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_lib_install [name] [version] @@ -124,6 +126,7 @@ execstack -c %{_buildroot}%{_bindir}/*\ %cabal_pkg_conf\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ +%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_fix_dynamic_rpath prog ... diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4520a86..f345e0f 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.2 +Version: 1.0.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -89,6 +89,9 @@ EOF %changelog +* Wed Jul 10 2013 Jens Petersen - 1.0.3-1 +- add ghc_clear_execstack and use it also in ghc_lib_install (#973512) + * Tue Jul 9 2013 Jens Petersen - 1.0.2-1 - drop doc and prof obsoletes and provides from ghc_lib_subpackage - clear executable stack flag when installing package executables (#973512)