Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453944 - app-admin/mcelog - missing exec permission on trigger file prevent mcelog daemon to start
Summary: app-admin/mcelog - missing exec permission on trigger file prevent mcelog dae...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Julian Ospald
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 08:41 UTC by LABBE Corentin
Modified: 2013-01-26 17:53 UTC (History)
2 users (show)

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


Attachments
ebuild patch (mcelog-1.0_pre3_p20120918-r1.ebuild.patch,387 bytes, patch)
2013-01-26 17:48 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description LABBE Corentin 2013-01-25 08:41:55 UTC
when I try to start mcelog in daemon mode I got some errors in /var/log/mcelog
mcelog: Cannot access cache threshold trigger `cache-error-trigger': Permission denied

strace confirm that the problem is the right of the file:
access("/etc/mcelog", R_OK|X_OK)        = 0
access("/etc/mcelog/cache-error-trigger", R_OK|X_OK) = -1 EACCES (Permission denied)
write(2, "mcelog: ", 8mcelog: )                 = 8
write(2, "Cannot access cache threshold tr"..., 59Cannot access cache threshold trigger `cache-error-trigger') = 59
write(2, ": Permission denied\n", 20: Permission denied

All the trigger files are shell script, so they need to be installed with 750 rights.

Furthermore, /etc/mcelog/cache-error-trigger is a bash script, so the ebuild is missing a RDEPEND to app-shells/bash. (or the script need to be converted to /bin/sh, but some bashisms are present).
Comment 1 Ben Kohler gentoo-dev 2013-01-26 17:48:23 UTC
Created attachment 336928 [details, diff]
ebuild patch

I don't believe we need a bash dep since it's in @system, but we do need to get those scripts +x, I should have caught that earlier.  Simple ebuild patch attached.
Comment 2 Julian Ospald 2013-01-26 17:53:31 UTC
+  26 Jan 2013; Julian Ospald <hasufell@gentoo.org>
+  mcelog-1.0_pre3_p20120918-r1.ebuild,
+  +files/mcelog-1.0_pre3_p20120918-bashism.patch:
+  remove bashisms from scripts, install scripts executable


no revbump, I assume most users are able to adjust permissions if necessary.