--- a/i3status-2.3.ebuild +++ b/i3status-2.3.ebuild @@ -4,7 +4,7 @@ EAPI=4 -inherit toolchain-funcs +inherit toolchain-funcs versionator DESCRIPTION="generates a status bar for dzen2, xmobar or similar" HOMEPAGE="http://i3wm.org/i3status/" @@ -28,6 +28,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 @@ -48,10 +49,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}