Bug 57287 - New ebuild: net-misc/openntpd
Bug#: 57287 Product:  Gentoo Linux Version: 2004.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: vapier@gentoo.org Reported By: fbusse@gmx.de
Component: Ebuilds
URL:  http://www.openntpd.org/
Summary: New ebuild: net-misc/openntpd
Keywords:  
Status Whiteboard: 
Opened: 2004-07-16 06:07 0000
Description:   Opened: 2004-07-16 06:07 0000
openntpd is a lightweight and secure (S)NTP server from OpenBSD.
It provides the ability to sync the local clock to remote NTP servers and can act as NTP server itself, redistributing the local clock.
It doesn't support all the features NTP does (like SSL), but most people probably don't need those anyway and prefer a smaller and faster daemon. OpenNTPd support binding to a specified interface as well, something NTP doesn't support yet. IPv6 works as well.

------- Comment #1 From fbusse@gmx.de 2004-07-16 06:08:34 0000 -------
Created an attachment (id=35556) [details]
openntpd-20040714p.ebuild

------- Comment #2 From fbusse@gmx.de 2004-07-16 06:09:19 0000 -------
Created an attachment (id=35557) [details]
user.patch

Changes the user from _ntp (OpenBSD-style) to ntp.

------- Comment #3 From fbusse@gmx.de 2004-07-16 06:09:54 0000 -------
Created an attachment (id=35558) [details]
openntpd.rc

A simple startup-script.

------- Comment #4 From fbusse@gmx.de 2004-07-16 09:40:12 0000 -------
Created an attachment (id=35576) [details]
user.patch

Sorry, wrong username (nobody instead of ntp), corrected.

------- Comment #5 From Jon Radon 2004-07-17 11:57:21 0000 -------
Hmm.. the ebuild doesn't seem to be adding the ntp account.  Going through the
install I see where emerge says it's adding the group and user, but there are
no entries in my passwd or group for them.

------- Comment #6 From fbusse@gmx.de 2004-07-17 12:54:03 0000 -------
Works for me, after 'emerge openntpd':

$ cat /etc/passwd|grep ntp
ntp:x:123:123:added by portage for openntpd:/var/empty:/bin/false

After unmerge, the user gets deleted correctly also:
$ cat /etc/passwd|grep ntp
$

Are you sure, you have a current version of portage installed?

------- Comment #7 From Jon Radon 2004-07-17 14:53:56 0000 -------
I should be all up to date.  I have portage-2.0.50-r9.  I think I figured out
the problem.  When you re-emerge the ebuild the pkg_postrm() is run and removes
the accounts that were just added in the reemerge/upgrade.

Is there any way to tell portage not to run that if we're re-emerging or
upgrading?

------- Comment #8 From Jon Radon 2004-07-17 15:03:35 0000 -------
Created an attachment (id=35653) [details]
ebuild for latest openntpd

I also took out the part that deleted accounts.  Not sure of the right way to
go about that.

------- Comment #9 From fbusse@gmx.de 2004-07-17 23:05:11 0000 -------
OK, I think we can live without the pkg_postrm, since the user won't do any
harm if it stays on the system even after openntpd has been removed.

------- Comment #10 From stan 2004-07-18 15:14:22 0000 -------
the add user stuff seems to normally be in pkg_preinst() (e.g. /usr/portage/net-misc/ntp/ntp-4.2.0-r2.ebuild)

it might also be worth adding a pkg_postinst() with something like
einfo "If you just switched from xntpd (net-misc/ntp) the ntp user's"
einfo "home directory needs to be changed (usermod -d /var/empty ntp)"
einfo "for openntpd to start"

------- Comment #11 From Jon Radon 2004-07-18 20:10:40 0000 -------
Created an attachment (id=35722) [details]
openntpd-20040718p.ebuild

Added the info for people switching from vanilla ntpd...

The asterisk docs make a loose reference to adding a user in pkg_setup(). 
Also, if they decide to allow the user and group to be changed through
configure the user will be added before the script is run.

------- Comment #12 From SpanKY 2004-07-20 16:44:31 0000 -------
now in portage, thanks