summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B. Henson <henson@acm.org>2016-04-15 21:00:39 -0700
committerChristoph Junghans <ottxor@gentoo.org>2016-04-16 10:46:06 -0600
commitef0cce7b812a05f37064956934addd94b19e1e81 (patch)
tree0fa9bf78fa99eaad0d606e0754e662076740a217 /net-misc/openntpd
parentdev-python/sphinxcontrib-issuetracker: remove kde project (diff)
downloadgentoo-ef0cce7b812a05f37064956934addd94b19e1e81.tar.gz
gentoo-ef0cce7b812a05f37064956934addd94b19e1e81.tar.bz2
gentoo-ef0cce7b812a05f37064956934addd94b19e1e81.zip
net-misc/openntpd: Bump to 5.9_p1
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/Manifest1
-rw-r--r--net-misc/openntpd/metadata.xml5
-rw-r--r--net-misc/openntpd/openntpd-5.9_p1.ebuild88
3 files changed, 94 insertions, 0 deletions
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest
index bea2d4746de2..0df196ae46f5 100644
--- a/net-misc/openntpd/Manifest
+++ b/net-misc/openntpd/Manifest
@@ -1 +1,2 @@
DIST openntpd-5.7p4.tar.gz 427900 SHA256 a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 SHA512 2a185139c915482086069fa19dd3070884a415137d1688059559d2da892928afbbe2fa0a8ade70d474809710265dcc05906abaf261892d7894e70272e2e516ef WHIRLPOOL 9464941e0f055ecd1db19a03bb5264a1dce02c6c7c2be078d1e3a19b5bd0a3c4e19ee6768617c90ebed01dea32f3a63751f9ef0436f56e22b7e6bd673a065546
+DIST openntpd-5.9p1.tar.gz 432844 SHA256 200c04056d4d6441653cac71d515611f3903aa7b15b8f5661a40dab3fb3697b3 SHA512 227a4d42f43f4abfaa97fb85cf121d3b9a6646259faeda785dbeb3e4a27285a7f95daf96e72135871a31f772895f3b66c10bd628c87e453507ce69102f5e1213 WHIRLPOOL af0d4085f9dc7449a3ab8dd61ced9dbac285d83c9716b8761f35e1e920519a910d34d277cd28ec3138a556f5eb1df88399f9e47524438f539cf41ef1739ddcc4
diff --git a/net-misc/openntpd/metadata.xml b/net-misc/openntpd/metadata.xml
index 72d403337171..ba5173cb0c3c 100644
--- a/net-misc/openntpd/metadata.xml
+++ b/net-misc/openntpd/metadata.xml
@@ -19,4 +19,9 @@
NTP servers and can act as NTP server itself, redistributing the
local clock.
</longdescription>
+ <use>
+ <flag name="libressl">Enable HTTPS TLS time constraint support using
+ <pkg>dev-libs/libressl</pkg>
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/net-misc/openntpd/openntpd-5.9_p1.ebuild b/net-misc/openntpd/openntpd-5.9_p1.ebuild
new file mode 100644
index 000000000000..80015bb5422b
--- /dev/null
+++ b/net-misc/openntpd/openntpd-5.9_p1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd user
+
+MY_P="${P/_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 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="libressl selinux"
+
+DEPEND="!<=net-misc/ntp-4.2.0-r2
+ !net-misc/ntp[-openntpd]
+ libressl? ( dev-libs/libressl )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}"
+ enewgroup ntp
+ enewuser ntp -1 -1 "${NTP_HOME}" ntp
+
+ # make sure user has correct HOME as flipping between the standard ntp pkg
+ # and this one was possible in the past
+ if [[ $(egethome ntp) != ${NTP_HOME} ]]; then
+ ewarn "From this version on, the homedir of the ntp user cannot be changed"
+ ewarn "dynamically after the installation. For homedir different from"
+ ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge."
+ esethome ntp "${NTP_HOME}"
+ fi
+}
+
+src_prepare() {
+ # fix /run path
+ sed -i 's:/var/run/ntpd:/run/ntpd:g' src/ntpctl.8 src/ntpd.8 || die
+ sed -i 's:LOCALSTATEDIR "/run/ntpd:"/run/ntpd:' src/ntpd.h || die
+ # fix ntpd.drift path
+ sed -i 's:/var/db/ntpd.drift:/var/lib/openntpd/ntpd.drift:g' src/ntpd.8 || die
+ sed -i 's:"/db/ntpd.drift":"/openntpd/ntpd.drift":' src/ntpd.h || die
+ # fix default config to use gentoo pool
+ sed -i 's:servers pool.ntp.org:#servers pool.ntp.org:' ntpd.conf || die
+ printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die
+}
+
+src_configure() {
+ econf --with-privsep-user=ntp --with-privsep-path=${NTP_HOME} $(use_enable libressl https-constraint)
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/var
+
+ newinitd "${FILESDIR}/${PN}.init.d-20080406-r6" ntpd
+ newconfd "${FILESDIR}/${PN}.conf.d-20080406-r6" ntpd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-20080406-r4" ntpd.service
+}
+
+pkg_postinst() {
+ # Clean up chroot localtime copy from older versions
+ if [ -d "${EROOT%/}${NTP_HOME}"/etc ] ; then
+ if [ -f "${EROOT%/}${NTP_HOME}"/etc/localtime ] ; then
+ rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime
+ fi
+
+ rmdir "${EROOT%/}${NTP_HOME}"/etc ||
+ ewarn "Unable to remove legacy ${EROOT%/}${NTP_HOME}/etc directory"
+ fi
+
+ # Fix permissions on home directory
+ chown root:root "${EROOT%/}${NTP_HOME}" || die
+
+ [[ -f ${EROOT}var/log/ntpd.log ]] && \
+ ewarn "Logfile '${EROOT}var/log/ntpd.log' might be orphaned, please remove it if not in use via syslog."
+
+ if [[ -f ${EROOT}var/lib/ntpd.drift ]] ; then
+ einfo "Moving ntpd.drift file to new location."
+ mv "${EROOT}var/lib/ntpd.drift" "${EROOT}var/lib/openntpd/ntpd.drift"
+ fi
+}