curl: only set CA bundle in target build

In native/nativesdk builds, sysconfdir refers to a recipe sysroot
directory, which will disappear once the workdir is cleaned up, breaking
libcurl's HTTPS connections.

By simply not setting --with-ca-bundle at all in non-target builds, curl
defaults to the host system's CA certificates, which is desirable anyways
to allow builds in environments that require local CA certificates.

(From OE-Core rev: 4909a46e93ba774c960c3d3c277e2a669af3fea6)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Matthias Schiffer
2025-03-20 12:02:33 +01:00
committed by Richard Purdie
parent 239a262c12
commit 7ed9f4b7aa

View File

@@ -72,12 +72,14 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
EXTRA_OECONF = " \
--disable-libcurl-option \
--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 ''} \
WATT_ROOT=${STAGING_DIR_TARGET}${prefix} \
"
EXTRA_OECONF:append:class-target = " \
--with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
"
fix_absolute_paths () {
# cleanup buildpaths from curl-config