summaryrefslogtreecommitdiff
path: root/net-misc/chrony
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/chrony
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/chrony')
-rw-r--r--net-misc/chrony/Manifest21
-rw-r--r--net-misc/chrony/chrony-2.2.1.ebuild113
-rw-r--r--net-misc/chrony/chrony-2.3.ebuild113
-rw-r--r--net-misc/chrony/chrony-2.4.1.ebuild119
-rw-r--r--net-misc/chrony/chrony-3.1-r1.ebuild121
-rw-r--r--net-misc/chrony/chrony-3.1.ebuild119
-rw-r--r--net-misc/chrony/chrony-3.2.ebuild121
-rw-r--r--net-misc/chrony/chrony-9999.ebuild116
-rw-r--r--net-misc/chrony/files/chrony-2.2.logrotate7
-rw-r--r--net-misc/chrony/files/chrony-2.4-r1.logrotate7
-rw-r--r--net-misc/chrony/files/chronyd.conf12
-rw-r--r--net-misc/chrony/files/chronyd.init65
-rw-r--r--net-misc/chrony/files/chronyd.init-r169
-rw-r--r--net-misc/chrony/files/chronyd.service-r212
-rw-r--r--net-misc/chrony/metadata.xml30
15 files changed, 1045 insertions, 0 deletions
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest
new file mode 100644
index 000000000000..fceffbcd1c89
--- /dev/null
+++ b/net-misc/chrony/Manifest
@@ -0,0 +1,21 @@
+AUX chrony-2.2.logrotate 104 SHA256 9cc5fcb3e6fd6904cec42c4b9fd813a5c768b4b63d67cd2d4d7c609d02a5c098 SHA512 3bc094e6b85eb00a129deb0661d36121f51643b6542759b5402308f48384a32e4949c82e6d63437a792d52c0d1142849229a59aae67acfc952121f4b5d51428c WHIRLPOOL 1a42a2fcd9b37c6480b182cc63c328670c7915d7442143abd1261d10f68c820a732da98303fb40706e727119713599a2c15bf2305d9d0c41b9347f0d2e451363
+AUX chrony-2.4-r1.logrotate 131 SHA256 834647530769c6ae29db6a5dcdba04b97c1537f17f5908aebd7938c2140ba17e SHA512 e6febb744476be6c83ac086f2054dc2c190b6e1abd2cf20d4187f222b2485817f06c4ad62b8d40fcea3e18a771cf21899fe0a1dafbfb31f5c99da9092d24d79b WHIRLPOOL 338393e500fb49eb90ff83b66e1b1467a7e3aedf0cbc334a6d636232cbf64bff547a43917aec0192a3c1091c204344ebdbaf2eabd40cf2a180f43454fb422e47
+AUX chronyd.conf 378 SHA256 29040502f86c419dbfbc7e2627cc658a8df82b37da21b3d1fce2eed9136d8f99 SHA512 6919c7bddce2a8f81c0f2759c7c58506e97f89102bfeb7b5c19c6da5ed4cbd9070faddd4f3fb411bb4c653fffbdcc93a7f7dc810f38b199f038b1d4072f57640 WHIRLPOOL 14e6e90959e434475f8d74a144fd342588e99a7102b15cedbf7a436ca32db3e09bbe4bd2630634fac9045db4b75a6c7afcd8f91c67bd8bb4f977d821d220ced9
+AUX chronyd.init 1634 SHA256 94afbfe898daeadaa941bfff6da658fe8565ead14d69a667498d6935e3d24678 SHA512 1712775c133c4e7f1e869806be2a0723d171c344fc18473606397c74103bb70990302b475ed3629adb5277deed8e892f1ad48d5ee339cf112f425d9209cc3872 WHIRLPOOL 5486203a0e3d9a04c16c78d642382598acb658dc3690af1622ce806a3776a353817338677c3c636c9a2c24e1d64cef1898dc020592b8981fc1b196565b9eba6b
+AUX chronyd.init-r1 1637 SHA256 f3c8b8dfbb1ee14b251d3502cb799411aa4fb71d107ddd90b41b4841eee22f5c SHA512 cbfafe8210cc3d86d417d590fa6c54924ef9f3487c3766a17fffb34d2421a5fc2dfb98ce53dcc33c5811e7c2fd428a235bfde68d999cb50c7d9e5100f769a37b WHIRLPOOL d1b31217ede912611bf7aec69a37d4321913cff0e41f8dfe1df1ff1a6605fd21bbfbdced53ea6e9dc0a22ff5848fe0b705ddf0a6b0e5154ddd4e9b6ed1fe656a
+AUX chronyd.service-r2 261 SHA256 d5996c6b8596e137b36099d0ce7974bfd8e36411d999712d2f0393ac738f3754 SHA512 671415208e123628e123575d708dbe4ed7946bc45832dce506d539cc747e84ae63783b53398e96a60d815f1758fe44836f34d804e28859538cf560715474dffe WHIRLPOOL f95d9472ad30fb06e3d0014ddc2be492dd1a6d2b5590bed27214ba1b0566d83e89e108a8df3de9dade939a9feff005bfff431d796f9e813388830e3f3dfc437b
+DIST chrony-2.2.1.tar.gz 340514 SHA256 4776fa8e80d698723e9a88eb882170951f6c45860545d84ae9f9d8b9bbd73796 SHA512 caa18a22e7e64186f24f474e02862296bfa74c99671bc98e926caf27b88ce3580282543594602e76ad4be9b7f9623350888def893a7c1d96a7370d13a636442f WHIRLPOOL 77500bc25496dc15f17bce60023b86330205945999011b243272db26a924ac67193da70089c59e19bea7666c05059c8c4c1975ca19057775ec2dd8e468ab8dce
+DIST chrony-2.3.tar.gz 355113 SHA256 58bffb523012fb0fa87cc0d94d6e36de9689fe9556519cbd0d1ba254af92ccb2 SHA512 2a9cda6c2bc931438b798bd037614196bdb1533d12432467a690d57095c74013c80c92fcaadbd43fd5b0c816872822527a1ade3014add458d669d7813d5fa080 WHIRLPOOL 06864181ac74b2cf13baf7d9098404f8540c26db41035fe38005fbfea8e12f2de179008f5b1a2544e24ebb7e4cca712421746690edb7f36b90416ad87901e920
+DIST chrony-2.4.1.tar.gz 390641 SHA256 0fd59e0ef625b4459e3a9c7f221c52f56596582bce31abfae5f7369702edb6e0 SHA512 7772065103ad95706f80374d88ba452b76cf8e29689abf22b38e7eb5ad2fcc491593e11702400daa8bf908218614df21b08ff15ab2d3d2347876119cd80abc4d WHIRLPOOL ed2c2ac8e11371e009d3e96553bb73e58b410bb38e6123a9e39a3451e5dc6860d981d45e67b4e2dc47b39f616f95146feb35efd15dbaa90932f07837172c440a
+DIST chrony-3.1.tar.gz 424109 SHA256 9d9107dcdb7768a03dc129d33b2a7a25f1eea2f5620bc85eb00cfea07c1b6075 SHA512 4ba3a75c3634050bb63ba9ee80d9be7a295f44ce4d195a050e4be4738bd7dd807fe37f2289d7ead4a75272bd5ebadbd03c233c67f859e9b68871fca5a6671427 WHIRLPOOL d1b499bbcdd74a049c972c183d4b88365db4c6512d8011ca8b87f15c4e0d1bc882bde4f742591f5cfe49e820a5884f6b1960d132d5787be02a36bd57b9e2605f
+DIST chrony-3.2.tar.gz 433882 SHA256 329f6718dd8c3ece3eee78be1f4821cbbeb62608e7d23f25da293cfa433c4116 SHA512 496af5bed91600f268c1a0fa577bb8c7785e485f78598b666829c674e94770c16548cec4289a2ae9d0a51191d2705eda00886cb6cccae3828aa201a49d4783a4 WHIRLPOOL b8a9045c81970653393c2afadece1e3a5e093c893b7ac3bae061bbd40bc043439e426df8da6598e36ef9589b4dd402419199307a9bfa48df526206952814667e
+EBUILD chrony-2.2.1.ebuild 2723 SHA256 8f451ed6c9907d65d3fec6ec6765c47f3f856752d16536f76241a6ae2d9716a6 SHA512 a41cb2fc585ab76e7b323cecaf04c38c6b779dec6d20f2675d1f89a1b5e0b0688568ba9d82371209b1a75cf2e61aa8d6b2f24711680565138ef7d96f550be4f9 WHIRLPOOL e4f07fb0b8cd6302149d720eb539e3939bd170263cf8c4ec6d15d7355d9d1bb30de56ff9197f1c768a04757394af3826ffe8359bdffb88f6a2d9bb76a6dcc8c9
+EBUILD chrony-2.3.ebuild 2724 SHA256 2618ffb7591e9bbfd80fe2260e61f46418b882516bd4df791081142d78f5fcde SHA512 4509bb5db4d0f17fdb4951805b118fc044c0a79897b3b0d5522d0570cf95f6f37513dcace1b689e32127ea24a77567c3b14f7da91d9333c2fcaa76e4c2de0b24 WHIRLPOOL 7e6455db66b8c9b8f0d284e5322807b129f8a82689f99325145d29349e71b860c9be9bbe2c18569328aafaacc5b8d5d72f679ba7c011fa8afacf589e7fe403e5
+EBUILD chrony-2.4.1.ebuild 2817 SHA256 5c7cdb706c8a4b064170c0b338070effcdd78f0b1011ebddc4ba38a2f7563d17 SHA512 1bb4017e67ca5c2222a9bd6e113d2821f288fb20ddabbd7af08993ed694fb8a1a71fff260ae1718a0219ce76ae7d86521e7ab61326f5475394826dfe1550de75 WHIRLPOOL a75d31c6635effaea7b1cda46c801d222bf38253b0919f0821408c4fe4279d64e66d8e7fe6ff76ef56b6dbca847ceb27f901fc5c37244d5a0f8cf4b1dea78c61
+EBUILD chrony-3.1-r1.ebuild 2903 SHA256 edf02975eb5053380c6246d72b56624aef8f675166d63be11a76858886e0a93c SHA512 e0c298118bf7b38f975cb41d48623405e9257f4935eb1aa29f5c551b514b376caebd1d5dad6629240db4229c283bd133fd42ddd59efe278d90960b756fc810f8 WHIRLPOOL 36e316e3a21b41a4700a00c66e12f44c253e5b711a927aae45acb265362c78e2102d8f9581be7f59dbeceecd64e3f29383201b5f09424becace1b710dceff992
+EBUILD chrony-3.1.ebuild 2821 SHA256 6ca450d1b0bfae9f24994a633497eaced954e4cb7017fe256531e83ffe792ab1 SHA512 d8652f813bd2467dceab5bb59eed67db67f040d8f8cb269e0fc519f0af90b60e9f6eafe2c352860dafb7084aca4d651255aa38eb5df1a36044e9708949e1e223 WHIRLPOOL 6614bae3ee833c02fb88d26a45db06f532e24a905e0dd9e36c9245a4ecea0769e7b2cd9df4df5c11a2ca8b5e4420f1b7d7c9a728d8b0183e3742ead8a7001f39
+EBUILD chrony-3.2.ebuild 2905 SHA256 13f3645f107fa7172c2b23c3204c8f80285c27873517e9e1c962c93859210566 SHA512 4ed236451fa0f86ad04164cd3b7890ec3d205223bfd7303b8b098c4a9d68947acdc58cb108b824605343f37f1328964477087b3adb41d0b80d79667243515b4a WHIRLPOOL e3b290a3b2772156295532d33d725a89a6b650eb97653ced2adf9eba1837fe257cd7c9a83a2427a05994baea4075d44d4fa77f75745f77a3b642fc8517e45da2
+EBUILD chrony-9999.ebuild 2796 SHA256 1e256d30c13a706e7e960ff4fe19e56a03cd24bf66efb7ebeb84c52bd558daa0 SHA512 9d662c832a48613a7de249e4444cd0fc6f4440826e4d2cd0c6630927e8a1b179a21f341931899bb970addfb3c5b380738ac76f443dab665909d09925c5315f2a WHIRLPOOL 49721c152cab27028f45b5d35d956598e8d217dbcebf446ac138ba97c3ef95f33670f530caf31dc031c07545f24f3fba22c61c95f1bda89b62f37c70f4e2acca
+MISC ChangeLog 12610 SHA256 e2455ce1e59a80f5f7f1812fcb124f1a148fcf7f15f15d3a6cc35f31b2476d0a SHA512 9e9345d4e9ecdd78be040cb620db4ea424f3d321128b559a735e06104e27e29caf59f2584f8c13190379be680fc24bb139edddc1f27b52b8fd3efbebd6ed598f WHIRLPOOL eb989e70234e979bcada4304324beff1dd8a21f1b883543209556fb4d0d8d237af10b755f532b669b474bec902cb76685f30a8e2a8c87a60c2da3766c8484213
+MISC ChangeLog-2015 21319 SHA256 330649a8ee69bd8b1918b1cb1a71c3719ce076b4b6aebcde773d9c947f9364a2 SHA512 98f33ad29bda967580d13b93b4a1dec54516d661a6054d7cf4bdfd8175b4d3e76f4659016b60cee0aa8b2d995b766dbd0af44d08504a5c6f9277d5d294f6ca1d WHIRLPOOL 7d5307a81a1563e9261c5765947000a450fdf34e29509f8fdbffc2cd7f73c77e29c838d3857f82efe0bdf072fb26c00d0e4432176cdc27ef40798392f8fadd04
+MISC metadata.xml 1566 SHA256 df519c8729414da92dabce3e6fcfd98e7cbee2c3ca31c1271d280d63f39cfdc2 SHA512 bc9d33fa4f146feb7b934ffa6cf8e4d235316f23b9e08dbd6bf6d071496508a9c1dfbed2fca686244360ef848acdeec0d3b96992601aeb669c30482f9ca5ee84 WHIRLPOOL 12b3b29c032ba953e7d945d5a7cc1264e03468fe0c9c7201bc0cc82a1927c253856f714fcce957dc74eb95f23457265ac3e08925b9a4a3530e5a710d93275c96
diff --git a/net-misc/chrony/chrony-2.2.1.ebuild b/net-misc/chrony/chrony-2.2.1.ebuild
new file mode 100644
index 000000000000..d634ac9ee970
--- /dev/null
+++ b/net-misc/chrony/chrony-2.2.1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha amd64 ~arm hppa ~mips ppc ppc64 sparc x86"
+IUSE="caps +cmdmon ipv6 libedit +ntp +phc +pps readline +refclock +rtc selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+"
+DEPEND="
+ ${CDEPEND}
+ sys-apps/texinfo
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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 chrony.texi.in examples/* || die
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex rtc '' --disable-rtc) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex adns '' --disable-asyncdns) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs
+}
+
+src_install() {
+ default
+
+ doinfo chrony.info*
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ dodoc examples/*.example*
+
+ keepdir /var/{lib,log}/chrony
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/chrony-2.2.logrotate chrony
+
+ systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
+ systemd_enable_ntpunit 50-chrony chronyd.service
+}
diff --git a/net-misc/chrony/chrony-2.3.ebuild b/net-misc/chrony/chrony-2.3.ebuild
new file mode 100644
index 000000000000..f37a8f2cac7e
--- /dev/null
+++ b/net-misc/chrony/chrony-2.3.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha amd64 ~arm hppa ~mips ppc ppc64 ~sparc x86"
+IUSE="caps +cmdmon ipv6 libedit +ntp +phc +pps readline +refclock +rtc selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+"
+DEPEND="
+ ${CDEPEND}
+ sys-apps/texinfo
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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 chrony.texi.in examples/* || die
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex rtc '' --disable-rtc) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex adns '' --disable-asyncdns) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs
+}
+
+src_install() {
+ default
+
+ doinfo chrony.info*
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ dodoc examples/*.example*
+
+ keepdir /var/{lib,log}/chrony
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/chrony-2.2.logrotate chrony
+
+ systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
+ systemd_enable_ntpunit 50-chrony chronyd.service
+}
diff --git a/net-misc/chrony/chrony-2.4.1.ebuild b/net-misc/chrony/chrony-2.4.1.ebuild
new file mode 100644
index 000000000000..6c4e5e3675f3
--- /dev/null
+++ b/net-misc/chrony/chrony-2.4.1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="alpha ~amd64 ~arm hppa ppc ppc64"
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+"
+DEPEND="
+ ${CDEPEND}
+ html? ( dev-ruby/asciidoctor )
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex rtc '' --disable-rtc) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex adns '' --disable-asyncdns) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs $(usex html '' 'ADOC=true')
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ if use html; then
+ docinto html
+ dodoc doc/*.html
+ fi
+
+ keepdir /var/{lib,log}/chrony
+
+ 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
+}
diff --git a/net-misc/chrony/chrony-3.1-r1.ebuild b/net-misc/chrony/chrony-3.1-r1.ebuild
new file mode 100644
index 000000000000..2b465d02084e
--- /dev/null
+++ b/net-misc/chrony/chrony-3.1-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+ seccomp? ( sys-libs/libseccomp )
+"
+DEPEND="
+ ${CDEPEND}
+ html? ( dev-ruby/asciidoctor )
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(use_enable seccomp scfilter) \
+ $(usex adns '' --disable-asyncdns) \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex rtc '' --disable-rtc) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs $(usex html '' 'ADOC=true')
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ if use html; then
+ docinto html
+ dodoc doc/*.html
+ fi
+
+ keepdir /var/{lib,log}/chrony
+
+ 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
+}
diff --git a/net-misc/chrony/chrony-3.1.ebuild b/net-misc/chrony/chrony-3.1.ebuild
new file mode 100644
index 000000000000..b2bec91ce760
--- /dev/null
+++ b/net-misc/chrony/chrony-3.1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 arm hppa ppc ppc64 x86"
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+"
+DEPEND="
+ ${CDEPEND}
+ html? ( dev-ruby/asciidoctor )
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex rtc '' --disable-rtc) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex adns '' --disable-asyncdns) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs $(usex html '' 'ADOC=true')
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ if use html; then
+ docinto html
+ dodoc doc/*.html
+ fi
+
+ keepdir /var/{lib,log}/chrony
+
+ 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
+}
diff --git a/net-misc/chrony/chrony-3.2.ebuild b/net-misc/chrony/chrony-3.2.ebuild
new file mode 100644
index 000000000000..1a1cc1f7ccf2
--- /dev/null
+++ b/net-misc/chrony/chrony-3.2.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="https://chrony.tuxfamily.org/"
+SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+ seccomp? ( sys-libs/libseccomp )
+"
+DEPEND="
+ ${CDEPEND}
+ html? ( dev-ruby/asciidoctor )
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+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
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(use_enable seccomp scfilter) \
+ $(usex adns '' --disable-asyncdns) \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex rtc '' --disable-rtc) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs $(usex html '' 'ADOC=true')
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ if use html; then
+ docinto html
+ dodoc doc/*.html
+ fi
+
+ keepdir /var/{lib,log}/chrony
+
+ 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
+}
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
new file mode 100644
index 000000000000..1878efaf91d0
--- /dev/null
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils git-r3 systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="https://chrony.tuxfamily.org/"
+EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git/"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS=""
+IUSE="caps +cmdmon ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+ seccomp? ( sys-libs/libseccomp )
+"
+DEPEND="
+ ${CDEPEND}
+ dev-ruby/asciidoctor
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+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
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(use_enable seccomp scfilter) \
+ $(usex adns '' --disable-asyncdns) \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex rtc '' --disable-rtc) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --chronysockdir=/run/chrony \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ docinto html
+ dodoc doc/*.html
+
+ keepdir /var/{lib,log}/chrony
+
+ 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
+}
diff --git a/net-misc/chrony/files/chrony-2.2.logrotate b/net-misc/chrony/files/chrony-2.2.logrotate
new file mode 100644
index 000000000000..ae76c8de6af6
--- /dev/null
+++ b/net-misc/chrony/files/chrony-2.2.logrotate
@@ -0,0 +1,7 @@
+/var/log/chrony/*.log {
+ missingok
+ sharedscripts
+ postrotate
+ /usr/bin/chronyc cyclelogs
+ endscript
+}
diff --git a/net-misc/chrony/files/chrony-2.4-r1.logrotate b/net-misc/chrony/files/chrony-2.4-r1.logrotate
new file mode 100644
index 000000000000..a2cf8feb5b77
--- /dev/null
+++ b/net-misc/chrony/files/chrony-2.4-r1.logrotate
@@ -0,0 +1,7 @@
+/var/log/chrony/*.log {
+ missingok
+ sharedscripts
+ postrotate
+ /usr/bin/chronyc cyclelogs |grep -v '^200 OK'; exit 0
+ endscript
+}
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
new file mode 100644
index 000000000000..fc43a95c40fe
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.conf
@@ -0,0 +1,12 @@
+# /etc/conf.d/chronyd
+
+CFGFILE="/etc/chrony/chrony.conf"
+
+# Configuration dependant options :
+# -s - Set system time from RTC if rtcfile directive present
+# -r - Reload sample histories if dumponexit directive present
+#
+# The combination of "-s -r" allows chronyd to perform long term averaging of
+# the gain or loss rate across system reboots and shutdowns.
+
+ARGS=""
diff --git a/net-misc/chrony/files/chronyd.init b/net-misc/chrony/files/chronyd.init
new file mode 100644
index 000000000000..3a71fe748fd7
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init
@@ -0,0 +1,65 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 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}"`
+ 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 --background --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"
+}
diff --git a/net-misc/chrony/files/chronyd.init-r1 b/net-misc/chrony/files/chronyd.init-r1
new file mode 100644
index 000000000000..a76e2533f57d
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init-r1
@@ -0,0 +1,69 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 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}"`
+ 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"
+}
diff --git a/net-misc/chrony/files/chronyd.service-r2 b/net-misc/chrony/files/chronyd.service-r2
new file mode 100644
index 000000000000..90255675c838
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.service-r2
@@ -0,0 +1,12 @@
+[Unit]
+Description=Chrony Network Time Service
+After=ntpdate.service sntp.service network.target
+Conflicts=ntpd.service systemd-timesyncd.service
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/chronyd
+PIDFile=/run/chronyd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml
new file mode 100644
index 000000000000..fe0c5f66743d
--- /dev/null
+++ b/net-misc/chrony/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>jer@gentoo.org</email>
+</maintainer>
+<longdescription>
+Chrony is a pair of programs (chronyd and chronyc) which are used to maintain
+the accuracy of the system clock on a computer. chronyd has been specifically
+written to work well for systems which have only an intermittent (e.g. dial-up)
+connection to the network where the NTP servers are. It still works well
+in a "permanently connected" mode.
+</longdescription>
+<longdescription lang="ja">
+Chrony はコンピュータのシステム・クロックの精度を保つために使われるプログラムの
+ペア(chronyd と chronyc)です。chronyd は NTP サーバがあるネットワークと断続的な
+接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的
+な接続でも機能します。
+</longdescription>
+<use>
+<flag name="cmdmon">Support for command and monitoring</flag>
+<flag name="html">Install HTML documentation</flag>
+<flag name="ntp">Support for the Network Time Protocol (NTP)</flag>
+<flag name="phc">Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface</flag>
+<flag name="pps">Support for the Linux Pulse Per Second (PPS) interface</flag>
+<flag name="refclock">Support for reference clocks</flag>
+<flag name="rtc">Support for the Linux Real Time Clock interface</flag>
+<flag name="adns">Support for asynchronous DNS</flag>
+</use>
+</pkgmetadata>