Subject: Re: Packages touching /etc/services
To: None <tech-pkg@NetBSD.org>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-pkg
Date: 06/20/2006 12:29:02
In article <20060620015656.GA20286@NetBSD.org> Johnny wrote:
: In this case where packages directly edit /etc/services, there are two
: options:

:    (1) Remove the added entries on package deletion, similar to what is
:        currently done with /etc/shells.

:    (2) Inform the user in a MESSAGE file that the appropriate entries
:        should be added to the /etc/services database, e.g.
:        mail/cyrus-imapd and sysutils/cfengine2.

: If we decide to do option (1), then we should add it as an action to
: the pkginstall framework so that we have one implementation of this
: and we don't have to rely on each package to come up with its own way
: to do it.  Doing option (2) is quite easy and is what many packages
: in pkgsrc already do.

: Personally, I like option (1) because it means more "grunt work" is
: handled automatically for the admin, and the pkginstall action would
: output something to indicate that services were being added to
: /etc/services, e.g.

:     ===================================================================
:     Adding services for skkserv-3.9.4nb4 to /etc/services:

:             skkserv     1178/tcp
:     ===================================================================

: and the following line would be automatically added to (and upon
: deinstallation, removed from) /etc/services:

:     skkserv     1178/tcp        # skkserv-3.9.4nb4

  I prefer option (1), too.

  However, we should handle if the service is already defined in
/etc/services:

  - if it is defined with a different port, error out.
  - if has been added by another package, only remove it when both
    packages are deleted.
  - if it is already present -- not added by a package -- don't remove
    it.

  The last two cases are similar to how we handle creating directories
outside LOCALBASE.

					yours,
					dillo