diff mbox series

[05/10] slirp: update for iOS resolv fix

Message ID 20201012232939.48481-6-j@getutm.app
State New
Headers show
Series iOS and Apple Silicon host support | expand

Commit Message

Joelle van Dyne Oct. 12, 2020, 11:29 p.m. UTC
From: osy <osy86@users.noreply.github.com>

We cannot access /etc/resolv.conf on iOS so libslirp is modified to use
libresolv instead.

Signed-off-by: Joelle van Dyne <j@getutm.app>
---
 .gitmodules | 2 +-
 meson.build | 2 ++
 slirp       | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 13, 2020, 1:32 p.m. UTC | #1
On 10/13/20 1:29 AM, Joelle van Dyne wrote:
> From: osy <osy86@users.noreply.github.com>

> 

> We cannot access /etc/resolv.conf on iOS so libslirp is modified to use

> libresolv instead.

> 

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

> ---

>   .gitmodules | 2 +-

>   meson.build | 2 ++

>   slirp       | 2 +-

>   3 files changed, 4 insertions(+), 2 deletions(-)

> 

> diff --git a/.gitmodules b/.gitmodules

> index 2bdeeacef8..f23e859210 100644

> --- a/.gitmodules

> +++ b/.gitmodules

> @@ -51,7 +51,7 @@

>   	url = https://git.qemu.org/git/edk2.git

>   [submodule "slirp"]

>   	path = slirp

> -	url = https://git.qemu.org/git/libslirp.git

> +	url = https://github.com/utmapp/libslirp.git


NAck.

You can not take over the SLiRP project submodule that way.

I suggest getting your SLiRP changes merged with mainstream
instead, see:
https://gitlab.freedesktop.org/slirp/libslirp#contributing

>   [submodule "roms/opensbi"]

>   	path = roms/opensbi

>   	url = 	https://git.qemu.org/git/opensbi.git

> diff --git a/meson.build b/meson.build

> index 32cf08619f..da96e296e0 100644

> --- a/meson.build

> +++ b/meson.build

> @@ -996,6 +996,8 @@ if have_system

>       slirp_deps = []

>       if targetos == 'windows'

>         slirp_deps = cc.find_library('iphlpapi')

> +    elif targetos == 'darwin'

> +      slirp_deps = cc.find_library('resolv')

>       endif

>       slirp_conf = configuration_data()

>       slirp_conf.set('SLIRP_MAJOR_VERSION', meson.project_version().split('.')[0])

> diff --git a/slirp b/slirp

> index ce94eba204..452c389d82 160000

> --- a/slirp

> +++ b/slirp

> @@ -1 +1 @@

> -Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275

> +Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e
Marc-André Lureau Oct. 13, 2020, 2:38 p.m. UTC | #2
Hi

On Tue, Oct 13, 2020 at 5:34 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 10/13/20 1:29 AM, Joelle van Dyne wrote:
> > From: osy <osy86@users.noreply.github.com>
> >
> > We cannot access /etc/resolv.conf on iOS so libslirp is modified to use
> > libresolv instead.
> >
> > Signed-off-by: Joelle van Dyne <j@getutm.app>
> > ---
> >   .gitmodules | 2 +-
> >   meson.build | 2 ++
> >   slirp       | 2 +-
> >   3 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/.gitmodules b/.gitmodules
> > index 2bdeeacef8..f23e859210 100644
> > --- a/.gitmodules
> > +++ b/.gitmodules
> > @@ -51,7 +51,7 @@
> >       url = https://git.qemu.org/git/edk2.git
> >   [submodule "slirp"]
> >       path = slirp
> > -     url = https://git.qemu.org/git/libslirp.git
> > +     url = https://github.com/utmapp/libslirp.git
>
> NAck.
>
> You can not take over the SLiRP project submodule that way.
>
> I suggest getting your SLiRP changes merged with mainstream
> instead, see:
> https://gitlab.freedesktop.org/slirp/libslirp#contributing
>
>
I think he did:
https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54

Btw, I also noticed the coroutine library submodule proposed in this series
is a fork from the original library. Not sure what the upstream status is
and whether this is fine.

>   [submodule "roms/opensbi"]
> >       path = roms/opensbi
> >       url =   https://git.qemu.org/git/opensbi.git
> > diff --git a/meson.build b/meson.build
> > index 32cf08619f..da96e296e0 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -996,6 +996,8 @@ if have_system
> >       slirp_deps = []
> >       if targetos == 'windows'
> >         slirp_deps = cc.find_library('iphlpapi')
> > +    elif targetos == 'darwin'
> > +      slirp_deps = cc.find_library('resolv')
> >       endif
> >       slirp_conf = configuration_data()
> >       slirp_conf.set('SLIRP_MAJOR_VERSION',
> meson.project_version().split('.')[0])
> > diff --git a/slirp b/slirp
> > index ce94eba204..452c389d82 160000
> > --- a/slirp
> > +++ b/slirp
> > @@ -1 +1 @@
> > -Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275
> > +Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e
>
>
>
Philippe Mathieu-Daudé Oct. 13, 2020, 2:59 p.m. UTC | #3
On 10/13/20 4:38 PM, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Oct 13, 2020 at 5:34 PM Philippe Mathieu-Daudé 
> <philmd@redhat.com <mailto:philmd@redhat.com>> wrote:
> 
>     On 10/13/20 1:29 AM, Joelle van Dyne wrote:
>      > From: osy <osy86@users.noreply.github.com
>     <mailto:osy86@users.noreply.github.com>>
>      >
>      > We cannot access /etc/resolv.conf on iOS so libslirp is modified
>     to use
>      > libresolv instead.
>      >
>      > Signed-off-by: Joelle van Dyne <j@getutm.app>
>      > ---
>      >   .gitmodules | 2 +-
>      >   meson.build | 2 ++
>      >   slirp       | 2 +-
>      >   3 files changed, 4 insertions(+), 2 deletions(-)
>      >
>      > diff --git a/.gitmodules b/.gitmodules
>      > index 2bdeeacef8..f23e859210 100644
>      > --- a/.gitmodules
>      > +++ b/.gitmodules
>      > @@ -51,7 +51,7 @@
>      >       url = https://git.qemu.org/git/edk2.git
>     <https://git.qemu.org/git/edk2.git>
>      >   [submodule "slirp"]
>      >       path = slirp
>      > -     url = https://git.qemu.org/git/libslirp.git
>     <https://git.qemu.org/git/libslirp.git>
>      > +     url = https://github.com/utmapp/libslirp.git
>     <https://github.com/utmapp/libslirp.git>
> 
>     NAck.
> 
>     You can not take over the SLiRP project submodule that way.
> 
>     I suggest getting your SLiRP changes merged with mainstream
>     instead, see:
>     https://gitlab.freedesktop.org/slirp/libslirp#contributing
>     <https://gitlab.freedesktop.org/slirp/libslirp#contributing>
> 
> 
> I think he did: 
> https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54 
> <https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54>

I am being wary because the series is not posted as RFC.

But from the cover it looks like a RFC series:

* slirp updated to support DNS resolving using libresolv; a separate
   patch will be submitted to the project. To allow for builds to
   succeed, the .gitmodule is temporarily changed. We're not entirely
   sure how cross-project patches should be handled here.

> 
> Btw, I also noticed the coroutine library submodule proposed in this 
> series is a fork from the original library. Not sure what the upstream 
> status is and whether this is fine.
> 
>      >   [submodule "roms/opensbi"]
>      >       path = roms/opensbi
>      >       url = https://git.qemu.org/git/opensbi.git
>     <https://git.qemu.org/git/opensbi.git>
>      > diff --git a/meson.build b/meson.build
>      > index 32cf08619f..da96e296e0 100644
>      > --- a/meson.build
>      > +++ b/meson.build
>      > @@ -996,6 +996,8 @@ if have_system
>      >       slirp_deps = []
>      >       if targetos == 'windows'
>      >         slirp_deps = cc.find_library('iphlpapi')
>      > +    elif targetos == 'darwin'
>      > +      slirp_deps = cc.find_library('resolv')
>      >       endif
>      >       slirp_conf = configuration_data()
>      >       slirp_conf.set('SLIRP_MAJOR_VERSION',
>     meson.project_version().split('.')[0])
>      > diff --git a/slirp b/slirp
>      > index ce94eba204..452c389d82 160000
>      > --- a/slirp
>      > +++ b/slirp
>      > @@ -1 +1 @@
>      > -Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275
>      > +Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e
> 
> 
> 
> 
> -- 
> Marc-André Lureau
Joelle van Dyne Oct. 14, 2020, 3:54 p.m. UTC | #4
Sorry, I was not aware of the rules for RFC. I will remove this one from
the v2 patch set. If and when the libslirp changes are in, what are the
procedures for sending the QEMU side changes?

-j

On Tue, Oct 13, 2020 at 7:59 AM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 10/13/20 4:38 PM, Marc-André Lureau wrote:
> > Hi
> >
> > On Tue, Oct 13, 2020 at 5:34 PM Philippe Mathieu-Daudé
> > <philmd@redhat.com <mailto:philmd@redhat.com>> wrote:
> >
> >     On 10/13/20 1:29 AM, Joelle van Dyne wrote:
> >      > From: osy <osy86@users.noreply.github.com
> >     <mailto:osy86@users.noreply.github.com>>
> >      >
> >      > We cannot access /etc/resolv.conf on iOS so libslirp is modified
> >     to use
> >      > libresolv instead.
> >      >
> >      > Signed-off-by: Joelle van Dyne <j@getutm.app>
> >      > ---
> >      >   .gitmodules | 2 +-
> >      >   meson.build | 2 ++
> >      >   slirp       | 2 +-
> >      >   3 files changed, 4 insertions(+), 2 deletions(-)
> >      >
> >      > diff --git a/.gitmodules b/.gitmodules
> >      > index 2bdeeacef8..f23e859210 100644
> >      > --- a/.gitmodules
> >      > +++ b/.gitmodules
> >      > @@ -51,7 +51,7 @@
> >      >       url = https://git.qemu.org/git/edk2.git
> >     <https://git.qemu.org/git/edk2.git>
> >      >   [submodule "slirp"]
> >      >       path = slirp
> >      > -     url = https://git.qemu.org/git/libslirp.git
> >     <https://git.qemu.org/git/libslirp.git>
> >      > +     url = https://github.com/utmapp/libslirp.git
> >     <https://github.com/utmapp/libslirp.git>
> >
> >     NAck.
> >
> >     You can not take over the SLiRP project submodule that way.
> >
> >     I suggest getting your SLiRP changes merged with mainstream
> >     instead, see:
> >     https://gitlab.freedesktop.org/slirp/libslirp#contributing
> >     <https://gitlab.freedesktop.org/slirp/libslirp#contributing>
> >
> >
> > I think he did:
> > https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54
> > <https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54>
>
> I am being wary because the series is not posted as RFC.
>
> But from the cover it looks like a RFC series:
>
> * slirp updated to support DNS resolving using libresolv; a separate
>    patch will be submitted to the project. To allow for builds to
>    succeed, the .gitmodule is temporarily changed. We're not entirely
>    sure how cross-project patches should be handled here.
>
> >
> > Btw, I also noticed the coroutine library submodule proposed in this
> > series is a fork from the original library. Not sure what the upstream
> > status is and whether this is fine.
> >
> >      >   [submodule "roms/opensbi"]
> >      >       path = roms/opensbi
> >      >       url = https://git.qemu.org/git/opensbi.git
> >     <https://git.qemu.org/git/opensbi.git>
> >      > diff --git a/meson.build b/meson.build
> >      > index 32cf08619f..da96e296e0 100644
> >      > --- a/meson.build
> >      > +++ b/meson.build
> >      > @@ -996,6 +996,8 @@ if have_system
> >      >       slirp_deps = []
> >      >       if targetos == 'windows'
> >      >         slirp_deps = cc.find_library('iphlpapi')
> >      > +    elif targetos == 'darwin'
> >      > +      slirp_deps = cc.find_library('resolv')
> >      >       endif
> >      >       slirp_conf = configuration_data()
> >      >       slirp_conf.set('SLIRP_MAJOR_VERSION',
> >     meson.project_version().split('.')[0])
> >      > diff --git a/slirp b/slirp
> >      > index ce94eba204..452c389d82 160000
> >      > --- a/slirp
> >      > +++ b/slirp
> >      > @@ -1 +1 @@
> >      > -Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275
> >      > +Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e
> >
> >
> >
> >
> > --
> > Marc-André Lureau
>
>
>
<div dir="ltr">Sorry, I was not aware of the rules for RFC. I will remove this one from the v2 patch set. If and when the libslirp changes are in, what are the procedures for sending the QEMU side changes?<div><br></div><div>-j</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 13, 2020 at 7:59 AM Philippe Mathieu-Daudé &lt;<a href="mailto:philmd@redhat.com">philmd@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 10/13/20 4:38 PM, Marc-André Lureau wrote:<br>
&gt; Hi<br>
&gt; <br>
&gt; On Tue, Oct 13, 2020 at 5:34 PM Philippe Mathieu-Daudé <br>
&gt; &lt;<a href="mailto:philmd@redhat.com" target="_blank">philmd@redhat.com</a> &lt;mailto:<a href="mailto:philmd@redhat.com" target="_blank">philmd@redhat.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;     On 10/13/20 1:29 AM, Joelle van Dyne wrote:<br>
&gt;      &gt; From: osy &lt;<a href="mailto:osy86@users.noreply.github.com" target="_blank">osy86@users.noreply.github.com</a><br>
&gt;     &lt;mailto:<a href="mailto:osy86@users.noreply.github.com" target="_blank">osy86@users.noreply.github.com</a>&gt;&gt;<br>
&gt;      &gt;<br>
&gt;      &gt; We cannot access /etc/resolv.conf on iOS so libslirp is modified<br>
&gt;     to use<br>
&gt;      &gt; libresolv instead.<br>
&gt;      &gt;<br>
&gt;      &gt; Signed-off-by: Joelle van Dyne &lt;j@getutm.app&gt;<br>
&gt;      &gt; ---<br>
&gt;      &gt;   .gitmodules | 2 +-<br>
&gt;      &gt;   meson.build | 2 ++<br>
&gt;      &gt;   slirp       | 2 +-<br>
&gt;      &gt;   3 files changed, 4 insertions(+), 2 deletions(-)<br>
&gt;      &gt;<br>
&gt;      &gt; diff --git a/.gitmodules b/.gitmodules<br>
&gt;      &gt; index 2bdeeacef8..f23e859210 100644<br>
&gt;      &gt; --- a/.gitmodules<br>
&gt;      &gt; +++ b/.gitmodules<br>
&gt;      &gt; @@ -51,7 +51,7 @@<br>
&gt;      &gt;       url = <a href="https://git.qemu.org/git/edk2.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/edk2.git</a><br>
&gt;     &lt;<a href="https://git.qemu.org/git/edk2.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/edk2.git</a>&gt;<br>
&gt;      &gt;   [submodule &quot;slirp&quot;]<br>
&gt;      &gt;       path = slirp<br>
&gt;      &gt; -     url = <a href="https://git.qemu.org/git/libslirp.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/libslirp.git</a><br>
&gt;     &lt;<a href="https://git.qemu.org/git/libslirp.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/libslirp.git</a>&gt;<br>
&gt;      &gt; +     url = <a href="https://github.com/utmapp/libslirp.git" rel="noreferrer" target="_blank">https://github.com/utmapp/libslirp.git</a><br>
&gt;     &lt;<a href="https://github.com/utmapp/libslirp.git" rel="noreferrer" target="_blank">https://github.com/utmapp/libslirp.git</a>&gt;<br>
&gt; <br>
&gt;     NAck.<br>
&gt; <br>
&gt;     You can not take over the SLiRP project submodule that way.<br>
&gt; <br>
&gt;     I suggest getting your SLiRP changes merged with mainstream<br>
&gt;     instead, see:<br>
&gt;     <a href="https://gitlab.freedesktop.org/slirp/libslirp#contributing" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/slirp/libslirp#contributing</a><br>
&gt;     &lt;<a href="https://gitlab.freedesktop.org/slirp/libslirp#contributing" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/slirp/libslirp#contributing</a>&gt;<br>
&gt; <br>
&gt; <br>
&gt; I think he did: <br>
&gt; <a href="https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54</a> <br>
&gt; &lt;<a href="https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/54</a>&gt;<br>
<br>
I am being wary because the series is not posted as RFC.<br>
<br>
But from the cover it looks like a RFC series:<br>
<br>
* slirp updated to support DNS resolving using libresolv; a separate<br>
   patch will be submitted to the project. To allow for builds to<br>
   succeed, the .gitmodule is temporarily changed. We&#39;re not entirely<br>
   sure how cross-project patches should be handled here.<br>
<br>
&gt; <br>
&gt; Btw, I also noticed the coroutine library submodule proposed in this <br>
&gt; series is a fork from the original library. Not sure what the upstream <br>
&gt; status is and whether this is fine.<br>
&gt; <br>
&gt;      &gt;   [submodule &quot;roms/opensbi&quot;]<br>
&gt;      &gt;       path = roms/opensbi<br>
&gt;      &gt;       url = <a href="https://git.qemu.org/git/opensbi.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/opensbi.git</a><br>
&gt;     &lt;<a href="https://git.qemu.org/git/opensbi.git" rel="noreferrer" target="_blank">https://git.qemu.org/git/opensbi.git</a>&gt;<br>
&gt;      &gt; diff --git a/meson.build b/meson.build<br>
&gt;      &gt; index 32cf08619f..da96e296e0 100644<br>
&gt;      &gt; --- a/meson.build<br>
&gt;      &gt; +++ b/meson.build<br>
&gt;      &gt; @@ -996,6 +996,8 @@ if have_system<br>
&gt;      &gt;       slirp_deps = []<br>
&gt;      &gt;       if targetos == &#39;windows&#39;<br>
&gt;      &gt;         slirp_deps = cc.find_library(&#39;iphlpapi&#39;)<br>
&gt;      &gt; +    elif targetos == &#39;darwin&#39;<br>
&gt;      &gt; +      slirp_deps = cc.find_library(&#39;resolv&#39;)<br>
&gt;      &gt;       endif<br>
&gt;      &gt;       slirp_conf = configuration_data()<br>
&gt;      &gt;       slirp_conf.set(&#39;SLIRP_MAJOR_VERSION&#39;,<br>
&gt;     meson.project_version().split(&#39;.&#39;)[0])<br>
&gt;      &gt; diff --git a/slirp b/slirp<br>
&gt;      &gt; index ce94eba204..452c389d82 160000<br>
&gt;      &gt; --- a/slirp<br>
&gt;      &gt; +++ b/slirp<br>
&gt;      &gt; @@ -1 +1 @@<br>
&gt;      &gt; -Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275<br>
&gt;      &gt; +Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; Marc-André Lureau<br>
<br>
<br>
</blockquote></div>
diff mbox series

Patch

diff --git a/.gitmodules b/.gitmodules
index 2bdeeacef8..f23e859210 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -51,7 +51,7 @@ 
 	url = https://git.qemu.org/git/edk2.git
 [submodule "slirp"]
 	path = slirp
-	url = https://git.qemu.org/git/libslirp.git
+	url = https://github.com/utmapp/libslirp.git
 [submodule "roms/opensbi"]
 	path = roms/opensbi
 	url = 	https://git.qemu.org/git/opensbi.git
diff --git a/meson.build b/meson.build
index 32cf08619f..da96e296e0 100644
--- a/meson.build
+++ b/meson.build
@@ -996,6 +996,8 @@  if have_system
     slirp_deps = []
     if targetos == 'windows'
       slirp_deps = cc.find_library('iphlpapi')
+    elif targetos == 'darwin'
+      slirp_deps = cc.find_library('resolv')
     endif
     slirp_conf = configuration_data()
     slirp_conf.set('SLIRP_MAJOR_VERSION', meson.project_version().split('.')[0])
diff --git a/slirp b/slirp
index ce94eba204..452c389d82 160000
--- a/slirp
+++ b/slirp
@@ -1 +1 @@ 
-Subproject commit ce94eba2042d52a0ba3d9e252ebce86715e94275
+Subproject commit 452c389d8288f81ec9d59d983a047d4e54f3194e