Buggy WNRO fixup
Richard Laager
rlaager at wiktel.com
Wed Dec 29 07:00:17 UTC 2021
On 12/28/21 3:35 PM, Hal Murray via devel wrote:
> Is there any magic not-before date in the ntpsec environment?
>
> I think we used to have the build date in the version string but that was
> removed to make builds reproducable. I thought we added something in a
> #define someplace with the idea that it would get updated with each release,
> but I can't find it.
This is what you're thinking of (slightly trimmed):
commit f76af8b7f4080ce7c1334f24c74c7259b84dc899
Author: James Browning <jamesb.fe80 at gmail.com>
Date: Thu Dec 31 11:34:06 2020 -0800
Remove --build-epoch and replace it with arbitrary --build-desc text.
Passing '--build-desc=$(date -u +%Y-%m-%dT%H:%M:%Sz)' restores the
previous default extended version.
The build epoch has been replaced with a hardcoded timestamp which will
be manually updated every nine years or so (approx 512w). This makes
the binaries reproducible by default.
--- a/libntp/ntp_calendar.c
+++ b/libntp/ntp_calendar.c
@@ -38,7 +38,7 @@ ntpcal_get_build_date(
struct calendar * jd
)
{
- time_t epoch = (time_t)BUILD_EPOCH;
+ time_t epoch = (time_t)1577836800; // 2020 Jan 01 -> 1863820800
- 2029 Jan 23
struct tm epoch_tm;
ZERO(*jd);
--
Richard
More information about the devel
mailing list