mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] libslirp: new package: user-mode networking library used by qemu
@ 2023-03-12 18:53 Roland Hieber
  2023-03-12 18:53 ` [ptxdist] [PATCH 2/2] qemu, host-qemu: re-enable user networking via libslirp Roland Hieber
  2023-03-16 14:31 ` [ptxdist] [APPLIED] libslirp: new package: user-mode networking library used by qemu Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Roland Hieber @ 2023-03-12 18:53 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

The host package will be used for qemu in the next commit.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/host-libslirp.in   |  7 +++++
 rules/host-libslirp.make | 23 ++++++++++++++++
 rules/libslirp.in        | 10 +++++++
 rules/libslirp.make      | 58 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 98 insertions(+)
 create mode 100644 rules/host-libslirp.in
 create mode 100644 rules/host-libslirp.make
 create mode 100644 rules/libslirp.in
 create mode 100644 rules/libslirp.make

diff --git a/rules/host-libslirp.in b/rules/host-libslirp.in
new file mode 100644
index 000000000000..d0a9f211f89a
--- /dev/null
+++ b/rules/host-libslirp.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_LIBSLIRP
+	tristate
+	select HOST_GLIB
+	select HOST_MESON
+	prompt "libslirp"
diff --git a/rules/host-libslirp.make b/rules/host-libslirp.make
new file mode 100644
index 000000000000..de2af49fb9bd
--- /dev/null
+++ b/rules/host-libslirp.make
@@ -0,0 +1,23 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Roland Hieber <rhi@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_LIBSLIRP) += host-libslirp
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# meson
+#
+HOST_LIBSLIRP_CONF_TOOL	:= meson
+
+# vim: syntax=make
diff --git a/rules/libslirp.in b/rules/libslirp.in
new file mode 100644
index 000000000000..a078775a1887
--- /dev/null
+++ b/rules/libslirp.in
@@ -0,0 +1,10 @@
+## SECTION=networking
+
+config LIBSLIRP
+	tristate
+	select HOST_MESON
+	select GLIB
+	prompt "libslirp"
+	help
+	  libslirp is a user-mode networking library used by virtual machines,
+	  containers or various tools, like qemu.
diff --git a/rules/libslirp.make b/rules/libslirp.make
new file mode 100644
index 000000000000..232241da2b96
--- /dev/null
+++ b/rules/libslirp.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Roland Hieber <rhi@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBSLIRP) += libslirp
+
+#
+# Paths and names
+#
+LIBSLIRP_VERSION	:= 4.7.0
+LIBSLIRP_MD5		:= b815c4de99265559caf5ef635a213609
+LIBSLIRP		:= libslirp-v$(LIBSLIRP_VERSION)
+LIBSLIRP_SUFFIX		:= tar.bz2
+LIBSLIRP_URL		:= https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.7.0/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
+LIBSLIRP_SOURCE		:= $(SRCDIR)/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
+LIBSLIRP_DIR		:= $(BUILDDIR)/$(LIBSLIRP)
+LIBSLIRP_LICENSE	:= BSD-3-Clause AND MIT
+LIBSLIRP_LICENSE_FILES	:= \
+	file://src/main.h;endline=4;md5=1e742c49b6e4dd48549742f8727faceb \
+	file://src/slirp.c;endline=24;md5=1e11fddaa17f36215c1697d4bad0e70a \
+	file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# meson
+#
+LIBSLIRP_CONF_TOOL	:= meson
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libslirp.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libslirp)
+	@$(call install_fixup, libslirp,PRIORITY,optional)
+	@$(call install_fixup, libslirp,SECTION,base)
+	@$(call install_fixup, libslirp,AUTHOR,"Roland Hieber <rhi@pengutronix.de>")
+	@$(call install_fixup, libslirp,DESCRIPTION,missing)
+
+	@$(call install_lib, libslirp, 0, 0, 0644, libslirp)
+
+	@$(call install_finish, libslirp)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 2/2] qemu, host-qemu: re-enable user networking via libslirp
  2023-03-12 18:53 [ptxdist] [PATCH 1/2] libslirp: new package: user-mode networking library used by qemu Roland Hieber
@ 2023-03-12 18:53 ` Roland Hieber
  2023-03-16 14:31   ` [ptxdist] [APPLIED] " Michael Olbrich
  2023-03-16 14:31 ` [ptxdist] [APPLIED] libslirp: new package: user-mode networking library used by qemu Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Roland Hieber @ 2023-03-12 18:53 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

In qemu 7.2, the bundled libslirp necessary for user networking was
removed [1], and as such '-netdev user,…' parameters will no longer
work. User networking needs no infrastructure and is therefore nice to
have for ad-hoc virtual machines, so re-enable it by building against
libslirp.

[1]: https://wiki.qemu.org/ChangeLog/7.2#SLIRP_module_(user-mode_networking)

Fixes: e3060a69c0190dfa7131 (2022-12-15, "qemu: Version bump. 7.1.0 -> 7.2.0")
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/host-qemu.in   | 1 +
 rules/host-qemu.make | 1 +
 rules/qemu.in        | 1 +
 rules/qemu.make      | 1 +
 4 files changed, 4 insertions(+)

diff --git a/rules/host-qemu.in b/rules/host-qemu.in
index 1456d1050611..e8fa17e29a1c 100644
--- a/rules/host-qemu.in
+++ b/rules/host-qemu.in
@@ -6,6 +6,7 @@ menuconfig HOST_QEMU
 	prompt "host-side qemu                "
 	select HOST_GLIB
 	select HOST_LIBCAP_NG
+	select HOST_LIBSLIRP
 	select HOST_ZLIB
 	select HOST_SYSTEM_PYTHON3
 	select HOST_LIBUSB	if HOST_QEMU_SYS
diff --git a/rules/host-qemu.make b/rules/host-qemu.make
index 6b0651731f2f..dcbc18df6d16 100644
--- a/rules/host-qemu.make
+++ b/rules/host-qemu.make
@@ -120,6 +120,7 @@ HOST_QEMU_CONF_OPT	:= \
 	--disable-sdl-image \
 	--disable-seccomp \
 	--disable-selinux \
+	--enable-slirp \
 	--disable-smartcard \
 	--disable-snappy \
 	--disable-sparse \
diff --git a/rules/qemu.in b/rules/qemu.in
index 30f1cc2f5989..6524013e6e69 100644
--- a/rules/qemu.in
+++ b/rules/qemu.in
@@ -9,6 +9,7 @@ menuconfig QEMU
 	select GCCLIBS_CXX
 	select GLIB
 	select LIBCAP_NG
+	select LIBSLIRP
 	select ZLIB
 	select SDL2		if QEMU_SDL
 	select GTK		if QEMU_GTK
diff --git a/rules/qemu.make b/rules/qemu.make
index 79be513c666d..813bef742e2c 100644
--- a/rules/qemu.make
+++ b/rules/qemu.make
@@ -118,6 +118,7 @@ QEMU_CONF_OPT	:= \
 	--disable-sdl-image \
 	--disable-seccomp \
 	--disable-selinux \
+	--enable-slirp \
 	--disable-smartcard \
 	--disable-snappy \
 	--disable-sparse \
-- 
2.30.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] libslirp: new package: user-mode networking library used by qemu
  2023-03-12 18:53 [ptxdist] [PATCH 1/2] libslirp: new package: user-mode networking library used by qemu Roland Hieber
  2023-03-12 18:53 ` [ptxdist] [PATCH 2/2] qemu, host-qemu: re-enable user networking via libslirp Roland Hieber
@ 2023-03-16 14:31 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2023-03-16 14:31 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Thanks, applied as 81fbc066ec4975fbfd0faecea733dc72f80a5f1d.

Michael

[sent from post-receive hook]

On Thu, 16 Mar 2023 15:31:32 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> The host package will be used for qemu in the next commit.
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20230312185306.2402677-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/host-libslirp.in b/rules/host-libslirp.in
> new file mode 100644
> index 000000000000..d0a9f211f89a
> --- /dev/null
> +++ b/rules/host-libslirp.in
> @@ -0,0 +1,7 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_LIBSLIRP
> +	tristate
> +	select HOST_GLIB
> +	select HOST_MESON
> +	prompt "libslirp"
> diff --git a/rules/host-libslirp.make b/rules/host-libslirp.make
> new file mode 100644
> index 000000000000..de2af49fb9bd
> --- /dev/null
> +++ b/rules/host-libslirp.make
> @@ -0,0 +1,23 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2023 by Roland Hieber <rhi@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_LIBSLIRP) += host-libslirp
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# meson
> +#
> +HOST_LIBSLIRP_CONF_TOOL	:= meson
> +
> +# vim: syntax=make
> diff --git a/rules/libslirp.in b/rules/libslirp.in
> new file mode 100644
> index 000000000000..a078775a1887
> --- /dev/null
> +++ b/rules/libslirp.in
> @@ -0,0 +1,10 @@
> +## SECTION=networking
> +
> +config LIBSLIRP
> +	tristate
> +	select HOST_MESON
> +	select GLIB
> +	prompt "libslirp"
> +	help
> +	  libslirp is a user-mode networking library used by virtual machines,
> +	  containers or various tools, like qemu.
> diff --git a/rules/libslirp.make b/rules/libslirp.make
> new file mode 100644
> index 000000000000..232241da2b96
> --- /dev/null
> +++ b/rules/libslirp.make
> @@ -0,0 +1,58 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2023 by Roland Hieber <rhi@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBSLIRP) += libslirp
> +
> +#
> +# Paths and names
> +#
> +LIBSLIRP_VERSION	:= 4.7.0
> +LIBSLIRP_MD5		:= b815c4de99265559caf5ef635a213609
> +LIBSLIRP		:= libslirp-v$(LIBSLIRP_VERSION)
> +LIBSLIRP_SUFFIX		:= tar.bz2
> +LIBSLIRP_URL		:= https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.7.0/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
> +LIBSLIRP_SOURCE		:= $(SRCDIR)/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
> +LIBSLIRP_DIR		:= $(BUILDDIR)/$(LIBSLIRP)
> +LIBSLIRP_LICENSE	:= BSD-3-Clause AND MIT
> +LIBSLIRP_LICENSE_FILES	:= \
> +	file://src/main.h;endline=4;md5=1e742c49b6e4dd48549742f8727faceb \
> +	file://src/slirp.c;endline=24;md5=1e11fddaa17f36215c1697d4bad0e70a \
> +	file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# meson
> +#
> +LIBSLIRP_CONF_TOOL	:= meson
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libslirp.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libslirp)
> +	@$(call install_fixup, libslirp,PRIORITY,optional)
> +	@$(call install_fixup, libslirp,SECTION,base)
> +	@$(call install_fixup, libslirp,AUTHOR,"Roland Hieber <rhi@pengutronix.de>")
> +	@$(call install_fixup, libslirp,DESCRIPTION,missing)
> +
> +	@$(call install_lib, libslirp, 0, 0, 0644, libslirp)
> +
> +	@$(call install_finish, libslirp)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] qemu, host-qemu: re-enable user networking via libslirp
  2023-03-12 18:53 ` [ptxdist] [PATCH 2/2] qemu, host-qemu: re-enable user networking via libslirp Roland Hieber
@ 2023-03-16 14:31   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2023-03-16 14:31 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Thanks, applied as 506aa4ff4a97f697fee79c457b928efaae4b8aec.

Michael

[sent from post-receive hook]

On Thu, 16 Mar 2023 15:31:33 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> In qemu 7.2, the bundled libslirp necessary for user networking was
> removed [1], and as such '-netdev user,…' parameters will no longer
> work. User networking needs no infrastructure and is therefore nice to
> have for ad-hoc virtual machines, so re-enable it by building against
> libslirp.
> 
> [1]: https://wiki.qemu.org/ChangeLog/7.2#SLIRP_module_(user-mode_networking)
> 
> Fixes: e3060a69c0190dfa7131 (2022-12-15, "qemu: Version bump. 7.1.0 -> 7.2.0")
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20230312185306.2402677-2-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/host-qemu.in b/rules/host-qemu.in
> index 1456d1050611..e8fa17e29a1c 100644
> --- a/rules/host-qemu.in
> +++ b/rules/host-qemu.in
> @@ -6,6 +6,7 @@ menuconfig HOST_QEMU
>  	prompt "host-side qemu                "
>  	select HOST_GLIB
>  	select HOST_LIBCAP_NG
> +	select HOST_LIBSLIRP
>  	select HOST_ZLIB
>  	select HOST_SYSTEM_PYTHON3
>  	select HOST_LIBUSB	if HOST_QEMU_SYS
> diff --git a/rules/host-qemu.make b/rules/host-qemu.make
> index 6b0651731f2f..dcbc18df6d16 100644
> --- a/rules/host-qemu.make
> +++ b/rules/host-qemu.make
> @@ -120,6 +120,7 @@ HOST_QEMU_CONF_OPT	:= \
>  	--disable-sdl-image \
>  	--disable-seccomp \
>  	--disable-selinux \
> +	--enable-slirp \
>  	--disable-smartcard \
>  	--disable-snappy \
>  	--disable-sparse \
> diff --git a/rules/qemu.in b/rules/qemu.in
> index 30f1cc2f5989..6524013e6e69 100644
> --- a/rules/qemu.in
> +++ b/rules/qemu.in
> @@ -9,6 +9,7 @@ menuconfig QEMU
>  	select GCCLIBS_CXX
>  	select GLIB
>  	select LIBCAP_NG
> +	select LIBSLIRP
>  	select ZLIB
>  	select SDL2		if QEMU_SDL
>  	select GTK		if QEMU_GTK
> diff --git a/rules/qemu.make b/rules/qemu.make
> index 79be513c666d..813bef742e2c 100644
> --- a/rules/qemu.make
> +++ b/rules/qemu.make
> @@ -118,6 +118,7 @@ QEMU_CONF_OPT	:= \
>  	--disable-sdl-image \
>  	--disable-seccomp \
>  	--disable-selinux \
> +	--enable-slirp \
>  	--disable-smartcard \
>  	--disable-snappy \
>  	--disable-sparse \



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-16 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 18:53 [ptxdist] [PATCH 1/2] libslirp: new package: user-mode networking library used by qemu Roland Hieber
2023-03-12 18:53 ` [ptxdist] [PATCH 2/2] qemu, host-qemu: re-enable user networking via libslirp Roland Hieber
2023-03-16 14:31   ` [ptxdist] [APPLIED] " Michael Olbrich
2023-03-16 14:31 ` [ptxdist] [APPLIED] libslirp: new package: user-mode networking library used by qemu Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox