[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/4] Don't require libcap-ng for virtfs support
|
From: |
Christian Schoenebeck |
|
Subject: |
[PULL 1/4] Don't require libcap-ng for virtfs support |
|
Date: |
Tue, 16 May 2023 17:21:04 +0200 |
From: Peter Foley <pefoley@google.com>
It's only required for the proxy helper.
Add a new option for the proxy helper rather than enabling it
implicitly.
Change-Id: I95b73fca625529e99d16b0a64e01c65c0c1d43f2
Signed-off-by: Peter Foley <pefoley@google.com>
Message-Id: <20230503130757.863824-1-pefoley@google.com>
[C.S.: - Resolve merge conflict. ]
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
meson.build | 12 +++++++++---
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 4 ++++
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 25a4b9f2c1..c6b05149e9 100644
--- a/meson.build
+++ b/meson.build
@@ -1766,12 +1766,17 @@ have_virtfs = get_option('virtfs') \
error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
.require(targetos == 'linux' or cc.has_function('pthread_fchdir_np'),
error_message: 'virtio-9p (virtfs) on macOS requires the presence
of pthread_fchdir_np') \
- .require(targetos == 'darwin' or (libattr.found() and libcap_ng.found()),
- error_message: 'virtio-9p (virtfs) on Linux requires
libcap-ng-devel and libattr-devel') \
+ .require(targetos == 'darwin' or libattr.found(),
+ error_message: 'virtio-9p (virtfs) on Linux requires
libattr-devel') \
.disable_auto_if(not have_tools and not have_system) \
.allowed()
-have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools
+have_virtfs_proxy_helper = get_option('virtfs_proxy_helper') \
+ .require(targetos != 'darwin', error_message: 'the virtfs proxy helper is
incompatible with macOS') \
+ .require(have_virtfs, error_message: 'the virtfs proxy helper requires
that virtfs is enabled') \
+ .disable_auto_if(not have_tools) \
+ .require(libcap_ng.found(), error_message: 'the virtfs proxy helper
requires libcap-ng') \
+ .allowed()
if get_option('block_drv_ro_whitelist') == ''
config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '')
@@ -3926,6 +3931,7 @@ if have_block
summary_info += {'Block whitelist (ro)':
get_option('block_drv_ro_whitelist')}
summary_info += {'Use block whitelist in tools':
get_option('block_drv_whitelist_in_tools')}
summary_info += {'VirtFS support': have_virtfs}
+ summary_info += {'VirtFS Proxy Helper support': have_virtfs_proxy_helper}
summary_info += {'Live block migration':
config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')}
summary_info += {'replication support':
config_host_data.get('CONFIG_REPLICATION')}
summary_info += {'bochs support': get_option('bochs').allowed()}
diff --git a/meson_options.txt b/meson_options.txt
index d8330a1f71..11aec2a441 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -274,6 +274,8 @@ option('vhost_user_blk_server', type: 'feature', value:
'auto',
description: 'build vhost-user-blk server')
option('virtfs', type: 'feature', value: 'auto',
description: 'virtio-9p support')
+option('virtfs_proxy_helper', type: 'feature', value: 'auto',
+ description: 'virtio-9p proxy helper support')
option('libvduse', type: 'feature', value: 'auto',
description: 'build VDUSE Library')
option('vduse_blk_export', type: 'feature', value: 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 2805d1c145..52fb079a60 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -181,6 +181,8 @@ meson_options_help() {
printf "%s\n" ' vhost-vdpa vhost-vdpa kernel backend support'
printf "%s\n" ' virglrenderer virgl rendering support'
printf "%s\n" ' virtfs virtio-9p support'
+ printf "%s\n" ' virtfs-proxy-helper'
+ printf "%s\n" ' virtio-9p proxy helper support'
printf "%s\n" ' vmdk vmdk image format support'
printf "%s\n" ' vmnet vmnet.framework network backend support'
printf "%s\n" ' vnc VNC server'
@@ -474,6 +476,8 @@ _meson_option_parse() {
--disable-virglrenderer) printf "%s" -Dvirglrenderer=disabled ;;
--enable-virtfs) printf "%s" -Dvirtfs=enabled ;;
--disable-virtfs) printf "%s" -Dvirtfs=disabled ;;
+ --enable-virtfs-proxy-helper) printf "%s" -Dvirtfs_proxy_helper=enabled ;;
+ --disable-virtfs-proxy-helper) printf "%s" -Dvirtfs_proxy_helper=disabled
;;
--enable-vmdk) printf "%s" -Dvmdk=enabled ;;
--disable-vmdk) printf "%s" -Dvmdk=disabled ;;
--enable-vmnet) printf "%s" -Dvmnet=enabled ;;
--
2.30.2
- [PULL 0/4] 9p queue 2023-05-16, Christian Schoenebeck, 2023/05/16
- [PULL 4/4] configure: make clear that VirtFS is 9p, Christian Schoenebeck, 2023/05/16
- [PULL 1/4] Don't require libcap-ng for virtfs support,
Christian Schoenebeck <=
- [PULL 2/4] tests/9p: fix potential leak in v9fs_rreaddir(), Christian Schoenebeck, 2023/05/16
- [PULL 3/4] 9pfs/xen: Fix segfault on shutdown, Christian Schoenebeck, 2023/05/16
- Re: [PULL 0/4] 9p queue 2023-05-16, Richard Henderson, 2023/05/16
- Re: [PULL 0/4] 9p queue 2023-05-16, Richard Henderson, 2023/05/16