diff options
Diffstat (limited to 'main/chrony')
-rw-r--r-- | main/chrony/APKBUILD | 28 | ||||
-rw-r--r-- | main/chrony/chronyd.initd | 82 | ||||
-rw-r--r-- | main/chrony/fix-tests.patch | 12 | ||||
-rw-r--r-- | main/chrony/max_resolve_interval.patch | 4 |
4 files changed, 32 insertions, 94 deletions
diff --git a/main/chrony/APKBUILD b/main/chrony/APKBUILD index 8dec5648e9a..488d57f84f8 100644 --- a/main/chrony/APKBUILD +++ b/main/chrony/APKBUILD @@ -2,20 +2,19 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=chrony -pkgver=4.1 +pkgver=4.5 pkgrel=0 pkgdesc="NTP client and server programs" -url="https://chrony.tuxfamily.org" +url="https://chrony-project.org/" pkgusers="$pkgname" pkggroups="$pkgname" arch="all" -license="GPL-2.0-only" +license="GPL-2.0-or-later" install="$pkgname.pre-install $pkgname.pre-upgrade" -makedepends="asciidoctor libcap-dev texinfo nettle-dev gnutls-dev" +makedepends="asciidoctor libcap-dev texinfo nettle-dev gnutls-dev libseccomp-dev" checkdepends="bash" -subpackages="$pkgname-doc $pkgname-openrc" -source="https://download.tuxfamily.org/chrony/chrony-$pkgver.tar.gz - fix-tests.patch +subpackages="$pkgname-dbg $pkgname-doc $pkgname-openrc" +source="https://chrony-project.org/releases/chrony-$pkgver.tar.gz max_resolve_interval.patch chronyd.confd @@ -39,14 +38,18 @@ prepare() { } build() { - CPPFLAGS="$CPPFLAGS -I./pps-tools/" ./configure \ + CPPFLAGS="$CPPFLAGS -I./pps-tools/" \ + CFLAGS="$CFLAGS -flto=auto" \ + ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ --sysconfdir=/etc/$pkgname \ + --chronyrundir=/run/chrony \ --disable-readline \ --with-user=$pkgname \ --with-sendmail=/usr/sbin/sendmail \ - --enable-ntp-signd + --enable-ntp-signd \ + --enable-scfilter make all docs } @@ -80,11 +83,10 @@ package() { } sha512sums=" -5e283d6a56e6852606c681a7c29c5786b102d584178cbd7033ebbc95a8e95533605631363b850a3087cca438a5878db7a317f120aab2fd856487d02fccfbcb1f chrony-4.1.tar.gz -067d47224a8c075ec8f63ffc58e65b030fdf228a72c4f03d50a2f2c17414da65bb5d27c7c2e4ba99e909f452041db83eaebe3c9e34c0c8fce18e05ebb489735e fix-tests.patch -b26581ed32680585edea5b8163a0062a87f648394c0f363c77a7d01a36608fcf4d005d9e6ab179ed2827b8a08f598f7bad4801bb5e135cad5107eb77fb19b247 max_resolve_interval.patch +58a449e23186da799064b16ab16f799c1673296984b152b43e87c620d86e272c55365e83439d410fc89e4e0ba0befd7d5c625eac78a6665813b7ea75444f71b5 chrony-4.5.tar.gz +f6f2056d1e70785f66b0fbec6e3ec9b0184785eac262e28e2a2c4d5a49762bf780ed7c2c7990a93f6ef063c167cea01fb8828705be558d0b8ff8c07d6962239f max_resolve_interval.patch c1ce577ed1af9f3d88a6a2880a4834ae0c6a7f45870d9396d2aacd7716eb8de346ce458e1a45fdd48b1e8b8f5cd3afcba9534ac47fedb517604c9d910a342fac chronyd.confd -1501161812ad12679d47a1b671d2ddbe94ec5825d5e225729057abc3b8869cb813acd8bdd7adaba0cd786afdf04280228e327a3b83f89a11d06bf3cb826c5269 chronyd.initd +cc19b01a2a2cc26738f52c2c15d88db47240dcd00987ce5e75ba69fae8385b83a2643946f390d7ce0b73826b8de878989788b36ae5e43b2daac4477cbf9752f6 chronyd.initd 663c6316bcca762de119d88e4bb6536bfe0fea19939fe1b673900847619e7f1d6783b789b38ebba97b5dc3778dedf798bafd65f00f8bd7e312bfed7df0caaf71 chrony.conf eb11fc19243d1789016d88eb7645bfe67c46304547781489bf36eb1dd4c252d523681ff835a6488fa0ef62b6b9e2f781c672279f4439f5d5640a3f214a113048 timepps.h " diff --git a/main/chrony/chronyd.initd b/main/chrony/chronyd.initd index e6ad293dd60..08b4d31a121 100644 --- a/main/chrony/chronyd.initd +++ b/main/chrony/chronyd.initd @@ -1,11 +1,10 @@ #!/sbin/openrc-run -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.8 2007/03/22 14:32:09 tove Exp $ command="/usr/sbin/chronyd" description="NTP daemon" -pidfile="/var/run/chrony/chronyd.pid" +pidfile="/run/chrony/chronyd.pid" +required_files="$CFGFILE" +command_args="-f $CFGFILE $ARGS" depend() { need net @@ -14,71 +13,20 @@ 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 - _cfg_pidfile=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"` - if [ -n "$_cfg_pidfile" ] ; then - pidfile="$_cfg_pidfile" - fi - 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 - - # If we are configured to run in a VRF, provide a hint for that - RC_VRF_EXEC="" - if [ -n "$vrf" ]; then - RC_VRF_EXEC="/sbin/ip vrf exec $vrf" + if [ -c /dev/rtc ]; then + grep -q '^rtcfile' "${CFGFILE}" && command_args="$command_args -s" fi - - local daemon_args= + grep -q '^dumponexit$' "${CFGFILE}" && command_args="$command_args -r" if yesno "$FAST_STARTUP"; then - ARGS="${ARGS} -n" - daemon_args="--background" + # this option makes it stay in foreground and let openrc do the tracking, + # so we have to set pidfile to a dir that exists earlier. + # the reason this is not the default is because there is no 'readiness', + # self-backgrounding chrony waits for time to sync before continuing, + # and this form does not. + command_args="$command_args -n" + command_background=true + pidfile=/run/chronyd.pid fi - - ebegin "Starting chronyd" - eval ${RC_VRF_EXEC} start-stop-daemon $daemon_args --start --quiet \ - --exec "${command}" \ - --pidfile "${pidfile}" \ - -- -f "${CFGFILE}" ${ARGS} - eend $? "Failed to start chronyd" -} - -stop() { - checkconfig || return $? - - ebegin "Stopping chronyd" - start-stop-daemon --stop --quiet \ - --pidfile "${pidfile}" - eend $? "Failed to stop chronyd" + default_start } diff --git a/main/chrony/fix-tests.patch b/main/chrony/fix-tests.patch deleted file mode 100644 index 6291fb0469e..00000000000 --- a/main/chrony/fix-tests.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upr chrony-3.2.orig/test/unit/test.c chrony-3.2/test/unit/test.c ---- chrony-3.2.orig/test/unit/test.c 2017-11-29 11:32:23.610059580 +0100 -+++ chrony-3.2/test/unit/test.c 2017-11-29 11:32:51.213742887 +0100 -@@ -23,6 +23,8 @@ - #include <logging.h> - #include <localp.h> - -+#include <sys/param.h> -+ - #include "test.h" - - void diff --git a/main/chrony/max_resolve_interval.patch b/main/chrony/max_resolve_interval.patch index 6343d912235..d6a5f373e9f 100644 --- a/main/chrony/max_resolve_interval.patch +++ b/main/chrony/max_resolve_interval.patch @@ -2,12 +2,12 @@ Try fix behaviour when network is not available at bootup --- ./ntp_sources.c.orig +++ ./ntp_sources.c -@@ -87,7 +85,7 @@ +@@ -109,7 +109,7 @@ #define RESOLVE_INTERVAL_UNIT 7 #define MIN_RESOLVE_INTERVAL 2 -#define MAX_RESOLVE_INTERVAL 9 +#define MAX_RESOLVE_INTERVAL 6 - #define MIN_REPLACEMENT_INTERVAL 8 + #define MAX_REPLACEMENT_INTERVAL 9 static struct UnresolvedSource *unresolved_sources = NULL; |