Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79571 - [pinentry] pinentry-qt preexec example needs small tweak

Attached to Project: Arch Linux
Opened by Gene (GeneC) - Tuesday, 05 September 2023, 11:44 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:22 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

pinentry does not depend on kwayland which is good for gnome users. The pinentry-qt example should probably be changed to reflect the actual shared library dependency:

preexec file sample entry for pinentry-qt currently has:

#test -e /usr/lib/libQt5Widgets.so.5 && exec /usr/bin/pinentry-qt "$@"

but this should be changed to:

#test -e /usr/lib/libKF5WaylandClient.so.5&& exec /usr/bin/pinentry-qt "$@"

Current version would actually work fine since kwayland provides both libs.

What pinentry-qt actually uses:

ldd /usr/bin/pinentry-qt | grep KF
libKF5WaylandClient.so.5 => not found

My system is gnome and kwayland is not installed, hence I get 'not found'.


Additional info:
pinentry : 1.2.1-2

This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:22 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/pinentry/issues/3
Comment by Toolybird (Toolybird) - Tuesday, 05 September 2023, 22:26 GMT
Additional deps due to  FS#75740  implementation.
Comment by Chih-Hsuan Yen (yan12125) - Thursday, 07 September 2023, 16:28 GMT
Thanks for the catch. There are two new dependencies with pinentry 1.2.1-2, so an updated preexec example might be:
```
diff --git preexec preexec
index b8312d1..0c8ab3b 100755
--- preexec
+++ preexec
@@ -2,4 +2,4 @@

# Define additional functionality for pinentry. For example
#test -e /usr/lib/libgcr-base-3.so.1 && exec /usr/bin/pinentry-gnome3 "$@"
-#test -e /usr/lib/libQt5Widgets.so.5 && exec /usr/bin/pinentry-qt "$@"
+#test -e /usr/lib/libKF5WaylandClient.so.5 -a -e /usr/lib/libQt5X11Extras.so.5 && exec /usr/bin/pinentry-qt "$@"
```
Comment by Gene (GeneC) - Thursday, 07 September 2023, 17:08 GMT
I thought that was only for X11 - Is that true under wayland too?
Comment by Chih-Hsuan Yen (yan12125) - Friday, 08 September 2023, 04:32 GMT
Both Wayland and X11 are enabled for pinentry-qt, so it uses both libraries:

$ readelf -d /usr/bin/pinentry-qt | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libsecret-1.so.0]
0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libassuan.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgpg-error.so.0]
0x0000000000000001 (NEEDED) Shared library: [libKF5WaylandClient.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
0x0000000000000001 (NEEDED) Shared library: [libQt5Widgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5X11Extras.so.5]
0x0000000000000001 (NEEDED) Shared library: [libncursesw.so.6]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
Comment by Gene (GeneC) - Friday, 08 September 2023, 15:17 GMT
I agree and did realize it's linked against both but my question is this;

if you run the code in pure wayland setting, does the code still require X11 shared libs even though its not actually in the running code path? does it work or not run?
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 09 September 2023, 05:28 GMT
> if you run the code in pure wayland setting, does the code still require X11 shared libs even though its not actually in the running code path? does it work or not run?

pinentry-qt does not run without libQt5X11Extras.so.5 even in a pure Wayland environment. That is because NEEDED libraries are checked before pinentry determines to use Wayland or X11 code path.
Comment by Gene (GeneC) - Saturday, 09 September 2023, 09:46 GMT
Right of course (where's my coffee !). I guess code would need to be changed to use dlopen() to avoid unneeded runtime deps.
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 09 September 2023, 12:51 GMT
Changes for dlopen() are non-trivial. That sounds more like a feature request for upstream :)
https://dev.gnupg.org/
Comment by Gene (GeneC) - Saturday, 09 September 2023, 12:57 GMT
Oh agree completely - definitely was not suggesting be done here. And it would be much simpler/cleaner to just split the executable into wayland and x11 versions and drop the latter once x11 is actually deprecated (if/when that ever happens).
Comment by Chih-Hsuan Yen (yan12125) - Sunday, 10 September 2023, 05:38 GMT
Splitting the pinentry-qt binary is also something for the upstream to do. Let's focus on changes needed for PKGBUILD and related scripts here, thanks.
Comment by Alexander Mikhailian (mikhailian) - Monday, 09 October 2023, 18:19 GMT
I am running X11 and pinentry can not start anymore with

```
/usr/bin/pinentry-qt: error while loading shared libraries: libKF5WaylandClient.so.5: cannot open shared object file: No such file or directory
```

P.S. Yes, there are still people running X11 out there ;-/
Comment by Chih-Hsuan Yen (yan12125) - Tuesday, 10 October 2023, 10:54 GMT
The kwayland5 package is also required under X11.
Comment by Zachary Vance (za3k) - Wednesday, 18 October 2023, 02:56 GMT
Yeah, I got with the same problem as @mikhailian, because I had pinentry-qt hardcoded as my pinentry client. I would personally prefer if this *was* a declared dependency for now, for that reason.

Loading...