updated kernel and working on oc tty impl

This commit is contained in:
2026-08-23 21:51:19 -04:00
parent d4f74e950c
commit d70328c224
99 changed files with 1092 additions and 386 deletions
+30 -4
View File
@@ -2,8 +2,8 @@
import hashlib
import json
import shutil
import tarfile
import shutil, io
import tarfile, gzip
from pathlib import Path
ROOT = Path(__file__).resolve().parent
@@ -89,6 +89,15 @@ def read_dependencies(folder):
return dependencies if dependencies else DEFAULT_DEPENDENCIES
def reproducible_filter(info):
info.mtime = 0
info.uid = 0
info.gid = 0
info.uname = ""
info.gname = ""
return info
def create_package(folder):
name = folder.name
@@ -102,8 +111,25 @@ def create_package(folder):
debug(f"Packing {name}")
with tarfile.open(tarball, "w:gz") as archive:
archive.add(folder, arcname=name, filter=exclude)
# Create deterministic TAR
tar_data = io.BytesIO()
with tarfile.open(fileobj=tar_data, mode="w") as archive:
archive.add(
folder,
arcname=name,
filter=reproducible_filter,
)
# Create deterministic gzip
compressed = gzip.compress(
tar_data.getvalue(),
compresslevel=9,
mtime=0,
)
with open(tarball, "wb") as file:
file.write(compressed)
package_hash = sha256(tarball)