1 |
commit: e8a5709a53937562315e56da075d4048e77cacad |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 29 16:42:39 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Jul 29 16:42:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=e8a5709a |
7 |
|
8 |
net-misc/chrony: add 3.2_pre1 |
9 |
|
10 |
Uses GNU regex extension 'GLOB_MAGIC', which is not in musl. |
11 |
|
12 |
net-misc/chrony/Manifest | 8 ++ |
13 |
net-misc/chrony/chrony-3.2_pre1.ebuild | 123 +++++++++++++++++++++ |
14 |
net-misc/chrony/files/chrony-2.4-r1.logrotate | 7 ++ |
15 |
.../chrony/files/chrony-3.2-no-glob_magic.patch | 14 +++ |
16 |
net-misc/chrony/files/chronyd.conf | 12 ++ |
17 |
net-misc/chrony/files/chronyd.init-r1 | 69 ++++++++++++ |
18 |
net-misc/chrony/files/chronyd.service-r2 | 12 ++ |
19 |
net-misc/chrony/metadata.xml | 30 +++++ |
20 |
8 files changed, 275 insertions(+) |
21 |
|
22 |
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..6577756 |
25 |
--- /dev/null |
26 |
+++ b/net-misc/chrony/Manifest |
27 |
@@ -0,0 +1,8 @@ |
28 |
+AUX chrony-2.4-r1.logrotate 131 SHA256 834647530769c6ae29db6a5dcdba04b97c1537f17f5908aebd7938c2140ba17e SHA512 e6febb744476be6c83ac086f2054dc2c190b6e1abd2cf20d4187f222b2485817f06c4ad62b8d40fcea3e18a771cf21899fe0a1dafbfb31f5c99da9092d24d79b WHIRLPOOL 338393e500fb49eb90ff83b66e1b1467a7e3aedf0cbc334a6d636232cbf64bff547a43917aec0192a3c1091c204344ebdbaf2eabd40cf2a180f43454fb422e47 |
29 |
+AUX chrony-3.2-no-glob_magic.patch 404 SHA256 0e85df5fcc6138ea67636a9f0295efd6ec423a24d461ee6e2e5333d7a5cf62b0 SHA512 0ab70920e1807262ebbabe6fec8228d9dd79a3906383d873dcc0c1de69bdb352dc6145e1a8e39d115c16afce6db6833ce3735aad4e8b7a085e9fe82f2513d342 WHIRLPOOL d040b389ee12b0813a0ca835215c17fee4c047d083a07f7e3b18dcb57b0b88ac0963491fe9712dd1252890e31cc9f22faa8da675f0a42c454e2b3b602b50e8fa |
30 |
+AUX chronyd.conf 378 SHA256 29040502f86c419dbfbc7e2627cc658a8df82b37da21b3d1fce2eed9136d8f99 SHA512 6919c7bddce2a8f81c0f2759c7c58506e97f89102bfeb7b5c19c6da5ed4cbd9070faddd4f3fb411bb4c653fffbdcc93a7f7dc810f38b199f038b1d4072f57640 WHIRLPOOL 14e6e90959e434475f8d74a144fd342588e99a7102b15cedbf7a436ca32db3e09bbe4bd2630634fac9045db4b75a6c7afcd8f91c67bd8bb4f977d821d220ced9 |
31 |
+AUX chronyd.init-r1 1637 SHA256 f3c8b8dfbb1ee14b251d3502cb799411aa4fb71d107ddd90b41b4841eee22f5c SHA512 cbfafe8210cc3d86d417d590fa6c54924ef9f3487c3766a17fffb34d2421a5fc2dfb98ce53dcc33c5811e7c2fd428a235bfde68d999cb50c7d9e5100f769a37b WHIRLPOOL d1b31217ede912611bf7aec69a37d4321913cff0e41f8dfe1df1ff1a6605fd21bbfbdced53ea6e9dc0a22ff5848fe0b705ddf0a6b0e5154ddd4e9b6ed1fe656a |
32 |
+AUX chronyd.service-r2 261 SHA256 d5996c6b8596e137b36099d0ce7974bfd8e36411d999712d2f0393ac738f3754 SHA512 671415208e123628e123575d708dbe4ed7946bc45832dce506d539cc747e84ae63783b53398e96a60d815f1758fe44836f34d804e28859538cf560715474dffe WHIRLPOOL f95d9472ad30fb06e3d0014ddc2be492dd1a6d2b5590bed27214ba1b0566d83e89e108a8df3de9dade939a9feff005bfff431d796f9e813388830e3f3dfc437b |
33 |
+DIST chrony-3.2-pre1.tar.gz 431211 SHA256 3c6fa2fe71ba670955498dcecab6a57c0b4ed8bc5a761629e96cd6038946942f SHA512 8ce54f246c3e11e72d90ba03e6f39894445eed314b26113c4a98b5746a00c1886291bf1bb20db68318c3310350b36ea6c88fe05607ae82e551ee93aea6e3fcb6 WHIRLPOOL 1fdf2b0d66b048b448e184b947416bd5ac10996633a41b77749f787ac88b2e605925174483ba8b52f398a1adc8c79b56a2c75d759d187066981dad8045c32eb2 |
34 |
+EBUILD chrony-3.2_pre1.ebuild 2958 SHA256 15b6207d43ca1de44d3369d7e2730096f536f6881fe950531acfd7f74c4a1521 SHA512 e83a6d0a53c86d47613432c03f9cd7ef5f825ee3728667bd44cf14f80d667c7384c1abd3e7a8864dafa3a1ecc7cc83c7381a71a5591a3ac14a4b913acc06ddde WHIRLPOOL 582e8e29e71e6dc2a6c02e1ad6db7031ff06e22b004a730b3083aa32c08cd1f8771e603d401076356a08d2c301baa3e4399be608d832fc7a2ab59bd3e2bd79b4 |
35 |
+MISC metadata.xml 1566 SHA256 df519c8729414da92dabce3e6fcfd98e7cbee2c3ca31c1271d280d63f39cfdc2 SHA512 bc9d33fa4f146feb7b934ffa6cf8e4d235316f23b9e08dbd6bf6d071496508a9c1dfbed2fca686244360ef848acdeec0d3b96992601aeb669c30482f9ca5ee84 WHIRLPOOL 12b3b29c032ba953e7d945d5a7cc1264e03468fe0c9c7201bc0cc82a1927c253856f714fcce957dc74eb95f23457265ac3e08925b9a4a3530e5a710d93275c96 |
36 |
|
37 |
diff --git a/net-misc/chrony/chrony-3.2_pre1.ebuild b/net-misc/chrony/chrony-3.2_pre1.ebuild |
38 |
new file mode 100644 |
39 |
index 0000000..24347f5 |
40 |
--- /dev/null |
41 |
+++ b/net-misc/chrony/chrony-3.2_pre1.ebuild |
42 |
@@ -0,0 +1,123 @@ |
43 |
+# Copyright 1999-2017 Gentoo Foundation |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=6 |
47 |
+inherit eutils systemd toolchain-funcs |
48 |
+ |
49 |
+DESCRIPTION="NTP client and server programs" |
50 |
+HOMEPAGE="https://chrony.tuxfamily.org/" |
51 |
+SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" |
52 |
+LICENSE="GPL-2" |
53 |
+SLOT="0" |
54 |
+ |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64" |
56 |
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns" |
57 |
+REQUIRED_USE=" |
58 |
+ ?? ( libedit readline ) |
59 |
+" |
60 |
+ |
61 |
+CDEPEND=" |
62 |
+ caps? ( sys-libs/libcap ) |
63 |
+ libedit? ( dev-libs/libedit ) |
64 |
+ readline? ( >=sys-libs/readline-4.1-r4:= ) |
65 |
+ seccomp? ( sys-libs/libseccomp ) |
66 |
+" |
67 |
+DEPEND=" |
68 |
+ ${CDEPEND} |
69 |
+ html? ( dev-ruby/asciidoctor ) |
70 |
+ pps? ( net-misc/pps-tools ) |
71 |
+" |
72 |
+RDEPEND=" |
73 |
+ ${CDEPEND} |
74 |
+ selinux? ( sec-policy/selinux-chronyd ) |
75 |
+" |
76 |
+ |
77 |
+PATCHES=( "${FILESDIR}"/${PN}-3.2-no-glob_magic.patch ) |
78 |
+ |
79 |
+RESTRICT=test |
80 |
+ |
81 |
+S="${WORKDIR}/${P/_/-}" |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ sed -i \ |
85 |
+ -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \ |
86 |
+ -e 's:/var/run:/run:g' \ |
87 |
+ conf.c doc/*.man.in examples/* || die |
88 |
+ |
89 |
+ default |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ tc-export CC |
94 |
+ |
95 |
+ local CHRONY_EDITLINE |
96 |
+ # ./configure legend: |
97 |
+ # --disable-readline : disable line editing entirely |
98 |
+ # --without-readline : do not use sys-libs/readline (enabled by default) |
99 |
+ # --without-editline : do not use dev-libs/libedit (enabled by default) |
100 |
+ if ! use readline && ! use libedit; then |
101 |
+ CHRONY_EDITLINE='--disable-readline' |
102 |
+ else |
103 |
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)" |
104 |
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)" |
105 |
+ fi |
106 |
+ |
107 |
+ # not an autotools generated script |
108 |
+ local CHRONY_CONFIGURE=" |
109 |
+ ./configure \ |
110 |
+ $(use_enable seccomp scfilter) \ |
111 |
+ $(usex adns '' --disable-asyncdns) \ |
112 |
+ $(usex caps '' --disable-linuxcaps) \ |
113 |
+ $(usex cmdmon '' --disable-cmdmon) \ |
114 |
+ $(usex ipv6 '' --disable-ipv6) \ |
115 |
+ $(usex ntp '' --disable-ntp) \ |
116 |
+ $(usex phc '' --disable-phc) \ |
117 |
+ $(usex pps '' --disable-pps) \ |
118 |
+ $(usex refclock '' --disable-refclock) \ |
119 |
+ $(usex rtc '' --disable-rtc) \ |
120 |
+ ${CHRONY_EDITLINE} \ |
121 |
+ ${EXTRA_ECONF} \ |
122 |
+ --docdir=/usr/share/doc/${PF} \ |
123 |
+ --chronysockdir=/run/chrony \ |
124 |
+ --mandir=/usr/share/man \ |
125 |
+ --prefix=/usr \ |
126 |
+ --sysconfdir=/etc/chrony \ |
127 |
+ --disable-sechash \ |
128 |
+ --without-nss \ |
129 |
+ --without-tomcrypt |
130 |
+ " |
131 |
+ |
132 |
+ # print the ./configure call to aid in future debugging |
133 |
+ einfo ${CHRONY_CONFIGURE} |
134 |
+ bash ${CHRONY_CONFIGURE} || die |
135 |
+} |
136 |
+ |
137 |
+src_compile() { |
138 |
+ emake all docs $(usex html '' 'ADOC=true') |
139 |
+} |
140 |
+ |
141 |
+src_install() { |
142 |
+ default |
143 |
+ |
144 |
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd |
145 |
+ newconfd "${FILESDIR}"/chronyd.conf chronyd |
146 |
+ |
147 |
+ insinto /etc/${PN} |
148 |
+ newins examples/chrony.conf.example1 chrony.conf |
149 |
+ |
150 |
+ docinto examples |
151 |
+ dodoc examples/*.example* |
152 |
+ |
153 |
+ if use html; then |
154 |
+ docinto html |
155 |
+ dodoc doc/*.html |
156 |
+ fi |
157 |
+ |
158 |
+ keepdir /var/{lib,log}/chrony |
159 |
+ |
160 |
+ insinto /etc/logrotate.d |
161 |
+ newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony |
162 |
+ |
163 |
+ systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service |
164 |
+ systemd_enable_ntpunit 50-chrony chronyd.service |
165 |
+} |
166 |
|
167 |
diff --git a/net-misc/chrony/files/chrony-2.4-r1.logrotate b/net-misc/chrony/files/chrony-2.4-r1.logrotate |
168 |
new file mode 100644 |
169 |
index 0000000..a2cf8fe |
170 |
--- /dev/null |
171 |
+++ b/net-misc/chrony/files/chrony-2.4-r1.logrotate |
172 |
@@ -0,0 +1,7 @@ |
173 |
+/var/log/chrony/*.log { |
174 |
+ missingok |
175 |
+ sharedscripts |
176 |
+ postrotate |
177 |
+ /usr/bin/chronyc cyclelogs |grep -v '^200 OK'; exit 0 |
178 |
+ endscript |
179 |
+} |
180 |
|
181 |
diff --git a/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch b/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch |
182 |
new file mode 100644 |
183 |
index 0000000..4b07f47 |
184 |
--- /dev/null |
185 |
+++ b/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch |
186 |
@@ -0,0 +1,14 @@ |
187 |
+diff -Naur chrony-3.2-pre1.orig/conf.c chrony-3.2-pre1/conf.c |
188 |
+--- chrony-3.2-pre1.orig/conf.c 2017-07-29 09:37:52.464925620 -0700 |
189 |
++++ chrony-3.2-pre1/conf.c 2017-07-29 09:39:11.161169295 -0700 |
190 |
+@@ -42,6 +42,10 @@ |
191 |
+ #include "cmdparse.h" |
192 |
+ #include "util.h" |
193 |
+ |
194 |
++#if !defined(GLOB_NOMAGIC) |
195 |
++#define GLOB_NOMAGIC 0 |
196 |
++#endif |
197 |
++ |
198 |
+ /* ================================================== */ |
199 |
+ /* Forward prototypes */ |
200 |
+ |
201 |
|
202 |
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf |
203 |
new file mode 100644 |
204 |
index 0000000..fc43a95 |
205 |
--- /dev/null |
206 |
+++ b/net-misc/chrony/files/chronyd.conf |
207 |
@@ -0,0 +1,12 @@ |
208 |
+# /etc/conf.d/chronyd |
209 |
+ |
210 |
+CFGFILE="/etc/chrony/chrony.conf" |
211 |
+ |
212 |
+# Configuration dependant options : |
213 |
+# -s - Set system time from RTC if rtcfile directive present |
214 |
+# -r - Reload sample histories if dumponexit directive present |
215 |
+# |
216 |
+# The combination of "-s -r" allows chronyd to perform long term averaging of |
217 |
+# the gain or loss rate across system reboots and shutdowns. |
218 |
+ |
219 |
+ARGS="" |
220 |
|
221 |
diff --git a/net-misc/chrony/files/chronyd.init-r1 b/net-misc/chrony/files/chronyd.init-r1 |
222 |
new file mode 100644 |
223 |
index 0000000..a76e253 |
224 |
--- /dev/null |
225 |
+++ b/net-misc/chrony/files/chronyd.init-r1 |
226 |
@@ -0,0 +1,69 @@ |
227 |
+#!/sbin/openrc-run |
228 |
+# Copyright 1999-2013 Gentoo Foundation |
229 |
+# Distributed under the terms of the GNU General Public License v2 |
230 |
+ |
231 |
+depend() { |
232 |
+ use dns |
233 |
+} |
234 |
+ |
235 |
+checkconfig() { |
236 |
+ # Note that /etc/chrony/chrony.keys is *NOT* checked. This |
237 |
+ # is because the user may have specified another key |
238 |
+ # file, and we don't want to force the user to use that |
239 |
+ # exact name for the key file. |
240 |
+ if [ ! -f "${CFGFILE}" ] ; then |
241 |
+ eerror "Please create ${CFGFILE} and the" |
242 |
+ eerror "chrony key file (usually /etc/chrony/chrony.keys)" |
243 |
+ eerror "by using the" |
244 |
+ eerror "" |
245 |
+ eerror " chrony.conf.example" |
246 |
+ eerror " chrony.keys.example" |
247 |
+ eerror "" |
248 |
+ eerror "files (from the documentation directory)" |
249 |
+ eerror "as templates." |
250 |
+ return 1 |
251 |
+ else |
252 |
+ # Actually, I tried it, and chrony seems to ignore the pidfile |
253 |
+ # option. I'm going to leave it here anyway, since you never |
254 |
+ # know if it might be handy |
255 |
+ PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"` |
256 |
+ fi |
257 |
+ return 0 |
258 |
+} |
259 |
+ |
260 |
+setxtrarg() { |
261 |
+ if [ -c /dev/rtc ]; then |
262 |
+ grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s" |
263 |
+ fi |
264 |
+ grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r" |
265 |
+ return 0 |
266 |
+} |
267 |
+ |
268 |
+start() { |
269 |
+ checkconfig || return $? |
270 |
+ setxtrarg |
271 |
+ |
272 |
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid |
273 |
+ |
274 |
+ ebegin "Starting chronyd" |
275 |
+ start-stop-daemon \ |
276 |
+ --start \ |
277 |
+ --quiet \ |
278 |
+ --exec /usr/sbin/chronyd \ |
279 |
+ --pidfile "${PIDFILE}" \ |
280 |
+ -- -f "${CFGFILE}" ${ARGS} |
281 |
+ eend $? "Failed to start chronyd" |
282 |
+} |
283 |
+ |
284 |
+stop() { |
285 |
+ checkconfig || return $? |
286 |
+ |
287 |
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid |
288 |
+ |
289 |
+ ebegin "Stopping chronyd" |
290 |
+ start-stop-daemon \ |
291 |
+ --stop \ |
292 |
+ --quiet \ |
293 |
+ --pidfile "${PIDFILE}" |
294 |
+ eend $? "Failed to stop chronyd" |
295 |
+} |
296 |
|
297 |
diff --git a/net-misc/chrony/files/chronyd.service-r2 b/net-misc/chrony/files/chronyd.service-r2 |
298 |
new file mode 100644 |
299 |
index 0000000..9025567 |
300 |
--- /dev/null |
301 |
+++ b/net-misc/chrony/files/chronyd.service-r2 |
302 |
@@ -0,0 +1,12 @@ |
303 |
+[Unit] |
304 |
+Description=Chrony Network Time Service |
305 |
+After=ntpdate.service sntp.service network.target |
306 |
+Conflicts=ntpd.service systemd-timesyncd.service |
307 |
+ |
308 |
+[Service] |
309 |
+Type=forking |
310 |
+ExecStart=/usr/sbin/chronyd |
311 |
+PIDFile=/run/chronyd.pid |
312 |
+ |
313 |
+[Install] |
314 |
+WantedBy=multi-user.target |
315 |
|
316 |
diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml |
317 |
new file mode 100644 |
318 |
index 0000000..fe0c5f6 |
319 |
--- /dev/null |
320 |
+++ b/net-misc/chrony/metadata.xml |
321 |
@@ -0,0 +1,30 @@ |
322 |
+<?xml version="1.0" encoding="UTF-8"?> |
323 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
324 |
+<pkgmetadata> |
325 |
+<maintainer type="person"> |
326 |
+ <email>jer@g.o</email> |
327 |
+</maintainer> |
328 |
+<longdescription> |
329 |
+Chrony is a pair of programs (chronyd and chronyc) which are used to maintain |
330 |
+the accuracy of the system clock on a computer. chronyd has been specifically |
331 |
+written to work well for systems which have only an intermittent (e.g. dial-up) |
332 |
+connection to the network where the NTP servers are. It still works well |
333 |
+in a "permanently connected" mode. |
334 |
+</longdescription> |
335 |
+<longdescription lang="ja"> |
336 |
+Chrony はコンピュータのシステム・クロックの精度を保つために使われるプログラムの |
337 |
+ペア(chronyd と chronyc)です。chronyd は NTP サーバがあるネットワークと断続的な |
338 |
+接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的 |
339 |
+な接続でも機能します。 |
340 |
+</longdescription> |
341 |
+<use> |
342 |
+<flag name="cmdmon">Support for command and monitoring</flag> |
343 |
+<flag name="html">Install HTML documentation</flag> |
344 |
+<flag name="ntp">Support for the Network Time Protocol (NTP)</flag> |
345 |
+<flag name="phc">Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface</flag> |
346 |
+<flag name="pps">Support for the Linux Pulse Per Second (PPS) interface</flag> |
347 |
+<flag name="refclock">Support for reference clocks</flag> |
348 |
+<flag name="rtc">Support for the Linux Real Time Clock interface</flag> |
349 |
+<flag name="adns">Support for asynchronous DNS</flag> |
350 |
+</use> |
351 |
+</pkgmetadata> |