feat: Cloudsmith→GitHub Pages migration script; fix apt arch warning

scripts/migrate-repo-to-github-pages.sh:
- Detects installed version and picks the correct dist track automatically
- Finds Cloudsmith sources by URL content (not filename) to handle the
  varied naming conventions users have in sources.list.d/
- Removes old keyrings, imports GitHub Pages key, writes new source
- Confirms the package is visible from the new repo before exiting

build.yml publish job:
- Add empty binary-amd64 and binary-arm64 Packages files alongside
  binary-all, and set Architectures: all amd64 arm64 in Release
- Silences the "doesn't support architecture 'amd64'" warning on PVE
  hosts without duplicating package entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kevin Adams
2026-06-06 14:29:15 -04:00
co-authored by Claude Sonnet 4.6
parent 61373f9db7
commit 93d7ed1270
2 changed files with 163 additions and 1 deletions
+11 -1
View File
@@ -339,6 +339,8 @@ jobs:
for DIST in $DISTS; do
mkdir -p "${PAGES_DIR}/dists/${DIST}/main/binary-all"
mkdir -p "${PAGES_DIR}/dists/${DIST}/main/binary-amd64"
mkdir -p "${PAGES_DIR}/dists/${DIST}/main/binary-arm64"
# Generate Packages file (paths relative to repo root)
dpkg-scanpackages --multiversion "${PAGES_DIR}/pool/v${MAJOR}" \
@@ -346,6 +348,14 @@ jobs:
> "${PAGES_DIR}/dists/${DIST}/main/binary-all/Packages"
gzip -kf "${PAGES_DIR}/dists/${DIST}/main/binary-all/Packages"
# Empty arch-specific Packages — all our packages are Architecture: all;
# these files silence the apt "doesn't support architecture" warning on
# amd64 and arm64 hosts without duplicating package entries.
touch "${PAGES_DIR}/dists/${DIST}/main/binary-amd64/Packages"
gzip -kf "${PAGES_DIR}/dists/${DIST}/main/binary-amd64/Packages"
touch "${PAGES_DIR}/dists/${DIST}/main/binary-arm64/Packages"
gzip -kf "${PAGES_DIR}/dists/${DIST}/main/binary-arm64/Packages"
# Generate Release file
apt-ftparchive \
-o "APT::FTPArchive::Release::Origin=truenas-proxmox" \
@@ -353,7 +363,7 @@ jobs:
-o "APT::FTPArchive::Release::Suite=${DIST}" \
-o "APT::FTPArchive::Release::Codename=${DIST}" \
-o "APT::FTPArchive::Release::Components=main" \
-o "APT::FTPArchive::Release::Architectures=all" \
-o "APT::FTPArchive::Release::Architectures=all amd64 arm64" \
release "${PAGES_DIR}/dists/${DIST}" \
> "${PAGES_DIR}/dists/${DIST}/Release"