From a460689c8c1ac0a540ff58d0d70017577afdaea8 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 01:18:15 +0100 Subject: [PATCH] Initialize the empty verification directory installed by vpac --- tests/FEED.md | 4 ++-- tools/keyring.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/FEED.md b/tests/FEED.md index da3f384..0b2a255 100644 --- a/tests/FEED.md +++ b/tests/FEED.md @@ -114,6 +114,6 @@ feed install "$builder_keys" "$repo" x86_64 "$work/new-client" --fakeroot musl v python3 tools/keyring.py seed "$work/new-client/root" "$trusted_fingerprint" ``` -`vinix-keyring` owns the public certificate and fingerprint in `/usr/share/vpac/keyrings/`. Image assembly initializes the mutable GnuPG keybox and trust database under `/etc/vpac.d/gnupg/`. The seed operation requires a fresh destination. The builder compares the independently supplied fingerprint before packaging and again before seeding. +`vinix-keyring` owns the public certificate and fingerprint in `/usr/share/vpac/keyrings/`. Image assembly initializes the mutable GnuPG keybox and trust database under `/etc/vpac.d/gnupg/`. The seed operation accepts a new destination or the empty directory installed by the vpac port. The builder compares the independently supplied fingerprint before packaging and again before seeding. -The worker used a disposable test signer in `foundation/keyring-03`. It rejected a wrong pin, installed the signed keyring, verified the signed database with the seeded keyring, and used that keyring alone for an offline vpac install of musl into another empty root. A second seed attempt preserved the existing keyring. The checksum manifest has SHA-256 `9d0868ef14da385aeddbca46b97cb154fdfe9ccd8b69a3e90d5a3c5f7f36ed3c`. The target-vpac guest transaction and provisioning the release signer's public certificate remain release checks. +The worker used a disposable test signer in `foundation/keyring-04`. It rejected a wrong pin, installed the signed keyring, seeded an empty vpac key directory, verified the signed database and used that keyring alone for an offline vpac install of musl into another empty root. A second seed attempt preserved the existing keyring. The checksum manifest has SHA-256 `3ffb71fb6832d43af1cb2ec588d2d6a75ece24060d22bd1e70be59392a64d30d`. The target-vpac guest transaction and provisioning the release signer's public certificate remain release checks. diff --git a/tools/keyring.py b/tools/keyring.py index 3acd7eb..5c45f11 100644 --- a/tools/keyring.py +++ b/tools/keyring.py @@ -68,7 +68,7 @@ def seed(args): raise ValueError("installed keyring fingerprint differs from the trusted release fingerprint") parent.mkdir(parents=True, exist_ok=True) dest = parent / "gnupg" - if os.path.lexists(dest): + if os.path.lexists(dest) and (dest.is_symlink() or not dest.is_dir() or any(dest.iterdir())): raise ValueError(f"verification keyring already exists: {dest}") # Long image paths can exceed the Unix socket limit used by GnuPG. with tempfile.TemporaryDirectory() as directory, tempfile.TemporaryDirectory(dir=parent) as staging: -- 2.56.1