Skip to content

Commit

Permalink
Run gpg in batch mode (#9732)
Browse files Browse the repository at this point in the history
Do not prompt for any reason, especially not if a repomd.xml.asc already
exists when signing repomd.xml. Attempting to prompt (instead of
overwriting) results in publish failures like the following:

  + gpg --detach-sign --armor /rpmrepo/teleport/repodata/repomd.xml
  gpg: cannot open '/dev/tty': No such device or address

Contributes to #9726.

(cherry picked from commit 0fb71e9)
  • Loading branch information
wadells authored Jan 12, 2022
1 parent 0fbca68 commit 69a2539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3971,7 +3971,7 @@ steps:
echo "$GPG_RPM_SIGNING_ARCHIVE" | base64 -d | tar -xzf - -C $GNUPGHOME
chown -R root:root $GNUPGHOME
# Sign rpm repo metadata (yum clients will automatically look for and verify repodata/repomd.xml.asc)
- gpg --detach-sign --armor /rpmrepo/teleport/repodata/repomd.xml
- gpg --batch --yes --detach-sign --armor /rpmrepo/teleport/repodata/repomd.xml
- cat /rpmrepo/teleport/repodata/repomd.xml.asc
- rm -rf $GNUPGHOME

Expand Down Expand Up @@ -4087,6 +4087,6 @@ volumes:
name: drone-s3-debrepo-pvc
---
kind: signature
hmac: 8af156cf5b97dce8c9dcae7b3a189fafd910f692f86dbf11a2e500f0185144d9
hmac: ab03c06bffc03426f49ea126d87dd41dc1c024ac5cbbd12d76298b0463c5f8c8

...

0 comments on commit 69a2539

Please sign in to comment.