Merge pull request #55 from chenxiaolong/zip_cd_reproducibility

avbroot/boot.py: Mark otacerts.zip entries as created on Unix
This commit is contained in:
Andrew Gunnerson
2023-02-16 20:16:51 -05:00
committed by GitHub
+2
View File
@@ -205,6 +205,8 @@ class OtaCertPatch(BootImagePatch):
# Use zeroed-out metadata to ensure the archive is bit for
# bit reproducible across runs.
info = zipfile.ZipInfo('ota.x509.pem')
# Mark entry as created on Unix for reproducibility
info.create_system = 3
with (
z.open(info, 'w') as f_out,
open(self.cert_ota, 'rb') as f_in,