From 65c7e56b0aa3c731bace32014206331ea5ec636b Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Mon, 13 Jul 2026 00:25:17 +0000 Subject: [PATCH] Fix APT repository configuration and update signing key instructions --- dist/README.md | 10 +++++----- dist/scripts/deploy-apt-repository.sh | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/dist/README.md b/dist/README.md index b4d44c7..84b499f 100644 --- a/dist/README.md +++ b/dist/README.md @@ -6,16 +6,16 @@ ```bash # Import the signing key -curl -fsSL https://aptly.cloud2.payne.io/wild-central.gpg \ - | sudo tee /usr/share/keyrings/wild-central.gpg > /dev/null +curl -fsSL https://aptly.cloud.payne.io/public.key \ + | gpg --dearmor | sudo tee /usr/share/keyrings/wild.gpg > /dev/null # Add the repository -sudo tee /etc/apt/sources.list.d/wild-central.sources </dev/null || echo "0.0.0-dev") -REPO_NAME="wild-central" +REPO_NAME="wild" DIST="${DIST:-stable}" COMPONENT="main" PACKAGE_DIR="dist/packages" -SNAP_NAME="${REPO_NAME}-${VERSION}" +SNAP_NAME="wild-central-${VERSION}" AUTH="${APTLY_USER}:${APTLY_PASS}" +PACKAGE_GLOB="wild-central_${VERSION}_*.deb" echo "Deploying Wild Central ${VERSION} to APT repository..." echo " URL: ${APTLY_URL}" -# Signing config +# Signing config — use server-side GPG key +# The key must exist in Aptly's GPG keyring (auto-generated by the init-gpg container) +# Get the fingerprint: curl -sf ${APTLY_URL}/public.key | gpg --with-colons --import-options show-only --import | grep fpr | cut -d: -f10 if [ -n "$APTLY_GPG_KEY" ]; then - SIGNING="{\"GpgKey\":\"${APTLY_GPG_KEY}\"}" + SIGNING="{\"GpgKey\":\"${APTLY_GPG_KEY}\",\"Batch\":true}" else echo "APTLY_GPG_KEY not set — publishing without GPG signature" SIGNING="{\"Skip\":true}" @@ -63,7 +66,7 @@ echo "" echo "Uploading packages..." UPLOAD_DIR="${REPO_NAME}-${VERSION}" FOUND=0 -for DEB in "${PACKAGE_DIR}"/wild-central_"${VERSION}"_*.deb; do +for DEB in "${PACKAGE_DIR}"/${PACKAGE_GLOB}; do [ -f "$DEB" ] || continue FOUND=1 FILENAME=$(basename "$DEB") @@ -114,7 +117,7 @@ if [ -z "$PUBLISH_PREFIX" ]; then > /dev/null else echo "Updating published '${DIST}'..." - URL_PREFIX=$(echo "$PUBLISH_PREFIX" | sed 's/^\.$/:/') + URL_PREFIX=$(echo "$PUBLISH_PREFIX" | sed 's/^\.$/_/') api PUT "/publish/${URL_PREFIX}/${DIST}" "$UPDATE_BODY" > /dev/null fi echo " Published" @@ -124,15 +127,15 @@ echo "Wild Central ${VERSION} is live." echo "" echo "To install on a new device:" echo "" -echo " curl -fsSL ${APTLY_URL}/wild-central.gpg \\" -echo " | sudo tee /usr/share/keyrings/wild-central.gpg > /dev/null" +echo " curl -fsSL ${APTLY_URL}/public.key \\" +echo " | gpg --dearmor | sudo tee /usr/share/keyrings/wild.gpg > /dev/null" echo "" -echo " sudo tee /etc/apt/sources.list.d/wild-central.sources <