build(packaging): retain qualified payloads through verified owner archives

This commit is contained in:
DCCONSTRUCTIONS
2026-11-21 20:58:24 +03:00
parent bd8af772d9
commit c45bd6b882
14 changed files with 1241 additions and 33 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ def tarball(files):
item.size, item.mode, item.uid, item.gid = len(data), mode, 0, 0
item.uname = item.gname = "root"
archive.addfile(item, io.BytesIO(data))
return gzip.compress(stream.getvalue(), mtime=0)
compressed = gzip.compress(stream.getvalue(), mtime=0)
# Python 3.12 delegates this header to zlib: macOS emits OS=19, Linux=3.
# The payload is platform-neutral; use the RFC 1952 unknown-OS byte.
return compressed[:9] + b"\xff" + compressed[10:]
def ar_member(name, data):