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

Fabian Keil freebsd-listen at fabiankeil.de
Thu Jan 3 12:14:10 UTC 2013

Scot Hetzel <swhetzel at gmail.com> wrote:

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

My impression is that every maintainer has her own undocumented
policy although the approaches taken could be grouped into a few

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

As long as it is optional and doesn't happen automatically
I could live with that.

At least to me "uninstalling a port" (with pkg or pkg_delete) means
removing the files it installed and does not necessary imply
"also kill whatever process is related to these files".

> If it isn't stopped, it could pose a security risk to the system at a
> later time.

Stopping a service can pose a security risk as well,
so I don't think that's a good argument as it depends
on the port.

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

In my opinion ports shouldn't mess with user-modified files unless
they properly parse them and can be expected not to break them.

And even then I don't think it should be done automatically without
user interaction.

I believe that's currently up to the maintainer as well, though.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130103/28896249/attachment.sig>

More information about the freebsd-ports mailing list