From fa26ff765d4c92538bf0a0a58e8cb52f2074191c Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 14:28:51 +0100 Subject: [PATCH] Keep the signed image repository readable by the vpac downloader --- tools/stage-image.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/stage-image.py b/tools/stage-image.py index ed7fa0f..b613e5c 100644 --- a/tools/stage-image.py +++ b/tools/stage-image.py @@ -22,7 +22,12 @@ def write_directory(root, relative): directory = root / relative if directory.resolve() != directory: raise ValueError(f"unexpected guest symlink at {relative}") - directory.mkdir(parents=True, exist_ok=True) + current = root + for name in Path(relative).parts: + current /= name + if not current.is_dir(): + current.mkdir() + current.chmod(0o755) return directory @@ -41,6 +46,7 @@ def snapshot(repo, dest, ring, arch, gpg_home): if target.exists(): raise ValueError(f"duplicate repository filename: {name}") shutil.copyfile(source, target) + target.chmod(0o644) return target for index in ("vinix.db", "vinix.files"): @@ -97,10 +103,12 @@ def stage(args): db = write_directory(root, "var/lib/vpac") if any(db.iterdir()): raise ValueError("package database directory is already populated") - shutil.copytree(records, db / "local") + local = db / "local" + shutil.copytree(records, local) + local.chmod(0o755) sync = write_directory(root, "var/lib/vpac/sync") for name in ("vinix.db", "vinix.db.sig"): - shutil.copyfile(package_dir / name, sync / name) + shutil.copy(package_dir / name, sync / name) root.rename(output / "root") print(audit, end="") print(f"staged {len(indexed)} signed seed packages and the installed database") -- 2.56.1