From: Job Snijders Subject: Re: rpki-client: set output files' modification time to be the buildtime To: Theo Buehler Cc: tech@openbsd.org Date: Thu, 30 Oct 2025 23:31:00 +0000 On Thu, Oct 30, 2025 at 11:24:56PM +0000, Job Snijders wrote: > On Thu, Oct 30, 2025 at 09:39:01PM +0100, Theo Buehler wrote: > > The output.c changes except the one in outputheader() are largely > > unrelated and should be done separately. The rest is ok with me. > > ack - below is just the unrelated part > > With this diff the utility sets the "modification time" of the output > file to be the buildtime timestamp. > > To me this is quite useful in analytics pipelines: moving & archiving > files using the timestamp from the filesystem instead of having to > deserialize the file content to find the timestamp shaves off a few > seconds here and there. example, with this diff the below timestamps all become aligned: $ cd /var/db/rpki-client/ $ stat -l * -rw-r--r-- 1 _rpki-client wheel 30176089 Oct 30 23:21:18 2025 bird -rw-r--r-- 1 _rpki-client wheel 32711173 Oct 30 23:21:18 2025 csv -rw-r--r-- 1 _rpki-client wheel 77791252 Oct 30 23:21:18 2025 json -rw-r--r-- 1 _rpki-client wheel 40241970 Oct 30 23:21:18 2025 openbgpd -rw-r--r-- 1 _rpki-client wheel 20093230 Oct 30 23:21:18 2025 rpki.ccr $ grep Generated bird openbgpd bird:# Generated on host feather.sobornost.net at Thu Oct 30 23:21:18 UTC 2025 openbgpd:# Generated on host feather.sobornost.net at Thu Oct 30 23:21:18 UTC 2025 $ grep buildtime json "buildtime": "2025-10-30T23:21:18Z", $ rpki-client -f rpki.ccr | grep produced CCR produced at: Thu 30 Oct 2025 23:21:18 +0000