Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2013 15:30:04 +0100
From:      olli hauer <ohauer@gmx.de>
To:        apache@FreeBSD.org
Cc:        Andriy Gapon <avg@FreeBSD.org>
Subject:   Re: AP_GENPLIST vs pkg upgrade
Message-ID:  <527F986C.6030806@gmx.de>
In-Reply-To: <526F7C39.10308@FreeBSD.org>
References:  <526F7C39.10308@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?527F986C.6030806>