Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946505 - kde-plasma/kwin use of setcap breaks global shortcuts on musl systems
Summary: kde-plasma/kwin use of setcap breaks global shortcuts on musl systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-15 18:28 UTC by Bobby Bingham
Modified: 2024-12-19 15:03 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bobby Bingham 2024-12-15 18:28:30 UTC
The change that was made to fix #941628 breaks global shortcuts in plasma when running on a musl-based system.

Reproducible: Always

Steps to Reproduce:
Install kde-plasma/kwin on a musl system without forcing -filecaps
Actual Results:  
All global shortcuts (and some actions that aren't shortcuts, but I assume must be built on the same framework behind the scenes?) are broken in the plasma session.

* Window management shortcuts (e.g. Alt+F4) don't work
* Shortcuts I've configured to launch specific applications don't work
* Scrolling mouse wheel on volume tray icon to change audio volume doesn't work
* Attempting to log out doesn't work -- it prompts to ask whether you want to log out, but when you tell it to log out, nothing happens

Expected Results:  
Global shortcuts should work

Running `setcap -r /usr/bin/kwin_wayland` and restarting fixes the problem, as does reinstalling kwin with USE=-filecaps.

I figured out that it was related to the file capabilities after finding it mentioned on KDE's bug tracker: https://bugs.kde.org/show_bug.cgi?id=417227#c13
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-15 18:31:58 UTC
This is unfortunate, as we had a workaround for this and indeed we lost it when moving to the other approach.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-15 18:35:13 UTC
s/caps/filecaps/ in profiles should work, which I'll do now
Comment 3 Larry the Git Cow gentoo-dev 2024-12-15 18:37:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c5387ec25069e924bac85e6510ca9aa91f35475

commit 9c5387ec25069e924bac85e6510ca9aa91f35475
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-12-15 18:35:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-15 18:36:40 +0000

    profiles: kwin[caps] -> kwin[filecaps]
    
    The masks/forces need updating for caps->filecaps when we fixed
    eclass use in bug #941628.
    
    Bug: https://bugs.gentoo.org/931215
    Bug: https://bugs.gentoo.org/941628
    Closes: https://bugs.gentoo.org/946505
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/base/package.use.force          | 2 +-
 profiles/features/musl/package.use.force | 2 +-
 profiles/features/musl/package.use.mask  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-15 18:38:24 UTC
Thanks for the report, and I'm sorry we forgot about that tweak being needed again. Not an obvious thing to debug at all so I do apologise!
Comment 5 Bobby Bingham 2024-12-15 19:14:44 UTC
Thanks for the incredibly fast turnaround on a fix!