From 67f1c53a62071f196c689cb75366d3fe0898da6e Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 15 May 2025 16:03:29 +0200 Subject: [PATCH] improve description of refresh directive (RHEL-91788) Resolves: RHEL-91788 --- chrony-docrefresh.patch | 55 +++++++++++++++++++++++++++++++++++++++++ chrony.spec | 3 +++ 2 files changed, 58 insertions(+) create mode 100644 chrony-docrefresh.patch diff --git a/chrony-docrefresh.patch b/chrony-docrefresh.patch new file mode 100644 index 0000000..bfd98e0 --- /dev/null +++ b/chrony-docrefresh.patch @@ -0,0 +1,55 @@ +commit b889627998ba584528d1c1145a212fb2b97e5289 +Author: Miroslav Lichvar +Date: Thu Feb 27 10:04:41 2025 +0100 + + doc: improve description of refresh directive + +diff --git a/doc/chrony.conf.adoc b/doc/chrony.conf.adoc +index 7ccdd20c..eb00e029 100644 +--- a/doc/chrony.conf.adoc ++++ b/doc/chrony.conf.adoc +@@ -941,14 +941,15 @@ time, assuming the first update corrects the clock and later checks can work + with correct time. + + [[refresh]]*refresh* _interval_:: +-This directive specifies the interval (in seconds) between refreshing IP +-addresses of NTP sources specified by hostname. If the hostname no longer ++This directive specifies the minimum interval (in seconds) between refreshing ++IP addresses of NTP sources specified by hostname. If the hostname no longer + resolves to the currently used address, it will be replaced with one of the new + addresses to avoid using a server which is no longer intended for service, even + if it is still responding correctly and would not be replaced as unreachable. +-Only one source is refreshed at a time. The default value is 1209600 (2 weeks) +-and the maximum value is 2^31-1 (68 years). A value of 0 disables the periodic +-refreshment. ++Only one source is refreshed at a time and only when a valid response is ++received (unreachable sources are replaced independently). The default value is ++1209600 (2 weeks) and the maximum value is 2^31-1 (68 years). A value of 0 ++disables the periodic refreshment. + + + The <> command can be used to refresh all + sources immediately. +diff -up chrony-4.6.1/doc/chrony.conf.man.in.docrefresh chrony-4.6.1/doc/chrony.conf.man.in +--- chrony-4.6.1/doc/chrony.conf.man.in.docrefresh 2025-05-15 17:04:33.824077026 +0200 ++++ chrony-4.6.1/doc/chrony.conf.man.in 2025-05-15 17:04:53.308070453 +0200 +@@ -1270,14 +1270,15 @@ with correct time. + .sp + \fBrefresh\fP \fIinterval\fP + .RS 4 +-This directive specifies the interval (in seconds) between refreshing IP +-addresses of NTP sources specified by hostname. If the hostname no longer ++This directive specifies the minimum interval (in seconds) between refreshing ++IP addresses of NTP sources specified by hostname. If the hostname no longer + resolves to the currently used address, it will be replaced with one of the new + addresses to avoid using a server which is no longer intended for service, even + if it is still responding correctly and would not be replaced as unreachable. +-Only one source is refreshed at a time. The default value is 1209600 (2 weeks) +-and the maximum value is 2^31\-1 (68 years). A value of 0 disables the periodic +-refreshment. ++Only one source is refreshed at a time and only when a valid response is ++received (unreachable sources are replaced independently). The default value is ++1209600 (2 weeks) and the maximum value is 2^31\-1 (68 years). A value of 0 ++disables the periodic refreshment. + .sp + The \fBrefresh\fP command can be used to refresh all + sources immediately. diff --git a/chrony.spec b/chrony.spec index 2814465..6028253 100644 --- a/chrony.spec +++ b/chrony.spec @@ -27,6 +27,8 @@ Source10: https://gitlab.com/chrony/clknetsim/-/archive/master/clknetsim-% Patch1: chrony-nm-dispatcher-dhcp.patch # keep PHC refclock reachable when dropping samples due to high delay Patch2: chrony-refclkreach.patch +# improve description of refresh directive +Patch3: chrony-docrefresh.patch BuildRequires: gnutls-devel libcap-devel libedit-devel pps-tools-devel BuildRequires: gcc gcc-c++ make bison systemd gnupg2 @@ -62,6 +64,7 @@ service to other computers in the network. %{?gitpatch:%patch -P 0 -p1} %patch -P 1 -p1 -b .nm-dispatcher-dhcp %patch -P 2 -p1 +%patch -P 3 -p1 -b .docrefresh %{?gitpatch: echo %{version}-%{gitpatch} > version.txt}