Fedora 22: cannot use rpmsign in script - problem with pinentry-gtk-2

Michael Schwendt mschwendt at gmail.com
Tue Jun 2 09:59:43 UTC 2015


On Tue, 02 Jun 2015 09:27:16 +0200, Pavel Lisý wrote:

> Hello
> 
> I've used rpmsign in script for long time. I worked fine. After upgrade to
> Fedora 22 (from Fedora 20) something changed
> 
> This script:
> ------------- cut ------------------
> export LANG=cs_CZ.UTF-8
> if [ -n "$PASSPHRASE" ] ; then
> /usr/bin/expect -f - << EOF
> spawn rpmsign --addsign $RPMS_TO_SIGN
> match_max 100000
> fork
> expect "Vložte heslovou frázi: "
> send -- "${PASSPHRASE}\r"
> expect eof
> EOF
> else
>    echo "Set PASSPHRASE variable first"
> fi
> ------------- cut ------------------
> 
> is starting now pinentry-gtk-2 and forces me to put passphrase to modal
> window. 

Cannot confirm.

> Is any possibility how to disable this behaviour? Whatever I've found
> through google didn't work for me.
> 
> Do you use rpmsign in script?

Expect or PyExpect used to be an option, yes, if you like storing the
passphrase somewhere.

Alternatively, you can redefine %{__gpg_sign_cmd} to your own invocation
of "gpg" when running rpm --addsign. That way you can add GPG options such
as --batch --use-agent and spare yourself the Expect script as you then can
use GPG Agent.


More information about the users mailing list