diff options
author | Christoph Junghans <ottxor@gentoo.org> | 2015-01-12 18:09:55 +0000 |
---|---|---|
committer | Christoph Junghans <ottxor@gentoo.org> | 2015-01-12 18:09:55 +0000 |
commit | 1199bb4d85a60f8bc1cb70c37d5636f0d983e8e0 (patch) | |
tree | d2c2242360f770c3c0022aaca72c8ae7f727b176 /net-misc | |
parent | add myself as a maintainer (diff) | |
download | gentoo-2-1199bb4d85a60f8bc1cb70c37d5636f0d983e8e0.tar.gz gentoo-2-1199bb4d85a60f8bc1cb70c37d5636f0d983e8e0.tar.bz2 gentoo-2-1199bb4d85a60f8bc1cb70c37d5636f0d983e8e0.zip |
version bump (bug #536032)
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key C2000586)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/openntpd/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd-5.7_p1-driftpath.patch | 37 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd-5.7_p1-gentoopool.patch | 15 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd-5.7_p1-runpath.patch | 38 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd-5.7_p1-signal.patch | 17 | ||||
-rw-r--r-- | net-misc/openntpd/files/openntpd-5.7_p1-warn-s-failure.patch | 12 | ||||
-rw-r--r-- | net-misc/openntpd/openntpd-5.7_p1.ebuild | 96 |
7 files changed, 225 insertions, 1 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog index 0a8df2580575..eef4c8a5730c 100644 --- a/net-misc/openntpd/ChangeLog +++ b/net-misc/openntpd/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-misc/openntpd # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.128 2015/01/12 18:01:31 ottxor Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.129 2015/01/12 18:09:55 ottxor Exp $ + +*openntpd-5.7_p1 (12 Jan 2015) + + 12 Jan 2015; Christoph Junghans <ottxor@gentoo.org> + +files/openntpd-5.7_p1-driftpath.patch, + +files/openntpd-5.7_p1-gentoopool.patch, +files/openntpd-5.7_p1-runpath.patch, + +files/openntpd-5.7_p1-signal.patch, + +files/openntpd-5.7_p1-warn-s-failure.patch, +openntpd-5.7_p1.ebuild: + version bump (bug #536032) 12 Jan 2015; Christoph Junghans <ottxor@gentoo.org> -openntpd-20080406-r9.ebuild, openntpd-4.0_pre20080406.ebuild: diff --git a/net-misc/openntpd/files/openntpd-5.7_p1-driftpath.patch b/net-misc/openntpd/files/openntpd-5.7_p1-driftpath.patch new file mode 100644 index 000000000000..f95379319fad --- /dev/null +++ b/net-misc/openntpd/files/openntpd-5.7_p1-driftpath.patch @@ -0,0 +1,37 @@ +diff -u -r openntpd-5.7p1-orig/ntpd.8 openntpd-5.7p1/ntpd.8 +--- openntpd-5.7p1-orig/ntpd.8 2015-01-09 16:22:41.451768526 -0800 ++++ openntpd-5.7p1/ntpd.8 2015-01-09 16:23:23.840778527 -0800 +@@ -118,7 +118,7 @@ + typically + .Xr ntpd.conf 5 , + and its initial clock drift from +-.Pa /var/db/ntpd.drift . ++.Pa /var/lib/openntpd/ntpd.drift . + Clock drift is periodically written to the drift file thereafter. + .Pp + When +@@ -129,10 +129,10 @@ + signal, it writes its peer and sensor status to + .Xr syslog 3 . + .Sh FILES +-.Bl -tag -width "/var/db/ntpd.driftXXX" -compact ++.Bl -tag -width "/var/lib/openntpd/ntpd.driftXXX" -compact + .It Pa /etc/ntpd.conf + Default configuration file. +-.It Pa /var/db/ntpd.drift ++.It Pa /var/lib/openntpd/ntpd.drift + Drift file. + .It Pa /run/ntpd.sock + Socket file for communication with +diff -u -r openntpd-5.7p1-orig/ntpd.h openntpd-5.7p1/ntpd.h +--- openntpd-5.7p1-orig/ntpd.h 2015-01-09 16:22:41.452768549 -0800 ++++ openntpd-5.7p1/ntpd.h 2015-01-09 16:23:55.100523371 -0800 +@@ -48,7 +48,7 @@ + #ifndef LOCALSTATEDIR + #define LOCALSTATEDIR "/var" + #endif +-#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift" ++#define DRIFTFILE LOCALSTATEDIR "/openntpd/ntpd.drift" + #define CTLSOCKET "/run/ntpd.sock" + + #if defined(SO_SETFIB) diff --git a/net-misc/openntpd/files/openntpd-5.7_p1-gentoopool.patch b/net-misc/openntpd/files/openntpd-5.7_p1-gentoopool.patch new file mode 100644 index 000000000000..1b7d71354e14 --- /dev/null +++ b/net-misc/openntpd/files/openntpd-5.7_p1-gentoopool.patch @@ -0,0 +1,15 @@ +diff -u -r openntpd-5.7p1-orig/ntpd.conf openntpd-5.7p1/ntpd.conf +--- openntpd-5.7p1-orig/ntpd.conf 2015-01-01 21:00:03.000000000 -0800 ++++ openntpd-5.7p1/ntpd.conf 2015-01-09 18:59:46.404092984 -0800 +@@ -8,4 +8,10 @@ + + # use a random selection of NTP Pool Time Servers + # see http://support.ntp.org/bin/view/Servers/NTPPoolServers +-servers pool.ntp.org ++#servers pool.ntp.org ++ ++# Choose servers announced from Gentoo NTP Pool ++servers 0.gentoo.pool.ntp.org ++servers 1.gentoo.pool.ntp.org ++servers 2.gentoo.pool.ntp.org ++servers 3.gentoo.pool.ntp.org diff --git a/net-misc/openntpd/files/openntpd-5.7_p1-runpath.patch b/net-misc/openntpd/files/openntpd-5.7_p1-runpath.patch new file mode 100644 index 000000000000..144c1416cf09 --- /dev/null +++ b/net-misc/openntpd/files/openntpd-5.7_p1-runpath.patch @@ -0,0 +1,38 @@ +diff -u -r openntpd-5.7p1-orig/ntpctl.8 openntpd-5.7p1/ntpctl.8 +--- openntpd-5.7p1-orig/ntpctl.8 2015-01-09 16:16:37.102087085 -0800 ++++ openntpd-5.7p1/ntpctl.8 2015-01-09 16:18:07.162232969 -0800 +@@ -55,8 +55,8 @@ + system call, is displayed. + .El + .Sh FILES +-.Bl -tag -width "/var/run/ntpd.sockXXX" -compact +-.It Pa /var/run/ntpd.sock ++.Bl -tag -width "/run/ntpd.sockXXX" -compact ++.It Pa /run/ntpd.sock + Socket file for communication with + .Xr ntpd 8 . + .El +diff -u -r openntpd-5.7p1-orig/ntpd.8 openntpd-5.7p1/ntpd.8 +--- openntpd-5.7p1-orig/ntpd.8 2015-01-09 16:16:37.101087061 -0800 ++++ openntpd-5.7p1/ntpd.8 2015-01-09 16:18:17.853487710 -0800 +@@ -134,7 +134,7 @@ + Default configuration file. + .It Pa /var/db/ntpd.drift + Drift file. +-.It Pa /var/run/ntpd.sock ++.It Pa /run/ntpd.sock + Socket file for communication with + .Xr ntpctl 8 . + .El +diff -u -r openntpd-5.7p1-orig/ntpd.h openntpd-5.7p1/ntpd.h +--- openntpd-5.7p1-orig/ntpd.h 2015-01-09 16:16:37.102087085 -0800 ++++ openntpd-5.7p1/ntpd.h 2015-01-09 16:18:38.837987712 -0800 +@@ -49,7 +49,7 @@ + #define LOCALSTATEDIR "/var" + #endif + #define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift" +-#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock" ++#define CTLSOCKET "/run/ntpd.sock" + + #if defined(SO_SETFIB) + #define SO_RTABLE SO_SETFIB diff --git a/net-misc/openntpd/files/openntpd-5.7_p1-signal.patch b/net-misc/openntpd/files/openntpd-5.7_p1-signal.patch new file mode 100644 index 000000000000..68bd5992eeac --- /dev/null +++ b/net-misc/openntpd/files/openntpd-5.7_p1-signal.patch @@ -0,0 +1,17 @@ +Only in openntpd-5.7p1: .ntpd.8.swp +diff -u -r openntpd-5.7p1-orig/ntpd.8 openntpd-5.7p1/ntpd.8 +--- openntpd-5.7p1-orig/ntpd.8 2015-01-09 18:51:48.724711211 -0800 ++++ openntpd-5.7p1/ntpd.8 2015-01-09 18:56:32.461471870 -0800 +@@ -126,7 +126,11 @@ + .Pq engine + receives a + .Dv SIGINFO +-signal, it writes its peer and sensor status to ++signal (or a ++.Dv SIGUSR1 ++signal on systems without ++.Dv SIGINFO), ++it writes its peer and sensor status to + .Xr syslog 3 . + .Sh FILES + .Bl -tag -width "/var/db/ntpd.driftXXX" -compact diff --git a/net-misc/openntpd/files/openntpd-5.7_p1-warn-s-failure.patch b/net-misc/openntpd/files/openntpd-5.7_p1-warn-s-failure.patch new file mode 100644 index 000000000000..884c0865d4c2 --- /dev/null +++ b/net-misc/openntpd/files/openntpd-5.7_p1-warn-s-failure.patch @@ -0,0 +1,12 @@ +diff -u -r openntpd-5.7p1-orig/ntpd.c openntpd-5.7p1/ntpd.c +--- openntpd-5.7p1-orig/ntpd.c 2015-01-09 18:58:14.498903138 -0800 ++++ openntpd-5.7p1/ntpd.c 2015-01-09 19:00:59.917844614 -0800 +@@ -242,7 +242,7 @@ + lconf.settime = 0; + timeout = INFTIM; + log_init(lconf.debug); +- log_debug("no reply received in time, skipping initial " ++ log_warnx("no reply received in time, skipping initial " + "time setting"); + if (!lconf.debug) { + if (daemon(1, 0)) diff --git a/net-misc/openntpd/openntpd-5.7_p1.ebuild b/net-misc/openntpd/openntpd-5.7_p1.ebuild new file mode 100644 index 000000000000..aea04df87a78 --- /dev/null +++ b/net-misc/openntpd/openntpd-5.7_p1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-5.7_p1.ebuild,v 1.1 2015/01/12 18:09:55 ottxor Exp $ + +EAPI=5 + +inherit eutils systemd user + +DESCRIPTION="Lightweight NTP server ported from OpenBSD" +HOMEPAGE="http://www.openntpd.org/" + +MY_P="${P/_p/p}" +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="selinux" + +CDEPEND="!<=net-misc/ntp-4.2.0-r2 + !net-misc/ntp[-openntpd]" +DEPEND="${CDEPEND}" +RDEPEND="${CDEPEND} + 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() { + epatch "${FILESDIR}/${P}-runpath.patch" + epatch "${FILESDIR}/${P}-driftpath.patch" + epatch "${FILESDIR}/${P}-signal.patch" + epatch "${FILESDIR}/${P}-gentoopool.patch" + epatch "${FILESDIR}/${P}-warn-s-failure.patch" +} + +src_configure() { + econf --with-privsep-user=ntp --with-privsep-path="${NTP_HOME}" +} + +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_config() { + einfo "Setting up chroot for ntp in ${NTP_HOME}" + # remove localtime file from previous installations + rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime + mkdir -p "${EROOT%/}${NTP_HOME}"/etc + if ! ln "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime ; then + cp "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime || die + einfo "We could not create a hardlink from /etc/localtime to ${NTP_HOME}/etc/localtime," + einfo "so please run 'emerge --config =${CATEGORY}/${PF}' whenever you change" + einfo "your timezone." + fi + chown -R root:root "${EROOT%/}${NTP_HOME}" || die +} + +pkg_postinst() { + pkg_config + + [[ -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 +} + +pkg_postrm() { + # remove localtime file from previous installations + rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime +} |