Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936206 - app-crypt/pinentry: Use opensuse/fedora wrapper to try to use the right pinentry implementation at runtime
Summary: app-crypt/pinentry: Use opensuse/fedora wrapper to try to use the right pinen...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-17 09:34 UTC by Pacho Ramos
Modified: 2024-11-09 16:22 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pinentry-wrapper (pinentry,3.14 KB, text/plain)
2024-07-17 09:34 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
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.