From b91ed27ab24499e5ee8489c9957148f1717f1e4c Mon Sep 17 00:00:00 2001 From: Peter Marko Date: Wed, 11 Dec 2024 19:09:53 +0100 Subject: curl: upgrade 8.11.0 -> 8.11.1 Bugfix release for 8.11.0 regressions. Solves CVE-2024-11053 Drop patch which was done differently upstream. (From OE-Core rev: 57731284008c18eee566df3412eaf6d13a59d498) Signed-off-by: Peter Marko Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- ...curl.pc.in-drop-LDFLAGS-from-Libs.private.patch | 39 ------ meta/recipes-support/curl/curl_8.11.0.bb | 155 --------------------- meta/recipes-support/curl/curl_8.11.1.bb | 154 ++++++++++++++++++++ 3 files changed, 154 insertions(+), 194 deletions(-) delete mode 100644 meta/recipes-support/curl/curl/0001-libcurl.pc.in-drop-LDFLAGS-from-Libs.private.patch delete mode 100644 meta/recipes-support/curl/curl_8.11.0.bb create mode 100644 meta/recipes-support/curl/curl_8.11.1.bb diff --git a/meta/recipes-support/curl/curl/0001-libcurl.pc.in-drop-LDFLAGS-from-Libs.private.patch b/meta/recipes-support/curl/curl/0001-libcurl.pc.in-drop-LDFLAGS-from-Libs.private.patch deleted file mode 100644 index 79fc0b316e..0000000000 --- a/meta/recipes-support/curl/curl/0001-libcurl.pc.in-drop-LDFLAGS-from-Libs.private.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cfd5d794fdfcc12e386fdbb14161babf54d2a5ee Mon Sep 17 00:00:00 2001 -From: Peter Marko -Date: Sat, 9 Nov 2024 22:26:58 +0100 -Subject: [PATCH] libcurl.pc.in: drop LDFLAGS from Libs.private - -Stop passing linker flags to pkg-config. - -This was added in v8.11.0 with commit [1]. -There are several problems with this, especially: -* user may want to link curl and application with different flags -* user usually adds the same or similar flags in all components, so this - will double the flags when linking application -* when building components in temporary directories, these directories - are preserved in pkg-config linker flags and are invalid when building - application - -[1] https://github.com/curl/curl/commit/9f56bb608ecfbb8978c6cb72a04d9e8b23162d82 - -Upstream-Status: Submitted [https://github.com/curl/curl/pull/15533] -Signed-off-by: Peter Marko ---- - libcurl.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libcurl.pc.in b/libcurl.pc.in -index 4c60a7ec7..7898dae35 100644 ---- a/libcurl.pc.in -+++ b/libcurl.pc.in -@@ -36,6 +36,6 @@ Version: @CURLVERSION@ - Requires: @LIBCURL_PC_REQUIRES@ - Requires.private: @LIBCURL_PC_REQUIRES_PRIVATE@ - Libs: -L${libdir} -lcurl @LIBCURL_PC_LIBS@ --Libs.private: @LDFLAGS@ @LIBCURL_PC_LIBS_PRIVATE@ -+Libs.private: @LIBCURL_PC_LIBS_PRIVATE@ - Cflags: -I${includedir} @LIBCURL_PC_CFLAGS@ - Cflags.private: @LIBCURL_PC_CFLAGS_PRIVATE@ --- -2.30.2 - diff --git a/meta/recipes-support/curl/curl_8.11.0.bb b/meta/recipes-support/curl/curl_8.11.0.bb deleted file mode 100644 index a512aa443c..0000000000 --- a/meta/recipes-support/curl/curl_8.11.0.bb +++ /dev/null @@ -1,155 +0,0 @@ -SUMMARY = "Command line tool and library for client-side URL transfers" -DESCRIPTION = "It uses URL syntax to transfer data to and from servers. \ -curl is a widely used because of its ability to be flexible and complete \ -complex tasks. For example, you can use curl for things like user authentication, \ -HTTP post, SSL connections, proxy support, FTP uploads, and more!" -HOMEPAGE = "https://curl.se/" -BUGTRACKER = "https://github.com/curl/curl/issues" -SECTION = "console/network" -LICENSE = "curl" -LIC_FILES_CHKSUM = "file://COPYING;md5=eed2e5088e1ac619c9a1c747da291d75" - -SRC_URI = " \ - https://curl.se/download/${BP}.tar.xz \ - file://run-ptest \ - file://disable-tests \ - file://no-test-timeout.patch \ - file://0001-libcurl.pc.in-drop-LDFLAGS-from-Libs.private.patch \ -" -SRC_URI[sha256sum] = "db59cf0d671ca6e7f5c2c5ec177084a33a79e04c97e71cf183a5cdea235054eb" - -# Curl has used many names over the years... -CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" -CVE_STATUS[CVE-2024-32928] = "ignored: CURLOPT_SSL_VERIFYPEER was disabled on google cloud services causing a potential man in the middle attack" - -inherit autotools pkgconfig binconfig multilib_header ptest - -COMMON_PACKAGECONFIG = "basic-auth bearer-auth digest-auth ipfs negotiate-auth openssl proxy threaded-resolver verbose zlib" -PACKAGECONFIG ??= "${COMMON_PACKAGECONFIG} ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} aws libidn" -PACKAGECONFIG:class-native = "${COMMON_PACKAGECONFIG} ipv6" -PACKAGECONFIG:class-nativesdk = "${COMMON_PACKAGECONFIG} ipv6" - -# 'ares' and 'threaded-resolver' are mutually exclusive -PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" -PACKAGECONFIG[aws] = "--enable-aws,--disable-aws" -PACKAGECONFIG[basic-auth] = "--enable-basic-auth,--disable-basic-auth" -PACKAGECONFIG[bearer-auth] = "--enable-bearer-auth,--disable-bearer-auth" -PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" -PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" -# Don't use this in production -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," -PACKAGECONFIG[digest-auth] = "--enable-digest-auth,--disable-digest-auth" -PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" -PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," -PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[ipfs] = "--enable-ipfs,--disable-ipfs," -PACKAGECONFIG[kerberos-auth] = "--enable-kerberos-auth,--disable-kerberos-auth" -PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" -PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap" -PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" -PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" -PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" -PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" -PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" -PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," -PACKAGECONFIG[negotiate-auth] = "--enable-negotiate-auth,--disable-negotiate-auth" -PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" -PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," -PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," -PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" -PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," -PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," -PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," -PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," -PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," -PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" -PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" -PACKAGECONFIG[websockets] = "--enable-websockets,--disable-websockets" -PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" -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 ''} \ -" - -fix_absolute_paths () { - # cleanup buildpaths from curl-config - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \ - ${D}${bindir}/curl-config -} - -do_install:append:class-target() { - fix_absolute_paths -} - -do_install:append:class-nativesdk() { - fix_absolute_paths -} - -do_compile_ptest() { - oe_runmake -C ${B}/tests -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp ${S}/tests/*.p[lmy] ${D}${PTEST_PATH}/tests/ - - install -d ${D}${PTEST_PATH}/tests/libtest - for name in $(makefile-getvar ${B}/tests/libtest/Makefile noinst_PROGRAMS noinst_LTLIBRARIES); do - ${B}/libtool --mode=install install ${B}/tests/libtest/$name ${D}${PTEST_PATH}/tests/libtest - done - rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la - - install -d ${D}${PTEST_PATH}/tests/server - for name in $(makefile-getvar ${B}/tests/server/Makefile noinst_PROGRAMS); do - ${B}/libtool --mode=install install ${B}/tests/server/$name ${D}${PTEST_PATH}/tests/server - done - - cp -r ${S}/tests/data ${D}${PTEST_PATH}/tests/ - - # More tests that we disable for automated QA as they're not reliable - cat ${UNPACKDIR}/disable-tests >>${D}${PTEST_PATH}/tests/data/DISABLED -} - -RDEPENDS:${PN}-ptest += " \ - locale-base-en-us \ - perl-module-b \ - perl-module-base \ - perl-module-cwd \ - perl-module-digest \ - perl-module-digest-md5 \ - perl-module-digest-sha \ - perl-module-file-basename \ - perl-module-file-spec \ - perl-module-file-temp \ - perl-module-i18n-langinfo \ - perl-module-io-socket \ - perl-module-ipc-open2 \ - perl-module-list-util \ - perl-module-memoize \ - perl-module-storable \ - perl-module-time-hires \ -" - -PACKAGES =+ "lib${BPN}" - -FILES:lib${BPN} = "${libdir}/lib*.so.*" -RRECOMMENDS:lib${BPN} += "ca-certificates" - -FILES:${PN} += "${datadir}/zsh" - -inherit multilib_script -MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/curl/curl_8.11.1.bb b/meta/recipes-support/curl/curl_8.11.1.bb new file mode 100644 index 0000000000..b4d80e9643 --- /dev/null +++ b/meta/recipes-support/curl/curl_8.11.1.bb @@ -0,0 +1,154 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +DESCRIPTION = "It uses URL syntax to transfer data to and from servers. \ +curl is a widely used because of its ability to be flexible and complete \ +complex tasks. For example, you can use curl for things like user authentication, \ +HTTP post, SSL connections, proxy support, FTP uploads, and more!" +HOMEPAGE = "https://curl.se/" +BUGTRACKER = "https://github.com/curl/curl/issues" +SECTION = "console/network" +LICENSE = "curl" +LIC_FILES_CHKSUM = "file://COPYING;md5=eed2e5088e1ac619c9a1c747da291d75" + +SRC_URI = " \ + https://curl.se/download/${BP}.tar.xz \ + file://run-ptest \ + file://disable-tests \ + file://no-test-timeout.patch \ +" +SRC_URI[sha256sum] = "c7ca7db48b0909743eaef34250da02c19bc61d4f1dcedd6603f109409536ab56" + +# Curl has used many names over the years... +CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" +CVE_STATUS[CVE-2024-32928] = "ignored: CURLOPT_SSL_VERIFYPEER was disabled on google cloud services causing a potential man in the middle attack" + +inherit autotools pkgconfig binconfig multilib_header ptest + +COMMON_PACKAGECONFIG = "basic-auth bearer-auth digest-auth ipfs negotiate-auth openssl proxy threaded-resolver verbose zlib" +PACKAGECONFIG ??= "${COMMON_PACKAGECONFIG} ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} aws libidn" +PACKAGECONFIG:class-native = "${COMMON_PACKAGECONFIG} ipv6" +PACKAGECONFIG:class-nativesdk = "${COMMON_PACKAGECONFIG} ipv6" + +# 'ares' and 'threaded-resolver' are mutually exclusive +PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" +PACKAGECONFIG[aws] = "--enable-aws,--disable-aws" +PACKAGECONFIG[basic-auth] = "--enable-basic-auth,--disable-basic-auth" +PACKAGECONFIG[bearer-auth] = "--enable-bearer-auth,--disable-bearer-auth" +PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" +PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" +# Don't use this in production +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" +PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," +PACKAGECONFIG[digest-auth] = "--enable-digest-auth,--disable-digest-auth" +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," +PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[ipfs] = "--enable-ipfs,--disable-ipfs," +PACKAGECONFIG[kerberos-auth] = "--enable-kerberos-auth,--disable-kerberos-auth" +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap" +PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" +PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" +PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" +PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" +PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," +PACKAGECONFIG[negotiate-auth] = "--enable-negotiate-auth,--disable-negotiate-auth" +PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" +PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," +PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," +PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" +PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," +PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," +PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," +PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," +PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" +PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" +PACKAGECONFIG[websockets] = "--enable-websockets,--disable-websockets" +PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" +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 ''} \ +" + +fix_absolute_paths () { + # cleanup buildpaths from curl-config + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \ + ${D}${bindir}/curl-config +} + +do_install:append:class-target() { + fix_absolute_paths +} + +do_install:append:class-nativesdk() { + fix_absolute_paths +} + +do_compile_ptest() { + oe_runmake -C ${B}/tests +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp ${S}/tests/*.p[lmy] ${D}${PTEST_PATH}/tests/ + + install -d ${D}${PTEST_PATH}/tests/libtest + for name in $(makefile-getvar ${B}/tests/libtest/Makefile noinst_PROGRAMS noinst_LTLIBRARIES); do + ${B}/libtool --mode=install install ${B}/tests/libtest/$name ${D}${PTEST_PATH}/tests/libtest + done + rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la + + install -d ${D}${PTEST_PATH}/tests/server + for name in $(makefile-getvar ${B}/tests/server/Makefile noinst_PROGRAMS); do + ${B}/libtool --mode=install install ${B}/tests/server/$name ${D}${PTEST_PATH}/tests/server + done + + cp -r ${S}/tests/data ${D}${PTEST_PATH}/tests/ + + # More tests that we disable for automated QA as they're not reliable + cat ${UNPACKDIR}/disable-tests >>${D}${PTEST_PATH}/tests/data/DISABLED +} + +RDEPENDS:${PN}-ptest += " \ + locale-base-en-us \ + perl-module-b \ + perl-module-base \ + perl-module-cwd \ + perl-module-digest \ + perl-module-digest-md5 \ + perl-module-digest-sha \ + perl-module-file-basename \ + perl-module-file-spec \ + perl-module-file-temp \ + perl-module-i18n-langinfo \ + perl-module-io-socket \ + perl-module-ipc-open2 \ + perl-module-list-util \ + perl-module-memoize \ + perl-module-storable \ + perl-module-time-hires \ +" + +PACKAGES =+ "lib${BPN}" + +FILES:lib${BPN} = "${libdir}/lib*.so.*" +RRECOMMENDS:lib${BPN} += "ca-certificates" + +FILES:${PN} += "${datadir}/zsh" + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf