Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file
@ 2023-11-10 19:37 Piotr Łobacz
  2023-11-13 11:35 ` Richard Purdie
  2023-11-13 17:44 ` Ross Burton
  0 siblings, 2 replies; 5+ messages in thread
From: Piotr Łobacz @ 2023-11-10 19:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: Piotr Łobacz

By default curl is being configured with:

--with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt

which causes an issue for native build, when calling
curl-native command, as certificates file is missing.

This commit fixes the issue.

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
---
 meta/recipes-support/curl/curl_8.4.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/curl/curl_8.4.0.bb b/meta/recipes-support/curl/curl_8.4.0.bb
index 5f97730bf4..165a116139 100644
--- a/meta/recipes-support/curl/curl_8.4.0.bb
+++ b/meta/recipes-support/curl/curl_8.4.0.bb
@@ -130,7 +130,9 @@ PACKAGES =+ "lib${BPN}"
 
 FILES:lib${BPN} = "${libdir}/lib*.so.*"
 RRECOMMENDS:lib${BPN} += "ca-certificates"
+DEPENDS:append:class-native = " ca-certificates-native"
 
+SYSROOT_DIRS:append =" /etc/ssl/certs"
 FILES:${PN} += "${datadir}/zsh"
 
 inherit multilib_script
-- 
2.42.1



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

* Re: [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file
  2023-11-10 19:37 [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file Piotr Łobacz
@ 2023-11-13 11:35 ` Richard Purdie
  2023-11-13 11:38   ` Piotr Łobacz
  2023-11-13 17:44 ` Ross Burton
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2023-11-13 11:35 UTC (permalink / raw)
  To: Piotr Łobacz, openembedded-core

On Fri, 2023-11-10 at 20:37 +0100, Piotr Łobacz wrote:
> By default curl is being configured with:
> 
> --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> 
> which causes an issue for native build, when calling
> curl-native command, as certificates file is missing.
> 
> This commit fixes the issue.
> 
> Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
> ---
>  meta/recipes-support/curl/curl_8.4.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-support/curl/curl_8.4.0.bb b/meta/recipes-support/curl/curl_8.4.0.bb
> index 5f97730bf4..165a116139 100644
> --- a/meta/recipes-support/curl/curl_8.4.0.bb
> +++ b/meta/recipes-support/curl/curl_8.4.0.bb
> @@ -130,7 +130,9 @@ PACKAGES =+ "lib${BPN}"
>  
>  FILES:lib${BPN} = "${libdir}/lib*.so.*"
>  RRECOMMENDS:lib${BPN} += "ca-certificates"
> +DEPENDS:append:class-native = " ca-certificates-native"
>  
> +SYSROOT_DIRS:append =" /etc/ssl/certs"
>  FILES:${PN} += "${datadir}/zsh"
>  
>  inherit multilib_script

Adding the dependency I can understand but the SYSROOT_DIRS append
would need to be in the ca-certificates recipe to be of any use as I
understand it?

Also, wouldn't a += instead of a append work for SYSROOT_DIRS?

Cheers,

Richard


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

* Re: [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file
  2023-11-13 11:35 ` Richard Purdie
@ 2023-11-13 11:38   ` Piotr Łobacz
  0 siblings, 0 replies; 5+ messages in thread
From: Piotr Łobacz @ 2023-11-13 11:38 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org, Richard Purdie

Dnia poniedziałek, 13 listopada 2023 12:35:23 CET Richard Purdie pisze:
> On Fri, 2023-11-10 at 20:37 +0100, Piotr Łobacz wrote:
> > By default curl is being configured with:
> > 
> > --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> > 
> > which causes an issue for native build, when calling
> > curl-native command, as certificates file is missing.
> > 
> > This commit fixes the issue.
> > 
> > Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
> > ---
> > 
> >  meta/recipes-support/curl/curl_8.4.0.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/recipes-support/curl/curl_8.4.0.bb
> > b/meta/recipes-support/curl/curl_8.4.0.bb index 5f97730bf4..165a116139
> > 100644
> > --- a/meta/recipes-support/curl/curl_8.4.0.bb
> > +++ b/meta/recipes-support/curl/curl_8.4.0.bb
> > @@ -130,7 +130,9 @@ PACKAGES =+ "lib${BPN}"
> > 
> >  FILES:lib${BPN} = "${libdir}/lib*.so.*"
> >  RRECOMMENDS:lib${BPN} += "ca-certificates"
> > 
> > +DEPENDS:append:class-native = " ca-certificates-native"
> > 
> > +SYSROOT_DIRS:append =" /etc/ssl/certs"
> > 
> >  FILES:${PN} += "${datadir}/zsh"
> >  
> >  inherit multilib_script
> 
> Adding the dependency I can understand but the SYSROOT_DIRS append
> would need to be in the ca-certificates recipe to be of any use as I
> understand it?

Yeah, my mistake ca-certificates recipe needs this sorry haven't noticed.
> 
> Also, wouldn't a += instead of a append work for SYSROOT_DIRS?

It should I can change it and test.

> 
> Cheers,
> 
> Richard

BR
Piotr


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

* Re: [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file
  2023-11-10 19:37 [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file Piotr Łobacz
  2023-11-13 11:35 ` Richard Purdie
@ 2023-11-13 17:44 ` Ross Burton
  2023-11-15 21:49   ` ODP: " Piotr Łobacz
  1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2023-11-13 17:44 UTC (permalink / raw)
  To: p.lobacz@welotec.com; +Cc: openembedded-core@lists.openembedded.org

On 10 Nov 2023, at 19:37, Piotr Łobacz via lists.openembedded.org <p.lobacz=welotec.com@lists.openembedded.org> wrote:
> 
> By default curl is being configured with:
> 
> --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> 
> which causes an issue for native build, when calling
> curl-native command, as certificates file is missing.
> 
> This commit fixes the issue.

I’m not sure what issue this is actually solving, unless something has changed in how curl is built.

curl-native has a hard-coded ca-bundle path to $sysconfdir/ssl/certs/ca-certificates.crt.  We can know exactly what this path is when curl-native is built:

$ bitbake-getvar -r curl-native sysconfdir
export sysconfdir="/yocto/ross/build-poky/tmp/work/aarch64-linux/curl-native/8.4.0/recipe-sysroot-native/etc”

This is the *work directory* of curl-native.

If you then link to curl-native in another native recipe and run the binary, that libcurl will continue to look in the curl-native work directory which does not exist if rm_work is being used or curl-native was taken from sstate.  This change does not solve that problem.

Ross

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

* ODP: [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file
  2023-11-13 17:44 ` Ross Burton
@ 2023-11-15 21:49   ` Piotr Łobacz
  0 siblings, 0 replies; 5+ messages in thread
From: Piotr Łobacz @ 2023-11-15 21:49 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org

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

As Richard has noticed it was wrong, meaning part of the fix should be placed in ca-certificates and I even dunno why it was still working... Nevertheless I'm sending v2 patchest.

BR
Piotr
________________________________
Od: Ross Burton <Ross.Burton@arm.com>
Wysłane: poniedziałek, 13 listopada 2023 18:44
Do: Piotr Łobacz <p.lobacz@welotec.com>
DW: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Temat: Re: [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file

[ross.burton@arm.com przypomina osobę, która wcześniej wysłała ci wiadomość e-mail, ale może nie być tą osobą. Dowiedz się, dlaczego może to stanowić zagrożenie dla https://aka.ms/LearnAboutSenderIdentification ]

On 10 Nov 2023, at 19:37, Piotr Łobacz via lists.openembedded.org <p.lobacz=welotec.com@lists.openembedded.org> wrote:
>
> By default curl is being configured with:
>
> --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
>
> which causes an issue for native build, when calling
> curl-native command, as certificates file is missing.
>
> This commit fixes the issue.

I’m not sure what issue this is actually solving, unless something has changed in how curl is built.

curl-native has a hard-coded ca-bundle path to $sysconfdir/ssl/certs/ca-certificates.crt.  We can know exactly what this path is when curl-native is built:

$ bitbake-getvar -r curl-native sysconfdir
export sysconfdir="/yocto/ross/build-poky/tmp/work/aarch64-linux/curl-native/8.4.0/recipe-sysroot-native/etc”

This is the *work directory* of curl-native.

If you then link to curl-native in another native recipe and run the binary, that libcurl will continue to look in the curl-native work directory which does not exist if rm_work is being used or curl-native was taken from sstate.  This change does not solve that problem.

Ross

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

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

end of thread, other threads:[~2023-11-15 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 19:37 [OE-Core][PATCH] curl-native: add missing ca-certificates.crt file Piotr Łobacz
2023-11-13 11:35 ` Richard Purdie
2023-11-13 11:38   ` Piotr Łobacz
2023-11-13 17:44 ` Ross Burton
2023-11-15 21:49   ` ODP: " Piotr Łobacz

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