From owner-freebsd-apache@FreeBSD.ORG Fri Aug 27 09:20:26 2004 Return-Path: Delivered-To: freebsd-apache@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 981AA16A4CE for ; Fri, 27 Aug 2004 09:20:26 +0000 (GMT) Received: from atlas.informatik.rwth-aachen.de (atlas.informatik.RWTH-Aachen.DE [137.226.194.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A899443D5A for ; Fri, 27 Aug 2004 09:20:25 +0000 (GMT) (envelope-from stolz@i2.informatik.rwth-aachen.de) Received: from i2.informatik.rwth-aachen.de (menelaos.informatik.RWTH-Aachen.DE [137.226.194.73]) with ESMTP id i7R9K8kL017380; Fri, 27 Aug 2004 11:20:08 +0200 Received: (from stolz@localhost)i7R9K6kb068316; Fri, 27 Aug 2004 11:20:06 +0200 (CEST) (envelope-from stolz) Date: Fri, 27 Aug 2004 11:20:06 +0200 From: Volker Stolz To: Clement Laforet Message-ID: <20040827092006.GD62195@i2.informatik.rwth-aachen.de> References: <20040826110042.GJ90982@i2.informatik.rwth-aachen.de> <20040826142310.6c2f0276.sheepkiller@cultdeadsheep.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MfFXiAuoTsnnDAfZ" Content-Disposition: inline In-Reply-To: <20040826142310.6c2f0276.sheepkiller@cultdeadsheep.org> X-PGP-Key: finger vs@foldr.org X-PGP-Id: 0x3FD1B6B5 User-Agent: Mutt/1.5.6i cc: apache@freebsd.org Subject: Re: Improvements to mod_dav [patch] X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2004 09:20:26 -0000 --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Am 26. Aug 2004 um 14:23 CEST schrieb Clement Laforet: > > - Remove pkg-plist in favour of PLIST_FILES (oh, yeah, great ;) > > - Automatically follow instructions in apache.conf.mod_dav to setup > > the two files req'd for locking to work. > > fine for me. But please use ${WWWOWN} and ${WWWGRP} instead of USER=www. Okay, changed. I just noticed two more things: Installing from the port behaves differently from the package since apxs isn't called. I revamped the *-install-logic so that it does exactly the same in all cases. Also, I moved the displayed advice from post-install to pkg-message where everybody can see it and pointed out the already created lock db. (Like in the previous version, the module is activated immediately) Sorry for having to bother you again. Cheers, Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME L-Attriwutgrammatik --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mod_dav.diff" Index: Makefile =================================================================== RCS file: /usr/freebsdcvs/cvs-ports/ports/www/mod_dav/Makefile,v retrieving revision 1.14 diff -u -r1.14 Makefile --- Makefile 18 Aug 2004 16:21:49 -0000 1.14 +++ Makefile 27 Aug 2004 09:06:46 -0000 @@ -18,6 +18,10 @@ # This port will work with the following version of Apache and anything newer. APACHE_VERSION= 1.3.6 +PKGDEINSTALL= ${PKGINSTALL} +PKGMESSAGE= ${WRKSRC}/pkg-message +PLIST_FILES= etc/apache/apache.conf.mod_dav libexec/apache/libdav.so + USE_APACHE= yes HAS_CONFIGURE= yes CONFIGURE_ARGS= --prefix=${PREFIX} \ @@ -43,16 +47,17 @@ @/bin/sleep 5 .endif -post-install: +do-install: + ${INSTALL_DATA} ${WRKSRC}/libdav.so ${PREFIX}/libexec/apache ${INSTALL_DATA} ${FILESDIR}/apache.conf.mod_dav ${PREFIX}/etc/apache - @${ECHO_MSG} "*******************************************************" - @${ECHO_MSG} "* Please review the mod_dav configuration in the main" - @${ECHO_MSG} "* Apache configuration file." - @${ECHO_MSG} "* ${PREFIX}/etc/apache/httpd.conf" - @${ECHO_MSG} "*" - @${ECHO_MSG} "* Look at the file ${PREFIX}/etc/apache/apache.conf.mod_dav" - @${ECHO_MSG} "* for indications on what to do." - @${ECHO_MSG} "*" - @${ECHO_MSG} "*******************************************************" + +post-install: +.if !defined(PACKAGE_BUILDING) + @${SETENV} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif + @${SED} -e 's+%%PREFIX%%+${PREFIX}+' ${FILESDIR}/pkg-message.in \ + > ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-install 27 Aug 2004 09:00:51 -0000 @@ -0,0 +1,23 @@ +#!/bin/sh + +CHMOD=/bin/chmod +CHOWN=/usr/sbin/chown +TOUCH=/usr/bin/touch + +case $2 in +POST-INSTALL) + ${PKG_PREFIX}/sbin/apxs -e -a -n dav libdav.so + for i in DAVLock.dir DAVLock.pag ; do + ${TOUCH} /var/db/$i + ${CHOWN} ${WWWOWN}:${WWWGRP} /var/db/$i + ${CHMOD} 640 /var/db/$i + done + ;; +POST-DEINSTALL) + ${PKG_PREFIX}/sbin/apxs -e -A -n dav libdav.so + for i in DAVLock.dir DAVLock.pag ; do + rm -f /var/db/$i + done + ;; +esac +exit 0 Index: pkg-plist =================================================================== RCS file: pkg-plist diff -N pkg-plist --- pkg-plist 26 Nov 1999 19:32:19 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,2 +0,0 @@ -etc/apache/apache.conf.mod_dav -libexec/apache/libdav.so Index: files/pkg-message.in =================================================================== RCS file: files/pkg-message.in diff -N files/pkg-message.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/pkg-message.in 27 Aug 2004 09:07:16 -0000 @@ -0,0 +1,10 @@ +******************************************************* +* Please review the mod_dav configuration in the main +* Apache configuration file: +* %%PREFIX%%/etc/apache/httpd.conf +* +* Look at the file %%PREFIX%%/etc/apache/apache.conf.mod_dav +* for indications on what to do. The default lock database +* has already been created in /var/db/DAVLock.{dir,pag}. +* +******************************************************* --MfFXiAuoTsnnDAfZ--