diff mbox series

[v3,10/16] RFC: build-sys: add slirp.wrap

Message ID 20230221124802.4103554-11-marcandre.lureau@redhat.com
State New
Headers show
Series win32: do not mix SOCKET and fd space | expand

Commit Message

Marc-André Lureau Feb. 21, 2023, 12:47 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

This allows to build with --enable-slirp / -D slirp=enabled, even when
libslirp is not installed on the system. Meson will pull it from git in
that case.

RFC because this is very convenient, for a developper targetting
different environments, but might not be considered appropriate, as it
is "a kind of" git submodule (without git submodule integration issues
though, afaik, experience should tell).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 .gitignore             | 2 ++
 subprojects/slirp.wrap | 6 ++++++
 2 files changed, 8 insertions(+)
 create mode 100644 subprojects/slirp.wrap

Comments

Paolo Bonzini Feb. 21, 2023, 2:14 p.m. UTC | #1
On 2/21/23 13:47, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This allows to build with --enable-slirp / -D slirp=enabled, even when
> libslirp is not installed on the system. Meson will pull it from git in
> that case.
> 
> RFC because this is very convenient, for a developper targetting
> different environments, but might not be considered appropriate, as it
> is "a kind of" git submodule (without git submodule integration issues
> though, afaik, experience should tell).
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

I have no objections to using wraps for slirp and especially libfdt 
(though the latter is not yet part of wrapdb).

However, right now meson will do network access without respecting 
--with-git-submodule= or something like that, i.e. with no way to avoid 
the fallback.

As a start, configure could hardcode --wrap-mode=nodownload, so that 
wraps would be used only after a conscious decision of the user to use 
"meson subprojects download".

Paolo

> ---
>   .gitignore             | 2 ++
>   subprojects/slirp.wrap | 6 ++++++
>   2 files changed, 8 insertions(+)
>   create mode 100644 subprojects/slirp.wrap
> 
> diff --git a/.gitignore b/.gitignore
> index 61fa39967b..1ea59f4819 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -20,3 +20,5 @@ GTAGS
>   *.swp
>   *.patch
>   *.gcov
> +
> +/subprojects/slirp
> diff --git a/subprojects/slirp.wrap b/subprojects/slirp.wrap
> new file mode 100644
> index 0000000000..87cdd8dcd8
> --- /dev/null
> +++ b/subprojects/slirp.wrap
> @@ -0,0 +1,6 @@
> +[wrap-git]
> +url = https://gitlab.freedesktop.org/slirp/libslirp
> +revision = 15c52d69
> +
> +[provide]
> +slirp = libslirp_dep
diff mbox series

Patch

diff --git a/.gitignore b/.gitignore
index 61fa39967b..1ea59f4819 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@  GTAGS
 *.swp
 *.patch
 *.gcov
+
+/subprojects/slirp
diff --git a/subprojects/slirp.wrap b/subprojects/slirp.wrap
new file mode 100644
index 0000000000..87cdd8dcd8
--- /dev/null
+++ b/subprojects/slirp.wrap
@@ -0,0 +1,6 @@ 
+[wrap-git]
+url = https://gitlab.freedesktop.org/slirp/libslirp
+revision = 15c52d69
+
+[provide]
+slirp = libslirp_dep