Module: check_mk
Branch: master
Commit: 265efc7c0b413186446b2456c6220182de5e1d57
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=265efc7c0b4131…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sat Mar 24 20:11:54 2018 +0100
Integrated mod_wsgi into Check_MK packaging
Change-Id: Ide21c5cf4cecc849511d398e52362a299ff7fecd
---
omd/Makefile | 2 +-
omd/packages/mod_wsgi/.f12 | 10 +++++
omd/packages/mod_wsgi/.gitignore | 1 +
omd/packages/mod_wsgi/Makefile | 42 +++++++++++++++++++++
omd/packages/mod_wsgi/mod_wsgi-4.6.4.tar.gz | Bin 0 -> 2593324 bytes
.../mod_wsgi/skel/etc/apache/conf.d/01_wsgi.conf | 5 +++
6 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/omd/Makefile b/omd/Makefile
index 1935c8b..1be2c20 100644
--- a/omd/Makefile
+++ b/omd/Makefile
@@ -22,8 +22,8 @@ PACKAGES=\
msitools \
net-snmp \
apache-omd \
- mod_python \
mod_fcgid \
+ mod_wsgi \
check_mk \
check_multi \
check_mysql_health \
diff --git a/omd/packages/mod_wsgi/.f12 b/omd/packages/mod_wsgi/.f12
new file mode 100755
index 0000000..77150ea
--- /dev/null
+++ b/omd/packages/mod_wsgi/.f12
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+set -e
+
+SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
+SITE=${SITE:-$(omd sites --bare | head -n 1)}
+ROOT=/omd/sites/$SITE
+
+make -C mod_wsgi-4.6.4 clean all
+sudo make install OMD_ROOT=$ROOT
+sudo omd restart $SITE apache
diff --git a/omd/packages/mod_wsgi/.gitignore b/omd/packages/mod_wsgi/.gitignore
new file mode 100644
index 0000000..1d537aa
--- /dev/null
+++ b/omd/packages/mod_wsgi/.gitignore
@@ -0,0 +1 @@
+mod_wsgi-[0-9].[0-9].[0-9]
diff --git a/omd/packages/mod_wsgi/Makefile b/omd/packages/mod_wsgi/Makefile
new file mode 100644
index 0000000..ebd90da
--- /dev/null
+++ b/omd/packages/mod_wsgi/Makefile
@@ -0,0 +1,42 @@
+include ../../Makefile.omd
+
+NAME = mod_wsgi
+VERSION = 4.6.4
+DIR = $(NAME)-$(VERSION)
+
+# Try to find the apxs binary
+ifneq ("$(wildcard /usr/sbin/apxs)","")
+ APXS=/usr/sbin/apxs
+endif
+ifneq ("$(wildcard /usr/sbin/apxs2)","")
+ APXS=/usr/sbin/apxs2
+endif
+ifneq ("$(wildcard /usr/bin/apxs2)","")
+ APXS=/usr/bin/apxs2
+endif
+
+
+build: check-python
+ tar xzf $(DIR).tar.gz
+
+ set -e ; \
+ export PYTHONPATH="$$PYTHONPATH:$(PACKAGE_PYTHON_PYTHONPATH)" ; \
+ export LDFLAGS="$(PACKAGE_PYTHON_LDFLAGS)" ; \
+ export LD_LIBRARY_PATH="$(PACKAGE_PYTHON_LD_LIBRARY_PATH)" ; \
+ export CFLAGS="-I$(PACKAGE_PYTHON_DESTDIR)/include/python2.7" ; \
+ cd $(DIR) ; \
+ ./configure \
+ --prefix=$(OMD_ROOT) \
+ --with-apxs=$(APXS) \
+ --with-python=$(PACKAGE_PYTHON_EXECUTABLE) ; \
+ make
+
+install:
+ mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/apache/modules
+ cp $(DIR)/src/server/.libs/mod_wsgi.so $(DESTDIR)$(OMD_ROOT)/lib/apache/modules
+ chmod 644 $(DESTDIR)$(OMD_ROOT)/lib/apache/modules/mod_wsgi.so
+
+skel:
+
+clean:
+ rm -rf $(NAME)-[0-9].[0-9].[0-9]
diff --git a/omd/packages/mod_wsgi/mod_wsgi-4.6.4.tar.gz
b/omd/packages/mod_wsgi/mod_wsgi-4.6.4.tar.gz
new file mode 100644
index 0000000..cfd092d
Binary files /dev/null and b/omd/packages/mod_wsgi/mod_wsgi-4.6.4.tar.gz differ
diff --git a/omd/packages/mod_wsgi/skel/etc/apache/conf.d/01_wsgi.conf
b/omd/packages/mod_wsgi/skel/etc/apache/conf.d/01_wsgi.conf
new file mode 100644
index 0000000..4e31c96
--- /dev/null
+++ b/omd/packages/mod_wsgi/skel/etc/apache/conf.d/01_wsgi.conf
@@ -0,0 +1,5 @@
+<IfModule !mod_wsgi.c>
+ LoadModule wsgi_module ###ROOT###/lib/apache/modules/mod_wsgi.so
+</IfModule>
+
+WSGIPythonHome /omd/sites/heute