From owner-freebsd-apache@FreeBSD.ORG Sun Nov 10 14:29:58 2013 Return-Path: Delivered-To: apache@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA9F51D6 for ; Sun, 10 Nov 2013 14:29:58 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A9DD2DCF for ; Sun, 10 Nov 2013 14:29:57 +0000 (UTC) Received: from [192.168.0.100] ([87.139.233.65]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MD9NE-1VP1t13jAq-00Ga1d for ; Sun, 10 Nov 2013 15:29:56 +0100 Message-ID: <527F986C.6030806@gmx.de> Date: Sun, 10 Nov 2013 15:30:04 +0100 From: olli hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: apache@FreeBSD.org Subject: Re: AP_GENPLIST vs pkg upgrade References: <526F7C39.10308@FreeBSD.org> In-Reply-To: <526F7C39.10308@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:DtYw4aMyfPwAIKE5fk8+kxBU8lJesQljiXLHyFFrk7N9amB4ko0 Kiff+k424+LUVlSvF6+OY9S+9pa+ohMmeepPC2T1as4jKG3jNj5rVquvS4i09ddi+YO1HTx 3EP2DvNscZ7UNN3z9vxsHQV4ncXa3bfONxhXjz6Yg2rP7FcDzp9PXv6AxBMCH03kmBKSX42 Eh4s1+MV4fwrwlEMDMmBA== Cc: Andriy Gapon X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2013 14:29:58 -0000 On 2013-10-29 10:13, Andriy Gapon wrote: > > AP_GENPLIST by default results in the following pkg-plist entries (an example): > @unexec /usr/bin/sed -i '' -E '/LoadModule[[:blank:]]+rpaf_module/d' > %D/etc/apache22/httpd.conf > @exec %D/sbin/apxs -e -A -n rpaf %D/%F > > This means that after pkg upgrade a module becomes commented out in httpd.conf. > > I am aware of AP_MODENABLE. But the official FreeBSD pkg packages are built > without this customization. > > I believe that the current default behavior is quite a nasty one. > > Not sure if at present there is any way to make it more user-friendly in the > case of pkgng packages. > > P.S. > Perhaps it would be easier to just leave httpd.conf alone and put all > responsibility for its management on an administrator. It seems that that some > module ports that do not use AP_GENPLIST do just that. > Most if the modules not using AP_GENPLIST can't be build with apxs and have a more complex build infrastructure. I agree registering third party modules in httpd.conf is not optimal and we need a better solution. What I can think about is creating something like ${APACHEDATADIR}/mods.d and ${APACHEETCDIR}/mods.d. Instead using apxs to register the module the module installs a template ${APACHEDATADIR}/mods.d/$module.conf and if no matching ${APACHEETCDIR}/mods.d/$module.conf is found the framework will copy the template to ${APACHEETCDIR}/mods.d (same way like the original apache configs) Sample $module.conf (subversion.conf) #LoadModule dav_svn_module libexec/apache22/mod_dav_svn.so #LoadModule authz_svn_module libexec/apache22/mod_authz_svn.so # # sample config instructions moved to here from pkg-message # ... This way we do not have $module.conf.sample files filling up the production ${APACHEETCDIR}/mods.d folders, the module is disabled per default (security) and a changed ${APACHEETCDIR}/mods.d/$module.conf will be not replaced / changed during the pkg upgrade. What do you and other apache users think about handing modules this way? -- olli