[mongodb] Enabled hardened build

Marek Skalický mskalick at fedoraproject.org
Fri Feb 20 07:38:33 UTC 2015


commit 6a9f89076a519691025c3fb17ae825d00f339c2e
Author: Marek Skalický <mskalick at redhat.com>
Date:   Thu Feb 19 11:22:33 2015 +0100

    Enabled hardened build
    
    - Fixed init scripts to respect LSB (#1075736)

 mongodb.spec | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/mongodb.spec b/mongodb.spec
index 9c1065d..f512886 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -1,4 +1,4 @@
-#%global _hardened_build 1
+%global _hardened_build 1
 # for better compatibility with SCL spec file
 %global pkg_name mongodb
 # mongod daemon
@@ -129,10 +129,10 @@ the MongoDB sources.
 sed -i -r "s|(conf.FindSysLibDep\(\"yaml\", \[\"yaml)(\"\]\))|\1-cpp\2|" SConstruct
 
 # Use optflags and __global_ldflags, disable -fPIC
-#(opt=$(echo "%{?optflags}" | sed -r -e 's| |","|g' )
-#sed -i -r -e "s|(CCFLAGS=\[)\"-fPIC\"|\1\"$opt\"|" SConstruct)
-#(opt=$(echo "%{?__global_ldflags}" | sed -r -e 's| |","|g' )
-#sed -i -r -e "s|(LINKFLAGS=\[)\"-fPIC\"|\1\"$opt\"|" SConstruct)
+(opt=$(echo "%{?optflags}" | sed -r -e 's| |","|g' )
+sed -i -r -e "s|(CCFLAGS=\[)\"-fPIC\"|\1\"$opt\"|" SConstruct)
+(opt=$(echo "%{?__global_ldflags}" | sed -r -e 's| |","|g' )
+sed -i -r -e "s|(LINKFLAGS=\[)\"-fPIC\"|\1\"$opt\"|" SConstruct)
 
 # CRLF -> LF
 sed -i 's/\r//' README
@@ -387,6 +387,7 @@ fi
 
 %changelog
 * Thu Feb 19 2015 Marek Skalicky <mskalick at redhat.com> - 2.6.7-5
+- Enabled hardened build
 - Fixed init scripts to respect LSB (#1075736)
 
 * Mon Feb 16 2015 Marek Skalicky <mskalick at redhat.com> - 2.6.7-4


More information about the scm-commits mailing list