File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ jobs:
128128
129129 # Get key fingerprint
130130 KEY_FPR=$(gpg --list-keys --with-colons | grep '^fpr' | head -n1 | cut -d: -f10)
131+ echo "Using GPG key: $KEY_FPR"
131132
132133 # Create passphrase file for GPG (more reliable than fd redirection)
133134 echo "$GPG_PASSPHRASE" > /tmp/gpg-passphrase.txt
@@ -142,17 +143,28 @@ jobs:
142143 %__gpg_sign_cmd %{__gpg} --batch --no-verbose --no-armor --pinentry-mode loopback --digest-algo SHA512 --passphrase-file /tmp/gpg-passphrase.txt --detach-sign --output %{__signature_filename} %{__plaintext_filename}
143144 EOF
144145
146+ echo "RPM macros configured"
147+
145148 # Sign all RPM packages
146149 for rpm in output/*.rpm; do
147150 if [ -f "$rpm" ]; then
148151 echo "Signing: $(basename $rpm)"
149- rpmsign --addsign "$rpm" 2>/dev/null || rpm --addsign "$rpm"
152+
153+ # Try rpmsign with error output
154+ if ! rpmsign --addsign "$rpm" 2>&1; then
155+ echo "Warning: rpmsign failed, trying rpm --addsign..."
156+ if ! rpm --addsign "$rpm" 2>&1; then
157+ echo "❌ ERROR: Both rpmsign and rpm --addsign failed"
158+ exit 1
159+ fi
160+ fi
150161
151162 # Verify signature was created by checking if signature header exists
152163 SIG_INFO=$(rpm -qp --qf '%{SIGPGP:pgpsig}\n' "$rpm" 2>/dev/null | head -1)
153164 if [ -z "$SIG_INFO" ] || [ "$SIG_INFO" = "(none)" ]; then
154165 echo "❌ ERROR: Signing failed for $(basename $rpm)"
155166 echo " No GPG signature found in package"
167+ rpm -qpi "$rpm" | head -20
156168 exit 1
157169 fi
158170
You can’t perform that action at this time.
0 commit comments