[chrony-dev] [PATCH 0/1] fix leap second source on musl based systems |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH 0/1] fix leap second source on musl based systems
- From: patrick.oppenlander@xxxxxxxxx
- Date: Wed, 29 Nov 2023 11:15:58 +1100
- Cc: Patrick Oppenlander <patrick.oppenlander@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701216968; x=1701821768; darn=chrony.tuxfamily.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0OBBQrXygMo9tlXDq1Im18Fq+4x3hk53PqCwOj2RxnQ=; b=VnbSZv7xSDN5zNgZzY4JriM7zw7qCStIXOsBHfzdUXcLbVJF9I6Xmg9LeTGs+KolzJ wiUgoLxOleKiI9k3KwxBv3CMXSv67UZfOsgL+yEF6ayG4+4qVZnnwwg876sABzFB9afi ZzCSwN5UFiIC9f1RhX6G9E1dnY6eW0MmG3Vhb7M5gubwXwAMzu3IM2JRIIjnYzUCmynQ HMlQYyTLSHwKAsYgGLCBSpnXLsL+9Z3dTwBqeYgZTkEoQ2nJ3wqI1iha2l9gd+IjALZh QWTPY3yujAgXvLVrtRMI45ja27CNrK/UuXXHn1U4lcgLxtD/x++BvZRQdyR4ynJV7q69 s+/A==
From: Patrick Oppenlander <patrick.oppenlander@xxxxxxxxx>
Hi,
while testing chrony on an aarch64/musl system I noticed that the UTC-TAI
offset wasn't being set.
Turns out that chrony currently relies on some implementation defined C library
behaviour in get_tz_leap() leading to it rejecting the 'leapsectz right/UTC'
directive on musl based systems.
I think this is for two reasons:
1. musl doesn't support right/* timezones[1]
2. musl does not include leap second information (i.e. 60, or skip 59)
in the tm_sec field of struct tm[2]
I've included a patch which adds support for reading leap-seconds.list and
using it as as another source of leap second information.
Patrick
[1] https://skarnet.org/lists/skaware/0089.html
[2] https://git.musl-libc.org/cgit/musl/tree/src/time/__secs_to_tm.c#n79
Patrick Oppenlander (1):
reference: support leap-seconds.list as leap second source
conf.c | 14 ++++
conf.h | 1 +
doc/chrony.conf.adoc | 19 ++++-
reference.c | 162 +++++++++++++++++++++++++++++++++++++++++--
4 files changed, 188 insertions(+), 8 deletions(-)
--
2.43.0
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.