]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
curl: only set CA bundle in target build
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Thu, 20 Mar 2025 11:02:33 +0000 (12:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Mar 2025 17:16:33 +0000 (17:16 +0000)
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.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/curl/curl_8.12.1.bb

index 1e9e5a022917647e87180ad7e9600c3c50494efc..dd1c89979a7e380f1b850baf69c5cce0af83565d 100644 (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