Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 648840 - kde-plasma/kwin-5.12.2 should set CAP_SYS_NICE on /usr/bin/kwin_wayland
Summary: kde-plasma/kwin-5.12.2 should set CAP_SYS_NICE on /usr/bin/kwin_wayland
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 12:42 UTC by Steffen Hau
Modified: 2018-07-02 23:56 UTC (History)
0 users

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


Attachments
kde-plasma_kwin-5.12.2-build.log.xz (kde-plasma_kwin-5.12.2-build.log.xz,63.94 KB, application/x-xz)
2018-02-26 12:42 UTC, Steffen Hau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2018-02-26 12:42:08 UTC
Created attachment 521068 [details]
kde-plasma_kwin-5.12.2-build.log.xz

kwin in plasma 5.12 has gained support for real-time scheduling: https://cgit.kde.org/kwin.git/commit/?id=7c8003f7f6212ccad7de652943f94d501365d30f


But the capability does not land in the installed executable:
schlepptop /tmp # getcap /usr/bin/kwin_wayland
schlepptop /tmp # cp -a /usr/bin/kwin_wayland /tmp/kwin_wayland
schlepptop /tmp # setcap CAP_SYS_NICE=+ep kwin_wayland
schlepptop /tmp # getcap /tmp/kwin_wayland
/tmp/kwin_wayland = cap_sys_nice+ep

I can't verify why the cap is not present, but it looks like it's already missing after the install phase:
schlepptop /tmp # getcap /var/tmp/portage/kde-plasma/kwin-5.12.2/image/usr/bin/kwin_wayland
schlepptop /tmp # 

I have no idea where and how to check what's going wrong. I've attached the complete build.log.
Comment 1 Michael Palimaka (kensington) gentoo-dev 2018-03-03 00:24:13 UTC
It's getting set by the build system correctly, but getting lost when merging to the live filesystem.
Comment 2 Michael Palimaka (kensington) gentoo-dev 2018-03-04 01:27:31 UTC
After substantial debugging with Arfrever in #-portage, in addition to bug #649418, another possible cause is the strip tool removing extended attributes (workaround is FEATURES="nostrip").
Comment 3 Arfrever Frehtes Taifersar Arahesis 2018-03-04 03:01:04 UTC
`strip` deletes all extended attributes, but Portage's prepstrip script (which internally calls `strip`) was trying to preserve them, but this code was working only for user.* extended attributes. Now fixed (bug #649524) to handle other attributes (e.g. security.capability extended attribute which is internally used by capabilities).
Comment 4 Arfrever Frehtes Taifersar Arahesis 2018-07-02 23:56:00 UTC
3 bugs in Portage about preservation of capabilities (649418, 649524, 649528) have been fixed and new version of Portage is stable.
If you still have any problem, then reopen this bug and provide new data.