Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759673 - app-emulation/qemu-5.2.0 has removed /usr/libexec/virtiosfsd
Summary: app-emulation/qemu-5.2.0 has removed /usr/libexec/virtiosfsd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-12 22:06 UTC by Mustafa bin Laden
Modified: 2020-12-13 11:47 UTC (History)
4 users (show)

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


Attachments
0001-app-emulation-qemu-build-virtiofsd-if-USE-vhost-user.patch (0001-app-emulation-qemu-build-virtiofsd-if-USE-vhost-user.patch,3.36 KB, patch)
2020-12-13 03:30 UTC, Ionen Wolkens
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mustafa bin Laden 2020-12-12 22:06:08 UTC
It seems that this now (toolz/virtiosfsd) only gets built when your have an --enable-tools passed to configure. How is this enabled? There is no flag that enables tools in this version. 

Reproducible: Always
Comment 1 Ionen Wolkens gentoo-dev 2020-12-12 23:16:21 UTC
--enable-tools does get used, configure is ran multiple times, one of which is only for tools with --enable-tools

In tools/meson.build it first auto-detect deps:

    have_virtiofsd = (targetos == 'linux' and
        have_tools and
        'CONFIG_SECCOMP' in config_host and
        'CONFIG_LIBCAP_NG' in config_host and
        'CONFIG_VHOST_USER' in config_host)

So first need USE="caps seccomp", but further on:

    elif get_option('virtiofsd').disabled() or not have_system
      have_virtiofsd = false
    endif

Bit of interest is "or not have_system" given have_system=false when configure is used this way. I tried removing this check and it gave me a virtfsd.

Not sure what would be the most appropriate fix to accommodate how the ebuild does things preferably without patching.
Comment 2 Ionen Wolkens gentoo-dev 2020-12-12 23:40:12 UTC
(In reply to Ionen Wolkens from comment #1)
> Not sure what would be the most appropriate fix to accommodate how the
> ebuild does things preferably without patching.
Well, maybe it just shouldn't be auto-enabled based on other options.

e.g. USE=virtiofsd, pass --enable-virtiofsd, with REQUIRED_USE on caps and seccomp (maybe something else of interest, I don't use virtiofsd myself), it doesn't check have_system then.

So users that need this would have a clear way to enable it.
Comment 3 Ionen Wolkens gentoo-dev 2020-12-13 01:23:59 UTC
(In reply to Ionen Wolkens from comment #2)
> e.g. USE=virtiofsd
Or maybe it would make sense to be force-enabled when pre-existing vhost-user-fs is set? Does add requirements to the flag though.
Comment 4 Ionen Wolkens gentoo-dev 2020-12-13 03:30:55 UTC
Created attachment 678217 [details, diff]
0001-app-emulation-qemu-build-virtiofsd-if-USE-vhost-user.patch

Here's a potential patch for the aformentioned vhost-user-fs approach, but please ignore/modify if believe should be handled differently (I don't know much about vhost-user-fs/virtiofsd).
Comment 5 Larry the Git Cow gentoo-dev 2020-12-13 11:47:05 UTC
The bug has been closed via the following commit(s):

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

commit cf274423cac2d869f44469c896d22213c537434c
Author:     Ionen Wolkens <sudinave@gmail.com>
AuthorDate: 2020-12-13 03:18:16 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-12-13 11:46:38 +0000

    app-emulation/qemu: build virtiofsd if USE=vhost-user-fs
    
    With qemu-5.2.0 build system changes, virtiofsd would only be auto-enabled if
    USE="caps seccomp", --enable-tools, and --enable-system. The last being
    disabled for the tools build led to virtiofsd being missing for users.
    
    Rather than work around, control using --enable-virtiofsd and USE=vhost-user-fs
    
    Cannot be enabled together with --disable-tools, so added conf_tools()
    
    Closes: https://bugs.gentoo.org/759673
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Ionen Wolkens <sudinave@gmail.com>
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-emulation/qemu/{qemu-5.2.0.ebuild => qemu-5.2.0-r1.ebuild} | 10 ++++++++++
 app-emulation/qemu/qemu-9999.ebuild                            | 10 ++++++++++
 2 files changed, 20 insertions(+)