From 78183aeb9f3e87392b83dd7c83b995e733289606 Mon Sep 17 00:00:00 2001 From: travankor Date: Fri, 18 Oct 2019 23:46:32 -0700 Subject: [PATCH] chrony: fix wrong option in the default config. The current option rtcfile in the default config conflicts with runit's stage 3 shutdown script. The stage 3 script calls hwclock -w, while chronyd in RTC mode wants to take control of /dev/rtc to measure RTC drift. Furthermore the default chronyd runit service does not take advantage of the Linux RTC functionality with the -s option. See for more info: https://chrony.tuxfamily.org/faq.html#_i_want_to_use_code_chronyd_code_s_rtc_support_must_i_disable_code_hwclock_code To maintain compatibility with the stage 3 shutdown, switch rtcfile to the rtcsync option. Example config file #1 already sets the correct options that work out of the box so use that example file instead of editing the annotated one. Example config file #3 will instead be installed to /usr/share/examples. --- srcpkgs/chrony/template | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/srcpkgs/chrony/template b/srcpkgs/chrony/template index 6d629a9260c..75142b66101 100644 --- a/srcpkgs/chrony/template +++ b/srcpkgs/chrony/template @@ -2,7 +2,7 @@ # When Updating: Please confirm the upstream config still refers to make_dirs pkgname=chrony version=3.5 -revision=1 +revision=2 build_style=gnu-configure configure_args="--without-nss --enable-scfilter --with-sendmail=/usr/bin/sendmail" @@ -29,12 +29,8 @@ alternatives=" ntpd:ntpd:/etc/sv/chronyd" post_install() { - vconf examples/chrony.conf.example3 chrony.conf - # Modify default configuration so it works out-of-the-box - vsed -e 's,! pool pool.ntp.org iburst,pool pool.ntp.org iburst,' -i ${DESTDIR}/etc/chrony.conf - vsed -e 's,! rtcfile /var/lib/chrony/rtc,rtcfile /var/lib/chrony/rtc,' -i ${DESTDIR}/etc/chrony.conf - vsed -e 's,! makestep 1.0 3,makestep 1.0 3,' -i ${DESTDIR}/etc/chrony.conf - vsconf examples/chrony.conf.example1 + vconf examples/chrony.conf.example1 chrony.conf vsconf examples/chrony.conf.example2 + vsconf examples/chrony.conf.example3 vsv chronyd }