diff mbox series

[meta-oe] mariadb: Enable network during do_compile

Message ID 1736749897-27279-1-git-send-email-wangmy@fujitsu.com
State New
Headers show
Series [meta-oe] mariadb: Enable network during do_compile | expand

Commit Message

Mingyu Wang (Fujitsu) Jan. 13, 2025, 6:31 a.m. UTC
From: Wang Mingyu <wangmy@fujitsu.com>

fix the error when do_compile:
CMake Error at libfmt-stamp/download-libfmt.cmake:163 (message):
  Each download failed!

    error: downloading 'https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip' failed
          status_code: 6
          status_string: "Could not resolve hostname"
          log:
          --- LOG BEGIN ---
          timeout on name lookup is not supported

  getaddrinfo(3) failed for github.com:443

  Could not resolve host: github.com 

  closing connection #0

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
 1 file changed, 3 insertions(+)

Comments

ChenQi Jan. 15, 2025, 4:31 a.m. UTC | #1
Can we avoid doing this and use some other solution?
e.g.,
Add back a fmt 11.0 recipe with a different recipe name or add this fmt 
tarball in SRC_URI and change some cmake configs if needed.

Regards,
Qi

On 1/13/25 14:31, wangmy via lists.openembedded.org wrote:
> From: Wang Mingyu <wangmy@fujitsu.com>
>
> fix the error when do_compile:
> CMake Error at libfmt-stamp/download-libfmt.cmake:163 (message):
>    Each download failed!
>
>      error: downloading 'https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip' failed
>            status_code: 6
>            status_string: "Could not resolve hostname"
>            log:
>            --- LOG BEGIN ---
>            timeout on name lookup is not supported
>
>    getaddrinfo(3) failed for github.com:443
>
>    Could not resolve host: github.com
>
>    closing connection #0
>
> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> ---
>   meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
> index d3192cc59c..982c82cd59 100644
> --- a/meta-oe/recipes-dbs/mysql/mariadb.inc
> +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
> @@ -31,6 +31,9 @@ SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894
>   
>   UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags"
>   
> +# network is required by go to get dependent packages
> +do_compile[network] = "1"
> +
>   BINCONFIG_GLOB = "mysql_config"
>   
>   inherit cmake gettext binconfig update-rc.d systemd multilib_script multilib_header pkgconfig
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#114826): https://lists.openembedded.org/g/openembedded-devel/message/114826
> Mute This Topic: https://lists.openembedded.org/mt/110583044/7304865
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [Qi.Chen@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Mingyu Wang (Fujitsu) Jan. 15, 2025, 7:46 a.m. UTC | #2
I searched and found that this setting is also used in other bb files. 
May I ask if this setting is not recommended and if there are any drawbacks?

  --
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com

> -----Original Message-----
> From: ChenQi <Qi.Chen@windriver.com>
> Sent: Wednesday, January 15, 2025 12:32 PM
> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>;
> openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-oe] [PATCH] mariadb: Enable network during do_compile
> 
> Can we avoid doing this and use some other solution?
> e.g.,
> Add back a fmt 11.0 recipe with a different recipe name or add this fmt tarball
> in SRC_URI and change some cmake configs if needed.
> 
> Regards,
> Qi
> 
> On 1/13/25 14:31, wangmy via lists.openembedded.org wrote:
> > From: Wang Mingyu <wangmy@fujitsu.com>
> >
> > fix the error when do_compile:
> > CMake Error at libfmt-stamp/download-libfmt.cmake:163 (message):
> >    Each download failed!
> >
> >      error: downloading
> 'https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip' failed
> >            status_code: 6
> >            status_string: "Could not resolve hostname"
> >            log:
> >            --- LOG BEGIN ---
> >            timeout on name lookup is not supported
> >
> >    getaddrinfo(3) failed for github.com:443
> >
> >    Could not resolve host: github.com
> >
> >    closing connection #0
> >
> > Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> > ---
> >   meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc
> > b/meta-oe/recipes-dbs/mysql/mariadb.inc
> > index d3192cc59c..982c82cd59 100644
> > --- a/meta-oe/recipes-dbs/mysql/mariadb.inc
> > +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
> > @@ -31,6 +31,9 @@ SRC_URI[sha256sum] =
> > "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894
> >
> >   UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags"
> >
> > +# network is required by go to get dependent packages
> > +do_compile[network] = "1"
> > +
> >   BINCONFIG_GLOB = "mysql_config"
> >
> >   inherit cmake gettext binconfig update-rc.d systemd multilib_script
> > multilib_header pkgconfig
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#114826):
> > https://lists.openembedded.org/g/openembedded-devel/message/114826
> > Mute This Topic: https://lists.openembedded.org/mt/110583044/7304865
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
> > [Qi.Chen@eng.windriver.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
ChenQi Jan. 15, 2025, 7:54 a.m. UTC | #3
On 1/15/25 15:46, Mingyu Wang (Fujitsu) wrote:
> I searched and found that this setting is also used in other bb files.
> May I ask if this setting is not recommended and if there are any drawbacks?

The network flag should only set for tasks that really need network, 
e.g., do_fetch. Otherwise,  the task, do_compile for example, could 
possibly download things from network without any verification. This 
will cause problems related to determinism, security, license, etc.

Anyway, I just noticed that Khem had already sent out an upgrade for 
mariadb. And that version changes the way mariadb checks for libfmt 
compatibility, so chances are that your patch is not needed.

Regards,
Qi

>
>    --
> Best Regards
> ---------------------------------------------------
> Wang Mingyu
> FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
> No.6 Wenzhu Road, Nanjing, 210012, China
> TEL:+86+25-86630566--8568
> COINS: 79988548
> FAX: +86+25-83317685
> MAIL: wangmy@fujitsu.com
>
>> -----Original Message-----
>> From: ChenQi <Qi.Chen@windriver.com>
>> Sent: Wednesday, January 15, 2025 12:32 PM
>> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>;
>> openembedded-devel@lists.openembedded.org
>> Subject: Re: [oe] [meta-oe] [PATCH] mariadb: Enable network during do_compile
>>
>> Can we avoid doing this and use some other solution?
>> e.g.,
>> Add back a fmt 11.0 recipe with a different recipe name or add this fmt tarball
>> in SRC_URI and change some cmake configs if needed.
>>
>> Regards,
>> Qi
>>
>> On 1/13/25 14:31, wangmy via lists.openembedded.org wrote:
>>> From: Wang Mingyu <wangmy@fujitsu.com>
>>>
>>> fix the error when do_compile:
>>> CMake Error at libfmt-stamp/download-libfmt.cmake:163 (message):
>>>     Each download failed!
>>>
>>>       error: downloading
>> 'https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip' failed
>>>             status_code: 6
>>>             status_string: "Could not resolve hostname"
>>>             log:
>>>             --- LOG BEGIN ---
>>>             timeout on name lookup is not supported
>>>
>>>     getaddrinfo(3) failed for github.com:443
>>>
>>>     Could not resolve host: github.com
>>>
>>>     closing connection #0
>>>
>>> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
>>> ---
>>>    meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc
>>> b/meta-oe/recipes-dbs/mysql/mariadb.inc
>>> index d3192cc59c..982c82cd59 100644
>>> --- a/meta-oe/recipes-dbs/mysql/mariadb.inc
>>> +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
>>> @@ -31,6 +31,9 @@ SRC_URI[sha256sum] =
>>> "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894
>>>
>>>    UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags"
>>>
>>> +# network is required by go to get dependent packages
>>> +do_compile[network] = "1"
>>> +
>>>    BINCONFIG_GLOB = "mysql_config"
>>>
>>>    inherit cmake gettext binconfig update-rc.d systemd multilib_script
>>> multilib_header pkgconfig
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#114826):
>>> https://lists.openembedded.org/g/openembedded-devel/message/114826
>>> Mute This Topic: https://lists.openembedded.org/mt/110583044/7304865
>>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
>>> [Qi.Chen@eng.windriver.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
Mingyu Wang (Fujitsu) Jan. 15, 2025, 8:39 a.m. UTC | #4
I got it, thank you for sharing this information.
If upgrade for mariadb is merged, I'll try it again.

  --
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org
> <openembedded-devel@lists.openembedded.org> On Behalf Of Chen Qi via
> lists.openembedded.org
> Sent: Wednesday, January 15, 2025 3:54 PM
> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>;
> openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-oe] [PATCH] mariadb: Enable network during do_compile
> 
> On 1/15/25 15:46, Mingyu Wang (Fujitsu) wrote:
> > I searched and found that this setting is also used in other bb files.
> > May I ask if this setting is not recommended and if there are any drawbacks?
> 
> The network flag should only set for tasks that really need network, e.g.,
> do_fetch. Otherwise,  the task, do_compile for example, could possibly
> download things from network without any verification. This will cause problems
> related to determinism, security, license, etc.
> 
> Anyway, I just noticed that Khem had already sent out an upgrade for mariadb.
> And that version changes the way mariadb checks for libfmt compatibility, so
> chances are that your patch is not needed.
> 
> Regards,
> Qi
> 
> >
> >    --
> > Best Regards
> > ---------------------------------------------------
> > Wang Mingyu
> > FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
> > No.6 Wenzhu Road, Nanjing, 210012, China
> > TEL:+86+25-86630566--8568
> > COINS: 79988548
> > FAX: +86+25-83317685
> > MAIL: wangmy@fujitsu.com
> >
> >> -----Original Message-----
> >> From: ChenQi <Qi.Chen@windriver.com>
> >> Sent: Wednesday, January 15, 2025 12:32 PM
> >> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>;
> >> openembedded-devel@lists.openembedded.org
> >> Subject: Re: [oe] [meta-oe] [PATCH] mariadb: Enable network during
> >> do_compile
> >>
> >> Can we avoid doing this and use some other solution?
> >> e.g.,
> >> Add back a fmt 11.0 recipe with a different recipe name or add this
> >> fmt tarball in SRC_URI and change some cmake configs if needed.
> >>
> >> Regards,
> >> Qi
> >>
> >> On 1/13/25 14:31, wangmy via lists.openembedded.org wrote:
> >>> From: Wang Mingyu <wangmy@fujitsu.com>
> >>>
> >>> fix the error when do_compile:
> >>> CMake Error at libfmt-stamp/download-libfmt.cmake:163 (message):
> >>>     Each download failed!
> >>>
> >>>       error: downloading
> >> 'https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zi
> >> p' failed
> >>>             status_code: 6
> >>>             status_string: "Could not resolve hostname"
> >>>             log:
> >>>             --- LOG BEGIN ---
> >>>             timeout on name lookup is not supported
> >>>
> >>>     getaddrinfo(3) failed for github.com:443
> >>>
> >>>     Could not resolve host: github.com
> >>>
> >>>     closing connection #0
> >>>
> >>> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> >>> ---
> >>>    meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
> >>>    1 file changed, 3 insertions(+)
> >>>
> >>> diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc
> >>> b/meta-oe/recipes-dbs/mysql/mariadb.inc
> >>> index d3192cc59c..982c82cd59 100644
> >>> --- a/meta-oe/recipes-dbs/mysql/mariadb.inc
> >>> +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
> >>> @@ -31,6 +31,9 @@ SRC_URI[sha256sum] =
> >>> "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894
> >>>
> >>>    UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags"
> >>>
> >>> +# network is required by go to get dependent packages
> >>> +do_compile[network] = "1"
> >>> +
> >>>    BINCONFIG_GLOB = "mysql_config"
> >>>
> >>>    inherit cmake gettext binconfig update-rc.d systemd
> >>> multilib_script multilib_header pkgconfig
> >>>
> >>>
> >>>
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index d3192cc59c..982c82cd59 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -31,6 +31,9 @@  SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894
 
 UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags"
 
+# network is required by go to get dependent packages
+do_compile[network] = "1"
+
 BINCONFIG_GLOB = "mysql_config"
 
 inherit cmake gettext binconfig update-rc.d systemd multilib_script multilib_header pkgconfig