Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2013 16:01:06 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: What is policy about auto-editing config files on port install / deinstall?
Message-ID:  <CACdU%2Bf9WKAsLZHqHMZKtgGoBRL%2BR9do0qfTL0d_c_8_e6Tb4bw@mail.gmail.com>
In-Reply-To: <50E49A73.2070008@quip.cz>
References:  <50E49A73.2070008@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 2, 2013 at 2:37 PM, Miroslav Lachman <000.fbsd@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
service.

> 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?

-- 
DISCLAIMER:

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf9WKAsLZHqHMZKtgGoBRL%2BR9do0qfTL0d_c_8_e6Tb4bw>