summaryrefslogtreecommitdiff
path: root/net-misc/chrony
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/chrony')
-rw-r--r--net-misc/chrony/Manifest10
-rw-r--r--net-misc/chrony/chrony-3.3.ebuild2
-rw-r--r--net-misc/chrony/chrony-3.4_pre1-r2.ebuild (renamed from net-misc/chrony/chrony-3.2.ebuild)24
-rw-r--r--net-misc/chrony/chrony-9999.ebuild25
-rw-r--r--net-misc/chrony/files/chronyd-systemd-gentoo.patch28
-rw-r--r--net-misc/chrony/files/chronyd.init-r270
6 files changed, 132 insertions, 27 deletions
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest
index c75d825a3ff8..b06ae505d680 100644
--- a/net-misc/chrony/Manifest
+++ b/net-misc/chrony/Manifest
@@ -1,13 +1,15 @@
AUX chrony-2.4-r1.logrotate 131 BLAKE2B 4e649ce1c126639ea73c4e03d42175d1715b1c321544376ff2e48d67ee13bebcf04a8fea56326bf5efe66f568913dc92ff7f16a641ffb39a456e9cdac6004a6c SHA512 e6febb744476be6c83ac086f2054dc2c190b6e1abd2cf20d4187f222b2485817f06c4ad62b8d40fcea3e18a771cf21899fe0a1dafbfb31f5c99da9092d24d79b
+AUX chronyd-systemd-gentoo.patch 765 BLAKE2B 541cf597dcecb800f569847e813edfbfaa13130fee2d1b991de710ff2936cc593aad65497505e99da3f563288e0d52d52432f392817a45c5fcf123a5af370d7b SHA512 0662ab22428d221f62e76e97217c8f5589b54d12deac7d4fc2f9359987b57f39d7c42e6a10c3b97ae0c17b57d63cd11e8e586110194249f7ed2d5dd0fb9a8041
AUX chronyd.conf 378 BLAKE2B b5c07f873640d78e26d23206b253b8c85ceb2a3d89f1dfb3686ea0012fb38ae30b323ceceffac43c0a8168b3e2d288714297a0905e60779d00161e93d8f5773b SHA512 6919c7bddce2a8f81c0f2759c7c58506e97f89102bfeb7b5c19c6da5ed4cbd9070faddd4f3fb411bb4c653fffbdcc93a7f7dc810f38b199f038b1d4072f57640
AUX chronyd.init 1634 BLAKE2B f67d3e2b8aaca19e1c9f86434e8a1ba757babebe8b39fe26be98b7d1d40b259fde5313dcb840c86a7d409ac811a5d854178af66ab82d851b66d27a2acf5f7575 SHA512 1712775c133c4e7f1e869806be2a0723d171c344fc18473606397c74103bb70990302b475ed3629adb5277deed8e892f1ad48d5ee339cf112f425d9209cc3872
AUX chronyd.init-r1 1637 BLAKE2B 046896f6eaf0a9311a9b3cb7cc6360f4bffaee95067efded8358e1a925da5468e3aa3eed972818aa171ea14c0a3625793588ba6853968cc541a942ccc3597f92 SHA512 cbfafe8210cc3d86d417d590fa6c54924ef9f3487c3766a17fffb34d2421a5fc2dfb98ce53dcc33c5811e7c2fd428a235bfde68d999cb50c7d9e5100f769a37b
+AUX chronyd.init-r2 1694 BLAKE2B 5ee55954c8afc2df09291dd7df4c3f1b3a01f97079ae19799a87c0217118c02b24ace0422b1f355fb67d1a0224eacf2104f3b984035f4ac9fa6b41624187d009 SHA512 63d9816017bb13b57c28de4a9d5b8061139d4aea1db5800ec7a4d9e8b2a8f5c5109b556ae5bec5c6d1cc7c4839bd49f12a0046c74fe4d1d11049ead00f1407da
AUX chronyd.service-r2 261 BLAKE2B ac29cdd2e717060b5af68608db8a7b3dd8aeb90225edc5b48ea84a8537017d531519a00fb394934c270eb965a615b0b53188bf8bd16edd645074b497ba91fa9e SHA512 671415208e123628e123575d708dbe4ed7946bc45832dce506d539cc747e84ae63783b53398e96a60d815f1758fe44836f34d804e28859538cf560715474dffe
DIST chrony-3.1.tar.gz 424109 BLAKE2B eb6bc13905a05eab15b00919577cceb4c8c881b4881fbd0e19d966dca86ed6973c31618b1ae56b59cad989144bf59a0206328d50d9eb436fdb058684e74a1661 SHA512 4ba3a75c3634050bb63ba9ee80d9be7a295f44ce4d195a050e4be4738bd7dd807fe37f2289d7ead4a75272bd5ebadbd03c233c67f859e9b68871fca5a6671427
-DIST chrony-3.2.tar.gz 433882 BLAKE2B 4351cd22efbb2c819f09a562b2e0c1851336f8973b37b3015ec6acc04b925e13c1207262d4561318c187809bf989710d9a8fdf54e93b3d3dac56d0d6df8782df SHA512 496af5bed91600f268c1a0fa577bb8c7785e485f78598b666829c674e94770c16548cec4289a2ae9d0a51191d2705eda00886cb6cccae3828aa201a49d4783a4
DIST chrony-3.3.tar.gz 443571 BLAKE2B cc35f55b8d63eed85495f88b71c9285c68867a28b27c6c5e7d4475a77857ce4a09fbe561906757d66fee13b19d9ee750d41518050048776b2c0ef600407632e9 SHA512 36975d863599141e8e5b071d35cf67326b27f5b0da7ec942dbb4530377d10472b0729eea632e0702718b515cb2d5fd41a7eba158e6dade7f05adfb1bdffa5df0
+DIST chrony-3.4-pre1.tar.gz 451934 BLAKE2B 4cd5aaeacb3bed5cc3c9b79d9fe5f02b79f6e2a9f7eb6be6f159e257c9780ce3b77d379633e9136cea8d4ffbb1f024e71c8e3bddbaab9b4a126cba30be4f4b23 SHA512 b45c2f94060ee4f5917d49420a726c412231cb8c3fdc4475465daee6d24d809ae6cb146332e88c975d58f969de357d1b9e2fb3a1c66e35f988f6c8828b39f9a3
EBUILD chrony-3.1.ebuild 2825 BLAKE2B c3af56079c3130002499dda974bb5117a2cce988f8a1aaca7cb6f9f11a0aa011fefe3f600262939b72b4f41d7e096a94dd1305572a04aabe96519cff36ec0165 SHA512 f97265a0a7006c1f8fc07f4a25f27ff0f78b123fdeabe2329a0e48ba33409e16a8373d6c114c2d25f463f560b47e8ef5510c140e5e045a02ccfd4eb669f463b3
-EBUILD chrony-3.2.ebuild 2912 BLAKE2B de9d8eda478642e023ac95abc3009930644354ce75e145d989a003a61c1273ddb17e2a29255cab98199cc74c07553f866a85355b9255ed26a276abdbbaa08b34 SHA512 846d29b2b4fb9ff2c250a0d07a5b31ddba0e0c8e08ec625535ae7143f271f6f751a155768ddc91f474f75b677bf158709304b38c43e904a51220ca6f2b2bc612
-EBUILD chrony-3.3.ebuild 2912 BLAKE2B 44df07e01650a66bac1b2c0e88975f7c7ebde7ab58156ecc0dc46cf0d3189931b53552b2342da55ac6091b1a426809e5733bc38c0528f8d0f000e2d32cbf584d SHA512 8bb57308a4c506e46a101111584ab8fa9a01e0ee86333e2661a33a70d5ae73cf92b5dfc8868f588551b9a4d6f892cf7c5b951556b777bc7c936cb44ebf157966
-EBUILD chrony-9999.ebuild 2796 BLAKE2B 24f9468445a0b1bd820740c97d7d764825bdda4ce7e271a6e18ef48b05f5d692ead4d6f248dfbc5ab22373a6b06e106722faba7c8c1c42bd61e2d726b2c46997 SHA512 9d662c832a48613a7de249e4444cd0fc6f4440826e4d2cd0c6630927e8a1b179a21f341931899bb970addfb3c5b380738ac76f443dab665909d09925c5315f2a
+EBUILD chrony-3.3.ebuild 2909 BLAKE2B 2d314e96402839948b95e9f8650e8523676f201deab27230ac9d006a0a73c878239c23c7118d0698bec9d7c2796b3a08be9cfa695c21b84ee333c23161d963ad SHA512 0ef1db3668f626dc07057728f7d33d9a200f1e4fcb93e6fb3b69e874b8d5d0e3bbb2d57c21513d7825151b08b0a86a36ef1838c44f27e536aa7abd5b9e973cdf
+EBUILD chrony-3.4_pre1-r2.ebuild 2913 BLAKE2B 407081e189b5664f6899671ae75d28e544aa5bff61e4a510083f45155d06a82ca6c1589284bf73018fdfd79d0cd411456231519eb802de68a1b2bc1e42893ca3 SHA512 7502287f4b9a2e5f9d006dfdf744756b66abd4f920a4214ac2ab4183b7bab3b4427babf16eda204857b839f79cd7d7aa6ed223e8c7de2c21975e9629d722c757
+EBUILD chrony-9999.ebuild 2800 BLAKE2B 39990629d85aab317f84e1e083e3b94b28c27834116108d509c213f297ca4e2d1b1d87b7d7ccf75206004b5813c1f6d3b50b33b4fa9bd50f04f485865465f7c8 SHA512 b8120434e2646b91727b63560f5002ea7c97696f780eeb02a91c97ee1de053a093eb3009b8721c139ab20ff15dce857e7d4af00fd51ac9aa3624b5282dadd386
MISC metadata.xml 1566 BLAKE2B 94f800f032197823ff746e93dcb8955a273a0712add991415852d5192c09b465aad40aca121f959442b83fd225becacb063f4ac28b8a7bd035ca65aab2ed3ecb SHA512 bc9d33fa4f146feb7b934ffa6cf8e4d235316f23b9e08dbd6bf6d071496508a9c1dfbed2fca686244360ef848acdeec0d3b96992601aeb669c30482f9ca5ee84
diff --git a/net-misc/chrony/chrony-3.3.ebuild b/net-misc/chrony/chrony-3.3.ebuild
index c3aed38aa99e..a34cf9102e49 100644
--- a/net-misc/chrony/chrony-3.3.ebuild
+++ b/net-misc/chrony/chrony-3.3.ebuild
@@ -10,7 +10,7 @@ SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 ~sparc x86"
IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns"
REQUIRED_USE="
?? ( libedit readline )
diff --git a/net-misc/chrony/chrony-3.2.ebuild b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
index 83b487ade7f7..2b17b91c999e 100644
--- a/net-misc/chrony/chrony-3.2.ebuild
+++ b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -36,13 +36,15 @@ RESTRICT=test
S="${WORKDIR}/${P/_/-}"
-src_prepare() {
- sed -i \
- -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
- -e 's:/var/run:/run:g' \
- conf.c doc/*.man.in examples/* || die
+PATCHES=(
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+src_prepare() {
default
+ sed -i \
+ -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
+ doc/* examples/* || die
}
src_configure() {
@@ -75,12 +77,13 @@ src_configure() {
$(usex rtc '' --disable-rtc) \
${CHRONY_EDITLINE} \
${EXTRA_ECONF} \
- --docdir=/usr/share/doc/${PF} \
--chronysockdir=/run/chrony \
+ --disable-sechash \
+ --docdir=/usr/share/doc/${PF} \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc/chrony \
- --disable-sechash \
+ --with-pidfile="${EPREFIX}/run/chrony/chronyd.pid"
--without-nss \
--without-tomcrypt
"
@@ -97,7 +100,7 @@ src_compile() {
src_install() {
default
- newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newinitd "${FILESDIR}"/chronyd.init-r2 chronyd
newconfd "${FILESDIR}"/chronyd.conf chronyd
insinto /etc/${PN}
@@ -116,6 +119,5 @@ src_install() {
insinto /etc/logrotate.d
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
- systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
- systemd_enable_ntpunit 50-chrony chronyd.service
+ systemd_dounit examples/chronyd.service
}
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 1878efaf91d0..3281755d0869 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -15,6 +15,7 @@ IUSE="caps +cmdmon ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp se
REQUIRED_USE="
?? ( libedit readline )
"
+
CDEPEND="
caps? ( sys-libs/libcap )
libedit? ( dev-libs/libedit )
@@ -33,13 +34,15 @@ RDEPEND="
RESTRICT=test
S="${WORKDIR}/${P/_/-}"
-src_prepare() {
- sed -i \
- -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
- -e 's:/var/run:/run:g' \
- conf.c doc/*.adoc examples/* || die
+PATCHES=(
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+src_prepare() {
default
+ sed -i \
+ -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
+ doc/* examples/* || die
}
src_configure() {
@@ -72,12 +75,13 @@ src_configure() {
$(usex rtc '' --disable-rtc) \
${CHRONY_EDITLINE} \
${EXTRA_ECONF} \
- --docdir=/usr/share/doc/${PF} \
--chronysockdir=/run/chrony \
+ --disable-sechash \
+ --docdir=/usr/share/doc/${PF} \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc/chrony \
- --disable-sechash \
+ --with-pidfile="${EPREFIX}/run/chrony/chronyd.pid"
--without-nss \
--without-tomcrypt
"
@@ -94,7 +98,7 @@ src_compile() {
src_install() {
default
- newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newinitd "${FILESDIR}"/chronyd.init-r2 chronyd
newconfd "${FILESDIR}"/chronyd.conf chronyd
insinto /etc/${PN}
@@ -111,6 +115,5 @@ src_install() {
insinto /etc/logrotate.d
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
- systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
- systemd_enable_ntpunit 50-chrony chronyd.service
+ systemd_dounit examples/chronyd.service
}
diff --git a/net-misc/chrony/files/chronyd-systemd-gentoo.patch b/net-misc/chrony/files/chronyd-systemd-gentoo.patch
new file mode 100644
index 000000000000..63d6b7ed3398
--- /dev/null
+++ b/net-misc/chrony/files/chronyd-systemd-gentoo.patch
@@ -0,0 +1,28 @@
+From ba3ddefc90f58d30a365104cf6e930333e3a2704 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Tue, 4 Sep 2018 13:01:06 -0400
+Subject: [PATCH] Tweak chronyd.service for Gentoo
+
+---
+ examples/chronyd.service | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/examples/chronyd.service b/examples/chronyd.service
+index 1777413..ceed830 100644
+--- a/examples/chronyd.service
++++ b/examples/chronyd.service
+@@ -7,9 +7,8 @@ ConditionCapability=CAP_SYS_TIME
+
+ [Service]
+ Type=forking
+-PIDFile=/var/run/chrony/chronyd.pid
+-EnvironmentFile=-/etc/sysconfig/chronyd
+-ExecStart=/usr/sbin/chronyd $OPTIONS
++PIDFile=/run/chrony/chronyd.pid
++ExecStart=/usr/sbin/chronyd
+ PrivateTmp=yes
+ ProtectHome=yes
+ ProtectSystem=full
+--
+2.18.0
+
diff --git a/net-misc/chrony/files/chronyd.init-r2 b/net-misc/chrony/files/chronyd.init-r2
new file mode 100644
index 000000000000..4892a57b1636
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init-r2
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+checkconfig() {
+ # Note that /etc/chrony/chrony.keys is *NOT* checked. This
+ # is because the user may have specified another key
+ # file, and we don't want to force the user to use that
+ # exact name for the key file.
+ if [ ! -f "${CFGFILE}" ] ; then
+ eerror "Please create ${CFGFILE} and the"
+ eerror "chrony key file (usually /etc/chrony/chrony.keys)"
+ eerror "by using the"
+ eerror ""
+ eerror " chrony.conf.example"
+ eerror " chrony.keys.example"
+ eerror ""
+ eerror "files (from the documentation directory)"
+ eerror "as templates."
+ return 1
+ else
+ # Actually, I tried it, and chrony seems to ignore the pidfile
+ # option. I'm going to leave it here anyway, since you never
+ # know if it might be handy
+ PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
+ [ -z "${PIDFILE}" ] && PIDFILE=/run/chrony/chronyd.pid
+ fi
+ return 0
+}
+
+setxtrarg() {
+ if [ -c /dev/rtc ]; then
+ grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
+ fi
+ grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ setxtrarg
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Starting chronyd"
+ start-stop-daemon \
+ --start \
+ --quiet \
+ --exec /usr/sbin/chronyd \
+ --pidfile "${PIDFILE}" \
+ -- -f "${CFGFILE}" ${ARGS}
+ eend $? "Failed to start chronyd"
+}
+
+stop() {
+ checkconfig || return $?
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Stopping chronyd"
+ start-stop-daemon \
+ --stop \
+ --quiet \
+ --pidfile "${PIDFILE}"
+ eend $? "Failed to stop chronyd"
+}