Revert apache 2.4 support as it is not going to be in wheezy
authorEmmanuel Lacour <elacour@home-dn.net>
Tue, 26 Jun 2012 13:11:56 +0000 (15:11 +0200)
committerEmmanuel Lacour <elacour@home-dn.net>
Tue, 26 Jun 2012 13:11:56 +0000 (15:11 +0200)
This reverts commits:
    a458b9abe2c39c523208993a82addaad35bba024
    ffbb839f9168e56e3e5885948a4aa992be6f8004
    193b97c571266c663abf4bb940e7c03d9ff955b2
    04d840a1a523f3c456d7535159b28a989e7d302c

debian/control
debian/libapache2-mod-suphp.apache2 [deleted file]
debian/libapache2-mod-suphp.install [new file with mode: 0644]
debian/libapache2-mod-suphp.postinst [new file with mode: 0644]
debian/libapache2-mod-suphp.prerm [new file with mode: 0644]
debian/rules

index 64e7e32..5079aac 100644 (file)
@@ -2,7 +2,7 @@ Source: suphp
 Section: httpd
 Priority: optional
 Maintainer: Emmanuel Lacour <elacour@home-dn.net>
-Build-Depends: debhelper (>= 9), apache2-dev (>= 2.4), apache2-api-20120211, libapr1-dev, docbook-to-man, pkg-config, dh-autoreconf, autotools-dev, quilt, dh-apache2
+Build-Depends: debhelper (>= 9), apache2-prefork-dev (>= 2.2.0), apache2-mpm-prefork (>= 2.2.0) | apache2-mpm-worker (>= 2.2.0), libapr1-dev, docbook-to-man, pkg-config, dh-autoreconf, autotools-dev, quilt
 Standards-Version: 3.9.3
 
 Package: suphp-common
@@ -16,7 +16,7 @@ Description: Common files for mod suphp
 
 Package: libapache2-mod-suphp
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, suphp-common (= ${binary:Version}), apache2-api-20120211
+Depends: ${shlibs:Depends}, ${misc:Depends}, suphp-common (= ${binary:Version}), apache2.2-common
 Description: Apache2 module to run PHP scripts with the owner permissions
  With the use of the suphp setuid root binary (from suphp-common package),
  this Apache2 module change the uid of the process executing the PHP
diff --git a/debian/libapache2-mod-suphp.apache2 b/debian/libapache2-mod-suphp.apache2
deleted file mode 100644 (file)
index f2a9d91..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-mod src/apache2/.libs/mod_suphp.so
-mod debian/conf/suphp.conf
-mod debian/conf/suphp.load
diff --git a/debian/libapache2-mod-suphp.install b/debian/libapache2-mod-suphp.install
new file mode 100644 (file)
index 0000000..17c9b7f
--- /dev/null
@@ -0,0 +1,3 @@
+src/apache2/.libs/mod_suphp.so.0.0.0 usr/lib/apache2/modules/
+debian/conf/suphp.load etc/apache2/mods-available/
+debian/conf/suphp.conf etc/apache2/mods-available/
diff --git a/debian/libapache2-mod-suphp.postinst b/debian/libapache2-mod-suphp.postinst
new file mode 100644 (file)
index 0000000..1b5bad0
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh
+# postinst script for libapache-mod-suphp
+#
+# 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/suphp.load ]; then
+               reload_apache
+           fi
+        else 
+           # Enable the module
+           if [ -e /etc/apache2/apache2.conf ]; then
+               a2enmod suphp >/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 --git a/debian/libapache2-mod-suphp.prerm b/debian/libapache2-mod-suphp.prerm
new file mode 100644 (file)
index 0000000..c4b0f51
--- /dev/null
@@ -0,0 +1,51 @@
+#! /bin/sh
+# prerm script for libapache-mod-suphp
+#
+# 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/suphp.load ]; then
+                   a2dismod suphp >/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
+
+
index 26aa1ee..2e33f52 100755 (executable)
@@ -10,7 +10,7 @@
 #export DH_VERBOSE=1
 
 %:
-       dh $@  --with quilt,autotools-dev,autoreconf,apache2
+       dh $@  --with quilt,autotools-dev,autoreconf
 
 override_dh_auto_configure:
        CFLAGS="$(CFLAGS) `pkg-config --cflags apr-1`" ./configure --prefix=/usr \
@@ -21,15 +21,14 @@ override_dh_auto_configure:
        --with-setid-mode=owner \
        --with-logfile=/var/log/suphp/suphp.log
 
-override_dh_auto_install:
 
 override_dh_install:
        dh_install
        docbook-to-man debian/suphp-common.manpage.sgml > debian/suphp-common/usr/share/man/man8/suphp.8
        install -m 644 debian/suphp-common.lintian-override debian/suphp-common/usr/share/lintian/overrides/suphp-common
        mv debian/suphp-common/etc/suphp/suphp.conf-example debian/suphp-common/etc/suphp/suphp.conf
-       rm -f src/apache2/.libs/mod_suphp.so
-       mv src/apache2/.libs/mod_suphp.so.0.0.0 src/apache2/.libs/mod_suphp.so
+       mv debian/libapache2-mod-suphp/usr/lib/apache2/modules/mod_suphp.so.0.0.0 debian/libapache2-mod-suphp/usr/lib/apache2/modules/mod_suphp.so
+
 
 override_dh_installdocs:
        dh_installdocs