1 |
commit: 3258d7f48cd61a5a116b857de94fa02547a3f06d |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 4 17:53:47 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 5 14:00:41 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3258d7f4 |
7 |
|
8 |
net-misc/chrony: systemd changes/fixes |
9 |
|
10 |
Use upstream unit file with a couple tweaks. |
11 |
Stop installing obsolete[1] ntp-units.d file. |
12 |
|
13 |
[1] https://github.com/systemd/systemd/commit/b72ddf0f4f552dd53d6404b6ddbc9f17d02b8e12 |
14 |
|
15 |
....4_pre1-r1.ebuild => chrony-3.4_pre1-r2.ebuild} | 10 ++++---- |
16 |
net-misc/chrony/chrony-9999.ebuild | 12 ++++++---- |
17 |
net-misc/chrony/files/chronyd-systemd-gentoo.patch | 28 ++++++++++++++++++++++ |
18 |
3 files changed, 41 insertions(+), 9 deletions(-) |
19 |
|
20 |
diff --git a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild |
21 |
similarity index 96% |
22 |
rename from net-misc/chrony/chrony-3.4_pre1-r1.ebuild |
23 |
rename to net-misc/chrony/chrony-3.4_pre1-r2.ebuild |
24 |
index a39dc7b24dc..2b17b91c999 100644 |
25 |
--- a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild |
26 |
+++ b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild |
27 |
@@ -36,12 +36,15 @@ RESTRICT=test |
28 |
|
29 |
S="${WORKDIR}/${P/_/-}" |
30 |
|
31 |
+PATCHES=( |
32 |
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch |
33 |
+) |
34 |
+ |
35 |
src_prepare() { |
36 |
+ default |
37 |
sed -i \ |
38 |
-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \ |
39 |
doc/* examples/* || die |
40 |
- |
41 |
- default |
42 |
} |
43 |
|
44 |
src_configure() { |
45 |
@@ -116,6 +119,5 @@ src_install() { |
46 |
insinto /etc/logrotate.d |
47 |
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony |
48 |
|
49 |
- systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service |
50 |
- systemd_enable_ntpunit 50-chrony chronyd.service |
51 |
+ systemd_dounit examples/chronyd.service |
52 |
} |
53 |
|
54 |
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild |
55 |
index 1878efaf91d..ac4e878733e 100644 |
56 |
--- a/net-misc/chrony/chrony-9999.ebuild |
57 |
+++ b/net-misc/chrony/chrony-9999.ebuild |
58 |
@@ -1,4 +1,4 @@ |
59 |
-# Copyright 1999-2017 Gentoo Foundation |
60 |
+# Copyright 1999-2018 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
|
63 |
EAPI=6 |
64 |
@@ -33,13 +33,16 @@ RDEPEND=" |
65 |
RESTRICT=test |
66 |
S="${WORKDIR}/${P/_/-}" |
67 |
|
68 |
+PATCHES=( |
69 |
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch |
70 |
+) |
71 |
+ |
72 |
src_prepare() { |
73 |
+ default |
74 |
sed -i \ |
75 |
-e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \ |
76 |
-e 's:/var/run:/run:g' \ |
77 |
conf.c doc/*.adoc examples/* || die |
78 |
- |
79 |
- default |
80 |
} |
81 |
|
82 |
src_configure() { |
83 |
@@ -111,6 +114,5 @@ src_install() { |
84 |
insinto /etc/logrotate.d |
85 |
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony |
86 |
|
87 |
- systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service |
88 |
- systemd_enable_ntpunit 50-chrony chronyd.service |
89 |
+ systemd_dounit examples/chronyd.service |
90 |
} |
91 |
|
92 |
diff --git a/net-misc/chrony/files/chronyd-systemd-gentoo.patch b/net-misc/chrony/files/chronyd-systemd-gentoo.patch |
93 |
new file mode 100644 |
94 |
index 00000000000..63d6b7ed339 |
95 |
--- /dev/null |
96 |
+++ b/net-misc/chrony/files/chronyd-systemd-gentoo.patch |
97 |
@@ -0,0 +1,28 @@ |
98 |
+From ba3ddefc90f58d30a365104cf6e930333e3a2704 Mon Sep 17 00:00:00 2001 |
99 |
+From: Mike Gilbert <floppym@g.o> |
100 |
+Date: Tue, 4 Sep 2018 13:01:06 -0400 |
101 |
+Subject: [PATCH] Tweak chronyd.service for Gentoo |
102 |
+ |
103 |
+--- |
104 |
+ examples/chronyd.service | 5 ++--- |
105 |
+ 1 file changed, 2 insertions(+), 3 deletions(-) |
106 |
+ |
107 |
+diff --git a/examples/chronyd.service b/examples/chronyd.service |
108 |
+index 1777413..ceed830 100644 |
109 |
+--- a/examples/chronyd.service |
110 |
++++ b/examples/chronyd.service |
111 |
+@@ -7,9 +7,8 @@ ConditionCapability=CAP_SYS_TIME |
112 |
+ |
113 |
+ [Service] |
114 |
+ Type=forking |
115 |
+-PIDFile=/var/run/chrony/chronyd.pid |
116 |
+-EnvironmentFile=-/etc/sysconfig/chronyd |
117 |
+-ExecStart=/usr/sbin/chronyd $OPTIONS |
118 |
++PIDFile=/run/chrony/chronyd.pid |
119 |
++ExecStart=/usr/sbin/chronyd |
120 |
+ PrivateTmp=yes |
121 |
+ ProtectHome=yes |
122 |
+ ProtectSystem=full |
123 |
+-- |
124 |
+2.18.0 |
125 |
+ |