Message ID | 20250408093822.479573-2-changqing.li@windriver.com |
---|---|
State | Accepted, archived |
Commit | 183e043de423fd3f7833366ca524a6f7d17e6d14 |
Headers | show |
Series | [1/2] buildtools-tarball: move setting of envvars to respective envfile | expand |
Hi, Following error is reported without this commit: "7ed9f4b7aa curl: only set CA bundle in target build" Cloning into 'protobuf'... fatal: unable to access 'https://github.com/protocolbuffers/protobuf/': error setting certificate file: /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-wrlinuxsdk-linux/etc/ssl/certs/ca-certificates.crt With commit "7ed9f4b7aa curl: only set CA bundle in target build", git clone still failed, but with another error: fatal: unable to access 'https://github.com/protocolbuffers/protobuf/': SSL certificate problem: unable to get local issuer certificate For native-curl, if we don't set --with-ca-bundle, since it is not cross-compile, it will detect the default CA cert bundle/path, that is host cert. but for nativesdk-curl, it is detect as cross-compile(build=x86_64-linux, host=x86_64-pokysdk-linux), so no default CA cert bundle is detect. So report error "unable to get local issuer certificate". I think we still need to add GIT_SSL_CAINFO/CURL_CA_BUNDLE/REQUESTS_CA_BUNDLE into BB_ENV_PASSTHROUGH_ADDITIONS. But another patch is needed to try to make curl use host cert by default. Regards Changqing
diff --git a/meta/recipes-devtools/git/git/environment.d-git.sh b/meta/recipes-devtools/git/git/environment.d-git.sh index 18104f0528..f8e3221510 100644 --- a/meta/recipes-devtools/git/git/environment.d-git.sh +++ b/meta/recipes-devtools/git/git/environment.d-git.sh @@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export GIT_SSL_CAINFO="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} GIT_SSL_CAINFO" fi diff --git a/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh b/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh index f2eee203ca..c7faec127d 100644 --- a/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh +++ b/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh @@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} REQUESTS_CA_BUNDLE" fi diff --git a/meta/recipes-support/curl/curl/environment.d-curl.sh b/meta/recipes-support/curl/curl/environment.d-curl.sh index 0d53aabb8e..0ab83a267d 100644 --- a/meta/recipes-support/curl/curl/environment.d-curl.sh +++ b/meta/recipes-support/curl/curl/environment.d-curl.sh @@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export CURL_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} CURL_CA_BUNDLE" fi