Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582692 - sys-apps/likwid-4.0.1-r1: runtime error: /usr/bin/likwid-lua: cannot open /usr/bin/likwid-perfctr: Permission denied
Summary: sys-apps/likwid-4.0.1-r1: runtime error: /usr/bin/likwid-lua: cannot open /us...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brendan Horan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-10 22:11 UTC by Freddie Witherden
Modified: 2016-05-12 03:38 UTC (History)
1 user (show)

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


Attachments
Patch to the ebuild (likwid-bug-582692.patch,442 bytes, patch)
2016-05-11 08:17 UTC, Brendan Horan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Freddie Witherden 2016-05-10 22:11:44 UTC
After installing likwid when attempting to run `likwid-perfctr -a` as a normal user on an ~AMD64 system I get:

freddie@localhost ~ $ likwid-perfctr -a
/usr/bin/likwid-lua: cannot open /usr/bin/likwid-perfctr: Permission denied

I am guessing that this is because likwid-lua is attempting to open likwid-perfctr which is chmod 0711.  Changing to 0755 resolves the issue locally.
Comment 1 Brendan Horan 2016-05-11 08:01:17 UTC
It seems setting file caps in the ebuild strips the perms down. Unsure why yet
Removing "perfctr" from :
cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter}

Then gives us the correct perms on "/usr/bin/likwid-perfctr"
I will look into what the filecaps function is doing and why the perms are stripped.
Comment 2 Brendan Horan 2016-05-11 08:04:05 UTC
read the manual.
"The caps mode (default 711) is used to set the permission on the file if capabilities were properly set on the file."
https://devmanual.gentoo.org/eclass-reference/fcaps.eclass/index.html

I'll get to work on a patch for the ebuild :)
Comment 3 Brendan Horan 2016-05-11 08:17:09 UTC
Created attachment 433906 [details, diff]
Patch to the ebuild

This patch will fix the bug.
However given it changes files on a users disk I am going to assume we need a rev version bump as well.
Thus a new ebuild should be inserted into portage called "likwid-4.0.1-r2.ebuild"