From 16839246104d0881127c5c30a96d6a80f75d86e6 Mon Sep 17 00:00:00 2001 From: spektr Date: Fri, 27 Nov 2026 06:56:46 +0100 Subject: [PATCH] CT 114: Hook-Guard wieder auf Literal-Platzhalter gestellt, Pin aktualisiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das operator-seitige sed hatte den Platzhalter auch in der Vergleichszeile ersetzt (Key == Key -> Hook starb immer mit 'placeholder not replaced'). Guard vergleicht jetzt wieder gegen '@GHOSTNET-CT114-GHOST-PUBLIC-KEY@'. Neuer Hook-Pin c8d32465…f5e9f; scripts/README warnt vor globalem sed und dokumentiert die Zwischenstaende. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../lxc/ct-114-litecoin-wallet/scripts/README.md | 14 ++++++++++---- .../ghostnet-litecoin-ansible-bootstrap-hook.sh | 2 +- .../scripts/provision-ct114-litecoin.sh | 8 ++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/README.md b/proxmox/lxc/ct-114-litecoin-wallet/scripts/README.md index 9b36d90..3b717cb 100644 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/README.md +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/README.md @@ -41,15 +41,21 @@ cp ~/.ssh/id_ed25519_ghostnet_ct114_*.pub into this repo: proxmox/lxc/ct-114-litecoin-wallet/ansible/files/ssh/litecoin-ansible-deploy.pub # then replace the ADMIN_PUBLIC_KEY placeholder in # ghostnet-litecoin-ansible-bootstrap-hook.sh with the exact line from -# litecoin-ghost.pub, recompute its SHA-256 and update POST_INSTALL_HOOK_SHA256 -# in provision-ct114-litecoin.sh. +# litecoin-ghost.pub -- ONLY the assignment line (line 25), never the +# comparison in the guard below it, e.g.: +# sed -i "25s|@GHOSTNET-CT114-GHOST-PUBLIC-KEY@|$(cat ~/.ssh/id_ed25519_ghostnet_ct114_ghost.pub)|" \ +# ghostnet-litecoin-ansible-bootstrap-hook.sh +# recompute the SHA-256 and update POST_INSTALL_HOOK_SHA256 in +# provision-ct114-litecoin.sh. ``` Erledigt am 2026-11-27: alle drei `.pub` liegen in `ansible/files/ssh/`, der Hook-Platzhalter ist ersetzt und die eingebetteten Keys matchen byte-identisch mit den Repo-Dateien (geprüft). Aktueller Hook-Pin: -`9e1db709db30f93ff918be9ee88f545243003a916d7b8c434b85e58a81014d69` -(Vor-Platzhalter-Wert: `a742377a…a359e3`). +`c8d32465c615f522a7581018a9829f437a6176bb781d68ddac5f7a592cff5e9f` +(Vor-Platzhalter-Wert: `a742377a…a359e3`; Zwischenstand `9e1db709…14d69` war +fehlerhaft, weil ein globales sed auch die Guard-Vergleichszeile traf — Hook +wurde 2026-11-27 entsprechend korrigiert). The `ghost` key passphrase is an interactive operator step and is never written down anywhere (AGENTS.md: operator-run secret steps). diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/ghostnet-litecoin-ansible-bootstrap-hook.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/ghostnet-litecoin-ansible-bootstrap-hook.sh index 90cde53..28bafc5 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/ghostnet-litecoin-ansible-bootstrap-hook.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/ghostnet-litecoin-ansible-bootstrap-hook.sh @@ -37,7 +37,7 @@ die() { [[ "${EUID}" -eq 0 ]] || die "must run as root on the Proxmox host" command -v pct >/dev/null 2>&1 || die "pct not found; run this hook on Proxmox" [[ -x "$BASELINE_HOOK" ]] || die "baseline hook is missing or not executable: ${BASELINE_HOOK}" -[[ "$ADMIN_PUBLIC_KEY" != 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGUv4INjWuIzgRL9Pw4TqeHirG72AeA6bowsea6fj2OT ghost@ghostnet-ct114' ]] || +[[ "$ADMIN_PUBLIC_KEY" != '@GHOSTNET-CT114-GHOST-PUBLIC-KEY@' ]] || die "ADMIN_PUBLIC_KEY placeholder not replaced; see scripts/README.md step 0" ctid="${CTID:-${1:-}}" diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh index eec8db5..146eb3a 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh @@ -22,10 +22,10 @@ readonly CORE_COMMIT='d1cec87881d7de053d86434aaf98eb203170c1b9' readonly DEBIAN_SCRIPT_SHA256='8396340fb3c91142ddf8356eb80904fad181acd6c6ad2c33b22ed4698c86187d' readonly BASELINE_HOOK_SHA256='111f1b70e47e3a2f6a1bcce22cb0ec50aacd8fbcff37d87fbcf853a318381b10' # SHA-256 of the hook AFTER the operator replaced the ADMIN_PUBLIC_KEY -# placeholder with the generated ghost public key on 2026-11-27 -# (scripts/README.md step 0). The pre-placeholder value was -# a742377acdf41020559fe77b1e4313d112338a7221a89259255bbf03bfa359e3. -readonly POST_INSTALL_HOOK_SHA256='9e1db709db30f93ff918be9ee88f545243003a916d7b8c434b85e58a81014d69' +# placeholder (only the assignment line!) with the generated ghost public +# key on 2026-11-27 (scripts/README.md step 0). Earlier values: +# a742377a… (pre-placeholder), 9e1db709… (sed hit the check line too). +readonly POST_INSTALL_HOOK_SHA256='c8d32465c615f522a7581018a9829f437a6176bb781d68ddac5f7a592cff5e9f' readonly COMMUNITY_SCRIPTS_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/${PROXMOXVE_COMMIT}" readonly COMMUNITY_SCRIPTS_CORE_URL="https://raw.githubusercontent.com/community-scripts/core/${CORE_COMMIT}"