Skip to content

Commit

Permalink
Run gpg in batch mode (#9731)
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 72712b4 commit 413d7ba
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 @@ -4004,7 +4004,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 @@ -4120,6 +4120,6 @@ volumes:
name: drone-s3-debrepo-pvc
---
kind: signature
hmac: e2ca92f19f5d5a8ac469bfa5b8fbb5a9827382e08b51417c3c2cc19c2c65bf4c
hmac: 88359bb820fc8e66baad0afa8489a4117e2220eee72fef64febbd40b03631bb9

...

0 comments on commit 413d7ba

Please sign in to comment.