Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 459154 - app-emulation/qemu-1.4.0 - fcaps on /usr/libexec/virtfs-proxy-helper dies.
Summary: app-emulation/qemu-1.4.0 - fcaps on /usr/libexec/virtfs-proxy-helper dies.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-25 14:00 UTC by eroen
Modified: 2013-02-26 18:37 UTC (History)
1 user (show)

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


Attachments
fcaps.patch (qemu-1.4.0.ebuild.diff,776 bytes, patch)
2013-02-25 18:51 UTC, iGentoo
Details | Diff
fcaps.patch (qemu-1.4.0.ebuild.diff,406 bytes, patch)
2013-02-26 08:28 UTC, iGentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2013-02-25 14:00:17 UTC
During postinst, the package generates the following error message:

 * ERROR: app-emulation/qemu-1.4.0 failed (postinst phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_postinst
 *   environment, line 3660:  Called fcaps 'cap_chown' 'cap_dac_override' 'cap_fowner' 'cap_fsetid' 'cap_setgid' 'cap_mknod' 'cap_setuid' '/usr/libexec/virtfs-proxy-helper'
 *   environment, line 2331:  Called die
 * The specific snippet of code:
 *               chmod ${caps_mode} "${file}" || die;
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-1.4.0'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-1.4.0'`.
 * The complete build log is located at '/tmp/portage/app-emulation/qemu-1.4.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-emulation/qemu-1.4.0/temp/environment'.
 * Working directory: '/tmp/portage/app-emulation/qemu-1.4.0'
 * S: '/tmp/portage/app-emulation/qemu-1.4.0/work/qemu-1.4.0'

This seems to be the result of this command (lines 468, -9 of the ebuild) :
    use virtfs && fcaps cap_chown cap_dac_override cap_fowner cap_fsetid \
        cap_setgid cap_mknod cap_setuid /usr/libexec/virtfs-proxy-helper

No file `/usr/libexec/virtfs-proxy-helper` was installed by the ebuild, however a `/usr/bin/virtfs-proxy-helper` was. Perhaps that's what it's supposed to be?

Reproducible: Always




$ emerge --info qemu
Portage 2.2.0_alpha163 (default/linux/amd64/13.0/desktop, gcc-4.7.2, glibc-2.16.0, 3.8.0-occam1+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.0-occam1+-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:     8011556 total,   2470896 free
KiB Swap:   16777212 total,  16755488 free
Timestamp of tree: Mon, 25 Feb 2013 13:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p42
dev-java/java-config:     2.2.0::java-overlay
dev-lang/python:          2.7.4_pre20130210::progress, 3.2.4_pre20130224::progress, 3.3.0-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo gentoo-haskell progress java-overlay glc eroen-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -flto -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -finline-functions -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -flto -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -finline-functions -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -O2 -pipe"
DISTDIR="/var/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --autounmask --with-bdeps=y --quiet-build --nospinner"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="/var/distfiles-falcon http://mirrors.eu.kernel.org/gentoo/ http://mirrors.kernel.org/gentoo/ http://distfiles.gentoo.org "
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/var/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog* --exclude /metadata/cache/ --stats --delay-updates"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/haskell /var/lib/layman/progress /var/lib/layman/java-overlay /var/lib/layman/glc /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apng audio audiofile avresample avx bash-completion bdf berkdb bluray bzip2 cairo caps cb cdda cdparanoia cdr cjk cli corefonts cracklib crypt cups curl cxx ddate declarative detex device-mapper dga dia djvu dmapi dri dts dvd dvdr dvi2tty dvipdfm ebook egl emboss encode exif fam ffmpeg fftw firefox fits flac fontconfig fortran g3dvl gallium gbm gcj gcrypt gdbm gif gimp git glib glibc-omitfp gmp gnuplot gnutls gold gpm graphics graphviz gs gstreamer gtk gtk3 highlight hscolour iconv icu id3tag idn imagemagick imlib inotify iproute2 ipv6 jbig jpeg jpeg2k jpg json kde kde4 kpathsea latex lcms libffi libssh2 libv4l luatex lvm lvm2 lzma lzo mad man metric mikmod mkv mms mmx mng modules mp3 mp4 mpeg mpg123 mudflap multilib multimedia musepack ncurses netlink nptl nut ocr odbc offensive ogg opengl openmp openvg optimization optimized-qmake opus pam pango pch pcre pdf pgf phonon png postscript ppds private-headers pstricks pth publishers pulseaudio python3 qt3support qt4 raw readline samba sbsms scanner science sdl session smp sna sndfile speex spell sqlite sse sse2 sse3 sse4 sse4_1 sse4_2 ssh ssl ssse3 svg t1lib tcpd tesseract theora threads tiff tls truetype udev unicode usb v4l v4l2 vaapi video vorbis vpx webkit webp wmf wxwidgets x264 xanim xattr xcb xcomposite xetex xfs xft xinerama xml xmlpatterns xorg xosd xpm xrandr xv xvid xvmc xz zlib zsh-completion" ABI_X86="64" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" DRACUT_MODULES="btrfs caps cifs crypt crypt-gpg lvm nfs ssh-client syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="mouse keyboard evdev synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en gb us en_US en_GB eng jbo no nb nn no_NO nb_NO nn_NO nor" PHP_TARGETS="php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-1.4.0 was built with the following:
USE="aio alsa caps curl filecaps jpeg ncurses opengl png pulseaudio sdl seccomp spice threads tls usbredir uuid vhost-net virtfs vnc xattr xfs -bluetooth -brltty -debug -doc -fdt -mixemu -python -rbd -sasl (-selinux) -smartcard -static -static-softmmu -static-user -systemtap -tci -vde -xen" QEMU_SOFTMMU_TARGETS="i386 x86_64 (-alpha) (-arm) -cris -lm32 (-m68k) -microblaze -microblazeel (-mips) -mips64 -mips64el -mipsel -or32 (-ppc) (-ppc64) -ppcemb -s390x -sh4 -sh4eb (-sparc) -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="(-alpha) (-arm) -armeb -cris -i386 (-m68k) -microblaze -microblazeel (-mips) -mipsel -or32 (-ppc) (-ppc64) -ppc64abi32 -s390x -sh4 -sh4eb (-sparc) -sparc32plus -sparc64 -unicore32 -x86_64"
Comment 1 Piotr Szymaniak 2013-02-25 14:30:04 UTC
You should post full Build.log:

 * If you need support, post the output of *snip*
 * the complete build log *snip*
 * The complete build log is located at '/tmp/portage/app-emulation/qemu-1.4.0/temp/build.log'.
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-25 14:52:28 UTC
No need for a build log when it is clear what needs to be patched.

> *  app-emulation/qemu
>       Matched Files:		/usr/bin/virtfs-proxy-helper; 

Yes, since other qemu files are in /usr/libexec it appears they have accidentally typed that for virtfs-proxy-helper as well.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2013-02-25 15:07:33 UTC
Fixed in tree.
Comment 4 Piotr Szymaniak 2013-02-25 16:20:27 UTC
(In reply to comment #2)
> No need for a build log when it is clear what needs to be patched.

Sorry, didn't noticed that.
Comment 5 iGentoo 2013-02-25 18:48:36 UTC
(In reply to comment #3)
> Fixed in tree.

>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
 * If you don't have kvm compiled into the kernel, make sure you have
 * the kernel module loaded before running kvm. The easiest way to
 * ensure that the kernel module is loaded is to load it on boot.
 * For AMD CPUs the module is called 'kvm-amd'
 * For Intel CPUs the module is called 'kvm-intel'
 * Please review /etc/conf.d/modules for how to load these
 * 
 * Make sure your user is in the 'kvm' group
 * Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.
 * 
chmod: cannot access ‘/cap_dac_override’: No such file or directory
 * ERROR: app-emulation/qemu-1.4.0 failed (postinst phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_postinst
 *   environment, line 3676:  Called fcaps 'cap_chown' 'cap_dac_override' 'cap_fowner' 'cap_fsetid' 'cap_setgid' 'cap_mknod' 'cap_setuid' '/usr/bin/virtfs-proxy-helper'
 *   environment, line 2343:  Called die
 * The specific snippet of code:
 *               chmod ${caps_mode} "${file}" || die;
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-1.4.0'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-1.4.0'`.
 * This ebuild used the following eclasses from overlays:
 *   /usr/local/portage/eclass/toolchain-funcs.eclass
 *   /usr/local/portage/eclass/flag-o-matic.eclass
 * The complete build log is located at '/var/log/portage/build/app-emulation/qemu-1.4.0:20130225-184200.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-emulation/qemu-1.4.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-1.4.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-1.4.0'
 * S: '/var/tmp/portage/app-emulation/qemu-1.4.0/work/qemu-1.4.0'
!!! FAILED postinst: 1
Comment 6 iGentoo 2013-02-25 18:51:12 UTC
Created attachment 340102 [details, diff]
fcaps.patch
Comment 7 eroen 2013-02-25 20:05:24 UTC
Reopening for visibility. Error is no longer printed if capabilities are comma-separated, like Alphat's patch (and fcaps.eclass and cap_from_text(3) suggest).
Comment 8 eroen 2013-02-26 05:18:05 UTC
That wasn't what I meant to do /at all/. Sorry about that. The ebuild in portage still generates the error.
Comment 9 iGentoo 2013-02-26 08:20:19 UTC
>>> Original instance of package unmerged safely.
 * If you don't have kvm compiled into the kernel, make sure you have
 * the kernel module loaded before running kvm. The easiest way to
 * ensure that the kernel module is loaded is to load it on boot.
 * For AMD CPUs the module is called 'kvm-amd'
 * For Intel CPUs the module is called 'kvm-intel'
 * Please review /etc/conf.d/modules for how to load these
 * 
 * Make sure your user is in the 'kvm' group
 * Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.
 * 
 * Setting caps 'cap_chown,cap_dac_override,cap_fowner,cap_fsetidcap_setgid,cap_mknod,cap_setuid=ep' on file '/usr/bin/virtfs-proxy-helper' failed:
 * fatal error: Invalid argument
 * usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
 * 
 *  Note <filename> must be a regular (non-symlink) file.
 * ERROR: app-emulation/qemu-1.4.0 failed (postinst phase):
 *   could not set caps
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_postinst
 *   environment, line 3499:  Called fcaps 'cap_chown,cap_dac_override,cap_fowner,cap_fsetidcap_setgid,cap_mknod,cap_setuid' '/usr/bin/virtfs-proxy-helper'
 *   environment, line 2063:  Called die
 * The specific snippet of code:
 *                       die "could not set caps";
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-1.4.0'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-1.4.0'`.
 * This ebuild used the following eclasses from overlays:
 *   /usr/local/portage/eclass/toolchain-funcs.eclass
 *   /usr/local/portage/eclass/flag-o-matic.eclass
 *   /usr/local/portage/eclass/pax-utils.eclass
 * This ebuild is from an overlay named 'custom': '/usr/local/portage/'
 * The complete build log is located at '/var/log/portage/build/app-emulation/qemu-1.4.0:20130226-081316.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-emulation/qemu-1.4.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-1.4.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-1.4.0'
 * S: '/var/tmp/portage/app-emulation/qemu-1.4.0/work/qemu-1.4.0'
!!! FAILED postinst: 1
Comment 10 iGentoo 2013-02-26 08:28:59 UTC
Created attachment 340148 [details, diff]
fcaps.patch

missing comma...
Comment 11 eroen 2013-02-26 12:02:23 UTC
Seeing the same error as in comment 9. It goes away when fixing the comma separation/concatenation thing.

On a tangential note; since these "failures" complete their installations and portage later pretends they were successes, shouldn't the fix be accompanied by a rev-bump? I'm assuming having incorrect caps set on a file is less-than-desired, otherwise why would they be set in the first place?
Comment 12 eroen 2013-02-26 18:37:05 UTC
Thanks for fixing!