[arch-commits] Commit in apache/repos (5 files)

Pierre Schmitz pierre at archlinux.org
Sun Jun 22 13:10:41 UTC 2008


    Date: Sunday, June 22, 2008 @ 09:10:41
  Author: pierre
Revision: 3371

Merged revisions 3131-3370 via svnmerge from 
svn+ssh://svn.archlinux.org/home/svn-packages/apache/trunk

........
  r3337 | pierre | 2008-06-22 09:28:19 +0000 (So, 22 Jun 2008) | 13 lines
  
  use /srv/http as docroot
  added http user/group
  added ldap support
  some cleanups
  
  should fix the following bugs:
  
  http://bugs.archlinux.org/task/9027
  http://bugs.archlinux.org/task/9378
  http://bugs.archlinux.org/task/1857
  http://bugs.archlinux.org/task/6028
........
  r3340 | pierre | 2008-06-22 11:06:44 +0000 (So, 22 Jun 2008) | 1 line
  
  some bugfixes; set some sane defaults
........
  r3344 | pierre | 2008-06-22 12:26:14 +0000 (So, 22 Jun 2008) | 1 line
  
  upgpkg: apache 2.2.9-2
........

Added:
  apache/repos/testing-i686/httpd.install
    (from rev 3344, apache/trunk/httpd.install)
Modified:
  apache/repos/testing-i686/	(properties)
  apache/repos/testing-i686/PKGBUILD
  apache/repos/testing-i686/arch.layout
  apache/repos/testing-i686/httpd.logrotate

-----------------+
 PKGBUILD        |   60 ++++++++++++++++++++++++++++++++++++------------------
 arch.layout     |   40 ++++++++++++++++++------------------
 httpd.install   |   32 ++++++++++++++++++++++++++++
 httpd.logrotate |    2 -
 4 files changed, 94 insertions(+), 40 deletions(-)


Property changes on: apache/repos/testing-i686
___________________________________________________________________
Name: svnmerge-integrated
   - /apache/trunk:1-3130
   + /apache/trunk:1-3370

Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2008-06-22 13:06:21 UTC (rev 3370)
+++ testing-i686/PKGBUILD	2008-06-22 13:10:41 UTC (rev 3371)
@@ -3,7 +3,7 @@
 
 pkgname=apache
 pkgver=2.2.9
-pkgrel=1
+pkgrel=2
 pkgdesc="A high performance Unix-based HTTP server"
 arch=('i686' 'x86_64')
 options=('!libtool')
@@ -14,39 +14,42 @@
         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.0' 'db>=4.6' 'pcre')
+install='httpd.install'
 source=("http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2"
         'httpd.logrotate' 'httpd' 'arch.layout')
 md5sums=('3afa8137dc1999be695a20b62fdf032b'
-         'a13925eef67108cf22f6bd1b2b8decb1'
+         'f4d627c64024c1b7b95efb5ffbaa625e'
          'fb6baeced65b7cf5b80083f278adebba'
-         '0816f63f1dc68f39e08d57fedd53b95e')
+         '3d659d41276ba3bfcb20c231eb254e0c')
 
 build() {
 	cd ${srcdir}/httpd-${pkgver}
-	# fix the suexec user
-	sed -i 's|^#define AP_HTTPD_USER.*$|#define AP_HTTPD_USER "nobody"|' \
-		support/suexec.h || return 1i
-	sed -e 's#User daemon#User nobody#' \
-	    -e 's#Group daemon#Group nobody#' \
+
+	# set default user
+	sed -e 's#User daemon#User http#' \
+	    -e 's#Group daemon#Group http#' \
 	    -i docs/conf/httpd.conf.in || return 1
 
 	cat ${srcdir}/arch.layout >> config.layout
 	./configure --enable-layout=Arch \
 		--enable-modules=all \
 		--enable-mods-shared=all \
-		--enable-ssl \
 		--enable-so \
-		--enable-proxy \
-		--enable-proxy-connect \
-		--enable-proxy-ftp \
-		--enable-proxy-http \
 		--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 \
-		--enable-cache \
-		--enable-disk-cache \
-		--enable-mem-cache \
-		--with-apr=/usr \
-		--with-apr-util=/usr \
+		--with-apr=/usr/bin/apr-1-config \
+		--with-apr-util=/usr/bin/apu-1-config \
 		--with-pcre=/usr || return 1
 
 	make || return 1
@@ -54,6 +57,25 @@
 	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
-	# remove the manual
+
+	# 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
+
+	# set sane defaults
+	sed -e 's#/usr/lib/httpd/modules/#modules/#' \
+	    -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
+	    -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
+	    -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
+
+	# cleanup
 	rm -rf ${pkgdir}/usr/share/httpd/manual
+	rm -rf ${pkgdir}/etc/httpd/conf/original
+	rm -rf ${pkgdir}/srv/http/*
+	rmdir ${pkgdir}/usr/bin
 }
\ No newline at end of file

Modified: testing-i686/arch.layout
===================================================================
--- testing-i686/arch.layout	2008-06-22 13:06:21 UTC (rev 3370)
+++ testing-i686/arch.layout	2008-06-22 13:10:41 UTC (rev 3371)
@@ -1,22 +1,22 @@
 <Layout Arch>
-	prefix:        /usr
-	exec_prefix:   ${prefix}
-	bindir:        ${exec_prefix}/bin
-	sbindir:       ${exec_prefix}/sbin
-	libdir:        ${exec_prefix}/lib
-	libexecdir:    ${exec_prefix}/libexec
-	mandir:        ${prefix}/share/man
-	sysconfdir:    /etc/httpd
-	datadir:       ${prefix}/share/httpd
-	installbuilddir: ${datadir}/build
-	errordir:      ${datadir}/error
-	iconsdir:      ${datadir}/icons
-	htdocsdir:     ${datadir}/htdocs
-	manualdir:     ${datadir}/manual
-	cgidir:        ${datadir}/cgi-bin
-	includedir:    ${prefix}/include/httpd
-	localstatedir: /var
-	runtimedir:    /var/run/httpd
-	logfiledir:    /var/log/httpd
-	proxycachedir: /var/cache/httpd
+	prefix:          /etc/httpd
+	exec_prefix:     /usr
+	bindir:          /usr/bin
+	sbindir:         /usr/sbin
+	libdir:          /usr/lib/httpd
+	libexecdir:      /usr/lib/httpd/modules
+	mandir:          /usr/share/man
+	sysconfdir:      /etc/httpd/conf
+	datadir:         /usr/share/httpd
+	installbuilddir: /usr/lib/httpd/build
+	errordir:        /usr/share/httpd/error
+	iconsdir:        /usr/share/httpd/icons
+	htdocsdir:       /srv/http
+	manualdir:       /usr/share/httpd/manual
+	cgidir:          /srv/http/cgi-bin
+	includedir:      /usr/include/httpd
+	localstatedir:   /var
+	runtimedir:      /var/run/httpd
+	logfiledir:      /var/log/httpd
+	proxycachedir:   /var/cache/httpd
 </Layout>
\ No newline at end of file

Copied: apache/repos/testing-i686/httpd.install (from rev 3344, apache/trunk/httpd.install)
===================================================================
--- testing-i686/httpd.install	                        (rev 0)
+++ testing-i686/httpd.install	2008-06-22 13:10:41 UTC (rev 3371)
@@ -0,0 +1,32 @@
+post_install() {
+	if [ -z "`grep '^http::' /etc/group`" ]; then
+		groupadd -g 33 http >& /dev/null
+	fi
+	if [ -z "`grep '^http:' /etc/passwd`" ]; then
+		useradd -u 33 -d /srv/http -g http -s /bin/false http &>/dev/null
+	fi
+}
+
+post_upgrade() {
+	post_install
+
+	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
+}
+
+pre_remove() {
+	userdel http &> /dev/null
+	groupdel http &> /dev/null
+}
\ No newline at end of file

Modified: testing-i686/httpd.logrotate
===================================================================
--- testing-i686/httpd.logrotate	2008-06-22 13:06:21 UTC (rev 3370)
+++ testing-i686/httpd.logrotate	2008-06-22 13:10:41 UTC (rev 3371)
@@ -1,5 +1,5 @@
 /var/log/httpd/*log {
    postrotate
-      /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
+      /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
 }





More information about the arch-commits mailing list