SF.net SVN: gar:[25717] csw/mgar/pkg/mod_wsgi/trunk

cgrzemba at users.sourceforge.net cgrzemba at users.sourceforge.net
Fri May 20 11:35:40 CEST 2016


Revision: 25717
          http://sourceforge.net/p/gar/code/25717
Author:   cgrzemba
Date:     2016-05-20 09:35:39 +0000 (Fri, 20 May 2016)
Log Message:
-----------
mod_wsgi/trunk: add ap24 postinstall, preremove scripts

Modified Paths:
--------------
    csw/mgar/pkg/mod_wsgi/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.postinstall
    csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.preremove
    csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.postinstall
    csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.preremove
    csw/mgar/pkg/mod_wsgi/trunk/files/README

Removed Paths:
-------------
    csw/mgar/pkg/mod_wsgi/trunk/files/postinstall
    csw/mgar/pkg/mod_wsgi/trunk/files/preremove

Modified: csw/mgar/pkg/mod_wsgi/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/Makefile	2016-05-19 15:01:00 UTC (rev 25716)
+++ csw/mgar/pkg/mod_wsgi/trunk/Makefile	2016-05-20 09:35:39 UTC (rev 25717)
@@ -18,7 +18,8 @@
 # GIT_USE_PROXY = 1
 GIT_TREEISH_LibreCAD.git = $(VERSION)
 
-DISTFILES      +=       postinstall preremove
+DISTFILES      +=       CSWap24modwsgi.postinstall CSWap24modwsgi.preremove
+DISTFILES      +=       CSWap2modwsgi.postinstall CSWap2modwsgi.preremove
 
 VENDOR_URL      = https://github.com/GrahamDumpleton/mod_wsgi/
 LICENSE         = LICENSE

Added: csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.postinstall
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.postinstall	                        (rev 0)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.postinstall	2016-05-20 09:35:39 UTC (rev 25717)
@@ -0,0 +1,12 @@
+CSW_PREFIX=${PKG_INSTALL_ROOT}/etc/opt/csw
+AP2_CONFIG=$CSW_PREFIX/apache2/httpd.conf
+AP2_MODULE=$CSW_PREFIX/apache2/extra/modules.load
+
+if [ -n "`egrep 'LoadModule wsgi_module' $AP2_MODULE`" ] ; then
+    perl -i -plne 's,^#[ ]*(LoadModule wsgi.*),$1,' $AP2_MODULE
+else
+    echo "Adding LoadModule wsgi_module for extra/modules.load"
+    cat << EOM >> $AP2_MODULE
+LoadModule wsgi_module lib/apache2/modules/libwsgi.so
+EOM
+fi

Added: csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.preremove
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.preremove	                        (rev 0)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/CSWap24modwsgi.preremove	2016-05-20 09:35:39 UTC (rev 25717)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/etc/opt/csw
+AP2_CONFIG=$CSW_PREFIX/apache2/httpd.conf
+AP2_MODULE=$CSW_PREFIX/apache2/extra/modules.load
+
+perl -i -plne 's,(?<!#)(LoadModule wsgi_module .*),#$1,' $AP2_MODULE
+
+cat <<END
+
+NOTICE: mod_wsgi is disabled in httpd.conf but the server was not restarted.
+Please check your configuration and restart apache.
+
+END
+
+exit 0

Added: csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.postinstall
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.postinstall	                        (rev 0)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.postinstall	2016-05-20 09:35:39 UTC (rev 25717)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP2_PREFIX=$CSW_PREFIX/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_EXTRADIR=$AP2_CONFDIR/extra
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+
+# Enable the wsgi module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+    $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -a -n wsgi mod_wsgi.so
+
+# Finito
+cat <<END
+
+NOTICE: mod_wsgi is enabled in httpd.conf but the server was not restarted.
+Please configure mod_wsgi and restart apache.
+
+END
+
+exit 0

Added: csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.preremove
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.preremove	                        (rev 0)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/CSWap2modwsgi.preremove	2016-05-20 09:35:39 UTC (rev 25717)
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP2_PREFIX=$CSW_PREFIX/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_EXTRADIR=$AP2_CONFDIR/extra
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+
+# Disable the wsgi module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+    $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -A -n wsgi mod_wsgi.so
+
+cat <<END
+
+NOTICE: mod_wsgi is disabled in httpd.conf but the server was not restarted.
+Please check your configuration and restart apache.
+
+END
+
+exit 0

Added: csw/mgar/pkg/mod_wsgi/trunk/files/README
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/README	                        (rev 0)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/README	2016-05-20 09:35:39 UTC (rev 25717)
@@ -0,0 +1 @@
+for Apache24 we don't use apxs because we can't tell apxs to edit <sysconfdir>/extra/modules.load

Deleted: csw/mgar/pkg/mod_wsgi/trunk/files/postinstall
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/postinstall	2016-05-19 15:01:00 UTC (rev 25716)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/postinstall	2016-05-20 09:35:39 UTC (rev 25717)
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-AP2_PREFIX=$CSW_PREFIX/apache2
-AP2_BINDIR=$AP2_PREFIX/sbin
-AP2_LIBEXEC=$AP2_PREFIX/libexec
-AP2_CONFDIR=$AP2_PREFIX/etc
-AP2_EXTRADIR=$AP2_CONFDIR/extra
-AP2_CONFIG=$AP2_CONFDIR/httpd.conf
-
-# Enable the wsgi module
-PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
-chroot $PKG_INSTALL_ROOT \
-    $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -a -n wsgi mod_wsgi.so
-
-# Finito
-cat <<END
-
-NOTICE: mod_wsgi is enabled in httpd.conf but the server was not restarted.
-Please configure mod_wsgi and restart apache.
-
-END
-
-exit 0

Deleted: csw/mgar/pkg/mod_wsgi/trunk/files/preremove
===================================================================
--- csw/mgar/pkg/mod_wsgi/trunk/files/preremove	2016-05-19 15:01:00 UTC (rev 25716)
+++ csw/mgar/pkg/mod_wsgi/trunk/files/preremove	2016-05-20 09:35:39 UTC (rev 25717)
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-AP2_PREFIX=$CSW_PREFIX/apache2
-AP2_BINDIR=$AP2_PREFIX/sbin
-AP2_LIBEXEC=$AP2_PREFIX/libexec
-AP2_CONFDIR=$AP2_PREFIX/etc
-AP2_EXTRADIR=$AP2_CONFDIR/extra
-AP2_CONFIG=$AP2_CONFDIR/httpd.conf
-
-# Disable the wsgi module
-PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
-chroot $PKG_INSTALL_ROOT \
-    $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -A -n wsgi mod_wsgi.so
-
-cat <<END
-
-NOTICE: mod_wsgi is disabled in httpd.conf but the server was not restarted.
-Please check your configuration and restart apache.
-
-END
-
-exit 0

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list