[mtr/f19] spec: enable hardened build

Michal Sekletar msekleta at fedoraproject.org
Tue Oct 8 13:14:10 UTC 2013


commit 4595cb955eab3b9ae2d2432fd0cdf8f24d80d285
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Tue Oct 8 13:27:17 2013 +0200

    spec: enable hardened build
    
    Resolves: #1014133
    
    Conflicts:
    	mtr.spec

 mtr.spec |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/mtr.spec b/mtr.spec
index c742d4c..534760c 100644
--- a/mtr.spec
+++ b/mtr.spec
@@ -1,7 +1,9 @@
+%global _hardened_build 1
+
 Summary: A network diagnostic tool
 Name: mtr
 Version: 0.84
-Release: 2%{?dist}
+Release: 3%{?dist}
 Epoch: 2
 Group: Applications/Internet
 License: GPLv2+
@@ -42,6 +44,9 @@ diagnostic tool.
 %patch3 -p1
 
 %build
+export CFLAGS="%{optflags} -fPIE"
+export LDFLAGS="-z now -pie"
+
 %configure --enable-gtk2
 make %{?_smp_mflags} && mv mtr xmtr && make distclean
 %configure --without-gtk
@@ -93,6 +98,9 @@ desktop-file-install \
 %{_datadir}/pixmaps/mtr_icon.xpm
 
 %changelog
+* Tue Oct 08 2013  Michal Sekletar <msekleta at redhat.com> - 2:0.84-3
+- enable hardened build
+
 * Thu Jun 06 2013 Michal Sekletar <msekleta at redhat.com> - 2:0.84-2
 - fix crash when dns resolver is configured with both IPv4 and IPv6 nameservers
 


More information about the scm-commits mailing list