add support for leap-seconds.list file (RHEL-53484)

Resolves: RHEL-53484
This commit is contained in:
Miroslav Lichvar 2024-08-08 09:26:50 +02:00
parent 32ace0cadf
commit 0bd1fce74b
3 changed files with 1352 additions and 0 deletions

42
chrony-leaplist-man.patch Normal file
View File

@ -0,0 +1,42 @@
--- chrony-4.5/doc/chrony.conf.man.in 2023-12-05 14:26:13.000000000 +0100
+++ chrony.conf.man.in 2024-07-30 14:17:30.000000000 +0200
@@ -908,9 +915,10 @@
.RS 4
This option indicates that the reference clock keeps time in TAI instead of UTC
and that \fBchronyd\fP should correct its offset by the current TAI\-UTC offset. The
-\fBleapsectz\fP directive must be used with this option and the
-database must be kept up to date in order for this correction to work as
-expected. This option does not make sense with PPS refclocks.
+\fBleapsectz\fP or \fBleapseclist\fP directive must be
+used with this option and the database must be kept up to date in order for
+this correction to work as expected. This option does not make sense with PPS
+refclocks.
.RE
.sp
\fBlocal\fP
@@ -1652,6 +1660,25 @@
.if n .RE
.RE
.sp
+\fBleapseclist\fP \fIfile\fP
+.RS 4
+This directive specifies the path to a file containing a list of leap seconds
+and TAI\-UTC offsets in NIST/IERS format. It is recommended to use
+the file \fIleap\-seconds.list\fP usually included with the system timezone
+database. The behaviour of this directive is otherwise equivalent to
+\fBleapsectz\fP.
+.sp
+An example of this directive is:
+.sp
+.if n .RS 4
+.nf
+.fam C
+leapseclist /usr/share/zoneinfo/leap\-seconds.list
+.fam
+.fi
+.if n .RE
+.RE
+.sp
\fBmakestep\fP \fIthreshold\fP \fIlimit\fP
.RS 4
Normally \fBchronyd\fP will cause the system to gradually correct any time offset,

1304
chrony-leaplist.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,10 @@ Patch4: chrony-serverstats.patch
Patch5: chrony-reload.patch
# don't repeat error log messages when reloading sourcedir
Patch6: chrony-logreload.patch
# add support for leap-seconds.list file
Patch7: chrony-leaplist.patch
# update asciidoctor-generated man page
Patch8: chrony-leaplist-man.patch
BuildRequires: gnutls-devel libcap-devel libedit-devel pps-tools-devel
BuildRequires: gcc gcc-c++ make bison systemd gnupg2
@ -71,6 +75,8 @@ service to other computers in the network.
%patch4 -p1 -b .serverstats
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%{?gitpatch: echo %{version}-%{gitpatch} > version.txt}