What is policy about auto-editing config files on port install / deinstall?

Scot Hetzel swhetzel at gmail.com
Wed Jan 2 22:01:13 UTC 2013

On Wed, Jan 2, 2013 at 2:37 PM, Miroslav Lachman <000.fbsd at quip.cz> wrote:
> Is somewhere written policy or portmgr recommendation about ports behavior
> on install / deinstall?
> I am talking about some ports doing "nasty" things.
> Some ports are stopping services on deinstall, some not.

I prefer that when a port is uninstalled, that the service is stopped.
If it isn't stopped, it could pose a security risk to the system at a
later time.

We still need to come up with a way of restarting the service after
the upgrade.  Currently, it has to be done manually to start the

> Some ports are editing "my config files" on deinstall, so even on upgrade
> procedure I must check if port did some changes before I can restart target
> daemon.
Most ports don't edit the config files as they install the original
config file to a different name.

> For example some Apache modules (mod_bw, mod_xsendfile...) are commenting
> out load_module lines in httpd.conf so I got syntax error on Apache restart
> after upgrade of mentioned module and Apache failed to start.
Apache 2.x is an exception, as the installation of a Apache module
requires apachectl to add/re-enable the module in the httpd.conf file.
 Upon deinstallation, apachectl is used to disable the module in the
httpd.conf file.  It doesn't remove the LoadModule directive, it just
adds a '#" sign in front of it.  When the port is re-installed, all
apachectl has to do is remove the '#' sign.  A restart of Apache
should then load the module again.

What errors are you getting when re-installing an Apache module?


No electrons were maimed while sending this message. Only slightly bruised.

More information about the freebsd-ports mailing list