diff options
author | Thilo Bangert <bangert@gentoo.org> | 2009-10-14 08:04:19 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2009-10-14 08:04:19 +0000 |
commit | e1be477e9f8db5cb0a7e7c01796536b058438529 (patch) | |
tree | 0ba4a55b16a4c521c7284698a27b2ea79831a0da /net-misc/openntpd | |
parent | Version bump to 2.08. Bug #287217 (diff) | |
download | historical-e1be477e9f8db5cb0a7e7c01796536b058438529.tar.gz historical-e1be477e9f8db5cb0a7e7c01796536b058438529.tar.bz2 historical-e1be477e9f8db5cb0a7e7c01796536b058438529.zip |
eapi=2 - fix timezone info for chrooted process (bug #226491)
Package-Manager: portage-2.2_rc42/cvs/Linux i686
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r-- | net-misc/openntpd/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/openntpd/Manifest | 5 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r2 | 7 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd.rc-3.9_p1-r2 | 45 | ||||
-rw-r--r-- | net-misc/openntpd/openntpd-3.9_p1-r2.ebuild | 61 |
5 files changed, 126 insertions, 3 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog index d9369425517a..07bc94357a96 100644 --- a/net-misc/openntpd/ChangeLog +++ b/net-misc/openntpd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/openntpd -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.41 2008/10/10 09:40:10 bangert Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.42 2009/10/14 08:04:18 bangert Exp $ + +*openntpd-3.9_p1-r2 (14 Oct 2009) + + 14 Oct 2009; Thilo Bangert <bangert@gentoo.org> + +files/openntpd.conf.d-3.9_p1-r2, +files/openntpd.rc-3.9_p1-r2, + +openntpd-3.9_p1-r2.ebuild: + eapi=2 - fix timezone info for chrooted process (bug #226491) 10 Oct 2008; Thilo Bangert <bangert@gentoo.org> files/openntpd.rc: make sure ntpd stops - bug #240676 diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest index 8fd49b735833..8d146af1dc0c 100644 --- a/net-misc/openntpd/Manifest +++ b/net-misc/openntpd/Manifest @@ -1,7 +1,10 @@ AUX openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff 1279 RMD160 b5009b37267b053841b0d46a07ae2af994cd24ea SHA1 4fee3243fbb5abdaaf29c2359c1287882f7b49cb SHA256 97043f4a19468bc275326e6cd1b8aee8dfe6123746a8e857a5b1fa63f7f9a044 AUX openntpd.conf.d 181 RMD160 0cacb7e31ec0c04c99e9ba01dd82d0ec26b56b8f SHA1 dbf1ed92e8606bd95e579f77235f4d8b249a7081 SHA256 a1cb9dc8fbbaf6f439d6547bce9d59e86e7e13855b037d33bad1f789fb7050f3 +AUX openntpd.conf.d-3.9_p1-r2 195 RMD160 8bdab3610793b9b83951584634e465d19dcdda54 SHA1 54ba4a7c2d592181ce38590c49a49768d7c424fa SHA256 1980b5dadcd9478e653ef05c099ef45caacfdf12a73a3745b39322f75773a738 AUX openntpd.rc 971 RMD160 e021fa4ed389898954b213235daf3ca5473f198b SHA1 82406504a090d62d4f6596210e124ddf549acbbf SHA256 47edce27c30f8bf4b0320b47a44ac3f9b97c02c397c0ccc2238f2bd047101638 +AUX openntpd.rc-3.9_p1-r2 1087 RMD160 883cfbc844ec80d8b6fd24b1076921cb641ad66a SHA1 7a4767b5faa0958fa252ba00be12c4398396ae77 SHA256 05a8efa9bb158407514fbbd18cae33299c6a7dec20237526c27b8db977e032d6 DIST openntpd-3.9p1.tar.gz 152700 RMD160 c348004116c78810daa9451f15abcc26788949a8 SHA1 098a435d02886a9e4d34afb15b15fde795eda1e9 SHA256 83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49 EBUILD openntpd-3.9_p1-r1.ebuild 1325 RMD160 5eb7ac5fc7ed8b1ef96cffd5cde3ab907d4d5bda SHA1 64abd5d33dbb893442f42a851c45d90980d2bf2a SHA256 2a09bea3cd262a41d4e9b57bc65b0f17234d8fcd55d5de47cb9dfcc340325c76 -MISC ChangeLog 5440 RMD160 094c4a85c719ccd63f2e49f222ac18e1d7db75c1 SHA1 c55e73dc45198ba6ec26425499214c428248a729 SHA256 d0e273d0f2651b0288d814dc302ba2210317cb10fa3176daa1fc50662d2b44f0 +EBUILD openntpd-3.9_p1-r2.ebuild 1486 RMD160 507e25b5f8c0b7e0da7eeea9a5243a06a389f176 SHA1 f593419eac311e0fe882848e46cfef9040d877bf SHA256 27455abb6b949803d41cd709b15740b11b098a1caf5b38e11d810357362b785a +MISC ChangeLog 5686 RMD160 47c6079a8961c25f8d26b6b92367458690761e6b SHA1 606c88fe2f0d6dcae8c4c0e1c3f44160d554c712 SHA256 25a6f0a0ce84737e6bf1cb4eb1d6bb7a1a929156b82d761b17d90de3b7991fbe MISC metadata.xml 507 RMD160 31dde8e6744b8a825bd8a763c149663785e7a267 SHA1 9aa7883d59456d95af5032a6b85547b65b74a439 SHA256 b4a289de60d0e1cdf33f8cd2ea669a6b8f1668ed0bb3adbbb79f155bd88a0e5d diff --git a/net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r2 b/net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r2 new file mode 100644 index 000000000000..f07752752022 --- /dev/null +++ b/net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r2 @@ -0,0 +1,7 @@ +# /etc/conf.d/ntpd: config file for openntpd's ntpd + +NTPD_HOME=/var/lib/openntpd/chroot + +# See ntpd(8) man page ... some popular options: +# -s Set the time immediately at startup +NTPD_OPTS="" diff --git a/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2 b/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2 new file mode 100644 index 000000000000..455e4e21cfd2 --- /dev/null +++ b/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2 @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2,v 1.1 2009/10/14 08:04:19 bangert Exp $ + +depend() { + need net + after ntp-client + use dns logger +} + +checkconfig() { + if [ ! -f /etc/ntpd.conf ] ; then + eerror "Could not find /etc/ntpd.conf!" + return 1 + fi + + if [ -x /usr/bin/getent ] ; then + if [ "`getent passwd ntp | cut -d: -f 6`" != "${NTPD_HOME}" ] ; then + eerror "Home directory of ntp needs to be ${NTPD_HOME}" + eerror "Please run 'usermod -d ${NTPD_HOME} ntp'" + return 1 + fi + fi + + return 0 +} + +start() { + checkconfig || return $? + + #prepare chroot + mkdir -p /var/lib/openntpd/chroot/etc/ + cp /etc/localtime /var/lib/openntpd/chroot/etc + + ebegin "Starting ntpd" + start-stop-daemon --start --exec /usr/sbin/ntpd --name ntpd -- ${NTPD_OPTS} + eend $? "Failed to start ntpd" +} + +stop() { + ebegin "Stopping ntpd" + start-stop-daemon --stop --exec /usr/sbin/ntpd --name ntpd --user root + eend $? "Failed to stop openntpd" +} diff --git a/net-misc/openntpd/openntpd-3.9_p1-r2.ebuild b/net-misc/openntpd/openntpd-3.9_p1-r2.ebuild new file mode 100644 index 000000000000..a6413d823ed4 --- /dev/null +++ b/net-misc/openntpd/openntpd-3.9_p1-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-3.9_p1-r2.ebuild,v 1.1 2009/10/14 08:04:18 bangert Exp $ + +EAPI="2" + +inherit eutils + +MY_P=${P/_/} +DESCRIPTION="Lightweight NTP server ported from OpenBSD" +HOMEPAGE="http://www.openntpd.org/" +SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="ssl selinux" + +RDEPEND="ssl? ( dev-libs/openssl ) + selinux? ( sec-policy/selinux-ntp ) + !<=net-misc/ntp-4.2.0-r2" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup ntp 123 + enewuser ntp 123 -1 /var/lib/openntpd/chroot ntp + + #make sure user has correct HOME + usermod -d /var/lib/openntpd/chroot ntp + + if has_version net-misc/ntp && ! built_with_use net-misc/ntp openntpd ; then + die "you need to emerge ntp with USE=openntpd" + fi +} + +src_prepare() { + sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die + epatch "${FILESDIR}"/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff +} + +src_configure() { + econf \ + --disable-strip \ + $(use_with !ssl builtin-arc4random) || die +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + make install DESTDIR="${D}" || die + dodoc ChangeLog CREDITS README + + newinitd "${FILESDIR}"/openntpd.rc-3.9_p1-r2 ntpd + newconfd "${FILESDIR}"/openntpd.conf.d-3.9_p1-r2 ntpd + + dodir /var/lib/openntpd/chroot +} |