summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2013-12-02 13:32:25 +0000
committerChristoph Junghans <ottxor@gentoo.org>2013-12-02 13:32:25 +0000
commite0cebae45382a0e3898a3ac2c8e4949c454af718 (patch)
treef27e96b56420a13be4fd328cbcf91f5a2f59dabb /net-misc/openntpd
parentOverride bdist_egg->build_dir via pydistutils.cfg rather than extra command. ... (diff)
downloadhistorical-e0cebae45382a0e3898a3ac2c8e4949c454af718.tar.gz
historical-e0cebae45382a0e3898a3ac2c8e4949c454af718.tar.bz2
historical-e0cebae45382a0e3898a3ac2c8e4949c454af718.zip
added pidfile support (bug #493082), fixed ignored NTPD_OPTS for USE=syslog (bug #493032)
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xC2000586
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/ChangeLog11
-rw-r--r--net-misc/openntpd/Manifest21
-rw-r--r--net-misc/openntpd/files/openntpd-20080406-pidfile.patch141
-rw-r--r--net-misc/openntpd/files/openntpd.conf.d-20080406-r67
-rw-r--r--net-misc/openntpd/files/openntpd.init.d-20080406-r615
-rw-r--r--net-misc/openntpd/openntpd-20080406-r6.ebuild (renamed from net-misc/openntpd/openntpd-20080406-r5.ebuild)23
6 files changed, 199 insertions, 19 deletions
diff --git a/net-misc/openntpd/ChangeLog b/net-misc/openntpd/ChangeLog
index 58b91fa6d62b..87455a07abf9 100644
--- a/net-misc/openntpd/ChangeLog
+++ b/net-misc/openntpd/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/openntpd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.96 2013/12/01 21:07:36 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.97 2013/12/02 13:32:13 ottxor Exp $
+
+*openntpd-20080406-r6 (02 Dec 2013)
+
+ 02 Dec 2013; Christoph Junghans <ottxor@gentoo.org>
+ +files/openntpd-20080406-pidfile.patch, +files/openntpd.conf.d-20080406-r6,
+ +files/openntpd.init.d-20080406-r6, +openntpd-20080406-r6.ebuild,
+ -openntpd-20080406-r5.ebuild:
+ added pidfile support (bug #493082), fixed ignored NTPD_OPTS for USE=syslog
+ (bug #493032)
01 Dec 2013; Christoph Junghans <ottxor@gentoo.org>
openntpd-20080406-r5.ebuild:
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest
index be3846a2a119..3874fbef9f58 100644
--- a/net-misc/openntpd/Manifest
+++ b/net-misc/openntpd/Manifest
@@ -1,10 +1,13 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX openntpd-20080406-pidfile.patch 3500 SHA256 6580ab9290ea19ec17f67b1b59a3790546b58a5c06ed82e660e79e393681ba89 SHA512 9647e53c17330a255ace93e1cc40547de57d6f7337d2cbc0bfb58d4a77f5ad79423421e1c6280db1c31fcafcd77903a8fa60d30d883ee0be671bebce10e557a0 WHIRLPOOL ac289e1a3f6ce41cf4721aa834bd88d993ff144d8b630c55f39e7b96f74de38a0ff609c30baab9e4f5f595cd8ccf7939fb4070432e8f8acca5827a04546e2797
AUX openntpd.conf.d-20080406-r3 159 SHA256 d91274d2c0018dccc562b949df2f0b713ca21e8d1522d5f17d1d6c8d6916fedc SHA512 cfc0557de76c35b374760144612defe6ef178d45e9ce162cecd4651fea472d355210cd855e8e360800bb4f1ca4f06a19dfb4f363ebc4a4e3ca6c960292eb28f6 WHIRLPOOL 27ff1eedcb22360d9c3f61792ed8408d58384258e00fddf21f63c7d949c6514e7ae0a67c113294cb929ba2725af5e4b8f6fe3973f42dea575207184ddca74bfc
+AUX openntpd.conf.d-20080406-r6 255 SHA256 91fb1497b3a6ef0bb3a3d5baefdff801d8ff1cba27aaf742303415550814a09b SHA512 016094e0ac80817c8c1eb8a52a527c8a673b3ee904f2c04bef0304b5dfe1c778a34a2d5321cc5540a1dfe2e14dc878c44a1e54fd0263aca3917600827c6d9059 WHIRLPOOL 9fa127624f50b01ba1b5872262d26b18362d3784a73021e608bd8a6cead2499cabf0fe5eafeaa315548e97285228a6e70689a3cadbdb7031ac00e23bf064e3b9
AUX openntpd.conf.d-3.9_p1-r4 195 SHA256 1980b5dadcd9478e653ef05c099ef45caacfdf12a73a3745b39322f75773a738 SHA512 bd4579b005507f8ff22e901a678b1ba2f82a8064dd19118fae99e31f2e08fa21523ed5e9dce1fbbad9bbb0ee6dfe92f0b254827034333f813e6018bceb9d490f WHIRLPOOL 7af98dab593e701d20f1e3d23f976323d6b083b6c80e73e1c548de5c07ee4c635db3ecf63c3f07a95b18cb1d98bd3878c36b66146caba4bfb09f0637fe5e6094
AUX openntpd.init.d-20080406-r3 500 SHA256 508585d345194726770d9f7471244312c263016a02ffd5769b1722652d798426 SHA512 0d28f2c62f653ef56774c55a10ee87addf96f471acea09c632b5b1fce61fa68646e11ad4e8170f6109ed29c03c32b38f4e1f1163f583cb6ecac7f3b6799f7fc4 WHIRLPOOL 03e95e28d6dc1a5b81c4e3aa41873e4cd0de6d6afc5a169293c5a148f105ea5f73a8b180c13cf751f38a15e097db9e1847e4a1bb5cfd295e4332dfed7a08d427
AUX openntpd.init.d-20080406-r4 504 SHA256 59b5eed7edb1ad53d2312a6208905e6ba53ff5eb7c4e2adf0e77652c5e6cf26d SHA512 287ad4db94c45b807a07798d59e94efbae5cd79f8a9fefafcafd2660f189f66954ebca7f247ca5431855781f8660cb405afa442748fe7019c1d9c6dedfe7325f WHIRLPOOL b8260eaa567d4cf4ee468598f959ef755986ca38fd55e01eefcaee55b3eaf9a79a7f1fa8f79c6f2606b862c9c471878e68b42a093e3b45dc85246792f83d2f2d
+AUX openntpd.init.d-20080406-r6 417 SHA256 fca7183a7676f0f471878925c8fbec20b7a0bff01551c0ad2b34d4d8a826c876 SHA512 e5ea7b26871e92a04713c93b0d60d435839f9321aeea7105330b9d9d4259d98581d6da6224274fae89cf7107329a28a9348c8c40a9372c5fc7bc7f5d47801a3b WHIRLPOOL 72626acd887bb997dae48fb717a94f046e2a3f4b01bad72cffc8da03bf388528149f37c6672362ed0661c9582851ebd77124749dcc9238bb013d6f2ccc2bf78f
AUX openntpd.init.d-3.9_p1-r4 861 SHA256 9ac5287d9c9397e69d62eac8ffc3fb1945ba09f03dce247cd1a2dbca495bf2c8 SHA512 deb4cc60aceda644848696333a776ecc814528ced150da1a062cced615f93cd89888dd825e293b38ea9586bc082782ca236e6e8762b446c317a16a224564fe8c WHIRLPOOL 9842439b95ed36ab61730239811b139654bae01d2e186f93a5029c023a0f1931873658d9331bce7620c572f6f64d64b81cbb5d4a28effa4a15d8ae28d2cfa0aa
AUX openntpd.logrotate-20080406-r5 147 SHA256 5eec235068280a4c1cf7da645e1a52d1d0cd8c171e27d766166c8e1c3c41e6e6 SHA512 5dbd8a3ac70d85b3a5d57e12a7d6f1d6d39c4f0cbe5d238eedf371b731600e9f085c166b7cb5baf5a92f107a4295a84bd0fb7386c18d6e1eda7f48bb62f24835 WHIRLPOOL e8be54f53515f49c1a461dde9c0fb5b071ed0e58d30ef816475bc3786f7e884a1406a7ba7d61c1a1fe45e5f3d8681b92018c847600a28562822311d460a7f2ec
AUX openntpd.service-20080406-r3 147 SHA256 7134fb86571582ec1e4b5c05f5b00ff03c37c7c139c27f86482323d423f7eb87 SHA512 fe296581b497d76e7519d734a9209c468ea25705907e4ac9123eaff2dca72a05d5c308ce4973a29abe404aef7074ba30a75c564e46f29902a8f989ec56cde14f WHIRLPOOL 1a4275693a5c2cd0d4d2d25a6d025a9e5c2902758e40c1039ffe2c7f4eb0078c68ced9e676de3db2ec2311fc02bb7c9e2f76c51bee991f234ed36ce7ebc6e0c8
@@ -13,18 +16,18 @@ DIST openntpd_20080406p-6.debian.tar.gz 11849 SHA256 6718ffb52b7f34c7c3e9532d245
DIST openntpd_20080406p.orig.tar.gz 175923 SHA256 52f473dd8ea8864023ebcdce16a9a50571803af7ffc32a00212242c6a866c3b2 SHA512 9561788002b232786d1589f74bbe2f07a029e3407da4471d2ac9d5e20d8839dbb6e6e53493c78829058611ca23bf00560bbe7bcfe76204d206747752fd47f696 WHIRLPOOL 545125d0ee5ced7827df3d804ac63938d2614e9fb4a2bf3c6bbc17f6040175aa03c057d7a4d3da71ae944f4a556e2b66266d1c6d0463c1cad5d86de3ae896712
EBUILD openntpd-20080406-r3.ebuild 2331 SHA256 8996ee3c13072a00d6e31903c43b172ead665a35137c921bc5d14102399cc3a3 SHA512 060a8dce4f974410ba526aee6e1b1c5b3c8294425eb5c1c42b4a9f0923188ca094ecee69a6a883e2d09971171be60c6b6d59e9563d4924f1020dc3cf3aa21d61 WHIRLPOOL 2fbec384a8c6d942ef441d3e38f948f944b1dbb8193b3168d4a7c0f8b0d2e2c93efdd1c08783f3947aa2b6a2b9df7b032931a09e034211b61385aa45a7006d1b
EBUILD openntpd-20080406-r4.ebuild 2333 SHA256 c6b4dfd6ff48ca8a04896ffa33ecd5094e92ea94178c713e23007dec057cdddd SHA512 c93187265712a6c3143d2972ee8a99b5ffe7bf7b2f9951af466e30df82045c76cd8bf8156d90441445fbe2c45365b683eeca271fc1f87fe330b608d7eca878ac WHIRLPOOL d9162bfd2a7dd7ad0db8d153216d0389a95933fdda74c3419a71f96d43104acac9255cb48aa00f75b185068e4457a33cbd6d7d39ddb381c660f234fa56fadb0f
-EBUILD openntpd-20080406-r5.ebuild 2512 SHA256 c5f1602aa681173cd786615257f07cddd83d6071b867eaa769793e8cbef86633 SHA512 ab48374e9fbbd66882c00b903ab74dd493ebc2d1fd4c2fa0d717c740a71bb142ec623b11a49fe33b2ce6c711c08ef453868aae2c0079a31ba16caeeec1e5abd5 WHIRLPOOL a347880f9154929f9ca7baf3964bccecc0e3fafc17cdddd2913c69c9572dd02545a4f40203a58f55ea69c9c3a474c5c6af133b7fa561a33f9d706ef3ef39b0eb
+EBUILD openntpd-20080406-r6.ebuild 2687 SHA256 18c55f2b2b09e557706841f4e9d1724a956de3969e4973a73920499209bd9a78 SHA512 0da335fb1b82468463b009605301dd17075476e61e0a21866648c9b17ae9ce3eddfca384e704c62e66c951366a69ea56a2cab23b3ac465d026eaeabee0b15c75 WHIRLPOOL 40234590706060eec83dba898e633a5405bd267be7ee6176260732ca9b408051a4541e15d64d9d74dad84e90a543632875c94b810c9eea11879e0b5ea068d337
EBUILD openntpd-20080406.ebuild 1563 SHA256 e69cc07d70292d0c0d51f864ea39beebc9227013e8d8a0e08c404cab2d2a3ce4 SHA512 34757599e21fe30b5f71ca81bbb736e838b9967c2e91cd426e5c1ee15fb20629bc066a3b6b1761a2676d9a9b9a8957ecc1efbdee0705f59a0a4cfecb763a1d6c WHIRLPOOL 6477bb5c761aa1d0cb67805d8eadbb081abd3d0f9f44df1cf8275ced5d369994b2711eb03c93cad38472a8cca5f7510dbde8845cfd2235a229afc4c3e38c98f6
-MISC ChangeLog 13271 SHA256 705c9b5dfe86e0baaca33b0bb0a8eefc8767669da279e6060dc100c39a6d0147 SHA512 a1e103b58a0f9c5a22c817cd419ee665b60380d8ed21f247f848a4b5f26983d95951cffe68fc13559f58fa627de3095bcacb044a8e2abcce0bce48fdcce553b0 WHIRLPOOL 60f9a488d2dbfca2cb1f099ddc92a90c54fb563b89717c859b26d13a361b6890bf3347b6ebccad364ae085a853ea02cb85a0c74ccd27df6df06d9ba655d53563
+MISC ChangeLog 13635 SHA256 d3504d99da4b73254b3e918e471c4201bf9961efc00cb5e9d4215083aa4497f0 SHA512 b698f55573188853a442a607f036c9583ce6677a25e313f83cb56f1adc9305f871d0115fc5b6ef9e6d49a530672de09325b5fbe3456c7d32d2fe8d99a29e2f9e WHIRLPOOL 38194ec8e5e4d7a44724fff7132ab6066c53cc7731070740b7f23c7796535e0847dbc80148a638ad00bfc1b1b56c4049ba8e6e53eac2dc598d162a53f751d692
MISC metadata.xml 507 SHA256 0b48739b9e971d26b7ddd260a7419009be85f1774855660f40e07e4b6c88a1a6 SHA512 b570088b143a26e7ecf28d6cb6a9cc0963899b9462d94bb5c63cd306fe4956f1c69841f12ba6afa67c520968c8a4bdf1d231356502e25564f84f3b5260d109ad WHIRLPOOL 3fa46846b3f005bac272608ce5e32678f8c6129ef968f9f248917558bcc0bf489c83f42850f06d8e7f3e8cf42b470659932867e0f36ca38741728bd1f3bbf773
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQEcBAEBCAAGBQJSm6UZAAoJEOeBhlrCAAWG430H/2Z1xUAQxIKruj2jhI/OoyMx
-m66Fdlx+bFh0D4Vex9u7LZLHVEUXrWGiB/oTa9GVmf0uOBeu3T+7Muryj0B2CBzl
-3NUs21J0zkG4acKadKScj3EDjJNXoOHOWmwvCS8VYSReMNWF6gDHWZgEbhvGic0I
-a2ZpTDM8QZZ4at+1lcAurreYqnNUjJl8UPY+9XaVdruOhfEAL+f9UtCH/zhnF8nC
-g266Prxjgaanzv+Z3UB8dtZubFettdukEIfivXNszI2oIYb0AYrIlAs7nXQpdchp
-3emFHrOYk+4ePCERVGszuxLQ8AqU+zDpAHoJTA+TIpuTRa+cv/E14bSXKw6ZJrU=
-=1+fx
+iQEcBAEBCAAGBQJSnIvkAAoJEOeBhlrCAAWGWwYH/1paDzrCTKrfn8NCv8J0RK/P
+W4P9ItW8V6rm9Tq8VhsfxEs0EdY+MOtDbgJyk9nLtrndyUrXIkohUce/IzQcJJ+i
+LmZhK6VqXZstROkFUr7zBS12gk22dK+io1UmZqXgkT6/JVor2m8g0uTmGPoBIs50
+VbjyFJonE+6oBiig5CRXumq8D/lwqrE5klRSgyKjDFulF3pxTMnksYQhx2wS6+ZX
+Cb5phjkN6fscpBhi/lfC9RxRAO4N31Q00v9LeTxXq8lJw89BB+vqSYWqqNESPk1s
+d23TIJ4ZOBFXsCuF7QOeAqQ7lt53Nd8jiWK/aqvfETzTYz0i2noZQUHvgTQPlh0=
+=7Lb2
-----END PGP SIGNATURE-----
diff --git a/net-misc/openntpd/files/openntpd-20080406-pidfile.patch b/net-misc/openntpd/files/openntpd-20080406-pidfile.patch
new file mode 100644
index 000000000000..d2ee38504c3e
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd-20080406-pidfile.patch
@@ -0,0 +1,141 @@
+adding a -p option to openntpd to create a pidfile
+
+https://bugs.gentoo.org/show_bug.cgi?id=493082
+
+diff -u -r openntpd-20080406p.orig/ntpd.8 openntpd-20080406p/ntpd.8
+--- openntpd-20080406p.orig/ntpd.8 2013-12-01 12:49:49.773116316 -0800
++++ openntpd-20080406p/ntpd.8 2013-12-01 13:27:39.417324497 -0800
+@@ -25,6 +25,7 @@
+ .Bk -words
+ .Op Fl dnSsv
+ .Op Fl f Ar file
++.Op Fl p Ar file
+ .Ek
+ .Sh DESCRIPTION
+ The
+@@ -63,13 +64,16 @@
+ .Xr ntpd.conf 5 .
+ .Pp
+ The options are as follows:
+-.Bl -tag -width "-f fileXXX"
++.Bl -tag -width "-p fileXXX"
+ .It Fl d
+ Do not daemonize.
+ If this option is specified,
+ .Nm
+ will run in the foreground and log to
+ .Em stderr .
++.It Fl p Ar file
++Write pid to
++.Ar file
+ .It Fl f Ar file
+ Use
+ .Ar file
+diff -u -r openntpd-20080406p.orig/ntpd.c openntpd-20080406p/ntpd.c
+--- openntpd-20080406p.orig/ntpd.c 2013-12-01 12:49:49.774116176 -0800
++++ openntpd-20080406p/ntpd.c 2013-12-01 13:31:43.964616270 -0800
+@@ -78,7 +78,7 @@
+ {
+ extern char *__progname;
+
+- fprintf(stderr, "usage: %s [-dnSsv] [-f file]\n", __progname);
++ fprintf(stderr, "usage: %s [-dnSsv] [-f file] [-p file]\n", __progname);
+ exit(1);
+ }
+
+@@ -105,7 +105,7 @@
+ log_init(1); /* log to stderr until daemonized */
+ res_init(); /* XXX */
+
+- while ((ch = getopt(argc, argv, "df:nsSv")) != -1) {
++ while ((ch = getopt(argc, argv, "df:np:sSv")) != -1) {
+ switch (ch) {
+ case 'd':
+ lconf.debug = 1;
+@@ -116,6 +116,9 @@
+ case 'n':
+ lconf.noaction = 1;
+ break;
++ case 'p':
++ lconf.pid_file = optarg;
++ break;
+ case 's':
+ lconf.settime = 1;
+ break;
+@@ -157,9 +160,17 @@
+ reset_adjtime();
+ if (!lconf.settime) {
+ log_init(lconf.debug);
+- if (!lconf.debug)
++ if (!lconf.debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf.pid_file != NULL) {
++ FILE *f = fopen(lconf.pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ } else
+ timeout = SETTIME_TIMEOUT * 1000;
+
+@@ -201,9 +212,17 @@
+ log_init(lconf.debug);
+ log_debug("no reply received in time, skipping initial "
+ "time setting");
+- if (!lconf.debug)
++ if (!lconf.debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf.pid_file != NULL) {
++ FILE *f = fopen(lconf.pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ }
+
+ if (nfds > 0 && (pfd[PFD_PIPE].revents & POLLOUT))
+@@ -242,6 +261,8 @@
+ msgbuf_clear(&ibuf->w);
+ free(ibuf);
+ log_info("Terminating");
++ if (lconf.pid_file != NULL)
++ unlink(lconf.pid_file);
+ return (0);
+ }
+
+@@ -316,9 +337,17 @@
+ memcpy(&d, imsg.data, sizeof(d));
+ ntpd_settime(d);
+ /* daemonize now */
+- if (!lconf->debug)
++ if (!lconf->debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf->pid_file != NULL) {
++ FILE *f = fopen(lconf->pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ lconf->settime = 0;
+ break;
+ case IMSG_HOST_DNS:
+diff -u -r openntpd-20080406p.orig/ntpd.h openntpd-20080406p/ntpd.h
+--- openntpd-20080406p.orig/ntpd.h 2013-12-01 12:49:49.773116316 -0800
++++ openntpd-20080406p/ntpd.h 2013-12-01 12:54:02.023313872 -0800
+@@ -178,6 +178,7 @@
+ u_int8_t debug;
+ u_int32_t scale;
+ u_int8_t noaction;
++ char *pid_file;
+ };
+
+ struct buf {
diff --git a/net-misc/openntpd/files/openntpd.conf.d-20080406-r6 b/net-misc/openntpd/files/openntpd.conf.d-20080406-r6
new file mode 100644
index 000000000000..ccd45459664c
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd.conf.d-20080406-r6
@@ -0,0 +1,7 @@
+# /etc/conf.d/ntpd: config file for openntpd's ntpd
+
+# See ntpd(8) man page ... some popular options:
+# -s Set the time immediately at startup
+# (Note: may cause up to a 15 second startup delay
+# if ntp servers not reachable)
+NTPD_OPTS=""
diff --git a/net-misc/openntpd/files/openntpd.init.d-20080406-r6 b/net-misc/openntpd/files/openntpd.init.d-20080406-r6
new file mode 100644
index 000000000000..2f452e0fd015
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd.init.d-20080406-r6
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.init.d-20080406-r6,v 1.1 2013/12/02 13:32:12 ottxor Exp $
+
+name="OpenNTPD"
+command="/usr/sbin/ntpd"
+pidfile="/run/ntpd.pid"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+
+depend() {
+ need net
+ after ntp-client
+ use dns logger
+}
diff --git a/net-misc/openntpd/openntpd-20080406-r5.ebuild b/net-misc/openntpd/openntpd-20080406-r6.ebuild
index cbaf792db1c8..f690ed753f87 100644
--- a/net-misc/openntpd/openntpd-20080406-r5.ebuild
+++ b/net-misc/openntpd/openntpd-20080406-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-20080406-r5.ebuild,v 1.2 2013/12/01 21:07:36 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-20080406-r6.ebuild,v 1.1 2013/12/02 13:32:13 ottxor Exp $
EAPI=5
@@ -47,6 +47,7 @@ src_prepare() {
sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die
epatch "${WORKDIR}"/debian/patches/*.patch
+ epatch "${FILESDIR}/${P}-pidfile.patch"
sed -i 's:debian:gentoo:g' ntpd.conf || die
eautoreconf # deb patchset touches .ac files and such
}
@@ -61,13 +62,14 @@ src_configure() {
src_install() {
default
- cp "${FILESDIR}/${PN}.init.d-${PV}-r4" "${T}/ntpd" || die
- use !syslog || sed -e '8,12d' -i "${T}/ntpd" || die
- doinitd "${T}/ntpd"
- newconfd "${FILESDIR}/${PN}.conf.d-${PV}-r3" ntpd
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/${PN}.logrotate-${PVR}" "${PN}"
+ if use syslog ; then
+ newinitd "${FILESDIR}/${PN}.init.d-${PV}-r6" ntpd
+ else
+ newinitd "${FILESDIR}/${PN}.init.d-${PV}-r4" ntpd
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate-${PV}-r5" ntpd
+ fi
+ newconfd "${FILESDIR}/${PN}.conf.d-${PV}-r6" ntpd
systemd_newunit "${FILESDIR}/${PN}.service-${PV}-r3" ntpd.service
}
@@ -76,8 +78,11 @@ pkg_postinst() {
# remove localtime file from previous installations
rm -f "${EROOT}${NTP_HOME}"/etc/localtime
mkdir -p "${NTP_HOME}"/etc
- ln -s /etc/localtime "${NTP_HOME}"/etc/localtime || die
+ ln /etc/localtime "${NTP_HOME}"/etc/localtime || die
chown -R root:root "${EROOT}${NTP_HOME}" || die
+
+ use syslog && [[ -f ${EROOT}/var/log/ntpd.log ]] && \
+ ewarn "There is an orphaned logfile '/var/log/ntpd.log', please remove it!"
}
pkg_postrm() {