FS#58979 - [pinentry] Need configurable script for non-GTK2 graphical environments (e.g., Gnome3/Wayland)

Attached to Project: Arch Linux
Opened by Olivier Mehani (shtrom) - Tuesday, 12 June 2018, 10:35 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 16 June 2018, 05:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Pinentry currently ships with a simple dispatcher that uses pinentry-gtk-2 if the needed libraries are present, or defaults to the curses version otherwise. The package however ships with a few other pinentry flavours, that cannot be used without hacking the `/usr/bin/pinentry` script.

It would be good for that script to be configurable, say, based on a config file in `/etc`. I know that this can be overriden with the `pinentry-program` directive in each user's `.gnupg/gpg-agent.conf`, but I need a system-wide solution (using pinentry-gnome3 by default).

Additional info:
* pinentry-1.1.0-3

Steps to reproduce:
* Install pinentry without the xorg/gtk2 libs, but with gcr
* Start a Gnome3/Wayland sessions
* configure GPG and the agent, without `pinentry-program` set
* `gpg -s` in a terminal
* will bring up pinentry-tty
* was expected to bring up pinentry-gnome3
This task depends upon

Closed by  Gaetan Bisson (vesath)
Saturday, 16 June 2018, 05:37 GMT
Reason for closing:  Implemented
Additional comments about closing:  pinentry-1.1.0-4 in [testing]
Comment by Gaetan Bisson (vesath) - Friday, 15 June 2018, 17:39 GMT
Initial versions of this script included pinentry-gnome3 too but it was removed after a few users experiences issues with it, for instance  FS#58368 .

A very simple solution to your problem would be to add /usr/bin/pinentry to the package's backup array; this way everybody is free to modify this script however they want without having changes overwritten on upgrade. Would that be satisfying to you?
Comment by Olivier Mehani (shtrom) - Saturday, 16 June 2018, 01:49 GMT
Yeah, I was thinking about something along the lines.

However, maybe it would be cleaner to just add something like a `/etc/default/pinentry` configuration file (and in the `backup` array), that would just state which pinentry to use, and have the script itself source that config file.
Comment by Gaetan Bisson (vesath) - Saturday, 16 June 2018, 05:31 GMT
If our custom script has to source a configuration file I'd rather just make the script configurable: it's simpler and allows users to implement exactly what behavior they want, for instance depending on whether or not $DISPLAY is set, etc.

Loading...