1 |
commit: ece0a2dfee9a935903137dad3b81649ec64a4786 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 08:20:37 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 08:21:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece0a2df |
7 |
|
8 |
net-misc/ntp: Bump to version 4.2.8_p7 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-misc/ntp/Manifest | 2 + |
14 |
net-misc/ntp/files/ntpd.rc-r1 | 4 +- |
15 |
net-misc/ntp/files/sntp.rc | 12 ++-- |
16 |
net-misc/ntp/ntp-4.2.8_p7.ebuild | 137 +++++++++++++++++++++++++++++++++++++++ |
17 |
4 files changed, 147 insertions(+), 8 deletions(-) |
18 |
|
19 |
diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest |
20 |
index 15e1304..d0f87ce 100644 |
21 |
--- a/net-misc/ntp/Manifest |
22 |
+++ b/net-misc/ntp/Manifest |
23 |
@@ -4,3 +4,5 @@ DIST ntp-4.2.8p5-manpages.tar.bz2 24626 SHA256 a26de4f83a6d8d6e0aa2d20bb6b8c8f76 |
24 |
DIST ntp-4.2.8p5.tar.gz 7138233 SHA256 ca28baf4f6bb6fabdc1b62fd1dcec412be2e621192b40466a469a2496164f696 SHA512 8df3e51027f6bfc5e77b81317b67e75263cb429dc532d21bb5924852f77ea39314a06b94944804991185f93155063cee7c1f28024698ec893c353a4d5561750e WHIRLPOOL bcd60d6ee8b8fd19095fe335cdc05a8d58973ca467c5c603860deaefa43cb25597ded1acf7de57598a2e9a521b7e0fa6d2e544cb1aedd16aad08f44854b9f7fc |
25 |
DIST ntp-4.2.8p6-manpages.tar.bz2 24616 SHA256 0c062d240e03320fde25b8824a5cc9b37ee9f50b84325f50b5a0d1f2278e8ee0 SHA512 63b4f6d5183c582229b898dc7799e43664c9111e7eae79e8d3a53972b822883f4ff99782598fa951957460e4d4c7308adb2deef8154a5d26ab1ebc3c18c098aa WHIRLPOOL 0f009fd3b9e6c60e7c1a2c53b4e1a8ccb0d993fde748b0b10614f01a2ea79d30721def1f8ce71285bf4bdf8065bf0458c30af570b98ea8b67ebf4b2d59a86037 |
26 |
DIST ntp-4.2.8p6.tar.gz 7152557 SHA256 583d0e1c573ace30a9c6afbea0fc52cae9c8c916dbc15c026e485a0dda4ba048 SHA512 797d07980c0b71453f32ae821ef496add0fe712a2bf960ab1af18f0b54caa6029d65238ef7606d1ffb53e2e95c88623b4fb228399b5d4dde9a5fa1b7e256f71b WHIRLPOOL 0a320405dea0239fec9d6d6566e6e8cd7eb37a16232267f822befe4f4c8a359d672d6d58a5e755f7410234482bc7b2198649547dfb49f252b66ac7cee3351e13 |
27 |
+DIST ntp-4.2.8p7-manpages.tar.xz 24988 SHA256 fead8e2c2c7db74c12ba145725932e94595469e128443c01df692889a6efcf33 SHA512 0753c44a51d19af3d6ad24b757a8ebcdaec107cc2d976599d0af15d8e1b91b02223e2af9a78dd8ded22bb041821dee1381db8342679b5e58b65fa3a8916b7f79 WHIRLPOOL 666ffac116a52efb25e6ea072c5fbc79d26181d20f5aa4d2ff9c02056de67d3d2276e593942cc91804e21ddb5660734c9bfe76f60d0c33844cb2d45899c28d17 |
28 |
+DIST ntp-4.2.8p7.tar.gz 7175313 SHA256 81d20c06a0b01abe3b84fac092185bf014252d38fe5e7b2758f604680a0220dc SHA512 7b80192f0e3c4a05cc05f167ab85593acca685d514dcd46fb8f42b4cd2a5525e76ba5e15fd7ff13220e4155de6aab5661554e0ded60bfb1d27a969c589958f55 WHIRLPOOL 858f9f0f22ece06c304f2e19cfd3743facc5f2794d758f88528f2cebbb68f8d7d93dd93d976c1bdb912ad8f7ec4c5c2d6b669d3b2f7723337a70c50da033a323 |
29 |
|
30 |
diff --git a/net-misc/ntp/files/ntpd.rc-r1 b/net-misc/ntp/files/ntpd.rc-r1 |
31 |
index f89bdd3..5bed5ce 100644 |
32 |
--- a/net-misc/ntp/files/ntpd.rc-r1 |
33 |
+++ b/net-misc/ntp/files/ntpd.rc-r1 |
34 |
@@ -1,5 +1,5 @@ |
35 |
-#!/sbin/runscript |
36 |
-# Copyright 1999-2014 Gentoo Foundation |
37 |
+#!/sbin/openrc-run |
38 |
+# Copyright 1999-2016 Gentoo Foundation |
39 |
# Distributed under the terms of the GNU General Public License v2 |
40 |
# $Id$ |
41 |
|
42 |
|
43 |
diff --git a/net-misc/ntp/files/sntp.rc b/net-misc/ntp/files/sntp.rc |
44 |
index b0261d9..5b3b463 100644 |
45 |
--- a/net-misc/ntp/files/sntp.rc |
46 |
+++ b/net-misc/ntp/files/sntp.rc |
47 |
@@ -1,15 +1,17 @@ |
48 |
-#!/sbin/runscript |
49 |
-# Copyright 1999-2013 Gentoo Foundation |
50 |
+#!/sbin/openrc-run |
51 |
+# Copyright 1999-2016 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Id$ |
54 |
|
55 |
+command="/usr/bin/sntp" |
56 |
+ |
57 |
depend() { |
58 |
before cron portmap |
59 |
after net |
60 |
use dns logger |
61 |
} |
62 |
|
63 |
-checkconfig() { |
64 |
+start_pre() { |
65 |
if [ -z "${SNTP_OPTS}" ] ; then |
66 |
eerror "Please edit /etc/conf.d/sntp" |
67 |
eerror "I need to know what server/options to use!" |
68 |
@@ -19,9 +21,7 @@ checkconfig() { |
69 |
} |
70 |
|
71 |
start() { |
72 |
- checkconfig || return $? |
73 |
- |
74 |
ebegin "Setting clock via SNTP" |
75 |
- /usr/bin/sntp ${SNTP_OPTS} |
76 |
+ ${command} ${SNTP_OPTS} |
77 |
eend $? "Failed to set clock" |
78 |
} |
79 |
|
80 |
diff --git a/net-misc/ntp/ntp-4.2.8_p7.ebuild b/net-misc/ntp/ntp-4.2.8_p7.ebuild |
81 |
new file mode 100644 |
82 |
index 0000000..49ee982 |
83 |
--- /dev/null |
84 |
+++ b/net-misc/ntp/ntp-4.2.8_p7.ebuild |
85 |
@@ -0,0 +1,137 @@ |
86 |
+# Copyright 1999-2016 Gentoo Foundation |
87 |
+# Distributed under the terms of the GNU General Public License v2 |
88 |
+# $Id$ |
89 |
+ |
90 |
+EAPI="5" |
91 |
+ |
92 |
+inherit eutils toolchain-funcs flag-o-matic user systemd |
93 |
+ |
94 |
+MY_P=${P/_p/p} |
95 |
+DESCRIPTION="Network Time Protocol suite/programs" |
96 |
+HOMEPAGE="http://www.ntp.org/" |
97 |
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz |
98 |
+ https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz" |
99 |
+ |
100 |
+LICENSE="HPND BSD ISC" |
101 |
+SLOT="0" |
102 |
+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" |
103 |
+IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf" |
104 |
+ |
105 |
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= ) |
106 |
+ >=dev-libs/libevent-2.0.9[threads?] |
107 |
+ kernel_linux? ( caps? ( sys-libs/libcap ) ) |
108 |
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) |
109 |
+ !openntpd? ( !net-misc/openntpd ) |
110 |
+ snmp? ( net-analyzer/net-snmp ) |
111 |
+ ssl? ( |
112 |
+ !libressl? ( dev-libs/openssl:0= ) |
113 |
+ libressl? ( dev-libs/libressl ) |
114 |
+ ) |
115 |
+ parse-clocks? ( net-misc/pps-tools )" |
116 |
+DEPEND="${CDEPEND} |
117 |
+ virtual/pkgconfig" |
118 |
+RDEPEND="${CDEPEND} |
119 |
+ selinux? ( sec-policy/selinux-ntp ) |
120 |
+ vim-syntax? ( app-vim/ntp-syntax )" |
121 |
+PDEPEND="openntpd? ( net-misc/openntpd )" |
122 |
+ |
123 |
+S=${WORKDIR}/${MY_P} |
124 |
+ |
125 |
+PATCHES=( |
126 |
+ "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966 |
127 |
+ "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922 |
128 |
+ "${FILESDIR}"/${PN}-4.2.8-ntpd-test-signd.patch |
129 |
+) |
130 |
+ |
131 |
+pkg_setup() { |
132 |
+ enewgroup ntp 123 |
133 |
+ enewuser ntp 123 -1 /dev/null ntp |
134 |
+} |
135 |
+ |
136 |
+src_prepare() { |
137 |
+ epatch "${PATCHES[@]}" |
138 |
+ append-cppflags -D_GNU_SOURCE #264109 |
139 |
+ # Make sure every build uses the same install layout. #539092 |
140 |
+ find sntp/loc/ -type f '!' -name legacy -delete || die |
141 |
+ # Disable pointless checks. |
142 |
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck |
143 |
+} |
144 |
+ |
145 |
+src_configure() { |
146 |
+ # avoid libmd5/libelf |
147 |
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no |
148 |
+ export ac_cv_lib_elf_nlist=no |
149 |
+ # blah, no real configure options #176333 |
150 |
+ export ac_cv_header_dns_sd_h=$(usex zeroconf) |
151 |
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h} |
152 |
+ # Increase the default memlimit from 32MiB to 128MiB. #533232 |
153 |
+ econf \ |
154 |
+ --with-lineeditlibs=readline,edit,editline \ |
155 |
+ --with-yielding-select \ |
156 |
+ --disable-local-libevent \ |
157 |
+ --docdir='$(datarootdir)'/doc/${PF} \ |
158 |
+ --htmldir='$(docdir)/html' \ |
159 |
+ --with-memlock=256 \ |
160 |
+ $(use_enable caps linuxcaps) \ |
161 |
+ $(use_enable parse-clocks) \ |
162 |
+ $(use_enable ipv6) \ |
163 |
+ $(use_enable debug debugging) \ |
164 |
+ $(use_with readline lineeditlibs readline) \ |
165 |
+ $(use_enable samba ntp-signd) \ |
166 |
+ $(use_with snmp ntpsnmpd) \ |
167 |
+ $(use_with ssl crypto) \ |
168 |
+ $(use_enable threads thread-support) |
169 |
+} |
170 |
+ |
171 |
+src_install() { |
172 |
+ default |
173 |
+ # move ntpd/ntpdate to sbin #66671 |
174 |
+ dodir /usr/sbin |
175 |
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin" |
176 |
+ |
177 |
+ dodoc INSTALL WHERE-TO-START |
178 |
+ doman "${WORKDIR}"/man/*.[58] |
179 |
+ |
180 |
+ insinto /etc |
181 |
+ doins "${FILESDIR}"/ntp.conf |
182 |
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726 |
183 |
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd |
184 |
+ newconfd "${FILESDIR}"/ntpd.confd ntpd |
185 |
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client |
186 |
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client |
187 |
+ newinitd "${FILESDIR}"/sntp.rc sntp |
188 |
+ newconfd "${FILESDIR}"/sntp.confd sntp |
189 |
+ if ! use caps ; then |
190 |
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die |
191 |
+ fi |
192 |
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die |
193 |
+ |
194 |
+ keepdir /var/lib/ntp |
195 |
+ use prefix || fowners ntp:ntp /var/lib/ntp |
196 |
+ |
197 |
+ if use openntpd ; then |
198 |
+ cd "${ED}" |
199 |
+ rm usr/sbin/ntpd || die |
200 |
+ rm -r var/lib |
201 |
+ rm etc/{conf,init}.d/ntpd |
202 |
+ rm usr/share/man/*/ntpd.8 || die |
203 |
+ else |
204 |
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service |
205 |
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service |
206 |
+ systemd_enable_ntpunit 60-ntpd ntpd.service |
207 |
+ fi |
208 |
+ |
209 |
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service |
210 |
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf |
211 |
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service |
212 |
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf |
213 |
+} |
214 |
+ |
215 |
+pkg_postinst() { |
216 |
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then |
217 |
+ eerror "The notrust option was found in your /etc/ntp.conf!" |
218 |
+ ewarn "If your ntpd starts sending out weird responses," |
219 |
+ ewarn "then make sure you have keys properly setup and see" |
220 |
+ ewarn "https://bugs.gentoo.org/41827" |
221 |
+ fi |
222 |
+} |