diff options
author | Christoph Junghans <ottxor@gentoo.org> | 2013-06-22 14:46:38 +0000 |
---|---|---|
committer | Christoph Junghans <ottxor@gentoo.org> | 2013-06-22 14:46:38 +0000 |
commit | ab1e006519a70ba15c41c82c6c8da09d65bcd9fc (patch) | |
tree | b322ab3d828c4945b816c118551ff39c870a9101 /net-misc/openntpd | |
parent | amd64 stable wrt bug #474172 (diff) | |
download | gentoo-2-ab1e006519a70ba15c41c82c6c8da09d65bcd9fc.tar.gz gentoo-2-ab1e006519a70ba15c41c82c6c8da09d65bcd9fc.tar.bz2 gentoo-2-ab1e006519a70ba15c41c82c6c8da09d65bcd9fc.zip |
fix slow boot sequence (bug #464174)
(Portage version: 2.2.0_alpha183/cvs/Linux x86_64, signed Manifest commit with key C2000586)
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r-- | net-misc/openntpd/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd.init.d-20080406-r1 | 41 | ||||
-rw-r--r-- | net-misc/openntpd/openntpd-20080406-r1.ebuild | 59 |
3 files changed, 107 insertions, 1 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog index e048279198b6..c1214a0f9a94 100644 --- a/net-misc/openntpd/ChangeLog +++ b/net-misc/openntpd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/openntpd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.77 2013/03/11 07:39:14 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.78 2013/06/22 14:46:38 ottxor Exp $ + +*openntpd-20080406-r1 (22 Jun 2013) + + 22 Jun 2013; Christoph Junghans <ottxor@gentoo.org> + +files/openntpd.init.d-20080406-r1, +openntpd-20080406-r1.ebuild: + fix slow boot sequence (bug #464174) 11 Mar 2013; Agostino Sarubbo <ago@gentoo.org> openntpd-20080406.ebuild: Stable for sh, wrt bug #457454 diff --git a/net-misc/openntpd/files/openntpd.init.d-20080406-r1 b/net-misc/openntpd/files/openntpd.init.d-20080406-r1 new file mode 100644 index 000000000000..5a6230d9c61e --- /dev/null +++ b/net-misc/openntpd/files/openntpd.init.d-20080406-r1 @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.init.d-20080406-r1,v 1.1 2013/06/22 14:46:38 ottxor Exp $ + +name="OpenNTPD" +command="/usr/sbin/ntpd" +command_args="${NTPD_OPTS} -d" +command_background="yes" +pidfile="/var/run/ntpd.pid" +logfile="/var/run/ntpd.log" +start_stop_daemon_args="--stderr ${logfile}" + +depend() { + need net + after ntp-client + use dns logger +} + +start_pre() { + 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 + + checkpath -d -o 0:0 "${NTPD_HOME}" + + # prepare chroot + mkdir -p "${NTPD_HOME}/etc" + cp /etc/localtime "${NTPD_HOME}/etc" + + return 0 +} diff --git a/net-misc/openntpd/openntpd-20080406-r1.ebuild b/net-misc/openntpd/openntpd-20080406-r1.ebuild new file mode 100644 index 000000000000..6400a17c8aa9 --- /dev/null +++ b/net-misc/openntpd/openntpd-20080406-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-20080406-r1.ebuild,v 1.1 2013/06/22 14:46:38 ottxor Exp $ + +EAPI=5 + +inherit autotools eutils toolchain-funcs user + +MY_P="${P/-/_}p" +DEB_VER="4" +DESCRIPTION="Lightweight NTP server ported from OpenBSD" +HOMEPAGE="http://www.openntpd.org/" +SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}-${DEB_VER}.debian.tar.gz" + +LICENSE="BSD GPL-2" +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} + virtual/yacc" + +S="${WORKDIR}/${MY_P/_/-}" + +pkg_setup() { + enewgroup ntp + enewuser ntp -1 -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 || die +} + +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 \ + $(use_with !ssl builtin-arc4random) \ + AR="$(type -p $(tc-getAR))" +} + +src_install() { + default + + newinitd "${FILESDIR}/openntpd.init.d-20080406-r1" ntpd + newconfd "${FILESDIR}/openntpd.conf.d-3.9_p1-r4" ntpd +} |