[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. eec7d3d78f860179ec3d7c8f59ffa68de5b397d6

Arno Töll debian at toell.net
Mon Mar 5 19:51:21 UTC 2012


The following commit has been merged in the next branch:
commit 24db6f05f3d0091122f01b445aeb4156bb53dfbf
Author: Arno Töll <debian at toell.net>
Date:   Sun Mar 4 23:56:21 2012 +0100

    Fix various smaller bugs in debian/rules, helper scripts and postinst
    
    * re-enable the complicated index.html install logic from the 2.2 package
    * drop Ubuntu specific patches, we expect them to carry them themselves their
      package divergese already anyway.
    * Drop ac_cv_prog_LYNX_PATH=www-browser. We ship both, our own envvars and our
      own apachectl. Thus it is effectively a no-op for a long time already.
    * Run enable_default_modules and enable_default_conf and enable_default_mpm in
      postinst only on new installation, being it 2.2 or 2.4
    * touch have other_vhosts_access.log in postinst, too
    * Drop emptry directories in apache2-dev and apache2-doc
    * Install examples in the apache2-doc package

diff --git a/debian/apache2-dev.dirs b/debian/apache2-dev.dirs
index c860bc1..e4176ef 100644
--- a/debian/apache2-dev.dirs
+++ b/debian/apache2-dev.dirs
@@ -1,3 +1,2 @@
 usr/include/apache2
 usr/share/apache2/build
-usr/share/man/man8
diff --git a/debian/apache2-doc.dirs b/debian/apache2-doc.dirs
index 7b0d76c..4e13220 100644
--- a/debian/apache2-doc.dirs
+++ b/debian/apache2-doc.dirs
@@ -1,2 +1 @@
-etc/apache2/conf.d
 usr/share/doc/apache2-doc
diff --git a/debian/apache2.install b/debian/apache2.install
index d64bd98..7696671 100644
--- a/debian/apache2.install
+++ b/debian/apache2.install
@@ -1,5 +1,4 @@
 debian/bash_completion/apache2	/etc/bash_completion.d/
-/etc/apache2			/usr/share/doc/apache2-doc/examples
 debian/config-dir/*		/etc/apache2
 debian/a2enmod			/usr/sbin
 debian/apache2ctl		/usr/sbin
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 5cc2f57..dfce71f 100755
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -55,6 +55,12 @@ we_are_upgrading_from_squeeze()
                 return 0
         fi
 
+	# this check is a probably tautology but makes it easier to understand
+	# the logic
+	if [ -n $2 ] && dpkg --compare-versions "$2" ge-nl "2.3"; then
+                return 1
+        fi
+
         if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
                 return 0
         fi
@@ -81,6 +87,14 @@ we_are_upgrading_from_squeeze()
         return 1
 }
 
+is_fresh_install()
+{
+        if [ -z $2 ] ; then
+                return 0
+        fi
+	return 1
+}
+
 
 # The two functions below are licensed GPL-2+ and was written by dpkg maintainers
 # See the dpkg-maintscript-helper script for details
@@ -163,22 +177,33 @@ enable_default_mpm()
                                 mpm="mpm_event"
                         ;;
                 esac
+
+        	a2enmod -q $mpm
+		return 0
         fi
-        a2enmod -q $mpm
+
+	if is_fresh_install $@ ; then
+		a2enmod -q $mpm
+	fi
+
 }
 
 enable_default_modules()
 {
-        for module in authz_host alias cgi dir ; do
-                a2enmod -q $module
-        done
+	if is_fresh_install $@ || we_are_upgrading_from_squeeze $@; then
+	        for module in authz_host alias cgi dir ; do
+        	        a2enmod -q $module
+	        done
+	fi
 }
 
 enable_default_conf()
 {
-	for conf in charset localized-error-pages other-vhosts-access-log security ; do
-		a2enconf -q $conf
-	done
+	if is_fresh_install $@ || we_are_upgrading_from_squeeze $@ ; then
+		for conf in charset localized-error-pages other-vhosts-access-log security ; do
+			a2enconf -q $conf
+		done
+	fi
 }
 
 install_default_site()
@@ -196,7 +221,7 @@ install_default_site()
 				fi
 			fi
 		done
-	else
+	elif is_fresh_install $@ ; then
         	if [ ! -L /etc/apache2/sites-enabled/000-default.conf -a \
         	        ! -f /etc/apache2/sites-enabled/000-default.conf ]; then
         	                a2ensite -q 000-default
@@ -205,15 +230,27 @@ install_default_site()
         	touch /var/log/apache2/error.log /var/log/apache2/access.log
 	        chown root:adm /var/log/apache2/error.log /var/log/apache2/access.log
         	chmod 0640 /var/log/apache2/error.log /var/log/apache2/access.log
+
+		touch /var/log/apache2/other_vhosts_access.log
+		chown root:adm /var/log/apache2/other_vhosts_access.log
+		chmod 0640 /var/log/apache2/other_vhosts_access.log
 	fi
 }
 
 # XXX: This site is installed in the apache2-data package. Should the postinst
-# scriptlet move there too? 
+# scriptlet move there too?
 install_default_files()
 {
-	if [ ! -e /var/www/index.html ] ; then
-		cp /usr/share/apache2/default-site/index.html /var/www/index.html
+	if is_fresh_install $@ ; then
+		if [ ! -e /var/www/index.html  -a \
+			! -h /var/www/index.html  -a \
+			! -e /var/www/index.cgi   -a \
+			! -e /var/www/index.pl    -a \
+			! -e /var/www/index.php   -a \
+			! -e /var/www/index.xhtml -a \
+			! -e /var/www/index.htm ] ; then
+				cp /usr/share/apache2/default-site/index.html /var/www/index.html
+		fi
 	fi
 }
 
diff --git a/debian/changelog b/debian/changelog
index 7bae121..16226c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ apache2 (2.4.1-1) experimental; urgency=low
       (Closes: #601606)
     + Allows configuring source address for proxy requests. (Closes: #465283)
     + Supports CONNECT request through https. (Closes: #307298)
+    + New Upstream (2.4). (Closes: #662115)
 
   * Refresh patches but leave all hunks unchanged where possible. Notable
     changes are:
@@ -40,6 +41,10 @@ apache2 (2.4.1-1) experimental; urgency=low
     + move cronjob and init script to debhelper configuration files
       (apache2.cron.daily and apache2.init respectively)
     + move man pages to debian/manpages
+    + Remove Ubuntu hacks in debian/rules, we expect them to carry Ubuntu
+      specifics in their own patch set, as it diverges already anyway.
+    + shake-up files installed in different packages
+    + Do not copy the source tree anymore, build package in place.
   * Push standards version to 3.9.3 - no special changes required
   * Refactor binary packages, now as things simplified. MPMs are simple
     modules now, they can be bundled into the same binary package which do not
@@ -139,7 +144,7 @@ apache2 (2.4.1-1) experimental; urgency=low
   * Migrate patches to DEP-3 format. For particular changes see the summary
     above.
 
- -- Arno Töll <debian at toell.net>  Wed, 29 Feb 2012 19:20:15 +0100
+ -- Arno Töll <debian at toell.net>  Sun, 04 Mar 2012 23:38:59 +0100
 
 apache2 (2.2.22-1) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index 228fe8c..f614a3a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,18 +11,10 @@ AP2_CFLAGS = -pipe $(shell dpkg-buildflags --get CFLAGS)
 AP2_LDFLAGS = -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS)
 AP2_CPPFLAGS = -DPLATFORM='\"$(LSB_RELEASE)\"' $(shell dpkg-buildflags --get CPPFLAGS)
 
-# TODO: This flag used to be appended to the configure line. Is it still needed?
-#CONFFLAGS += ac_cv_prog_LYNX_PATH=www-browser
-
 prepare-custom-suexec:
 	cp support/suexec.c support/suexec-custom.c
 	patch -p1 < debian/patches/202_suexec-custom
 
-# 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
-
 
 clean-config-vars:
 	# Clean up config_vars.mk
@@ -113,28 +105,10 @@ override_dh_installman:
 
 override_dh_strip:
 	dh_strip --dbg-package=apache2-dbg
-#TODO: Probably not needed anymore?
-#	set -e \
-#	if [ "$(LSB_RELEASE)" != "Ubuntu" ] && [ -n "$(DEB_BUILD_STRIP)" ] ; then \
-#		for i in $(MPMS); do \
-#			MPM=usr/lib/apache2/mpm-$$i/apache2 ;\
-#			objcopy --only-keep-debug $(BUILD_DIR)/$$i/apache2 \
-#				debian/apache2-dbg/usr/lib/debug/$$MPM-mpm-$$i ;\
-#			chmod 644 debian/apache2-dbg/usr/lib/debug/$$MPM-mpm-$$i ;\
-#			strip --remove-section=.comment --remove-section=.note --strip-unneeded \
-#			debian/apache2.2-bin/$$MPM ;\
-#			objcopy --add-gnu-debuglink=debian/apache2-dbg/usr/lib/debug/$$MPM-mpm-$$i \
-#				debian/apache2.2-bin/$$MPM ;\
-#			done ;\
-#	fi
-#override_dh_builddeb:
-#	if [ "$(LSB_RELEASE)" = "Ubuntu" ]; then \
-#		rm -rf debian/apache2-dbg; \
-#		sed -i '/apache2-dbg/d' debian/files; \
-#		dh_builddeb -Napache2-dbg; \
-#	else \
-#		dh_builddeb; \
-#	fi
-#
+
+override_dh_auto_install:
+	dh_auto_install -- -j1
+
+
 
 .PHONY: prepare-custom-suexec suexec-maintainer-scripts clean-config-vars

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list