summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/apache
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/apache')
-rw-r--r--abs/core-testing/apache/PKGBUILD158
-rw-r--r--abs/core-testing/apache/apache.conf.d15
-rw-r--r--abs/core-testing/apache/apachectl-confd.patch15
-rwxr-xr-xabs/core-testing/apache/httpd65
-rw-r--r--abs/core-testing/apache/httpd.install16
-rw-r--r--abs/core-testing/apache/httpd.logrotate1
6 files changed, 184 insertions, 86 deletions
diff --git a/abs/core-testing/apache/PKGBUILD b/abs/core-testing/apache/PKGBUILD
index 0bd3936..6e570f1 100644
--- a/abs/core-testing/apache/PKGBUILD
+++ b/abs/core-testing/apache/PKGBUILD
@@ -1,68 +1,126 @@
-# $Id: PKGBUILD 4776 2008-07-09 21:51:30Z pierre $
-# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+# $Id: PKGBUILD 87621 2010-08-17 13:13:14Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=apache
-pkgver=2.2.9
-pkgrel=4
-pkgdesc="A high performance Unix-based HTTP server"
+pkgver=2.2.16
+pkgrel=2
+pkgdesc='A high performance Unix-based HTTP server'
arch=('i686' 'x86_64')
options=('!libtool')
url='http://www.apache.org/dist/httpd'
license=('APACHE')
-backup=(etc/httpd/conf/httpd.conf
+backup=(etc/conf.d/apache etc/httpd/conf/httpd.conf
etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
- etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf)
-depends=('openssl>=0.9.8b' 'zlib' 'apr-util>=1.3.2-2' 'db>=4.7' 'pcre')
-install='httpd.install'
-source=("http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2"
- 'httpd.logrotate' 'httpd' 'arch.layout')
-md5sums=('3afa8137dc1999be695a20b62fdf032b'
- 'f4d627c64024c1b7b95efb5ffbaa625e'
- 'fb6baeced65b7cf5b80083f278adebba'
+ etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
+ etc/logrotate.d/httpd)
+depends=('openssl' 'zlib' 'apr-util' 'pcre')
+optdepends=('lynx: apachectl status')
+_itkurl=http://mpm-itk.sesse.net/apache2.2-mpm-itk-2.2.11-02
+source=(http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2
+ ${_itkurl}/02-rename-prefork-to-itk.patch
+ ${_itkurl}/03-add-mpm-to-build-system.patch
+ ${_itkurl}/04-correct-output-makefile-location.patch
+ ${_itkurl}/05-add-copyright.patch
+ ${_itkurl}/06-hook-just-after-merging-perdir-config.patch
+ ${_itkurl}/07-base-functionality.patch
+ ${_itkurl}/08-max-clients-per-vhost.patch
+ ${_itkurl}/09-capabilities.patch
+ ${_itkurl}/10-nice.patch
+ apachectl-confd.patch
+ apache.conf.d
+ httpd.logrotate
+ httpd
+ arch.layout)
+md5sums=('c8ff2a07c884300bc7766a2e7f662d33'
+ 'db42cfcc18ae1c32aaaff2347e35b79d'
+ '131408ad4dc7b18547b4e062e7e495ab'
+ 'ee488f391054d528547c3a372faa2aa7'
+ 'b202944761b2f0516196488b12504236'
+ '78fa15f8ca3a284b7d71f942e24e47fb'
+ 'd33e39350e987721d50e6fb8e164ab6b'
+ '9f7a8935f9cabc7b46d0052906634cef'
+ '1b28e3363e1b0d05b738a21e7ddd264f'
+ 'd9667fcd2ffecc63e446edd4d6666731'
+ '4ac64df6e019edbe137017cba1ff2f51'
+ '08b3c875f6260644f2f52b4056d656b0'
+ '6382331e9700ed9e8cc78ea51887b537'
+ 'c7e300a287ef7e2e066ac7639536f87e'
'3d659d41276ba3bfcb20c231eb254e0c')
build() {
- cd ${srcdir}/httpd-${pkgver}
+ cd "${srcdir}/httpd-${pkgver}"
+
+ patch -Np0 -i "${srcdir}/apachectl-confd.patch"
# set default user
sed -e 's#User daemon#User http#' \
-e 's#Group daemon#Group http#' \
- -i docs/conf/httpd.conf.in || return 1
+ -i docs/conf/httpd.conf.in
+
+ cat "${srcdir}/arch.layout" >> config.layout
+
+ for mpm in prefork worker itk; do
+ if [ "${mpm}" = "itk" ]; then
+ mkdir -p server/mpm/experimental/itk
+ cp -r server/mpm/prefork/* server/mpm/experimental/itk/
+ mv server/mpm/experimental/itk/prefork.c server/mpm/experimental/itk/itk.c
- cat ${srcdir}/arch.layout >> config.layout
- ./configure --enable-layout=Arch \
- --enable-modules=all \
- --enable-mods-shared=all \
- --enable-so \
- --enable-suexec \
- --with-suexec-caller=http \
- --with-suexec-docroot=/srv/http \
- --with-suexec-logfile=/var/log/httpd/suexec.log \
- --with-suexec-bin=/usr/sbin/suexec \
- --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
- --enable-ldap --enable-authnz-ldap \
- --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
- --enable-ssl --with-ssl \
- --enable-deflate --enable-cgid \
- --enable-proxy --enable-proxy-connect \
- --enable-proxy-http --enable-proxy-ftp \
- --enable-dbd \
- --with-apr=/usr/bin/apr-1-config \
- --with-apr-util=/usr/bin/apu-1-config \
- --with-pcre=/usr || return 1
+ patch -Np1 -i "${srcdir}/02-rename-prefork-to-itk.patch"
+ patch -Np1 -i "${srcdir}/03-add-mpm-to-build-system.patch"
+ patch -Np1 -i "${srcdir}/04-correct-output-makefile-location.patch"
+ patch -Np1 -i "${srcdir}/05-add-copyright.patch"
+ patch -Np1 -i "${srcdir}/06-hook-just-after-merging-perdir-config.patch"
+ patch -Np1 -i "${srcdir}/07-base-functionality.patch"
+ patch -Np1 -i "${srcdir}/08-max-clients-per-vhost.patch"
+ patch -Np1 -i "${srcdir}/09-capabilities.patch"
+ patch -Np1 -i "${srcdir}/10-nice.patch"
- make || return 1
+ autoconf
+ fi
+ mkdir build-${mpm}
+ pushd build-${mpm}
+ ../configure --enable-layout=Arch \
+ --enable-modules=all \
+ --enable-mods-shared=all \
+ --enable-so \
+ --enable-suexec \
+ --with-suexec-caller=http \
+ --with-suexec-docroot=/srv/http \
+ --with-suexec-logfile=/var/log/httpd/suexec.log \
+ --with-suexec-bin=/usr/sbin/suexec \
+ --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
+ --enable-ldap --enable-authnz-ldap \
+ --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
+ --enable-ssl --with-ssl \
+ --enable-deflate --enable-cgid \
+ --enable-proxy --enable-proxy-connect \
+ --enable-proxy-http --enable-proxy-ftp \
+ --enable-dbd \
+ --with-apr=/usr/bin/apr-1-config \
+ --with-apr-util=/usr/bin/apu-1-config \
+ --with-pcre=/usr \
+ --with-mpm=${mpm}
+ make
+ if [ "${mpm}" = "prefork" ]; then
+ make DESTDIR="${pkgdir}" install
+ else
+ install -m755 httpd "${pkgdir}/usr/sbin/httpd.${mpm}"
+ fi
+ popd
+ done
- make DESTDIR=${pkgdir} install || return 1
- install -D -m755 ${srcdir}/httpd ${pkgdir}/etc/rc.d/httpd
- install -D -m644 ${srcdir}/httpd.logrotate ${pkgdir}/etc/logrotate.d/httpd
+ install -D -m755 "${srcdir}/httpd" "${pkgdir}/etc/rc.d/httpd"
+ install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
+ install -D -m644 "${srcdir}/apache.conf.d" "${pkgdir}/etc/conf.d/apache"
# symlinks for /etc/httpd
- ln -fs /var/log/httpd ${pkgdir}/etc/httpd/logs
- ln -fs /var/run/httpd ${pkgdir}/etc/httpd/run
- ln -fs /usr/lib/httpd/modules ${pkgdir}/etc/httpd/modules
- ln -fs /usr/lib/httpd/build ${pkgdir}/etc/httpd/build
+ ln -fs /var/log/httpd "${pkgdir}/etc/httpd/logs"
+ ln -fs /var/run/httpd "${pkgdir}/etc/httpd/run"
+ ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
+ ln -fs /usr/lib/httpd/build "${pkgdir}/etc/httpd/build"
# set sane defaults
sed -e 's#/usr/lib/httpd/modules/#modules/#' \
@@ -71,11 +129,11 @@ build() {
-e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
- -i ${pkgdir}/etc/httpd/conf/httpd.conf || return 1
+ -i "${pkgdir}/etc/httpd/conf/httpd.conf"
# cleanup
- rm -rf ${pkgdir}/usr/share/httpd/manual
- rm -rf ${pkgdir}/etc/httpd/conf/original
- rm -rf ${pkgdir}/srv/http/*
- rmdir ${pkgdir}/usr/bin
+ rm -rf "${pkgdir}/usr/share/httpd/manual"
+ rm -rf "${pkgdir}/etc/httpd/conf/original"
+ rm -rf "${pkgdir}/srv/"
+ rm -rf "${pkgdir}/usr/bin"
}
diff --git a/abs/core-testing/apache/apache.conf.d b/abs/core-testing/apache/apache.conf.d
new file mode 100644
index 0000000..c6d0ebf
--- /dev/null
+++ b/abs/core-testing/apache/apache.conf.d
@@ -0,0 +1,15 @@
+# Configuration file for the httpd service.
+
+#
+# The default processing model (MPM) is the process-based
+# 'prefork' model. A thread-based model, 'worker', is also
+# available, but does not work with some modules (such as PHP).
+# The service must be stopped before changing this variable.
+#
+#HTTPD=/usr/sbin/httpd.worker
+
+#
+# To pass additional options (for instance, -D definitions) to the
+# httpd binary at startup, set OPTIONS here.
+#
+#OPTIONS=
diff --git a/abs/core-testing/apache/apachectl-confd.patch b/abs/core-testing/apache/apachectl-confd.patch
new file mode 100644
index 0000000..d0f4b69
--- /dev/null
+++ b/abs/core-testing/apache/apachectl-confd.patch
@@ -0,0 +1,15 @@
+--- support/apachectl.in.orig 2010-03-06 18:09:11.000000000 +0100
++++ support/apachectl.in 2010-03-06 18:12:31.000000000 +0100
+@@ -56,6 +56,12 @@
+ # the URL to your server's mod_status status page. If you do not
+ # have one, then status and fullstatus will not work.
+ STATUSURL="http://localhost:@PORT@/server-status"
++
++# Source /etc/conf.d/apache for $HTTPD setting, etc.
++if [ -r /etc/conf.d/apache ]; then
++ . /etc/conf.d/apache
++fi
++
+ #
+ # Set this variable to a command that increases the maximum
+ # number of file descriptors allowed per child process. This is
diff --git a/abs/core-testing/apache/httpd b/abs/core-testing/apache/httpd
index da4de25..6fa9c3c 100755
--- a/abs/core-testing/apache/httpd
+++ b/abs/core-testing/apache/httpd
@@ -1,40 +1,65 @@
#!/bin/bash
-# general config
+daemon_name=httpd
+
. /etc/rc.conf
. /etc/rc.d/functions
+APACHECTL=/usr/sbin/apachectl
+
case "$1" in
start)
- stat_busy "Starting HTTP Daemon"
- /usr/sbin/apachectl start &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon httpd
+ stat_busy "Starting Apache Web Server"
+ [ ! -d /var/run/httpd ] && install -d /var/run/httpd
+ if $APACHECTL start >/dev/null ; then
+ add_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
+
stop)
- stat_busy "Stopping HTTP Daemon"
- /usr/sbin/apachectl stop &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
+ stat_busy "Stopping Apache Web Server"
+ if $APACHECTL stop >/dev/null ; then
+ rm_daemon $daemon_name
+ stat_done
else
- rm_daemon httpd
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ reload)
+ stat_busy "Reloading Apache Web Server"
+ if $APACHECTL graceful >/dev/null ; then
+ add_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
+
restart)
- $0 stop
- sleep 3
- $0 start
- ;;
- reload)
- if [ -f /var/run/httpd/httpd.pid ]; then
- status "Reloading HTTP Configuration" kill -HUP `cat /var/run/httpd/httpd.pid`
+ stat_busy "Restarting Apache Web Server"
+ if $APACHECTL restart >/dev/null ; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
+
+ status)
+ stat_busy "Checking Apache Web Server status";
+ ck_status $daemon_name
+ ;;
+
*)
- echo "usage: $0 {start|stop|restart|reload}"
+ echo "usage: $0 {start|stop|reload|restart|status}"
esac
+
+exit 0
diff --git a/abs/core-testing/apache/httpd.install b/abs/core-testing/apache/httpd.install
deleted file mode 100644
index f72141a..0000000
--- a/abs/core-testing/apache/httpd.install
+++ /dev/null
@@ -1,16 +0,0 @@
-post_upgrade() {
- if [ $(vercmp '2.2.8' $2) -ge 0 ]; then
- echo '
- ==> New default DocumentRoot
-
- Apache httpd uses /srv/http as default DocumentRoot.
- You can still use your current DocumentRoot
-
- ==> New default user and group
-
- Instead of "nobody" apache runs as user/group "http" by default now. You might
- want to adjust your httpd.conf according to this change. But you can still
- run httpd as nobody.
- '
- fi
-} \ No newline at end of file
diff --git a/abs/core-testing/apache/httpd.logrotate b/abs/core-testing/apache/httpd.logrotate
index 3f9298c..a723d20 100644
--- a/abs/core-testing/apache/httpd.logrotate
+++ b/abs/core-testing/apache/httpd.logrotate
@@ -1,4 +1,5 @@
/var/log/httpd/*log {
+ missingok
postrotate
/bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript