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

Pavel Lisý pavel.lisy at gmail.com
Tue Jun 2 14:05:37 UTC 2015


Petr Pisar píše v Út 02. 06. 2015 v 07:57 +0000:
> On 2015-06-02, Pavel Lisý <pavel.lisy at gmail.com> wrote:
> > I've used rpmsign in script for long time. I worked fine. After upgrade 
> > to
> > Fedora 22 (from Fedora 20) something changed
> > 
> [...]
> > 
> > is starting now pinentry-gtk-2 and forces me to put passphrase to modal
> > window. 
> > 
> > Is any possibility how to disable this behaviour? Whatever I've found
> > through google didn't work for me.
> > 
> gnupg2 changed. Maybe you look for gpg-preset-passphrase tool
> <https://www.gnupg.org/documentation/manuals/gnupg/gpg_002dpreset_002dpas
> sphrase.html>.
> 
> Also the gpg-agent is not located by environment variables but by
> socket. And the gpg-agent will be spawned automatically if it does not
> run.
> 
> Also handling password file descriptor behaves differently. See
> <http://thread.gmane.org/gmane.comp.encryption.gpg.devel/19353/>.
> 
> -- Petr
Here is working solution:

add this lines to ~/.rpmmacros
%__gpg /usr/bin/gpg2
%__gpg_check_password_cmd %{__gpg} \
  gpg --batch --no-verbose --passphrase-fd 3 --pinentry-mode loopback -u "%{_gpg_name}" -so -


Pavel

-- 
Pavel Lisý <pavel.lisy at gmail.com>


More information about the devel mailing list