Hi, Whilst working on the Reproducible Builds effort [0], we noticed that yuzu could not be built reproducibly. This is because it generates a version number via stat(1), but the output of this command will vary on the local timezone. A patch is attached that will always use UTC when generating this value. [0] https://reproducible-builds.org/ Regards,
Hi Chris, Thanks for the report and the patch! Using UTC is of course the correct thing to do here, I just hadn't think of it :) In your patch I see that you set `TZ=UTC`, while reading the date(1p) manual I only see mention of `TZ=UTC0`. Do you know if there's any difference between the two? https://pubs.opengroup.org/onlinepubs/9799919799/utilities/date.html Thanks! Bye.
Hi Andrea, Thanks for your email. It actually made me look into the differences between the two — I am not sure I had considered this at all before, and had assumed they were some kind of internal alias… if I thought about it at all. In practice, TZ=UTC and TZ=UTC0 do behave identically, but using UTC0 bypasses any kind of lookup in your timezone database. It appears that glibc can parse "UTC0" internally, whilst "UTC" will require poking in /usr/share/zoneinfo. (Similar with "Etc/UTC"). Perhaps if you don't have tzdata installed, "UTC" won't work? I will say that "UTC0" will appear unfamiliar to most developers, so saving one disk lookup — that is probably already cached! — is probably a little silly in a build of a Debian package. Still, interesting to know. :) Thanks again for prompting me to look it up. Best wishes,
Hi Chris,
That's very nice to hear :)
Oh, that's interesting. One day in the future maybe I'll look more into
this implementation quirks!
I also looked up some info in the POSIX standard, and I found this at
<https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html>,
where it basically says that the TZ format should be
std offset [dst [offset][, rule]]
where `std` and `offset` are required. `std` in our case is "UTC", while
`offset` is "0". In particular the definition of `offset` says "The hour
shall be required and may be a single digit. The offset following std
shall be required."
So `TZ=UTC` is technically invalid, as it misses the required offset,
but on glibc it happens to work anyway.
I think I'll hence go with `UTC0`, not really for the avoided disk
lookup but because now that I know I'd rather not willfully violate the
specs -- even though the skipped disk access is a nice side effect :)
Thanks to you for reporting the bug in the first place!
Hello, Bug #1148977 in yuzu reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debian/yuzu/-/commit/b068ef7da7856fcc20d7cbaa171f7545e8f16398 ------------------------------------------------------------------------ d/rules: make tzdb2nx version reproducible This sets the TZ environment variable to UTC0 when invoking `stat` to have the version number generation reproducible when built on systems with different timezone settings. `TZ=UTC0` is used instead of `TZ=UTC` because the latter is not POSIX conforming. Thanks: Chris Lamb for the patch! Closes: #1148977 Gbp-Dch: full ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1148977
We believe that the bug you reported is fixed in the latest version of
yuzu, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1148977@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrea Pappacoda <tachi@debian.org> (supplier of updated yuzu package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 29 Sep 2026 16:21:38 +0200
Source: yuzu
Architecture: source
Version: 0-1734+ds-10
Distribution: unstable
Urgency: low
Maintainer: Andrea Pappacoda <tachi@debian.org>
Changed-By: Andrea Pappacoda <tachi@debian.org>
Closes: 1148977
Changes:
yuzu (0-1734+ds-10) unstable; urgency=low
.
* d/rules: make tzdb2nx version reproducible.
This sets the TZ environment variable to UTC0 when invoking `stat` to
have the version number generation reproducible when built on systems
with different timezone settings.
`TZ=UTC0` is used instead of `TZ=UTC` because the latter is not POSIX
conforming.
Thanks to Chris Lamb for the patch! (Closes: #1148977)
Checksums-Sha1:
8c43d462f4569d09ea8850e4d1158a63be63e0ac 3110 yuzu_0-1734+ds-10.dsc
a5bd8e2799b0749b12f93dcffcd03f71b8ae3fa3 1772060 yuzu_0-1734+ds-10.debian.tar.xz
acec6dfd48bd0b3c36d97420664b10c054727673 17110788 yuzu_0-1734+ds-10.git.tar.xz
ece7ff8c69b3fba89106ce4731ac846811c43ee5 17732 yuzu_0-1734+ds-10_source.buildinfo
Checksums-Sha256:
7f2b6299cc6562b38febfa59298e9a8339c311d8b2d9927b94487f854790fa56 3110 yuzu_0-1734+ds-10.dsc
c87b53314c327d24a0ceeaa149bf85a0a7cf786608a61e037139b69303a87f5a 1772060 yuzu_0-1734+ds-10.debian.tar.xz
46d03ccdc949f84d6d66d59c0358b77db4c67fa51f12b8ccab674b2f3e07a0db 17110788 yuzu_0-1734+ds-10.git.tar.xz
dfa870d326ceea8330df787dc01be6a054dd45523d9cd91acb74c78e62f40109 17732 yuzu_0-1734+ds-10_source.buildinfo
Files:
25ce5c369eafb00236d8a4fe9660bb57 3110 games optional yuzu_0-1734+ds-10.dsc
ed5052d17d14fbb16b83f4b97c7d8d71 1772060 games optional yuzu_0-1734+ds-10.debian.tar.xz
ea362d40a824397e7db33f0cd6472f36 17110788 games optional yuzu_0-1734+ds-10.git.tar.xz
8090860a91aae6d6ee0cdfff16098228 17732 games optional yuzu_0-1734+ds-10_source.buildinfo
Git-Tag-Info: tag=2bc23da6d28277b199e2903aa539dd092aaec6af fp=ba56e348bd94451edec970074a9208a2455077a7
Git-Tag-Tagger: Andrea Pappacoda <tachi@debian.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmq7yoIACgkQYG0ITkaD
wHmwIQ/+Oi8TL0JFNB69xysaqcfowlorOPYDTn8VhgjF7zc38pLCLPVGpi+8bO0x
JOO7uu4Xgbl+5kv2aX7wLmEpTpY2UfPcbJ18gsuk6J53QbvJ6HLWjce2JkOriPDr
/iZSLe0Uoos/JsGZwwJKiJwZ2mnFS/fXtxzR5QiInxGKhqLS/t+Zn27K5MS4IU8U
XKnMybfh7OvBk5+zMWZoQH+YHK0BQUWJPNL9CQfG286D79kQUQrt2VOVGttNG1Dm
u0sLXeWvcG4h4L3iCSnVXV3qVid9aa4St8rLiFnX2Bh10kw09tkR2VZp7edWj5KB
prcxcHvhT7HRRBnP+YWWJiNLGEbJJzNgtSITZx92FaEoM8u4/L5Ur0CcEcVS+9SS
hh42UG14CPzJr07Hnp5pcT+BzGFnyP9hOgRfue5GylEnzsMlUYHgDGib/Dc1SL4e
Tqp22dXY+POJa+Msi1ikyqvYIl+qdeUIEjLQgKZLaMox8AbG2QGHFxlZL7hLdSAb
bFpYoLi663uId/4qHgCKxBnEimP90nSNBFYdL2RW3ZjKDGPm2cXznOOXDptD1zAq
w8O/TtjYDRtBYhR640yEJ0Ng+ACqRY8xOAyTLpDIVLxBee6+XEPQRqoaYG7LDQUc
q60AYYk4uIB0zF0QRx526VrqOf6FQSs49tFVm6FIml3f7zDRQog=
=7kcy
-----END PGP SIGNATURE-----
Andrea Pappacoda wrote: Ooh, thanks! Super helpful, and this motivated me to update the official Reproducible Builds documentation, basically paraphrasing what you wrote: https://salsa.debian.org/reproducible-builds/reproducible-website/commit/adf38b870244e4cc9bed50c1b5c70a7a647ac66a No problem. :) Regards,
Hi, Regarding the latter, TZ=UTC isn’t “technically invalid”. POSIX allows three formats for TZ values: * :characters * std offset dst offset, rule * “a format specifying a geographical timezone or a special timezone” UTC0 matches the second one. UTC matches the third, and is perfectly valid. The main benefit of UTC0 is that it is fully specified in POSIX; on any POSIX-compliant system, TZ=UTC0 will mean the same thing. TZ=UTC relies on the implementation; typically it would use the IANA database (which is mentioned in POSIX), but there’s nothing stopping an implementation from interpreting TZ=UTC as the timezone of a putative “United Transcendental Countries” for example. Regards, Stephen
Hi Stephen, Oh, I didn't think about that. You're absolutely correct! I will still be preferring UTC0 for the reasons you mention, but your comment saved me from starting a mental fight against the usage of TZ=UTC :) And also today, I learned something new. Thanks all!
Hi Stephen, [..] Super useful - thank you. I have updated the documentation. :) Best wishes,