From 087c5d5524264251df022547417c19c01f5a4d6f Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Mon, 27 Apr 2026 08:27:07 +0300 Subject: [PATCH] fix(ci): add rpmmacros dump and explicit exit code capture for signing Disable set -e around rpm --addsign to prevent silent exits and capture the actual exit code and error output. Co-Authored-By: Claude Opus 4.6 (1M context) --- script/publish-repo.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/script/publish-repo.sh b/script/publish-repo.sh index 6352b81..7ce307a 100755 --- a/script/publish-repo.sh +++ b/script/publish-repo.sh @@ -7,12 +7,23 @@ RPM_DIR="${1%/}" REMOTE_DIR="/var/www/rpm/fedora/${FEDORA_VERSION}/x86_64" # sign each rpm with the imported gpg key +echo "--- rpmmacros ---" +cat ~/.rpmmacros +echo "--- macro check ---" +rpm -E '%{_openpgp_sign_id}' || true +rpm -E '%{_gpg_name}' || true +echo "--- signing ---" for rpm in "${RPM_DIR}"/*.rpm; do echo "signing ${rpm}..." - rpm --addsign "${rpm}" 2>&1 || { + set +e + rpm --addsign "${rpm}" 2>&1 + rc=$? + set -e + echo "exit code: ${rc}" + if [ "${rc}" -ne 0 ]; then echo "failed to sign ${rpm}" >&2 exit 1 - } + fi done install --directory --mode 700 ~/.ssh