commit:     cf274423cac2d869f44469c896d22213c537434c
Author:     Ionen Wolkens <sudinave <AT> gmail <DOT> com>
AuthorDate: Sun Dec 13 03:18:16 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 11:46:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf274423

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 <AT> gmail.com>
Signed-off-by: Sergei Trofimovich <slyfox <AT> 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(+)

diff --git a/app-emulation/qemu/qemu-5.2.0.ebuild 
b/app-emulation/qemu/qemu-5.2.0-r1.ebuild
similarity index 98%
rename from app-emulation/qemu/qemu-5.2.0.ebuild
rename to app-emulation/qemu/qemu-5.2.0-r1.ebuild
index fb697371ce5..7c4861c024b 100644
--- a/app-emulation/qemu/qemu-5.2.0.ebuild
+++ b/app-emulation/qemu/qemu-5.2.0-r1.ebuild
@@ -69,6 +69,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
        qemu_softmmu_targets_riscv64? ( fdt )
        static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins 
!rbd !snappy )
        static-user? ( !plugins )
+       vhost-user-fs? ( caps seccomp )
        virtfs? ( caps xattr )
        vte? ( gtk )
        plugins? ( !static !static-user )
@@ -439,6 +440,14 @@ qemu_src_configure() {
                        echo "--disable-${2:-$1}"
                fi
        }
+       # Enable option only for tools build, but not 'user' or 'softmmu'
+       conf_tools() {
+               if [[ ${buildtype} == "tools" ]] ; then
+                       use_enable "$@"
+               else
+                       echo "--disable-${2:-$1}"
+               fi
+       }
        conf_opts+=(
                $(conf_notuser accessibility brlapi)
                $(conf_notuser aio linux-aio)
@@ -480,6 +489,7 @@ qemu_src_configure() {
                $(conf_notuser vde)
                $(conf_notuser vhost-net)
                $(conf_notuser vhost-user-fs)
+               $(conf_tools vhost-user-fs virtiofsd)
                $(conf_notuser virgl virglrenderer)
                $(conf_notuser virtfs)
                $(conf_notuser vnc)

diff --git a/app-emulation/qemu/qemu-9999.ebuild 
b/app-emulation/qemu/qemu-9999.ebuild
index 381e677e530..ac31c2cc447 100644
--- a/app-emulation/qemu/qemu-9999.ebuild
+++ b/app-emulation/qemu/qemu-9999.ebuild
@@ -69,6 +69,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
        qemu_softmmu_targets_riscv64? ( fdt )
        static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins 
!rbd !snappy )
        static-user? ( !plugins )
+       vhost-user-fs? ( caps seccomp )
        virtfs? ( caps xattr )
        vte? ( gtk )
        plugins? ( !static !static-user )
@@ -437,6 +438,14 @@ qemu_src_configure() {
                        echo "--disable-${2:-$1}"
                fi
        }
+       # Enable option only for tools build, but not 'user' or 'softmmu'
+       conf_tools() {
+               if [[ ${buildtype} == "tools" ]] ; then
+                       use_enable "$@"
+               else
+                       echo "--disable-${2:-$1}"
+               fi
+       }
        conf_opts+=(
                $(conf_notuser accessibility brlapi)
                $(conf_notuser aio linux-aio)
@@ -478,6 +487,7 @@ qemu_src_configure() {
                $(conf_notuser vde)
                $(conf_notuser vhost-net)
                $(conf_notuser vhost-user-fs)
+               $(conf_tools vhost-user-fs virtiofsd)
                $(conf_notuser virgl virglrenderer)
                $(conf_notuser virtfs)
                $(conf_notuser vnc)

Reply via email to