[Python-modules-commits] r4320 - in packages/mod-wsgi/trunk/debian (9 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sun Jan 6 23:44:01 UTC 2008


    Date: Sunday, January 6, 2008 @ 23:44:00
  Author: piotr
Revision: 4320

* Rename mod_wsgi.load to wsgi.load (to follow
  /etc/apache2/mods-available best practise, closes: 456737)

Added:
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm
  packages/mod-wsgi/trunk/debian/wsgi.conf
  packages/mod-wsgi/trunk/debian/wsgi.load
Modified:
  packages/mod-wsgi/trunk/debian/changelog
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.install
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm
Deleted:
  packages/mod-wsgi/trunk/debian/mod-wsgi.conf
  packages/mod-wsgi/trunk/debian/mod-wsgi.load

Modified: packages/mod-wsgi/trunk/debian/changelog
===================================================================
--- packages/mod-wsgi/trunk/debian/changelog	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/changelog	2008-01-06 23:44:00 UTC (rev 4320)
@@ -7,8 +7,12 @@
   * debian/control
     - uniforming Vcs-Browser field
 
- -- Bernd Zeimetz <bernd at bzed.de>  Sat, 17 Nov 2007 19:07:04 +0100
+  [ Piotr Ożarowski ]
+  * Rename mod_wsgi.load to wsgi.load (to follow
+    /etc/apache2/mods-available best practise, closes: 456737)
 
+ -- Bernd Zeimetz <bernd at bzed.de>  Sun, 06 Jan 2008 22:54:15 +0100
+
 mod-wsgi (1.3-1) unstable; urgency=low
 
   * New upstream version

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.install
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.install	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.install	2008-01-06 23:44:00 UTC (rev 4320)
@@ -1,2 +1,2 @@
-debian/mod-wsgi.load etc/apache2/mods-available
-debian/mod-wsgi.conf etc/apache2/mods-available
+debian/wsgi.load etc/apache2/mods-available
+debian/wsgi.conf etc/apache2/mods-available

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst	2008-01-06 23:44:00 UTC (rev 4320)
@@ -15,14 +15,27 @@
     fi
 }
 
+# mod-wsgi.{load,conf} renamed to wsgi.{load,conf} in 1.3-2 / 2.0~c4-2:
+# remove old mod-wsgi.* files
+test -e /etc/apache2/mods-available/mod-wsgi.load && rm -f /etc/apache2/mods-available/mod-wsgi.load
+test -L /etc/apache2/mods-enabled/mod-wsgi.conf && rm -f /etc/apache2/mods-enabled/mod-wsgi.conf
+# use old config file if possible
+test -e /etc/apache2/mods-available/mod-wsgi.conf && mv -f /etc/apache2/mods-available/mod-wsgi.conf \
+	/etc/apache2/mods-available/wsgi.conf
+# enable wsgi module if mod-wsgi was enabled
+if [ -L /etc/apache2/mods-enabled/mod-wsgi.load ]; then
+	rm -f /etc/apache2/mods-enabled/mod-wsgi.load
+        a2enmod wsgi >/dev/null || true
+fi
+
 if [ -z "$2" ]; then
     if [ -e /etc/apache2/apache2.conf ]; then
-        a2enmod mod-wsgi >/dev/null || true
+        a2enmod wsgi >/dev/null || true
         apache_force_reload
     fi
 else
     #we're upgrading
-    if [ -e /etc/apache2/mods-enabled/mod-wsgi.load ]; then
+    if [ -e /etc/apache2/mods-enabled/wsgi.load ]; then
         apache_force_reload
     fi
 fi

Added: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm	                        (rev 0)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm	2008-01-06 23:44:00 UTC (rev 4320)
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# mod-wsgi.{load,conf} renamed to wsgi.{load,conf} in 1.3-2 / 2.0~c4-2
+version_with_old_module_name() {
+    dpkg --compare-versions "$1" lt-nl "1.3-2" && return 0
+    dpkg --compare-versions "$1" lt-nl "2.0~c4-2" && dpkg --compare-versions "$1" gt-nl "2.0~c1" && return 0
+    return 1
+}
+restore_mod_wsgi() {
+    a2dismod wsgi || true
+    # downgrading to package with old module name -- we have to restore pseudo conffile
+    echo "LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so" > /etc/apache2/mods-available/mod-wsgi.load
+    if [ -e /etc/apache2/mods-available/wsgi.conf ]; then
+        mv /etc/apache2/mods-available/wsgi.conf /etc/apache2/mods-available/mod-wsgi.conf
+    fi
+    if [ -e /etc/apache2/mods-available/wsgi.load ]; then
+        rm -f /etc/apache2/mods-available/wsgi.load
+    fi
+}
+if version_with_old_module_name $2; then
+    test ! -e /etc/apache2/mods-available/mod_wsgi.load && restore_mod_wsgi
+fi
+
+
+if [ "$1" = "purge" -o "$1" = "remove" ]; then
+    # remove pseudo conffile
+    test -e /etc/apache2/mods-available/wsgi.load && rm -f /etc/apache2/mods-available/wsgi.load
+fi
+if [ "$1" = "purge" -a -e /etc/apache2/mods-available/wsgi.conf ]; then
+    # remove conffile
+    rm -f /etc/apache2/mods-available/wsgi.conf
+fi
+
+#DEBHELPER#
+
+exit 0

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm	2008-01-06 23:44:00 UTC (rev 4320)
@@ -3,7 +3,7 @@
 set -e
 
 if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
-    a2dismod mod-wsgi || true
+    a2dismod wsgi || true
 fi
 
 rm -f /usr/lib/apache2/modules/mod_wsgi.so

Deleted: packages/mod-wsgi/trunk/debian/mod-wsgi.conf
===================================================================
--- packages/mod-wsgi/trunk/debian/mod-wsgi.conf	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/mod-wsgi.conf	2008-01-06 23:44:00 UTC (rev 4320)
@@ -1,87 +0,0 @@
-<IfModule mod_wsgi.c>
-
-
-    #This config file is provided to give an overview of the directives,
-    #which are only allowed in the 'server config' context.
-    #For a detailed description of all avaiable directives please read
-    #http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
-
-
-    #WSGISocketPrefix: Configure directory to use for daemon sockets.
-    #
-    #Apache's DEFAULT_REL_RUNTIMEDIR should be the proper place for WSGI's
-    #Socket. In case you want to mess with the permissions of the directory,
-    #you need to define WSGISocketPrefix to an alternative directory.
-    #See http://code.google.com/p/modwsgi/wiki/ConfigurationIssues for more
-    #information
-
-        #WSGISocketPrefix /var/run/apache2/wsgi
-
-    
-    #WSGIPythonOptimize: Enables basic Python optimisation features.
-    #
-    #Sets the level of Python compiler optimisations. The default is '0'
-    #which means no optimisations are applied.
-    #Setting the optimisation level to '1' or above will have the effect
-    #of enabling basic Python optimisations and changes the filename
-    #extension for compiled (bytecode) files from .pyc to .pyo.
-    #When the optimisation level is set to '2', doc strings will not be
-    #generated and retained. This will result in a smaller memory footprint,
-    #but may cause some Python packages which interrogate doc strings in some
-    #way to fail. 
-
-        #WSGIPythonOptimize 0
-
-
-    #WSGIPythonExecutable: Absolute path to Python executable, overriding
-    #                      the PYTHONEXECUTABLE environment variable.
-    #WSGIPythonHome: Absolute path to Python prefix/exec_prefix directories,
-    #                overriding the PYTHONHOME environment variable.
-    #
-    #You need to take care of these variables if /usr/bin/python does
-    #not point to Debian's default Python version as provided by the
-    #package 'python' on your system, or if you have multiple versions of
-    #Python installed in different locations in the file system, especially
-    #different installations of the same major/minor version, and the
-    #installation that Apache finds in its PATH is not the desired one.
-
-        #WSGIPythonExecutable file-path
-        #WSGIPythonHome prefix|prefix:exec_prefix
-
-
-    #WSGIPythonPath: Additional directories to search for Python modules,
-    #                overriding the PYTHONPATH environment variable.
-    #
-    #Used to specify additional directories to search for Python modules.
-    #If multiple directories are specified they should be separated by a ':'.
-
-        #WSGIPythonPath directory|directory-1:directory-2:...
-
-
-    #WSGIRestrictStdin: Enable restrictions on use of STDIN.
-    #WSGIRestrictStdout: Enable restrictions on use of STDOUT.
-    #WSGIRestrictSignal: Enable restrictions on use of signal().
-    #
-    #Well behaved WSGI applications neither should try to read/write from/to
-    #STDIN/STDOUT, nor should they try to register signal handlers. If your
-    #application needs an exception from this rule, you can disable the
-    #restrictions here.
-
-        #WSGIRestrictStdin On
-        #WSGIRestrictStdout On
-        #WSGIRestrictSignal On
-
-
-    #WSGIAcceptMutex: Specify type of accept mutex used by daemon processes.
-    #
-    #The WSGIAcceptMutex directive sets the method that mod_wsgi will use to
-    #serialize multiple daemon processes in a process group accepting requests
-    #on a socket connection from the Apache child processes. If this directive
-    #is not defined then the same type of mutex mechanism as used by Apache for
-    #the main Apache child processes when accepting connections from a client
-    #will be used. If set the method types are the same as for the Apache
-    #AcceptMutex directive.
-
-        #WSGIAcceptMutex default
-
-</IfModule>

Deleted: packages/mod-wsgi/trunk/debian/mod-wsgi.load
===================================================================
--- packages/mod-wsgi/trunk/debian/mod-wsgi.load	2008-01-06 23:33:28 UTC (rev 4319)
+++ packages/mod-wsgi/trunk/debian/mod-wsgi.load	2008-01-06 23:44:00 UTC (rev 4320)
@@ -1 +0,0 @@
-LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

Added: packages/mod-wsgi/trunk/debian/wsgi.conf
===================================================================
--- packages/mod-wsgi/trunk/debian/wsgi.conf	                        (rev 0)
+++ packages/mod-wsgi/trunk/debian/wsgi.conf	2008-01-06 23:44:00 UTC (rev 4320)
@@ -0,0 +1,87 @@
+<IfModule mod_wsgi.c>
+
+
+    #This config file is provided to give an overview of the directives,
+    #which are only allowed in the 'server config' context.
+    #For a detailed description of all avaiable directives please read
+    #http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
+
+
+    #WSGISocketPrefix: Configure directory to use for daemon sockets.
+    #
+    #Apache's DEFAULT_REL_RUNTIMEDIR should be the proper place for WSGI's
+    #Socket. In case you want to mess with the permissions of the directory,
+    #you need to define WSGISocketPrefix to an alternative directory.
+    #See http://code.google.com/p/modwsgi/wiki/ConfigurationIssues for more
+    #information
+
+        #WSGISocketPrefix /var/run/apache2/wsgi
+
+    
+    #WSGIPythonOptimize: Enables basic Python optimisation features.
+    #
+    #Sets the level of Python compiler optimisations. The default is '0'
+    #which means no optimisations are applied.
+    #Setting the optimisation level to '1' or above will have the effect
+    #of enabling basic Python optimisations and changes the filename
+    #extension for compiled (bytecode) files from .pyc to .pyo.
+    #When the optimisation level is set to '2', doc strings will not be
+    #generated and retained. This will result in a smaller memory footprint,
+    #but may cause some Python packages which interrogate doc strings in some
+    #way to fail. 
+
+        #WSGIPythonOptimize 0
+
+
+    #WSGIPythonExecutable: Absolute path to Python executable, overriding
+    #                      the PYTHONEXECUTABLE environment variable.
+    #WSGIPythonHome: Absolute path to Python prefix/exec_prefix directories,
+    #                overriding the PYTHONHOME environment variable.
+    #
+    #You need to take care of these variables if /usr/bin/python does
+    #not point to Debian's default Python version as provided by the
+    #package 'python' on your system, or if you have multiple versions of
+    #Python installed in different locations in the file system, especially
+    #different installations of the same major/minor version, and the
+    #installation that Apache finds in its PATH is not the desired one.
+
+        #WSGIPythonExecutable file-path
+        #WSGIPythonHome prefix|prefix:exec_prefix
+
+
+    #WSGIPythonPath: Additional directories to search for Python modules,
+    #                overriding the PYTHONPATH environment variable.
+    #
+    #Used to specify additional directories to search for Python modules.
+    #If multiple directories are specified they should be separated by a ':'.
+
+        #WSGIPythonPath directory|directory-1:directory-2:...
+
+
+    #WSGIRestrictStdin: Enable restrictions on use of STDIN.
+    #WSGIRestrictStdout: Enable restrictions on use of STDOUT.
+    #WSGIRestrictSignal: Enable restrictions on use of signal().
+    #
+    #Well behaved WSGI applications neither should try to read/write from/to
+    #STDIN/STDOUT, nor should they try to register signal handlers. If your
+    #application needs an exception from this rule, you can disable the
+    #restrictions here.
+
+        #WSGIRestrictStdin On
+        #WSGIRestrictStdout On
+        #WSGIRestrictSignal On
+
+
+    #WSGIAcceptMutex: Specify type of accept mutex used by daemon processes.
+    #
+    #The WSGIAcceptMutex directive sets the method that mod_wsgi will use to
+    #serialize multiple daemon processes in a process group accepting requests
+    #on a socket connection from the Apache child processes. If this directive
+    #is not defined then the same type of mutex mechanism as used by Apache for
+    #the main Apache child processes when accepting connections from a client
+    #will be used. If set the method types are the same as for the Apache
+    #AcceptMutex directive.
+
+        #WSGIAcceptMutex default
+
+</IfModule>

Added: packages/mod-wsgi/trunk/debian/wsgi.load
===================================================================
--- packages/mod-wsgi/trunk/debian/wsgi.load	                        (rev 0)
+++ packages/mod-wsgi/trunk/debian/wsgi.load	2008-01-06 23:44:00 UTC (rev 4320)
@@ -0,0 +1 @@
+LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so




More information about the Python-modules-commits mailing list