Fix APT repository configuration and update signing key instructions

This commit is contained in:
2026-07-13 00:25:17 +00:00
parent d0b645b9b5
commit 65c7e56b0a
2 changed files with 18 additions and 15 deletions

10
dist/README.md vendored
View File

@@ -6,16 +6,16 @@
```bash ```bash
# Import the signing key # Import the signing key
curl -fsSL https://aptly.cloud2.payne.io/wild-central.gpg \ curl -fsSL https://aptly.cloud.payne.io/public.key \
| sudo tee /usr/share/keyrings/wild-central.gpg > /dev/null | gpg --dearmor | sudo tee /usr/share/keyrings/wild.gpg > /dev/null
# Add the repository # Add the repository
sudo tee /etc/apt/sources.list.d/wild-central.sources <<EOF sudo tee /etc/apt/sources.list.d/wild.sources <<EOF
Types: deb Types: deb
URIs: https://aptly.cloud2.payne.io URIs: https://aptly.cloud.payne.io
Suites: stable Suites: stable
Components: main Components: main
Signed-By: /usr/share/keyrings/wild-central.gpg Signed-By: /usr/share/keyrings/wild.gpg
EOF EOF
sudo apt update && sudo apt install wild-central sudo apt update && sudo apt install wild-central

View File

@@ -14,19 +14,22 @@ APTLY_USER="${APTLY_USER:-aptly}"
APTLY_GPG_KEY="${APTLY_GPG_KEY:-}" APTLY_GPG_KEY="${APTLY_GPG_KEY:-}"
VERSION=$(cat ../VERSION 2>/dev/null || echo "0.0.0-dev") VERSION=$(cat ../VERSION 2>/dev/null || echo "0.0.0-dev")
REPO_NAME="wild-central" REPO_NAME="wild"
DIST="${DIST:-stable}" DIST="${DIST:-stable}"
COMPONENT="main" COMPONENT="main"
PACKAGE_DIR="dist/packages" PACKAGE_DIR="dist/packages"
SNAP_NAME="${REPO_NAME}-${VERSION}" SNAP_NAME="wild-central-${VERSION}"
AUTH="${APTLY_USER}:${APTLY_PASS}" AUTH="${APTLY_USER}:${APTLY_PASS}"
PACKAGE_GLOB="wild-central_${VERSION}_*.deb"
echo "Deploying Wild Central ${VERSION} to APT repository..." echo "Deploying Wild Central ${VERSION} to APT repository..."
echo " URL: ${APTLY_URL}" 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 if [ -n "$APTLY_GPG_KEY" ]; then
SIGNING="{\"GpgKey\":\"${APTLY_GPG_KEY}\"}" SIGNING="{\"GpgKey\":\"${APTLY_GPG_KEY}\",\"Batch\":true}"
else else
echo "APTLY_GPG_KEY not set — publishing without GPG signature" echo "APTLY_GPG_KEY not set — publishing without GPG signature"
SIGNING="{\"Skip\":true}" SIGNING="{\"Skip\":true}"
@@ -63,7 +66,7 @@ echo ""
echo "Uploading packages..." echo "Uploading packages..."
UPLOAD_DIR="${REPO_NAME}-${VERSION}" UPLOAD_DIR="${REPO_NAME}-${VERSION}"
FOUND=0 FOUND=0
for DEB in "${PACKAGE_DIR}"/wild-central_"${VERSION}"_*.deb; do for DEB in "${PACKAGE_DIR}"/${PACKAGE_GLOB}; do
[ -f "$DEB" ] || continue [ -f "$DEB" ] || continue
FOUND=1 FOUND=1
FILENAME=$(basename "$DEB") FILENAME=$(basename "$DEB")
@@ -114,7 +117,7 @@ if [ -z "$PUBLISH_PREFIX" ]; then
> /dev/null > /dev/null
else else
echo "Updating published '${DIST}'..." 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 api PUT "/publish/${URL_PREFIX}/${DIST}" "$UPDATE_BODY" > /dev/null
fi fi
echo " Published" echo " Published"
@@ -124,15 +127,15 @@ echo "Wild Central ${VERSION} is live."
echo "" echo ""
echo "To install on a new device:" echo "To install on a new device:"
echo "" echo ""
echo " curl -fsSL ${APTLY_URL}/wild-central.gpg \\" echo " curl -fsSL ${APTLY_URL}/public.key \\"
echo " | sudo tee /usr/share/keyrings/wild-central.gpg > /dev/null" echo " | gpg --dearmor | sudo tee /usr/share/keyrings/wild.gpg > /dev/null"
echo "" echo ""
echo " sudo tee /etc/apt/sources.list.d/wild-central.sources <<EOF" echo " sudo tee /etc/apt/sources.list.d/wild.sources <<EOF"
echo " Types: deb" echo " Types: deb"
echo " URIs: ${APTLY_URL}" echo " URIs: ${APTLY_URL}"
echo " Suites: ${DIST}" echo " Suites: ${DIST}"
echo " Components: ${COMPONENT}" echo " Components: ${COMPONENT}"
echo " Signed-By: /usr/share/keyrings/wild-central.gpg" echo " Signed-By: /usr/share/keyrings/wild.gpg"
echo " EOF" echo " EOF"
echo "" echo ""
echo " sudo apt update && sudo apt install wild-central" echo " sudo apt update && sudo apt install wild-central"