Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 936206

Summary: app-crypt/pinentry: Use opensuse/fedora wrapper to try to use the right pinentry implementation at runtime
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: arsen, chewi, gnome, juippis, kde, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=853961
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: pinentry-wrapper

Description Pacho Ramos gentoo-dev 2024-07-17 09:34:45 UTC
Created attachment 897836 [details]
pinentry-wrapper

Hello,

When trying to think about how to properly solve bug 853961 I realized that, currently administrators need to choose one pinentry implementation for all the users. That leads to some issues like, for example, if the machine is used by KDE and Gnome users, one of them will use the "non-preferred" version. Also, looking to x11-wm/enlightenment, www-plugins/passff-host, I think that their users would also benefit from a more "automated" and runtime detection method to launch the proper pinentry backend.

I have seen that Fedora and OpenSuSE are using the attached wrapper. One option could be to provide it as another eselect option. That option could be the default one to try auto-detection by default, while still allowing people to force a different want if they really wish to.

Thanks a lot for considering it
Comment 1 Joonas Niilola gentoo-dev 2024-07-23 08:30:52 UTC
Sounds good to me. Would you ship the wrapper along with the eselect package?
Comment 2 Pacho Ramos gentoo-dev 2024-07-23 08:41:29 UTC
I was thinking on providing it with app-crypt/pinentry because all the other implementations are installed by it. But I have no preference and eselect-pinentry can also be a good candidate
Comment 3 Arsen Arsenović gentoo-dev 2024-10-25 19:45:21 UTC
This seems reasonable to do.  Here's the updated version of the script:

https://src.fedoraproject.org/rpms/pinentry/blob/rawhide/f/pinentry-wrapper

For some reason, though, it prefers pinentry-tty to pinentry-curses.  We might want to swap that (since a USE flag enables it)
Comment 4 Mike Gilbert gentoo-dev 2024-10-26 15:01:40 UTC
I see a bunch of $DISPLAY checks and a call to xprop.

That script probably needs to be updated for Wayland.
Comment 5 Pacho Ramos gentoo-dev 2024-11-08 17:12:44 UTC
It seems that, in the absence of xprop, it will rely on KDE_FULL_SESSION to detect a kde session
Comment 6 Mike Gilbert gentoo-dev 2024-11-09 16:22:04 UTC
(In reply to Pacho Ramos from comment #5)
> It seems that, in the absence of xprop, it will rely on KDE_FULL_SESSION to
> detect a kde session

Ah I see; it has a --display command line option and the DISPLAY logic is meant to support that.

Looks fine I guess.