[pycsw] 01/09: Use wsgi instead of cgi

Johan Van de Wauw johanvdw-guest at moszumanska.debian.org
Sat Oct 11 13:54:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

johanvdw-guest pushed a commit to branch master
in repository pycsw.

commit bb4c1177eb61e9b8ee5524dbfadad6392b2e2d03
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date:   Wed Oct 8 19:39:33 2014 +0200

    Use wsgi instead of cgi
    
    Conflicts:
    	debian/control
    	debian/pycsw-cgi.postinst
    
    Use WSGI
---
 debian/control                            |  5 +++--
 debian/patches/0005-Fix-apache-site.patch | 19 -------------------
 debian/patches/series                     |  1 -
 debian/pycsw-cgi.install                  |  3 ++-
 debian/pycsw-cgi.postinst                 |  5 -----
 debian/pycsw.conf                         |  8 ++++++++
 6 files changed, 13 insertions(+), 28 deletions(-)

diff --git a/debian/control b/debian/control
index 1652a1a..60fe3e9 100644
--- a/debian/control
+++ b/debian/control
@@ -45,9 +45,10 @@ Depends: ${python:Depends},
          ${misc:Depends},
          python,
          python-sqlalchemy,
-         python-pycsw (= ${binary:Version})
+         python-pycsw (= ${binary:Version}),
+         libapache2-mod-wsgi
 Recommends: ${misc:Recommends}
-Description: CGI Apache CSW service based on python-pycsw
+Description: WSGI apache CSW service based on python-pycsw.
  pycsw is an OGC CSW server implementation written in Python. Started in 2010
  (more formally announced in 2011), pycsw allows for the publishing and
  discovery of geospatial metadata, providing a standards-based metadata and
diff --git a/debian/patches/0005-Fix-apache-site.patch b/debian/patches/0005-Fix-apache-site.patch
deleted file mode 100644
index 580d4a7..0000000
--- a/debian/patches/0005-Fix-apache-site.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From: Johan Van de Wauw <johan.vandewauw at gmail.com>
-Date: Tue, 30 Sep 2014 21:05:50 +0200
-Subject: Fix apache site
-
----
- etc/pycsw.conf | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/etc/pycsw.conf b/etc/pycsw.conf
-index d402735..726aca1 100644
---- a/etc/pycsw.conf
-+++ b/etc/pycsw.conf
-@@ -1,4 +1,5 @@
--<Directory /var/www/html/pycsw>
-+Alias /pycsw /usr/share/pycsw
-+<Directory /usr/share/pycsw>
-   Options +FollowSymLinks +ExecCGI
-   Require all granted
-   AddHandler cgi-script .py
diff --git a/debian/patches/series b/debian/patches/series
index b461616..c26c815 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,3 @@
 0002-Remove-externally-linked-files.patch
 0003-Make-pycsw-look-for-configuration-in-correct-etc-pat.patch
 0004-Use-xdg-open-instead-of-firefox-in-desktop-file.patch
-0005-Fix-apache-site.patch
diff --git a/debian/pycsw-cgi.install b/debian/pycsw-cgi.install
index a6ffd7a..a4b52f2 100644
--- a/debian/pycsw-cgi.install
+++ b/debian/pycsw-cgi.install
@@ -2,8 +2,9 @@ etc/harvest-all.cron		/etc/pycsw
 etc/mappings.py			/etc/pycsw
 bin/*				/usr/share/pycsw/bin/
 tests/*				/usr/share/pycsw/tests/
-etc/pycsw.conf		       	/etc/apache2/sites-available/
+debian/pycsw.conf		       	/etc/apache2/sites-available/
 csw.py				/usr/share/pycsw/
+csw.wsgi				/usr/share/pycsw/
 README.txt			/usr/share/pycsw/
 VERSION.txt			/usr/share/pycsw/
 HISTORY.txt			/usr/share/pycsw/
diff --git a/debian/pycsw-cgi.postinst b/debian/pycsw-cgi.postinst
index 444d40e..c329508 100644
--- a/debian/pycsw-cgi.postinst
+++ b/debian/pycsw-cgi.postinst
@@ -5,11 +5,6 @@ set -e
 if [ "$1" = configure ] ; then
     if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
         . /usr/share/apache2/apache2-maintscript-helper
-        apache2_invoke enmod cgi || exit $?
-    fi
-
-    if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
-        . /usr/share/apache2/apache2-maintscript-helper
         apache2_invoke ensite pycsw || exit $?
     fi
 fi
diff --git a/debian/pycsw.conf b/debian/pycsw.conf
new file mode 100644
index 0000000..6269666
--- /dev/null
+++ b/debian/pycsw.conf
@@ -0,0 +1,8 @@
+WSGIScriptAlias /pycsw /usr/share/pycsw/csw.wsgi
+Alias /pycsw/tests /usr/share/pycsw/tests
+<LocationMatch /pycsw>
+  Options +FollowSymLinks 
+  Require all granted
+</LocationMatch>
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pycsw.git



More information about the Pkg-grass-devel mailing list