diff options
author | Stefan Fritsch <sf@debian.org> | 2008-03-14 01:31:55 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2012-01-02 10:36:52 +0100 |
commit | 08a2f915874bf73a7934f3fa6d3ed369ff677e19 (patch) | |
tree | 9065ef7a4ed57ce578c6a81942c3f6218bb2d6a7 | |
parent | ca3a426f862e8d84beb1375f5bab715ad8b2e5d8 (diff) | |
download | apache2-08a2f915874bf73a7934f3fa6d3ed369ff677e19.tar.gz |
build modules once, not three times
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@619 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/00list | 1 | ||||
-rwxr-xr-x | debian/patches/057_disablemods.dpatch | 62 | ||||
-rwxr-xr-x | debian/rules | 39 |
4 files changed, 92 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog index 798cf0e7..b5db8ab7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ apache2 (2.2.8-3) UNRELEASED; urgency=low apache2.conf. * Add 'status' function to init script (adapted from patch by Dustin Kirkland). + * Don't build the modules three times. We are only shipping one set of them, + anyway. (Inspired by the Fedora package.) * Remove Fabio M. Di Nitto from the uploaders field (thanks for your work). -- Stefan Fritsch <sf@debian.org> Wed, 12 Mar 2008 17:55:40 +0100 diff --git a/debian/patches/00list b/debian/patches/00list index 25bc0f0f..d7da234a 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -20,3 +20,4 @@ 054_filename_in_warning.dpatch 055_htpasswd_salt_generation.dpatch 056_mod_cache_IfRange.dpatch +057_disablemods.dpatch diff --git a/debian/patches/057_disablemods.dpatch b/debian/patches/057_disablemods.dpatch new file mode 100755 index 00000000..303033d5 --- /dev/null +++ b/debian/patches/057_disablemods.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## Stolen from the fedora package +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Support "--enable-modules=none" to build an httpd binary with +## DP: no optional modules enabled. + +@DPATCH@ +diff -urNad trunk~/acinclude.m4 trunk/acinclude.m4 +--- trunk~/acinclude.m4 2005-11-13 07:33:15.000000000 +0100 ++++ trunk/acinclude.m4 2008-03-14 01:28:42.379287995 +0100 +@@ -289,14 +289,19 @@ + + AC_ARG_ENABLE(modules, + APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most"),[ +- for i in $enableval; do +- if test "$i" = "all" -o "$i" = "most"; then +- module_selection=$i +- else +- i=`echo $i | sed 's/-/_/g'` +- eval "enable_$i=yes" +- fi +- done ++ if test "$enableval" = "none"; then ++ module_default=no ++ module_selection=none ++ else ++ for i in $enableval; do ++ if test "$i" = "all" -o "$i" = "most"; then ++ module_selection=$i ++ else ++ i=`echo $i | sed 's/-/_/g'` ++ eval "enable_$i=yes" ++ fi ++ done ++ fi + ]) + + AC_ARG_ENABLE(mods-shared, +diff -urNad trunk~/configure trunk/configure +--- trunk~/configure 2008-01-10 17:54:40.000000000 +0100 ++++ trunk/configure 2008-03-14 01:31:55.675287371 +0100 +@@ -8106,6 +8106,10 @@ + # Check whether --enable-modules was given. + if test "${enable_modules+set}" = set; then + enableval=$enable_modules; ++ if test "$enableval" = "none"; then ++ module_default=no ++ module_selection=none ++ else + for i in $enableval; do + if test "$i" = "all" -o "$i" = "most"; then + module_selection=$i +@@ -8114,7 +8118,7 @@ + eval "enable_$i=yes" + fi + done +- ++ fi + fi + + diff --git a/debian/rules b/debian/rules index a0671b5d..d95f1c35 100755 --- a/debian/rules +++ b/debian/rules @@ -29,14 +29,18 @@ AP2_COMMON_CONFARGS = --enable-layout=Debian --enable-so \ --with-suexec-docroot=/var/www \ --with-suexec-userdir=public_html \ --with-suexec-logfile=/var/log/apache2/suexec.log \ - --enable-suexec=shared --enable-authn-alias=shared \ - --enable-authnz-ldap=shared \ + --enable-suexec=shared \ + --enable-log-config=static --enable-logio=static \ + --with-apr=/usr/bin/apr-1-config \ + --with-apr-util=/usr/bin/apu-1-config \ + --with-pcre=yes + +AP2_MODS_CONFARGS = --enable-authn-alias=shared --enable-authnz-ldap=shared \ --enable-disk-cache=shared --enable-cache=shared \ --enable-mem-cache=shared --enable-file-cache=shared \ --enable-cern-meta=shared --enable-dumpio=shared --enable-ext-filter=shared \ --enable-charset-lite=shared --enable-cgi=shared \ --enable-dav-lock=shared --enable-log-forensic=shared \ - --enable-log-config --enable-logio \ --enable-ldap=shared --enable-proxy=shared \ --enable-proxy-connect=shared --enable-proxy-ftp=shared \ --enable-proxy-http=shared --enable-proxy-ajp=shared \ @@ -63,13 +67,7 @@ AP2_COMMON_CONFARGS = --enable-layout=Debian --enable-so \ --enable-actions=shared --enable-speling=shared \ --enable-userdir=shared --enable-alias=shared \ --enable-rewrite=shared --enable-mime=shared \ - --enable-substitute=shared \ - --with-apr=/usr/bin/apr-1-config \ - --with-apr-util=/usr/bin/apu-1-config \ - --with-pcre=yes -# -# This is insufficiently flexible. -# --enable-mods-shared=all --enable-modules=all + --enable-substitute=shared AP2_CFLAGS = $(CFLAGS) -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall AP2_LDFLAGS = -Wl,--as-needed @@ -102,13 +100,30 @@ clean: unpatch build: patch-stamp build-mpms build-mpms: 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 ;\ + exit 1 ;\ + fi \ + done + + +mpm-worker: + 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-%: dh_testdir mkdir -p $(BUILD)/$* cd $(BUILD)/$* ;\ - CFLAGS="$(AP2_CFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) $(AP2_CONFARGS) --with-mpm=$* ;\ - $(MAKE) + CFLAGS="$(AP2_CFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) --enable-modules=none --with-mpm=$* ;\ + $(MAKE) ;\ + ./apache2 -l |grep -v $* > mods.list touch $@ install-%: |