All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] linux-yocto-dev: remove duplicate DEPENDS
@ 2024-04-04 13:29 Mikko Rapeli
  2024-04-04 13:29 ` [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build Mikko Rapeli
  0 siblings, 1 reply; 6+ messages in thread
From: Mikko Rapeli @ 2024-04-04 13:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mikko Rapeli

They are already set in linux-yocto.inc

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 9bd219825e..d5cba42a5c 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -34,11 +34,6 @@ PV = "${LINUX_VERSION}+git"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
-DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "${@bb.utils.contains('ARCH', 'powerpc', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
-DEPENDS += "gmp-native libmpc-native"
-
 # yaml and dtschema are required for 5.16+ device tree validation, libyaml is checked
 # via pkgconfig, so must always be present, but we can wrap the others to make them
 # conditional
-- 
2.34.1



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

* [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build
  2024-04-04 13:29 [PATCH 1/2] linux-yocto-dev: remove duplicate DEPENDS Mikko Rapeli
@ 2024-04-04 13:29 ` Mikko Rapeli
  2024-04-04 13:57   ` [OE-core] " Jose Quaresma
  2024-04-04 14:13   ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Mikko Rapeli @ 2024-04-04 13:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mikko Rapeli, Mathieu Poirier

If linux-yocto-dev is compiled without specific SRCREV, it uses
AUTOREV which tries to update to latest available commit. This is
currently failing with these steps:

$ rm -rf tmp*/work/*/linux-yocto-dev && \
bitbake -c do_configure mc:machine:linux-yocto-dev ; \
bitbake -c do_clean mc:machine:linux-yocto-dev
...
Parsing recipes...WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb: Error during finalise of /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb: Error during finalise of mc:poky:/home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
ERROR: ExpansionError during parsing /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
Traceback (most recent call last):
  File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py", line 1245, in srcrev_internal_helper(ud=<bb.fetch2.FetchData object at 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, name='machine'):
             d.setVar("__BBAUTOREV_ACTED_UPON", True)
    >        srcrev = ud.method.latest_revision(ud, d, name)

  File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py", line 1667, in Git.latest_revision(ud=<bb.fetch2.FetchData object at 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, name='machine'):
             except KeyError:
    >            revs[key] = rev = self._latest_revision(ud, d, name)
                 return rev
  File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/git.py", line 850, in Git._latest_revision(ud=<bb.fetch2.FetchData object at 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, name='machine'):

    >        output = self._lsremote(ud, d, "")
             # Tags of the form ^{} may not work, need to fallback to other form
  File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/git.py", line 833, in Git._lsremote(ud=<bb.fetch2.FetchData object at 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, search=''):
                     bb.fetch2.check_network_access(d, cmd, repourl)
    >            output = runfetchcmd(cmd, d, True)
                 if not output:
  File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py", line 957, in runfetchcmd(cmd='export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/15818/bus"; export PATH="/home/builder/src/base/build/tmp_poky/sysroots-uninative/x86_64-linux/usr/bin:/home/builder/src/base/poky/scripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot/usr/bin/crossscripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/bin:/home/builder/src/base/poky/bitbake/bin:/home/builder/src/base/build/tmp_poky/hosttools"; export HOME="/home/builder"; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all ls-remote https://git.yoctoproject.org/linux-yocto-dev.git ', d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, quiet=True, cleanup=[], log=None, workdir=None):

    >        raise FetchError(error_message)

bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(d)} which triggered exception FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/15818/bus"; export PATH="/home/builder/src/base/build/tmp_poky/sysroots-uninative/x86_64-linux/usr/bin:/home/builder/src/base/poky/scripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot/usr/bin/crossscripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/bin:/home/builder/src/base/poky/bitbake/bin:/home/builder/src/base/build/tmp_poky/hosttools"; export HOME="/home/builder"; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all ls-remote https://git.yoctoproject.org/linux-yocto-dev.git  failed with exit code 128, output:
fatal: unable to access 'https://git.yoctoproject.org/linux-yocto-dev.git/': error setting certificate file: /home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt

The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]

ERROR: Parsing halted due to errors, see error messages above

Summary: There were 6 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.

This state is not recoverable with bitbake calls. All of them fail from now on.
"rm -rf tmp/work/*/linux-yocto-dev" recovers the situation
and bitbake commands work again.

Root cause is curl-native, dependency of git-native, which
has --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
which for native build target is wrong and points to curl-native build
directory path
/home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt

Since git is a build time host package dependency listed in
https://docs.yoctoproject.org/dev/singleindex.html#build-host-packages
then its dependencies like curl and ca-certificates are too, it should
be safe for curl-native to use the default host ca-certificates path
instead of the one in recipe specific sysroots which would need to be set with complicated
environment variables. Set non-default ca-certificates path only for
target and nativesdk builds.

Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/recipes-support/curl/curl_8.6.0.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/curl/curl_8.6.0.bb b/meta/recipes-support/curl/curl_8.6.0.bb
index 49ba0cb4a7..da5571ca14 100644
--- a/meta/recipes-support/curl/curl_8.6.0.bb
+++ b/meta/recipes-support/curl/curl_8.6.0.bb
@@ -73,11 +73,16 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
 EXTRA_OECONF = " \
     --disable-libcurl-option \
     --disable-ntlm-wb \
-    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
     --without-libpsl \
     --enable-optimize \
     ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls openssl', d) == '') else ''} \
 "
+EXTRA_OECONF:class-target = " \
+    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+"
+EXTRA_OECONF:class-nativesdk = " \
+    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+"
 
 fix_absolute_paths () {
 	# cleanup buildpaths from curl-config
-- 
2.34.1



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

* Re: [OE-core] [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build
  2024-04-04 13:29 ` [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build Mikko Rapeli
@ 2024-04-04 13:57   ` Jose Quaresma
  2024-04-04 14:14     ` Mikko Rapeli
  2024-04-04 14:13   ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Jose Quaresma @ 2024-04-04 13:57 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: openembedded-core, Mathieu Poirier

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

Hi Mikko,

Did you test with the below change already merged on master?
Looks like it was to fix the same issue.

git: git-replacement-native: depend on ca-certificate
https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/git?id=421083c46c97bf758496b8c58402aea5d74aa097

Jose

Mikko Rapeli <mikko.rapeli@linaro.org> escreveu (quinta, 4/04/2024 à(s)
14:29):

> If linux-yocto-dev is compiled without specific SRCREV, it uses
> AUTOREV which tries to update to latest available commit. This is
> currently failing with these steps:
>
> $ rm -rf tmp*/work/*/linux-yocto-dev && \
> bitbake -c do_configure mc:machine:linux-yocto-dev ; \
> bitbake -c do_clean mc:machine:linux-yocto-dev
> ...
> Parsing recipes...WARNING:
> /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb: Exception during build_dependencies for
> fetcher_hashes_dummyfunc
> WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb: Error during finalise of
> /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb
> WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb: Exception during build_dependencies for
> fetcher_hashes_dummyfunc
> WARNING: /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb: Error during finalise of
> mc:poky:/home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb
> ERROR: ExpansionError during parsing
> /home/builder/src/base/build/../poky/meta/recipes-kernel/linux/
> linux-yocto-dev.bb
> Traceback (most recent call last):
>   File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py",
> line 1245, in srcrev_internal_helper(ud=<bb.fetch2.FetchData object at
> 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>,
> name='machine'):
>              d.setVar("__BBAUTOREV_ACTED_UPON", True)
>     >        srcrev = ud.method.latest_revision(ud, d, name)
>
>   File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py",
> line 1667, in Git.latest_revision(ud=<bb.fetch2.FetchData object at
> 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>,
> name='machine'):
>              except KeyError:
>     >            revs[key] = rev = self._latest_revision(ud, d, name)
>                  return rev
>   File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/git.py", line
> 850, in Git._latest_revision(ud=<bb.fetch2.FetchData object at
> 0x7f34e5f61330>, d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>,
> name='machine'):
>
>     >        output = self._lsremote(ud, d, "")
>              # Tags of the form ^{} may not work, need to fallback to
> other form
>   File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/git.py", line
> 833, in Git._lsremote(ud=<bb.fetch2.FetchData object at 0x7f34e5f61330>,
> d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, search=''):
>                      bb.fetch2.check_network_access(d, cmd, repourl)
>     >            output = runfetchcmd(cmd, d, True)
>                  if not output:
>   File "/home/builder/src/base/poky/bitbake/lib/bb/fetch2/__init__.py",
> line 957, in runfetchcmd(cmd='export PSEUDO_DISABLED=1; export
> DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/15818/bus"; export
> PATH="/home/builder/src/base/build/tmp_poky/sysroots-uninative/x86_64-linux/usr/bin:/home/builder/src/base/poky/scripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot/usr/bin/crossscripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/bin:/home/builder/src/base/poky/bitbake/bin:/home/builder/src/base/build/tmp_poky/hosttools";
> export HOME="/home/builder"; git -c gc.autoDetach=false -c core.pager=cat
> -c safe.bareRepository=all ls-remote
> https://git.yoctoproject.org/linux-yocto-dev.git ',
> d=<bb.data_smart.DataSmart object at 0x7f34e5ff22f0>, quiet=True,
> cleanup=[], log=None, workdir=None):
>
>     >        raise FetchError(error_message)
>
> bb.data_smart.ExpansionError: Failure expanding variable
> fetcher_hashes_dummyfunc[vardepvalue], expression was
> ${@bb.fetch.get_hashvalue(d)} which triggered exception FetchError: Fetcher
> failure: Fetch command export PSEUDO_DISABLED=1; export
> DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/15818/bus"; export
> PATH="/home/builder/src/base/build/tmp_poky/sysroots-uninative/x86_64-linux/usr/bin:/home/builder/src/base/poky/scripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot/usr/bin/crossscripts:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/usr/bin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/sbin:/home/builder/src/base/build/tmp_poky/work/poky-poky-linux/linux-yocto-dev/6.8+git/recipe-sysroot-native/bin:/home/builder/src/base/poky/bitbake/bin:/home/builder/src/base/build/tmp_poky/hosttools";
> export HOME="/home/builder"; git -c gc.autoDetach=false -c core.pager=cat
> -c safe.bareRepository=all ls-remote
> https://git.yoctoproject.org/linux-yocto-dev.git  failed with exit code
> 128, output:
> fatal: unable to access 'https://git.yoctoproject.org/linux-yocto-dev.git/':
> error setting certificate file:
> /home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
>
> The variable dependency chain for the failure is:
> fetcher_hashes_dummyfunc[vardepvalue]
>
> ERROR: Parsing halted due to errors, see error messages above
>
> Summary: There were 6 WARNING messages.
> Summary: There were 2 ERROR messages, returning a non-zero exit code.
>
> This state is not recoverable with bitbake calls. All of them fail from
> now on.
> "rm -rf tmp/work/*/linux-yocto-dev" recovers the situation
> and bitbake commands work again.
>
> Root cause is curl-native, dependency of git-native, which
> has --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> which for native build target is wrong and points to curl-native build
> directory path
>
> /home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
>
> Since git is a build time host package dependency listed in
> https://docs.yoctoproject.org/dev/singleindex.html#build-host-packages
> then its dependencies like curl and ca-certificates are too, it should
> be safe for curl-native to use the default host ca-certificates path
> instead of the one in recipe specific sysroots which would need to be set
> with complicated
> environment variables. Set non-default ca-certificates path only for
> target and nativesdk builds.
>
> Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta/recipes-support/curl/curl_8.6.0.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/curl/curl_8.6.0.bb
> b/meta/recipes-support/curl/curl_8.6.0.bb
> index 49ba0cb4a7..da5571ca14 100644
> --- a/meta/recipes-support/curl/curl_8.6.0.bb
> +++ b/meta/recipes-support/curl/curl_8.6.0.bb
> @@ -73,11 +73,16 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
>  EXTRA_OECONF = " \
>      --disable-libcurl-option \
>      --disable-ntlm-wb \
> -    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
>      --without-libpsl \
>      --enable-optimize \
>      ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls
> mbedtls openssl', d) == '') else ''} \
>  "
> +EXTRA_OECONF:class-target = " \
> +    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> +"
> +EXTRA_OECONF:class-nativesdk = " \
> +    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> +"
>
>  fix_absolute_paths () {
>         # cleanup buildpaths from curl-config
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197964):
> https://lists.openembedded.org/g/openembedded-core/message/197964
> Mute This Topic: https://lists.openembedded.org/mt/105328588/5052612
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> quaresma.jose@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

-- 
Best regards,

José Quaresma

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

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

* Re: [OE-core] [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build
  2024-04-04 13:29 ` [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build Mikko Rapeli
  2024-04-04 13:57   ` [OE-core] " Jose Quaresma
@ 2024-04-04 14:13   ` Richard Purdie
  2024-04-04 14:16     ` Mikko Rapeli
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2024-04-04 14:13 UTC (permalink / raw)
  To: Mikko Rapeli, openembedded-core; +Cc: Mathieu Poirier

On Thu, 2024-04-04 at 16:29 +0300, Mikko Rapeli wrote:
> If linux-yocto-dev is compiled without specific SRCREV, it uses
> AUTOREV which tries to update to latest available commit. This is
> currently failing with these steps:
> 
> $ rm -rf tmp*/work/*/linux-yocto-dev && \
> bitbake -c do_configure mc:machine:linux-yocto-dev ; \
> bitbake -c do_clean mc:machine:linux-yocto-dev
> [...]

> The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]
> 
> ERROR: Parsing halted due to errors, see error messages above
> 
> Summary: There were 6 WARNING messages.
> Summary: There were 2 ERROR messages, returning a non-zero exit code.
> 
> This state is not recoverable with bitbake calls. All of them fail from now on.
> "rm -rf tmp/work/*/linux-yocto-dev" recovers the situation
> and bitbake commands work again.
> 
> Root cause is curl-native, dependency of git-native, which
> has --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> which for native build target is wrong and points to curl-native build
> directory path
> /home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
> 
> Since git is a build time host package dependency listed in
> https://docs.yoctoproject.org/dev/singleindex.html#build-host-packages
> then its dependencies like curl and ca-certificates are too, it should
> be safe for curl-native to use the default host ca-certificates path
> instead of the one in recipe specific sysroots which would need to be set with complicated
> environment variables. Set non-default ca-certificates path only for
> target and nativesdk builds.
> 
> Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta/recipes-support/curl/curl_8.6.0.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/curl/curl_8.6.0.bb b/meta/recipes-support/curl/curl_8.6.0.bb
> index 49ba0cb4a7..da5571ca14 100644
> --- a/meta/recipes-support/curl/curl_8.6.0.bb
> +++ b/meta/recipes-support/curl/curl_8.6.0.bb
> @@ -73,11 +73,16 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
>  EXTRA_OECONF = " \
>      --disable-libcurl-option \
>      --disable-ntlm-wb \
> -    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
>      --without-libpsl \
>      --enable-optimize \
>      ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls openssl', d) == '') else ''} \
>  "
> +EXTRA_OECONF:class-target = " \
> +    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> +"
> +EXTRA_OECONF:class-nativesdk = " \
> +    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> +"
>  
>  fix_absolute_paths () {
>  	# cleanup buildpaths from curl-config

This change is fraught with danger :(.

I have a feeling we've gone around in circles as in some cases you
don't have the ca-certs on the host, or they're in unusual paths so the
previous conclusion was we should always have them present in the
sysroot if curl-native is being used. Yes, that does mean we have to
set the environment correctly to relocate curl's paths appropriately.

Certainly at this point in the release cycle I'm very nervous about
changing this around.

Cheers,

Richard


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

* Re: [OE-core] [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build
  2024-04-04 13:57   ` [OE-core] " Jose Quaresma
@ 2024-04-04 14:14     ` Mikko Rapeli
  0 siblings, 0 replies; 6+ messages in thread
From: Mikko Rapeli @ 2024-04-04 14:14 UTC (permalink / raw)
  To: Jose Quaresma; +Cc: openembedded-core, Mathieu Poirier

Hi,

On Thu, Apr 04, 2024 at 02:57:20PM +0100, Jose Quaresma wrote:
> Hi Mikko,
> 
> Did you test with the below change already merged on master?
> Looks like it was to fix the same issue.
> 
> git: git-replacement-native: depend on ca-certificate
> https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/git?id=421083c46c97bf758496b8c58402aea5d74aa097

No, I was on slighlty older commit 47c201da56155f80e18ee1269096ffec1864bce0.

421083c46c97bf758496b8c58402aea5d74aa097 fixes the issue too, thanks for the hint!

This patch can be ignored.

Cheers,

-Mikko


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

* Re: [OE-core] [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build
  2024-04-04 14:13   ` Richard Purdie
@ 2024-04-04 14:16     ` Mikko Rapeli
  0 siblings, 0 replies; 6+ messages in thread
From: Mikko Rapeli @ 2024-04-04 14:16 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, Mathieu Poirier

Hi,

On Thu, Apr 04, 2024 at 03:13:08PM +0100, Richard Purdie wrote:
> On Thu, 2024-04-04 at 16:29 +0300, Mikko Rapeli wrote:
> > If linux-yocto-dev is compiled without specific SRCREV, it uses
> > AUTOREV which tries to update to latest available commit. This is
> > currently failing with these steps:
> > 
> > $ rm -rf tmp*/work/*/linux-yocto-dev && \
> > bitbake -c do_configure mc:machine:linux-yocto-dev ; \
> > bitbake -c do_clean mc:machine:linux-yocto-dev
> > [...]
> 
> > The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]
> > 
> > ERROR: Parsing halted due to errors, see error messages above
> > 
> > Summary: There were 6 WARNING messages.
> > Summary: There were 2 ERROR messages, returning a non-zero exit code.
> > 
> > This state is not recoverable with bitbake calls. All of them fail from now on.
> > "rm -rf tmp/work/*/linux-yocto-dev" recovers the situation
> > and bitbake commands work again.
> > 
> > Root cause is curl-native, dependency of git-native, which
> > has --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt
> > which for native build target is wrong and points to curl-native build
> > directory path
> > /home/builder/src/base/build/tmp_poky/work/x86_64-linux/curl-native/8.6.0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
> > 
> > Since git is a build time host package dependency listed in
> > https://docs.yoctoproject.org/dev/singleindex.html#build-host-packages
> > then its dependencies like curl and ca-certificates are too, it should
> > be safe for curl-native to use the default host ca-certificates path
> > instead of the one in recipe specific sysroots which would need to be set with complicated
> > environment variables. Set non-default ca-certificates path only for
> > target and nativesdk builds.
> > 
> > Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> > �meta/recipes-support/curl/curl_8.6.0.bb | 7 ++++++-
> > �1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-support/curl/curl_8.6.0.bb b/meta/recipes-support/curl/curl_8.6.0.bb
> > index 49ba0cb4a7..da5571ca14 100644
> > --- a/meta/recipes-support/curl/curl_8.6.0.bb
> > +++ b/meta/recipes-support/curl/curl_8.6.0.bb
> > @@ -73,11 +73,16 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
> > �EXTRA_OECONF = " \
> > ���� --disable-libcurl-option \
> > ���� --disable-ntlm-wb \
> > -��� --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> > ���� --without-libpsl \
> > ���� --enable-optimize \
> > ���� ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls openssl', d) == '') else ''} \
> > �"
> > +EXTRA_OECONF:class-target = " \
> > +��� --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> > +"
> > +EXTRA_OECONF:class-nativesdk = " \
> > +��� --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
> > +"
> > �
> > �fix_absolute_paths () {
> > �	# cleanup buildpaths from curl-config
> 
> This change is fraught with danger :(.
> 
> I have a feeling we've gone around in circles as in some cases you
> don't have the ca-certs on the host, or they're in unusual paths so the
> previous conclusion was we should always have them present in the
> sysroot if curl-native is being used. Yes, that does mean we have to
> set the environment correctly to relocate curl's paths appropriately.
> 
> Certainly at this point in the release cycle I'm very nervous about
> changing this around.

No worries, 421083c46c97bf758496b8c58402aea5d74aa097 already on master fixes
the issue. We're lagging few weeks behind master branch but trying
to catch up.

Cheers,

-Mikko


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

end of thread, other threads:[~2024-04-04 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 13:29 [PATCH 1/2] linux-yocto-dev: remove duplicate DEPENDS Mikko Rapeli
2024-04-04 13:29 ` [PATCH 2/2] curl: disable ca-certificates.crt path setting for native build Mikko Rapeli
2024-04-04 13:57   ` [OE-core] " Jose Quaresma
2024-04-04 14:14     ` Mikko Rapeli
2024-04-04 14:13   ` Richard Purdie
2024-04-04 14:16     ` Mikko Rapeli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.