[mongodb] Disabled hardened build. Added systemd TimeoutStartSec.

Marek Skalický mskalick at fedoraproject.org
Mon Jan 12 15:30:56 UTC 2015


commit 6fe49d0c2e373be197d22a99498a368eb22d7c54
Author: Marek Skalický <mskalick at redhat.com>
Date:   Mon Jan 12 16:30:21 2015 +0100

    Disabled hardened build.
    Added systemd TimeoutStartSec.

 mongod.service |    1 +
 mongodb.spec   |   12 ++++++------
 mongos.service |    1 +
 3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/mongod.service b/mongod.service
index ac38fe2..b7486d4 100644
--- a/mongod.service
+++ b/mongod.service
@@ -10,6 +10,7 @@ EnvironmentFile=/etc/sysconfig/mongod
 ExecStart=/usr/bin/mongod $OPTIONS run
 PrivateTmp=true
 LimitNOFILE=64000
+TimeoutStartSec=180
 
 [Install]
 WantedBy=multi-user.target
diff --git a/mongodb.spec b/mongodb.spec
index db87aac..6baa257 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
@@ -121,10 +121,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
@@ -347,7 +347,7 @@ fi
 
 %changelog
 * Wed Jan 7 2015 Marek Skalicky <mskalick at redhat.com> 2.6.6-3
-- Enabled hardened build and optflags + __global_ldflags are used
+- Added systemd TimeoutStartSec (#1040573)
 - Reviewed patches and dependencies
 - Added gcc requires to support built-in atomic operations
 - Fix use of libstemmer and yaml-cpp system libraries
diff --git a/mongos.service b/mongos.service
index 6c1d50a..749327d 100644
--- a/mongos.service
+++ b/mongos.service
@@ -10,6 +10,7 @@ EnvironmentFile=/etc/sysconfig/mongos
 ExecStart=/usr/bin/mongos $OPTIONS
 PrivateTmp=true
 LimitNOFILE=64000
+TimeoutStartSec=180
 
 [Install]
 WantedBy=multi-user.target


More information about the scm-commits mailing list