* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2015-10-12 12:30 Jeroen Roovers
0 siblings, 0 replies; 9+ messages in thread
From: Jeroen Roovers @ 2015-10-12 12:30 UTC (permalink / raw
To: gentoo-commits
commit: 4eef551bae7af80851ef5b4277a3f81dce7d932b
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 12:28:33 2015 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 12:30:18 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4eef551b
net-misc/chrony: Rotate 2.2 logs without chronyc authentication
Package-Manager: portage-2.2.23
net-misc/chrony/chrony-2.2_pre1-r1.ebuild | 114 +++++++++++++++++++++++++++++
net-misc/chrony/files/chrony-2.2.logrotate | 7 ++
2 files changed, 121 insertions(+)
diff --git a/net-misc/chrony/chrony-2.2_pre1-r1.ebuild b/net-misc/chrony/chrony-2.2_pre1-r1.ebuild
new file mode 100644
index 0000000..3b219f2
--- /dev/null
+++ b/net-misc/chrony/chrony-2.2_pre1-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~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 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/files/chrony-2.2.logrotate b/net-misc/chrony/files/chrony-2.2.logrotate
new file mode 100644
index 0000000..ae76c8d
--- /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
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2015-12-04 6:04 Jeroen Roovers
0 siblings, 0 replies; 9+ messages in thread
From: Jeroen Roovers @ 2015-12-04 6:04 UTC (permalink / raw
To: gentoo-commits
commit: 65b7de580ed1bd180ab46e1a600a394bca25248b
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 4 06:04:30 2015 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Dec 4 06:04:30 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b7de58
net-misc/chrony: Drop s-s-d --background from init.d script (bug #566972 by Peter Humphrey and Holger Hoffstätte).
Package-Manager: portage-2.2.26
.../{chrony-9999.ebuild => chrony-2.2-r1.ebuild} | 8 +--
net-misc/chrony/chrony-9999.ebuild | 2 +-
net-misc/chrony/files/chronyd.init-r1 | 70 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 5 deletions(-)
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-2.2-r1.ebuild
similarity index 92%
copy from net-misc/chrony/chrony-9999.ebuild
copy to net-misc/chrony/chrony-2.2-r1.ebuild
index 2dae405..04ce021 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-2.2-r1.ebuild
@@ -3,15 +3,15 @@
# $Id$
EAPI=5
-inherit eutils git-r3 systemd toolchain-funcs
+inherit eutils systemd toolchain-funcs
DESCRIPTION="NTP client and server programs"
HOMEPAGE="http://chrony.tuxfamily.org/"
-EGIT_REPO_URI="git://git.tuxfamily.org/gitroot/chrony/chrony.git"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~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 )
@@ -96,7 +96,7 @@ src_install() {
doinfo chrony.info*
- newinitd "${FILESDIR}"/chronyd.init chronyd
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
newconfd "${FILESDIR}"/chronyd.conf chronyd
insinto /etc/${PN}
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 2dae405..13709c0 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -96,7 +96,7 @@ src_install() {
doinfo chrony.info*
- newinitd "${FILESDIR}"/chronyd.init chronyd
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd
newconfd "${FILESDIR}"/chronyd.conf chronyd
insinto /etc/${PN}
diff --git a/net-misc/chrony/files/chronyd.init-r1 b/net-misc/chrony/files/chronyd.init-r1
new file mode 100644
index 0000000..80ec855
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init-r1
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2016-05-22 15:38 Tobias Klausmann
0 siblings, 0 replies; 9+ messages in thread
From: Tobias Klausmann @ 2016-05-22 15:38 UTC (permalink / raw
To: gentoo-commits
commit: 0909acacf126718591b95aaf3caf7467abdf4ae1
Author: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 15:38:20 2016 +0000
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sun May 22 15:38:20 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0909acac
net-misc/chrony: Modify logrotate script to suppress spurious mails
Package-Manager: portage-2.3.0_rc1
net-misc/chrony/chrony-2.4_pre1-r1.ebuild | 118 +++++++++++++++++++++++++++++
net-misc/chrony/files/chrony-2.4.logrotate | 7 ++
2 files changed, 125 insertions(+)
diff --git a/net-misc/chrony/chrony-2.4_pre1-r1.ebuild b/net-misc/chrony/chrony-2.4_pre1-r1.ebuild
new file mode 100644
index 0000000..7d20e20
--- /dev/null
+++ b/net-misc/chrony/chrony-2.4_pre1-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~amd64 ~hppa ~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 )
+"
+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
+}
+
+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.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.4.logrotate b/net-misc/chrony/files/chrony-2.4.logrotate
new file mode 100644
index 0000000..d1ae72b
--- /dev/null
+++ b/net-misc/chrony/files/chrony-2.4.logrotate
@@ -0,0 +1,7 @@
+/var/log/chrony/*.log {
+ missingok
+ sharedscripts
+ postrotate
+ /usr/bin/chronyc cyclelogs |grep -v '^200 OK'
+ endscript
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2018-09-05 14:00 Mike Gilbert
0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2018-09-05 14:00 UTC (permalink / raw
To: gentoo-commits
commit: 3258d7f48cd61a5a116b857de94fa02547a3f06d
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 4 17:53:47 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Sep 5 14:00:41 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3258d7f4
net-misc/chrony: systemd changes/fixes
Use upstream unit file with a couple tweaks.
Stop installing obsolete[1] ntp-units.d file.
[1] https://github.com/systemd/systemd/commit/b72ddf0f4f552dd53d6404b6ddbc9f17d02b8e12
....4_pre1-r1.ebuild => chrony-3.4_pre1-r2.ebuild} | 10 ++++----
net-misc/chrony/chrony-9999.ebuild | 12 ++++++----
net-misc/chrony/files/chronyd-systemd-gentoo.patch | 28 ++++++++++++++++++++++
3 files changed, 41 insertions(+), 9 deletions(-)
diff --git a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
similarity index 96%
rename from net-misc/chrony/chrony-3.4_pre1-r1.ebuild
rename to net-misc/chrony/chrony-3.4_pre1-r2.ebuild
index a39dc7b24dc..2b17b91c999 100644
--- a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild
+++ b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
@@ -36,12 +36,15 @@ RESTRICT=test
S="${WORKDIR}/${P/_/-}"
+PATCHES=(
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+
src_prepare() {
+ default
sed -i \
-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
doc/* examples/* || die
-
- default
}
src_configure() {
@@ -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 1878efaf91d..ac4e878733e 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
@@ -33,13 +33,16 @@ RDEPEND="
RESTRICT=test
S="${WORKDIR}/${P/_/-}"
+PATCHES=(
+ "${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+
src_prepare() {
+ default
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() {
@@ -111,6 +114,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 00000000000..63d6b7ed339
--- /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
+
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2019-09-26 8:21 Jeroen Roovers
0 siblings, 0 replies; 9+ messages in thread
From: Jeroen Roovers @ 2019-09-26 8:21 UTC (permalink / raw
To: gentoo-commits
commit: eafdb1971ecba1906f3f9e586623d134f6d064c5
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 26 08:19:13 2019 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Sep 26 08:21:06 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eafdb197
net-misc/chrony: Use Gentoo vendor pool
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Fixes: https://bugs.gentoo.org/621702
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../chrony/{chrony-3.5.ebuild => chrony-3.5-r1.ebuild} | 1 +
net-misc/chrony/chrony-9999.ebuild | 1 +
.../chrony/files/chrony-3.5-pool-vendor-gentoo.patch | 16 ++++++++++++++++
3 files changed, 18 insertions(+)
diff --git a/net-misc/chrony/chrony-3.5.ebuild b/net-misc/chrony/chrony-3.5-r1.ebuild
similarity index 98%
rename from net-misc/chrony/chrony-3.5.ebuild
rename to net-misc/chrony/chrony-3.5-r1.ebuild
index c74eea646f9..e280760fd28 100644
--- a/net-misc/chrony/chrony-3.5.ebuild
+++ b/net-misc/chrony/chrony-3.5-r1.ebuild
@@ -40,6 +40,7 @@ RESTRICT=test
S="${WORKDIR}/${P/_/-}"
PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
"${FILESDIR}"/${PN}-3.5-systemd-gentoo.patch
)
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 53dd5de5b8a..5cac01a6dee 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -38,6 +38,7 @@ RESTRICT=test
S="${WORKDIR}/${P/_/-}"
PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
"${FILESDIR}"/${PN}-3.5-systemd-gentoo.patch
)
diff --git a/net-misc/chrony/files/chrony-3.5-pool-vendor-gentoo.patch b/net-misc/chrony/files/chrony-3.5-pool-vendor-gentoo.patch
new file mode 100644
index 00000000000..817a4106738
--- /dev/null
+++ b/net-misc/chrony/files/chrony-3.5-pool-vendor-gentoo.patch
@@ -0,0 +1,16 @@
+- Use the Gentoo pool
+- Use the server directive instead of the pool directive so we get four time
+ sources and not twelve.
+
+--- a/examples/chrony.conf.example1
++++ b/examples/chrony.conf.example1
+@@ -1,5 +1,8 @@
+ # Use public NTP servers from the pool.ntp.org project.
+-pool pool.ntp.org iburst
++server 0.gentoo.pool.ntp.org iburst
++server 1.gentoo.pool.ntp.org iburst
++server 2.gentoo.pool.ntp.org iburst
++server 3.gentoo.pool.ntp.org iburst
+
+ # Record the rate at which the system clock gains/losses time.
+ driftfile /var/lib/chrony/drift
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2020-03-30 18:36 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2020-03-30 18:36 UTC (permalink / raw
To: gentoo-commits
commit: a2c99543bfd3245724e21089a617f28d828c5548
Author: Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Sun Mar 15 20:53:29 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Mar 30 18:36:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2c99543
net-misc/chrony: Enable seccomp filtering when USE=seccomp
We already have USE=seccomp but chronyd won't do anything unless
-F is set to 1. We could also set -F -1 which will log any syscalls
which would've been blocked but won't deny them.
Also fixes systemd for previous commit.
Bug: https://bugs.gentoo.org/711058
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/14973
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
net-misc/chrony/chrony-3.5-r3.ebuild | 30 ++++++++++---------
...ony-3.5-r3.ebuild => chrony-4.0_pre1-r1.ebuild} | 35 ++++++++++++----------
net-misc/chrony/chrony-9999.ebuild | 30 ++++++++++---------
.../files/chrony-3.5-r3-systemd-gentoo.patch | 12 ++++++++
net-misc/chrony/files/chronyd.conf | 2 +-
5 files changed, 65 insertions(+), 44 deletions(-)
diff --git a/net-misc/chrony/chrony-3.5-r3.ebuild b/net-misc/chrony/chrony-3.5-r3.ebuild
index 3f11f8dd951..229f5b27506 100644
--- a/net-misc/chrony/chrony-3.5-r3.ebuild
+++ b/net-misc/chrony/chrony-3.5-r3.ebuild
@@ -12,8 +12,8 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="
- +adns caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc
- seccomp selinux
+ +adns +caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc
+ +seccomp selinux
"
REQUIRED_USE="
?? ( libedit readline )
@@ -42,7 +42,7 @@ S="${WORKDIR}/${P/_/-}"
PATCHES=(
"${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
- "${FILESDIR}"/${PN}-3.5-systemd-gentoo.patch
+ "${FILESDIR}"/${PN}-3.5-r3-systemd-gentoo.patch
)
src_prepare() {
@@ -52,13 +52,20 @@ src_prepare() {
doc/* examples/* || die
# Copy for potential user fixup
- cp "${FILESDIR}"/chronyd.conf "$T"/chronyd.conf
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf
+ cp examples/chronyd.service "${T}"/chronyd.service
# Set config for privdrop
if ! use caps; then
sed -i \
-e 's/-u ntp//' \
- "${T}"/chronyd.conf || die
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
+ fi
+
+ if ! use seccomp; then
+ sed -i \
+ -e 's/-F 1//' \
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
fi
}
@@ -135,16 +142,11 @@ src_install() {
insinto /etc/logrotate.d
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
- systemd_dounit examples/{chronyd,chrony-wait}.service
+ systemd_dounit "${T}"/chronyd.service
+ systemd_dounit examples/chrony-wait.service
systemd_enable_ntpunit 50-chrony chronyd.service
}
-pkg_preinst() {
- if use caps && has_version net-misc/chrony[-caps]; then
- elog "/run/chronyd needs ntp:ntp permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- elif ! use caps && has_version net-misc/chrony[caps]; then
- elog "/run/chronyd needs root:root permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- fi
+pkg_postinst() {
+ tmpfiles_process chronyd.conf
}
diff --git a/net-misc/chrony/chrony-3.5-r3.ebuild b/net-misc/chrony/chrony-4.0_pre1-r1.ebuild
similarity index 81%
copy from net-misc/chrony/chrony-3.5-r3.ebuild
copy to net-misc/chrony/chrony-4.0_pre1-r1.ebuild
index 3f11f8dd951..af44e004523 100644
--- a/net-misc/chrony/chrony-3.5-r3.ebuild
+++ b/net-misc/chrony/chrony-4.0_pre1-r1.ebuild
@@ -12,16 +12,18 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="
- +adns caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc
- seccomp selinux
+ +adns +caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps readline +refclock +rtc
+ +seccomp +sechash selinux
"
REQUIRED_USE="
?? ( libedit readline )
+ sechash? ( nettle )
"
CDEPEND="
caps? ( sys-libs/libcap )
libedit? ( dev-libs/libedit )
+ nettle? ( dev-libs/nettle )
readline? ( >=sys-libs/readline-4.1-r4:= )
seccomp? ( sys-libs/libseccomp )
"
@@ -42,7 +44,7 @@ S="${WORKDIR}/${P/_/-}"
PATCHES=(
"${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
- "${FILESDIR}"/${PN}-3.5-systemd-gentoo.patch
+ "${FILESDIR}"/${PN}-3.5-r3-systemd-gentoo.patch
)
src_prepare() {
@@ -52,13 +54,20 @@ src_prepare() {
doc/* examples/* || die
# Copy for potential user fixup
- cp "${FILESDIR}"/chronyd.conf "$T"/chronyd.conf
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf
+ cp examples/chronyd.service "${T}"/chronyd.service
# Set config for privdrop
if ! use caps; then
sed -i \
-e 's/-u ntp//' \
- "${T}"/chronyd.conf || die
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
+ fi
+
+ if ! use seccomp; then
+ sed -i \
+ -e 's/-F 1//' \
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
fi
}
@@ -84,15 +93,16 @@ src_configure() {
$(usex caps '' --disable-linuxcaps)
$(usex cmdmon '' --disable-cmdmon)
$(usex ipv6 '' --disable-ipv6)
+ $(usex nettle '' --without-nettle)
$(usex ntp '' --disable-ntp)
$(usex phc '' --disable-phc)
$(usex pps '' --disable-pps)
$(usex refclock '' --disable-refclock)
$(usex rtc '' --disable-rtc)
+ $(usex sechash '' --disable-sechash)
${CHRONY_EDITLINE}
${EXTRA_ECONF}
--chronysockdir="${EPREFIX}/run/chrony"
- --disable-sechash
--docdir="${EPREFIX}/usr/share/doc/${PF}"
--mandir="${EPREFIX}/usr/share/man"
--prefix="${EPREFIX}/usr"
@@ -135,16 +145,11 @@ src_install() {
insinto /etc/logrotate.d
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
- systemd_dounit examples/{chronyd,chrony-wait}.service
+ systemd_dounit "${T}"/chronyd.service
+ systemd_dounit examples/chrony-wait.service
systemd_enable_ntpunit 50-chrony chronyd.service
}
-pkg_preinst() {
- if use caps && has_version net-misc/chrony[-caps]; then
- elog "/run/chronyd needs ntp:ntp permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- elif ! use caps && has_version net-misc/chrony[caps]; then
- elog "/run/chronyd needs root:root permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- fi
+pkg_postinst() {
+ tmpfiles_process chronyd.conf
}
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 5b03ec4fe42..543cabf61d5 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -12,8 +12,8 @@ SLOT="0"
KEYWORDS=""
IUSE="
- +adns caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc
- seccomp selinux
+ +adns +caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc
+ +seccomp selinux
"
REQUIRED_USE="
?? ( libedit readline )
@@ -40,7 +40,7 @@ S="${WORKDIR}/${P/_/-}"
PATCHES=(
"${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
- "${FILESDIR}"/${PN}-3.5-systemd-gentoo.patch
+ "${FILESDIR}"/${PN}-3.5-r3-systemd-gentoo.patch
)
src_prepare() {
@@ -50,13 +50,20 @@ src_prepare() {
doc/* examples/* || die
# Copy for potential user fixup
- cp "${FILESDIR}"/chronyd.conf "$T"/chronyd.conf
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf
+ cp examples/chronyd.service "${T}"/chronyd.service
# Set config for privdrop
if ! use caps; then
sed -i \
-e 's/-u ntp//' \
- "${T}"/chronyd.conf || die
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
+ fi
+
+ if ! use seccomp; then
+ sed -i \
+ -e 's/-F 1//' \
+ "${T}"/chronyd.conf "${T}"/chronyd.service || die
fi
}
@@ -131,16 +138,11 @@ src_install() {
insinto /etc/logrotate.d
newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
- systemd_dounit examples/{chronyd,chrony-wait}.service
+ systemd_dounit "${T}"/chronyd.service
+ systemd_dounit examples/chrony-wait.service
systemd_enable_ntpunit 50-chrony chronyd.service
}
-pkg_preinst() {
- if use caps && has_version net-misc/chrony[-caps]; then
- elog "/run/chronyd needs ntp:ntp permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- elif ! use caps && has_version net-misc/chrony[caps]; then
- elog "/run/chronyd needs root:root permissions; please check."
- elog "The safest option is reboot, but you may chown manually."
- fi
+pkg_postinst() {
+ tmpfiles_process chronyd.conf
}
diff --git a/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch b/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch
new file mode 100644
index 00000000000..0ea3c921980
--- /dev/null
+++ b/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch
@@ -0,0 +1,12 @@
+--- a/examples/chronyd.service
++++ b/examples/chronyd.service
+@@ -8,8 +8,7 @@
+ [Service]
+ Type=forking
+ PIDFile=/run/chrony/chronyd.pid
+-EnvironmentFile=-/etc/sysconfig/chronyd
+-ExecStart=/usr/sbin/chronyd $OPTIONS
++ExecStart=/usr/sbin/chronyd -u ntp -F 1
+ PrivateTmp=yes
+ ProtectHome=yes
+ ProtectSystem=full
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
index c641d985e56..c04f3525f0b 100644
--- a/net-misc/chrony/files/chronyd.conf
+++ b/net-misc/chrony/files/chronyd.conf
@@ -9,4 +9,4 @@ CFGFILE="/etc/chrony/chrony.conf"
# The combination of "-s -r" allows chronyd to perform long term averaging of
# the gain or loss rate across system reboots and shutdowns.
-ARGS="-u ntp"
+ARGS="-u ntp -F 1"
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2020-09-05 9:29 Jeroen Roovers
0 siblings, 0 replies; 9+ messages in thread
From: Jeroen Roovers @ 2020-09-05 9:29 UTC (permalink / raw
To: gentoo-commits
commit: 0038ac68924daa03d33752def494681c14c8bb41
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 5 09:23:55 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Sep 5 09:29:12 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0038ac68
net-misc/chrony: Fix /etc/conf.d/chronyd for USE=-caps
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Closes: https://bugs.gentoo.org/740418
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
net-misc/chrony/chrony-3.5.1-r1.ebuild | 2 +-
net-misc/chrony/chrony-4.0_pre3.ebuild | 2 +-
net-misc/chrony/chrony-9999.ebuild | 2 +-
net-misc/chrony/files/chronyd.conf | 2 +-
net-misc/chrony/files/chronyd.conf-r1 | 12 ------------
5 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/net-misc/chrony/chrony-3.5.1-r1.ebuild b/net-misc/chrony/chrony-3.5.1-r1.ebuild
index 38bd1ccc1f0..9a2af1bd3ea 100644
--- a/net-misc/chrony/chrony-3.5.1-r1.ebuild
+++ b/net-misc/chrony/chrony-3.5.1-r1.ebuild
@@ -68,7 +68,7 @@ src_prepare() {
-e 's|pkg-config|${PKG_CONFIG}|g' \
configure || die
- cp "${FILESDIR}"/chronyd.conf-r1 "${T}"/chronyd.conf || die
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf || die
}
src_configure() {
diff --git a/net-misc/chrony/chrony-4.0_pre3.ebuild b/net-misc/chrony/chrony-4.0_pre3.ebuild
index 25ae917e91e..b5c97cbbd86 100644
--- a/net-misc/chrony/chrony-4.0_pre3.ebuild
+++ b/net-misc/chrony/chrony-4.0_pre3.ebuild
@@ -68,7 +68,7 @@ src_prepare() {
-e 's|pkg-config|${PKG_CONFIG}|g' \
configure || die
- cp "${FILESDIR}"/chronyd.conf-r1 "${T}"/chronyd.conf || die
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf || die
}
src_configure() {
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 25ae917e91e..b5c97cbbd86 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -68,7 +68,7 @@ src_prepare() {
-e 's|pkg-config|${PKG_CONFIG}|g' \
configure || die
- cp "${FILESDIR}"/chronyd.conf-r1 "${T}"/chronyd.conf || die
+ cp "${FILESDIR}"/chronyd.conf "${T}"/chronyd.conf || die
}
src_configure() {
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
index fc43a95c40f..d017660d599 100644
--- a/net-misc/chrony/files/chronyd.conf
+++ b/net-misc/chrony/files/chronyd.conf
@@ -9,4 +9,4 @@ CFGFILE="/etc/chrony/chrony.conf"
# The combination of "-s -r" allows chronyd to perform long term averaging of
# the gain or loss rate across system reboots and shutdowns.
-ARGS=""
+ARGS=" -u ntp -F 0"
diff --git a/net-misc/chrony/files/chronyd.conf-r1 b/net-misc/chrony/files/chronyd.conf-r1
deleted file mode 100644
index 2783f29e684..00000000000
--- a/net-misc/chrony/files/chronyd.conf-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-# /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="-u ntp -F 0"
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2021-12-17 2:52 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-12-17 2:52 UTC (permalink / raw
To: gentoo-commits
commit: ea54be30d319e23b38793bfdb1317c70715ff842
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 17 00:45:29 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 17 02:52:40 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea54be30
net-misc/chrony: add 4.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/chrony/Manifest | 2 ++
net-misc/chrony/{chrony-9999.ebuild => chrony-4.2.ebuild} | 4 ++--
net-misc/chrony/chrony-9999.ebuild | 4 ++--
net-misc/chrony/files/chrony-4.2-systemd-gentoo.patch | 13 +++++++++++++
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest
index ee8a90b57aad..6fc04ec3c097 100644
--- a/net-misc/chrony/Manifest
+++ b/net-misc/chrony/Manifest
@@ -1,2 +1,4 @@
DIST chrony-4.1.tar.gz 564648 BLAKE2B f9c4b44c521ee592c109b8a3d500b9cb3ea4fbf0d7dce9d8754498ad41ce2ac87c913cf72a38557ce5f28208672163b21b067307f723fd91cc91d71f69e739ef SHA512 5e283d6a56e6852606c681a7c29c5786b102d584178cbd7033ebbc95a8e95533605631363b850a3087cca438a5878db7a317f120aab2fd856487d02fccfbcb1f
DIST chrony-4.1.tar.gz.asc 833 BLAKE2B 6d800ae436523f61cd713cdd12cf0246db53e732554433d5ef6cf1a437296ee9d0da3b2e9e72d1ccb0e3a6b1ee1227e5d1626bf031b0491670ee0712e17c57ff SHA512 82faf9171d782c18224d2d44b340994b0ddab141e88cc803dea83d0ffbb6468bc51e8b11c8dd9bd327220cae04f7d789b58ab23141a2bdf038ce628f9adeb57a
+DIST chrony-4.2.tar.gz 578411 BLAKE2B 6eac4f144f5811d0f83a9827e2b5113dead1ff96952f6e6d32dcea9858e04512f635d70237fe6faced095991204b0f62bcb0e9d1a4b34e8778f205058afdfb45 SHA512 7f946b27de605b3ebea62cf23916dfad77c99e8b2338ba239ede6b8216ce436b3d4d87770f371c8d8e006507c51d5c831b51f067957abd2935adfdec3f5aa67d
+DIST chrony-4.2.tar.gz.asc 833 BLAKE2B 41cb83f62dd58489313438672d209cc65fdbb5f8f595ea38f990d5e15194f91532d3f3221c6c38581467d62e95d23853a4fc438d32b99606def5f06db0031969 SHA512 d8ae4b540ce3529a5a72e10c14765a33ca6fc41529b6fdc9928fb171f25bd6fb87f930b7783638892f42f4cbcfaab4cb1064c930bae1d5204a71babad72b6e10
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-4.2.ebuild
similarity index 98%
copy from net-misc/chrony/chrony-9999.ebuild
copy to net-misc/chrony/chrony-4.2.ebuild
index 6051d64c9884..75b4ce68b58a 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-4.2.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI+=" verify-sig? ( https://download.tuxfamily.org/chrony/${P/_/-}-tar-gz-asc.txt -> ${P/_/-}.tar.gz.asc )"
if [[ ${PV} != *_pre* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
fi
@@ -75,7 +75,7 @@ fi
PATCHES=(
"${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
- "${FILESDIR}"/${PN}-4.1-systemd-gentoo.patch
+ "${FILESDIR}"/${PN}-4.2-systemd-gentoo.patch
)
src_prepare() {
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 6051d64c9884..75b4ce68b58a 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI+=" verify-sig? ( https://download.tuxfamily.org/chrony/${P/_/-}-tar-gz-asc.txt -> ${P/_/-}.tar.gz.asc )"
if [[ ${PV} != *_pre* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
fi
@@ -75,7 +75,7 @@ fi
PATCHES=(
"${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
- "${FILESDIR}"/${PN}-4.1-systemd-gentoo.patch
+ "${FILESDIR}"/${PN}-4.2-systemd-gentoo.patch
)
src_prepare() {
diff --git a/net-misc/chrony/files/chrony-4.2-systemd-gentoo.patch b/net-misc/chrony/files/chrony-4.2-systemd-gentoo.patch
new file mode 100644
index 000000000000..1852cdeb92e9
--- /dev/null
+++ b/net-misc/chrony/files/chrony-4.2-systemd-gentoo.patch
@@ -0,0 +1,13 @@
+diff --git a/examples/chronyd.service b/examples/chronyd.service
+index 4fb930e..8df627a 100644
+--- a/examples/chronyd.service
++++ b/examples/chronyd.service
+@@ -9,7 +9,7 @@ ConditionCapability=CAP_SYS_TIME
+ Type=forking
+ PIDFile=/run/chrony/chronyd.pid
+ EnvironmentFile=-/etc/sysconfig/chronyd
+-ExecStart=/usr/sbin/chronyd $OPTIONS
++ExecStart=/usr/sbin/chronyd $OPTIONS -u ntp -F 2
+
+ CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
+ CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_KILL CAP_LEASE CAP_LINUX_IMMUTABLE
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
@ 2022-11-10 7:13 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-11-10 7:13 UTC (permalink / raw
To: gentoo-commits
commit: 5b8a644606babdb63998693ece2f3a9d5a8e9e6e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 10 07:02:29 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 10 07:02:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b8a6446
net-misc/chrony: fix -Wstrict-prototypes
Closes: https://bugs.gentoo.org/880519
Thanks-to: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/chrony/chrony-4.3-r1.ebuild | 254 +++++++++++++++++++++
.../chrony-4.3-strict-prototypes-clang16.patch | 71 ++++++
2 files changed, 325 insertions(+)
diff --git a/net-misc/chrony/chrony-4.3-r1.ebuild b/net-misc/chrony/chrony-4.3-r1.ebuild
new file mode 100644
index 000000000000..021c2b2f5fb2
--- /dev/null
+++ b/net-misc/chrony/chrony-4.3-r1.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo 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
+ EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git"
+ inherit git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/mlichvar.asc
+ inherit verify-sig
+
+ SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://download.tuxfamily.org/chrony/${P/_/-}-tar-gz-asc.txt -> ${P/_/-}.tar.gz.asc )"
+
+ if [[ ${PV} != *_pre* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ fi
+fi
+
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+caps +cmdmon debug html ipv6 libedit libtomcrypt +nettle nss +ntp +nts +phc pps +refclock +rtc samba +seccomp +sechash selinux"
+# nettle > nss > libtomcrypt in configure
+REQUIRED_USE="
+ sechash? ( || ( nettle nss libtomcrypt ) )
+ nettle? ( !nss )
+ nss? ( !nettle )
+ libtomcrypt? ( !nettle !nss )
+ !sechash? ( !nss )
+ !sechash? ( !nts? ( !nettle ) )
+"
+
+DEPEND="
+ caps? (
+ acct-group/ntp
+ acct-user/ntp
+ sys-libs/libcap
+ )
+ libedit? ( dev-libs/libedit )
+ !libedit? ( sys-libs/readline:= )
+ nettle? ( dev-libs/nettle:= )
+ nss? ( dev-libs/nss:= )
+ nts? ( net-libs/gnutls:= )
+ pps? ( net-misc/pps-tools )
+ seccomp? ( sys-libs/libseccomp )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+# bison dep only for 4.3-r1 for ${P}-strict-prototypes-clang16.patch
+BDEPEND="
+ sys-devel/bison
+ html? ( dev-ruby/asciidoctor )
+ nts? ( virtual/pkgconfig )
+ sechash? (
+ nettle? ( virtual/pkgconfig )
+ nss? ( virtual/pkgconfig )
+ )
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Needed for doc generation in 9999
+ REQUIRED_USE+=" html"
+ BDEPEND+=" virtual/w3m"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-mlichvar-20210513 )"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
+ "${FILESDIR}"/${PN}-4.2-systemd-gentoo.patch
+ "${FILESDIR}"/${P}-strict-prototypes-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
+ doc/* examples/* || die
+
+ cp "${FILESDIR}"/chronyd.conf-r3 "${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 2//' \
+ "${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 libtomcrypt '' '--without-tomcrypt')
+ $(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')
+
+ --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
+ edo ./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
+ # bug #711058
+ fowners -R ntp:ntp /var/{lib,log}/chrony
+ fperms -R 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=0
+ HAD_SECCOMP=0
+ HAD_PRE_NEW_SECCOMP_LEVEL=0
+
+ # See https://dev.gentoo.org/~zmedico/portage/doc/portage.html#package-ebuild-phases-after-2.1.5
+ # in "Ebuild Phases" for an explanation of why we need to save the variable beforehand
+ if has_version 'net-misc/chrony[caps]' ; then
+ HAD_CAPS=1
+ fi
+
+ if has_version 'net-misc/chrony[seccomp]' ; then
+ HAD_SECCOMP=1
+ fi
+
+ if has_version '>=net-misc/chrony-4.1[seccomp]' ; then
+ # This version introduced a new filter level: -F 2
+ # It's a limited set of seccomp filters designed to be 'bare minimum'
+ HAD_PRE_NEW_SECCOMP_LEVEL=1
+ fi
+}
+
+pkg_postinst() {
+ tmpfiles_process chronyd.conf
+
+ if [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ if use caps && ! [[ ${HAD_CAPS} -eq 1 ]] ; then
+ # bug #719876
+ 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} -eq 0 ]] ; then
+ ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root"
+ fi
+ fi
+
+ # See bug #783915 for general discussion on enabling seccomp filtering
+ # by default.
+ local show_seccomp_enable_msg=0
+
+ # Was seccomp disabled before and now enabled?
+ if [[ ${HAD_SECCOMP} -eq 0 ]] && use seccomp ; then
+ show_seccomp_enable_msg=1
+ fi
+
+ # Are we coming from an old version without the new 'minimal' filter?
+ # (-F 2)
+ if [[ ${HAD_PRE_NEW_SECCOMP_LEVEL} -eq 0 ]] ; then
+ show_seccomp_enable_msg=1
+ fi
+
+ if [[ ${show_seccomp_enable_msg} -eq 1 ]] ; then
+ elog "To enable seccomp in a stricter mode, please modify:"
+ elog "- ${EROOT}/etc/conf.d/chronyd for OpenRC"
+ elog "- systemctl edit chronyd for systemd"
+ elog "to use -F 1 or -F -1 instead of -F 2 (see man chronyd)"
+ elog "By default, we now use -F 2 which is a baseline/minimal filter."
+ fi
+}
diff --git a/net-misc/chrony/files/chrony-4.3-strict-prototypes-clang16.patch b/net-misc/chrony/files/chrony-4.3-strict-prototypes-clang16.patch
new file mode 100644
index 000000000000..fb89a1eb3fef
--- /dev/null
+++ b/net-misc/chrony/files/chrony-4.3-strict-prototypes-clang16.patch
@@ -0,0 +1,71 @@
+https://git.tuxfamily.org/chrony/chrony.git/commit/?id=7b97668319f9449b4adb1a978bb1fe9b0fb22e4d
+https://bugs.gentoo.org/880519
+
+From 7b97668319f9449b4adb1a978bb1fe9b0fb22e4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Wed, 9 Nov 2022 09:17:14 +0100
+Subject: getdate: fix various warnings which will be errors with clang-16
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+These were found by Gentoo's QA while rebuilding the world with
+clang-16: https://bugs.gentoo.org/880519
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- a/getdate.y
++++ b/getdate.y
+@@ -448,9 +448,9 @@ o_merid : /* NULL */
+ the same signature as the function definition does. */
+ #include "getdate.h"
+
+-extern struct tm *gmtime ();
+-extern struct tm *localtime ();
+-extern time_t mktime ();
++extern struct tm *gmtime (const time_t *timep);
++extern struct tm *localtime (const time_t *timep);
++extern time_t mktime (struct tm *tm);
+
+ /* Month and day table. */
+ static TABLE const MonthDayTable[] = {
+@@ -641,16 +641,13 @@ static TABLE const MilitaryTable[] = {
+
+ /* ARGSUSED */
+ static int
+-yyerror (s)
+- char *s ATTRIBUTE_UNUSED;
++yyerror (char *s ATTRIBUTE_UNUSED)
+ {
+ return 0;
+ }
+
+ static int
+-ToHour (Hours, Meridian)
+- int Hours;
+- MERIDIAN Meridian;
++ToHour (int Hours, MERIDIAN Meridian)
+ {
+ switch (Meridian)
+ {
+@@ -677,8 +674,7 @@ ToHour (Hours, Meridian)
+ }
+
+ static int
+-ToYear (Year)
+- int Year;
++ToYear (int Year)
+ {
+ if (Year < 0)
+ Year = -Year;
+@@ -694,8 +690,7 @@ ToYear (Year)
+ }
+
+ static int
+-LookupWord (buff)
+- char *buff;
++LookupWord (char *buff)
+ {
+ register char *p;
+ register char *q;
+cgit v0.10.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-11-10 7:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-05 9:29 [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/ Jeroen Roovers
-- strict thread matches above, loose matches on Subject: below --
2022-11-10 7:13 Sam James
2021-12-17 2:52 Sam James
2020-03-30 18:36 Thomas Deutschmann
2019-09-26 8:21 Jeroen Roovers
2018-09-05 14:00 Mike Gilbert
2016-05-22 15:38 Tobias Klausmann
2015-12-04 6:04 Jeroen Roovers
2015-10-12 12:30 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox