--- a/wireshark-1.6.2.ebuild +++ b/wireshark-1.6.2.ebuild @@ -4,7 +4,7 @@ EAPI="3" PYTHON_DEPEND="python? 2" -inherit libtool flag-o-matic eutils toolchain-funcs python +inherit libtool flag-o-matic eutils toolchain-funcs python versionator [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P} DESCRIPTION="A network protocol analyzer formerly known as ethereal" @@ -58,6 +58,7 @@ # @DESCRIPTION: # fcaps sets the specified capabilities in the effective and permitted set of # the given file. In case of failure fcaps sets the given file-mode. +# Requires versionator.eclass fcaps() { local uid_gid=$1 local perms=$2 @@ -78,10 +79,13 @@ res=$? if [ $res -ne 0 ]; then - ewarn "Failed to set capabilities. Probable reason is missed kernel support." - ewarn "Kernel must have SECURITY_FILE_CAPABILITIES, and _FS_SECURITY" - ewarn "enabled (e.g. EXT3_FS_SECURITY) where is the filesystem to store" - ewarn "${path}" + ewarn "Failed to set capabilities. Probable reason is missing kernel support." + ewarn "Your kernel must have _FS_SECURITY enabled (e.g. EXT4_FS_SECURITY)" + ewarn "where is the filesystem to store ${path}" + if ! version_is_at_least 2.6.33 "$(uname -r)"; then + ewarn "For kernel 2.6.32 or older, you will also need to enable" + ewarn "SECURITY_FILE_CAPABILITIES." + fi ewarn ewarn "Falling back to suid now..." chmod u+s ${path}