Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 732722 - app-emulation/qemu-5.0.0 ebuild does not express virtfs > caps use flag dependency
Summary: app-emulation/qemu-5.0.0 ebuild does not express virtfs > caps use flag depen...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 09:27 UTC by Thomas De Schampheleire
Modified: 2020-07-17 22:19 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas De Schampheleire 2020-07-15 09:27:38 UTC
During upgrade of qemu 4.2.0-r6 to 5.0.0 I received following error:

>>> Running pre-merge checks for app-emulation/qemu-5.0.0
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.19.97-gentoo
 * Checking for suitable kernel configuration options...                                                                                                              [ ok ]
>>> Emerging (1 of 1) app-emulation/qemu-5.0.0::gentoo
>>> Failed to emerge app-emulation/qemu-5.0.0, Log file:
>>>  '/var/tmp/portage/app-emulation/qemu-5.0.0/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 1.00, 0.81, 1.62
 * Package:    app-emulation/qemu-5.0.0
 * Repository: gentoo
 * Maintainer: tamiko@gentoo.org slyfox@gentoo.org,virtualization@gentoo.org
 * USE:        abi_x86_64 aio amd64 bzip2 curl elibc_glibc fdt gtk jpeg kernel_linux ncurses oss pin-upstream-blobs png pulseaudio python_targets_python3_7 qemu_softmmu_targets_aarch64 qemu_softmmu_targets_arm qemu_softmmu_targets_i386 qemu_softmmu_targets_mips64 qemu_softmmu_targets_x86_64 qemu_user_targets_i386 sdl userland_GNU vhost-net virtfs vnc xattr xkb
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.19.97-gentoo
>>> Unpacking source...
>>> Unpacking qemu-5.0.0.tar.xz to /var/tmp/portage/app-emulation/qemu-5.0.0/work
>>> Source unpacked in /var/tmp/portage/app-emulation/qemu-5.0.0/work
>>> Preparing source in /var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0 ...
 * Applying qemu-2.11.1-capstone_include_path.patch ...
 [ ok ]
 * Applying qemu-4.0.0-mkdir_systemtap.patch ...
patching file Makefile
Hunk #1 succeeded at 952 with fuzz 1 (offset 149 lines).
 [ ok ]
 * Applying qemu-4.2.0-cflags.patch ...
 [ ok ]
 * Applying qemu-5.0.0-epoll-strace.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0 ...
 * Using python3.7 in global scope
../configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin --libdir=/usr/lib64 --datadir=/usr/share --docdir=/usr/share/doc/qemu-5.0.0/html --mandir=/usr/share/man --with-confsuffix=/qemu --localstatedir=/var --disable-bsd-user --disable-guest-agent --disable-strip --disable-werror --disable-gcrypt --python=/usr/bin/python3.7 --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --host-cc=x86_64-pc-linux-gnu-gcc --disable-debug-info --disable-debug-tcg --disable-docs --disable-plugins --disable-tcg-interpreter --enable-attr --disable-brlapi --enable-linux-aio --enable-bzip2 --disable-capstone --disable-cap-ng --enable-curl --enable-fdt --disable-glusterfs --disable-gnutls --#app-emulation/qemu -alsa -bluetooth -caps -filecaps -opengl -usb -seccomp qemu_softmmu_targets_i386 qemu_softmmu_targets_aarch64 qemu_softmmu_targets_mips64 qemu_softmmu_tadisable-nettle --enable-gtk --disable-rdma --disable-libiscsi --disable-linux-io-uring --disable-jemalloc --enable-vnc-jpeg --enable-kvm --disable-lzo --enable-curses --disable-libnfs --disable-numa --disable-opengl --enable-vnc-png --disable-rbd --disable-vnc-sasl --enable-sdl --disable-sdl-image --disable-seccomp --disable-smartcard --disable-snappy --disable-spice --disable-libssh --disable-libusb --disable-usb-redir --disable-vde --enable-vhost-net --disable-vhost-user-fs --disable-virglrenderer --enable-virtfs --enable-vnc --disable-vte --disable-xen --disable-xen-pci-passthrough --disable-xfsctl --enable-xkbcommon --disable-zstd --enable-libxml2 --audio-drv-list=pa,sdl,oss, --disable-linux-user --enable-system --disable-tools --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips64-softmmu,x86_64-softmmu --enable-pie

ERROR: VirtFS requires libcap-ng devel and libattr devel

 * ERROR: app-emulation/qemu-5.0.0::gentoo failed (configure phase):
 *   configure failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 4189:  Called qemu_src_configure 'softmmu'
 *   environment, line 4049:  Called die
 * The specific snippet of code:
 *       ../configure "${conf_opts[@]}" || die "configure failed";
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-5.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-5.0.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qemu-5.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-5.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0/softmmu-build'
 * S: '/var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0'

 * Messages for package app-emulation/qemu-5.0.0:

 * ERROR: app-emulation/qemu-5.0.0::gentoo failed (configure phase):
 *   configure failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 4189:  Called qemu_src_configure 'softmmu'
 *   environment, line 4049:  Called die
 * The specific snippet of code:
 *       ../configure "${conf_opts[@]}" || die "configure failed";
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-5.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-5.0.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qemu-5.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-5.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0/softmmu-build'
 * S: '/var/tmp/portage/app-emulation/qemu-5.0.0/work/qemu-5.0.0'


Further analysis shows that qemu now expects caps-ng support to be enabled now if virtfs support is requested. In my config, I had virtfs use flag enabled and 'caps' use flag disabled. Enabling the 'caps' use flag manually solves the problem.

In my opinion, the ebuild should automatically enforce the 'caps' use flag if 'virtfs' is enabled, or bail out with a clear warning to the user.

For completeness, these are the flags I set in /etc/portage/package.use/qemu:

-alsa -bluetooth -caps -filecaps -opengl -usb -seccomp qemu_softmmu_targets_i386 qemu_softmmu_targets_aarch64 qemu_softmmu_targets_mips64 qemu_softmmu_targets_arm virtfs qemu_user_targets_i386

on top of the 'default/linux/amd64/17.1/desktop' profile.

Reproducible: Always

Steps to Reproduce:
1. emerge qemu  with USE='-caps virtfs'
Actual Results:  
Configure error: "ERROR: VirtFS requires libcap-ng devel and libattr devel"

Expected Results:  
Successful build.

emerge --info:

Portage 2.3.99 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.30-r8, 4.19.97-gentoo x86_64)
=================================================================
System uname: Linux-4.19.97-gentoo-x86_64-Intel-R-_Core-TM-_i7-7600U_CPU_@_2.80GHz-with-gentoo-2.6
KiB Mem:    16287152 total,   1799844 free
KiB Swap:   20971516 total,  14926812 free
Timestamp of repository gentoo: Mon, 13 Jul 2020 00:45:01 +0000
Head commit of repository flatpak-overlay: 26c396aef4d2f8908eea9b3ad2ccf7dc843a0887

Head commit of repository quarks: 08b5b557222de2e7eacce09605c60f012b4b0f4b

Head commit of repository raiagent: 4c116e0ee1dc3a61f5695dbcd26079bfe07e6c23

Head commit of repository sakaki-tools: b3632b33cf8fb95e91da6f81f1cc95411bd10972

sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
ccache version 3.7.9 [disabled]
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.11-r1::gentoo, 3.7.8-r1::gentoo, 3.8.3-r1::gentoo
dev-util/ccache:          3.7.9::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-webrsync-verify-signature: true
    sync-webrsync-delta: true  # false to use plain webrsync

flatpak-overlay
    location: /usr/local/portage/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

quarks
    location: /usr/local/portage/quarks
    sync-type: git
    sync-uri: https://git.zero-downtime.net/quark/quarks.git
    masters: gentoo
    priority: 50

raiagent
    location: /usr/local/portage/raiagent
    sync-type: git
    sync-uri: https://github.com/leycec/raiagent.git
    masters: gentoo
    priority: 50

sakaki-tools
    location: /usr/local/portage/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/sakaki-/sakaki-tools.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE FraunhoferFDK"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --jobs=5 --load-average=4"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cleartype cli corefonts crypt cryptsetup cups dri dts dvd dvdr emboss encode exif flac gdbm gif gtk iconv icu ipv6 jpeg lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nptl ogg opengl pango pcre pdf png ppds pulseaudio readline sdl seccomp split-usr ssl startup-notification svg tcpd tiff truetype type1 udev unicode usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" SANE_BACKENDS="canon pixma hp" USERLAND="GNU" VIDEO_CARDS="intel 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Larry the Git Cow gentoo-dev 2020-07-17 22:19:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bd533f03e97a50ef82fef8e1eadcbdd6386dbab

commit 0bd533f03e97a50ef82fef8e1eadcbdd6386dbab
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-17 22:19:26 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-17 22:19:36 +0000

    app-emulation/qemu: add USE=caps for USE=virtfs
    
    qemu's ./configure asserts that virtfs always requires caps.
    
    Reported-by: Thomas De Schampheleire
    Closes: https://bugs.gentoo.org/732722
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-emulation/qemu/qemu-5.0.0-r1.ebuild | 2 +-
 app-emulation/qemu/qemu-5.0.0-r2.ebuild | 2 +-
 app-emulation/qemu/qemu-5.0.0.ebuild    | 2 +-
 app-emulation/qemu/qemu-9999.ebuild     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)