[arch-commits] Commit in lighttpd/trunk (9 files)

Pierre Schmitz pierre at archlinux.org
Fri Jul 11 00:56:08 UTC 2008


    Date: Thursday, July 10, 2008 @ 20:56:08
  Author: pierre
Revision: 4851

upgpkg: lighttpd 1.4.19-2
    keep it simple

Modified:
  lighttpd/trunk/PKGBUILD
  lighttpd/trunk/lighttpd.install
  lighttpd/trunk/lighttpd.logrotate.d
  lighttpd/trunk/lighttpd.rc.d
Deleted:
  lighttpd/trunk/index.html
  lighttpd/trunk/lighttpd.conf.d
  lighttpd/trunk/spawn-php.conf.d
  lighttpd/trunk/spawn-php.rc.d
  lighttpd/trunk/tweakconf.vim

----------------------+
 PKGBUILD             |   99 ++++++++++++++++++++++++++-----------------------
 index.html           |   15 -------
 lighttpd.conf.d      |   10 ----
 lighttpd.install     |   83 ++++++-----------------------------------
 lighttpd.logrotate.d |    9 +---
 lighttpd.rc.d        |   22 ++++------
 spawn-php.conf.d     |   33 ----------------
 spawn-php.rc.d       |   70 ----------------------------------
 tweakconf.vim        |   30 --------------
 9 files changed, 79 insertions(+), 292 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-07-11 00:35:38 UTC (rev 4850)
+++ PKGBUILD	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,57 +1,64 @@
 # $Id$
-# Maintainer: tobias <tobias at archlinux.org>
-# Modifications: eliott <eliott at cactuswax.net>
-# Originally by klapmuetz
+# Maintainer: Pierre Schmitz <pierre at archlinux.de>
 
 pkgname=lighttpd
 pkgver=1.4.19
-pkgrel=1
-pkgdesc="lighttpd is a secure, fast, compliant and very flexible web-server"
+pkgrel=2
+pkgdesc='a secure, fast, compliant and very flexible web-server'
 license=('custom')
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 url="http://www.lighttpd.net/"
-depends=('pcre' 'openssl' 'zlib' 'bzip2' 'attr')
-makedepends=('fcgi' 'libmysqlclient' 'libldap' 'lua' 'gdbm' 'libmemcache' 'sqlite3' \
-             'libxml2' 'vim' 'pkgconfig')
-backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd' \
-        'etc/conf.d/lighttpd' 'etc/conf.d/spawn-php' \
-        'home/lighttpd/html/index.html')
-options=(!libtool emptydirs)
-install=$pkgname.install
-source=(http://www.lighttpd.net/download/$pkgname-$pkgver.tar.bz2 \
-        index.html $pkgname.rc.d $pkgname.conf.d $pkgname.logrotate.d \
-        spawn-php.rc.d spawn-php.conf.d tweakconf.vim)
-md5sums=('d787374e4e4aaa09d5cfa9ab9d23ad40' '85593eb67b928fec79b1efb3fa3cce84' \
-         '6d05e499e47425e99bf809c88bd4969d' '14565fa5d30c60941190ceb32b1b551f' \
-         'a8c31344b90328c5b751d965d79c5047' 'a7e25d699422e2cfe2e802414052a1dc' \
-         '1ba657b113b7e473fb301631a7e2e1a4' 'ce4ca9773d5698549f9d7216fa59c4ee')
+depends=('pcre' 'openssl' 'zlib' 'bzip2' 'attr' 'libldap' 'libmysqlclient' \
+         'lua' 'libxml2' 'e2fsprogs' 'sqlite3' 'gdbm')
+makedepends=('fcgi' 'libmemcache' 'pkgconfig')
+backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd')
+options=('!libtool' 'emptydirs')
+install='lighttpd.install'
+source=("http://www.lighttpd.net/download/lighttpd-${pkgver}.tar.bz2" \
+        'lighttpd.rc.d' 'lighttpd.logrotate.d')
+md5sums=('d787374e4e4aaa09d5cfa9ab9d23ad40'
+         '4e6483a1f13d9062aa294fb46b0e9971'
+         '857e174643fd7761a2f0d8431a679f6c')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  ./configure --prefix=/usr --libdir=/usr/lib/lighttpd \
-    --with-ldap --with-gdbm --with-lua --with-memcache \
-    --with-openssl=/usr/include/openssl \
-    --with-kerberos5 \
-    --with-mysql=/usr/bin/mysql_config \
-    --with-webdav-props --with-webdav-locks \
-    --with-attr --without-fam
-  make || return 1
-  make DESTDIR=$startdir/pkg install || return 1
+	cd $srcdir/$pkgname-$pkgver
+	./configure --prefix=/usr \
+		--libexecdir=/usr/lib/lighttpd/modules \
+		--sysconfdir=/etc/lighttpd \
+		--sharedstatedir=/usr/var \
+		--localstatedir=/var \
+		--libdir=/usr/lib/lighttpd \
+		--includedir=/usr/include/lighttpd \
+		--with-mysql \
+		--with-ldap \
+		--with-attr \
+		--with-openssl \
+		--with-kerberos5 \
+		--without-fam \
+		--with-webdav-props \
+		--with-webdav-locks \
+		--with-gdbm \
+		--with-memcache \
+		--with-lua || return 1
+	make || return 1
+	make DESTDIR=$pkgdir install || return 1
 
-   # install configuration scripts and daemons
-  install -Dm644 ../index.html $startdir/pkg/home/lighttpd/html/index.html
-  install -Dm755 ../lighttpd.rc.d $startdir/pkg/etc/rc.d/lighttpd
-  install -Dm644 ../lighttpd.conf.d $startdir/pkg/etc/conf.d/lighttpd
-  install -Dm644 ../lighttpd.logrotate.d $startdir/pkg/etc/logrotate.d/lighttpd
-  install -Dm755 ../spawn-php.rc.d $startdir/pkg/etc/rc.d/spawn-php
-  install -Dm644 ../spawn-php.conf.d $startdir/pkg/etc/conf.d/spawn-php
-  install -dm755 -g nobody -o nobody $startdir/pkg/var/run/lighttpd/
+	install -D -m755 ../lighttpd.rc.d $pkgdir/etc/rc.d/lighttpd
+	install -D -m644 ../lighttpd.logrotate.d $pkgdir/etc/logrotate.d/lighttpd
+	install -d -m755 -o http -g http $pkgdir/var/{run,log}/lighttpd/
 
-   # show some mercy on docfiles
-  mkdir -p $startdir/pkg/usr/share/lighttpd
-  install -m644 doc/*.txt $startdir/pkg/usr/share/lighttpd
+	install -D -m644 doc/lighttpd.conf $pkgdir/etc/lighttpd/lighttpd.conf
 
-  install -Dm644 doc/lighttpd.conf $startdir/pkg/etc/lighttpd/lighttpd.conf
-  ex $startdir/pkg/etc/lighttpd/lighttpd.conf < $startdir/src/tweakconf.vim
-  install -D -m 0644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
-}
+	# set sane defaults
+	sed -e 's|#                               "mod_userdir",|                                "mod_userdir",|' \
+	    -e 's|/srv/www/htdocs/|/srv/http/|' \
+	    -e 's|/srv/www/|/srv/http/|' \
+	    -e 's|#dir-listing.activate       = "enable"| dir-listing.activate       = "enable"|' \
+	    -e 's|#server.username            = "wwwrun"| server.username            = "http"|' \
+	    -e 's|#server.groupname           = "wwwrun"| server.groupname           = "http"|' \
+	    -e 's|#server.pid-file            = "/var/run/lighttpd.pid"| server.pid-file            = "/var/run/lighttpd/lighttpd.pid"|' \
+	    -e 's|/usr/local/bin/php-cgi|/usr/bin/php-cgi|' \
+	    -i ${pkgdir}/etc/lighttpd/lighttpd.conf || return 1
+
+	install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
+}
\ No newline at end of file

Deleted: index.html
===================================================================
--- index.html	2008-07-11 00:35:38 UTC (rev 4850)
+++ index.html	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,15 +0,0 @@
-<html>
-<head><title>lighttpd Test Page</title></head>
- 
-<body>
-  <div style="text-align:center; font: 12px sans-serif;">
-    <span style="font-weight: bold; font-size: 20px;">
-      Arch Linux
-    </span>
-    <br><br>
-    This is a test page for the lighttpd Web Server.<br>
-  </div>
-</body>
- 
-</html>
-

Deleted: lighttpd.conf.d
===================================================================
--- lighttpd.conf.d	2008-07-11 00:35:38 UTC (rev 4850)
+++ lighttpd.conf.d	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,10 +0,0 @@
-DAEMON_NAME="lighttpd"
-DAEMON_CONF="/etc/lighttpd/lighttpd.conf"
-DAEMON_PATH="/usr/sbin/lighttpd"
- # this greps the error-log which is set in the lighttpd.conf
- # override it by setting it to a fix path
-DAEMON_ERRLOG=`sed -n \
-                -e '/server\.errorlog/p' ${DAEMON_CONF} \
-                | sed -e '/^ *#.*/d' \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-# DAEMON_ERRLOG="/var/log/lighttpd/error.log"

Modified: lighttpd.install
===================================================================
--- lighttpd.install	2008-07-11 00:35:38 UTC (rev 4850)
+++ lighttpd.install	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,73 +1,16 @@
-post_install() {
-  # set post_install message
-  /bin/cat << EOM
+post_upgrade() {
+	if [ $(vercmp '1.4.19-1' $2) -ge 0 ]; then
+	echo '
+	==> New default DocumentRoot
 
- --> This release marks a minor (NOT micro!) version change and is not 100%
- --> compatible with former versions. Have a look at the new lighttpd.conf,
- --> there are some changes in the index files syntax and nested conditions
- --> are possible by now. Also please read the documentation in
- --> /usr/share/lighttpd or on lighttpds's hompage:   http://lighttpd.net
+	Apache lighttpd uses /srv/http as default DocumentRoot.
+	You can still use your current DocumentRoot
 
- --> for the following OPTIONAL modules (when choosen from lighttpd.conf)
- --> you will need the following dependencies:
-          mod_webdav :         libxml2, sqlite3, e2fsprogs
-          mod_cml:             libmemcache, lua
-          mod_magnet:          lua
-          mod_trigger_b4_dl:   libmemcache, gdbm
-          mod_auth.so:         libldap
-          mod_mysql_vhost:     libmysqlclient
+	==> New default user and group
 
-EOM
-
-   # import daemon configuration file to detect lighttpd.conf location
-  [ -f /etc/conf.d/lighttpd ] && . /etc/conf.d/lighttpd
-   # some automagic dealing with the users preferences as marked in
-   # /etc/lighttpd/lighttpd.conf
-   # a simple conf-file parser to isolate the user, logfiles etc.
-  FILES=`sed -n -e '/accesslog\.filename/p;/server\.errorlog/p' \
-          ${DAEMON_CONF} \
-          | sed -e 's/^.*"\(.*\)".*$/\1/'`
-  DAEMON_USER=`sed -n -e '/server\.username/p' ${DAEMON_CONF} \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-  DAEMON_GROUP=`sed -n -e '/server\.groupname/p' ${DAEMON_CONF} \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-  DIRECTORIES=`sed -n -e '/\.cache-dir/p;/\.server-root/p' ${DAEMON_CONF} \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-  DOCROOTDIRS=`sed -n -e '/server.\document-root/p' ${DAEMON_CONF} \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-  CHROOT=`sed -n -e '/server\.chroot/p' ${DAEMON_CONF} \
-                | sed -e '/^ *#.*$/d' \
-                | sed -e 's/^.*"\(.*\)".*$/\1/'`
-
-  touch /tmp/empty
-  # make sure logfiles exist
-  for FILE in $FILES; do
-    [ ! -f ${CHROOT}${FILE}  ] && \
-      install -Dm644 -o $DAEMON_USER -g $DAEMON_GROUP /tmp/empty ${CHROOT}${FILE} && \
-      echo 'Creating file ' ${CHROOT}${FILE}
-  done
-  # make sure the lighttpd.user owns the cache dirs and vhost-root ...
-  for DIR in $DIRECTORIES; do
-    [ ! -d ${CHROOT}${DIR} ] && \
-      install -dm755 -o $DAEMON_USER -g $DAEMON_GROUP ${CHROOT}${DIR} && \
-      echo "Creating directory ${CHROOT}${DIR}" && \
-      chown $DAEMON_USER:$DAEMON_GROUP ${CHROOT}${DIR}
-  done
-  # ... and the document roots
-  for DIR in $DOCROOTDIRS; do
-    [ ! -d ${CHROOT}${DIR} ] && \
-      install -dm755 -o $DAEMON_USER -g $DAEMON_GROUP ${CHROOT}${DIR} && \
-      echo "Creating directory ${CHROOT}${DIR}"
-      chown -R $DAEMON_USER:$DAEMON_GROUP ${CHROOT}${DIR}
-  done
-  rm -f /tmp/empty
-}
-
-post_upgrade() {
-  post_install $1
-}
-
-op=$1
-shift
-$op $*
-# vim: ft=sh ts=2
+	Instead of "nobody" lighttpd runs as user/group "http" by default now. You might
+	want to adjust your lighttpd.conf according to this change. But you can still
+	run lighttpd as nobody.
+	'
+	fi
+}
\ No newline at end of file

Modified: lighttpd.logrotate.d
===================================================================
--- lighttpd.logrotate.d	2008-07-11 00:35:38 UTC (rev 4850)
+++ lighttpd.logrotate.d	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,8 +1,5 @@
 /var/log/lighttpd/*log {
-  create 644 nobody nobody
-  compress
-  postrotate
-    /bin/kill -HUP `cat /var/run/lighttpd.pid 2>/dev/null` 2> /dev/null || true
-  endscript
+   postrotate
+      /bin/kill -HUP `cat /var/run/lighttpd/lighttpd.pid 2>/dev/null` 2> /dev/null || true
+   endscript
 }
-

Modified: lighttpd.rc.d
===================================================================
--- lighttpd.rc.d	2008-07-11 00:35:38 UTC (rev 4850)
+++ lighttpd.rc.d	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,39 +1,37 @@
 #!/bin/bash
 
-# source application-specific settings
-[ -f /etc/conf.d/lighttpd ] && . /etc/conf.d/lighttpd
-
+# general config
 . /etc/rc.conf
 . /etc/rc.d/functions
 
-PID=`pidof -o %PPID ${DAEMON_NAME}`
+PID=`pidof -o %PPID /usr/sbin/lighttpd`
+
 case "$1" in
   start)
-    stat_busy "Starting ${DAEMON_NAME}"
-    [ -z "$PID" ] && ${DAEMON_PATH} -f ${DAEMON_CONF} >> $DAEMON_ERRLOG 2>&1
+    stat_busy "Starting lighttpd Daemon"
+    [ -z "$PID" ] && /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf >> /var/log/lighttpd/error.log 2>&1
     if [ $? -gt 0 ]; then
       stat_fail
     else
-      add_daemon ${DAEMON_NAME}
+      add_daemon lighttpd
       stat_done
     fi
     ;;
   stop)
-    stat_busy "Stopping ${DAEMON_NAME}"
+    stat_busy "Stopping lighttpd Daemon"
     [ ! -z "$PID" ] && kill $PID &>/dev/null
     if [ $? -gt 0 ]; then
       stat_fail
     else
-      rm_daemon ${DAEMON_NAME}
+      rm_daemon lighttpd
+      rm -f /var/run/lighttpd/lighttpd.pid
       stat_done
     fi
     ;;
   restart)
     $0 stop
-    sleep 1
     $0 start
     ;;
   *)
     echo "usage: $0 {start|stop|restart}"
-esac
-exit 0 
+esac
\ No newline at end of file

Deleted: spawn-php.conf.d
===================================================================
--- spawn-php.conf.d	2008-07-11 00:35:38 UTC (rev 4850)
+++ spawn-php.conf.d	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,33 +0,0 @@
-## ABSOLUTE path to the spawn-fcgi binary
-SPAWNFCGI="/usr/bin/spawn-fcgi"
-
-## ABSOLUTE path to the PHP binary
-FCGIPROGRAM="/usr/bin/php-cgi"
-
-## In preparation of a possible python/perl/etc compliance
-SPAWN_DAEMON_NAME="spawn-php"
-
-## bind to tcp-port on localhost
-FCGIPORT="1066"
-
-## If uncommented, socket will be used instead of port
-#FCGISOCKET="/tmp/php-fastcgi.socket"
-
-## number of PHP childs to spawn
-PHP_FCGI_CHILDREN=6
-
-## number of request server by a single php-process until is will be restarted
-PHP_FCGI_MAX_REQUESTS=1000
-
-## IP adresses where PHP should access server connections from
-FCGI_WEB_SERVER_ADDRS="127.0.0.1"
-
-# allowed environment variables sperated by spaces
-ALLOWED_ENV="ORACLE_HOME PATH USER"
-
-## if the daemon script is run as root switch to the following user
-USERID=nobody
-GROUPID=nobody
-
-## cage the php process to the following dir (chrootdir)
-#CHROOTDIR="/home/lighttpd/html"

Deleted: spawn-php.rc.d
===================================================================
--- spawn-php.rc.d	2008-07-11 00:35:38 UTC (rev 4850)
+++ spawn-php.rc.d	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,70 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-[ -f /etc/conf.d/spawn-php ] && . /etc/conf.d/spawn-php
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-
-PID=`pidof -o %PPID ${FCGIPROGRAM}`
-case "$1" in
-  start)
-    stat_busy "Starting ${SPAWN_DAEMON_NAME}"
-    if [ -z "$PID" ]; then
-      ################## no config below this line
-      if test x$PHP_FCGI_CHILDREN = x; then
-        PHP_FCGI_CHILDREN=5
-      fi
-      export PHP_FCGI_MAX_REQUESTS
-      export FCGI_WEB_SERVER_ADDRS
-      
-      ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
-
-      # negotiate the parameters for the php-cgi spawn program
-      EX="$SPAWNFCGI -f $FCGIPROGRAM -C $PHP_FCGI_CHILDREN"
-      if [ -z "$FCGISOCKET" ]; then
-        EX="$EX -p $FCGIPORT"
-      else
-        EX="$EX -s $FCGISOCKET"
-      fi
-      if test x$UID = x0; then
-        EX="$EX -u $USERID -g $GROUPID"
-      fi
-      if [ ! -z "$CHROOTDIR" ]; then
-        EX="$EX -c $CHROOTDIR"
-      fi
-
-      # copy the allowed environment variables
-      E=
-      for i in $ALLOWED_ENV; do
-        E="$E $i=${!i}"
-      done
-      # clean environment and set up a new one
-      env - $E $EX > /dev/null
-      add_daemon ${SPAWN_DAEMON_NAME}
-      stat_done
-    fi
-    ;;
-   stop)
-     stat_busy "Stopping ${SPAWN_DAEMON_NAME}"
-     if [ ! -z "$PID" ]; then
-       killall ${FCGIPROGRAM}
-       if [ ! -z "$FCGISOCKET" ]; then
-         rm -f ${FCGISOCKET}
-       fi
-       rm_daemon ${SPAWN_DAEMON_NAME}
-       stat_done
-     fi
-     ;;
-   restart)
-     $0 stop
-     sleep 2
-     $0 start
-     ;;
-   *)
-     echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
-  

Deleted: tweakconf.vim
===================================================================
--- tweakconf.vim	2008-07-11 00:35:38 UTC (rev 4850)
+++ tweakconf.vim	2008-07-11 00:56:08 UTC (rev 4851)
@@ -1,30 +0,0 @@
-%s:/srv/www/htdocs/:/home/lighttpd/html/:
-%s:/srv/www/vhosts/:/home/lighttpd/vhosts/:
-%s:#server\.pid\-file:server.pid-file:
-%s:/var/cache/lighttpd/compress/:/home/lighttpd/cache/:
-%s:^#server\.username.*$:server.username            = "nobody":
-%s:^#server\.groupname.*$:server.groupname            = "nobody":
-%s:/usr/local/bin/php-cgi:/usr/bin/php-cgi:
-%s:\(vhost\.server-root.*=\).*$:\1 "/home/lighttpd/vhosts/":
-/SSL engine/,/pem/d
-i
-#### SSL engine
-#$SERVER["socket"] == "0.0.0.0:443" {
-#  ssl.engine                  = "enable"
-#  ssl.pemfile                 = "/home/lighttpd/ssl/server.pem"
-#  server.errorlog             = "/var/log/lighttpd/error-ssl.log"
-#  accesslog.filename          = "/var/log/lighttpd/access-ssl.log"
-#  server.document-root        = "/home/lighttpd/html-ssl"
-#}
-.
-1
-/server.username/,/server.groupname/d
-i
-##  !!!! IF YOU CHANGE THE UID OR GROUPID apply the changes to /etc/logrotate.conf as well !!!
-server.username             = "nobody"
-
-## change uid to <uid> (default: don't care)
-server.groupname            = "nobody"
-.
-w
-q





More information about the arch-commits mailing list