qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Update libslirp & make it a subproject
@ 2021-01-25  7:34 marcandre.lureau
  2021-01-25  7:34 ` [PATCH v2 1/2] slirp: update to git master marcandre.lureau
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: marcandre.lureau @ 2021-01-25  7:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: samuel.thibault, j, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Here is a few patches to update libslirp to git upstream.
Since it now supports meson subproject(), adapt the build
system to use it, and related fixes.

v2:
 - fix unused variables on macos
 - fork_exec_child_setup: improve signal handling

Marc-André Lureau (2):
  slirp: update to git master
  build-sys: make libslirp a meson subproject

 configure            |  2 +-
 meson.build          | 62 +++-----------------------------------------
 .gitmodules          |  4 +--
 slirp                |  1 -
 subprojects/libslirp |  1 +
 5 files changed, 8 insertions(+), 62 deletions(-)
 delete mode 160000 slirp
 create mode 160000 subprojects/libslirp

-- 
2.29.0




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

* [PATCH v2 1/2] slirp: update to git master
  2021-01-25  7:34 [PATCH v2 0/2] Update libslirp & make it a subproject marcandre.lureau
@ 2021-01-25  7:34 ` marcandre.lureau
  2021-03-08  6:42   ` Joelle van Dyne
  2021-01-25  7:34 ` [PATCH v2 2/2] build-sys: make libslirp a meson subproject marcandre.lureau
  2021-03-08 10:02 ` [PATCH v2 0/2] Update libslirp & make it a subproject Philippe Mathieu-Daudé
  2 siblings, 1 reply; 8+ messages in thread
From: marcandre.lureau @ 2021-01-25  7:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: samuel.thibault, j, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

git cherry-diff:

Commits on bacb71f1c3ed5f40e393afd8be81bedfba13a401 branch that is not on 8f43a99191afb47ca3f3c6972f6306209f367ece branch
+ 1021b0dc38d39f1dc95a296fe3e05a24a087cdc6 disable_dns option
+ 0f94ceec752592e4ac632a24e3c64a97dd09bf4c limit vnameserver_addr to port 53
+ b57bafa852ef16b133907a13678ec69e9531f177 libslirp.h: fix SlirpConfig v3 documentation
+ 1abf18b2b5edb462797629ed47ad4515a195686e Update CHANGELOG
+ ff4ecf9b6c6542b24b4ac6ea178be9d44e159f79 Release v4.3.0
+ 21f1d933050a40d62612c6274c32de60b811d9ea changelog: post-release
+ 376187c4b14c795763d472214812826eebe7e9c2 Release v4.3.1
+ 73336e08902a7e826f7d960453df037380266186 changelog: post-release
+ 5c1c9d43be61571608e9b14615045b67b830daf5 udp, udp6, icmp: handle TTL value
+ 73ed49ab71998d4288e71e954ef6214b70f23d79 icmp, icmp6: Add icmp_forward_error and icmp6_forward_error
+ 7a4840a57ec7dbc37cca1ab96f058a9610b26950 udp, udp6, icmp, icmp6: Enable forwarding errors on Linux
+ e9b2bc19ae652a2907f247e621b2e4773bdd2aab TCPIPHDR_DELTA: Fix potential negative value
+ 39f9a363eec082f04513413046321abd04163148 .gitlab-ci: add a Coverity stage
+ 1b0093b973cfa0dc041522e5d4e6f576b2df642e sosendoob: better document what urgc is used for
+ 5b9ad89ebbb8afa50162c9156fabd5fc56291088 Add G_GNUC_PRINTF to local function slirp_vsnprintf
+ 8a808aa493980e212b4d5f5465330905c8294e59 meson: remove meson-dist script
+ 0b669b5fbe4d3c25a682a67f1059d8633c963b3d meson: support compiling as subproject
+ 9f82a47b81f2864422b82c1e40e51a2ed9c6ac32 Add DNS resolving for iOS
+ c0eac03e8ce1b9a743231f2fe21e7cb579fc9339 Remove the QEMU-special make build-system
+ 1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80 socket: consume empty packets
+ 92413be68914f8cae2f5bad4bf3ab8491dcbc5d7 Release v4.4.0
+ 07e8cfac69766081871ab620d9f16a630543d302 changelog: post-release
+ 4c4e035813313d02b63fdeb920d56fb2fdc0a5b1 Remove some needless (void)casts
+ eee9db9d115d91aa82f33685c4e76d656db92976 fork_exec_child_setup: improve signal handling
+ 216f434a018b3af182a4f31bbe5a00daee170343 Fix unused variables

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 slirp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/slirp b/slirp
index 8f43a99191..5dce846e3e 160000
--- a/slirp
+++ b/slirp
@@ -1 +1 @@
-Subproject commit 8f43a99191afb47ca3f3c6972f6306209f367ece
+Subproject commit 5dce846e3ee82d93462bc637bb0db2fd49f0fc5a
-- 
2.29.0



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

* [PATCH v2 2/2] build-sys: make libslirp a meson subproject
  2021-01-25  7:34 [PATCH v2 0/2] Update libslirp & make it a subproject marcandre.lureau
  2021-01-25  7:34 ` [PATCH v2 1/2] slirp: update to git master marcandre.lureau
@ 2021-01-25  7:34 ` marcandre.lureau
  2021-03-08  6:42   ` Joelle van Dyne
  2021-03-08 10:02 ` [PATCH v2 0/2] Update libslirp & make it a subproject Philippe Mathieu-Daudé
  2 siblings, 1 reply; 8+ messages in thread
From: marcandre.lureau @ 2021-01-25  7:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: samuel.thibault, j, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Remove the manual build.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure                     |  2 +-
 meson.build                   | 62 +++--------------------------------
 .gitmodules                   |  4 +--
 slirp => subprojects/libslirp |  0
 4 files changed, 7 insertions(+), 61 deletions(-)
 rename slirp => subprojects/libslirp (100%)

diff --git a/configure b/configure
index dcc5ea7d63..6c98552452 100755
--- a/configure
+++ b/configure
@@ -5206,7 +5206,7 @@ case "$slirp" in
   auto | enabled | internal)
     # Simpler to always update submodule, even if not needed.
     if test -e "${source_path}/.git" && test $git_update = 'yes' ; then
-      git_submodules="${git_submodules} slirp"
+      git_submodules="${git_submodules} subprojects/libslirp"
     fi
     ;;
 esac
diff --git a/meson.build b/meson.build
index 35a9eddf5c..95ef1c8adf 100644
--- a/meson.build
+++ b/meson.build
@@ -1472,7 +1472,7 @@ slirp_opt = 'disabled'
 if have_system
   slirp_opt = get_option('slirp')
   if slirp_opt in ['enabled', 'auto', 'system']
-    have_internal = fs.exists(meson.current_source_dir() / 'slirp/meson.build')
+    have_internal = fs.exists(meson.current_source_dir() / 'subprojects/libslirp/meson.build')
     slirp = dependency('slirp', static: enable_static,
                        method: 'pkg-config',
                        required: slirp_opt == 'system' or
@@ -1486,63 +1486,9 @@ if have_system
     endif
   endif
   if slirp_opt == 'internal'
-    slirp_deps = []
-    if targetos == 'windows'
-      slirp_deps = cc.find_library('iphlpapi')
-    endif
-    slirp_conf = configuration_data()
-    slirp_conf.set('SLIRP_MAJOR_VERSION', meson.project_version().split('.')[0])
-    slirp_conf.set('SLIRP_MINOR_VERSION', meson.project_version().split('.')[1])
-    slirp_conf.set('SLIRP_MICRO_VERSION', meson.project_version().split('.')[2])
-    slirp_conf.set_quoted('SLIRP_VERSION_STRING', meson.project_version())
-    slirp_cargs = ['-DG_LOG_DOMAIN="Slirp"']
-    slirp_files = [
-      'slirp/src/arp_table.c',
-      'slirp/src/bootp.c',
-      'slirp/src/cksum.c',
-      'slirp/src/dhcpv6.c',
-      'slirp/src/dnssearch.c',
-      'slirp/src/if.c',
-      'slirp/src/ip6_icmp.c',
-      'slirp/src/ip6_input.c',
-      'slirp/src/ip6_output.c',
-      'slirp/src/ip_icmp.c',
-      'slirp/src/ip_input.c',
-      'slirp/src/ip_output.c',
-      'slirp/src/mbuf.c',
-      'slirp/src/misc.c',
-      'slirp/src/ncsi.c',
-      'slirp/src/ndp_table.c',
-      'slirp/src/sbuf.c',
-      'slirp/src/slirp.c',
-      'slirp/src/socket.c',
-      'slirp/src/state.c',
-      'slirp/src/stream.c',
-      'slirp/src/tcp_input.c',
-      'slirp/src/tcp_output.c',
-      'slirp/src/tcp_subr.c',
-      'slirp/src/tcp_timer.c',
-      'slirp/src/tftp.c',
-      'slirp/src/udp.c',
-      'slirp/src/udp6.c',
-      'slirp/src/util.c',
-      'slirp/src/version.c',
-      'slirp/src/vmstate.c',
-    ]
-
-    configure_file(
-      input : 'slirp/src/libslirp-version.h.in',
-      output : 'libslirp-version.h',
-      configuration: slirp_conf)
-
-    slirp_inc = include_directories('slirp', 'slirp/src')
-    libslirp = static_library('slirp',
-                              sources: slirp_files,
-                              c_args: slirp_cargs,
-                              include_directories: slirp_inc)
-    slirp = declare_dependency(link_with: libslirp,
-                               dependencies: slirp_deps,
-                               include_directories: slirp_inc)
+    libslirp = subproject('libslirp',
+                          default_options: ['default_library=static'])
+    slirp = libslirp.get_variable('libslirp_dep')
   endif
 endif
 
diff --git a/.gitmodules b/.gitmodules
index 2bdeeacef8..0fb15efacd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -49,8 +49,8 @@
 [submodule "roms/edk2"]
 	path = roms/edk2
 	url = https://git.qemu.org/git/edk2.git
-[submodule "slirp"]
-	path = slirp
+[submodule "subprojects/libslirp"]
+	path = subprojects/libslirp
 	url = https://git.qemu.org/git/libslirp.git
 [submodule "roms/opensbi"]
 	path = roms/opensbi
diff --git a/slirp b/subprojects/libslirp
similarity index 100%
rename from slirp
rename to subprojects/libslirp
-- 
2.29.0



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

* Re: [PATCH v2 1/2] slirp: update to git master
  2021-01-25  7:34 ` [PATCH v2 1/2] slirp: update to git master marcandre.lureau
@ 2021-03-08  6:42   ` Joelle van Dyne
  0 siblings, 0 replies; 8+ messages in thread
From: Joelle van Dyne @ 2021-03-08  6:42 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: Samuel Thibault, Joelle van Dyne, QEMU Developers, Paolo Bonzini

On Sun, Jan 24, 2021 at 11:34 PM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> git cherry-diff:
>
> Commits on bacb71f1c3ed5f40e393afd8be81bedfba13a401 branch that is not on 8f43a99191afb47ca3f3c6972f6306209f367ece branch
> + 1021b0dc38d39f1dc95a296fe3e05a24a087cdc6 disable_dns option
> + 0f94ceec752592e4ac632a24e3c64a97dd09bf4c limit vnameserver_addr to port 53
> + b57bafa852ef16b133907a13678ec69e9531f177 libslirp.h: fix SlirpConfig v3 documentation
> + 1abf18b2b5edb462797629ed47ad4515a195686e Update CHANGELOG
> + ff4ecf9b6c6542b24b4ac6ea178be9d44e159f79 Release v4.3.0
> + 21f1d933050a40d62612c6274c32de60b811d9ea changelog: post-release
> + 376187c4b14c795763d472214812826eebe7e9c2 Release v4.3.1
> + 73336e08902a7e826f7d960453df037380266186 changelog: post-release
> + 5c1c9d43be61571608e9b14615045b67b830daf5 udp, udp6, icmp: handle TTL value
> + 73ed49ab71998d4288e71e954ef6214b70f23d79 icmp, icmp6: Add icmp_forward_error and icmp6_forward_error
> + 7a4840a57ec7dbc37cca1ab96f058a9610b26950 udp, udp6, icmp, icmp6: Enable forwarding errors on Linux
> + e9b2bc19ae652a2907f247e621b2e4773bdd2aab TCPIPHDR_DELTA: Fix potential negative value
> + 39f9a363eec082f04513413046321abd04163148 .gitlab-ci: add a Coverity stage
> + 1b0093b973cfa0dc041522e5d4e6f576b2df642e sosendoob: better document what urgc is used for
> + 5b9ad89ebbb8afa50162c9156fabd5fc56291088 Add G_GNUC_PRINTF to local function slirp_vsnprintf
> + 8a808aa493980e212b4d5f5465330905c8294e59 meson: remove meson-dist script
> + 0b669b5fbe4d3c25a682a67f1059d8633c963b3d meson: support compiling as subproject
> + 9f82a47b81f2864422b82c1e40e51a2ed9c6ac32 Add DNS resolving for iOS
> + c0eac03e8ce1b9a743231f2fe21e7cb579fc9339 Remove the QEMU-special make build-system
> + 1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80 socket: consume empty packets
> + 92413be68914f8cae2f5bad4bf3ab8491dcbc5d7 Release v4.4.0
> + 07e8cfac69766081871ab620d9f16a630543d302 changelog: post-release
> + 4c4e035813313d02b63fdeb920d56fb2fdc0a5b1 Remove some needless (void)casts
> + eee9db9d115d91aa82f33685c4e76d656db92976 fork_exec_child_setup: improve signal handling
> + 216f434a018b3af182a4f31bbe5a00daee170343 Fix unused variables
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Tested-by: Joelle van Dyne <j@getutm.app>


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

* Re: [PATCH v2 2/2] build-sys: make libslirp a meson subproject
  2021-01-25  7:34 ` [PATCH v2 2/2] build-sys: make libslirp a meson subproject marcandre.lureau
@ 2021-03-08  6:42   ` Joelle van Dyne
  0 siblings, 0 replies; 8+ messages in thread
From: Joelle van Dyne @ 2021-03-08  6:42 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: Samuel Thibault, Joelle van Dyne, QEMU Developers, Paolo Bonzini

On Sun, Jan 24, 2021 at 11:34 PM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Remove the manual build.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Tested-by: Joelle van Dyne <j@getutm.app>


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

* Re: [PATCH v2 0/2] Update libslirp & make it a subproject
  2021-01-25  7:34 [PATCH v2 0/2] Update libslirp & make it a subproject marcandre.lureau
  2021-01-25  7:34 ` [PATCH v2 1/2] slirp: update to git master marcandre.lureau
  2021-01-25  7:34 ` [PATCH v2 2/2] build-sys: make libslirp a meson subproject marcandre.lureau
@ 2021-03-08 10:02 ` Philippe Mathieu-Daudé
  2021-03-08 10:23   ` Marc-André Lureau
  2 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-08 10:02 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: samuel.thibault, j, pbonzini

Hi Marc-André,

On 1/25/21 8:34 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Hi,
> 
> Here is a few patches to update libslirp to git upstream.
> Since it now supports meson subproject(), adapt the build
> system to use it, and related fixes.
> 
> v2:
>  - fix unused variables on macos
>  - fork_exec_child_setup: improve signal handling
> 
> Marc-André Lureau (2):
>   slirp: update to git master
>   build-sys: make libslirp a meson subproject
> 
>  configure            |  2 +-
>  meson.build          | 62 +++-----------------------------------------
>  .gitmodules          |  4 +--
>  slirp                |  1 -
>  subprojects/libslirp |  1 +
>  5 files changed, 8 insertions(+), 62 deletions(-)
>  delete mode 160000 slirp
>  create mode 160000 subprojects/libslirp

Just out of curiosity, why "subprojects"? Should we move
other submodules there (meson, dtc, keycodemapdb)?



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

* Re: [PATCH v2 0/2] Update libslirp & make it a subproject
  2021-03-08 10:02 ` [PATCH v2 0/2] Update libslirp & make it a subproject Philippe Mathieu-Daudé
@ 2021-03-08 10:23   ` Marc-André Lureau
  2021-03-08 11:34     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 8+ messages in thread
From: Marc-André Lureau @ 2021-03-08 10:23 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Samuel Thibault, Paolo Bonzini, QEMU, Joelle van Dyne

[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]

Hi

On Mon, Mar 8, 2021 at 2:03 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Hi Marc-André,
>
> On 1/25/21 8:34 AM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Hi,
> >
> > Here is a few patches to update libslirp to git upstream.
> > Since it now supports meson subproject(), adapt the build
> > system to use it, and related fixes.
> >
> > v2:
> >  - fix unused variables on macos
> >  - fork_exec_child_setup: improve signal handling
> >
> > Marc-André Lureau (2):
> >   slirp: update to git master
> >   build-sys: make libslirp a meson subproject
> >
> >  configure            |  2 +-
> >  meson.build          | 62 +++-----------------------------------------
> >  .gitmodules          |  4 +--
> >  slirp                |  1 -
> >  subprojects/libslirp |  1 +
> >  5 files changed, 8 insertions(+), 62 deletions(-)
> >  delete mode 160000 slirp
> >  create mode 160000 subprojects/libslirp
>
> Just out of curiosity, why "subprojects"? Should we move
> other submodules there (meson, dtc, keycodemapdb)?
>

It's required when you use meson subproject() :
https://mesonbuild.com/Subprojects.html#why-must-all-subprojects-be-inside-a-single-directory

(btw, the patch series has conflicts with the current git, I'll send a v3)

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2223 bytes --]

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

* Re: [PATCH v2 0/2] Update libslirp & make it a subproject
  2021-03-08 10:23   ` Marc-André Lureau
@ 2021-03-08 11:34     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-08 11:34 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Samuel Thibault, Paolo Bonzini, QEMU, Joelle van Dyne

On 3/8/21 11:23 AM, Marc-André Lureau wrote:
> Hi
> 
> On Mon, Mar 8, 2021 at 2:03 PM Philippe Mathieu-Daudé <philmd@redhat.com
> <mailto:philmd@redhat.com>> wrote:
> 
>     Hi Marc-André,
> 
>     On 1/25/21 8:34 AM, marcandre.lureau@redhat.com
>     <mailto:marcandre.lureau@redhat.com> wrote:
>     > From: Marc-André Lureau <marcandre.lureau@redhat.com
>     <mailto:marcandre.lureau@redhat.com>>
>     >
>     > Hi,
>     >
>     > Here is a few patches to update libslirp to git upstream.
>     > Since it now supports meson subproject(), adapt the build
>     > system to use it, and related fixes.
>     >
>     > v2:
>     >  - fix unused variables on macos
>     >  - fork_exec_child_setup: improve signal handling
>     >
>     > Marc-André Lureau (2):
>     >   slirp: update to git master
>     >   build-sys: make libslirp a meson subproject
>     >
>     >  configure            |  2 +-
>     >  meson.build          | 62
>     +++-----------------------------------------
>     >  .gitmodules          |  4 +--
>     >  slirp                |  1 -
>     >  subprojects/libslirp |  1 +
>     >  5 files changed, 8 insertions(+), 62 deletions(-)
>     >  delete mode 160000 slirp
>     >  create mode 160000 subprojects/libslirp
> 
>     Just out of curiosity, why "subprojects"? Should we move
>     other submodules there (meson, dtc, keycodemapdb)?
> 
> 
> It's required when you use meson subproject() :
> https://mesonbuild.com/Subprojects.html#why-must-all-subprojects-be-inside-a-single-directory
> <https://mesonbuild.com/Subprojects.html#why-must-all-subprojects-be-inside-a-single-directory>

Oh interesting. As this link is relevant information, can you amend
it to patch #2 description please?

> 
> 
> (btw, the patch series has conflicts with the current git, I'll send a v3)
> 
> -- 
> Marc-André Lureau



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

end of thread, other threads:[~2021-03-08 11:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-25  7:34 [PATCH v2 0/2] Update libslirp & make it a subproject marcandre.lureau
2021-01-25  7:34 ` [PATCH v2 1/2] slirp: update to git master marcandre.lureau
2021-03-08  6:42   ` Joelle van Dyne
2021-01-25  7:34 ` [PATCH v2 2/2] build-sys: make libslirp a meson subproject marcandre.lureau
2021-03-08  6:42   ` Joelle van Dyne
2021-03-08 10:02 ` [PATCH v2 0/2] Update libslirp & make it a subproject Philippe Mathieu-Daudé
2021-03-08 10:23   ` Marc-André Lureau
2021-03-08 11:34     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).