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
# 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 <<EOF
sudo tee /etc/apt/sources.list.d/wild.sources <<EOF
Types: deb
URIs: https://aptly.cloud2.payne.io
URIs: https://aptly.cloud.payne.io
Suites: stable
Components: main
Signed-By: /usr/share/keyrings/wild-central.gpg
Signed-By: /usr/share/keyrings/wild.gpg
EOF
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:-}"
VERSION=$(cat ../VERSION 2>/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 <<EOF"
echo " sudo tee /etc/apt/sources.list.d/wild.sources <<EOF"
echo " Types: deb"
echo " URIs: ${APTLY_URL}"
echo " Suites: ${DIST}"
echo " Components: ${COMPONENT}"
echo " Signed-By: /usr/share/keyrings/wild-central.gpg"
echo " Signed-By: /usr/share/keyrings/wild.gpg"
echo " EOF"
echo ""
echo " sudo apt update && sudo apt install wild-central"