compressed man pages contain build time
When make.py
is compression the man pages it copies the current time into the archive causing the builds to not be reproducible. This could be fixed by setting mtime
to 0
which will cause the time to be excluded completely.
--- a/make.py
+++ b/make.py
@@ -96,7 +96,7 @@ def build_man() -> None:
man_out_path = METADATA / f"{man_file_name}.gz"
logging.info("Compress %s >> %s", man_file_name, man_out_path)
- with gzip.open(man_out_path, "wb") as f_out:
+ with gzip.GzipFile(man_out_path, "wb", mtime=0) as f_out:
f_out.write(data)
Ref https://github.com/python/cpython/issues/91372, https://github.com/fwupd/fwupd/pull/6388/files
(it seems like I can't create a MR for that cause my account is new)