Skip to content

Commit

Permalink
Run gpg in batch mode (#9730)
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 dd08dc3 commit 54112b1
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 @@ -4332,7 +4332,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 @@ -4461,6 +4461,6 @@ volumes:
name: drone-s3-debrepo-pvc
---
kind: signature
hmac: 942d6ab5b8b2ab250f3633359fa77080ddfcb5a807d03cb2f5f68c1e0a2d2b4c
hmac: f29561054dffe09593ca1018f3240f6078ddff950c05672b824c78124a204e21

...

0 comments on commit 54112b1

Please sign in to comment.