summaryrefslogtreecommitdiff
path: root/net-misc/chrony
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
commitc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (patch)
treec44943ee0563a3fa957716de909fed683117fcb9 /net-misc/chrony
parent69051588e2f955485fe5d45d45e616bc60a2de57 (diff)
gentoo (valentine's day) resync : 14.02.2021
Diffstat (limited to 'net-misc/chrony')
-rw-r--r--net-misc/chrony/Manifest7
-rw-r--r--net-misc/chrony/chrony-4.0-r1.ebuild210
-rw-r--r--net-misc/chrony/chrony-4.0.ebuild4
-rw-r--r--net-misc/chrony/chrony-9999.ebuild66
-rw-r--r--net-misc/chrony/metadata.xml6
5 files changed, 268 insertions, 25 deletions
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest
index 1eb679fce4fe..6b96caea360c 100644
--- a/net-misc/chrony/Manifest
+++ b/net-misc/chrony/Manifest
@@ -4,6 +4,7 @@ AUX chrony-3.5-r3-systemd-gentoo.patch 309 BLAKE2B 4e441ea854dda077c68f05b420f50
AUX chronyd.conf 390 BLAKE2B a0058c72ae04371aa273d71f01349a00dfc0d66c016e6c2d977b9499e2ded3072942bb21c468ca9263263d55f1cc35cca4a3a72ee058cc31cf982648552bc77d SHA512 6798d40da70921b95430371459a4b276a88c57ec79f99d0efd214770f5fffee5d80d20baf4313f210b6af46c4aafbb038920cd774d6c03ffbb0849229c431bdc
AUX chronyd.init-r2 1694 BLAKE2B 5ee55954c8afc2df09291dd7df4c3f1b3a01f97079ae19799a87c0217118c02b24ace0422b1f355fb67d1a0224eacf2104f3b984035f4ac9fa6b41624187d009 SHA512 63d9816017bb13b57c28de4a9d5b8061139d4aea1db5800ec7a4d9e8b2a8f5c5109b556ae5bec5c6d1cc7c4839bd49f12a0046c74fe4d1d11049ead00f1407da
DIST chrony-4.0.tar.gz 546939 BLAKE2B 1d4035977be3603b34024c5c1c2aa5f2b4aca03fe7dc1eb41be2e9aeefa06e20a5f74776c50bdadaffba10ae25e7980bcbd9cf2b999bd73087728afe7a80253e SHA512 a1c11a386c43f495910f7f2e9b5fbb1652c3631471d182b9b8203dfef98611d11535ad547a879856551263aed0ae2e30e4135b8ed89553684706166bc1c725c9
-EBUILD chrony-4.0.ebuild 4280 BLAKE2B 1d5b51c22d9a321172021ba50ac7129a53c119b7e7027c28489596f15b0365422545d9613c001feee05ae1bdc9e5898e334a787ac91aa9d257986e38bf4146b5 SHA512 09ad193ad9f0504137f9d471557354582c093d65ce1b56468f16192d72da3f17c7e5744d893e8e3cdd7ef68a54e4deaa1d36f06421c996cd9c39b2c56a09cfee
-EBUILD chrony-9999.ebuild 4287 BLAKE2B d682d68657aab4b753b21963d0276688a16a84ad37dbafff885a7983cf0eb48bb8493251649feabe493be6393eb48fb68a8140b6459f3d224e078f80ae4ee0dd SHA512 044a352a2afa9e875244e9bfbb7b197bb2693c0ddc52e6d88296536fa6c15fa8811f45684ca8c594f2d1150f46e0ef6178e5e7dbedab4c602f56f7bc5cbd2bca
-MISC metadata.xml 1936 BLAKE2B 46778f29ab04904ff6aa5212e989d1384f40d1923a04323837845af7563cffcc652047dae4ab8c535dcf1d2986e851c96aad4160cd4910934b3ffc347f473a21 SHA512 1094233e25ad5630cf537888304bbfd16fb8c1da36873025b0b937070733d0adbeebedc4c04383f806f2dc825013f53133fb81cef597afad16874510fa45c10f
+EBUILD chrony-4.0-r1.ebuild 5222 BLAKE2B c688ee6af7aaf0a68488510a5f4d739b67bcbf7f6fd013dd5128fbc69cfe0316cb7cd29140c43ef13bea0a6700ba2a724f5229a0a0163e047fe1d8631c6a6149 SHA512 cb668189ca505659c3ef75f6a9838eaca432302075967d6b80cf91e01f87774d60aaa94e99ade646fb8c94db6ed8afcd938c20eb249a8ea9608bafeaee702bee
+EBUILD chrony-4.0.ebuild 4324 BLAKE2B c6e4eef917c334681564f974323f503d088fe0aeac43e5c88f302f5e6f29fdb0d45fd2862d768621a23110deb53e907597efb44d361a794b2e37181ae3c19208 SHA512 be89d10a76643ad8c46d005f3ddc49dc60485a7b5954445a7ddc4468c142d31100465c0222231da43f338f621fc11de2bd20ecc42bde43424b85b48f01b84d1f
+EBUILD chrony-9999.ebuild 5222 BLAKE2B c688ee6af7aaf0a68488510a5f4d739b67bcbf7f6fd013dd5128fbc69cfe0316cb7cd29140c43ef13bea0a6700ba2a724f5229a0a0163e047fe1d8631c6a6149 SHA512 cb668189ca505659c3ef75f6a9838eaca432302075967d6b80cf91e01f87774d60aaa94e99ade646fb8c94db6ed8afcd938c20eb249a8ea9608bafeaee702bee
+MISC metadata.xml 2299 BLAKE2B f5e8667a5fdeb86395d773eaf6e7d80c2133fe945565d7d6005f156a0a4763f1434ba887627fba63dd0f0a15663d7fa194d91699f6961ad21b9afa40576cd1fd SHA512 370e06edf9df22a327ff8b528f8a810c731af4615d740331ac737af8cbc5af265f7592ec22bf844301c5089185bc4f7de102f87378f85cf276d4f550933e519a
diff --git a/net-misc/chrony/chrony-4.0-r1.ebuild b/net-misc/chrony/chrony-4.0-r1.ebuild
new file mode 100644
index 000000000000..7e6fadddffaa
--- /dev/null
+++ b/net-misc/chrony/chrony-4.0-r1.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="https://chrony.tuxfamily.org/ https://git.tuxfamily.org/chrony/chrony.git"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git"
+else
+ SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+caps +cmdmon debug html ipv6 libedit +nettle nss +ntp +phc +nts pps +refclock +rtc samba +seccomp +sechash selinux libtomcrypt"
+# nettle > nss > libtomcrypt in configure
+REQUIRED_USE="
+ sechash? ( || ( nettle nss libtomcrypt ) )
+ nettle? ( !nss )
+ nss? ( !nettle )
+ libtomcrypt? ( !nettle !nss )
+ !sechash? ( !nss )
+ !sechash? ( !nts? ( !nettle ) )
+ nts? ( nettle )
+"
+RESTRICT="test"
+
+BDEPEND="nettle? ( virtual/pkgconfig )"
+
+if [[ ${PV} == "9999" ]]; then
+ # Needed for doc generation in 9999
+ BDEPEND+=" virtual/w3m"
+ REQUIRED_USE+=" html"
+fi
+
+DEPEND="
+ caps? (
+ acct-group/ntp
+ acct-user/ntp
+ sys-libs/libcap
+ )
+ nts? ( net-libs/gnutls:= )
+ libedit? ( dev-libs/libedit )
+ nettle? ( dev-libs/nettle:= )
+ nss? ( dev-libs/nss:= )
+ seccomp? ( sys-libs/libseccomp )
+ html? ( dev-ruby/asciidoctor )
+ pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
+ "${FILESDIR}"/${PN}-3.5-r3-systemd-gentoo.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
+ doc/* examples/* || die
+
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf || die
+}
+
+src_configure() {
+ if ! use caps; then
+ sed -i \
+ -e 's/ -u ntp//' \
+ "${T}"/chronyd.conf examples/chronyd.service || die
+ fi
+
+ if ! use seccomp; then
+ sed -i \
+ -e 's/ -F 0//' \
+ "${T}"/chronyd.conf examples/chronyd.service || die
+ fi
+
+ tc-export CC PKG_CONFIG
+
+ # Update from time to time with output from "date +%s"
+ # on a system that is time-synced.
+ export SOURCE_DATE_EPOCH=1607976314
+
+ # not an autotools generated script
+ local myconf=(
+ $(use_enable seccomp scfilter)
+ $(usex caps '' --disable-linuxcaps)
+ $(usex cmdmon '' --disable-cmdmon)
+ $(usex debug '--enable-debug' '')
+ $(usex ipv6 '' --disable-ipv6)
+ $(usex libedit '' --without-editline)
+ $(usex nettle '' --without-nettle)
+ $(usex nss '' --without-nss)
+ $(usex ntp '' --disable-ntp)
+ $(usex nts '' --disable-nts)
+ $(usex nts '' --without-gnutls)
+ $(usex phc '' --disable-phc)
+ $(usex pps '' --disable-pps)
+ $(usex refclock '' --disable-refclock)
+ $(usex rtc '' --disable-rtc)
+ $(usex samba --enable-ntp-signd '')
+ $(usex sechash '' --disable-sechash)
+ $(usex libtomcrypt '' --disable-tomcrypt)
+ --chronysockdir="${EPREFIX}/run/chrony"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --mandir="${EPREFIX}/usr/share/man"
+ --prefix="${EPREFIX}/usr"
+ --sysconfdir="${EPREFIX}/etc/chrony"
+ --with-hwclockfile="${EPREFIX}/etc/adjtime"
+ --with-pidfile="${EPREFIX}/run/chrony/chronyd.pid"
+ ${EXTRA_ECONF}
+ )
+
+ # print the ./configure call
+ echo sh ./configure "${myconf[@]}" >&2
+ sh ./configure "${myconf[@]}" || die
+}
+
+src_compile() {
+ if [[ ${PV} == "9999" ]]; then
+ # uses w3m
+ emake -C doc man txt
+ fi
+
+ emake all docs $(usex html '' 'ADOC=true')
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/chronyd.init-r2 chronyd
+ newconfd "${T}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example1 chrony.conf
+
+ docinto examples
+ dodoc examples/*.example*
+
+ newtmpfiles - chronyd.conf <<<"d /run/chrony 0750 $(usex caps 'ntp ntp' 'root root')"
+
+ if use html; then
+ docinto html
+ dodoc doc/*.html
+ fi
+
+ keepdir /var/{lib,log}/chrony
+
+ if use caps; then
+ # Prepare a directory for the chrony.drift file (a la ntpsec)
+ # Ensures the environment is sane on new installs
+ fowners ntp:ntp /var/{lib,log}/chrony
+ fperms 770 /var/lib/chrony
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
+
+ systemd_dounit examples/chronyd.service
+ systemd_dounit examples/chrony-wait.service
+ systemd_enable_ntpunit 50-chrony chronyd.service
+}
+
+pkg_preinst() {
+ HAD_CAPS=false
+ HAD_SECCOMP=false
+
+ if has_version 'net-misc/chrony[caps]' ; then
+ HAD_CAPS=true
+ fi
+
+ if has_version 'net-misc/chrony[seccomp]' ; then
+ HAD_SECCOMP=true
+ fi
+
+}
+
+pkg_postinst() {
+ tmpfiles_process chronyd.conf
+
+ if [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ if use caps && ! ${HAD_CAPS} ; then
+ ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
+ ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
+ ewarn "This is necessary for chrony to drop privileges"
+ elif ! use caps && ! ${HAD_CAPS} ; then
+ ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root"
+ fi
+ fi
+
+ if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then
+ elog "To enable seccomp in enforcing mode, please modify:"
+ elog "- /etc/conf.d/chronyd for OpenRC"
+ elog "- systemctl edit chronyd for systemd"
+ elog "to use -F 1 or -F -1 instead of -F 0 (see man chronyd)"
+ fi
+}
diff --git a/net-misc/chrony/chrony-4.0.ebuild b/net-misc/chrony/chrony-4.0.ebuild
index efa9bc015ed1..3926d6b0f383 100644
--- a/net-misc/chrony/chrony-4.0.ebuild
+++ b/net-misc/chrony/chrony-4.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
inherit systemd tmpfiles toolchain-funcs
DESCRIPTION="NTP client and server programs"
-HOMEPAGE="https://chrony.tuxfamily.org/"
+HOMEPAGE="https://chrony.tuxfamily.org/ https://git.tuxfamily.org/chrony/chrony.git"
if [[ ${PV} == "9999" ]]; then
inherit git-r3
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 9bee3f3276df..7e6fadddffaa 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
inherit systemd tmpfiles toolchain-funcs
DESCRIPTION="NTP client and server programs"
-HOMEPAGE="https://chrony.tuxfamily.org/"
+HOMEPAGE="https://chrony.tuxfamily.org/ https://git.tuxfamily.org/chrony/chrony.git"
if [[ ${PV} == "9999" ]]; then
inherit git-r3
@@ -20,8 +20,17 @@ S="${WORKDIR}/${P/_/-}"
LICENSE="GPL-2"
SLOT="0"
-IUSE="+caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps +refclock +rtc samba +seccomp +sechash selinux"
-REQUIRED_USE="sechash? ( nettle )"
+IUSE="+caps +cmdmon debug html ipv6 libedit +nettle nss +ntp +phc +nts pps +refclock +rtc samba +seccomp +sechash selinux libtomcrypt"
+# nettle > nss > libtomcrypt in configure
+REQUIRED_USE="
+ sechash? ( || ( nettle nss libtomcrypt ) )
+ nettle? ( !nss )
+ nss? ( !nettle )
+ libtomcrypt? ( !nettle !nss )
+ !sechash? ( !nss )
+ !sechash? ( !nts? ( !nettle ) )
+ nts? ( nettle )
+"
RESTRICT="test"
BDEPEND="nettle? ( virtual/pkgconfig )"
@@ -38,8 +47,10 @@ DEPEND="
acct-user/ntp
sys-libs/libcap
)
+ nts? ( net-libs/gnutls:= )
libedit? ( dev-libs/libedit )
nettle? ( dev-libs/nettle:= )
+ nss? ( dev-libs/nss:= )
seccomp? ( sys-libs/libseccomp )
html? ( dev-ruby/asciidoctor )
pps? ( net-misc/pps-tools )
@@ -61,11 +72,6 @@ src_prepare() {
-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
doc/* examples/* || die
- sed -i \
- -e 's|RELOADDNS||g' \
- -e 's|pkg-config|${PKG_CONFIG}|g' \
- configure || die
-
cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf || die
}
@@ -84,24 +90,30 @@ src_configure() {
tc-export CC PKG_CONFIG
- # Note: ncurses and nss switches are mentioned in the configure script but
- # do nothing
+ # Update from time to time with output from "date +%s"
+ # on a system that is time-synced.
+ export SOURCE_DATE_EPOCH=1607976314
+
# not an autotools generated script
local myconf=(
$(use_enable seccomp scfilter)
$(usex caps '' --disable-linuxcaps)
$(usex cmdmon '' --disable-cmdmon)
+ $(usex debug '--enable-debug' '')
$(usex ipv6 '' --disable-ipv6)
$(usex libedit '' --without-editline)
$(usex nettle '' --without-nettle)
+ $(usex nss '' --without-nss)
$(usex ntp '' --disable-ntp)
+ $(usex nts '' --disable-nts)
+ $(usex nts '' --without-gnutls)
$(usex phc '' --disable-phc)
$(usex pps '' --disable-pps)
$(usex refclock '' --disable-refclock)
$(usex rtc '' --disable-rtc)
$(usex samba --enable-ntp-signd '')
$(usex sechash '' --disable-sechash)
- ${EXTRA_ECONF}
+ $(usex libtomcrypt '' --disable-tomcrypt)
--chronysockdir="${EPREFIX}/run/chrony"
--docdir="${EPREFIX}/usr/share/doc/${PF}"
--mandir="${EPREFIX}/usr/share/man"
@@ -109,8 +121,7 @@ src_configure() {
--sysconfdir="${EPREFIX}/etc/chrony"
--with-hwclockfile="${EPREFIX}/etc/adjtime"
--with-pidfile="${EPREFIX}/run/chrony/chronyd.pid"
- --without-nss
- --without-tomcrypt
+ ${EXTRA_ECONF}
)
# print the ./configure call
@@ -165,18 +176,35 @@ src_install() {
pkg_preinst() {
HAD_CAPS=false
+ HAD_SECCOMP=false
- if has_version 'net-misc/chrony[caps]'; then
+ if has_version 'net-misc/chrony[caps]' ; then
HAD_CAPS=true
fi
+
+ if has_version 'net-misc/chrony[seccomp]' ; then
+ HAD_SECCOMP=true
+ fi
+
}
pkg_postinst() {
tmpfiles_process chronyd.conf
- if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then
- ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
- ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
- ewarn "This is necessary for chrony to drop privileges"
+ if [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ if use caps && ! ${HAD_CAPS} ; then
+ ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
+ ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
+ ewarn "This is necessary for chrony to drop privileges"
+ elif ! use caps && ! ${HAD_CAPS} ; then
+ ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root"
+ fi
+ fi
+
+ if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then
+ elog "To enable seccomp in enforcing mode, please modify:"
+ elog "- /etc/conf.d/chronyd for OpenRC"
+ elog "- systemctl edit chronyd for systemd"
+ elog "to use -F 1 or -F -1 instead of -F 0 (see man chronyd)"
fi
}
diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml
index 6d7a44f2f91e..e43d78736618 100644
--- a/net-misc/chrony/metadata.xml
+++ b/net-misc/chrony/metadata.xml
@@ -24,14 +24,18 @@
</longdescription>
<use>
<flag name="cmdmon">Support for command and monitoring</flag>
+ <flag name="debug">Get DEBUG_LOG output from chronyd when passing -dd parameter</flag>
<flag name="html">Install HTML documentation</flag>
- <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for hash functions</flag>
+ <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for hash functions or nts</flag>
+ <flag name="nss">Use <pkg>dev-libs/nss</pkg> for hash functions</flag>
<flag name="ntp">Support for the Network Time Protocol (NTP)</flag>
+ <flag name="nts">Support for Network Time Security (NTS). Uses <pkg>net-libs/gnutls</pkg></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="sechash">Enable support for hashes other than MD5</flag>
+ <flag name="libtomcrypt">Support different hashes via <pkg>dev-libs/libtomcrypt</pkg></flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:chrony_project:chrony</remote-id>