Control: tag -1 pending

Dear maintainer,

I've prepared an NMU for libapache2-mod-defensible (versioned as
1.4-3.1) and uploaded it to DELAYED/2.  Please feel free to tell me if I
should delay it longer.

Regards,

-- 
Colin Watson                                       [cjwat...@debian.org]
diff -Nru libapache2-mod-defensible-1.4/debian/apache2 libapache2-mod-defensible-1.4/debian/apache2
--- libapache2-mod-defensible-1.4/debian/apache2	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/apache2	2013-07-08 16:22:42.000000000 +0100
@@ -0,0 +1,2 @@
+mod .libs/mod_defensible.so
+mod debian/defensible.load
diff -Nru libapache2-mod-defensible-1.4/debian/changelog libapache2-mod-defensible-1.4/debian/changelog
--- libapache2-mod-defensible-1.4/debian/changelog	2013-07-10 10:05:49.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/changelog	2013-07-10 10:03:56.000000000 +0100
@@ -1,3 +1,10 @@
+libapache2-mod-defensible (1.4-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Port to Apache 2.4 (closes: #666850).
+
+ -- Colin Watson <cjwat...@debian.org>  Wed, 10 Jul 2013 10:03:55 +0100
+
 libapache2-mod-defensible (1.4-3) unstable; urgency=low
 
   * Rebuild without udns support (Closes: #497164)
diff -Nru libapache2-mod-defensible-1.4/debian/control libapache2-mod-defensible-1.4/debian/control
--- libapache2-mod-defensible-1.4/debian/control	2013-07-10 10:05:49.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/control	2013-07-08 16:30:27.000000000 +0100
@@ -3,11 +3,11 @@
 Section: web
 Priority: extra
 Standards-Version: 3.8.0
-Build-Depends: debhelper (>= 5.0.0), apache2-threaded-dev (>= 2.2.3-2)
+Build-Depends: debhelper (>= 5.0.0), dh-apache2, apache2-dev (>= 2.2.3-2)
 
 Package: libapache2-mod-defensible
 Architecture: any
-Depends: apache2.2-common, ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: module for Apache2 which provides DNSBL usage
  mod_defensible implements usage of DNSBL servers to block access to
  a Web site or to specific locations.
diff -Nru libapache2-mod-defensible-1.4/debian/patches/aplog-use-module.patch libapache2-mod-defensible-1.4/debian/patches/aplog-use-module.patch
--- libapache2-mod-defensible-1.4/debian/patches/aplog-use-module.patch	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/patches/aplog-use-module.patch	2013-07-08 16:22:02.000000000 +0100
@@ -0,0 +1,20 @@
+Description: Add APLOG_USE_MODULE for Apache 2.4 per-module loglevels
+Author: Colin Watson <cjwat...@debian.org>
+Forwarded: no
+Last-Update: 2013-07-08
+
+Index: b/mod_defensible.c
+===================================================================
+--- a/mod_defensible.c
++++ b/mod_defensible.c
+@@ -64,6 +64,10 @@
+ #endif
+ } dnsbl_config;
+ 
++#ifdef APLOG_USE_MODULE
++APLOG_USE_MODULE(defensible);
++#endif
++
+ module AP_MODULE_DECLARE_DATA defensible_module;
+ 
+ /* Callback function called when we get DnsblUse option */
diff -Nru libapache2-mod-defensible-1.4/debian/patches/apxs-cppflags.patch libapache2-mod-defensible-1.4/debian/patches/apxs-cppflags.patch
--- libapache2-mod-defensible-1.4/debian/patches/apxs-cppflags.patch	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/patches/apxs-cppflags.patch	2013-07-08 16:36:15.000000000 +0100
@@ -0,0 +1,31 @@
+Description: Add APR_INCLUDEDIR and EXTRA_CPPFLAGS to CPPFLAGS
+Author: Colin Watson <cjwat...@debian.org>
+Forwarded: no
+Last-Update: 2013-07-08
+
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -9,7 +9,7 @@
+ 
+ mod_defensible_la_SOURCES = $(MODULESOURCES) 
+ mod_defensible_la_LDFLAGS = -module `${APXS2} -q LDFLAGS_SHLIB`
+-mod_defensible_la_CPPFLAGS = -I`${APXS2} -q INCLUDEDIR` 
++mod_defensible_la_CPPFLAGS = -I`${APXS2} -q INCLUDEDIR` -I`${APXS2} -q APR_INCLUDEDIR` `${APXS2} -q EXTRA_CPPFLAGS`
+ mod_defensible_la_CFLAGS = -W -Wall `${APXS2} -q CFLAGS CFLAGS_SHLIB` 
+ CC = `${APXS2} -q CC` 
+ 	   
+Index: b/Makefile.in
+===================================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -201,7 +201,7 @@
+ lib_LTLIBRARIES = mod_defensible.la 
+ mod_defensible_la_SOURCES = $(MODULESOURCES) 
+ mod_defensible_la_LDFLAGS = -module `${APXS2} -q LDFLAGS_SHLIB`
+-mod_defensible_la_CPPFLAGS = -I`${APXS2} -q INCLUDEDIR` 
++mod_defensible_la_CPPFLAGS = -I`${APXS2} -q INCLUDEDIR` -I`${APXS2} -q APR_INCLUDEDIR` `${APXS2} -q EXTRA_CPPFLAGS`
+ mod_defensible_la_CFLAGS = -W -Wall `${APXS2} -q CFLAGS CFLAGS_SHLIB` 
+ all: config.h
+ 	$(MAKE) $(AM_MAKEFLAGS) all-am
diff -Nru libapache2-mod-defensible-1.4/debian/patches/conn-rec-remote-ip.patch libapache2-mod-defensible-1.4/debian/patches/conn-rec-remote-ip.patch
--- libapache2-mod-defensible-1.4/debian/patches/conn-rec-remote-ip.patch	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/patches/conn-rec-remote-ip.patch	2013-07-08 16:43:05.000000000 +0100
@@ -0,0 +1,29 @@
+Description: Handle conn_rec->remote_ip split in Apache 2.4
+Author: Colin Watson <cjwat...@debian.org>
+Forwarded: no
+Last-Update: 2013-07-08
+
+Index: b/mod_defensible.c
+===================================================================
+--- a/mod_defensible.c
++++ b/mod_defensible.c
+@@ -73,8 +73,10 @@
+ #if AP_SERVER_MAJORVERSION_NUMBER > 2 || \
+     (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER >= 4)
+ #define GET_SERVER_BANNER ap_get_server_banner
++#define CLIENT_IP(conn) ((conn)->client_ip)
+ #else
+ #define GET_SERVER_BANNER ap_get_server_version
++#define CLIENT_IP(conn) ((conn)->remote_ip)
+ #endif
+ 
+ /* Callback function called when we get DnsblUse option */
+@@ -209,7 +211,7 @@
+ static int check_dnsbl_access(request_rec *r)
+ {
+     char **srv_elts;
+-    char *ip = r->connection->remote_ip;
++    char *ip = CLIENT_IP(r->connection);
+     int i;
+ 
+     dnsbl_config *conf = (dnsbl_config *)
diff -Nru libapache2-mod-defensible-1.4/debian/patches/series libapache2-mod-defensible-1.4/debian/patches/series
--- libapache2-mod-defensible-1.4/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/patches/series	2013-07-08 16:41:46.000000000 +0100
@@ -0,0 +1,4 @@
+apxs-cppflags.patch
+aplog-use-module.patch
+server-banner.patch
+conn-rec-remote-ip.patch
diff -Nru libapache2-mod-defensible-1.4/debian/patches/server-banner.patch libapache2-mod-defensible-1.4/debian/patches/server-banner.patch
--- libapache2-mod-defensible-1.4/debian/patches/server-banner.patch	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/patches/server-banner.patch	2013-07-08 16:41:29.000000000 +0100
@@ -0,0 +1,32 @@
+Description: Handle ap_get_server_version split in Apache 2.4
+Author: Colin Watson <cjwat...@debian.org>
+Forwarded: no
+Last-Update: 2013-07-08
+
+Index: b/mod_defensible.c
+===================================================================
+--- a/mod_defensible.c
++++ b/mod_defensible.c
+@@ -70,6 +70,13 @@
+ 
+ module AP_MODULE_DECLARE_DATA defensible_module;
+ 
++#if AP_SERVER_MAJORVERSION_NUMBER > 2 || \
++    (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER >= 4)
++#define GET_SERVER_BANNER ap_get_server_banner
++#else
++#define GET_SERVER_BANNER ap_get_server_version
++#endif
++
+ /* Callback function called when we get DnsblUse option */
+ static const char *use_dnsbl(cmd_parms *parms __attribute__ ((unused)),
+                              void *mconfig,
+@@ -191,7 +198,7 @@
+     ap_rprintf(r, "<p>You don't have permission to access %s\n", ap_escape_html(r->pool, r->uri));
+     ap_rprintf(r, "on this server because you are currently blacklisted by a DNSBL server at: <b>%s</b></p>\n", dnsbl);
+     ap_rputs("<hr>\n", r);
+-    ap_rprintf(r, "<address>%s</address>\n", ap_get_server_version());
++    ap_rprintf(r, "<address>%s</address>\n", GET_SERVER_BANNER());
+     ap_rputs("</body></html>\n", r);
+ }
+ 
diff -Nru libapache2-mod-defensible-1.4/debian/postinst libapache2-mod-defensible-1.4/debian/postinst
--- libapache2-mod-defensible-1.4/debian/postinst	2013-07-10 10:05:49.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/postinst	1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-set -e
-
-reload_apache() 
-{
-    if apache2ctl configtest 2>/dev/null; then
-        if [ -x "which invoke-rc.d 2>/dev/null" ]; then
-	    invoke-rc.d apache2 force-reload || /bin/true
-	else
-	    /etc/init.d/apache2 force-reload || /bin/true
-	fi
-    else
-        echo "Your apache2 configuration seem to be broken, so we're not restarting it for you."
-    fi
-}
-
-case "$1" in
-    configure)
-        if [ -n "$2" ]; then
-            # we're upgrading. test if we're enabled, and if so, restart to reload the module.
-            if [ -e /etc/apache2/mods-enabled/defensible.load ]; then
-	       reload_apache
-            fi
-        fi
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
-
-
diff -Nru libapache2-mod-defensible-1.4/debian/prerm libapache2-mod-defensible-1.4/debian/prerm
--- libapache2-mod-defensible-1.4/debian/prerm	2013-07-10 10:05:49.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/prerm	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
-	if [ -e /etc/apache2/apache2.conf ] && [ -x /usr/sbin/a2dismod ]; then
-		a2dismod defensible || /bin/true
-	fi
-fi
-
-#DEBHELPER#
-
-exit 0
diff -Nru libapache2-mod-defensible-1.4/debian/rules libapache2-mod-defensible-1.4/debian/rules
--- libapache2-mod-defensible-1.4/debian/rules	2013-07-10 10:05:49.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/rules	2013-07-08 16:30:33.000000000 +0100
@@ -27,9 +27,7 @@
 	dh_testroot
 	dh_clean -k 
 	dh_installdirs
-	
-	cp .libs/mod_defensible.so $(CURDIR)/debian/libapache2-mod-defensible/usr/lib/apache2/modules
-	cp debian/defensible.load $(CURDIR)/debian/libapache2-mod-defensible/etc/apache2/mods-available
+	dh_apache2
 
 binary-indep: build install
 
diff -Nru libapache2-mod-defensible-1.4/debian/source/format libapache2-mod-defensible-1.4/debian/source/format
--- libapache2-mod-defensible-1.4/debian/source/format	1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-defensible-1.4/debian/source/format	2013-07-08 16:18:08.000000000 +0100
@@ -0,0 +1 @@
+3.0 (quilt)

Reply via email to