Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57287 - New ebuild: net-misc/openntpd
Summary: New ebuild: net-misc/openntpd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: SpanKY
URL: http://www.openntpd.org/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-16 06:07 UTC by fbusse
Modified: 2004-07-20 16:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
openntpd-20040714p.ebuild (openntpd-20040714p.ebuild,836 bytes, text/plain)
2004-07-16 06:08 UTC, fbusse
Details
user.patch (user.patch,267 bytes, text/x-diff)
2004-07-16 06:09 UTC, fbusse
Details
openntpd.rc (openntpd.rc,569 bytes, text/plain)
2004-07-16 06:09 UTC, fbusse
Details
user.patch (user.patch,264 bytes, patch)
2004-07-16 09:40 UTC, fbusse
Details | Diff
openntpd-20040716p.ebuild (openntpd-20040716p.ebuild,770 bytes, text/plain)
2004-07-17 15:03 UTC, Jon Radon
Details
openntpd-20040718p.ebuild (openntpd-20040718p.ebuild,964 bytes, text/plain)
2004-07-18 20:10 UTC, Jon Radon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fbusse 2004-07-16 06:07:44 UTC
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 fbusse 2004-07-16 06:08:34 UTC
Created attachment 35556 [details]
openntpd-20040714p.ebuild
Comment 2 fbusse 2004-07-16 06:09:19 UTC
Created attachment 35557 [details]
user.patch

Changes the user from _ntp (OpenBSD-style) to ntp.
Comment 3 fbusse 2004-07-16 06:09:54 UTC
Created attachment 35558 [details]
openntpd.rc

A simple startup-script.
Comment 4 fbusse 2004-07-16 09:40:12 UTC
Created attachment 35576 [details, diff]
user.patch

Sorry, wrong username (nobody instead of ntp), corrected.
Comment 5 Jon Radon 2004-07-17 11:57:21 UTC
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 fbusse 2004-07-17 12:54:03 UTC
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 Jon Radon 2004-07-17 14:53:56 UTC
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 Jon Radon 2004-07-17 15:03:35 UTC
Created attachment 35653 [details]
openntpd-20040716p.ebuild

I also took out the part that deleted accounts.  Not sure of the right way to
go about that.
Comment 9 fbusse 2004-07-17 23:05:11 UTC
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 stan 2004-07-18 15:14:22 UTC
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 Jon Radon 2004-07-18 20:10:40 UTC
Created attachment 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 SpanKY gentoo-dev 2004-07-20 16:44:31 UTC
now in portage, thanks