[cgdcbxd] Updating spec file to use hardened build macro

Neil Horman nhorman at fedoraproject.org
Wed May 28 15:08:07 UTC 2014


commit 808e1dcc9f800e1b68f1047a5fde0297ec676b0d
Author: Neil Horman <nhorman at tuxdriver.com>
Date:   Wed May 28 11:07:53 2014 -0400

    Updating spec file to use hardened build macro

 cgdcbxd.spec |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/cgdcbxd.spec b/cgdcbxd.spec
index 92ffb88..7e1a14d 100644
--- a/cgdcbxd.spec
+++ b/cgdcbxd.spec
@@ -1,6 +1,8 @@
+%global _hardened_build 1
+
 Name:		cgdcbxd
 Version:	1.0.1
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	DCB network priority management daemon	
 Group:		System Environment/Base
 License:	GPLv2
@@ -31,8 +33,8 @@ host using the net_prio cgroup
 
 %build
 ./bootstrap.sh
-export CFLAGS="-fPIE -Wl,-z,relro,-z,now"
-export LDFLAGS=-pie
+export CFLAGS=$RPM_OPT_FLAGS
+export LDFLAGS=$RPM_LD_FLAGS
 %{configure}
 make
 
@@ -57,6 +59,9 @@ install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/cgdcbxd.service
 %{systemd_postun_with_restart} cgdcbxd.service
 
 %changelog
+* Wed May 28 2014 Neil Horman <nhorman at redhat.com> - 1.0.1-5
+- Update spec file to use _hardend_build macro
+
 * Fri May 02 2014 Neil Horman <nhorman at redhat.com> - 1.0.1-4
 - Fixed build to enable RELRO and PIE
 


More information about the scm-commits mailing list