fix(apt): Use binary keyring URL so apt accepts the signed-by= source (ref #89)

DefaultGPGKeyURL pointed at /secubox.gpg, which does not exist on the
public repo (200 OK was the HTML landing page falling through
try_files). And the canonical /secubox-keyring.gpg is ASCII-armored,
which apt rejects under signed-by=. Fetch /secubox-keyring.gpg.bin
(binary) directly and write it as the keyring — no dearmor needed.

Verified end-to-end in a fresh bookworm chroot:
  secubox apt setup       # OK
  apt-get update          # Hit:1 https://apt.secubox.in bookworm InRelease

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-05-12 12:22:12 +02:00
parent 3594642129
commit 918570b11a

View File

@ -17,7 +17,12 @@ import (
)
const (
DefaultGPGKeyURL = "https://apt.secubox.in/secubox.gpg"
// The repo serves the public key in two formats:
// /secubox-keyring.gpg ASCII-armored
// /secubox-keyring.gpg.bin binary (what apt needs in /usr/share/keyrings)
// We fetch the binary form so we can write it directly to the keyring path
// without piping through `gpg --dearmor`.
DefaultGPGKeyURL = "https://apt.secubox.in/secubox-keyring.gpg.bin"
DefaultKeyringDir = "/usr/share/keyrings"
DefaultSourcesDir = "/etc/apt/sources.list.d"
DefaultRepoURL = "https://apt.secubox.in"