net-misc/ntp: Removed old.

Package-Manager: portage-2.2.26
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
This commit is contained in:
Lars Wendler
2016-01-13 11:19:30 +01:00
parent ed43728414
commit 1e5928de34
15 changed files with 0 additions and 1230 deletions

View File

@@ -1,9 +1,3 @@
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
DIST ntp-4.2.8p4-manpages.tar.bz2 24655 SHA256 fe368d6c30c8c9c3f6e7959b00fc82695e122b29d597090f3725a9a00de92da6 SHA512 80a56b5b736810e4c04e128ce5565fc3834dc0b899b2fdd4173c8dd7f53d353209b648186d0183b9aecd9debec60f2d0b179d229032971876269810bd72096a7 WHIRLPOOL b97331e8e565377bac8fe6cc53cbab0e20a36357f3c142d68505b31104187b117e823ddabbe767e841efbd28b8c0476c460e00cd777619e8f190c7fa2aac0e9e

View File

@@ -1,33 +0,0 @@
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");
}

View File

@@ -1,20 +0,0 @@
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

View File

@@ -1,164 +0,0 @@
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

View File

@@ -1,36 +0,0 @@
#!/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"
}

View File

@@ -1,10 +0,0 @@
[Unit]
Description=Network Time Service
After=ntpdate.service sntp.service
[Service]
ExecStart=/usr/sbin/ntpd -g -n
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@@ -1,13 +0,0 @@
[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

View File

@@ -1,13 +0,0 @@
[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

View File

@@ -1,136 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,136 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,129 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,140 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,136 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,128 +0,0 @@
# 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 "https://bugs.gentoo.org/41827"
fi
}

View File

@@ -1,130 +0,0 @@
# 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
epatch "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
epatch "${FILESDIR}"/${PN}-4.2.8-ntpd-test-signd.patch
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 "https://bugs.gentoo.org/41827"
fi
}