add ghc_clear_execstack and use it also in ghc_lib_install

This commit is contained in:
Jens Petersen 2013-07-10 16:32:39 +09:00
parent 1b79de9a6f
commit 49912b0df5
2 changed files with 16 additions and 10 deletions

View File

@ -77,12 +77,6 @@ mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
%{nil} %{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
%ghc_bin_build\ %ghc_bin_build\
%global debug_package %{nil}\ %global debug_package %{nil}\
@ -104,15 +98,23 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
%endif\ %endif\
%{nil} %{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 # install bin package
%ghc_bin_install()\ %ghc_bin_install()\
%global _use_internal_dependency_generator 0\ %global _use_internal_dependency_generator 0\
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
%cabal_install\ %cabal_install\
%{!?1:%ghc_strip_dynlinked}\ %{!?1:%ghc_strip_dynlinked}\
%if %{undefined ghc_executable_stack}\ %{!?1:%ghc_clear_execstack}\
execstack -c %{_buildroot}%{_bindir}/*\
%endif\
%{nil} %{nil}
# ghc_lib_install [name] [version] # ghc_lib_install [name] [version]
@ -124,6 +126,7 @@ execstack -c %{_buildroot}%{_bindir}/*\
%cabal_pkg_conf\ %cabal_pkg_conf\
%ghc_gen_filelists\ %ghc_gen_filelists\
%{!?1:%ghc_strip_dynlinked}\ %{!?1:%ghc_strip_dynlinked}\
%{!?1:%ghc_clear_execstack}\
%{nil} %{nil}
# ghc_fix_dynamic_rpath prog ... # ghc_fix_dynamic_rpath prog ...

View File

@ -6,7 +6,7 @@
#%%global without_hscolour 1 #%%global without_hscolour 1
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 1.0.2 Version: 1.0.3
Release: 1%{?dist} Release: 1%{?dist}
Summary: RPM macros for building packages for GHC Summary: RPM macros for building packages for GHC
@ -89,6 +89,9 @@ EOF
%changelog %changelog
* Wed Jul 10 2013 Jens Petersen <petersen@redhat.com> - 1.0.3-1
- add ghc_clear_execstack and use it also in ghc_lib_install (#973512)
* Tue Jul 9 2013 Jens Petersen <petersen@redhat.com> - 1.0.2-1 * Tue Jul 9 2013 Jens Petersen <petersen@redhat.com> - 1.0.2-1
- drop doc and prof obsoletes and provides from ghc_lib_subpackage - drop doc and prof obsoletes and provides from ghc_lib_subpackage
- clear executable stack flag when installing package executables (#973512) - clear executable stack flag when installing package executables (#973512)