[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. c9895ecce6d61b2b20a87480d353d303b0cd7b00
Arno Töll
debian at toell.net
Sat Feb 11 02:50:53 UTC 2012
The following commit has been merged in the next branch:
commit c9895ecce6d61b2b20a87480d353d303b0cd7b00
Author: Arno Töll <debian at toell.net>
Date: Sat Feb 11 03:48:51 2012 +0100
* Fix various issues in the postinst script. Now it seems to fork for both, new
installations and upgrades
* Activate simple .load files for many new modules. We need to check later on,
whether they need a .conf file too
* Clean some parts of debian/rules which certainly aren't needed anymore
* Denote new modules in debian/changelog
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index c21e64f..32b674e 100755
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -18,10 +18,26 @@ set -e
# the debian-policy package
#
+# n.b you can't rely on $2 (the last installed version) for upgrades, as
+# the user might have been using apache2.2-common only. Let's pretend we're
+# upgrading if there is a /etc/apache2/.apache2_mpm_selected file around
+we_are_upgrading_from_squeeze()
+{
+ if [ -n $2 ] && dpkg --compare-versions "$2" "le" "2.3" ; then
+ return 0
+ fi
+
+ if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
+ return 0
+ fi
+
+ return 1
+}
+
enable_default_mpm()
{
mpm="mpm_event"
- if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
+ if we_are_upgrading_from_squeeze $@ && [ -e /etc/apache2/.apache2_mpm_selected ]; then
tmpmpm=$(grep -v "^#" /etc/apache2/.apache2_mpm_selected | head -n1)
case "$tmpmpm" in
apache2-mpm-worker)
@@ -46,7 +62,6 @@ enable_default_mpm()
mpm="mpm_event"
;;
esac
- rm -f /etc/apache2/.apache2_mpm_selected
fi
a2enmod -q $mpm
}
@@ -81,29 +96,31 @@ install_default_files()
}
# XXX: Find out whether I am on crack removing stale modules that way
-# n.b you can't rely on $2 for upgrades, as the user might have been using
-# apache2.2-common only. Let's pretend we're upgrading if there is an
-# obsolete conffile around.
refresh_modules()
{
- if [ -e /etc/apache2/mods-available/authz_default.load ] || dpkg --compare-versions "$2" "le" "2.3" ; then
- if [ -d /etc/apache2/mods-enabled ] ; then
- for link in /etc/apache2/mods-enabled/*.load ; do
- target=$(readlink "$link")
- module=$(basename "$link" | sed 's/\.load//')
- if [ ! -e "/etc/apache2/mods-enabled/$target" ] ; then
- a2dismod -q $module
- fi
- # the module is already enabled, however
- # dependencies could have changed hence re-call
- # a2enmod again.
- # Example: the deflate module when upgraded from
- # Squeeze
- if [ -e "/etc/apache2/mods-enabled/$target" ] ; then
- a2enmod -q $module
- fi
- done
- fi
+ if we_are_upgrading_from_squeeze $@ && [ -d /etc/apache2/mods-enabled/ ] ; then
+ shopt -s nullglob
+ for link in /etc/apache2/mods-enabled/*.load ; do
+ target=$(readlink "$link") || true
+ if [ -z $target ] ; then
+ continue
+ fi
+
+ module=$(basename "$link" | sed 's/\.load//') || true
+
+ if [ ! -e "/etc/apache2/mods-enabled/$target" ] ; then
+ echo "disable obsolete module $module"
+ a2dismod -q $module
+ fi
+ # the module is already enabled, however
+ # dependencies could have changed hence re-call
+ # a2enmod again.
+ # Example: the deflate module when upgraded from
+ # Squeeze
+ if [ -e "/etc/apache2/mods-enabled/$target" ] ; then
+ a2enmod -q $module
+ fi
+ done
fi
}
@@ -121,16 +138,21 @@ case "$1" in
refresh_modules $@
- enable_default_mpm
+ enable_default_mpm $@
- install_default_files
+ install_default_files $@
- enable_default_modules
+ enable_default_modules $@
if [ -z "$2" ]; then
install_default_site
fi
+ # post installation cleanup
+ if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
+ rm -f /etc/apache2/.apache2_mpm_selected
+ fi
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/changelog b/debian/changelog
index 5063001..0cb6d13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,10 +61,16 @@ apache2 (2.3.16-beta-1) experimental; urgency=low
+ Parse "Conflicts: " header to denote conflicts between modules which
cannot be loaded into the same Apache server.
* The following modules and associated configuration files were removed:
- + mod_authz_default and mod_authn_default: Please use a proper authentication module instead
+ + mod_authz_default and mod_authn_default: Please use a proper
+ authentication module instead
+ mod_mem_cache: Use mod_cache_disk instead
+ * The following modules and associated configuration files are provided (but
+ not enabled by default):
+ access_compat, allowmethods, authz_dbd, cache_disk, data, log_debug, lua
+ proxy_express, proxy_fcgi, proxy_fdpass, proxy_html, ratelimit, reflector
+ remoteip, request, session, session_cookie, session_crypto, session_dbd
- -- Arno Töll <debian at toell.net> Thu, 09 Feb 2012 22:42:05 +0100
+ -- Arno Töll <debian at toell.net> Sat, 11 Feb 2012 03:30:10 +0100
apache2 (2.2.22-1) unstable; urgency=low
diff --git a/debian/config-dir/new-mods-available/access_compat.load b/debian/config-dir/mods-available/access_compat.load
similarity index 100%
rename from debian/config-dir/new-mods-available/access_compat.load
rename to debian/config-dir/mods-available/access_compat.load
diff --git a/debian/config-dir/new-mods-available/allowmethods.load b/debian/config-dir/mods-available/allowmethods.load
similarity index 100%
rename from debian/config-dir/new-mods-available/allowmethods.load
rename to debian/config-dir/mods-available/allowmethods.load
diff --git a/debian/config-dir/new-mods-available/authz_dbd.load b/debian/config-dir/mods-available/authz_dbd.load
similarity index 72%
rename from debian/config-dir/new-mods-available/authz_dbd.load
rename to debian/config-dir/mods-available/authz_dbd.load
index ee3122b..097eccd 100644
--- a/debian/config-dir/new-mods-available/authz_dbd.load
+++ b/debian/config-dir/mods-available/authz_dbd.load
@@ -1 +1,2 @@
+# Depends: dbd, authz_core
LoadModule authz_dbd_module /usr/lib/apache2/modules/mod_authz_dbd.so
diff --git a/debian/config-dir/new-mods-available/cache_disk.load b/debian/config-dir/mods-available/cache_disk.load
similarity index 81%
rename from debian/config-dir/new-mods-available/cache_disk.load
rename to debian/config-dir/mods-available/cache_disk.load
index 1cb49b1..1412b10 100644
--- a/debian/config-dir/new-mods-available/cache_disk.load
+++ b/debian/config-dir/mods-available/cache_disk.load
@@ -1 +1,2 @@
+# Depends cache
LoadModule cache_disk_module /usr/lib/apache2/modules/mod_cache_disk.so
diff --git a/debian/config-dir/new-mods-available/data.load b/debian/config-dir/mods-available/data.load
similarity index 100%
rename from debian/config-dir/new-mods-available/data.load
rename to debian/config-dir/mods-available/data.load
diff --git a/debian/config-dir/new-mods-available/log_debug.load b/debian/config-dir/mods-available/log_debug.load
similarity index 100%
rename from debian/config-dir/new-mods-available/log_debug.load
rename to debian/config-dir/mods-available/log_debug.load
diff --git a/debian/config-dir/new-mods-available/lua.load b/debian/config-dir/mods-available/lua.load
similarity index 100%
rename from debian/config-dir/new-mods-available/lua.load
rename to debian/config-dir/mods-available/lua.load
diff --git a/debian/config-dir/new-mods-available/proxy_express.load b/debian/config-dir/mods-available/proxy_express.load
similarity index 82%
rename from debian/config-dir/new-mods-available/proxy_express.load
rename to debian/config-dir/mods-available/proxy_express.load
index 74b3fb2..81d3a2f 100644
--- a/debian/config-dir/new-mods-available/proxy_express.load
+++ b/debian/config-dir/mods-available/proxy_express.load
@@ -1 +1,2 @@
+# Depends: proxy
LoadModule proxy_express_module /usr/lib/apache2/modules/mod_proxy_express.so
diff --git a/debian/config-dir/new-mods-available/proxy_fcgi.load b/debian/config-dir/mods-available/proxy_fcgi.load
similarity index 80%
rename from debian/config-dir/new-mods-available/proxy_fcgi.load
rename to debian/config-dir/mods-available/proxy_fcgi.load
index 49c81b3..067c87e 100644
--- a/debian/config-dir/new-mods-available/proxy_fcgi.load
+++ b/debian/config-dir/mods-available/proxy_fcgi.load
@@ -1 +1,2 @@
+# Depends: proxy
LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so
diff --git a/debian/config-dir/new-mods-available/proxy_fdpass.load b/debian/config-dir/mods-available/proxy_fdpass.load
similarity index 81%
rename from debian/config-dir/new-mods-available/proxy_fdpass.load
rename to debian/config-dir/mods-available/proxy_fdpass.load
index 30c9394..b27bcdb 100644
--- a/debian/config-dir/new-mods-available/proxy_fdpass.load
+++ b/debian/config-dir/mods-available/proxy_fdpass.load
@@ -1 +1,2 @@
+# Depends: proxy
LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so
diff --git a/debian/config-dir/new-mods-available/proxy_html.load b/debian/config-dir/mods-available/proxy_html.load
similarity index 80%
rename from debian/config-dir/new-mods-available/proxy_html.load
rename to debian/config-dir/mods-available/proxy_html.load
index ebe6a20..d8b248e 100644
--- a/debian/config-dir/new-mods-available/proxy_html.load
+++ b/debian/config-dir/mods-available/proxy_html.load
@@ -1 +1,2 @@
+# Depends: proxy
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so
diff --git a/debian/config-dir/new-mods-available/ratelimit.load b/debian/config-dir/mods-available/ratelimit.load
similarity index 83%
rename from debian/config-dir/new-mods-available/ratelimit.load
rename to debian/config-dir/mods-available/ratelimit.load
index 93601cf..7caadd5 100644
--- a/debian/config-dir/new-mods-available/ratelimit.load
+++ b/debian/config-dir/mods-available/ratelimit.load
@@ -1 +1,2 @@
+# Depends env
LoadModule ratelimit_module /usr/lib/apache2/modules/mod_ratelimit.so
diff --git a/debian/config-dir/new-mods-available/reflector.load b/debian/config-dir/mods-available/reflector.load
similarity index 100%
rename from debian/config-dir/new-mods-available/reflector.load
rename to debian/config-dir/mods-available/reflector.load
diff --git a/debian/config-dir/new-mods-available/remoteip.load b/debian/config-dir/mods-available/remoteip.load
similarity index 100%
rename from debian/config-dir/new-mods-available/remoteip.load
rename to debian/config-dir/mods-available/remoteip.load
diff --git a/debian/config-dir/new-mods-available/request.load b/debian/config-dir/mods-available/request.load
similarity index 100%
rename from debian/config-dir/new-mods-available/request.load
rename to debian/config-dir/mods-available/request.load
diff --git a/debian/config-dir/new-mods-available/session.load b/debian/config-dir/mods-available/session.load
similarity index 100%
rename from debian/config-dir/new-mods-available/session.load
rename to debian/config-dir/mods-available/session.load
diff --git a/debian/config-dir/new-mods-available/session_cookie.load b/debian/config-dir/mods-available/session_cookie.load
similarity index 80%
rename from debian/config-dir/new-mods-available/session_cookie.load
rename to debian/config-dir/mods-available/session_cookie.load
index 1db987f..8cffd89 100644
--- a/debian/config-dir/new-mods-available/session_cookie.load
+++ b/debian/config-dir/mods-available/session_cookie.load
@@ -1 +1,2 @@
+# Depends: session
LoadModule session_cookie_module /usr/lib/apache2/modules/mod_session_cookie.so
diff --git a/debian/config-dir/new-mods-available/session_crypto.load b/debian/config-dir/mods-available/session_crypto.load
similarity index 80%
rename from debian/config-dir/new-mods-available/session_crypto.load
rename to debian/config-dir/mods-available/session_crypto.load
index 66a7cc4..b3f7a95 100644
--- a/debian/config-dir/new-mods-available/session_crypto.load
+++ b/debian/config-dir/mods-available/session_crypto.load
@@ -1 +1,2 @@
+# Depends: session
LoadModule session_crypto_module /usr/lib/apache2/modules/mod_session_crypto.so
diff --git a/debian/config-dir/new-mods-available/session_dbd.load b/debian/config-dir/mods-available/session_dbd.load
similarity index 79%
rename from debian/config-dir/new-mods-available/session_dbd.load
rename to debian/config-dir/mods-available/session_dbd.load
index f6b936d..18fa4a4 100644
--- a/debian/config-dir/new-mods-available/session_dbd.load
+++ b/debian/config-dir/mods-available/session_dbd.load
@@ -1 +1,2 @@
+# Depends: session
LoadModule session_dbd_module /usr/lib/apache2/modules/mod_session_dbd.so
diff --git a/debian/config-dir/new-mods-available/reqtimeout.load b/debian/config-dir/new-mods-available/reqtimeout.load
deleted file mode 100644
index 8b2c5e6..0000000
--- a/debian/config-dir/new-mods-available/reqtimeout.load
+++ /dev/null
@@ -1 +0,0 @@
-LoadModule reqtimeout_module /usr/lib/apache2/modules/mod_reqtimeout.so
diff --git a/debian/rules b/debian/rules
index 55133da..6345189 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,48 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
-#
-## Some caveats:
-## 1) This rules file is based on the short dh(1) form. However, it needs a lot
-## of overrides to achieve what we want. The basic outline is to build the
-## source three four times, once for each supported MPM.
-## 2) The modules aren't built for all MPMs. Given that the builtin modules are
-## the same for all MPMs it is possible to cross-load a module built for one
-## MPM in any other. Hence, we build modules only for the worker MPM and reuse
-## it for all the remaining MPMs. The worker $(DEFAULT_MPM) is the basic
-## installation path where packages are being built from. From the remaining
-## MPMs only the respective binaries are taken. Development header are
-## similary taken from the prefork MPM, although the threaded MPMs need their
-## own headers partially.
-## 3) The ITK MPM needs modification in the source tree. Hence it is absolutely
-## necessary to copy the source tree before applying patches which enable the
-## ITK. For the remaining MPMs that's not stricly necessary
-## 4) There are being built two flavors of suexec. One is supplied upstream,
-## another one is a Debian improvement which allows customization. The latter
-## suexec-custom binary is built from a copy-and-patched suexec source at
-## compile time.
-## 5) Special care must be taken to avoid having -DPLATFORM defined for apxs2.
-## 6) dh_install is not powerful enough to us. We need to copy and move into
-## (future) binary packages.See various dh_install* overrides to get the idea.
-## 7) BEWARE arch:indep ONLY BUILDS (dpkg-buildpackage -A) ARE KNOWN TO BE BROKEN
-## FOR NOW
-##
-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
#
-#BUILD_DIR=debian/build-tree
-#INSTALL_DIR_RELATIVE=install-tree
-#INSTALL_DIR=debian/$(INSTALL_DIR_RELATIVE)
LSB_RELEASE := $(shell lsb_release -i -s)
-#DEFAULT_MPM=$(INSTALL_DIR)/worker
-#
-#MPMS=worker prefork event itk
-#
-#
#AP2_worker_CONFARGS = --enable-authn-alias=shared --enable-authnz-ldap=shared \
# --enable-disk-cache=shared --enable-cache=shared \
# --enable-mem-cache=shared --enable-file-cache=shared \
@@ -100,49 +65,13 @@ prepare-custom-suexec:
cp support/suexec.c support/suexec-custom.c
patch -p1 < debian/patches/202_suexec-custom
-#build-%:
-# mkdir "$(BUILD_DIR)/$*"
-# cp -a `find . -maxdepth 1 -mindepth 1 -not -name debian` $(BUILD_DIR)/$*
-# set -ex ; \
-# if [ $* = itk ] ; then \
-# cd $(BUILD_DIR)/$* ; \
-# mkdir server/mpm/experimental/itk/ ; \
-# cp server/mpm/prefork/* server/mpm/experimental/itk/ ; \
-# mv server/mpm/experimental/itk/prefork.c server/mpm/experimental/itk/itk.c ; \
-# \
-# for PATCH in `tail -n +2 ../../mpm-itk/patches/series`; do \
-# echo Applying $$PATCH ... ; \
-# patch -p1 < ../../mpm-itk/patches/$$PATCH ; \
-# echo ; \
-# done ; \
-# \
-# autoheader ; \
-# autoconf ; \
-# fi ;
-# cd $(BUILD_DIR)/$* && ./configure \
-# $(AP2_COMMON_CONFARGS) --with-mpm=$* $(AP2_$(*)_CONFARGS) $(CONFFLAGS) \
-# CFLAGS="$(AP2_CFLAGS)" CPPFLAGS="$(AP2_CPPFLAGS)" LDFLAGS="$(AP2_LDFLAGS)"
-# dh_auto_build -D "$(BUILD_DIR)/$*"
-# cd "$(BUILD_DIR)/$*" && ./apache2 -l |grep -v $* > mods.list
+# TODO: Check whether the override below is still needed
# # force one process since mkdir.sh used by 'make install' is not
# # reliable otherwise
# dh_auto_install -D "$(BUILD_DIR)/$*" --destdir="$(INSTALL_DIR)/$*" -- -j1
-# install -m 755 $(BUILD_DIR)/$*/apache2 debian/apache2.2-bin/usr/lib/apache2/mpm-$*/apache2
-#
-#
+
+
clean-config-vars:
-# set -ex ; \
-# for i in worker prefork; do \
-# if [ "$$i" = "prefork" ]; then \
-# TARGET=prefork ;\
-# else \
-# TARGET=threaded ;\
-# fi ;\
-# cp $(INSTALL_DIR)/$$i/usr/include/apache2/* debian/apache2-$$TARGET-dev/usr/include/apache2/ ;\
-# cp $(INSTALL_DIR)/$$i/usr/share/apache2/build/* debian/apache2-$$TARGET-dev/usr/share/apache2/build/ ;\
-# cp $(BUILD_DIR)/$$i/support/apxs debian/apache2-$$TARGET-dev/usr/bin/apxs2 ;\
-# perl -p -e s/^P=apache2/P=apache2-$${TARGET}-dev/ < debian/apache2.postinst > debian/apache2-$${TARGET}-dev.postinst ;\
-# done
# Clean up config_vars.mk
# FIXME: Maybe someone could document here why we actually need to
# cleanup some stuff here
@@ -154,14 +83,6 @@ clean-config-vars:
printf "EXTRA_CPPFLAGS = \n" >> tmp_config_vars.mk ; \
printf "EXTRA_CFLAGS = \n" >> tmp_config_vars.mk ; \
mv tmp_config_vars.mk config_vars.mk ) ;
-# done
-#
-#undo-mpm-%-maintainer-scripts:
-# for f in postinst preinst prerm links dirs ; do \
-# rm -f debian/apache2-mpm-$*.$$f ;\
-# done
-# rm -f debian/apache2-mpm-$*.lintian-overrides
-#
suexec-maintainer-scripts:
set -e ; \
--
Debian packaging for apache2 (Apache HTTPD 2.x)
More information about the Pkg-apache-commits
mailing list