I question the wisdom of having IUSE=+filecaps on by default. This is causing me problems building stage3's on systems that don't support caps and its not easy to switch out a kernel, ie on embedded systems boards. Since these are stage3's I don't want to turn off the flag in stage3's /etc/portage/ nor do I want to turn it off in the profiles. It might be prudent to add intelligence to fcaps.eclass to not fail if file caps are not supported, but just ewarn. I'm willing to do the coding, but what do people think? Here's an example. Don't mind the -r99 its indentical to the -r2 except for some patches needed for musl. * Messages for package net-misc/iputils-20121221-r99: * FAILED postinst: 1 * Setting caps 'cap_net_raw=ep' on file '/bin/arping' failed: * Failed to set capabilities on file `/bin/arping' (Not supported) * usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ] * * Note <filename> must be a regular (non-symlink) file. * ERROR: net-misc/iputils-20121221-r99::musl failed (postinst phase): * could not set caps * * Call stack: * ebuild.sh, line 93: Called pkg_postinst * environment, line 2180: Called fcaps 'cap_net_raw' 'bin/arping' 'bin/ping' 'bin/ping6' 'usr/bin/clockdiff' * environment, line 1158: Called die * The specific snippet of code: * die "could not set caps" * Reproducible: Always
oops i mean identical to -r1 not -r2. minor point but just in case it causes confusion, i should clarify.
my guess is that musl does: strerror(ENOTSUP) == "Not supported" instead of what other C libraries (and the documentation) state: strerror(ENOTSUP) == "Operation not supported" if musl translated things that way, fcaps would do the right thing.
Indeed musl[1] uses "Not supported" as does POSIX[2]. [1]: http://git.musl-libc.org/cgit/musl/tree/src/errno/__strerror.h#n84 [2]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
(In reply to SpanKY from comment #2) > my guess is that musl does: > strerror(ENOTSUP) == "Not supported" > > instead of what other C libraries (and the documentation) state: > strerror(ENOTSUP) == "Operation not supported" > > if musl translated things that way, fcaps would do the right thing. Sorry Mike, it would really have helped if I'd read fcaps.eclass before just assuming that it lacked intelligence :( Anyhow, changing the line in the case statement to *"Operation not supported"*|*"Not supported"*) fixes the problem, line 165.
does musl define ENOTSUP to EOPNOTSUPP ? glibc does which means only one of ENOTSUP and EOPNOTSUPP must be picked, and glibc happens to use the translation for EOPNOTSUPP over ENOTSUPP.
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e196e32f9138f1b57317395392eadc63b4dbf8
Musl does define ENOTSUP to EOPNOTSUPP. From reading online man pages, BSDs seem to do something similar to glibc, while Mac OSX has ENOTSUP and EOPNOTSUPP separated and uses the messages from POSIX (, which is "Operation not supported on socket" for EOPNOTSUPP). bionic seems to use "Operation not supported on transport endpoint".