Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] chrony: fix wrong option in the default config.
Date: Wed, 30 Oct 2019 08:43:27 +0100	[thread overview]
Message-ID: <20191030074327.gBADsRkPGtD07QJsGCESLmObbpB_bGNGXVl1YYqCkaw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15936@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages chrony
https://github.com/void-linux/void-packages/pull/15936

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.

A patch file from https://github.com/void-linux/void-packages/pull/15936.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chrony-15936.patch --]
[-- Type: text/x-diff, Size: 2109 bytes --]

From 82c5e29f7a824107a8ac7937db22877d0c208d40 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Fri, 18 Oct 2019 23:46:32 -0700
Subject: [PATCH] chrony: fix wrong option in the default config.

The option rtcfile in the default config conflicts with runit's stage 3.
Chronyd in RTC mode takes control of /dev/rtc to measure RTC drift.
Stage 3 calls hwclock -w, which messes up chrony's drift calculation.
Furthermore the current chronyd runit service needs the -s option
to effectively use the RTC feature.

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

Switch rtcfile to the rtcsync option, to be consistent with stage 3.
Example config file 1 sets the right 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
 }

  parent reply	other threads:[~2019-10-30  7:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  7:24 [PR PATCH] " voidlinux-github
2019-10-30  7:40 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-30  7:40 ` voidlinux-github
2019-10-30  7:43 ` voidlinux-github [this message]
2019-10-30  7:43 ` voidlinux-github
2019-10-30 14:56 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191030074327.gBADsRkPGtD07QJsGCESLmObbpB_bGNGXVl1YYqCkaw@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).