From 5014aa398b3694dad945176d75c3e8b8dc394a5c Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Sun, 8 Nov 2026 15:02:03 +0800 Subject: [PATCH 1/6] Fix 3975: Write the apt repo in deb822 format with Signed-By setup_repo.sh now writes /etc/apt/sources.list.d/jamulus.sources and stores the key in /etc/apt/keyrings, referenced via Signed-By, instead of a one-line jamulus.list and a globally trusted key in trusted.gpg.d. The old jamulus.list and trusted.gpg.d key are removed once the new key has downloaded, so re-running the script migrates existing setups. --- linux/setup_repo.sh | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/linux/setup_repo.sh b/linux/setup_repo.sh index a6cd9e5ee8..13d7079e4b 100755 --- a/linux/setup_repo.sh +++ b/linux/setup_repo.sh @@ -41,13 +41,16 @@ if [[ ${APT_MAJOR} -lt 2 || (${APT_MAJOR} -eq 2 && ${APT_MINOR} -lt 2) ]]; the done fi -REPO_FILE=/etc/apt/sources.list.d/jamulus.list -KEY_FILE=/etc/apt/trusted.gpg.d/jamulus.asc +REPO_FILE=/etc/apt/sources.list.d/jamulus.sources +KEY_DIR=/etc/apt/keyrings +KEY_FILE=${KEY_DIR}/jamulus.asc +# Files written by earlier versions of this script +OLD_REPO_FILE=/etc/apt/sources.list.d/jamulus.list +OLD_KEY_FILE=/etc/apt/trusted.gpg.d/jamulus.asc GITHUB_REPOSITORY="jamulussoftware/jamulus" -echo "Setting up Jamulus repo at ${REPO_FILE}..." -echo "deb https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/ ./" > ${REPO_FILE} echo "Installing Jamulus GPG key at ${KEY_FILE}..." +install -d -m 0755 "${KEY_DIR}" curl --fail --show-error -sLo "${KEY_FILE}" https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/key.asc CURL_EXITCODE=$? @@ -55,6 +58,22 @@ if [[ ${CURL_EXITCODE} -ne 0 ]]; then echo "Error: Download of gpg key failed. Please try again later." exit ${CURL_EXITCODE} fi +chmod 0644 "${KEY_FILE}" + +for OLD_FILE in "${OLD_REPO_FILE}" "${OLD_KEY_FILE}"; do + if [[ -e ${OLD_FILE} ]]; then + echo "Removing old ${OLD_FILE}..." + rm -f "${OLD_FILE}" + fi +done + +echo "Setting up Jamulus repo at ${REPO_FILE}..." +cat > "${REPO_FILE}" << EOF +Types: deb +URIs: https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/ +Suites: ./ +Signed-By: ${KEY_FILE} +EOF echo "Running apt update..." apt -qq update From a0d9e29fbc13553bce3775e135dee155c906aab0 Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Sun, 8 Nov 2026 18:16:00 +0800 Subject: [PATCH 2/6] Remove the old repo file only after the new one is installed --- linux/setup_repo.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/linux/setup_repo.sh b/linux/setup_repo.sh index 13d7079e4b..79d0553142 100755 --- a/linux/setup_repo.sh +++ b/linux/setup_repo.sh @@ -60,20 +60,28 @@ if [[ ${CURL_EXITCODE} -ne 0 ]]; then fi chmod 0644 "${KEY_FILE}" -for OLD_FILE in "${OLD_REPO_FILE}" "${OLD_KEY_FILE}"; do - if [[ -e ${OLD_FILE} ]]; then - echo "Removing old ${OLD_FILE}..." - rm -f "${OLD_FILE}" - fi -done - echo "Setting up Jamulus repo at ${REPO_FILE}..." -cat > "${REPO_FILE}" << EOF +TMP_REPO_FILE=$(mktemp) || exit 1 +cat > "${TMP_REPO_FILE}" << EOF Types: deb URIs: https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/ Suites: ./ Signed-By: ${KEY_FILE} EOF +if ! install -m 0644 "${TMP_REPO_FILE}" "${REPO_FILE}"; then + rm -f "${TMP_REPO_FILE}" + echo "Error: Could not write ${REPO_FILE}. The previous setup was left in place." + exit 1 +fi +rm -f "${TMP_REPO_FILE}" + +# Only now that the new source is in place, remove what earlier versions wrote +for OLD_FILE in "${OLD_REPO_FILE}" "${OLD_KEY_FILE}"; do + if [[ -e ${OLD_FILE} ]]; then + echo "Removing old ${OLD_FILE}..." + rm -f "${OLD_FILE}" + fi +done echo "Running apt update..." apt -qq update From 950b04e929c905fb1ab1d996c3ac6ce9f0cedd25 Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Tue, 10 Nov 2026 21:15:44 +0800 Subject: [PATCH 3/6] Add saimskywalker to the contributors list --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.cpp b/src/util.cpp index 39efa10a16..ba607057bb 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -617,6 +617,7 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : CBaseDlg ( parent ) "

Thai Pangsakulyanont (dtinth)

" "

Peter Goderie (pgScorpio)

" "

Dan Garton (danryu)

" + "

saimskywalker (saimskywalker)

" "
" + tr ( "For details on the contributions check out the %1" ) .arg ( "" + tr ( "Github Contributors list" ) + "." ) ); From 1fecb4a104b1178e4af2f8e44b4d598713bb58ea Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Wed, 11 Nov 2026 03:52:46 +0800 Subject: [PATCH 4/6] Use mkdir -p and move the new source into place --- linux/setup_repo.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/linux/setup_repo.sh b/linux/setup_repo.sh index 79d0553142..353daf76fb 100755 --- a/linux/setup_repo.sh +++ b/linux/setup_repo.sh @@ -50,7 +50,7 @@ OLD_KEY_FILE=/etc/apt/trusted.gpg.d/jamulus.asc GITHUB_REPOSITORY="jamulussoftware/jamulus" echo "Installing Jamulus GPG key at ${KEY_FILE}..." -install -d -m 0755 "${KEY_DIR}" +mkdir -p "${KEY_DIR}" curl --fail --show-error -sLo "${KEY_FILE}" https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/key.asc CURL_EXITCODE=$? @@ -61,19 +61,20 @@ fi chmod 0644 "${KEY_FILE}" echo "Setting up Jamulus repo at ${REPO_FILE}..." -TMP_REPO_FILE=$(mktemp) || exit 1 -cat > "${TMP_REPO_FILE}" << EOF -Types: deb -URIs: https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/ -Suites: ./ -Signed-By: ${KEY_FILE} -EOF -if ! install -m 0644 "${TMP_REPO_FILE}" "${REPO_FILE}"; then +# Write the new source next to the old one and move it into place, so a failed +# write never leaves a broken or empty source behind. +TMP_REPO_FILE="${REPO_FILE}.tmp" +if ! printf '%s\n' \ + "Types: deb" \ + "URIs: https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/" \ + "Suites: ./" \ + "Signed-By: ${KEY_FILE}" > "${TMP_REPO_FILE}" || + ! chmod 0644 "${TMP_REPO_FILE}" || + ! mv -f "${TMP_REPO_FILE}" "${REPO_FILE}"; then rm -f "${TMP_REPO_FILE}" echo "Error: Could not write ${REPO_FILE}. The previous setup was left in place." exit 1 fi -rm -f "${TMP_REPO_FILE}" # Only now that the new source is in place, remove what earlier versions wrote for OLD_FILE in "${OLD_REPO_FILE}" "${OLD_KEY_FILE}"; do From f4f3f616976ebdfda6d11332edd8f843826adb83 Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Wed, 11 Nov 2026 04:03:33 +0800 Subject: [PATCH 5/6] Download the key to a temp file and keep the keyring dir readable --- linux/setup_repo.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/linux/setup_repo.sh b/linux/setup_repo.sh index 353daf76fb..9e92f4fd1c 100755 --- a/linux/setup_repo.sh +++ b/linux/setup_repo.sh @@ -50,15 +50,22 @@ OLD_KEY_FILE=/etc/apt/trusted.gpg.d/jamulus.asc GITHUB_REPOSITORY="jamulussoftware/jamulus" echo "Installing Jamulus GPG key at ${KEY_FILE}..." -mkdir -p "${KEY_DIR}" -curl --fail --show-error -sLo "${KEY_FILE}" https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/key.asc +mkdir -p "${KEY_DIR}" && chmod 0755 "${KEY_DIR}" +# Download next to the current key, so a broken download never replaces it +TMP_KEY_FILE="${KEY_FILE}.tmp" +curl --fail --show-error -sLo "${TMP_KEY_FILE}" https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/key.asc CURL_EXITCODE=$? if [[ ${CURL_EXITCODE} -ne 0 ]]; then + rm -f "${TMP_KEY_FILE}" echo "Error: Download of gpg key failed. Please try again later." exit ${CURL_EXITCODE} fi -chmod 0644 "${KEY_FILE}" +if ! chmod 0644 "${TMP_KEY_FILE}" || ! mv -f "${TMP_KEY_FILE}" "${KEY_FILE}"; then + rm -f "${TMP_KEY_FILE}" + echo "Error: Could not write ${KEY_FILE}." + exit 1 +fi echo "Setting up Jamulus repo at ${REPO_FILE}..." # Write the new source next to the old one and move it into place, so a failed From 41a0ee951a874b0384864a34cab3a8e450cd3f52 Mon Sep 17 00:00:00 2001 From: saimskywalker <15120878+saimskywalker@users.noreply.github.com> Date: Wed, 11 Nov 2026 11:41:46 +0800 Subject: [PATCH 6/6] Stop if the keyring directory cannot be prepared --- linux/setup_repo.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux/setup_repo.sh b/linux/setup_repo.sh index 9e92f4fd1c..4f4d25b3ee 100755 --- a/linux/setup_repo.sh +++ b/linux/setup_repo.sh @@ -50,7 +50,10 @@ OLD_KEY_FILE=/etc/apt/trusted.gpg.d/jamulus.asc GITHUB_REPOSITORY="jamulussoftware/jamulus" echo "Installing Jamulus GPG key at ${KEY_FILE}..." -mkdir -p "${KEY_DIR}" && chmod 0755 "${KEY_DIR}" +if ! mkdir -p "${KEY_DIR}" || ! chmod 0755 "${KEY_DIR}"; then + echo "Error: Could not prepare ${KEY_DIR}." + exit 1 +fi # Download next to the current key, so a broken download never replaces it TMP_KEY_FILE="${KEY_FILE}.tmp" curl --fail --show-error -sLo "${TMP_KEY_FILE}" https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/key.asc