From 4d091a0f838d77ba8f59ea50e640ddf5bafe509f Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Thu, 16 Feb 2023 20:14:29 -0500 Subject: [PATCH] avbroot/boot.py: Mark otacerts.zip entries as created on Unix Otherwise, the "version made by" field in the central directory (2 bytes immediately after CD magic) are \x14\x00 on Windows and \x14\x03 everywhere else. Signed-off-by: Andrew Gunnerson --- avbroot/boot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avbroot/boot.py b/avbroot/boot.py index 54e6345..1a21916 100644 --- a/avbroot/boot.py +++ b/avbroot/boot.py @@ -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,