Compare commits

...

4 Commits

Author SHA1 Message Date
Richard Purdie
fb91a49387 build-appliance-image: Update to scarthgap head revision
(From OE-Core rev: b65b4e5a8e4473d8ca43835ba17bc8bd4bdca277)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-18 17:14:22 +01:00
Richard Purdie
25b05cb80d curl: Backport patch to fix buildtools issues
bitbake-selftest was failing on a github url on hosts using buildtools.
The issue was tracked down to the curl upgrade 8.6.0 -> 8.7.1. Whilst there
is a fix in upstream git to workaround the issue in this version, backport
the fix from curl upstream to ensure there are no other related issues to
the bug.

(From OE-Core rev: 28ee90b07c70cafbba9149dd4dbe26cae9e214c7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-18 11:58:28 +01:00
Richard Purdie
5b727a8fa1 build-appliance-image: Update to scarthgap head revision
(From OE-Core rev: 09ccab7d0b4d815b812e49a5861a13a4ec0189b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 15:54:22 +01:00
Richard Purdie
845626a36b buildtools-tarball: Add python3-pip
Many of the common use cases for buildtools need pip to allow python to be
extended. Add it.

(From OE-Core rev: 0a1714533ed2b02a98b8456e1193fc079273fbbd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 15:54:00 +01:00
4 changed files with 68 additions and 2 deletions

View File

@@ -26,8 +26,8 @@ inherit core-image setuptools3 features_check
REQUIRED_DISTRO_FEATURES += "xattr"
SRCREV ?= "17723c6e34096a53fb186cc70cfc604bb30da8b9"
SRC_URI = "git://git.yoctoproject.org/poky;branch=master \
SRCREV ?= "25b05cb80d43312ba60742536edc4610f7567f15"
SRC_URI = "git://git.yoctoproject.org/poky;branch=scarthgap \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \

View File

@@ -11,6 +11,7 @@ TOOLCHAIN_HOST_TASK ?= "\
nativesdk-python3-git \
nativesdk-python3-jinja2 \
nativesdk-python3-testtools \
nativesdk-python3-pip \
nativesdk-python3-setuptools \
nativesdk-python3-subunit \
nativesdk-python3-pyyaml \

View File

@@ -0,0 +1,64 @@
From 721941aadf4adf4f6aeb3f4c0ab489bb89610c36 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Mon, 1 Apr 2024 15:41:18 +0200
Subject: [PATCH] http: with chunked POST forced, disable length check on read
callback
- when an application forces HTTP/1.1 chunked transfer encoding
by setting the corresponding header and instructs curl to use
the CURLOPT_READFUNCTION, disregard any POST length information.
- this establishes backward compatibility with previous curl versions
Applications are encouraged to not force "chunked", but rather
set length information for a POST. By setting -1, curl will
auto-select chunked on HTTP/1.1 and work properly on other HTTP
versions.
Reported-by: Jeff King
Fixes #13229
Closes #13257
Upstream-Status: Backport
---
lib/http.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/lib/http.c b/lib/http.c
index 92c04e69cd8373..a764d3c4403c39 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2046,8 +2046,19 @@ static CURLcode set_reader(struct Curl_easy *data, Curl_HttpReq httpreq)
else
result = Curl_creader_set_null(data);
}
- else { /* we read the bytes from the callback */
- result = Curl_creader_set_fread(data, postsize);
+ else {
+ /* we read the bytes from the callback. In case "chunked" encoding
+ * is forced by the application, we disregard `postsize`. This is
+ * a backward compatibility decision to earlier versions where
+ * chunking disregarded this. See issue #13229. */
+ bool chunked = FALSE;
+ char *ptr = Curl_checkheaders(data, STRCONST("Transfer-Encoding"));
+ if(ptr) {
+ /* Some kind of TE is requested, check if 'chunked' is chosen */
+ chunked = Curl_compareheader(ptr, STRCONST("Transfer-Encoding:"),
+ STRCONST("chunked"));
+ }
+ result = Curl_creader_set_fread(data, chunked? -1 : postsize);
}
return result;
@@ -2115,6 +2126,13 @@ CURLcode Curl_http_req_set_reader(struct Curl_easy *data,
data->req.upload_chunky =
Curl_compareheader(ptr,
STRCONST("Transfer-Encoding:"), STRCONST("chunked"));
+ if(data->req.upload_chunky &&
+ Curl_use_http_1_1plus(data, data->conn) &&
+ (data->conn->httpversion >= 20)) {
+ infof(data, "suppressing chunked transfer encoding on connection "
+ "using HTTP version 2 or higher");
+ data->req.upload_chunky = FALSE;
+ }
}
else {
curl_off_t req_clen = Curl_creader_total_length(data);

View File

@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eed2e5088e1ac619c9a1c747da291d75"
SRC_URI = " \
https://curl.se/download/${BP}.tar.xz \
file://721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch \
file://run-ptest \
file://disable-tests \
file://no-test-timeout.patch \