--- /dev/null
+--- src/configuration.c.orig 2015-11-14 09:10:58.283075033 +0100
++++ src/configuration.c 2015-11-14 09:11:14.898074670 +0100
+@@ -68,7 +68,7 @@
+ use_hardcoded:
+ ret = sprintf(filename,"%s", TOSTRING(ACCESSDAEMON));
+ filename[ret] = '\0';
+- if (!access(filename, R_OK))
++ if (!access(filename, X_OK))
+ {
+ config.daemonPath = (char*)malloc((strlen(filename)+1) * sizeof(char));
+ strcpy(config.daemonPath, filename);
epatch "${FILESDIR}"/${P}-Makefile.patch \
"${FILESDIR}"/${P}-fix-gnustack.patch \
"${FILESDIR}"/${P}-lua-makefile.patch \
- "${FILESDIR}"/${P}-config.mk.patch
+ "${FILESDIR}"/${P}-config.mk.patch \
+ "${FILESDIR}"/${P}-access-daemon.patch
# Set PREFIX path to include sandbox path
sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || die
+ # Set the path to library directory.
+ sed -e 's:$(get_libdir):'$(get_libdir)':' -i config.mk || die "Cannot set library path!"
+
# Set correct LDFLAGS
sed -e '/LIBS/aSHARED_LFLAGS += -Wl,-soname,$@' \
-i make/include_GCC.mk || die
doman doc/*.1
}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ ewarn "To enable users to access performance counters it is necessary to"
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices."
+ ewarn "It can be accomplished by adding the following line to file"
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\""
+}