Control: tag -1 patch

On Sat, Jul 06, 2013 at 04:25:14PM +0200, Arno Töll wrote:
> Looks like your package from Experimental implementing the apache 2.4
> transition was removed (#696733). Thus, this bug is serious again.
> Please fix your package in unstable as soon as possible.

The previous version in experimental was removed because it was broken
(the package was empty).  I believe this patch should fix it.
Alessandro, could you please review?

The main changes against what you previously had in experimental are to
remove the postinst and prerm scripts which are now unnecessary
(dh_apache2 does a better job), and to manually call dh_apache2 in the
binary-arch target.

I would, however, strongly recommend that you refactor debian/rules to
stop using manual build/install/clean/binary-arch targets in addition to
a catch-all target that calls dh; this is extremely confusing and
vulnerable to exactly this kind of mistake.  You can drop the quilt.make
stuff and your build-dependency on quilt since you're already using
source format 3.0 (quilt), and the rest can be handled with simple
override_dh_auto_build and override_dh_auto_clean targets.

  * Port to Apache 2.4 (closes: #709465).

diff -Nru libapache2-mod-ruid2-0.9.8/debian/control 
libapache2-mod-ruid2-0.9.8/debian/control
--- libapache2-mod-ruid2-0.9.8/debian/control   2013-04-12 15:00:44.000000000 
+0100
+++ libapache2-mod-ruid2-0.9.8/debian/control   2013-10-07 21:54:47.000000000 
+0100
@@ -2,7 +2,7 @@
 Section: web
 Priority: extra
 Maintainer: Alessandro De Zorzi <l...@nonlontano.it>
-Build-Depends: debhelper (>= 8.0.0), quilt, apache2-prefork-dev, libcap-dev
+Build-Depends: debhelper (>= 8.0.0), quilt, dh-apache2, apache2-dev, libcap-dev
 Standards-Version: 3.9.4
 Homepage: http://sourceforge.net/projects/mod-ruid/
 
diff -Nru libapache2-mod-ruid2-0.9.8/debian/libapache2-mod-ruid2.apache2 
libapache2-mod-ruid2-0.9.8/debian/libapache2-mod-ruid2.apache2
--- libapache2-mod-ruid2-0.9.8/debian/libapache2-mod-ruid2.apache2      
1970-01-01 01:00:00.000000000 +0100
+++ libapache2-mod-ruid2-0.9.8/debian/libapache2-mod-ruid2.apache2      
2013-10-07 21:52:50.000000000 +0100
@@ -0,0 +1,2 @@
+mod .libs/mod_ruid2.so
+mod debian/ruid2.load
diff -Nru libapache2-mod-ruid2-0.9.8/debian/patches/ruid2.load.new 
libapache2-mod-ruid2-0.9.8/debian/patches/ruid2.load.new
--- libapache2-mod-ruid2-0.9.8/debian/patches/ruid2.load.new    2012-01-01 
10:40:30.000000000 +0000
+++ libapache2-mod-ruid2-0.9.8/debian/patches/ruid2.load.new    1970-01-01 
01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-Index: libapache2-mod-ruid2-0.9.4/ruid2.load
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ libapache2-mod-ruid2-0.9.4/ruid2.load      2012-01-01 11:33:52.000000000 
+0100
-@@ -0,0 +1 @@
-+LoadModule ruid2_module /usr/lib/apache2/modules/mod_ruid2.so
diff -Nru libapache2-mod-ruid2-0.9.8/debian/patches/series 
libapache2-mod-ruid2-0.9.8/debian/patches/series
--- libapache2-mod-ruid2-0.9.8/debian/patches/series    2012-01-01 
10:44:36.000000000 +0000
+++ libapache2-mod-ruid2-0.9.8/debian/patches/series    2013-10-07 
21:56:46.000000000 +0100
@@ -1,2 +1 @@
 mod_ruid2.c
-ruid2.load.new
diff -Nru libapache2-mod-ruid2-0.9.8/debian/postinst 
libapache2-mod-ruid2-0.9.8/debian/postinst
--- libapache2-mod-ruid2-0.9.8/debian/postinst  2012-01-01 10:58:38.000000000 
+0000
+++ libapache2-mod-ruid2-0.9.8/debian/postinst  1970-01-01 01:00:00.000000000 
+0100
@@ -1,63 +0,0 @@
-#! /bin/sh
-# postinst script for libapache-mod-ruid2
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
-reload_apache()
-{
-    if apache2ctl configtest 2>/dev/null; then
-        invoke-rc.d apache2 force-reload || true
-    else
-       echo "Your apache2 configuration is broken, so we're not restarting it 
for you."
-    fi
-}
-
-
-case "$1" in
-    configure)
-        # Reload the module on upgrade if enabled
-        if [ -n "$2" ]; then
-           if [ -e /etc/apache2/mods-enabled/ruid2.load ]; then
-               reload_apache
-           fi
-        else 
-           # Enable the module
-           if [ -e /etc/apache2/apache2.conf ]; then
-               a2enmod ruid2 >/dev/null || true
-               reload_apache
-           fi
-       fi
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff -Nru libapache2-mod-ruid2-0.9.8/debian/prerm 
libapache2-mod-ruid2-0.9.8/debian/prerm
--- libapache2-mod-ruid2-0.9.8/debian/prerm     2012-01-01 11:01:11.000000000 
+0000
+++ libapache2-mod-ruid2-0.9.8/debian/prerm     1970-01-01 01:00:00.000000000 
+0100
@@ -1,51 +0,0 @@
-#! /bin/sh
-# prerm script for libapache-mod-ruid2
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-reload_apache()
-{
-    if apache2ctl configtest 2>/dev/null; then
-        invoke-rc.d apache2 force-reload || true
-    else
-        echo "Your apache2 configuration is broken, so we're not restarting it 
for you."
-    fi
-}
-
-
-case "$1" in
-    remove)
-               if [ -e /etc/apache2/mods-enabled/ruid2.load ]; then
-                   a2dismod ruid2 >/dev/null || true
-                   reload_apache
-               fi
-        ;;
-    upgrade|failed-upgrade|deconfigure)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff -Nru libapache2-mod-ruid2-0.9.8/debian/ruid2.load 
libapache2-mod-ruid2-0.9.8/debian/ruid2.load
--- libapache2-mod-ruid2-0.9.8/debian/ruid2.load        1970-01-01 
01:00:00.000000000 +0100
+++ libapache2-mod-ruid2-0.9.8/debian/ruid2.load        2013-10-07 
21:51:01.000000000 +0100
@@ -0,0 +1 @@
+LoadModule ruid2_module /usr/lib/apache2/modules/mod_ruid2.so
diff -Nru libapache2-mod-ruid2-0.9.8/debian/rules 
libapache2-mod-ruid2-0.9.8/debian/rules
--- libapache2-mod-ruid2-0.9.8/debian/rules     2013-04-12 15:03:51.000000000 
+0100
+++ libapache2-mod-ruid2-0.9.8/debian/rules     2013-10-09 13:05:47.000000000 
+0100
@@ -16,7 +16,7 @@
 DESTDIR=$(CURDIR)/debian/libapache2-mod-ruid2
 
 %:
-       dh $@
+       dh $@ --with apache2
 
 build: $(QUILT_STAMPFN) build-stamp
 
@@ -26,10 +26,6 @@
 
 install: build
        dh_testdir
-       mkdir -m 755 -p $(DESTDIR)/usr/lib/apache2/modules
-       mkdir -m 755 -p $(DESTDIR)/etc/apache2/mods-available
-       install -m 644 .libs/mod_ruid2.so $(DESTDIR)/usr/lib/apache2/modules
-       install -m 644 ruid2.load $(DESTDIR)/etc/apache2/mods-available
 
 clean: unpatch
        dh_testdir
@@ -51,6 +47,7 @@
        dh_installdocs
        dh_installexamples
        dh_installman
+       dh_apache2
        dh_link
        dh_strip
        dh_compress

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to