From ce05a073ddccdf0f890d762170356041079c4c5b Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 6 Jul 2026 20:53:39 -0600 Subject: [PATCH] Upgrade: mark the pinned GPG key trusted in the throwaway keyring. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit verify-commit judges signature validity regardless of ownertrust, so the upgrade's security model (possession of the pinned key is the trust anchor) is unchanged — but gpg printed "WARNING: This key is not certified with a trusted signature!" on every healthy upgrade, making valid-signature logs look like something continued past a failure. Import ownertrust for the sole key in the keyring to silence it. Co-Authored-By: Claude Fable 5 --- upgrade.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/upgrade.sh b/upgrade.sh index 77a120ad..db0f2e2f 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -109,6 +109,13 @@ git -C /opt/wrolpi fetch || exit 4 GNUPGHOME=$(mktemp -d) export GNUPGHOME gpg --batch --quiet --import /opt/wrolpi/wrolpi/roland@learningselfreliance.com.gpg +# The throwaway keyring contains only the pinned WROLPi key, so mark it +# ultimately trusted: possession of the pinned key IS the trust anchor here, +# and this silences gpg's web-of-trust WARNING noise that makes healthy +# upgrade logs look scary. Cosmetic only — verify-commit already ignores +# ownertrust when judging signature validity. +gpg --batch --list-keys --with-colons | awk -F: '/^fpr:/ {print $10":6:"; exit}' | \ + gpg --batch --quiet --import-ownertrust || : # Verify the fetched commit is signed by the trusted key before checking it out. if ! git -C /opt/wrolpi verify-commit origin/"${BRANCH}" 2>&1; then