Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946643 - kde-plasma/powerdevil with USE=filecaps does not work on musl systems
Summary: kde-plasma/powerdevil with USE=filecaps does not work 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-18 23:07 UTC by Bobby Bingham
Modified: 2024-12-28 00:05 UTC (History)
0 users

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-18 23:07:59 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/kde-plasma/powerdevil?id=82403b226a4ed27dfe7c0838ec35b5929ec2504e broke powerdevil by default on musl-based systems.

Reproducible: Always

Steps to Reproduce:
Install powerdevil on a musl system without forcing USE=-filecaps

Actual Results:  
powerdevil doesn't work:
* Screens don't go to sleep
* KDE System Settings -> Power Management displays "Power Management settings could not be loaded. The Power Management Service appears not to be running."

Expected Results:  
Power management works.

Same basic issue as https://bugs.gentoo.org/946505, but for powerdevil instead of kwin.  From https://bugs.kde.org/show_bug.cgi?id=417227#c13:

> [15:45] <fvogt> Just remove CAP_SYS_NICE and it'll work
> [15:45] <PureTryOut[m]> And how would I do that?
> [15:47] <fvogt> setcap /usr/bin/kwin_wayland cap_sys_nice=
> [15:48] <fvogt> Actually, just setcap -r /usr/bin/kwin_wayland
> [15:49] <PureTryOut[m]> You're right, that fixed it! :tadad
> 
> [15:54] <fvogt> kwin_wayland's CAP_SYS_NICE makes _dbus_check_setuid trigger and so it ignores environment variables
> [15:57] <fvogt> It works on glibc because it only checks the suid/euid
> [15:57] <fvogt> On musl, issetugid is available and that doesn't like capabilities

The same applies to powerdevil, and the end result is that it can't communicate over dbus.

The fix for #946505 was to mask the filecaps USE flag for kwin in the musl profile.  Should do the same for powerdevil.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-19 19:29:17 UTC
asturm did warn me :)
Comment 2 Larry the Git Cow gentoo-dev 2024-12-28 00:05:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=096183691986f1a7b7918c9357bad011a46beeb3

commit 096183691986f1a7b7918c9357bad011a46beeb3
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2024-12-27 20:52:23 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2024-12-28 00:04:53 +0000

    profiles: musl: Mask kde-plasma/powerdevil[filecaps] as well
    
    Closes: https://bugs.gentoo.org/946643
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 profiles/features/musl/package.use.mask | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)