Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873190 - app-emulation/qemu-7.1.0: build failure when attempting virtiofsd configuration
Summary: app-emulation/qemu-7.1.0: build failure when attempting virtiofsd configuration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: John Helmert III
URL: https://gitlab.com/qemu-project/qemu/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-27 14:48 UTC by John Helmert III
Modified: 2022-11-30 01:07 UTC (History)
7 users (show)

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


Attachments
build.log (build.log.xz,48.34 KB, application/x-xz)
2022-09-27 14:53 UTC, John Helmert III
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-27 14:48:15 UTC
From src_configure:

# Needed to rework vhost-user-fs handling thanks to https://gitlab.com/qemu-project/qemu/-/commit/5166dab
# The option was converted into being configurable by
# Kconfig's. So, to enable it, we insert the necessary
# options into each arch's softmmu target gentoo.mak file,
# then configure with --with-devices-${target}=gentoo.
if use vhost-user-fs; then
   echo "CONFIG_VHOST_USER_FS=y for ${target}-softmmu" || die
   echo "CONFIG_VIRTIO=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
   echo "CONFIG_VHOST_USER_FS=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
else
   echo "CONFIG_VHOST_USER_FS=n for ${target}-softmmu" || die
   echo "CONFIG_VIRTIO=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
   echo "CONFIG_VHOST_USER_FS=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
fi

And the logic for actually passing the flag to use these gentoo.mak Kconfig files:

for target in ${IUSE_SOFTMMU_TARGETS}; do
    if use "qemu_softmmu_targets_${target}"; then
        conf_opts+=(
            # For some reason, adding this with the setting set
            # to on *or* off makes the build always fail.
            --with-devices-${target}=gentoo
        )
    fi
done

The configure option is commented out in-tree, to avoid the build failure at the cost of automagic virtiofsd configuration. Build log from build failure attached.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-27 14:53:53 UTC
Created attachment 814387 [details]
build.log
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-27 16:19:56 UTC
https://gitlab.com/qemu-project/qemu/-/blob/master/meson.build#L2611

So it's checking for capstone, but dies if it's not accessible via `#include <capstone.h>`, but I think it should simply find the right include dir at configure time then specify it via -I on the compiler command line?
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-27 16:53:58 UTC
(In reply to John Helmert III from comment #2)
> https://gitlab.com/qemu-project/qemu/-/blob/master/meson.build#L2611
> 
> So it's checking for capstone, but dies if it's not accessible via `#include
> <capstone.h>`, but I think it should simply find the right include dir at
> configure time then specify it via -I on the compiler command line?

Heh, wrong bug.
Comment 4 Larry the Git Cow gentoo-dev 2022-11-22 06:20:44 UTC
The bug has been referenced in the following commit(s):

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

commit d3883dbf44e95ba6f9091f691225de271b895fb9
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2022-11-22 06:18:40 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-11-22 06:20:29 +0000

    app-emulation/qemu: sync live
    
    Bug: https://bugs.gentoo.org/873190
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 app-emulation/qemu/qemu-9999.ebuild | 31 +++----------------------------
 1 file changed, 3 insertions(+), 28 deletions(-)

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

commit dacf2f8b487b4e9fbbe356ada9b77847ee24aa66
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2022-11-22 06:17:48 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-11-22 06:20:29 +0000

    app-emulation/qemu: force on vhost-user-fs
    
    Bug: https://bugs.gentoo.org/873190
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 ...u-7.2.0_rc1.ebuild => qemu-7.2.0_rc1-r1.ebuild} | 31 +++-------------------
 1 file changed, 3 insertions(+), 28 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-11-22 06:25:17 UTC
The bug has been referenced in the following commit(s):

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

commit 959a0a08727b69e035750e5523cff25ed2f89c6c
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2022-11-22 06:24:00 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-11-22 06:24:00 +0000

    app-emulation/qemu: revbump 7.1.0 to force-on vhost-user-fs
    
    Bug: https://bugs.gentoo.org/873190
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 .../{qemu-7.1.0-r1.ebuild => qemu-7.1.0-r2.ebuild} | 31 +++-------------------
 1 file changed, 3 insertions(+), 28 deletions(-)
Comment 6 Brian Evans (RETIRED) gentoo-dev 2022-11-23 14:11:48 UTC
(In reply to Larry the Git Cow from comment #5)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=959a0a08727b69e035750e5523cff25ed2f89c6c
> 
> commit 959a0a08727b69e035750e5523cff25ed2f89c6c
> Author:     John Helmert III <ajak@gentoo.org>
> AuthorDate: 2022-11-22 06:24:00 +0000
> Commit:     John Helmert III <ajak@gentoo.org>
> CommitDate: 2022-11-22 06:24:00 +0000
> 
>     app-emulation/qemu: revbump 7.1.0 to force-on vhost-user-fs
>     
>     Bug: https://bugs.gentoo.org/873190
>     Signed-off-by: John Helmert III <ajak@gentoo.org>
> 
>  .../{qemu-7.1.0-r1.ebuild => qemu-7.1.0-r2.ebuild} | 31
> +++-------------------
>  1 file changed, 3 insertions(+), 28 deletions(-)

If REQUIRED_USE="caps seccomp ..." is now forced, then this should be further reworked to drop caps and seccomp as USE in order to improve the user experience.  See also [1].

[1] https://forums.gentoo.org/viewtopic.php?p=8760401
Comment 7 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-11-23 14:23:14 UTC
I would note that these USE flags are already defaults and that user is actually reversing those defaults, for some reason. That seems like a problem in itself.
Comment 8 Brian Evans (RETIRED) gentoo-dev 2022-11-23 14:28:45 UTC
(In reply to John Helmert III from comment #7)
> I would note that these USE flags are already defaults and that user is
> actually reversing those defaults, for some reason. That seems like a
> problem in itself.

No, this is abuse of REQUIRED_USE.  If something is required, make it required by removing the option to disable it.  Offering the option is now pointless with something that can be changed in 5 minutes.

I'll fix it up if you want.  It looks rather trivial to do.
Comment 9 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 00:47:52 UTC
I wasn't making that point to disagree that the situation isn't optimal. So, sure, my adjustment is wrong in retrospect, and feel free to fix. Thanks!
Comment 10 Larry the Git Cow gentoo-dev 2022-11-24 02:05:44 UTC
The bug has been referenced in the following commit(s):

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

commit 02154447b98eefc3da490904d229d5b6aff0619a
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2022-11-24 01:49:48 +0000
Commit:     Brian Evans <grknight@gentoo.org>
CommitDate: 2022-11-24 01:49:48 +0000

    app-emulation/qemu: Drop caps and seccomp USE
    
    Non-maintainer commit
    
    This follows with the vhost-user-fs drop as it made these USE required.
    Instead of having users get errors, just drop the USE and make
    the deps and configure options always installed.
    
    Bug: https://bugs.gentoo.org/873190
    Signed-off-by: Brian Evans <grknight@gentoo.org>

 app-emulation/qemu/qemu-7.1.0-r2.ebuild     | 20 ++++++++++++--------
 app-emulation/qemu/qemu-7.2.0_rc1-r1.ebuild | 20 ++++++++++++--------
 app-emulation/qemu/qemu-9999.ebuild         | 20 ++++++++++++--------
 3 files changed, 36 insertions(+), 24 deletions(-)