AP_GENPLIST vs pkg upgrade

olli hauer ohauer at gmx.de
Sun Nov 10 14:29:58 UTC 2013


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


More information about the freebsd-apache mailing list