1 |
commit: f55c32a55520092034056e81c583585c9601acd2 |
2 |
Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 1 18:04:48 2016 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 1 18:04:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f55c32a5 |
7 |
|
8 |
net-misc/openntpd: remove old |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
net-misc/openntpd/Manifest | 2 - |
13 |
.../files/openntpd-20080406-dns-timeout.patch | 46 ------- |
14 |
.../openntpd/files/openntpd-20080406-pidfile.patch | 141 --------------------- |
15 |
.../openntpd/files/openntpd-20080406-signal.patch | 57 --------- |
16 |
net-misc/openntpd/openntpd-4.0_pre20080406.ebuild | 105 --------------- |
17 |
5 files changed, 351 deletions(-) |
18 |
|
19 |
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest |
20 |
index b610e73..bea2d47 100644 |
21 |
--- a/net-misc/openntpd/Manifest |
22 |
+++ b/net-misc/openntpd/Manifest |
23 |
@@ -1,3 +1 @@ |
24 |
DIST openntpd-5.7p4.tar.gz 427900 SHA256 a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 SHA512 2a185139c915482086069fa19dd3070884a415137d1688059559d2da892928afbbe2fa0a8ade70d474809710265dcc05906abaf261892d7894e70272e2e516ef WHIRLPOOL 9464941e0f055ecd1db19a03bb5264a1dce02c6c7c2be078d1e3a19b5bd0a3c4e19ee6768617c90ebed01dea32f3a63751f9ef0436f56e22b7e6bd673a065546 |
25 |
-DIST openntpd_20080406p-6.debian.tar.gz 11849 SHA256 6718ffb52b7f34c7c3e9532d245f31ee5c749bac2cc2c2d4594d8161925a3122 SHA512 f857fbc85e29035470af0855c8fc416c188f55586ba2e1d719159ecfa4a0274ba4dd526409dfd915056a1c15f5e44cb8c40196a7e03c3026c5d73851ebb5abc8 WHIRLPOOL 35bc0ab16d161c7878d438641eede8425238fbce4d32f6b56e347252e6ad561dc1a5795e3bc3cf133fa09dccb69520cb9837c7134bc0fe6cec9ea14be314ee51 |
26 |
-DIST openntpd_20080406p.orig.tar.gz 175923 SHA256 52f473dd8ea8864023ebcdce16a9a50571803af7ffc32a00212242c6a866c3b2 SHA512 9561788002b232786d1589f74bbe2f07a029e3407da4471d2ac9d5e20d8839dbb6e6e53493c78829058611ca23bf00560bbe7bcfe76204d206747752fd47f696 WHIRLPOOL 545125d0ee5ced7827df3d804ac63938d2614e9fb4a2bf3c6bbc17f6040175aa03c057d7a4d3da71ae944f4a556e2b66266d1c6d0463c1cad5d86de3ae896712 |
27 |
|
28 |
diff --git a/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch b/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch |
29 |
deleted file mode 100644 |
30 |
index 6026037..0000000 |
31 |
--- a/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch |
32 |
+++ /dev/null |
33 |
@@ -1,46 +0,0 @@ |
34 |
-fix dns lookups timeout |
35 |
-https://bugs.gentoo.org/show_bug.cgi?id=493358 |
36 |
- |
37 |
-diff -u openntpd-20080406p-orig/ntpd.c openntpd-20080406p/ntpd.c |
38 |
---- openntpd-20080406p-orig/ntpd.c 2013-12-04 20:12:02.562857933 -0800 |
39 |
-+++ openntpd-20080406p/ntpd.c 2013-12-04 20:22:55.617577783 -0800 |
40 |
-@@ -34,6 +34,7 @@ |
41 |
- #include <stdio.h> |
42 |
- #include <stdlib.h> |
43 |
- #include <string.h> |
44 |
-+#include <time.h> |
45 |
- #include <unistd.h> |
46 |
- |
47 |
- #include "ntpd.h" |
48 |
-@@ -95,6 +96,7 @@ |
49 |
- int ch, nfds, timeout = INFTIM; |
50 |
- int pipe_chld[2]; |
51 |
- extern char *__progname; |
52 |
-+ time_t start_time; |
53 |
- |
54 |
- __progname = _compat_get_progname(argv[0]); |
55 |
- |
56 |
-@@ -197,6 +199,8 @@ |
57 |
- fatal(NULL); |
58 |
- imsg_init(ibuf, pipe_chld[0]); |
59 |
- |
60 |
-+ start_time = getmonotime(); |
61 |
-+ |
62 |
- while (quit == 0) { |
63 |
- pfd[PFD_PIPE].fd = ibuf->fd; |
64 |
- pfd[PFD_PIPE].events = POLLIN; |
65 |
-@@ -209,11 +213,12 @@ |
66 |
- quit = 1; |
67 |
- } |
68 |
- |
69 |
-- if (nfds == 0 && lconf.settime) { |
70 |
-+ if (lconf.settime && |
71 |
-+ (nfds == 0 || getmonotime() > start_time+SETTIME_TIMEOUT)) { |
72 |
- lconf.settime = 0; |
73 |
- timeout = INFTIM; |
74 |
- log_init(lconf.debug); |
75 |
-- log_debug("no reply received in time, skipping initial " |
76 |
-+ log_warnx("no reply received in time, skipping initial " |
77 |
- "time setting"); |
78 |
- if (!lconf.debug) { |
79 |
- if (daemon(1, 0)) |
80 |
|
81 |
diff --git a/net-misc/openntpd/files/openntpd-20080406-pidfile.patch b/net-misc/openntpd/files/openntpd-20080406-pidfile.patch |
82 |
deleted file mode 100644 |
83 |
index d2ee385..0000000 |
84 |
--- a/net-misc/openntpd/files/openntpd-20080406-pidfile.patch |
85 |
+++ /dev/null |
86 |
@@ -1,141 +0,0 @@ |
87 |
-adding a -p option to openntpd to create a pidfile |
88 |
- |
89 |
-https://bugs.gentoo.org/show_bug.cgi?id=493082 |
90 |
- |
91 |
-diff -u -r openntpd-20080406p.orig/ntpd.8 openntpd-20080406p/ntpd.8 |
92 |
---- openntpd-20080406p.orig/ntpd.8 2013-12-01 12:49:49.773116316 -0800 |
93 |
-+++ openntpd-20080406p/ntpd.8 2013-12-01 13:27:39.417324497 -0800 |
94 |
-@@ -25,6 +25,7 @@ |
95 |
- .Bk -words |
96 |
- .Op Fl dnSsv |
97 |
- .Op Fl f Ar file |
98 |
-+.Op Fl p Ar file |
99 |
- .Ek |
100 |
- .Sh DESCRIPTION |
101 |
- The |
102 |
-@@ -63,13 +64,16 @@ |
103 |
- .Xr ntpd.conf 5 . |
104 |
- .Pp |
105 |
- The options are as follows: |
106 |
--.Bl -tag -width "-f fileXXX" |
107 |
-+.Bl -tag -width "-p fileXXX" |
108 |
- .It Fl d |
109 |
- Do not daemonize. |
110 |
- If this option is specified, |
111 |
- .Nm |
112 |
- will run in the foreground and log to |
113 |
- .Em stderr . |
114 |
-+.It Fl p Ar file |
115 |
-+Write pid to |
116 |
-+.Ar file |
117 |
- .It Fl f Ar file |
118 |
- Use |
119 |
- .Ar file |
120 |
-diff -u -r openntpd-20080406p.orig/ntpd.c openntpd-20080406p/ntpd.c |
121 |
---- openntpd-20080406p.orig/ntpd.c 2013-12-01 12:49:49.774116176 -0800 |
122 |
-+++ openntpd-20080406p/ntpd.c 2013-12-01 13:31:43.964616270 -0800 |
123 |
-@@ -78,7 +78,7 @@ |
124 |
- { |
125 |
- extern char *__progname; |
126 |
- |
127 |
-- fprintf(stderr, "usage: %s [-dnSsv] [-f file]\n", __progname); |
128 |
-+ fprintf(stderr, "usage: %s [-dnSsv] [-f file] [-p file]\n", __progname); |
129 |
- exit(1); |
130 |
- } |
131 |
- |
132 |
-@@ -105,7 +105,7 @@ |
133 |
- log_init(1); /* log to stderr until daemonized */ |
134 |
- res_init(); /* XXX */ |
135 |
- |
136 |
-- while ((ch = getopt(argc, argv, "df:nsSv")) != -1) { |
137 |
-+ while ((ch = getopt(argc, argv, "df:np:sSv")) != -1) { |
138 |
- switch (ch) { |
139 |
- case 'd': |
140 |
- lconf.debug = 1; |
141 |
-@@ -116,6 +116,9 @@ |
142 |
- case 'n': |
143 |
- lconf.noaction = 1; |
144 |
- break; |
145 |
-+ case 'p': |
146 |
-+ lconf.pid_file = optarg; |
147 |
-+ break; |
148 |
- case 's': |
149 |
- lconf.settime = 1; |
150 |
- break; |
151 |
-@@ -157,9 +160,17 @@ |
152 |
- reset_adjtime(); |
153 |
- if (!lconf.settime) { |
154 |
- log_init(lconf.debug); |
155 |
-- if (!lconf.debug) |
156 |
-+ if (!lconf.debug) { |
157 |
- if (daemon(1, 0)) |
158 |
- fatal("daemon"); |
159 |
-+ else if (lconf.pid_file != NULL) { |
160 |
-+ FILE *f = fopen(lconf.pid_file, "w"); |
161 |
-+ if (f == NULL) |
162 |
-+ fatal("couldn't open pid file"); |
163 |
-+ fprintf(f, "%ld\n", (long) getpid()); |
164 |
-+ fclose(f); |
165 |
-+ } |
166 |
-+ } |
167 |
- } else |
168 |
- timeout = SETTIME_TIMEOUT * 1000; |
169 |
- |
170 |
-@@ -201,9 +212,17 @@ |
171 |
- log_init(lconf.debug); |
172 |
- log_debug("no reply received in time, skipping initial " |
173 |
- "time setting"); |
174 |
-- if (!lconf.debug) |
175 |
-+ if (!lconf.debug) { |
176 |
- if (daemon(1, 0)) |
177 |
- fatal("daemon"); |
178 |
-+ else if (lconf.pid_file != NULL) { |
179 |
-+ FILE *f = fopen(lconf.pid_file, "w"); |
180 |
-+ if (f == NULL) |
181 |
-+ fatal("couldn't open pid file"); |
182 |
-+ fprintf(f, "%ld\n", (long) getpid()); |
183 |
-+ fclose(f); |
184 |
-+ } |
185 |
-+ } |
186 |
- } |
187 |
- |
188 |
- if (nfds > 0 && (pfd[PFD_PIPE].revents & POLLOUT)) |
189 |
-@@ -242,6 +261,8 @@ |
190 |
- msgbuf_clear(&ibuf->w); |
191 |
- free(ibuf); |
192 |
- log_info("Terminating"); |
193 |
-+ if (lconf.pid_file != NULL) |
194 |
-+ unlink(lconf.pid_file); |
195 |
- return (0); |
196 |
- } |
197 |
- |
198 |
-@@ -316,9 +337,17 @@ |
199 |
- memcpy(&d, imsg.data, sizeof(d)); |
200 |
- ntpd_settime(d); |
201 |
- /* daemonize now */ |
202 |
-- if (!lconf->debug) |
203 |
-+ if (!lconf->debug) { |
204 |
- if (daemon(1, 0)) |
205 |
- fatal("daemon"); |
206 |
-+ else if (lconf->pid_file != NULL) { |
207 |
-+ FILE *f = fopen(lconf->pid_file, "w"); |
208 |
-+ if (f == NULL) |
209 |
-+ fatal("couldn't open pid file"); |
210 |
-+ fprintf(f, "%ld\n", (long) getpid()); |
211 |
-+ fclose(f); |
212 |
-+ } |
213 |
-+ } |
214 |
- lconf->settime = 0; |
215 |
- break; |
216 |
- case IMSG_HOST_DNS: |
217 |
-diff -u -r openntpd-20080406p.orig/ntpd.h openntpd-20080406p/ntpd.h |
218 |
---- openntpd-20080406p.orig/ntpd.h 2013-12-01 12:49:49.773116316 -0800 |
219 |
-+++ openntpd-20080406p/ntpd.h 2013-12-01 12:54:02.023313872 -0800 |
220 |
-@@ -178,6 +178,7 @@ |
221 |
- u_int8_t debug; |
222 |
- u_int32_t scale; |
223 |
- u_int8_t noaction; |
224 |
-+ char *pid_file; |
225 |
- }; |
226 |
- |
227 |
- struct buf { |
228 |
|
229 |
diff --git a/net-misc/openntpd/files/openntpd-20080406-signal.patch b/net-misc/openntpd/files/openntpd-20080406-signal.patch |
230 |
deleted file mode 100644 |
231 |
index 695beec..0000000 |
232 |
--- a/net-misc/openntpd/files/openntpd-20080406-signal.patch |
233 |
+++ /dev/null |
234 |
@@ -1,57 +0,0 @@ |
235 |
-allow SIGUSR1 as stand-in for SIGINFO (on e.g linux) |
236 |
-https://bugs.gentoo.org/show_bug.cgi?id=493084 |
237 |
- |
238 |
-diff -u openntpd-20080406p-orig/ntp.c openntpd-20080406p/ntp.c |
239 |
---- openntpd-20080406p-orig/ntp.c 2013-12-04 15:11:04.417274938 -0800 |
240 |
-+++ openntpd-20080406p/ntp.c 2013-12-04 15:12:21.066006404 -0800 |
241 |
-@@ -67,9 +67,11 @@ |
242 |
- break; |
243 |
- #ifdef HAVE_SIGINFO |
244 |
- case SIGINFO: |
245 |
-- ntp_report = 1; |
246 |
-- break; |
247 |
-+#else |
248 |
-+ case SIGUSR1: |
249 |
- #endif |
250 |
-+ ntp_report = 1; |
251 |
-+ break; |
252 |
- } |
253 |
- } |
254 |
- |
255 |
-@@ -158,6 +160,8 @@ |
256 |
- signal(SIGINT, ntp_sighdlr); |
257 |
- #ifdef USE_SIGINFO |
258 |
- signal(SIGINFO, ntp_sighdlr); |
259 |
-+#else |
260 |
-+ signal(SIGUSR1, ntp_sighdlr); |
261 |
- #endif |
262 |
- signal(SIGPIPE, SIG_IGN); |
263 |
- signal(SIGHUP, SIG_IGN); |
264 |
-diff -u openntpd-20080406p-orig/ntpd.8 openntpd-20080406p/ntpd.8 |
265 |
---- openntpd-20080406p-orig/ntpd.8 2013-12-04 15:11:04.416274915 -0800 |
266 |
-+++ openntpd-20080406p/ntpd.8 2013-12-04 15:12:21.066006404 -0800 |
267 |
-@@ -104,7 +104,11 @@ |
268 |
- .Nm |
269 |
- receives a |
270 |
- .Dv SIGINFO |
271 |
--signal, it will write its peer and sensor status to syslog. |
272 |
-+signal (or a |
273 |
-+.Dv SIGUSR1 |
274 |
-+signal on systems without |
275 |
-+.Dv SIGINFO |
276 |
-+), it will write its peer and sensor status to syslog. |
277 |
- .Sh FILES |
278 |
- .Bl -tag -width "/var/lib/openntpd/ntpd.driftXXX" -compact |
279 |
- .It Pa /etc/ntpd.conf |
280 |
-diff -u openntpd-20080406p-orig/ntpd.c openntpd-20080406p/ntpd.c |
281 |
---- openntpd-20080406p-orig/ntpd.c 2013-12-04 15:11:04.416274915 -0800 |
282 |
-+++ openntpd-20080406p/ntpd.c 2013-12-04 15:14:21.586728922 -0800 |
283 |
-@@ -187,6 +187,9 @@ |
284 |
- signal(SIGTERM, sighdlr); |
285 |
- signal(SIGINT, sighdlr); |
286 |
- signal(SIGHUP, sighdlr); |
287 |
-+ #ifndef HAVE_SIGINFO |
288 |
-+ signal(SIGUSR1, SIG_IGN); |
289 |
-+ #endif |
290 |
- |
291 |
- close(pipe_chld[1]); |
292 |
|
293 |
diff --git a/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild b/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild |
294 |
deleted file mode 100644 |
295 |
index e790857..0000000 |
296 |
--- a/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild |
297 |
+++ /dev/null |
298 |
@@ -1,105 +0,0 @@ |
299 |
-# Copyright 1999-2015 Gentoo Foundation |
300 |
-# Distributed under the terms of the GNU General Public License v2 |
301 |
-# $Id$ |
302 |
- |
303 |
-EAPI=5 |
304 |
- |
305 |
-inherit autotools eutils toolchain-funcs systemd user |
306 |
- |
307 |
-MY_PV=${PV##*pre} |
308 |
-MY_P="${PN}_${MY_PV}p" |
309 |
-DEB_VER="6" |
310 |
-DESCRIPTION="Lightweight NTP server ported from OpenBSD" |
311 |
-HOMEPAGE="http://www.openntpd.org/" |
312 |
-SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.gz |
313 |
- mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}-${DEB_VER}.debian.tar.gz" |
314 |
- |
315 |
-LICENSE="BSD GPL-2" |
316 |
-SLOT="0" |
317 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" |
318 |
-IUSE="ssl selinux" |
319 |
- |
320 |
-CDEPEND="ssl? ( dev-libs/openssl ) |
321 |
- !<=net-misc/ntp-4.2.0-r2 |
322 |
- !net-misc/ntp[-openntpd]" |
323 |
-DEPEND="${CDEPEND} |
324 |
- virtual/yacc" |
325 |
-RDEPEND="${CDEPEND} |
326 |
- selinux? ( sec-policy/selinux-ntp ) |
327 |
-" |
328 |
- |
329 |
-S="${WORKDIR}/${MY_P/_/-}" |
330 |
- |
331 |
-pkg_setup() { |
332 |
- export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}" |
333 |
- enewgroup ntp |
334 |
- enewuser ntp -1 -1 "${NTP_HOME}" ntp |
335 |
- |
336 |
- # make sure user has correct HOME as flipng between |
337 |
- # the standard ntp pkg and this one was possible in |
338 |
- # the past |
339 |
- if [[ $(egethome ntp) != ${NTP_HOME} ]]; then |
340 |
- ewarn "From this version on, the homedir of the ntp user cannot be changed" |
341 |
- ewarn "dynamically after the installation. For homedir different from" |
342 |
- ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge." |
343 |
- esethome ntp "${NTP_HOME}" |
344 |
- fi |
345 |
-} |
346 |
- |
347 |
-src_prepare() { |
348 |
- sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die |
349 |
- |
350 |
- epatch "${WORKDIR}"/debian/patches/*.patch |
351 |
- epatch "${FILESDIR}/${PN}-${MY_PV}-pidfile.patch" |
352 |
- epatch "${FILESDIR}/${PN}-${MY_PV}-signal.patch" |
353 |
- epatch "${FILESDIR}/${PN}-${MY_PV}-dns-timeout.patch" |
354 |
- sed -i 's:debian:gentoo:g' ntpd.conf || die |
355 |
- eautoreconf # deb patchset touches .ac files and such |
356 |
-} |
357 |
- |
358 |
-src_configure() { |
359 |
- econf \ |
360 |
- --disable-strip \ |
361 |
- $(use_with !ssl builtin-arc4random) \ |
362 |
- AR="$(type -p $(tc-getAR))" |
363 |
-} |
364 |
- |
365 |
-src_install() { |
366 |
- default |
367 |
- rmdir "${ED}"/{var/empty,var} |
368 |
- |
369 |
- newinitd "${FILESDIR}/${PN}.init.d-${MY_PV}-r6" ntpd |
370 |
- newconfd "${FILESDIR}/${PN}.conf.d-${MY_PV}-r6" ntpd |
371 |
- |
372 |
- systemd_newunit "${FILESDIR}/${PN}.service-${MY_PV}-r4" ntpd.service |
373 |
-} |
374 |
- |
375 |
-pkg_config() { |
376 |
- einfo "Setting up chroot for ntp in ${NTP_HOME}" |
377 |
- # remove localtime file from previous installations |
378 |
- rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime |
379 |
- mkdir -p "${EROOT%/}${NTP_HOME}"/etc |
380 |
- if ! ln "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime ; then |
381 |
- cp "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime || die |
382 |
- einfo "We could not create a hardlink from /etc/localtime to ${NTP_HOME}/etc/localtime," |
383 |
- einfo "so please run 'emerge --config =${CATEGORY}/${PF}' whenever you changed" |
384 |
- einfo "your timezone." |
385 |
- fi |
386 |
- chown -R root:root "${EROOT%/}${NTP_HOME}" || die |
387 |
-} |
388 |
- |
389 |
-pkg_postinst() { |
390 |
- pkg_config |
391 |
- |
392 |
- [[ -f ${EROOT}var/log/ntpd.log ]] && \ |
393 |
- ewarn "There is an orphaned logfile '${EROOT}var/log/ntpd.log', please remove it!" |
394 |
- |
395 |
- # bug #226491, remove <=openntpd-20080406-r7 trash |
396 |
- rm -f "${EROOT%/}${NTP_HOME}"etc/localtime |
397 |
- [-d "${EROOT%/}${NTP_HOME}"etc ] && rmdir "${EROOT%/}${NTP_HOME}"etc |
398 |
-} |
399 |
- |
400 |
-pkg_postrm() { |
401 |
- # remove localtime file from previous installations |
402 |
- rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime |
403 |
-} |