[frameworks-kcoreaddons] [Bug 452817] screenlocker currently not working at all

2022-05-02 Thread Fabian Vogt
https://bugs.kde.org/show_bug.cgi?id=452817

--- Comment #10 from Fabian Vogt  ---
For completeness, a quick discussion with sitter on IRC/matrix:

[11:51]  so we could consider either the ld_library_path wrong, or
the fact that libexec is in /usr (and then not symlinked), or that
kscreenlocker should hardcode the build time libexec location as final
fallback. the latter is why I imagine this isn't also failing for KIO because
there we should have that final fallback
[11:52]  Qt has different builds for relocatable and non-relocatable
[11:53]  That might be an option as well, if it's not a use case to put
system frameworks into some other location
[11:53]  that'd be where the final fallback comes in IMO
[11:54]  on systems where relocatability doesn't matter we'll find
libexec in the buildtime location anyway so klibexec is only extra sugar there
[11:54]  Having an optional final fallback which has to be done
explicitly in every use of klibexec seems fragile
[11:55]  yes. I am leaning towards saying you should symlink libexec
;)
[11:55]  or patch klibexec to never be relative maybe
[11:56]  At some point libexec was below lib64, but that was changed
some time ago...
[11:56] 
https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/142#note_383993
[11:57]  perhaps the answer should be a builtime switch to make
klibexec return a fixed prefix 路
[11:58]  To have the inline functions in klibexec.h just return the full
libexecdir path, effectively like before?
[11:59]  it all seems equally suitable to my mind. but I would argue
that not having libexec inside a lib location goes against the spirit of
usrmerge
[11:59]  the point of it is to get rid of the separation of / and
/usr, but then having libexec only in one location is undermining that
[11:59]  fvogt: yep
[11:59]  https://fedoraproject.org/wiki/Features/UsrMove agrees with not
having /libexec
[12:02]  fair point. still violates the motivation from my POV if
the library location then resolves to / and not /usr
[12:03]  all that said, I would give a +1 to an MR that adds a full
libexecdir switch to kcoreaddons ^^
[14:53]  sitter[m]: Adding the libexecdir switch to kcoreaddons assumes
that kcoreaddons is built with the same full libexecdir as its users which
might not be the case
[14:53]  Not sure how to get the application/library's full libexecdir
into klibexec.h

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kcoreaddons] [Bug 452817] screenlocker currently not working at all

2022-04-30 Thread Fabian Vogt
https://bugs.kde.org/show_bug.cgi?id=452817

Fabian Vogt  changed:

   What|Removed |Added

 CC||fab...@ritter-vogt.de,
   ||kdelibs-b...@kde.org
Version|git-master  |unspecified
   Assignee|plasma-b...@kde.org |mp...@kde.org
  Component|general |general
Product|kscreenlocker   |frameworks-kcoreaddons

--- Comment #9 from Fabian Vogt  ---
(In reply to Luca Beltrame from comment #8)
> This happens because KLibexec looks up kscreenlocker_greet in /libexec, not
> /usr/libexec.
> 
> From strace I ran on a nested Wayland session:
> 
> [pid 13948] execve("/libexec/kscreenlocker_greet"
> 
> But in openSUSE Tumbleweed it is installed in /usr/libexec.
> 
> I had a discussion about it with Fabian on IRC about a possible cause:
> 
> [12:35]  The relative path is formed by going from /usr/lib64/ to
> /usr/libexec
> [12:36]  During runtime the shared library is opened from /lib64/
> though, so it tries /libexec
> [12:36]  i.e. incompatible with usrmerge
> [12:37]  At least that's my theory

Looks like my theory is correct.

libkscreenlocker is built with /usr/lib64 as full libdir path and /usr/libexec
as full libexec path, so it tries to reach the greeter by doing
$self/../libexec/kscreenlocker_greet. In a usr-merged system, /lib64 is a
symlink to /usr/lib64 (or the other way around), so
/lib64/libKScreenLocker.so.5.24.80 and /usr/lib64/libKScreenLocker.so.5.24.80
refer to the same file. As /lib64 is earlier in the library search path than
/usr/lib64, the library is loaded as /lib64/libKScreenLocker.so.5.24.80 and the
path ends up as /lib64/../libexec/.

It works after forcing /usr/lib64/ earlier in the search path than /lib64.

Moving this over to kcoreaddons as the issue is with KLibexec.

-- 
You are receiving this mail because:
You are watching all bug changes.