Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

Commit c2454ce

Browse files
authored
Merge pull request #119 from learningequality/fix/dynamic-series-and-debsign
fix: debsign argument parsing, PPA_SERIES precedence, passphrase cleanup
2 parents 45040b8 + 37f0832 commit c2454ce

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/build_debian.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ jobs:
8181
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
8282
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
8383
run: make sign-and-upload
84-
- name: Cleanup Launchpad credentials
84+
- name: Cleanup credentials
8585
if: always()
86-
run: rm -f /tmp/lp-creds.txt
86+
run: rm -f /tmp/lp-creds.txt /tmp/.gpg-passphrase
8787
wait_for_source_builds:
8888
needs:
8989
- check_version

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ dist: error-pages orig
5656
# build and sign (signing uses environment GPG_KEY_ID and GPG_PASSPHRASE)
5757
sign-and-upload: dist
5858
@echo "Signing and uploading package..."
59+
@test -n "$$GPG_KEY_ID" || { echo "Error: GPG_KEY_ID is not set"; exit 1; }
60+
@test -n "$$GPG_PASSPHRASE" || { echo "Error: GPG_PASSPHRASE is not set"; exit 1; }
5961
@printf '%s' "$$GPG_PASSPHRASE" > /tmp/.gpg-passphrase
6062
debsign -p"gpg --batch --pinentry-mode loopback --passphrase-file /tmp/.gpg-passphrase" \
61-
-k"$$GPG_KEY_ID" dist/*.changes
63+
-k "$$GPG_KEY_ID" dist/*.changes
6264
@rm -f /tmp/.gpg-passphrase
6365
@echo "Uploading to PPA..."
6466
dput --unchecked ppa:learningequality/kolibri-proposed dist/*.changes

test/setup_ppa.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ SUDO=""
66
[ "$(id -u)" != "0" ] && SUDO="sudo"
77

88
# Detect Ubuntu series for PPA source line
9-
# On Ubuntu: use the OS codename. On non-Ubuntu (e.g. Debian): require PPA_SERIES env var.
9+
# PPA_SERIES env var takes precedence (used by CI to ensure all containers use the same series).
10+
# On Ubuntu without PPA_SERIES: auto-detect from OS. On non-Ubuntu: PPA_SERIES is required.
1011
. /etc/os-release
11-
if [ "$ID" = "ubuntu" ]; then
12+
if [ -n "${PPA_SERIES:-}" ]; then
13+
SERIES="$PPA_SERIES"
14+
elif [ "$ID" = "ubuntu" ]; then
1215
SERIES="$VERSION_CODENAME"
1316
else
14-
SERIES="${PPA_SERIES:?PPA_SERIES must be set for non-Ubuntu systems (e.g. PPA_SERIES=noble)}"
17+
echo "Error: PPA_SERIES must be set for non-Ubuntu systems (e.g. PPA_SERIES=noble)" >&2
18+
exit 1
1519
fi
1620

1721
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys DC5BAA93F9E4AE4F0411F97C74F88ADB3194DD81

0 commit comments

Comments
 (0)