Control: tag -1 patch pending

Dear maintainer,

I've prepared an NMU for libapache-mod-removeip (versioned as 1.0b-5.1)
and uploaded it to DELAYED/2.  Please feel free to tell me if I should
delay it longer.

Apologies for the rush; but I gather that the release team is trying to
get Apache 2.4 into testing rather soon, and there's been no sign of
activity on this bug.

Regards,

-- 
Colin Watson                                       [cjwat...@debian.org]
diff -u libapache-mod-removeip-1.0b/debian/patches/00list libapache-mod-removeip-1.0b/debian/patches/00list
--- libapache-mod-removeip-1.0b/debian/patches/00list
+++ libapache-mod-removeip-1.0b/debian/patches/00list
@@ -2,0 +3,2 @@
+30_conn_rec_remote_ip
+40_inet_addr_includes
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.postrm
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.postrm
@@ -1,37 +0,0 @@
-#! /bin/sh
-
-# Abort if any command returns an error value
-set -e
-
-# This script is called twice during the removal of the package; once
-# after the removal of the package's files from the system, and as
-# the final step in the removal of this package, after the package's
-# conffiles have been removed.
-
-case "$1" in
-  remove)
-    # This package has been removed, but its configuration has not yet
-    # been purged.
-    test ! -x /usr/sbin/apache || modules-config apache disable mod_removeip
-    test ! -x /usr/sbin/apache-ssl || modules-config apache-ssl disable mod_removeip
-    test ! -x /usr/sbin/apache-perl || modules-config apache-perl disable mod_removeip
-    :
-    ;;
-  purge | disappear | upgrade | failed-upgrade | abort-upgrade)
-    :
-    ;;
-  abort-install)
-    # Back out of an attempt to install this package.  Undo the effects of
-    # "preinst install...".  There are two sub-cases.
-    test ! -x /usr/sbin/apache || modules-config apache disable mod_removeip
-    test ! -x /usr/sbin/apache-ssl || modules-config apache-ssl disable mod_removeip
-    test ! -x /usr/sbin/apache-perl || modules-config apache-perl disable mod_removeip
-    :
-	;;
-  *) echo "$0: didn't understand being called with \`$1'" 1>&2
-     exit 1;;
-esac
-
-#DEBHELPER#
-
-exit 0
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.install
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.install
@@ -1,2 +0,0 @@
-apache1.3/mod_removeip.so usr/lib/apache/1.3
-debian/040mod_removeip.info usr/lib/apache/1.3
diff -u libapache-mod-removeip-1.0b/debian/rules libapache-mod-removeip-1.0b/debian/rules
--- libapache-mod-removeip-1.0b/debian/rules
+++ libapache-mod-removeip-1.0b/debian/rules
@@ -22,9 +22,7 @@
 	dh_clean -k
 	dh_installdirs
 	dh_install
-
-	mv debian/libapache2-mod-removeip/etc/apache2/mods-available/mod_removeip-2.0.conf debian/libapache2-mod-removeip/etc/apache2/mods-available/removeip.conf  
-	mv debian/libapache2-mod-removeip/etc/apache2/mods-available/mod_removeip-2.0.load debian/libapache2-mod-removeip/etc/apache2/mods-available/removeip.load
+	dh_apache2 -e
 
 # Build architecture-dependent files here.
 binary-arch: build install
reverted:
--- libapache-mod-removeip-1.0b/debian/mod_removeip-2.0.load
+++ libapache-mod-removeip-1.0b.orig/debian/mod_removeip-2.0.load
@@ -1 +0,0 @@
-LoadModule removeip_module /usr/lib/apache2/modules/mod_removeip.so
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.examples
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.examples
@@ -1 +0,0 @@
-debian/mod_removeip.conf
diff -u libapache-mod-removeip-1.0b/debian/changelog libapache-mod-removeip-1.0b/debian/changelog
--- libapache-mod-removeip-1.0b/debian/changelog
+++ libapache-mod-removeip-1.0b/debian/changelog
@@ -1,3 +1,11 @@
+libapache-mod-removeip (1.0b-5.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Port to Apache 2.4 (closes: #666864).
+  * Remove apache1 packaging harder.
+
+ -- Colin Watson <cjwat...@debian.org>  Sat, 13 Jul 2013 12:32:50 +0100
+
 libapache-mod-removeip (1.0b-5) unstable; urgency=medium
 
   * Removed apache1 packaging (Closes: #429129) 
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.postinst
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.postinst
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# Abort if any command returns an error value
-set -e
-
-# This script is called as the last step of the installation of the
-# package.  All the package's files are in place, dpkg has already done
-# its automatic conffile handling, and all the packages we depend of
-# are already fully installed and configured.
-
-case "$1" in
-  configure)
-    # Configure this package.  If the package must prompt the user for
-    # information, do it here.  There are three sub-cases.
-    :
-    if test "${2+set}" != set; then
-      # We're being installed by an ancient dpkg which doesn't remember
-      # which version was most recently configured, or even whether
-      # there is a most recently configured version.
-		test ! -x /usr/sbin/apache || modules-config apache enable mod_removeip
-		test ! -x /usr/sbin/apache-ssl || modules-config apache-ssl enable mod_removeip
-		test ! -x /usr/sbin/apache-perl || modules-config apache-perl enable mod_removeip
-      :
-    elif test -z "$2" -o "$2" = "<unknown>"; then
-      # The package has not ever been configured on this system, or was
-      # purged since it was last configured.
-      # DJ: So let's enable the module!
-		test ! -x /usr/sbin/apache || modules-config apache enable mod_removeip
-		test ! -x /usr/sbin/apache-ssl || modules-config apache-ssl enable mod_removeip
-		test ! -x /usr/sbin/apache-perl || modules-config apache-perl enable mod_removeip
-      :
-    fi ;;
-  abort-upgrade | abort-remove | abort-deconfigure)
-  	:
-    ;;
-  *) echo "$0: didn't understand being called with \`$1'" 1>&2
-     exit 1;;
-esac
-
-#DEBHELPER#
-
-exit 0
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.docs
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.docs
@@ -1,2 +0,0 @@
-README
-debian/README.Debian
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache2-mod-removeip.install
+++ libapache-mod-removeip-1.0b.orig/debian/libapache2-mod-removeip.install
@@ -1,3 +0,0 @@
-apache2.0/.libs/mod_removeip.so usr/lib/apache2/modules
-debian/mod_removeip-2.0.load etc/apache2/mods-available
-debian/mod_removeip-2.0.conf /etc/apache2/mods-available
reverted:
--- libapache-mod-removeip-1.0b/debian/040mod_removeip.info
+++ libapache-mod-removeip-1.0b.orig/debian/040mod_removeip.info
@@ -1,4 +0,0 @@
-LoadModule removeip_module /usr/lib/apache/1.3/mod_removeip.so
-Directives:
- REMOVEIPenable
-Description: Anonimize REMOTE_ADDR variable
diff -u libapache-mod-removeip-1.0b/debian/control libapache-mod-removeip-1.0b/debian/control
--- libapache-mod-removeip-1.0b/debian/control
+++ libapache-mod-removeip-1.0b/debian/control
@@ -3,12 +3,12 @@
 Priority: optional
 Maintainer: Mod_removeip Packaging Group <mod_remov...@lists.riseup.net>
 Uploaders: Micah Anderson <mi...@debian.org>
-Build-Depends: debhelper (>= 4.0.0), apache2-threaded-dev (>= 2.2.3), dpatch
+Build-Depends: debhelper (>= 4.0.0), dh-apache2, apache2-dev (>= 2.2.3), dpatch
 Standards-Version: 3.7.2
 
 Package: libapache2-mod-removeip
 Architecture: any
-Depends: apache2.2-common (>= 2.2.3), ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Module to remove IP from apache2's logs
  This package provides the removeip module for the Apache 2 webserver.
  This module allows for overwriting Apache's environment variable
reverted:
--- libapache-mod-removeip-1.0b/debian/mod_removeip-2.0.conf
+++ libapache-mod-removeip-1.0b.orig/debian/mod_removeip-2.0.conf
@@ -1,3 +0,0 @@
-<IfModule mod_removeip.c>
-REMOVEIPenable On
-</IfModule>
reverted:
--- libapache-mod-removeip-1.0b/debian/mod_removeip.conf
+++ libapache-mod-removeip-1.0b.orig/debian/mod_removeip.conf
@@ -1,3 +0,0 @@
-<IfModule mod_removeip.c>
-REMOVEIPenable On
-</IfModule>
reverted:
--- libapache-mod-removeip-1.0b/debian/libapache-mod-removeip.dirs
+++ libapache-mod-removeip-1.0b.orig/debian/libapache-mod-removeip.dirs
@@ -1 +0,0 @@
-usr/lib/apache/1.3
only in patch2:
unchanged:
--- libapache-mod-removeip-1.0b.orig/debian/libapache2-mod-removeip.apache2
+++ libapache-mod-removeip-1.0b/debian/libapache2-mod-removeip.apache2
@@ -0,0 +1,3 @@
+mod apache2.0/.libs/mod_removeip.so
+mod debian/removeip.load
+mod debian/removeip.conf
only in patch2:
unchanged:
--- libapache-mod-removeip-1.0b.orig/debian/removeip.conf
+++ libapache-mod-removeip-1.0b/debian/removeip.conf
@@ -0,0 +1,3 @@
+<IfModule mod_removeip.c>
+REMOVEIPenable On
+</IfModule>
only in patch2:
unchanged:
--- libapache-mod-removeip-1.0b.orig/debian/removeip.load
+++ libapache-mod-removeip-1.0b/debian/removeip.load
@@ -0,0 +1 @@
+LoadModule removeip_module /usr/lib/apache2/modules/mod_removeip.so
only in patch2:
unchanged:
--- libapache-mod-removeip-1.0b.orig/debian/patches/40_inet_addr_includes.dpatch
+++ libapache-mod-removeip-1.0b/debian/patches/40_inet_addr_includes.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40_inet_addr_includes.dpatch by Colin Watson <cjwat...@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add required headers for inet_addr.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libapache-mod-removeip-1.0b~/apache2.0/mod_removeip.c libapache-mod-removeip-1.0b/apache2.0/mod_removeip.c
+--- libapache-mod-removeip-1.0b~/apache2.0/mod_removeip.c	2013-07-08 18:13:32.000000000 +0100
++++ libapache-mod-removeip-1.0b/apache2.0/mod_removeip.c	2013-07-08 18:13:52.993667272 +0100
+@@ -1,3 +1,7 @@
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++
+ #include "httpd.h"
+ #include "http_config.h"
+ #include "http_core.h"
only in patch2:
unchanged:
--- libapache-mod-removeip-1.0b.orig/debian/patches/30_conn_rec_remote_ip.dpatch
+++ libapache-mod-removeip-1.0b/debian/patches/30_conn_rec_remote_ip.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_conn_rec_remote_ip.dpatch by Colin Watson <cjwat...@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle conn_rec->remote_ip split in Apache 2.4.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libapache-mod-removeip-1.0b~/apache2.0/mod_removeip.c libapache-mod-removeip-1.0b/apache2.0/mod_removeip.c
+--- libapache-mod-removeip-1.0b~/apache2.0/mod_removeip.c	2013-07-08 17:57:04.000000000 +0100
++++ libapache-mod-removeip-1.0b/apache2.0/mod_removeip.c	2013-07-08 18:10:17.968578696 +0100
+@@ -38,8 +38,16 @@
+     if (!cfg->enable)
+         return DECLINED;
+ 
++#if AP_SERVER_MAJORVERSION_NUMBER > 2 || \
++    (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER >= 4)
++    r->connection->client_ip = apr_pstrdup(r->connection->pool, "127.0.0.1");
++    r->connection->client_addr->sa.sin.sin_addr.s_addr = inet_addr("127.0.0.1");
++    r->useragent_ip = apr_pstrdup(r->connection->pool, "127.0.0.1");
++    r->useragent_addr->sa.sin.sin_addr.s_addr = inet_addr("127.0.0.1");
++#else
+     r->connection->remote_ip = apr_pstrdup(r->connection->pool, "127.0.0.1");
+     r->connection->remote_addr->sa.sin.sin_addr.s_addr = inet_addr("127.0.0.1");
++#endif
+ 
+     return DECLINED;
+ }

Reply via email to