tags 666805 + patch thanks Hello maintainer,
you will find attached below a patch porting your module to Apache2 2.4. Please test it and consider its inclusion. Note, I hardly tried more than compiling and loading the module. I didn't test it in detail. -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D
debian/control | 4 +-- debian/libapache2-mod-scgi.apache2 | 2 ++ debian/patches/port-to-apache24 | 49 ++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 10 +------- 5 files changed, 55 insertions(+), 11 deletions(-) diff --git a/debian/control b/debian/control index f16f279..5929af9 100644 --- a/debian/control +++ b/debian/control @@ -3,11 +3,11 @@ Priority: optional Section: web Maintainer: Neil Schemenauer <n...@debian.org> Homepage: http://python.ca/scgi/ -Build-Depends: debhelper (>= 7), python-support (>= 0.3), python-all-dev, apache2-threaded-dev (>= 2.2), quilt +Build-Depends: debhelper (>= 7), python-support (>= 0.3), python-all-dev, apache2-dev, dh-apache2, quilt Standards-Version: 3.8.0.0 Package: libapache2-mod-scgi -Depends: apache2.2-common, ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Architecture: any Description: Apache module implementing the SCGI protocol The SCGI protocol is a replacement for the Common Gateway diff --git a/debian/libapache2-mod-scgi.apache2 b/debian/libapache2-mod-scgi.apache2 new file mode 100644 index 0000000..be41294 --- /dev/null +++ b/debian/libapache2-mod-scgi.apache2 @@ -0,0 +1,2 @@ +mod apache2/.libs/mod_scgi.so +mod debian/scgi.load diff --git a/debian/patches/port-to-apache24 b/debian/patches/port-to-apache24 new file mode 100644 index 0000000..8c1240b --- /dev/null +++ b/debian/patches/port-to-apache24 @@ -0,0 +1,49 @@ +--- a/apache2/mod_scgi.c ++++ b/apache2/mod_scgi.c +@@ -135,16 +135,16 @@ + return DECLINED; + } + +-static void log_err(const char *file, int line, request_rec *r, ++static void log_err(const char *file, int line, int index, request_rec *r, + apr_status_t status, const char *msg) + { +- ap_log_rerror(file, line, APLOG_ERR, status, r, "scgi: %s", msg); ++ ap_log_rerror(file, line, index, APLOG_ERR, status, r, "scgi: %s", msg); + } + +-static void log_debug(const char *file, int line, request_rec *r, const ++static void log_debug(const char *file, int line, int index, request_rec *r, const + char *msg) + { +- ap_log_rerror(file, line, APLOG_DEBUG, APR_SUCCESS, r, msg); ++ ap_log_rerror(file, line, index, APLOG_DEBUG, APR_SUCCESS, r, "%s", msg); + } + + static char *http2env(apr_pool_t *p, const char *name) +@@ -312,7 +312,7 @@ + int i; + apr_status_t rv = 0; + apr_port_t port = 0; +- GET_PORT(port, r->connection->remote_addr); ++ GET_PORT(port, r->useragent_addr); + + log_debug(APLOG_MARK,r, "sending headers"); + t = apr_table_make(r->pool, 40); +@@ -324,14 +324,14 @@ + buf = "0"; + add_header(t, "CONTENT_LENGTH", buf); + add_header(t, "SCGI", SCGI_PROTOCOL_VERSION); +- add_header(t, "SERVER_SOFTWARE", ap_get_server_version()); ++ add_header(t, "SERVER_SOFTWARE", ap_get_server_banner()); + add_header(t, "SERVER_PROTOCOL", r->protocol); + add_header(t, "SERVER_NAME", ap_get_server_name(r)); + add_header(t, "SERVER_ADMIN", r->server->server_admin); + add_header(t, "SERVER_ADDR", r->connection->local_ip); + add_header(t, "SERVER_PORT", apr_psprintf(r->pool, "%u", + ap_get_server_port(r))); +- add_header(t, "REMOTE_ADDR", r->connection->remote_ip); ++ add_header(t, "REMOTE_ADDR", r->useragent_ip); + add_header(t, "REMOTE_PORT", apr_psprintf(r->pool, "%d", port)); + add_header(t, "REMOTE_USER", r->user); + add_header(t, "REQUEST_METHOD", r->method); diff --git a/debian/patches/series b/debian/patches/series index a23fefe..526669e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +port-to-apache24 no_scripts.patch diff --git a/debian/rules b/debian/rules index 338ce6e..23364c0 100755 --- a/debian/rules +++ b/debian/rules @@ -44,19 +44,11 @@ install: build $(PYVERS:%=install-python%) dh_testroot #dh_clean -k dh_installdirs - - install -m 0755 -d $(APACHE2_SCGI)/usr/lib/apache2/modules - install -m 644 apache2/.libs/mod_scgi.so \ - $(APACHE2_SCGI)/usr/lib/apache2/modules - install -m 0755 -d $(APACHE2_SCGI)/etc/apache2/mods-available - install -m 644 debian/scgi.load \ - $(APACHE2_SCGI)/etc/apache2/mods-available - dh_installdocs dh_installexamples -ppython-scgi dh_installman dh_installchangelogs CHANGES.txt - + dh_apache2 install-python%: python$* setup.py install --root $(CURDIR)/debian/python-scgi
signature.asc
Description: OpenPGP digital signature