[Pkg-apache-commits] r933 - in /trunk/apache2: apache2-dbg.postinst apache2-mpm-prefork.postinst apache2-mpm-prefork.preinst apache2.postinst changelog clean compat mpm-postinst-threaded mpm-preinst-threaded mpms.postinst mpms.preinst rules
sf at alioth.debian.org
sf at alioth.debian.org
Fri May 22 17:17:35 UTC 2009
Author: sf
Date: Fri May 22 17:17:35 2009
New Revision: 933
URL: http://svn.debian.org/wsvn/pkg-apache/?sc=1&rev=933
Log:
- using symlinks in /usr/share/doc is nice but requires special care on upgrade :-(
- while there, switch to dh 7 and refactor debian/rules a bit
Added:
trunk/apache2/apache2-dbg.postinst
trunk/apache2/apache2.postinst
trunk/apache2/clean
trunk/apache2/mpms.postinst
- copied, changed from r918, trunk/apache2/mpm-postinst-threaded
trunk/apache2/mpms.preinst
- copied unchanged from r918, trunk/apache2/mpm-preinst-threaded
Removed:
trunk/apache2/apache2-mpm-prefork.postinst
trunk/apache2/apache2-mpm-prefork.preinst
trunk/apache2/mpm-postinst-threaded
trunk/apache2/mpm-preinst-threaded
Modified:
trunk/apache2/changelog
trunk/apache2/compat
trunk/apache2/rules
Added: trunk/apache2/apache2-dbg.postinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2-dbg.postinst?rev=933&op=file
==============================================================================
--- trunk/apache2/apache2-dbg.postinst (added)
+++ trunk/apache2/apache2-dbg.postinst Fri May 22 17:17:35 2009
@@ -1,0 +1,18 @@
+#!/bin/sh
+set -e
+
+if [ "$1" != "configure" ]; then
+ exit 0
+fi
+
+P=apache2-dbg
+if dpkg --compare-versions $2 lt 2.2.11-5~ ; then
+ DOCDIR=/usr/share/doc/$P
+ if [ -d $DOCDIR ] ; then
+ rmdir $DOCDIR 2> /dev/null && ln -s apache2.2-bin $DOCDIR
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
Added: trunk/apache2/apache2.postinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.postinst?rev=933&op=file
==============================================================================
--- trunk/apache2/apache2.postinst (added)
+++ trunk/apache2/apache2.postinst Fri May 22 17:17:35 2009
@@ -1,0 +1,20 @@
+#!/bin/sh
+set -e
+
+if [ "$1" != "configure" ]; then
+ exit 0
+fi
+
+# postinst for apache2, apache2-prefork-dev, apache2-threaded-dev
+
+P=apache2
+if dpkg --compare-versions $2 lt 2.2.11-5~ ; then
+ DOCDIR=/usr/share/doc/$P
+ if [ -d $DOCDIR ] ; then
+ rmdir $DOCDIR 2> /dev/null && ln -s apache2.2-common $DOCDIR
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
Modified: trunk/apache2/changelog
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/changelog?rev=933&op=diff
==============================================================================
--- trunk/apache2/changelog (original)
+++ trunk/apache2/changelog Fri May 22 17:17:35 2009
@@ -6,6 +6,8 @@
Closes: #468690
- run multiple instances of apache with different MPMs. This configuration
is not supported in any way, though. Closes: #517572
+ * Switch to debhelper compatibility level 7 and remove some code duplication
+ in debian/rules.
* Override some Lintian warnings about old autotools helper files and being
not binNMUable (apache2 is not binNMUable anyway, because of the
apache2 <-> apache2-mpm-itk dependency).
Added: trunk/apache2/clean
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/clean?rev=933&op=file
==============================================================================
--- trunk/apache2/clean (added)
+++ trunk/apache2/clean Fri May 22 17:17:35 2009
@@ -1,0 +1,14 @@
+debian/apache2-mpm-worker.postinst
+debian/apache2-mpm-worker.preinst
+debian/apache2-mpm-worker.prerm
+debian/apache2-mpm-worker.lintian-overrides
+debian/apache2-mpm-event.postinst
+debian/apache2-mpm-event.preinst
+debian/apache2-mpm-event.prerm
+debian/apache2-mpm-event.lintian-overrides
+debian/apache2-mpm-prefork.postinst
+debian/apache2-mpm-prefork.preinst
+debian/apache2-mpm-prefork.prerm
+debian/apache2-mpm-prefork.lintian-overrides
+debian/apache2-prefork-dev.postinst
+debian/apache2-threaded-dev.postinst
Modified: trunk/apache2/compat
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/compat?rev=933&op=diff
==============================================================================
--- trunk/apache2/compat (original)
+++ trunk/apache2/compat Fri May 22 17:17:35 2009
@@ -1,1 +1,1 @@
-5
+7
Copied: trunk/apache2/mpms.postinst (from r918, trunk/apache2/mpm-postinst-threaded)
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/mpms.postinst?rev=933&op=diff
==============================================================================
--- trunk/apache2/mpm-postinst-threaded (original)
+++ trunk/apache2/mpms.postinst Fri May 22 17:17:35 2009
@@ -5,10 +5,19 @@
exit 0
fi
-#enable cgid, but only on new installs.
+P=xxx
+if [ $P = apache2-mpm-prefork ] || [ $P = apache2-mpm-itk ]; then
+ CGI_DIS=cgid
+ CGI_EN=cgi
+else
+ CGI_DIS=cgi
+ CGI_EN=cgid
+fi
+
+#enable cgi/cgid, but only on new installs.
if [ -z "$2" ]; then
- a2dismod cgi >/dev/null || true
- a2enmod cgid >/dev/null || echo "It looks like you've deleted /etc/apache2/mods-available/cgid.load, so mod_cgid cannot be enabled. To fix this, please purge and reinstall apache2.2-common."
+ a2dismod $CGI_DIS >/dev/null || true
+ a2enmod $CGI_EN >/dev/null || echo "It looks like you've deleted /etc/apache2/mods-available/cgid.load, so mod_cgid cannot be enabled. To fix this, please purge and reinstall apache2.2-common."
fi
# Migrate our kill symlinks, including ones the user may have done an s/S/K/ to:
@@ -27,6 +36,13 @@
fi
fi
+if dpkg --compare-versions $2 lt 2.2.11-5~ ; then
+ DOCDIR=/usr/share/doc/$P
+ if [ -d $DOCDIR ] ; then
+ rmdir $DOCDIR 2> /dev/null && ln -s apache2.2-common $DOCDIR
+ fi
+fi
+
#DEBHELPER#
exit 0
Modified: trunk/apache2/rules
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/rules?rev=933&op=diff
==============================================================================
--- trunk/apache2/rules (original)
+++ trunk/apache2/rules Fri May 22 17:17:35 2009
@@ -95,17 +95,11 @@
clean: unpatch
dh_testdir
+ rm -rf $(BUILD) mpm-worker mpm-prefork mpm-event install
dh_clean
- rm -rf $(BUILD) mpm-worker mpm-prefork mpm-event install build-mpms
- rm -f debian/apache2-mpm-worker.postinst debian/apache2-mpm-worker.preinst debian/apache2-mpm-worker.prerm
- rm -f debian/apache2-mpm-event.postinst debian/apache2-mpm-event.preinst debian/apache2-mpm-event.prerm
- rm -f debian/apache2-mpm-prefork.prerm
- for i in `ls debian/icons/ | cut -d. -f1,2`; do \
- rm -f debian/tmp/usr/share/apache2/icons/$$i; \
- done
-
-build: patch-stamp build-mpms
-build-mpms: mpm-worker mpm-prefork mpm-event
+
+build: patch-stamp build-stamp
+build-stamp: patch-stamp mpm-worker mpm-prefork mpm-event
for mpm in prefork event ; do \
if ! diff -u $(BUILD)/$$mpm/mods.list $(BUILD)/worker/mods.list ; then \
echo Different modules built into httpd binaries, will not proceed ;\
@@ -115,24 +109,27 @@
touch $@
-mpm-worker: patch-stamp
- dh_testdir
- mkdir -p $(BUILD)/worker
- cd $(BUILD)/worker ;\
- CFLAGS="$(AP2_CFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) $(AP2_MODS_CONFARGS) --with-mpm=worker ;\
- $(MAKE) ;\
- ./apache2 -l |grep -v worker > mods.list
- touch $@
-
-mpm-%: patch-stamp
+mpm-worker mpm-prefork mpm-event: mpm-%: patch-stamp mpm-%.scripts-stamp
dh_testdir
mkdir -p $(BUILD)/$*
+ if [ $* = worker ] ; then \
+ ENABLE_MODULES="$(AP2_MODS_CONFARGS)" ;\
+ else \
+ ENABLE_MODULES=--enable-modules=none ;\
+ fi ;\
cd $(BUILD)/$* ;\
- CFLAGS="$(AP2_CFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) --enable-modules=none --with-mpm=$* ;\
+ CFLAGS="$(AP2_CFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) $$ENABLE_MODULES --with-mpm=$* ;\
$(MAKE) ;\
./apache2 -l |grep -v $* > mods.list
touch $@
+mpm-%.scripts-stamp: debian/mpms.postinst debian/mpms.preinst debian/mpms.prerm debian/mpms.lintian-overrides
+ for f in postinst preinst prerm; do \
+ perl -p -e s/P=xxx/P=apache2-mpm-$*/ < debian/mpms.$$f > debian/apache2-mpm-$*.$$f ;\
+ done
+ perl -p -e "s/^/apache2-mpm-$*: /" < debian/mpms.lintian-overrides > debian/apache2-mpm-$*.lintian-overrides
+ touch $@
+
install-%: mpm-%
dh_testdir
dh_testroot
@@ -160,6 +157,7 @@
cp debian/apache2-mpm-$$i/usr/include/apache2/* debian/apache2-$$TARGET-dev/usr/include/apache2/ ;\
cp debian/apache2-mpm-$$i/usr/share/apache2/build/* debian/apache2-$$TARGET-dev/usr/share/apache2/build/ ;\
cp $(BUILD)/$$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
set -x ; for i in threaded prefork; do \
@@ -173,7 +171,7 @@
mv tmp_config_vars.mk config_vars.mk ) ; \
done
-install-src: build-mpms
+install-src: build-stamp
dh_testdir
dh_testroot
dh_installdirs
@@ -209,7 +207,6 @@
done
dh_install --list-missing --sourcedir=debian/tmp
-# --sourcedir=$(REALCURDIR)/debian/apache2.2-common
cp debian/bash_completion debian/apache2.2-common/etc/bash_completion.d/apache2.2-common
install -m755 debian/apache2.2-common.bug.script debian/apache2.2-common/usr/share/bug/apache2.2-common/script
@@ -258,12 +255,6 @@
ln -s a2enmod debian/apache2.2-common/usr/sbin/a2ensite
ln -s a2enmod debian/apache2.2-common/usr/sbin/a2dissite
cp debian/default-index.html debian/apache2.2-common/usr/share/apache2/default-site/index.html
- for i in worker event; do \
- install -m755 debian/mpm-postinst-threaded debian/apache2-mpm-$$i.postinst ;\
- install -m755 debian/mpm-preinst-threaded debian/apache2-mpm-$$i.preinst;\
- install -m755 debian/mpms.prerm debian/apache2-mpm-$$i.prerm ;\
- done
- install -m755 debian/mpms.prerm debian/apache2-mpm-prefork.prerm
for i in worker prefork event; do \
rm -rf debian/apache2-mpm-$$i/ ;\
@@ -273,7 +264,6 @@
ln -s /usr/lib/apache2/mpm-$$i/apache2 debian/apache2-mpm-$$i/usr/sbin/apache2 ;\
mkdir -p debian/apache2-mpm-$$i/usr/share/lintian/overrides ;\
mkdir -p debian/apache2-mpm-$$i/usr/share/bug/apache2-mpm-$$i ;\
- perl -p -e "s/^/apache2-mpm-$$i: /" < debian/mpms.lintian-overrides > debian/apache2-mpm-$$i/usr/share/lintian/overrides/apache2-mpm-$$i ;\
ln -s ../apache2.2-common/script debian/apache2-mpm-$$i/usr/share/bug/apache2-mpm-$$i ;\
done
More information about the Pkg-apache-commits
mailing list