Created attachment 150327 [details] Log showing the problem When portupgrade installs a new version of this port, the "LoadModule perl_module" in /usr/local/etc/apache*/httpd.conf is unconditionally replaced with a commented-out version. This can causes subsequent reloads/restarts of Apache to fail due to other Perl directives in the Apache configuration file, or (worse) to reload/restart without warning but produce a broken server due to the lack of mod_perl. This is particularly tricky because "/usr/local/etc/rc.d/apache22 configtest" will NOT detect the second of these conditions. There is some partial handling of this issue in mod_perl2's pkg_plist, which removes the LoadModule directive but then says "Don't forget to remove all mod_perl2-related directives in your httpd.conf". It would be better to leave httpd.conf alone and just tell the user to remove the LoadModule and other mod_perl2 directives manually. Hopefully the TestConfig* pieces of the package (upstream) that modify httpd.conf to insert the LoadModule line will leave httpd.conf alone if the line is already present. If not, we may need patches for that as well.
Auto-assigned to maintainer apache@FreeBSD.org
> This can causes subsequent reloads/restarts of Apache to fail I would add that can is too gentle. It *does* break Apache when a mod_perl app tries to load.
(In reply to matt from comment #2) I thought I posted a PR about this a while ago as well, but apparently not? This definitely breaks www/rt42 and was a major source of upgrade pain. Every time packages were updated we had to be careful if mod_perl2 was touched so we could fix httpd.conf before restarting services. Very annoying.
This bug report has been sitting here for 2.5 months without updates from the port maintainer(s). "make maintainer" in the port directory just returns the same "apache@FreeBSD.org" alias address that this port was already assigned to. Does anyone have any ideas about how to obtain some forward motion on this bug?
(In reply to terry from comment #4) > This bug report has been sitting here for 2.5 months without updates from > the port maintainer(s). "make maintainer" in the port directory just returns > the same "apache@FreeBSD.org" alias address that this port was already > assigned to. > > Does anyone have any ideas about how to obtain some forward motion on this > bug? The only "sure fire" way I can imagine, that would provide your desired (required?) outcome. Would be to adopt the port, and make it install in the fashion you find most suitable. If you do decide to adopt it, you might do well to post an RFC on apache@, ports@, and port-bugs@. To indicate your intentions, and solicit feedback. Just a thought. --Chris
There is already a way. # cd etc/apache2x # grep mod_perl httpd.conf | tr -d '#' >> modules.d/999_mymodules.conf In modules.d there is a README_modules.d (do not place your config in the README file as it will be overwritten each time by an upgrade)
mod_perl installs now a module load file.