summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-12-22 14:58:19 +0000
committerMike Frysinger <vapier@gentoo.org>2004-12-22 14:58:19 +0000
commit8db39e2986d490549da00ad2334d8eaa460dce08 (patch)
tree3a5b62b9f36732f6a5aa5e90b5d7885979459c76 /net-misc/openntpd
parenterr forgot to install headers (Manifest recommit) (diff)
downloadgentoo-2-8db39e2986d490549da00ad2334d8eaa460dce08.tar.gz
gentoo-2-8db39e2986d490549da00ad2334d8eaa460dce08.tar.bz2
gentoo-2-8db39e2986d490549da00ad2334d8eaa460dce08.zip
Add patch from cvs to handle poll errors #74080 by Christian Gut.
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/ChangeLog8
-rw-r--r--net-misc/openntpd/files/3.6.1_p1-pollerr.patch39
-rw-r--r--net-misc/openntpd/files/digest-openntpd-3.6.1_p1-r11
-rw-r--r--net-misc/openntpd/openntpd-3.6.1_p1-r1.ebuild49
4 files changed, 96 insertions, 1 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog
index 9c1b0f662255..cbb5d3f7695e 100644
--- a/net-misc/openntpd/ChangeLog
+++ b/net-misc/openntpd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/openntpd
# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.14 2004/12/22 14:38:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.15 2004/12/22 14:58:19 vapier Exp $
+
+*openntpd-3.6.1_p1-r1 (22 Dec 2004)
+
+ 22 Dec 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/3.6.1_p1-pollerr.patch, +openntpd-3.6.1_p1-r1.ebuild:
+ Add patch from cvs to handle poll errors #74080 by Christian Gut.
22 Dec 2004; Mike Frysinger <vapier@gentoo.org> openntpd-3.6.1_p1.ebuild,
openntpd-3.6_p1.ebuild:
diff --git a/net-misc/openntpd/files/3.6.1_p1-pollerr.patch b/net-misc/openntpd/files/3.6.1_p1-pollerr.patch
new file mode 100644
index 000000000000..8299778ca886
--- /dev/null
+++ b/net-misc/openntpd/files/3.6.1_p1-pollerr.patch
@@ -0,0 +1,39 @@
+Index: ntp.c
+===================================================================
+RCS file: /usr/local/cvs/openntpd-portable/ntp.c,v
+retrieving revision 1.25
+diff -u -p -r1.25 ntp.c
+--- ntp.c 4 Dec 2004 00:06:34 -0000 1.25
++++ ntp.c 12 Dec 2004 00:55:51 -0000
+@@ -228,27 +228,27 @@ ntp_main(int pipe_prnt[2], struct ntpd_c
+ ntp_quit = 1;
+ }
+
+- if (nfds > 0 && (pfd[PFD_PIPE_MAIN].revents & POLLOUT))
++ if (nfds > 0 && (pfd[PFD_PIPE_MAIN].revents & (POLLOUT|POLLERR)))
+ if (msgbuf_write(&ibuf_main->w) < 0) {
+ log_warn("pipe write error (to parent)");
+ ntp_quit = 1;
+ }
+
+- if (nfds > 0 && pfd[PFD_PIPE_MAIN].revents & POLLIN) {
++ if (nfds > 0 && pfd[PFD_PIPE_MAIN].revents & (POLLIN|POLLERR)) {
+ nfds--;
+ if (ntp_dispatch_imsg() == -1)
+ ntp_quit = 1;
+ }
+
+ for (j = 1; nfds > 0 && j < idx_peers; j++)
+- if (pfd[j].revents & POLLIN) {
++ if (pfd[j].revents & (POLLIN|POLLERR)) {
+ nfds--;
+ if (server_dispatch(pfd[j].fd, conf) == -1)
+ ntp_quit = 1;
+ }
+
+ for (; nfds > 0 && j < i; j++)
+- if (pfd[j].revents & POLLIN) {
++ if (pfd[j].revents & (POLLIN|POLLERR)) {
+ nfds--;
+ if (client_dispatch(idx2peer[j - idx_peers],
+ conf->settime) == -1)
diff --git a/net-misc/openntpd/files/digest-openntpd-3.6.1_p1-r1 b/net-misc/openntpd/files/digest-openntpd-3.6.1_p1-r1
new file mode 100644
index 000000000000..87cf7748892a
--- /dev/null
+++ b/net-misc/openntpd/files/digest-openntpd-3.6.1_p1-r1
@@ -0,0 +1 @@
+MD5 4584f226523776a3cdd2fb6f8212ba8d openntpd-3.6.1p1.tar.gz 123811
diff --git a/net-misc/openntpd/openntpd-3.6.1_p1-r1.ebuild b/net-misc/openntpd/openntpd-3.6.1_p1-r1.ebuild
new file mode 100644
index 000000000000..7780bb229387
--- /dev/null
+++ b/net-misc/openntpd/openntpd-3.6.1_p1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-3.6.1_p1-r1.ebuild,v 1.1 2004/12/22 14:58:19 vapier Exp $
+
+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 ~sparc ~x86"
+IUSE="ssl"
+
+RDEPEND="virtual/libc
+ ssl? ( dev-libs/openssl )
+ !<=net-misc/ntp-4.2.0-r2"
+DEPEND="${RDEPEND}
+ >=sys-apps/portage-2.0.51"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 /bin/false /var/empty ntp
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die
+ epatch ${FILESDIR}/${PV}-ntpd.8.patch
+ epatch ${FILESDIR}/${PV}-pollerr.patch #74080
+}
+
+src_compile() {
+ econf $(use_with !ssl builtin-arc4random) || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ dodoc ChangeLog CREDITS README
+
+ newinitd ${FILESDIR}/openntpd.rc ntpd
+ newconfd ${FILESDIR}/openntpd.conf.d ntpd
+}