summaryrefslogtreecommitdiff
path: root/net-misc/ntp
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/ntp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/ntp')
-rw-r--r--net-misc/ntp/Manifest8
-rwxr-xr-xnet-misc/ntp/files/man-pages/genmans.sh75
-rw-r--r--net-misc/ntp/files/man-pages/ntp.conf.5.patch27
-rw-r--r--net-misc/ntp/files/man-pages/ntp.xsl218
-rw-r--r--net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch33
-rw-r--r--net-misc/ntp/files/ntp-4.2.4_p7-nano.patch20
-rw-r--r--net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch16
-rw-r--r--net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch164
-rw-r--r--net-misc/ntp/files/ntp-client.confd21
-rw-r--r--net-misc/ntp/files/ntp-client.rc32
-rw-r--r--net-misc/ntp/files/ntp.conf54
-rw-r--r--net-misc/ntp/files/ntpd.confd6
-rw-r--r--net-misc/ntp/files/ntpd.rc36
-rw-r--r--net-misc/ntp/files/ntpd.rc-r123
-rw-r--r--net-misc/ntp/files/ntpd.service-r110
-rw-r--r--net-misc/ntp/files/ntpd.service-r211
-rw-r--r--net-misc/ntp/files/ntpdate.service13
-rw-r--r--net-misc/ntp/files/ntpdate.service-r114
-rw-r--r--net-misc/ntp/files/ntpdate.service.conf2
-rw-r--r--net-misc/ntp/files/sntp.confd4
-rw-r--r--net-misc/ntp/files/sntp.rc27
-rw-r--r--net-misc/ntp/files/sntp.service-r113
-rw-r--r--net-misc/ntp/files/sntp.service-r214
-rw-r--r--net-misc/ntp/files/sntp.service.conf2
-rw-r--r--net-misc/ntp/metadata.xml20
-rw-r--r--net-misc/ntp/ntp-4.2.6_p5-r10.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.6_p5-r11.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.8-r1.ebuild129
-rw-r--r--net-misc/ntp/ntp-4.2.8-r2.ebuild140
-rw-r--r--net-misc/ntp/ntp-4.2.8-r3.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.8_p2.ebuild128
-rw-r--r--net-misc/ntp/ntp-4.2.8_p3.ebuild128
32 files changed, 1796 insertions, 0 deletions
diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
new file mode 100644
index 00000000000..da518340099
--- /dev/null
+++ b/net-misc/ntp/Manifest
@@ -0,0 +1,8 @@
+DIST ntp-4.2.6p5-manpages.tar.bz2 47874 SHA256 f49203cba2301ce27a53113a6e22d844b258114604f2c9ee1371833babc70f9c SHA512 57d4b8fc4482a41c6595418ebff1a861d4bd7ee175b13cf5580a5915749a096b3a906ca8ddf9fc9c57ead783df22b7b9326b51bbab9cd8340576413bee3e7f84 WHIRLPOOL 83c2d95fe953ab2cd7729bc03d89e44a2de85cb68b4ec72c123a034846866aebf7b83eeb4e45add6aa1443f2de83bfbb1ecdbb437534d827d1e1a4a08f91cfd4
+DIST ntp-4.2.6p5.tar.gz 4202539 SHA256 d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c SHA512 8d76fc7e92b2ea6dd5031e6030a7aba4ff6fb3e19d3bc0153852509861be5d0960e70604814163caedb81f8315a451d78371f99634a50b55cfe1cbd2c69e3046 WHIRLPOOL 9943706ad02e377cb38d65caed6f675d37db7aa53dd86319b17405791494bf11244ac933867516cca9438947202b595b6606088a8aaa436655f9eeb8d078b77e
+DIST ntp-4.2.8-manpages.tar.bz2 46542 SHA256 9c68840456c7002796baea70231e6cf7f6bc06583bbab370a09f837a66f2c409 SHA512 a87db65da978fcaf123763a6de59a399a3c799d59374acd1c397d7a7816e6ee2ff6091f24ff41223cf719effd2e595dfa7699006a724d2908d380c6098603d28 WHIRLPOOL cb0e53cc0132573d6b2910301c1d7743874598b1487968ec9e49f467a8aa62340609379c8cffb42da2694703955581629aa78897a9319f71b3589600e882b9b0
+DIST ntp-4.2.8.tar.gz 6750364 SHA256 2e920df8b6a5a410567a73767fa458c00c7f0acec3213e69ed0134414a50d8ee SHA512 d69ed02e57c66d5c57616bb5e4be0d58e7410dd27ea96acaed6e8b63726a37cd22ae73e8bdff089abbe8e19bcd8bee05733ab362249018fc495fcedc71aa3a44 WHIRLPOOL 4bfe1222c250425e3fc229649d1d4ae11fa6a32eb03f9d15b95575ee31171761321730c83d6e283551fc89647370a86791ec1c262c49826b31106d4317fb64e1
+DIST ntp-4.2.8p2-manpages.tar.bz2 46421 SHA256 c22f74e0361e5eb921e495ff0f1b8987c26d90db72393dfb307f68498d6501e8 SHA512 8b211e891e96006ba4fa054fe5f111ae5b52cc4b990d4bbe691fd0724f6373ec54428fc39ea0cffc8fe66f757d6f99355ac69f3dc76ad43f8f95c145f3adee9c WHIRLPOOL f1b85c4e39934d308dbaaca1b22779e33c18489abfd9e17ad26368462032445d164a2dbb96fa9865128bc138ce8f8f8790d9eeffc0c37339ed5eafa0ee687a72
+DIST ntp-4.2.8p2.tar.gz 6820869 SHA256 0d69bc0e95caad43ea04fdad410e756bae1a71e67b1c2bd799b76b55e04c9b31 SHA512 7b39e4d8a362afd37dc57a742841fadcd4634bb1d21d59d72d484b759a867d82b90d8c77e6e104c73ec8690489b80b0f9e2e86e4dfcfa34a49621cee3dee16d0 WHIRLPOOL 70d63c895a62bcd790760e6205d6b666ab47dfc9fc8737f10d1cd7d4a2c3cafb4efe6b8141570921c5024e71b00ebca73574562694678f448ee7680a982a0084
+DIST ntp-4.2.8p3-manpages.tar.bz2 46419 SHA256 83f9641e52fd79ac8bd76f7d62214591389f97fed5200e8b5d85aa31070f9112 SHA512 1d15c63f5c88e0b45f5de3a35042fde9a3a01413ab460f553124ad996832b46c72212070ccbefc0e70aef8ffe4c634b7424e06ac31f62cd921a3df13b3746d6b WHIRLPOOL 92aa9cebe97454e1d7d1533546bee131795ab6f28538b0326423afbca10b83fadc8693c8148de08d7d7bed0773d462d204632ba38e16a4c442b1bae10094a501
+DIST ntp-4.2.8p3.tar.gz 7099575 SHA256 818ca4f2ed6ca845b1c5ec43f5e6ad905eaa0fc0aab2d509ed6b962a37fbf38f SHA512 5a628f72e900ac8c8a4754bc9620e6511f68035b3a1e1108d619b1beab307d3f6c9f5dad4f3ca3f4e252d0e7e3bf48900044df2934aa87df1f699316db5e9598 WHIRLPOOL 4d66c9403b0bf8b4a9b297bd13974f88bcdc3f524bede0e633f7ee17b688bdd60dcc4e8a23fa7a4efd82540fab515df0b40c140edbefd1bb51352edd06b08d2d
diff --git a/net-misc/ntp/files/man-pages/genmans.sh b/net-misc/ntp/files/man-pages/genmans.sh
new file mode 100755
index 00000000000..bae21e265f9
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/genmans.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+#
+# ntpman.sh -- Create man pages for ntp
+#
+
+VERSION=$1
+if [[ -z ${VERSION} ]] ; then
+ VERSION=$(ls -1d ntp-*/ 2>/dev/null | LC_COLLATE=C sort | sed -n '${s:/::;p;Q}')
+ if [[ -z ${VERSION} ]] ; then
+ VERSION=$(ls "${0%/*}"/../../ntp-*.ebuild | LC_COLLATE=C sort | sed -n '${s:.*/::;s:_::;s:[.]ebuild::;p;Q}')
+ if [[ -z ${VERSION} ]] ; then
+ echo "Usage: $0 <version>"
+ exit 1
+ fi
+ fi
+fi
+[[ ${VERSION} != ntp-* ]] && VERSION="ntp-${VERSION}"
+
+SRCDIR=${0%/*}
+HTMLDIR=${SRCDIR}/${VERSION}/html
+DISTFILE=/usr/portage/distfiles/${VERSION}.tar.gz
+MANDIR=${SRCDIR}/man
+
+rm -rf ${SRCDIR}/${VERSION}
+if [[ ! -d ${HTMLDIR} ]] ; then
+ if [[ -f ${DISTFILE} ]] ; then
+ tar zxf ${DISTFILE} -C ${SRCDIR} || exit 1
+ else
+ echo "ERROR: $HTMLDIR / $DISTFILE does not exist"
+ exit 1
+ fi
+fi
+
+# Process a single HTML file
+processfile() {
+ HTMLFILE=$1
+ MANFILE=$2
+ echo -n "Processing $HTMLFILE ..."
+ sed -e "s:<csobj.*<:csobj>/:" $HTMLDIR/$HTMLFILE > .$HTMLFILE
+ xsltproc --html --stringparam version $VERSION ${SRCDIR}/ntp.xsl .$HTMLFILE > $MANDIR/$MANFILE || exit 1
+ rm -f .$HTMLFILE
+ echo "Done."
+}
+
+# Print information
+echo "Generates ntp man files from HTML documentation. Using:"
+echo "VERSION: $VERSION"
+echo "HTMLDIR: $HTMLDIR"
+echo "MANDIR: $MANDIR"
+echo "Press enter to continue, or Ctrl-C to cancel."
+read
+
+# Process HTML files
+rm -rf ${MANDIR}
+mkdir ${MANDIR}
+for f in ntp{date,dc,d,q,time,trace,dsim} keygen tickadj ; do
+ processfile ${f}.html ${f}.8
+done
+echo
+
+cp -vi /usr/local/src/freebsd/src/usr.sbin/ntp/doc/*.5 ${MANDIR}
+(
+d=${PWD}
+cd ${MANDIR}
+shopt -s nullglob
+for p in $d/*.5.patch ; do
+ patch -F0 -p0 < $p || exit 1
+done
+) || exit 1
+cp -vi ${SRCDIR}/*.patch ${SRCDIR}/genmans.sh ${SRCDIR}/ntp.xsl ${MANDIR}
+
+tar -jcf ${VERSION}-manpages.tar.bz2 -C ${MANDIR}/.. man
+du -b ${VERSION}-manpages.tar.bz2
+
+rm -rf ${MANDIR} ${SRCDIR}/${VERSION}
diff --git a/net-misc/ntp/files/man-pages/ntp.conf.5.patch b/net-misc/ntp/files/man-pages/ntp.conf.5.patch
new file mode 100644
index 00000000000..c3d81230229
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/ntp.conf.5.patch
@@ -0,0 +1,27 @@
+--- ntp.conf.5
++++ ntp.conf.5
+@@ -24,16 +24,6 @@
+ .Fl c
+ command line option).
+ .Pp
+-The
+-.Pa /etc/rc.d/ntpdate
+-script reads this file to get a list of NTP servers to use if the
+-variable
+-.Dq Li ntpdate_hosts
+-was not declared.
+-Refer to the
+-.Xr rc.conf 5
+-man page for further info about this.
+-.Pp
+ The file format is similar to other
+ .Ux
+ configuration files.
+@@ -2686,7 +2676,6 @@
+ Diffie-Hellman agreement parameters
+ .El
+ .Sh SEE ALSO
+-.Xr rc.conf 5 ,
+ .Xr ntpd 8 ,
+ .Xr ntpdc 8 ,
+ .Xr ntpq 8
diff --git a/net-misc/ntp/files/man-pages/ntp.xsl b/net-misc/ntp/files/man-pages/ntp.xsl
new file mode 100644
index 00000000000..ed9c1f8b8e5
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/ntp.xsl
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Description:
+ Stylesheet for converting the HTML documentation
+ for various ntp commands into proper manual pages
+ (in troff format).
+
+Author:
+ Per Cederberg, <per at percederberg dot net>
+-->
+
+<!DOCTYPE stylesheet [
+<!ENTITY newline "
+">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <!-- ### INPUT PARAMETERS ### -->
+ <xsl:param name="version" select="''" />
+
+
+ <!-- ### OUTPUT DECLARATION ### -->
+ <xsl:output method="text"
+ encoding="ISO-8859-1" />
+
+ <xsl:strip-space elements="html" />
+
+
+ <!-- ### TEMPLATES ### -->
+ <xsl:template match="/">
+ <xsl:text>.\" Automatically generated from HTML source. </xsl:text>
+ <xsl:text>DO NOT EDIT!&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="head">
+ <xsl:text>.TH </xsl:text>
+ <xsl:value-of select="substring-before(title, ' ')" />
+ <xsl:text> 1 "" "ntp </xsl:text>
+ <xsl:value-of select="$version" />
+ <xsl:text>"</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.SH NAME</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:value-of select="title" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="body">
+ <xsl:apply-templates select="*[preceding-sibling::hr]" />
+ </xsl:template>
+
+ <xsl:template match="h3">
+ </xsl:template>
+
+ <xsl:template match="h4">
+ <xsl:variable name="text">
+ <xsl:call-template name="stringToUpper">
+ <xsl:with-param name="str" select="." />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="name(preceding-sibling::*[1]) = 'tt'">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ <xsl:text>.SH </xsl:text>
+ <xsl:value-of select="$text" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="address">
+ <xsl:text>.SH AUTHOR</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="p">
+ <xsl:variable name="text">
+ <xsl:apply-templates />
+ </xsl:variable>
+ <xsl:if test="starts-with($text, 'Disclaimer:')">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ <xsl:text>.P</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:value-of select="$text" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dd/p">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="hr">
+ </xsl:template>
+
+ <xsl:template match="pre">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.ft CW</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.nf</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:call-template name="trim-newlines">
+ <xsl:with-param name="str" select="." />
+ </xsl:call-template>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.ft R</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.fi</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="ul">
+ </xsl:template>
+
+ <xsl:template match="nobr">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dl">
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="dt">
+ <xsl:text>.TP&newline;</xsl:text>
+ <xsl:text>.B </xsl:text>
+ <xsl:value-of select="normalize-space(.)" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dd">
+ <xsl:apply-templates />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="tr">
+ <xsl:if test="position() &gt; 1">
+ <xsl:apply-templates />
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="tt">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>\fR </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="i">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>\fI</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>\fR </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="a">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="br">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="text()">
+ <xsl:value-of select="normalize-space(.)" />
+ </xsl:template>
+
+
+ <!-- ### HELPER FUNCTIONS ### -->
+ <xsl:template name="stringToUpper">
+ <xsl:param name="str" />
+ <xsl:value-of select="translate($str,
+ 'abcdefghijklmnopqrstuvwxyz',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+ </xsl:template>
+
+ <xsl:template name="trim-newlines">
+ <xsl:param name="str" />
+ <xsl:choose>
+ <xsl:when test="starts-with($str,'&newline;')">
+ <xsl:call-template name="trim-newlines">
+ <xsl:with-param name="str" select="substring($str, 2)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="trim-newlines-tail">
+ <xsl:with-param name="str" select="$str" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="trim-newlines-tail">
+ <xsl:param name="str" />
+ <xsl:variable name="len" select="string-length($str)" />
+ <xsl:choose>
+ <xsl:when test="substring($str,$len) = '&newline;'">
+ <xsl:call-template name="trim-newlines-tail">
+ <xsl:with-param name="str" select="substring($str, 1, $len - 1)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch b/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch
new file mode 100644
index 00000000000..40625fa18fb
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch
@@ -0,0 +1,33 @@
+https://support.ntp.org/bugs/show_bug.cgi?id=769
+http://bugs.gentoo.org/254030
+
+--- ntp/util/tickadj.c
++++ ntp/util/tickadj.c
+@@ -21,7 +21,8 @@
+ # include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+
+-#ifdef HAVE___ADJTIMEX /* Linux */
++/* proper handling here has been moved to upstream ntp bugzilla */
++#ifdef linux
+
+ #include <sys/timex.h>
+ struct timex txc;
+@@ -91,7 +92,7 @@
+ }
+
+ if (!errflg) {
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ perror("adjtimex");
+ else if (!quiet)
+ printf("tick = %ld\ntick_adj = %d\n",
+@@ -146,7 +147,7 @@
+ #endif
+ }
+
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ {
+ perror("adjtimex");
+ }
diff --git a/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch b/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch
new file mode 100644
index 00000000000..b31ea0adcb9
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch
@@ -0,0 +1,20 @@
+http://bugs.gentoo.org/270483
+
+ripped from fedora
+
+--- ntp-4.2.4p7/include/ntp_syscall.h
++++ ntp-4.2.4p7/include/ntp_syscall.h
+@@ -14,5 +14,13 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
diff --git a/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch b/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch
new file mode 100644
index 00000000000..a1e558052df
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch
@@ -0,0 +1,16 @@
+http://bugs.ntp.org/show_bug.cgi?id=2646
+https://bugs.gentoo.org/533966
+
+--- a/ntpd/ntpd.c
++++ a/ntpd/ntpd.c
+@@ -971,8 +971,8 @@ getgroup:
+ char *captext;
+
+ captext = (0 != interface_interval)
+- ? "cap_sys_time,cap_net_bind_service=pe"
+- : "cap_sys_time=pe";
++ ? "cap_ipc_lock,cap_sys_time,cap_net_bind_service=pe"
++ : "cap_ipc_lock,cap_sys_time=pe";
+ caps = cap_from_text(captext);
+ if (!caps) {
+ msyslog(LOG_ERR,
diff --git a/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch b/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch
new file mode 100644
index 00000000000..bfed86c3cb4
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch
@@ -0,0 +1,164 @@
+Fix ntp-keygen build without OpenSSL
+
+Upstream commit:
+http://bk1.ntp.org/ntp-stable/?PAGE=patch&REV=5497b345z5MNTuNvJWuqPSje25NQTg
+Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=533238
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+Index: ntp-4.2.8/Makefile.am
+===================================================================
+--- ntp-4.2.8.orig/Makefile.am
++++ ntp-4.2.8/Makefile.am
+@@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/lib
+
+ NULL =
+
++# moved sntp first to get libtool and libevent built.
++
+ SUBDIRS = \
++ sntp \
+ scripts \
+ include \
+ libntp \
+@@ -17,7 +20,6 @@ SUBDIRS = \
+ clockstuff \
+ kernel \
+ util \
+- sntp \
+ tests \
+ $(NULL)
+
+@@ -64,7 +66,6 @@ BUILT_SOURCES = \
+ .gcc-warning \
+ libtool \
+ html/.datecheck \
+- sntp/built-sources-only \
+ $(srcdir)/COPYRIGHT \
+ $(srcdir)/.checkChangeLog \
+ $(NULL)
+Index: ntp-4.2.8/configure.ac
+===================================================================
+--- ntp-4.2.8.orig/configure.ac
++++ ntp-4.2.8/configure.ac
+@@ -102,7 +102,7 @@ esac
+ enable_nls=no
+ LIBOPTS_CHECK_NOBUILD([sntp/libopts])
+
+-NTP_ENABLE_LOCAL_LIBEVENT
++NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent])
+
+ NTP_LIBNTP
+
+@@ -771,6 +771,10 @@ esac
+
+ ####
+
++AC_CHECK_FUNCS([arc4random_buf])
++
++####
++
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $LDADD_LIBNTP"
+ AC_CHECK_FUNCS([daemon])
+Index: ntp-4.2.8/libntp/ntp_crypto_rnd.c
+===================================================================
+--- ntp-4.2.8.orig/libntp/ntp_crypto_rnd.c
++++ ntp-4.2.8/libntp/ntp_crypto_rnd.c
+@@ -24,6 +24,21 @@
+ int crypto_rand_init = 0;
+ #endif
+
++#ifndef HAVE_ARC4RANDOM_BUF
++static void
++arc4random_buf(void *buf, size_t nbytes);
++
++void
++evutil_secure_rng_get_bytes(void *buf, size_t nbytes);
++
++static void
++arc4random_buf(void *buf, size_t nbytes)
++{
++ evutil_secure_rng_get_bytes(buf, nbytes);
++ return;
++}
++#endif
++
+ /*
+ * As of late 2014, here's how we plan to provide cryptographic-quality
+ * random numbers:
+Index: ntp-4.2.8/sntp/configure.ac
+===================================================================
+--- ntp-4.2.8.orig/sntp/configure.ac
++++ ntp-4.2.8/sntp/configure.ac
+@@ -97,11 +97,14 @@ esac
+ enable_nls=no
+ LIBOPTS_CHECK
+
+-AM_COND_IF(
+- [BUILD_SNTP],
+- [NTP_LIBEVENT_CHECK],
+- [NTP_LIBEVENT_CHECK_NOBUILD]
+-)
++# From when we only used libevent for sntp:
++#AM_COND_IF(
++# [BUILD_SNTP],
++# [NTP_LIBEVENT_CHECK],
++# [NTP_LIBEVENT_CHECK_NOBUILD]
++#)
++
++NTP_LIBEVENT_CHECK([2])
+
+ # Checks for libraries.
+
+Index: ntp-4.2.8/sntp/m4/ntp_libevent.m4
+===================================================================
+--- ntp-4.2.8.orig/sntp/m4/ntp_libevent.m4
++++ ntp-4.2.8/sntp/m4/ntp_libevent.m4
+@@ -1,4 +1,25 @@
+-dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*-
++# SYNOPSIS -*- Autoconf -*-
++#
++# NTP_ENABLE_LOCAL_LIBEVENT
++# NTP_LIBEVENT_CHECK([MINVERSION [, DIR]])
++# NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]])
++#
++# DESCRIPTION
++#
++# AUTHOR
++#
++# Harlan Stenn
++#
++# LICENSE
++#
++# This file is Copyright (c) 2014 Network Time Foundation
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice,
++# author attribution and this notice are preserved. This file is offered
++# as-is, without any warranty.
++
++dnl NTP_ENABLE_LOCAL_LIBEVENT
+ dnl
+ dnl Provide only the --enable-local-libevent command-line option.
+ dnl
+@@ -29,7 +50,7 @@ dnl If NOBUILD is provided as the 3rd ar
+ dnl but DO NOT invoke DIR/configure if we are going to use our bundled
+ dnl version. This may be the case for nested packages.
+ dnl
+-dnl provide --enable-local-libevent .
++dnl provides --enable-local-libevent .
+ dnl
+ dnl Examples:
+ dnl
+Index: ntp-4.2.8/util/Makefile.am
+===================================================================
+--- ntp-4.2.8.orig/util/Makefile.am
++++ ntp-4.2.8/util/Makefile.am
+@@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
+ LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+ tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
++ntp_keygen_LDADD += $(LDADD_LIBEVENT)
+ ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
+ ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
+
diff --git a/net-misc/ntp/files/ntp-client.confd b/net-misc/ntp/files/ntp-client.confd
new file mode 100644
index 00000000000..786004da83b
--- /dev/null
+++ b/net-misc/ntp/files/ntp-client.confd
@@ -0,0 +1,21 @@
+# /etc/conf.d/ntp-client
+
+# Command to run to set the clock initially
+# Most people should just leave this line alone ...
+# however, if you know what you're doing, and you
+# want to use ntpd to set the clock, change this to 'ntpd'
+NTPCLIENT_CMD="ntpdate"
+
+# Options to pass to the above command
+# This default setting should work fine but you should
+# change the default 'pool.ntp.org' to something closer
+# to your machine. See http://www.pool.ntp.org/ or
+# try running `netselect -s 3 pool.ntp.org`.
+NTPCLIENT_OPTS="-s -b -u \
+ 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org \
+ 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+
+# If you use hostnames above, then you should depend on dns
+# being up & running before we try to run. Otherwise, you
+# can disable this.
+rc_use="dns"
diff --git a/net-misc/ntp/files/ntp-client.rc b/net-misc/ntp/files/ntp-client.rc
new file mode 100644
index 00000000000..451bb3ec7c1
--- /dev/null
+++ b/net-misc/ntp/files/ntp-client.rc
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if ! type "${NTPCLIENT_CMD}" >/dev/null 2>&1 ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
+ return 1
+ fi
+ if [ -z "${NTPCLIENT_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
+ "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/ntp/files/ntp.conf b/net-misc/ntp/files/ntp.conf
new file mode 100644
index 00000000000..97bed8dd13c
--- /dev/null
+++ b/net-misc/ntp/files/ntp.conf
@@ -0,0 +1,54 @@
+# NOTES:
+# DHCP clients can append or replace NTP configuration files.
+# You should consult your DHCP client documentation about its
+# default behaviour and how to change it.
+
+# Name of the servers ntpd should sync with
+# Please respect the access policy as stated by the responsible person.
+#server ntp.example.tld iburst
+
+# Common pool for random people
+#server pool.ntp.org
+
+# Pools for Gentoo users
+server 0.gentoo.pool.ntp.org
+server 1.gentoo.pool.ntp.org
+server 2.gentoo.pool.ntp.org
+server 3.gentoo.pool.ntp.org
+
+##
+# A list of available servers can be found here:
+# http://www.pool.ntp.org/
+# http://www.pool.ntp.org/#use
+# A good way to get servers for your machine is:
+# netselect -s 3 pool.ntp.org
+##
+
+# you should not need to modify the following paths
+driftfile /var/lib/ntp/ntp.drift
+
+#server ntplocal.example.com prefer
+#server timeserver.example.org
+
+# Warning: Using default NTP settings will leave your NTP
+# server accessible to all hosts on the Internet.
+
+# If you want to deny all machines (including your own)
+# from accessing the NTP server, uncomment:
+#restrict default ignore
+
+
+# Default configuration:
+# - Allow only time queries, at a limited rate, sending KoD when in excess.
+# - Allow all local queries (IPv4, IPv6)
+restrict default nomodify nopeer noquery limited kod
+restrict 127.0.0.1
+restrict [::1]
+
+
+# To allow machines within your network to synchronize
+# their clocks with your server, but ensure they are
+# not allowed to configure the server or used as peers
+# to synchronize against, uncomment this line.
+#
+#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
diff --git a/net-misc/ntp/files/ntpd.confd b/net-misc/ntp/files/ntpd.confd
new file mode 100644
index 00000000000..2b74282c577
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/ntpd
+
+# Options to pass to the ntpd process
+# Most people should leave this line alone ...
+# however, if you know what you're doing, feel free to tweak
+NTPD_OPTS="-g -u ntp:ntp"
diff --git a/net-misc/ntp/files/ntpd.rc b/net-misc/ntp/files/ntpd.rc
new file mode 100644
index 00000000000..b1f5de6ab5d
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.rc
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
+
+checkconfig() {
+ if [ ! -f /etc/ntp.conf ] ; then
+ eerror "Please create /etc/ntp.conf"
+ eerror "Sample conf: /usr/share/ntp/ntp.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting ntpd"
+ start-stop-daemon --start --exec /usr/sbin/ntpd \
+ --pidfile /var/run/ntpd.pid \
+ -- -p /var/run/ntpd.pid ${NTPD_OPTS}
+ eend $? "Failed to start ntpd"
+}
+
+stop() {
+ ebegin "Stopping ntpd"
+ start-stop-daemon --stop \
+ --pidfile /var/run/ntpd.pid \
+ --exec /usr/sbin/ntpd
+ eend $? "Failed to stop ntpd"
+}
diff --git a/net-misc/ntp/files/ntpd.rc-r1 b/net-misc/ntp/files/ntpd.rc-r1
new file mode 100644
index 00000000000..f89bdd3c935
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.rc-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="ntpd - the network time protocol daemon"
+pidfile="/var/run/ntpd.pid"
+command="/usr/sbin/ntpd"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
+
+start_pre() {
+ if [ ! -f /etc/ntp.conf ] ; then
+ eerror "Please create /etc/ntp.conf"
+ return 1
+ fi
+ return 0
+}
diff --git a/net-misc/ntp/files/ntpd.service-r1 b/net-misc/ntp/files/ntpd.service-r1
new file mode 100644
index 00000000000..0b6109037c4
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.service-r1
@@ -0,0 +1,10 @@
+[Unit]
+Description=Network Time Service
+After=ntpdate.service sntp.service
+
+[Service]
+ExecStart=/usr/sbin/ntpd -g -n
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpd.service-r2 b/net-misc/ntp/files/ntpd.service-r2
new file mode 100644
index 00000000000..5f11b27e923
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.service-r2
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service
+After=ntpdate.service sntp.service
+Conflicts=systemd-timesyncd.service
+
+[Service]
+ExecStart=/usr/sbin/ntpd -g -n
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service b/net-misc/ntp/files/ntpdate.service
new file mode 100644
index 00000000000..a6c75c9c14c
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Set time via NTP using ntpdate
+After=network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service-r1 b/net-misc/ntp/files/ntpdate.service-r1
new file mode 100644
index 00000000000..f9bc9ddefc9
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service-r1
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via NTP using ntpdate
+After=network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service.conf b/net-misc/ntp/files/ntpdate.service.conf
new file mode 100644
index 00000000000..75e4f41b416
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/files/sntp.confd b/net-misc/ntp/files/sntp.confd
new file mode 100644
index 00000000000..d11983a3fb7
--- /dev/null
+++ b/net-misc/ntp/files/sntp.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/sntp
+
+# Options to pass to sntp
+SNTP_OPTS="-s 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/files/sntp.rc b/net-misc/ntp/files/sntp.rc
new file mode 100644
index 00000000000..b0261d9d57d
--- /dev/null
+++ b/net-misc/ntp/files/sntp.rc
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if [ -z "${SNTP_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/sntp"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via SNTP"
+ /usr/bin/sntp ${SNTP_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/ntp/files/sntp.service-r1 b/net-misc/ntp/files/sntp.service-r1
new file mode 100644
index 00000000000..2686951f641
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target NetworkManager-wait-online.service nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/sntp.service-r2 b/net-misc/ntp/files/sntp.service-r2
new file mode 100644
index 00000000000..9bdd578ffbc
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r2
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target NetworkManager-wait-online.service nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/sntp.service.conf b/net-misc/ntp/files/sntp.service.conf
new file mode 100644
index 00000000000..75e4f41b416
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/metadata.xml b/net-misc/ntp/metadata.xml
new file mode 100644
index 00000000000..50f686d2f43
--- /dev/null
+++ b/net-misc/ntp/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <longdescription>
+NTP is a protocol designed to synchronize the clocks of computers over a network. NTP
+version 3 is an internet draft standard, formalized in RFC 1305. NTP version 4 is a
+significant revision of the NTP standard, and is the current development version, but
+has not been formalized in an RFC. Simple NTP (SNTP) version 4 is described in RFC
+2030.
+</longdescription>
+ <use>
+ <flag name="openntpd">Allow ntp to be installed alongside openntpd</flag>
+ <flag name="parse-clocks">Add support for PARSE clocks</flag>
+ <flag name="samba">Provide support for Samba's signing daemon (needed for Active Directory domain controllers)</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:ntp:ntp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild b/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild
new file mode 100644
index 00000000000..ed074463c8a
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p5-adjtimex.patch #254030
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ append-cppflags -D_GNU_SOURCE #264109
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /usr/share/ntp
+ doins "${FILESDIR}"/ntp.conf
+ cp -r scripts/* "${ED}"/usr/share/ntp/ || die
+ use prefix || fperms -R go-w /usr/share/ntp
+ find "${ED}"/usr/share/ntp \
+ '(' \
+ -name '*.in' -o \
+ -name 'Makefile*' -o \
+ -name support \
+ ')' \
+ -exec rm -r {} \;
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r1 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_dounit "${FILESDIR}"/ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r1 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "You can find an example /etc/ntp.conf in /usr/share/ntp/"
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild b/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild
new file mode 100644
index 00000000000..986c4c94860
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p5-adjtimex.patch #254030
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ append-cppflags -D_GNU_SOURCE #264109
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /usr/share/ntp
+ doins "${FILESDIR}"/ntp.conf
+ cp -r scripts/* "${ED}"/usr/share/ntp/ || die
+ use prefix || fperms -R go-w /usr/share/ntp
+ find "${ED}"/usr/share/ntp \
+ '(' \
+ -name '*.in' -o \
+ -name 'Makefile*' -o \
+ -name support \
+ ')' \
+ -exec rm -r {} \;
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "You can find an example /etc/ntp.conf in /usr/share/ntp/"
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r1.ebuild b/net-misc/ntp/ntp-4.2.8-r1.ebuild
new file mode 100644
index 00000000000..a526ad0f4c3
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+CDEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ >=dev-libs/libevent-2.0.9
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ eautoreconf
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r2.ebuild b/net-misc/ntp/ntp-4.2.8-r2.ebuild
new file mode 100644
index 00000000000..87266e58687
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+ eautoreconf
+
+ # The autoreconf call above recursively ran in all subdirs, and then
+ # ran in the top level. But the libtool call there updated files in
+ # the subdir which broke timestamps causing autotools to re-run. #538270
+ find -type f -exec touch -r . {} +
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r3.ebuild b/net-misc/ntp/ntp-4.2.8-r3.ebuild
new file mode 100644
index 00000000000..a1d0e59eb43
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1 )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+ eautoreconf
+
+ # The autoreconf call above recursively ran in all subdirs, and then
+ # ran in the top level. But the libtool call there updated files in
+ # the subdir which broke timestamps causing autotools to re-run. #538270
+ find -type f -exec touch -r . {} +
+
+ # We want to force a rebuild of this source file though as the shipped one
+ # is broken. #545546
+ rm libparse/info_trimble.c || die
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8_p2.ebuild b/net-misc/ntp/ntp-4.2.8_p2.ebuild
new file mode 100644
index 00000000000..e3b3099a8a2
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1 )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ # Increase the default memlimit from 32MiB to 128MiB. #533232
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ --with-memlock=256 \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8_p3.ebuild b/net-misc/ntp/ntp-4.2.8_p3.ebuild
new file mode 100644
index 00000000000..818647d12d9
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl:0= )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ # Increase the default memlimit from 32MiB to 128MiB. #533232
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ --with-memlock=256 \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}