[omd-commits] OMD Git: omd: mod_fcgid: update to 2.3.9

git version control git at mathias-kettner.de
Wed May 6 14:41:47 CEST 2015


Module:   omd
Branch:   master
Commit:   9222d708d3e523d121c57c3548b56d75cb9089b1
URL:      http://omdistro.org/projects/omd/repository/revisions/9222d708d3e523d121c57c3548b56d75cb9089b1

Author:   Sven Nierlein <Sven.Nierlein at consol.de>
Date:     Wed May  6 11:19:17 2015 +0200
Commiter: Sven Nierlein <Sven.Nierlein at consol.de>
Date:     Wed May  6 11:19:24 2015 +0200

mod_fcgid: update to 2.3.9

And use omd mod_fcgid on sles 11 too. This solves a problem where
fcgid processes hang on graceful apache reloads.

---

 Changelog                                          |    3 +++
 distros/Makefile.CENTOS_5                          |    1 -
 distros/Makefile.SLES_11                           |    3 +--
 distros/Makefile.SLES_11SP1                        |    3 +--
 distros/Makefile.SLES_11SP2                        |    3 +--
 distros/Makefile.SLES_11SP3                        |    3 +--
 packages/apache-omd/.gitignore                     |    2 +-
 packages/apache-omd/Makefile                       |   26 ++++++++++++++------
 packages/apache-omd/mod_fcgid-2.3.6.tar.gz         |  Bin 101883 -> 0 bytes
 packages/apache-omd/mod_fcgid-2.3.9.tar.gz         |  Bin 0 -> 107582 bytes
 .../skel/etc/apache/conf.d/02_fcgid.conf           |    1 +
 11 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/Changelog b/Changelog
index b122dae..90184eb 100644
--- a/Changelog
+++ b/Changelog
@@ -62,6 +62,9 @@ This file documents the revision history for the Open Monitoring Distribution
           - Updated Monitoring-Plugins to 2.1.1
           - Icinga: Update to 1.12.0
           - updated to nail/mailx 12.5
+          - apache:
+            - mod_fcgid: update to 2.3.9, sles 11 and centos 5/6 only
+            - set graceful restart timeout
 
 1.20     Aug 25 2014
           - apache: Changed order of apache daemon startup/stopping
diff --git a/distros/Makefile.CENTOS_5 b/distros/Makefile.CENTOS_5
index 43edcda..f525d55 100644
--- a/distros/Makefile.CENTOS_5
+++ b/distros/Makefile.CENTOS_5
@@ -45,7 +45,6 @@ OS_PACKAGES      += httpd
 OS_PACKAGES      += libevent
 OS_PACKAGES      += libmcrypt
 OS_PACKAGES      += libtool-ltdl
-OS_PACKAGES      += mod_fcgid
 OS_PACKAGES      += mysql-server
 OS_PACKAGES      += net-snmp
 OS_PACKAGES      += pango
diff --git a/distros/Makefile.SLES_11 b/distros/Makefile.SLES_11
index 848ec43..9273150 100644
--- a/distros/Makefile.SLES_11
+++ b/distros/Makefile.SLES_11
@@ -34,7 +34,6 @@ BUILD_PACKAGES += freeradius-client-devel
 OS_PACKAGES     =
 OS_PACKAGES      += net-tools # traceroute is needed for Check_MK parent scan
 OS_PACKAGES    += apache2
-OS_PACKAGES    += apache2-mod_fcgid
 OS_PACKAGES    += bind-utils
 OS_PACKAGES    += curl
 OS_PACKAGES    += dialog
@@ -81,7 +80,7 @@ APACHE_BIN        = /usr/sbin/httpd2-prefork
 APACHE_CTL        = /usr/sbin/apache2ctl
 APACHE_MODULE_DIR = /usr/lib/apache2-prefork
 APACHE_MODULE_DIR_64 = /usr/lib64/apache2-prefork
-APACHE_FCGID_MODULE = ../apache2/mod_fcgid.so
+APACHE_FCGID_MODULE = mod_fcgid.so
 PHP_FCGI_BIN      = /usr/bin/php-cgi
 APACHE_ENMOD      = a2enmod %s
 BECOME_ROOT       = su -c
diff --git a/distros/Makefile.SLES_11SP1 b/distros/Makefile.SLES_11SP1
index 29cba3e..5b39145 100644
--- a/distros/Makefile.SLES_11SP1
+++ b/distros/Makefile.SLES_11SP1
@@ -34,7 +34,6 @@ BUILD_PACKAGES += freeradius-client-devel
 OS_PACKAGES     =
 OS_PACKAGES      += net-tools # traceroute is needed for Check_MK parent scan
 OS_PACKAGES    += apache2
-OS_PACKAGES    += apache2-mod_fcgid
 OS_PACKAGES    += bind-utils
 OS_PACKAGES    += curl
 OS_PACKAGES    += dialog
@@ -81,7 +80,7 @@ APACHE_BIN        = /usr/sbin/httpd2-prefork
 APACHE_CTL        = /usr/sbin/apache2ctl
 APACHE_MODULE_DIR = /usr/lib/apache2-prefork
 APACHE_MODULE_DIR_64 = /usr/lib64/apache2-prefork
-APACHE_FCGID_MODULE = ../apache2/mod_fcgid.so
+APACHE_FCGID_MODULE = mod_fcgid.so
 PHP_FCGI_BIN	  = /usr/bin/php-cgi
 APACHE_ENMOD      = a2enmod %s
 BECOME_ROOT       = su -c
diff --git a/distros/Makefile.SLES_11SP2 b/distros/Makefile.SLES_11SP2
index 52afe21..bfd2a2d 100644
--- a/distros/Makefile.SLES_11SP2
+++ b/distros/Makefile.SLES_11SP2
@@ -34,7 +34,6 @@ BUILD_PACKAGES += freeradius-client-devel
 OS_PACKAGES     =
 OS_PACKAGES      += net-tools # traceroute is needed for Check_MK parent scan
 OS_PACKAGES    += apache2
-OS_PACKAGES    += apache2-mod_fcgid
 OS_PACKAGES    += bind-utils
 OS_PACKAGES    += curl
 OS_PACKAGES    += dialog
@@ -81,7 +80,7 @@ APACHE_BIN        = /usr/sbin/httpd2-prefork
 APACHE_CTL        = /usr/sbin/apache2ctl
 APACHE_MODULE_DIR = /usr/lib/apache2-prefork
 APACHE_MODULE_DIR_64 = /usr/lib64/apache2-prefork
-APACHE_FCGID_MODULE = ../apache2/mod_fcgid.so
+APACHE_FCGID_MODULE = mod_fcgid.so
 PHP_FCGI_BIN	  = /usr/bin/php-cgi
 APACHE_ENMOD      = a2enmod %s
 BECOME_ROOT       = su -c
diff --git a/distros/Makefile.SLES_11SP3 b/distros/Makefile.SLES_11SP3
index 79345ba..2331aae 100644
--- a/distros/Makefile.SLES_11SP3
+++ b/distros/Makefile.SLES_11SP3
@@ -35,7 +35,6 @@ BUILD_PACKAGES += libtool # needed for gearman
 OS_PACKAGES     =
 OS_PACKAGES      += net-tools # traceroute is needed for Check_MK parent scan
 OS_PACKAGES    += apache2
-OS_PACKAGES    += apache2-mod_fcgid
 OS_PACKAGES    += bind-utils
 OS_PACKAGES    += curl
 OS_PACKAGES    += dialog
@@ -82,7 +81,7 @@ APACHE_BIN        = /usr/sbin/httpd2-prefork
 APACHE_CTL        = /usr/sbin/apache2ctl
 APACHE_MODULE_DIR = /usr/lib/apache2-prefork
 APACHE_MODULE_DIR_64 = /usr/lib64/apache2-prefork
-APACHE_FCGID_MODULE = ../apache2/mod_fcgid.so
+APACHE_FCGID_MODULE = mod_fcgid.so
 PHP_FCGI_BIN	  = /usr/bin/php-cgi
 APACHE_ENMOD      = a2enmod %s
 BECOME_ROOT       = su -c
diff --git a/packages/apache-omd/.gitignore b/packages/apache-omd/.gitignore
index 3393050..b2df90b 100644
--- a/packages/apache-omd/.gitignore
+++ b/packages/apache-omd/.gitignore
@@ -1 +1 @@
-mod_fcgid-2.3.6
+mod_fcgid-?.?.?
diff --git a/packages/apache-omd/Makefile b/packages/apache-omd/Makefile
index f751e49..0e387ec 100644
--- a/packages/apache-omd/Makefile
+++ b/packages/apache-omd/Makefile
@@ -3,7 +3,7 @@ include ../../Makefile.omd
 NAME = apache-omd
 VERSION = 1.0
 DIR = $(NAME)-$(VERSION)
-FCGI_FILE="mod_fcgid-2.3.6"
+FCGI_FILE="mod_fcgid-2.3.9"
 
 MODULE_DIR=$(APACHE_MODULE_DIR)
 ifeq ($(shell uname -m),x86_64)
@@ -19,6 +19,7 @@ APACHE_MODULES=
 APACHE_MODULES_INSTALL=
 APACHE_FCGID_PATH=$(MODULE_DIR)/$(APACHE_FCGID_MODULE)
 CENTOS_WORKAROUND=0
+INSTALL_FCGID=0
 REPLACE_PHP_FCGI_BIN=$(PHP_FCGI_BIN)
 
 # Try to find the apxs binary
@@ -26,6 +27,9 @@ APXS=/usr/sbin/apxs
 ifeq ("$(wildcard $(APXS))","")
     APXS=apxs
 endif
+ifneq ("$(wildcard /usr/sbin/apxs2)","")
+    APXS=/usr/sbin/apxs2
+endif
 
 VERSIONLT7 := $(shell expr $(DISTRO_VERSION) \<= 7)
 ifeq ($(DISTRO_NAME),CENTOS)
@@ -38,14 +42,20 @@ ifeq ($(DISTRO_NAME),REDHAT)
     CENTOS_WORKAROUND=1
   endif
 endif
+ifneq (,$(findstring 11SP,$(DISTRO_VERSION)))
+  INSTALL_FCGID=1
+endif
 
 ifeq ($(CENTOS_WORKAROUND), 1)
-  CENTOS_WORKAROUND=1
+  # workaround for centos/rh which ignores "php-cgi -d settings"
+  REPLACE_PHP_FCGI_BIN=$(PHP_FCGI_BIN) -c $(OMD_ROOT)/etc/apache/php.ini
+  INSTALL_FCGID=1
+endif
+
+ifeq ($(INSTALL_FCGID), 1)
   APACHE_MODULES=modfcgid
   APACHE_MODULES_INSTALL=modfcgid_install
   APACHE_FCGID_PATH=$(OMD_ROOT)/lib/apache/mod_fcgid.so
-  # workaround for centos/rh which ignores "php-cgi -d settings"
-  REPLACE_PHP_FCGI_BIN=$(PHP_FCGI_BIN) -c $(OMD_ROOT)/etc/apache/php.ini
 endif
 
 .PHONY: skel
@@ -102,14 +112,14 @@ skel:
 
 clean:
 	# Remove files created by build/install
-	rm -rf mod_fcgid-2.3.6
+	rm -rf $(FCGI_FILE)
 
 modfcgid:
 	tar zxf $(FCGI_FILE).tar.gz
-	patch -p0 < ./patches/0001-fcgid_proc_unix.c.patch
-	patch -p0 < ./patches/0002-fcgid_pm_unix.c.patch
+	cd $(FCGI_FILE) && patch -p1 < ../patches/0001-fcgid_proc_unix.c.patch
+	cd $(FCGI_FILE) && patch -p1 < ../patches/0002-fcgid_pm_unix.c.patch
 	cd $(FCGI_FILE) && APXS=$(APXS) ./configure.apxs
-	$(MAKE) -C $(FCGI_FILE)
+	CPATH="/usr/include/apache2-worker" $(MAKE) -C $(FCGI_FILE)
 
 modfcgid_install:
 	mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/apache
diff --git a/packages/apache-omd/mod_fcgid-2.3.6.tar.gz b/packages/apache-omd/mod_fcgid-2.3.6.tar.gz
deleted file mode 100644
index 113605a..0000000
Binary files a/packages/apache-omd/mod_fcgid-2.3.6.tar.gz and /dev/null differ
diff --git a/packages/apache-omd/mod_fcgid-2.3.9.tar.gz b/packages/apache-omd/mod_fcgid-2.3.9.tar.gz
new file mode 100644
index 0000000..97f16b4
Binary files /dev/null and b/packages/apache-omd/mod_fcgid-2.3.9.tar.gz differ
diff --git a/packages/apache-omd/skel/etc/apache/conf.d/02_fcgid.conf b/packages/apache-omd/skel/etc/apache/conf.d/02_fcgid.conf
index 654c03b..f8815f2 100644
--- a/packages/apache-omd/skel/etc/apache/conf.d/02_fcgid.conf
+++ b/packages/apache-omd/skel/etc/apache/conf.d/02_fcgid.conf
@@ -6,6 +6,7 @@ MaxProcessCount 10
 MaxRequestsPerProcess 500
 IPCConnectTimeout 20
 IPCCommTimeout 120
+GracefulShutdownTimeout 120
 
 # mod_fcgid default is 128 kb which is too small for needed file
 # uploads like used e.g. by NagVis. Set this to 3 MB.



More information about the omd-commits mailing list