summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2011-08-13 15:38:31 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2011-08-13 15:38:31 +0000
commitee38d24f207d1f7641d905e6bd206ef70e260dce (patch)
tree5745353d52081120cf54cd8b69dc2f00b6ff9ee4 /net-misc/openntpd
parentVersion bumps. (diff)
downloadhistorical-ee38d24f207d1f7641d905e6bd206ef70e260dce.tar.gz
historical-ee38d24f207d1f7641d905e6bd206ef70e260dce.tar.bz2
historical-ee38d24f207d1f7641d905e6bd206ef70e260dce.zip
Revision bump to fix bug #241002 (OpenRC related improvements) and bug #363051 (hardcoded ntp directory in init.d script).
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/ChangeLog12
-rw-r--r--net-misc/openntpd/Manifest24
-rw-r--r--net-misc/openntpd/files/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff43
-rw-r--r--net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r4 (renamed from net-misc/openntpd/files/openntpd.conf.d)2
-rw-r--r--net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4 (renamed from net-misc/openntpd/files/openntpd.rc)28
-rw-r--r--net-misc/openntpd/openntpd-3.9_p1-r4.ebuild59
6 files changed, 95 insertions, 73 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog
index bf25156b4b2c..04de08822740 100644
--- a/net-misc/openntpd/ChangeLog
+++ b/net-misc/openntpd/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/openntpd
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.51 2011/07/30 15:49:34 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.52 2011/08/13 15:38:31 nelchael Exp $
+
+*openntpd-3.9_p1-r4 (13 Aug 2011)
+
+ 13 Aug 2011; Krzysztof Pawlik <nelchael@gentoo.org>
+ +files/openntpd.conf.d-3.9_p1-r4, +files/openntpd.init.d-3.9_p1-r4,
+ +openntpd-3.9_p1-r4.ebuild,
+ -files/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff,
+ -files/openntpd.conf.d, -files/openntpd.rc:
+ Revision bump to fix bug #241002 (OpenRC related improvements) and bug
+ #363051 (hardcoded ntp directory in init.d script).
30 Jul 2011; Krzysztof Pawlik <nelchael@gentoo.org> metadata.xml:
Add myself as maintainer.
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest
index ffb114ffd285..ef7e3ebac432 100644
--- a/net-misc/openntpd/Manifest
+++ b/net-misc/openntpd/Manifest
@@ -1,24 +1,24 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
-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.conf.d-3.9_p1-r4 195 RMD160 8bdab3610793b9b83951584634e465d19dcdda54 SHA1 54ba4a7c2d592181ce38590c49a49768d7c424fa SHA256 1980b5dadcd9478e653ef05c099ef45caacfdf12a73a3745b39322f75773a738
+AUX openntpd.init.d-3.9_p1-r4 861 RMD160 c77707eef3d5fee17f3ff86614b84f1c081766a1 SHA1 58d3a09133845697ea716614cdc8bdf331d43a4f SHA256 9ac5287d9c9397e69d62eac8ffc3fb1945ba09f03dce247cd1a2dbca495bf2c8
AUX openntpd.rc-3.9_p1-r2 1113 RMD160 89150aa066215a0e8866ea4cbd73cb0de07ac166 SHA1 656695e8e4b4b2a9628b83acd8c47ea324a08618 SHA256 7260bb5d1aa25beaf8e871e6a6fb8f02a3e297ab855ccdd3c4afad6ceaf9b08f
DIST openntpd-3.9p1.tar.gz 152700 RMD160 c348004116c78810daa9451f15abcc26788949a8 SHA1 098a435d02886a9e4d34afb15b15fde795eda1e9 SHA256 83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49
DIST openntpd_3.9p1+debian-8.debian.tar.gz 15052 RMD160 d31aa896108df47831f213d5b2735946b342d238 SHA1 17508fae066464c3a3a3b5b645559426ceb21413 SHA256 e3bc604d81d4e1e8008560cabc22942c76130854ec67eb5968ce638d598780ad
EBUILD openntpd-3.9_p1-r3.ebuild 1542 RMD160 421f59c2af072cfcb65b16d77e0b39ef7a7fbae2 SHA1 8a8b3c1637b58e84a890f43bc7834304d2219166 SHA256 ed1dacfad1f75301cf0b2a4dacbc4e7c88794cd176981f0e9e50777e52fc5f37
-MISC ChangeLog 7103 RMD160 bda6272a5bcc4202f3b185d9f2aec8db56cecff1 SHA1 391815df6025aef1083fb07a0564278c96bf82a4 SHA256 3b385d3eda42215fce9842a827cb6da7bdbbcd6da2474603c112615fba99de17
+EBUILD openntpd-3.9_p1-r4.ebuild 1552 RMD160 21c712842122d40bf6dcc4e9aeb775c4ce3ecf10 SHA1 3a60e52f501f8863775ec5617b2ab9830bbb12b7 SHA256 5262015d3b45d40a0f6ed73eeaee2d9c5a5f394156c36f6b46e86214ae3847de
+MISC ChangeLog 7523 RMD160 e4020d0e876d4f2807b0acc85e31357ff7a2e098 SHA1 0abfb11ffb3795b6f2c230993a9322cd925fba48 SHA256 c820a7805fd7d92342723e2865baff15ef715593f45c6ea2aef18d74b13abfa0
MISC metadata.xml 529 RMD160 31b3140122c8463e051bc4ebd02bcd6a0e21780b SHA1 2257aaf5f011b07d7f1a0595efc63e6c6a492e94 SHA256 0985b329af5f3a40012a9dd80c800db5afefa8620cc428effdd866d7edde0ef3
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
-iQEcBAEBCgAGBQJONCgaAAoJEBZyv1r2qA5Ga1gH/1+7aQty+f8+bIuhzNYoWG/k
-ktAA2WHh44gGR2VTPv1f4FQoixZNOEdlw7vHlkufaOtVrPJIu6az5suWzwPsTfI6
-I0bE+hBy9+MlUJ1SA2TtGfCuVbULBnYGbqLt8dPs2tPjxpOhI24G8SkV7JBYs2kK
-sa33/HfVfia34TH0sxoRANZbxt+nIVnd26jJyOSbH9sFq1Q8xF+o9Pgw8aHNZtyS
-ahnivE4j6g6lW7W7cteQLAOvwdupISZMue6iRpkGWIv6BZ7tzk485xMJiDqglFMJ
-D8Bj9t1gfhbvUEYvkv56mLPaO+lZFMWnEGR/LOdqUkoJyFkrr6sFFxpECjR5QIc=
-=TLtN
+iQEcBAEBCgAGBQJORpp9AAoJEBZyv1r2qA5GB/EH/iZ7BFMOxgMt7uDo235GGeDy
+vXSXyR1+Z1u+HGHZa08ZvzE5wTqtzMF7rAZFFilg4oR82I+cinCdgix6ot5vLSXN
+QaiyflpSMJj3+IYk1H0wc3GgaGF8pI9u3apftbFjWvgJBOKwj1Z/sO0SlbUXR4g4
+vjwxfSBZdwujzsIiqukfB4BwWAv1e/vkMkCeMLfXrCsKmbFuPFwaAUJmBt9ezTTt
+kq7DY1rejyI+mzqwDR5FbK6ARCjxYjE1s6gv0fzYYYK7asp8R2M86QDkoT05AXJe
+Ng/8MRNwnKM6SOks8ZDuaL2O0WNg6pSKCqVo5YJ4VGixBPbr5H8a9DEg3Ki73q4=
+=VBkn
-----END PGP SIGNATURE-----
diff --git a/net-misc/openntpd/files/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff b/net-misc/openntpd/files/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
deleted file mode 100644
index adca55614a49..000000000000
--- a/net-misc/openntpd/files/openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naur openntpd-3.9p1/client.c openntpd-3.9p1-fixed/client.c
---- openntpd-3.9p1/client.c 2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1-fixed/client.c 2006-10-11 02:41:44.000000000 +0200
-@@ -116,6 +116,7 @@
- client_query(struct ntp_peer *p)
- {
- int tos = IPTOS_LOWDELAY;
-+ int result;
-
- if (p->addr == NULL && client_nextaddr(p) == -1) {
- set_next(p, error_interval());
-@@ -163,9 +164,17 @@
- p->query->msg.xmttime.fractionl = arc4random();
- p->query->xmttime = gettime();
-
-- if (ntp_sendmsg(p->query->fd, NULL, &p->query->msg,
-- NTP_MSGSIZE_NOAUTH, 0) == -1) {
-+ if ((result = ntp_sendmsg(p->query->fd, NULL, &p->query->msg,
-+ NTP_MSGSIZE_NOAUTH, 0)) < 0) {
- set_next(p, INTERVAL_QUERY_PATHETIC);
-+ if (result == -2) {
-+ /*
-+ * got EINVAL in sendto(), probably the local socket
-+ * address got invalidated -> force re-connect()
-+ */
-+ close(p->query->fd);
-+ p->query->fd = -1;
-+ }
- return (-1);
- }
-
-diff -Naur openntpd-3.9p1/ntp_msg.c openntpd-3.9p1-fixed/ntp_msg.c
---- openntpd-3.9p1/ntp_msg.c 2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1-fixed/ntp_msg.c 2006-10-11 02:41:49.000000000 +0200
-@@ -98,6 +98,8 @@
- return (-1);
- }
- log_warn("sendto");
-+ if (errno == EINVAL)
-+ return (-2);
- return (-1);
- }
-
diff --git a/net-misc/openntpd/files/openntpd.conf.d b/net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r4
index 6b938dc766ce..f07752752022 100644
--- a/net-misc/openntpd/files/openntpd.conf.d
+++ b/net-misc/openntpd/files/openntpd.conf.d-3.9_p1-r4
@@ -1,6 +1,6 @@
# /etc/conf.d/ntpd: config file for openntpd's ntpd
-NTPD_HOME=/var/empty
+NTPD_HOME=/var/lib/openntpd/chroot
# See ntpd(8) man page ... some popular options:
# -s Set the time immediately at startup
diff --git a/net-misc/openntpd/files/openntpd.rc b/net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4
index 81648dc03f41..23b003f7b3ca 100644
--- a/net-misc/openntpd/files/openntpd.rc
+++ b/net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4
@@ -1,7 +1,11 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc,v 1.7 2008/10/10 09:40:10 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4,v 1.1 2011/08/13 15:38:31 nelchael Exp $
+
+name="OpenNTPD"
+command="/usr/sbin/ntpd"
+command_args="${NTPD_OPTS}"
depend() {
need net
@@ -9,7 +13,7 @@ depend() {
use dns logger
}
-checkconfig() {
+start_pre() {
if [ ! -f /etc/ntpd.conf ] ; then
eerror "Could not find /etc/ntpd.conf!"
return 1
@@ -23,19 +27,11 @@ checkconfig() {
fi
fi
- return 0
-}
-
-start() {
- checkconfig || return $?
+ checkpath -d -o 0:0 "${NTPD_HOME}"
- ebegin "Starting ntpd"
- start-stop-daemon --start --exec /usr/sbin/ntpd --name ntpd -- ${NTPD_OPTS}
- eend $? "Failed to start ntpd"
-}
+ # prepare chroot
+ mkdir -p "${NTPD_HOME}/etc"
+ cp /etc/localtime "${NTPD_HOME}/etc"
-stop() {
- ebegin "Stopping ntpd"
- start-stop-daemon --stop --exec /usr/sbin/ntpd --name ntpd --user root
- eend $? "Failed to stop openntpd"
+ return 0
}
diff --git a/net-misc/openntpd/openntpd-3.9_p1-r4.ebuild b/net-misc/openntpd/openntpd-3.9_p1-r4.ebuild
new file mode 100644
index 000000000000..5ca555548a31
--- /dev/null
+++ b/net-misc/openntpd/openntpd-3.9_p1-r4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 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-r4.ebuild,v 1.1 2011/08/13 15:38:31 nelchael Exp $
+
+EAPI="2"
+
+inherit eutils autotools
+
+MY_P=${P/_/}
+DEB_VER="8"
+DESCRIPTION="Lightweight NTP server ported from OpenBSD"
+HOMEPAGE="http://www.openntpd.org/"
+SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz
+ mirror://debian/pool/main/o/openntpd/${MY_P/-/_}+debian-${DEB_VER}.debian.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
+ !net-misc/ntp[-openntpd]"
+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 when flipping between
+ # the standard ntp pkg and this one
+ usermod -d /var/lib/openntpd/chroot ntp
+}
+
+src_prepare() {
+ sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die
+
+ epatch "${WORKDIR}"/debian/patches/*.patch
+ sed -i 's:debian:gentoo:g' ntpd.conf || die
+ eautoreconf # deb patchset touches .ac files and such
+}
+
+src_configure() {
+ econf \
+ --disable-strip \
+ --with-adjtimex \
+ $(use_with !ssl builtin-arc4random)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog CREDITS README
+
+ newinitd "${FILESDIR}/openntpd.init.d-${PVR}" ntpd
+ newconfd "${FILESDIR}/openntpd.conf.d-${PVR}" ntpd
+}