[cyrus-imapd] make sure binaries are hardened
Michal Hlavinka
mhlavink at fedoraproject.org
Thu Apr 18 13:03:08 UTC 2013
commit 58abf451d023d9fda49b63a69f6d2fcbc4e784dc
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Thu Apr 18 15:02:54 2013 +0200
make sure binaries are hardened
cyrus-imapd.spec | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec
index c6f833a..aa57474 100644
--- a/cyrus-imapd.spec
+++ b/cyrus-imapd.spec
@@ -1,6 +1,6 @@
Name: cyrus-imapd
Version: 2.4.17
-Release: 2%{?dist}
+Release: 3%{?dist}
%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem
@@ -144,8 +144,10 @@ find . -type f -name "*.pl" | xargs %{__perl} -pi -e "s@/usr/local/bin/perl@%{__
find . -type f -name "*.pl" -exec chmod 755 {} \;
%build
-CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/et -I%{_includedir}/kerberosIV -fno-strict-aliasing"; export CPPFLAGS
-CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing"; export CFLAGS
+%global _hardened_build 1
+
+CPPFLAGS="${__global_cflags} -I%{_includedir}/et -I%{_includedir}/kerberosIV -fno-strict-aliasing"; export CPPFLAGS
+CFLAGS="%{__global_cflags} -fno-strict-aliasing"; export CFLAGS
CCDLFLAGS="-rdynamic"; export CCDLFLAGS
LDFLAGS="-Wl,-z,now -Wl,-z,relro"
%ifnarch ppc ppc64
@@ -171,7 +173,7 @@ LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
make -C man -f Makefile.dist
make -C doc -f Makefile.dist
-make
+make LDFLAGS="$LDFLAGS -pie %{__global_ldflags}"
make -C notifyd notifytest
%install
@@ -466,6 +468,9 @@ fi
%{_mandir}/man1/*
%changelog
+* Thu Apr 18 2013 Michal Hlavinka <mhlavink at redhat.com> - 2.4.17-3
+- make sure binaries are hardened
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list