Patch review
cover Patch review
Please review this set of changes for mickledore and have comments back by end of day Tuesday, October 17
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6043
The following changes since commit c451a9cb6adbc9480dacd81e935a0b9369f22e07:
libgudev: explicitly disable tests and vapi (2023-10-11 08:01:07 -1000)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/mickledore-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/mickledore-nut
Alexander Kanavin (9):
gzip: update 1.12 -> 1.13
screen: update 4.9.0 -> 4.9.1
runqemu: check permissions of available render nodes as well as their
presence
build-sysroots: target or native sysroot population need to be
selected explicitly
igt-gpu-tools: do not write shortened git commit hash into binaries
ptest: report tests that were killed on timeout
strace: parallelize ptest
openssl: parallelize tests
openssl: ensure all ptest fails are caught
Archana Polampalli (2):
curl: fix CVE-2023-38545
curl: fix CVE-2023-38546
Eilís 'pidge' Ní Fhlannagáin (1):
nativesdk-intercept: Fix bad intercept chgrp/chown logic
Joe Slater (1):
ghostscript: fix CVE-2023-43115
Khem Raj (1):
libc-test: Run as non-root user
Mikko Rapeli (2):
oeqa dnf_runtime.py: fix HTTP server IP address and port oeqa/selftest/context.py: check git command return values
Otavio Salvador (2):
weston-init: remove misleading comment about udev rule
weston-init: fix init code indentation
Peter Kjellerstedt (1):
libsoup-2.4: Only specify --cross-file when building for target
Richard Purdie (1):
oeqa/selftest/wic: Improve assertTrue calls
Ross Burton (1):
avahi: handle invalid service types gracefully
Siddharth Doshi (1):
vim: Upgrade 9.0.1894 -> 9.0.2009
Stefan Tauner (1):
gdb: fix RDEPENDS for PACKAGECONFIG[tui]
Wang Mingyu (2):
dbus: upgrade 1.14.8 -> 1.14.10
wireless-regdb: upgrade 2023.05.03 -> 2023.09.01
Yogita Urade (2):
tiff: fix CVE-2023-40745
tiff: fix CVE-2023-41175
.../lib/oeqa/runtime/cases/dnf_runtime.py | 3 +-
meta/files/ext-sdk-prepare.py | 2 +-
meta/lib/oeqa/runtime/cases/ptest.py | 2 +-
meta/lib/oeqa/selftest/cases/meta_ide.py | 5 +-
meta/lib/oeqa/selftest/cases/wic.py | 36 ++---
meta/lib/oeqa/selftest/context.py | 2 +-
meta/recipes-connectivity/avahi/avahi_0.8.bb | 1 +
.../avahi/files/invalid-service.patch | 29 ++++
.../openssl/openssl/run-ptest | 2 +-
.../dbus/{dbus_1.14.8.bb => dbus_1.14.10.bb} | 2 +-
meta/recipes-core/meta/build-sysroots.bb | 12 +-
.../musl/libc-test/run-libc-ptests | 28 ++++
meta/recipes-core/musl/libc-test/run-ptest | 29 +---
meta/recipes-core/musl/libc-test_git.bb | 5 +
meta/recipes-devtools/gdb/gdb-common.inc | 3 +-
meta/recipes-devtools/strace/strace/run-ptest | 2 +-
.../ghostscript/CVE-2023-43115.patch | 62 +++++++
.../ghostscript/ghostscript_10.0.0.bb | 1 +
.../wrong-path-fix.patch | 0
.../gzip/{gzip_1.12.bb => gzip_1.13.bb} | 6 +-
...-Add-needed-system-headers-in-checks.patch | 151 ------------------
.../screen/screen/signal-permission.patch | 40 -----
.../{screen_4.9.0.bb => screen_4.9.1.bb} | 4 +-
.../igt-gpu-tools/igt-gpu-tools_git.bb | 2 +-
meta/recipes-graphics/wayland/weston-init.bb | 2 +-
.../recipes-graphics/wayland/weston-init/init | 2 +-
....05.03.bb => wireless-regdb_2023.09.01.bb} | 2 +-
.../libtiff/files/CVE-2023-40745.patch | 35 ++++
.../libtiff/files/CVE-2023-41175.patch | 63 ++++++++
meta/recipes-multimedia/libtiff/tiff_4.5.1.bb | 5 +-
.../curl/curl/CVE-2023-38545.patch | 133 +++++++++++++++
.../curl/curl/CVE-2023-38546.patch | 137 ++++++++++++++++
meta/recipes-support/curl/curl_8.0.1.bb | 2 +
.../libsoup/libsoup-2.4_2.74.3.bb | 2 +-
meta/recipes-support/vim/vim.inc | 4 +-
scripts/lib/devtool/sdk.py | 3 +-
scripts/nativesdk-intercept/chgrp | 5 +-
scripts/nativesdk-intercept/chown | 5 +-
scripts/runqemu | 14 +-
39 files changed, 575 insertions(+), 268 deletions(-)
create mode 100644 meta/recipes-connectivity/avahi/files/invalid-service.patch
rename meta/recipes-core/dbus/{dbus_1.14.8.bb => dbus_1.14.10.bb} (98%)
create mode 100644 meta/recipes-core/musl/libc-test/run-libc-ptests
create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2023-43115.patch
rename meta/recipes-extended/gzip/{gzip-1.12 => gzip-1.13}/wrong-path-fix.patch (100%)
rename meta/recipes-extended/gzip/{gzip_1.12.bb => gzip_1.13.bb} (88%)
delete mode 100644 meta/recipes-extended/screen/screen/0001-configure-Add-needed-system-headers-in-checks.patch
delete mode 100644 meta/recipes-extended/screen/screen/signal-permission.patch
rename meta/recipes-extended/screen/{screen_4.9.0.bb => screen_4.9.1.bb} (89%)
rename meta/recipes-kernel/wireless-regdb/{wireless-regdb_2023.05.03.bb => wireless-regdb_2023.09.01.bb} (94%)
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-41175.patch
create mode 100644 meta/recipes-support/curl/curl/CVE-2023-38545.patch
create mode 100644 meta/recipes-support/curl/curl/CVE-2023-38546.patchSignature · 1 line
2.34.1
PATCH 1/27 tiff: fix CVE-2023-40745
From: Yogita Urade <[email protected]>
libtiff: integer overflow in tiffcp.c
References:
https://security-tracker.debian.org/tracker/CVE-2023-40745
https://gitlab.com/libtiff/libtiff/-/issues/591
https://bugzilla.redhat.com/show_bug.cgi?id=2235265
--- .../libtiff/files/CVE-2023-40745.patch | 35 +++++++++++++++++++ meta/recipes-multimedia/libtiff/tiff_4.5.1.bb | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 4fc16f649fa2875d5c388cf2edc295510a247ee5 Mon Sep 17 00:00:00 2001 +From: Arie Haenel <[email protected]> +Date: Thu, 14 Sep 2023 04:31:35 +0000 +Subject: [PATCH] tiffcp: fix memory corruption (overflow) on hostile images + (fixes #591) + +CVE: CVE-2023-40745 + +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5] + +Signed-off-by: Yogita Urade <[email protected]> +--- + tools/tiffcp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tools/tiffcp.c b/tools/tiffcp.c +index 3b2d1dd..57fa6e8 100644 +--- a/tools/tiffcp.c ++++ b/tools/tiffcp.c +@@ -1754,6 +1754,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) + "Width * Samples/Pixel)"); + return 0; + } ++ ++ if ( (imagew - tilew * spp) > INT_MAX ){ ++ TIFFError(TIFFFileName(in), ++ "Error, image raster scan line size is too large"); ++ return 0; ++ } ++ + iskew = imagew - tilew * spp; + tilebuf = limitMalloc(tilesize); + if (tilebuf == 0) +-- +2.35.5
meta/recipes-multimedia/libtiff/tiff_4.5.1.bb +3 -1
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ + file://CVE-2023-40745.patch \ + " SRC_URI[sha256sum] = "d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b"
Signature · 1 line
2.34.1
PATCH 2/27 tiff: fix CVE-2023-41175
In reply to Steve SakomanFrom: Yogita Urade <[email protected]>
libtiff: potential integer overflow in raw2tiff.c
References:
https://bugzilla.redhat.com/show_bug.cgi?id=2235264
https://security-tracker.debian.org/tracker/CVE-2023-41175
https://gitlab.com/libtiff/libtiff/-/issues/592
--- .../libtiff/files/CVE-2023-41175.patch | 63 +++++++++++++++++++ meta/recipes-multimedia/libtiff/tiff_4.5.1.bb | 1 + 2 files changed, 64 insertions(+) create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-41175.patch
meta/recipes-multimedia/libtiff/files/CVE-2023-41175.patch new file +63 -0
@@ -0,0 +1,63 @@ +From 6e2dac5f904496d127c92ddc4e56eccfca25c2ee Mon Sep 17 00:00:00 2001 +From: Arie Haenel <[email protected]> +Date: Thu, 14 Sep 2023 04:36:58 +0000 +Subject: [PATCH] raw2tiff: fix integer overflow and bypass of the check (fixes + #592) + +CVE: CVE-2023-41175 + +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/6e2dac5f904496d127c92ddc4e56eccfca25c2ee] + +Signed-off-by: Yogita Urade <[email protected]> +--- + tools/raw2tiff.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c +index 4ee59e5..a811077 100644 +--- a/tools/raw2tiff.c ++++ b/tools/raw2tiff.c +@@ -101,6 +101,7 @@ int main(int argc, char *argv[]) + int fd; + char *outfilename = NULL; + TIFF *out; ++ uint32_t temp_limit_check = 0; /* temp for integer overflow checking*/ + + uint32_t row, col, band; + int c; +@@ -221,6 +222,33 @@ int main(int argc, char *argv[]) + if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0) + return EXIT_FAILURE; + ++ /* check for integer overflow in */ ++ /* hdr_size + (*width) * (*length) * nbands * depth */ ++ ++ if ((width == 0) || (length == 0) ){ ++ fprintf(stderr, "Too large nbands value specified.\n"); ++ return (EXIT_FAILURE); ++ } ++ ++ temp_limit_check = nbands * depth; ++ ++ if ( !temp_limit_check || length > ( UINT_MAX / temp_limit_check ) ) { ++ fprintf(stderr, "Too large length size specified.\n"); ++ return (EXIT_FAILURE); ++ } ++ temp_limit_check = temp_limit_check * length; ++ ++ if ( !temp_limit_check || width > ( UINT_MAX / temp_limit_check ) ) { ++ fprintf(stderr, "Too large width size specified.\n"); ++ return (EXIT_FAILURE); ++ } ++ temp_limit_check = temp_limit_check * width; ++ ++ if ( !temp_limit_check || hdr_size > ( UINT_MAX - temp_limit_check ) ) { ++ fprintf(stderr, "Too large header size specified.\n"); ++ return (EXIT_FAILURE); ++ } ++ + if (outfilename == NULL) + outfilename = argv[optind + 1]; + out = TIFFOpen(outfilename, "w"); +-- +2.35.5
meta/recipes-multimedia/libtiff/tiff_4.5.1.bb +1 -0
@@ -10,6 +10,7 @@ CVE_PRODUCT = "libtiff" SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ file://CVE-2023-40745.patch \ + file://CVE-2023-41175.patch \ " SRC_URI[sha256sum] = "d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b"
Signature · 1 line
2.34.1
PATCH 3/27 ghostscript: fix CVE-2023-43115
In reply to Steve SakomanFrom: Joe Slater <[email protected]>
The patch is copied from kirkstone. master has advanced to ghostscript 10.02.0 which includes the fix.
--- .../ghostscript/CVE-2023-43115.patch | 62 +++++++++++++++++++ .../ghostscript/ghostscript_10.0.0.bb | 1 + 2 files changed, 63 insertions(+) create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2023-43115.patch
meta/recipes-extended/ghostscript/ghostscript/CVE-2023-43115.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 8b0f20002536867bd73ff4552408a72597190cbe Mon Sep 17 00:00:00 2001 +From: Ken Sharp <[email protected]> +Date: Thu, 24 Aug 2023 15:24:35 +0100 +Subject: [PATCH] IJS device - try and secure the IJS server startup + +Bug #707051 ""ijs" device can execute arbitrary commands" + +The problem is that the 'IJS' device needs to start the IJS server, and +that is indeed an arbitrary command line. There is (apparently) no way +to validate it. Indeed, this is covered quite clearly in the comments +at the start of the source: + + * WARNING: The ijs server can be selected on the gs command line + * which is a security risk, since any program can be run. + +Previously this used the awful LockSafetyParams hackery, which we +abandoned some time ago because it simply couldn't be made secure (it +was implemented in PostScript and was therefore vulnerable to PostScript +programs). + +This commit prevents PostScript programs switching to the IJS device +after SAFER has been activated, and prevents changes to the IjsServer +parameter after SAFER has been activated. + +SAFER is activated, unless explicitly disabled, before any user +PostScript is executed which means that the device and the server +invocation can only be configured on the command line. This does at +least provide minimal security against malicious PostScript programs. + +Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=8b0f20002536867bd73ff4552408a72597190cbe] + +CVE: CVE-2023-43115 + +Signed-off-by: Archana Polampalli <[email protected]> +--- + devices/gdevijs.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/devices/gdevijs.c b/devices/gdevijs.c +index 8cbd84b97..16f5a1752 100644 +--- a/devices/gdevijs.c ++++ b/devices/gdevijs.c +@@ -888,6 +888,8 @@ gsijs_initialize_device(gx_device *dev) + static const char rgb[] = "DeviceRGB"; + gx_device_ijs *ijsdev = (gx_device_ijs *)dev; + ++ if (ijsdev->memory->gs_lib_ctx->core->path_control_active) ++ return_error(gs_error_invalidaccess); + if (!ijsdev->ColorSpace) { + ijsdev->ColorSpace = gs_malloc(ijsdev->memory, sizeof(rgb), 1, + "gsijs_initialize"); +@@ -1326,7 +1328,7 @@ gsijs_put_params(gx_device *dev, gs_param_list *plist) + if (code >= 0) + code = gsijs_read_string(plist, "IjsServer", + ijsdev->IjsServer, sizeof(ijsdev->IjsServer), +- dev->LockSafetyParams, is_open); ++ ijsdev->memory->gs_lib_ctx->core->path_control_active, is_open); + + if (code >= 0) + code = gsijs_read_string_malloc(plist, "DeviceManufacturer", +-- +2.40.0
meta/recipes-extended/ghostscript/ghostscript_10.0.0.bb +1 -0
@@ -37,6 +37,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d file://cve-2023-28879.patch \ file://cve-2023-36664.patch \ file://CVE-2023-38559.patch \ + file://CVE-2023-43115.patch \ " SRC_URI = "${SRC_URI_BASE} \
Signature · 1 line
2.34.1
PATCH 4/27 curl: fix CVE-2023-38545
In reply to Steve SakomanFrom: Archana Polampalli <[email protected]>
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake.
--- .../curl/curl/CVE-2023-38545.patch | 133 ++++++++++++++++++ meta/recipes-support/curl/curl_8.0.1.bb | 1 + 2 files changed, 134 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2023-38545.patch
meta/recipes-support/curl/curl/CVE-2023-38545.patch new file +133 -0
@@ -0,0 +1,133 @@ +From fb4415d8aee6c1045be932a34fe6107c2f5ed147 Mon Sep 17 00:00:00 2001 +From: Jay Satiro <[email protected]> +Date: Wed, 11 Oct 2023 07:34:19 +0200 +Subject: [PATCH] socks: return error if hostname too long for remote resolve + +Prior to this change the state machine attempted to change the remote +resolve to a local resolve if the hostname was longer than 255 +characters. Unfortunately that did not work as intended and caused a +security issue. + +Bug: https://curl.se/docs/CVE-2023-38545.html + +Upstream-Status: Backport [https://github.com/curl/curl/commit/fb4415d8aee6c1045be932a34fe6107c2f5ed147] +CVE: CVE-2023-38545 +Signed-off-by: Archana Polampalli <[email protected]> +--- + lib/socks.c | 8 +++--- + tests/data/Makefile.inc | 2 +- + tests/data/test722 | 64 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 69 insertions(+), 5 deletions(-) + create mode 100644 tests/data/test722 + +diff --git a/lib/socks.c b/lib/socks.c +index 95c2b00..8cf694d 100644 +--- a/lib/socks.c ++++ b/lib/socks.c +@@ -588,9 +588,9 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf, + + /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */ + if(!socks5_resolve_local && hostname_len > 255) { +- infof(data, "SOCKS5: server resolving disabled for hostnames of " +- "length > 255 [actual len=%zu]", hostname_len); +- socks5_resolve_local = TRUE; ++ failf(data, "SOCKS5: the destination hostname is too long to be " ++ "resolved remotely by the proxy."); ++ return CURLPX_LONG_HOSTNAME; + } + + if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) +@@ -904,7 +904,7 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf, + } + else { + socksreq[len++] = 3; +- socksreq[len++] = (char) hostname_len; /* one byte address length */ ++ socksreq[len++] = (unsigned char) hostname_len; /* one byte length */ + memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */ + len += hostname_len; + } +diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc +index 7ed03a2..643c9fe 100644 +--- a/tests/data/Makefile.inc ++++ b/tests/data/Makefile.inc +@@ -100,7 +100,7 @@ test679 test680 test681 test682 test683 test684 test685 test686 \ + \ + test700 test701 test702 test703 test704 test705 test706 test707 test708 \ + test709 test710 test711 test712 test713 test714 test715 test716 test717 \ +-test718 test719 test720 test721 \ ++test718 test719 test720 test721 test722 \ + \ + test800 test801 test802 test803 test804 test805 test806 test807 test808 \ + test809 test810 test811 test812 test813 test814 test815 test816 test817 \ +diff --git a/tests/data/test722 b/tests/data/test722 +new file mode 100644 +index 0000000..05bcf28 +--- /dev/null ++++ b/tests/data/test722 +@@ -0,0 +1,64 @@ ++<testcase> ++<info> ++<keywords> ++HTTP ++HTTP GET ++SOCKS5 ++SOCKS5h ++followlocation ++</keywords> ++</info> ++ ++# ++# Server-side ++<reply> ++# The hostname in this redirect is 256 characters and too long (> 255) for ++# SOCKS5 remote resolve. curl must return error CURLE_PROXY in this case. ++<data> ++HTTP/1.1 301 Moved Permanently ++Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/ ++Content-Length: 0 ++Connection: close ++ ++</data> ++</reply> ++ ++# ++# Client-side ++<client> ++<features> ++proxy ++</features> ++<server> ++http ++socks5 ++</server> ++ <name> ++SOCKS5h with HTTP redirect to hostname too long ++ </name> ++ <command> ++--no-progress-meter --location --proxy socks5h://%HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER ++</command> ++</client> ++ ++# ++# Verify data after the test has been "shot" ++<verify> ++<protocol crlf="yes"> ++GET /%TESTNUMBER HTTP/1.1 ++Host: %HOSTIP:%HTTPPORT ++User-Agent: curl/%VERSION ++Accept: */* ++ ++</protocol> ++<errorcode> ++97 ++</errorcode> ++# the error message is verified because error code CURLE_PROXY (97) may be ++# returned for any number of reasons and we need to make sure it is ++# specifically for the reason below so that we know the check is working. ++<stderr mode="text"> ++curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy. ++</stderr> ++</verify> ++</testcase> +-- +2.40.0
meta/recipes-support/curl/curl_8.0.1.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = " \ file://CVE-2023-28321.patch \ file://CVE-2023-32001.patch \ file://CVE-2023-28320-fol1.patch \ + file://CVE-2023-38545.patch \ " SRC_URI[sha256sum] = "0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0"
Signature · 1 line
2.34.1
PATCH 5/27 curl: fix CVE-2023-38546
In reply to Steve SakomanFrom: Archana Polampalli <[email protected]>
A flaw was found in the Curl package. This flaw allows an attacker to insert cookies into a running program using libcurl if the specific series of conditions are met.
--- .../curl/curl/CVE-2023-38546.patch | 137 ++++++++++++++++++ meta/recipes-support/curl/curl_8.0.1.bb | 1 + 2 files changed, 138 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2023-38546.patch
meta/recipes-support/curl/curl/CVE-2023-38546.patch new file +137 -0
@@ -0,0 +1,137 @@ +From 61275672b46d9abb3285740467b882e22ed75da8 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Thu, 14 Sep 2023 23:28:32 +0200 +Subject: [PATCH] cookie: remove unnecessary struct fields + +Plus: reduce the hash table size from 256 to 63. It seems unlikely to +make much of a speed difference for most use cases but saves 1.5KB of +data per instance. + +Closes #11862 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/61275672b46d9abb32857404] + +CVE: CVE-2023-38546 + +Signed-off-by: Archana Polampalli <[email protected]> +--- + lib/cookie.c | 13 +------------ + lib/cookie.h | 14 ++++---------- + lib/easy.c | 4 +--- + 3 files changed, 6 insertions(+), 25 deletions(-) + +diff --git a/lib/cookie.c b/lib/cookie.c +index 0c6e0f7..d346203 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -119,7 +119,6 @@ static void freecookie(struct Cookie *co) + free(co->name); + free(co->value); + free(co->maxage); +- free(co->version); + free(co); + } + +@@ -726,11 +725,7 @@ Curl_cookie_add(struct Curl_easy *data, + } + } + else if((nlen == 7) && strncasecompare("version", namep, 7)) { +- strstore(&co->version, valuep, vlen); +- if(!co->version) { +- badcookie = TRUE; +- break; +- } ++ /* just ignore */ + } + else if((nlen == 7) && strncasecompare("max-age", namep, 7)) { + /* +@@ -1174,7 +1169,6 @@ Curl_cookie_add(struct Curl_easy *data, + free(clist->path); + free(clist->spath); + free(clist->expirestr); +- free(clist->version); + free(clist->maxage); + + *clist = *co; /* then store all the new data */ +@@ -1238,9 +1232,6 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, + c = calloc(1, sizeof(struct CookieInfo)); + if(!c) + return NULL; /* failed to get memory */ +- c->filename = strdup(file?file:"none"); /* copy the name just in case */ +- if(!c->filename) +- goto fail; /* failed to get memory */ + /* + * Initialize the next_expiration time to signal that we don't have enough + * information yet. +@@ -1394,7 +1385,6 @@ static struct Cookie *dup_cookie(struct Cookie *src) + CLONE(name); + CLONE(value); + CLONE(maxage); +- CLONE(version); + d->expires = src->expires; + d->tailmatch = src->tailmatch; + d->secure = src->secure; +@@ -1611,7 +1601,6 @@ void Curl_cookie_cleanup(struct CookieInfo *c) + { + if(c) { + unsigned int i; +- free(c->filename); + for(i = 0; i < COOKIE_HASH_SIZE; i++) + Curl_cookie_freelist(c->cookies[i]); + free(c); /* free the base struct as well */ +diff --git a/lib/cookie.h b/lib/cookie.h +index 39bb08b..3a43bbf 100644 +--- a/lib/cookie.h ++++ b/lib/cookie.h +@@ -36,11 +36,7 @@ struct Cookie { + char *domain; /* domain = <this> */ + curl_off_t expires; /* expires = <this> */ + char *expirestr; /* the plain text version */ +- +- /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */ +- char *version; /* Version = <value> */ + char *maxage; /* Max-Age = <value> */ +- + bool tailmatch; /* whether we do tail-matching of the domain name */ + bool secure; /* whether the 'secure' keyword was used */ + bool livecookie; /* updated from a server, not a stored file */ +@@ -56,18 +52,16 @@ struct Cookie { + #define COOKIE_PREFIX__SECURE (1<<0) + #define COOKIE_PREFIX__HOST (1<<1) + +-#define COOKIE_HASH_SIZE 256 ++#define COOKIE_HASH_SIZE 63 + + struct CookieInfo { + /* linked list of cookies we know of */ + struct Cookie *cookies[COOKIE_HASH_SIZE]; +- +- char *filename; /* file we read from/write to */ +- long numcookies; /* number of cookies in the "jar" */ ++ curl_off_t next_expiration; /* the next time at which expiration happens */ ++ int numcookies; /* number of cookies in the "jar" */ ++ int lastct; /* last creation-time used in the jar */ + bool running; /* state info, for cookie adding information */ + bool newsession; /* new session, discard session cookies on load */ +- int lastct; /* last creation-time used in the jar */ +- curl_off_t next_expiration; /* the next time at which expiration happens */ + }; + + /* This is the maximum line length we accept for a cookie line. RFC 2109 +diff --git a/lib/easy.c b/lib/easy.c +index 27124a7..fddf047 100644 +--- a/lib/easy.c ++++ b/lib/easy.c +@@ -911,9 +911,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) + if(data->cookies) { + /* If cookies are enabled in the parent handle, we enable them + in the clone as well! */ +- outcurl->cookies = Curl_cookie_init(data, +- data->cookies->filename, +- outcurl->cookies, ++ outcurl->cookies = Curl_cookie_init(data, NULL, outcurl->cookies, + data->set.cookiesession); + if(!outcurl->cookies) + goto fail; +-- +2.40.0
meta/recipes-support/curl/curl_8.0.1.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = " \ file://CVE-2023-32001.patch \ file://CVE-2023-28320-fol1.patch \ file://CVE-2023-38545.patch \ + file://CVE-2023-38546.patch \ " SRC_URI[sha256sum] = "0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0"
Signature · 1 line
2.34.1
PATCH 6/27 dbus: upgrade 1.14.8 -> 1.14.10
In reply to Steve SakomanFrom: Wang Mingyu <[email protected]>
Changelog:
===========
• Avoid a dbus-daemon crash if re-creating a connection's policy fails.
• If getting the groups from a user ID fails, report the error correctly, instead of logging "(null)"
• Return the primary group ID in GetConnectionCredentials()' UnixGroupIDs field for processes with a valid-but-empty supplementary group list
---
meta/recipes-core/dbus/{dbus_1.14.8.bb => dbus_1.14.10.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-core/dbus/{dbus_1.14.8.bb => dbus_1.14.10.bb} (98%)meta/recipes-core/dbus/dbus_1.14.10.bb renamed from meta/recipes-core/dbus/dbus_1.14.8.bb +1 -1
@@ -16,7 +16,7 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.xz \ file://dbus-1.init \ " -SRC_URI[sha256sum] = "a6bd5bac5cf19f0c3c594bdae2565a095696980a683a0ef37cb6212e093bde35" +SRC_URI[sha256sum] = "ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f" EXTRA_OECONF = "--disable-xml-docs \ --disable-doxygen-docs \
Signature · 1 line
2.34.1
PATCH 7/27 wireless-regdb: upgrade 2023.05.03 -> 2023.09.01
In reply to Steve SakomanFrom: Wang Mingyu <[email protected]>
Changelog:
==========
wireless-regdb: update regulatory database based on preceding changes
wireless-regdb: Update regulatory rules for Australia (AU) for June 2023
wireless-regdb: Update regulatory info for Türkiye (TR)
wireless-regdb: Update regulatory rules for Egypt (EG) from March 2022 guidel...
wireless-regdb: Update regulatory rules for Philippines (PH)
---
...ireless-regdb_2023.05.03.bb => wireless-regdb_2023.09.01.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-kernel/wireless-regdb/{wireless-regdb_2023.05.03.bb => wireless-regdb_2023.09.01.bb} (94%)meta/recipes-kernel/wireless-regdb/wireless-regdb_2023.09.01.bb renamed from meta/recipes-kernel/wireless-regdb/wireless-regdb_2023.05.03.bb +1 -1
@@ -5,7 +5,7 @@ LICENSE = "ISC" LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" -SRC_URI[sha256sum] = "f254d08ab3765aeae2b856222e11a95d44aef519a6663877c71ef68fae4c8c12" +SRC_URI[sha256sum] = "26d4c2a727cc59239b84735aad856b7c7d0b04e30aa5c235c4f7f47f5f053491" inherit bin_package allarch
Signature · 1 line
2.34.1
PATCH 8/27 gzip: update 1.12 -> 1.13
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
Stable release update
Drop autoconf-2.73.patch as issue resolved upstream.
License-update: http -> https
---
.../gzip/{gzip-1.12 => gzip-1.13}/wrong-path-fix.patch | 0
meta/recipes-extended/gzip/{gzip_1.12.bb => gzip_1.13.bb} | 6 +++---
2 files changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-extended/gzip/{gzip-1.12 => gzip-1.13}/wrong-path-fix.patch (100%)
rename meta/recipes-extended/gzip/{gzip_1.12.bb => gzip_1.13.bb} (88%)meta/recipes-extended/gzip/gzip-1.13/wrong-path-fix.patch renamed from meta/recipes-extended/gzip/gzip-1.12/wrong-path-fix.patch +0 -0
meta/recipes-extended/gzip/gzip_1.13.bb renamed from meta/recipes-extended/gzip/gzip_1.12.bb +3 -3
@@ -6,10 +6,10 @@ LICENSE = "GPL-3.0-or-later" SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ file://run-ptest \ - " + " SRC_URI:append:class-target = " file://wrong-path-fix.patch" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" PROVIDES:append:class-native = " gzip-replacement-native"
@@ -38,4 +38,4 @@ do_install_ptest() { ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile } -SRC_URI[sha256sum] = "5b4fb14d38314e09f2fc8a1c510e7cd540a3ea0e3eb9b0420046b82c3bf41085" +SRC_URI[sha256sum] = "20fc818aeebae87cdbf209d35141ad9d3cf312b35a5e6be61bfcfbf9eddd212a"
Signature · 1 line
2.34.1
PATCH 9/27 screen: update 4.9.0 -> 4.9.1
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
* Support stop/parity bits on serial port
* Add needed system headers in checks and return values for implicit function declarations
* Fixes:
- Avoid zombies after shell exit
- Missed signal sending permission check on failed query messages (CVE-2023-24626)
- manpage fixes
- source code fixes during cleanup
- UTF-8 encoding can emit invalid UTF-8 sequences for out of range unicode values
Remove patches; they are merged upstream or backported.
---
...-Add-needed-system-headers-in-checks.patch | 151 ------------------
.../screen/screen/signal-permission.patch | 40 -----
.../{screen_4.9.0.bb => screen_4.9.1.bb} | 4 +-
3 files changed, 1 insertion(+), 194 deletions(-)
delete mode 100644 meta/recipes-extended/screen/screen/0001-configure-Add-needed-system-headers-in-checks.patch
delete mode 100644 meta/recipes-extended/screen/screen/signal-permission.patch
rename meta/recipes-extended/screen/{screen_4.9.0.bb => screen_4.9.1.bb} (89%)meta/recipes-extended/screen/screen/0001-configure-Add-needed-system-headers-in-checks.patch deleted +0 -151
@@ -1,151 +0,0 @@ -From 4e102de2e6204c1d8e8be00bb5ffd4587e70350c Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 15 Aug 2022 10:35:53 -0700 -Subject: [PATCH] configure: Add needed system headers in checks - -Newer compilers throw warnings when a funciton is used with implicit -declaration and enabling -Werror can silently fail these tests and -result in wrong configure results. Therefore add the needed headers in -the AC_TRY_LINK macros - - * configure.ac: Add missing system headers in AC_TRY_LINK. - -Upstream-Status: Submitted [https://lists.gnu.org/archive/html/screen-devel/2022-08/msg00000.html] -Signed-off-by: Khem Raj <[email protected]> ---- - configure.ac | 57 +++++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 43 insertions(+), 14 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c0f02df..d308079 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -233,6 +233,7 @@ AC_CHECKING(BSD job jontrol) - AC_TRY_LINK( - [#include <sys/types.h> - #include <sys/ioctl.h> -+#include <unistd.h> - ], [ - #ifdef POSIX - tcsetpgrp(0, 0); -@@ -250,12 +251,16 @@ dnl - dnl **** setresuid(), setreuid(), seteuid() **** - dnl - AC_CHECKING(setresuid) --AC_TRY_LINK(,[ --setresuid(0, 0, 0); -+AC_TRY_LINK([ -+#include <unistd.h> -+],[ -+return setresuid(0, 0, 0); - ], AC_DEFINE(HAVE_SETRESUID)) - AC_CHECKING(setreuid) --AC_TRY_LINK(,[ --setreuid(0, 0); -+AC_TRY_LINK([ -+#include <unistd.h> -+],[ -+return setreuid(0, 0); - ], AC_DEFINE(HAVE_SETREUID)) - dnl - dnl seteuid() check: -@@ -274,7 +279,9 @@ seteuid(0); - - dnl execvpe - AC_CHECKING(execvpe) --AC_TRY_LINK(,[ -+AC_TRY_LINK([ -+ #include <unistd.h> -+],[ - execvpe(0, 0, 0); - ], AC_DEFINE(HAVE_EXECVPE) - CFLAGS="$CFLAGS -D_GNU_SOURCE") -@@ -284,10 +291,18 @@ dnl **** select() **** - dnl - - AC_CHECKING(select) --AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, -+AC_TRY_LINK([ -+ #include <sys/select.h> -+],[ -+ select(0, 0, 0, 0, 0); -+],, - LIBS="$LIBS -lnet -lnsl" - AC_CHECKING(select with $LIBS) --AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, -+AC_TRY_LINK([ -+ #include <sys/select.h> -+],[ -+ select(0, 0, 0, 0, 0); -+],, - AC_MSG_ERROR(!!! no select - no screen)) - ) - dnl -@@ -624,11 +639,19 @@ dnl - dnl **** termcap or terminfo **** - dnl - AC_CHECKING(for tgetent) --AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, -+AC_TRY_LINK([ -+ #include <curses.h> -+ #include <term.h> -+],[ -+ tgetent((char *)0, (char *)0); -+],, - olibs="$LIBS" - LIBS="-lcurses $olibs" - AC_CHECKING(libcurses) --AC_TRY_LINK(,[ -+AC_TRY_LINK([ -+ #include <curses.h> -+ #include <term.h> -+],[ - #ifdef __hpux - __sorry_hpux_libcurses_is_totally_broken_in_10_10(); - #else -@@ -871,7 +894,7 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" - fi - - AC_CHECKING(getloadavg) --AC_TRY_LINK(,[getloadavg((double *)0, 0);], -+AC_TRY_LINK([#include <stdlib.h>],[getloadavg((double *)0, 0);], - AC_DEFINE(LOADAV_GETLOADAVG) load=1, - if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then - olibs="$LIBS" -@@ -1109,10 +1132,10 @@ AC_CHECKING(IRIX sun library) - AC_TRY_LINK(,,,LIBS="$oldlibs") - - AC_CHECKING(syslog) --AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS" -+AC_TRY_LINK([#include <syslog.h>],[closelog();], , [oldlibs="$LIBS" - LIBS="$LIBS -lbsd" - AC_CHECKING(syslog in libbsd.a) --AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs" -+AC_TRY_LINK([#include <syslog.h>], [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs" - AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])]) - - AC_EGREP_CPP(YES_IS_DEFINED, -@@ -1149,7 +1172,7 @@ AC_CHECKING(getspnam) - AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW)) - - AC_CHECKING(getttyent) --AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT)) -+AC_TRY_LINK([#include <ttyent.h>],[getttyent();], AC_DEFINE(GETTTYENT)) - - AC_CHECKING(fdwalk) - AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK)) -@@ -1204,7 +1227,13 @@ main() { - AC_SYS_LONG_FILE_NAMES - - AC_MSG_CHECKING(for vsprintf) --AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) -+AC_TRY_LINK([ -+ #include <stdarg.h> -+ #include <stdio.h> -+],[ -+ va_list valist; -+ vsprintf(0,0,valist); -+], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) - - AC_HEADER_DIRENT -
meta/recipes-extended/screen/screen/signal-permission.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From e9ad41bfedb4537a6f0de20f00b27c7739f168f7 Mon Sep 17 00:00:00 2001 -From: Alexander Naumov <[email protected]> -Date: Mon, 30 Jan 2023 17:22:25 +0200 -Subject: fix: missing signal sending permission check on failed query messages - -Signed-off-by: Alexander Naumov <[email protected]> - -CVE: CVE-2023-24626 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> ---- - src/socket.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/socket.c b/src/socket.c -index 147dc54..54d8cb8 100644 ---- a/socket.c -+++ b/socket.c -@@ -1285,11 +1285,16 @@ ReceiveMsg() - else - queryflag = -1; - -- Kill(m.m.command.apid, -+ if (CheckPid(m.m.command.apid)) { -+ Msg(0, "Query attempt with bad pid(%d)!", m.m.command.apid); -+ } -+ else { -+ Kill(m.m.command.apid, - (queryflag >= 0) - ? SIGCONT - : SIG_BYE); /* Send SIG_BYE if an error happened */ -- queryflag = -1; -+ queryflag = -1; -+ } - } - break; - case MSG_COMMAND: --- -cgit v1.1 -
meta/recipes-extended/screen/screen_4.9.1.bb renamed from meta/recipes-extended/screen/screen_4.9.0.bb +1 -3
@@ -21,11 +21,9 @@ SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \ file://0002-comm.h-now-depends-on-term.h.patch \ file://0001-fix-for-multijob-build.patch \ file://0001-Remove-more-compatibility-stuff.patch \ - file://0001-configure-Add-needed-system-headers-in-checks.patch \ - file://signal-permission.patch \ " -SRC_URI[sha256sum] = "f9335281bb4d1538ed078df78a20c2f39d3af9a4e91c57d084271e0289c730f4" +SRC_URI[sha256sum] = "26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69" inherit autotools texinfo
Signature · 1 line
2.34.1
PATCH 10/27 vim: Upgrade 9.0.1894 -> 9.0.2009
In reply to Steve SakomanFrom: Siddharth Doshi <[email protected]>
This includes CVE fix for CVE-2023-5441.
--- meta/recipes-support/vim/vim.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/vim/vim.inc +2 -2
@@ -19,8 +19,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://no-path-adjust.patch \ " -PV .= ".1894" -SRCREV = "e5f7cd0a60d0eeab84f7aeb35c13d3af7e50072e" +PV .= ".2009" +SRCREV = "54844857fd6933fa4f6678e47610c4b9c9f7a091" # Do not consider .z in x.y.z, as that is updated with every commit UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
Signature · 1 line
2.34.1
PATCH 11/27 nativesdk-intercept: Fix bad intercept chgrp/chown logic
In reply to Steve SakomanFrom: Eilís 'pidge' Ní Fhlannagáin <[email protected]>
Running either of these ends up corrupting the os.execv args.
If we run:./scripts/nativesdk-intercept/chown -R foo:foo bar
The loop here ends up missing the conversion of foo:foo to root:root because it sees sys.argv[0] and assumes that it's the user:group argument and that we should convert that. We end up a os.execv(path, args) that have the following args:
['root:root', '-R', 'foo:foo', 'bar']
As os.execv ignores args[0], we can just populate it with sys.argv[0] and then loop through sys.argv[1:]. As both chgrp and chown would have either flags and USER[:GROUP] next, this fixes the issue.
--- scripts/nativesdk-intercept/chgrp | 5 ++++- scripts/nativesdk-intercept/chown | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
scripts/nativesdk-intercept/chgrp +4 -1
@@ -14,7 +14,10 @@ real_chgrp = shutil.which('chgrp', path=path) args = list() found = False -for i in sys.argv: + +args.append(real_chgrp) + +for i in sys.argv[1:]: if i.startswith("-"): args.append(i) continue
scripts/nativesdk-intercept/chown +4 -1
@@ -14,7 +14,10 @@ real_chown = shutil.which('chown', path=path) args = list() found = False -for i in sys.argv: + +args.append(real_chown) + +for i in sys.argv[1:]: if i.startswith("-"): args.append(i) continue
Signature · 1 line
2.34.1
PATCH 12/27 avahi: handle invalid service types gracefully
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Services which broadcast an invalid service type will cause the browse to fail. Instead of failing, replace the service type and continue.
--- meta/recipes-connectivity/avahi/avahi_0.8.bb | 1 + .../avahi/files/invalid-service.patch | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-connectivity/avahi/files/invalid-service.patch
meta/recipes-connectivity/avahi/avahi_0.8.bb +1 -0
@@ -26,6 +26,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \ file://0001-Fix-opening-etc-resolv.conf-error.patch \ file://handle-hup.patch \ file://local-ping.patch \ + file://invalid-service.patch \ " GITHUB_BASE_URI = "https://github.com/lathiat/avahi/releases/"
meta/recipes-connectivity/avahi/files/invalid-service.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 46490e95151d415cd22f02565e530eb5efcef680 Mon Sep 17 00:00:00 2001 +From: Asger Hautop Drewsen <[email protected]> +Date: Mon, 9 Aug 2021 14:25:08 +0200 +Subject: [PATCH] Fix avahi-browse: Invalid service type + +Invalid service types will stop the browse from completing, or +in simple terms "my washing machine stops me from printing". + +Upstream-Status: Submitted [https://github.com/lathiat/avahi/pull/472] +Signed-off-by: Ross Burton <[email protected]> +--- + avahi-core/browse-service.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c +index 63e0275a..ac3d2ecb 100644 +--- a/avahi-core/browse-service.c ++++ b/avahi-core/browse-service.c +@@ -103,7 +103,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_prepare( + AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL); + AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME); + AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS); +- AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_service_type_generic(service_type), AVAHI_ERR_INVALID_SERVICE_TYPE); ++ ++ if (!avahi_is_valid_service_type_generic(service_type)) ++ service_type = "_invalid._tcp"; + + if (!domain) + domain = server->domain_name;
Signature · 1 line
2.34.1
PATCH 13/27 runqemu: check permissions of available render nodes as well as their presence
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
qemu itself is not helpful when render nodes exist, but can't be opened:
qemu-system-x86_64: egl: render node init failed
To fix this, users likely need to
* modprobe vgem (presence when physical graphic card is absent or has a driver without
support for render nodes, such as many older cards found in server machines)
* add their user to "render" group to write to /dev/dri/renderD* (permissions)
With this change runqemu should print hints for the above as appropriate from probing the nodes.
--- scripts/runqemu | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
scripts/runqemu +12 -2
@@ -1374,8 +1374,18 @@ to your build configuration. render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer.""" try: content = os.listdir("/dev/dri") - if len([i for i in content if i.startswith('render')]) == 0: - raise RunQemuError("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) + nodes = [i for i in content if i.startswith('renderD')] + if len(nodes) == 0: + raise RunQemuError("No render nodes found in /dev/dri/: %s. %s" %(content, render_hint)) + for n in nodes: + try: + with open(os.path.join("/dev/dri", n), "w") as f: + f.close() + break + except IOError: + pass + else: + raise RunQemuError("None of the render nodes in /dev/dri/ are accessible: %s; you may need to add yourself to 'render' group or otherwise ensure you have read-write permissions on one of them." %(nodes)) except FileNotFoundError: raise RunQemuError("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint))
Signature · 1 line
2.34.1
PATCH 14/27 build-sysroots: target or native sysroot population need to be selected explicitly
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
Running them in parallel is prone to races as postinsts from target sysroots rely on executables from native sysroots which may or may not be fully prepared yet. This was observed for example here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/146/builds/468/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/147/builds/467/steps/12/logs/stdio
--- meta/files/ext-sdk-prepare.py | 2 +- meta/lib/oeqa/selftest/cases/meta_ide.py | 5 +++-- meta/recipes-core/meta/build-sysroots.bb | 12 ++++++++++-- scripts/lib/devtool/sdk.py | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-)
meta/files/ext-sdk-prepare.py +1 -1
@@ -71,7 +71,7 @@ def main(): ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets)) if not ret: - ret = run_command_interruptible('bitbake --quiet build-sysroots') + ret = run_command_interruptible('bitbake --quiet build-sysroots -c build_native_sysroot && bitbake --quiet build-sysroots -c build_target_sysroot') lastlog = get_last_consolelog() if lastlog: with open(lastlog, 'r') as f:
meta/lib/oeqa/selftest/cases/meta_ide.py +3 -2
@@ -18,7 +18,8 @@ class MetaIDE(OESelftestTestCase): def setUpClass(cls): super(MetaIDE, cls).setUpClass() bitbake('meta-ide-support') - bitbake('build-sysroots') + bitbake('build-sysroots -c build_native_sysroot') + bitbake('build-sysroots -c build_target_sysroot') bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE', 'COREBASE']) cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS'] cls.deploydir = bb_vars['DEPLOY_DIR_IMAGE']
@@ -55,5 +56,5 @@ class MetaIDE(OESelftestTestCase): def test_meta_ide_can_run_sdk_tests(self): bitbake('-c populate_sysroot gtk+3') - bitbake('build-sysroots') + bitbake('build-sysroots -c build_target_sysroot') bitbake('-c testsdk meta-ide-support')
meta/recipes-core/meta/build-sysroots.bb +10 -2
@@ -22,6 +22,14 @@ deltask collect_spdx_deps deltask create_runtime_spdx deltask recipe_qa +do_build_warn () { + bbwarn "Native or target sysroot population needs to be explicitly selected; please use +bitbake -c build_native_sysroot build-sysroots +bitbake -c build_target_sysroot build-sysroots +or both." +} +addtask do_build_warn before do_build + python do_build_native_sysroot () { targetsysroot = d.getVar("STANDALONE_SYSROOT") nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
@@ -31,7 +39,7 @@ python do_build_native_sysroot () { } do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}" do_build_native_sysroot[nostamp] = "1" -addtask do_build_native_sysroot before do_build +addtask do_build_native_sysroot python do_build_target_sysroot () { targetsysroot = d.getVar("STANDALONE_SYSROOT")
@@ -42,6 +50,6 @@ python do_build_target_sysroot () { } do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}" do_build_target_sysroot[nostamp] = "1" -addtask do_build_target_sysroot before do_build +addtask do_build_target_sysroot do_clean[cleandirs] += "${STANDALONE_SYSROOT} ${STANDALONE_SYSROOT_NATIVE}"
scripts/lib/devtool/sdk.py +2 -1
@@ -300,7 +300,8 @@ def sdk_install(args, config, basepath, workspace): return 2 try: - exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots', watch=True) + exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots -c build_native_sysroot', watch=True) + exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots -c build_target_sysroot', watch=True) except bb.process.ExecutionError as e: raise DevtoolError('Failed to bitbake build-sysroots:\n%s' % (str(e)))
Signature · 1 line
2.34.1
PATCH 15/27 weston-init: remove misleading comment about udev rule
In reply to Steve SakomanFrom: Otavio Salvador <[email protected]>
The udev rule has been removed but the comment has kept, by mistake. Remove it.
--- meta/recipes-graphics/wayland/weston-init.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston-init.bb +1 -1
@@ -35,7 +35,7 @@ do_install() { sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston fi - # Install Weston systemd service and accompanying udev rule + # Install Weston systemd service if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket
Signature · 1 line
2.34.1
PATCH 16/27 weston-init: fix init code indentation
In reply to Steve SakomanFrom: Otavio Salvador <[email protected]>
--- meta/recipes-graphics/wayland/weston-init/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston-init/init +1 -1
@@ -30,7 +30,7 @@ done case "$1" in start) . /etc/profile - export HOME=ROOTHOME + export HOME=ROOTHOME WESTON_USER=weston weston-start $OPTARGS & ;;
Signature · 1 line
2.34.1
PATCH 17/27 libc-test: Run as non-root user
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Some of tests impose rlimit on it before running which wont be imposed when running as root user.
Fixessrc/regression/pthread_atfork-errno-clobber.c:23: (pid = fork()) == -1 failed: fork succeeded despite rlimit src/regression/pthread_atfork-errno-clobber.c:23: (pid = fork()) == -1 failed: fork succeeded despite rlimit FAIL src/regression/pthread_atfork-errno-clobber-static.exe [status 1]
--- .../musl/libc-test/run-libc-ptests | 28 ++++++++++++++++++ meta/recipes-core/musl/libc-test/run-ptest | 29 ++----------------- meta/recipes-core/musl/libc-test_git.bb | 5 ++++ 3 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 meta/recipes-core/musl/libc-test/run-libc-ptests
meta/recipes-core/musl/libc-test/run-libc-ptests new file +28 -0
@@ -0,0 +1,28 @@ +#!/bin/sh + +set -e + +cd /opt/libc-test +make cleanall +make run || true + +echo "" +echo "--- ptest result ---" +# libc-test runs tests by module(e.g. src/api) and generates sub-module test +# report(e.g. src/api/REPORT) first. After all tests finish, it generates the +# consolidated report file src/REPORT. +report="/opt/libc-test/src/REPORT" +if ! [ -f "${report}" ]; then + echo "${report} not found!" + echo "FAIL: libc-test" + exit 1 +# libc-test prints error on failure and prints nothing on success. +elif grep -q '^FAIL src.*\.exe.*' "${report}"; then + # Print test failure in ptest format. + # e.g. "FAIL src/api/main.exe [status 1]" -> "FAIL: api_main" + grep '^FAIL src.*\.exe.*' "${report}" \ + | sed 's|^FAIL src/|FAIL: |;s|/|_|;s|\.exe.*\]||' + exit 1 +else + echo "PASS: libc-test" +fi
meta/recipes-core/musl/libc-test/run-ptest +2 -27
@@ -1,28 +1,3 @@ #!/bin/sh - -set -e - -cd /opt/libc-test -make cleanall -make run || true - -echo "" -echo "--- ptest result ---" -# libc-test runs tests by module(e.g. src/api) and generates sub-module test -# report(e.g. src/api/REPORT) first. After all tests finish, it generates the -# consolidated report file src/REPORT. -report="/opt/libc-test/src/REPORT" -if ! [ -f "${report}" ]; then - echo "${report} not found!" - echo "FAIL: libc-test" - exit 1 -# libc-test prints error on failure and prints nothing on success. -elif grep -q '^FAIL src.*\.exe.*' "${report}"; then - # Print test failure in ptest format. - # e.g. "FAIL src/api/main.exe [status 1]" -> "FAIL: api_main" - grep '^FAIL src.*\.exe.*' "${report}" \ - | sed 's|^FAIL src/|FAIL: |;s|/|_|;s|\.exe.*\]||' - exit 1 -else - echo "PASS: libc-test" -fi +chown -R ptest:ptest /opt/libc-test + su -c ./run-libc-ptests ptest
meta/recipes-core/musl/libc-test_git.bb +5 -0
@@ -13,6 +13,7 @@ SRCREV = "18e28496adee3d84fefdda6efcb9c5b8996a2398" SRC_URI = " \ git://repo.or.cz/libc-test;branch=master;protocol=https \ file://run-ptest \ + file://run-libc-ptests \ " PV = "0+git${SRCPV}"
@@ -47,5 +48,9 @@ do_install () { cp -r ${S}/src ${D}${install_path} } +do_install_ptest_base:append() { + install -Dm 0755 ${WORKDIR}/run-libc-ptests ${D}${PTEST_PATH}/run-libc-ptests +} + COMPATIBLE_HOST = "null" COMPATIBLE_HOST:libc-musl = "(.*)"
Signature · 1 line
2.34.1
PATCH 18/27 oeqa dnf_runtime.py: fix HTTP server IP address and port
In reply to Steve SakomanFrom: Mikko Rapeli <[email protected]>
Use correct HTTPService parameters like apt.py when setting up the repo server. These work with qemu tun and slirp networking. Fixes test failure with slirp networking when executing testimage.bbclass selftests "oe-selftest -r runtime_test.TestImage".
--- meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py +2 -1
@@ -10,7 +10,8 @@ class DnfSelftest(DnfTest): import tempfile cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-") cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'), - cls.tc.target.server_ip) + '0.0.0.0', port=cls.tc.target.server_port, + logger=cls.tc.logger) cls.repo_server.start() @classmethod
Signature · 1 line
2.34.1
PATCH 19/27 oeqa/selftest/context.py: check git command return values
In reply to Steve SakomanFrom: Mikko Rapeli <[email protected]>
Don't ignore return values from the git command lines. If something goes wrong, fail the test right away.
--- meta/lib/oeqa/selftest/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +1 -1
@@ -97,7 +97,7 @@ class OESelftestTestContext(OETestContext): oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") oe.path.copytree(selftestdir, newselftestdir) - subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) + subprocess.check_output("git init && git add * && git commit -a -m 'initial'", cwd=newselftestdir, shell=True) # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True)
Signature · 1 line
2.34.1
PATCH 20/27 igt-gpu-tools: do not write shortened git commit hash into binaries
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
Shortened hashes are prone to collisions, and in this case git lengthens the hash to resolve the collision. This in turn breaks reproducibility, depending on whether the colliding hash is present in the history or not. This has been observed here:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230917-br60if6q/packages/diff-html/
--- meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb +1 -1
@@ -26,7 +26,7 @@ PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests" PACKAGECONFIG[chamelium] = "-Dchamelium=enabled,-Dchamelium=disabled,gsl xmlrpc-c" -EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dsrcdir=/usr/src/debug/${PN}/${PV}-${PR}/git/" +EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dsrcdir=/usr/src/debug/${PN}/${PV}-${PR}/git/ -Dversion_hash=${PV}" COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux" COMPATIBLE_HOST:libc-musl:class-target = "null" SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
Signature · 1 line
2.34.1
PATCH 21/27 ptest: report tests that were killed on timeout
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
I'm not sure if this was reported correctly before, but it currently is not. Test that is stuck is an error in itself.
--- meta/lib/oeqa/runtime/cases/ptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/runtime/cases/ptest.py +1 -1
@@ -93,7 +93,7 @@ class PtestRunnerTest(OERuntimeTestCase): failed_tests = {} for section in sections: - if 'exitcode' in sections[section].keys(): + if 'exitcode' in sections[section].keys() or 'timeout' in sections[section].keys(): failed_tests[section] = sections[section]["log"] for section in results:
Signature · 1 line
2.34.1
PATCH 22/27 strace: parallelize ptest
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
strace is one of the slowest tests otherwise (can take 40 minutes or more), and this brings it to under 10 minutes \0/
--- meta/recipes-devtools/strace/strace/run-ptest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/strace/strace/run-ptest +1 -1
@@ -3,7 +3,7 @@ set -u export TIMEOUT_DURATION=240 -make -B -C tests -k test-suite.log +make -j4 -B -C tests -k test-suite.log res=$? if [ $res -ne 0 ]; then cat tests/test-suite.log
Signature · 1 line
2.34.1
PATCH 23/27 openssl: parallelize tests
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
This brings them from 15 minutes to just over 4.
--- meta/recipes-connectivity/openssl/openssl/run-ptest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl/run-ptest +1 -1
@@ -9,4 +9,4 @@ export TOP=. # OPENSSL_ENGINES is relative from the test binaries export OPENSSL_ENGINES=../engines -perl ./test/run_tests.pl $* | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g' +HARNESS_JOBS=4 perl ./test/run_tests.pl $* | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g'
Signature · 1 line
2.34.1
PATCH 24/27 openssl: ensure all ptest fails are caught
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
Piping results through sed may mask failures that sed isn't catching.
--- meta/recipes-connectivity/openssl/openssl/run-ptest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl/run-ptest +1 -1
@@ -9,4 +9,4 @@ export TOP=. # OPENSSL_ENGINES is relative from the test binaries export OPENSSL_ENGINES=../engines -HARNESS_JOBS=4 perl ./test/run_tests.pl $* | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g' +{ HARNESS_JOBS=4 perl ./test/run_tests.pl $* || echo "FAIL: openssl" ; } | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g'
Signature · 1 line
2.34.1
PATCH 25/27 libsoup-2.4: Only specify --cross-file when building for target
In reply to Steve SakomanFrom: Peter Kjellerstedt <[email protected]>
The soup.cross file is only created when building for target so only tell meson to read it when it exists. This allows libsoup-2.4-native to be built again.
--- meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +1 -1
@@ -40,7 +40,7 @@ do_write_config:append:class-target() { ntlm_auth = '${bindir}/ntlm_auth' EOF } -EXTRA_OEMESON += "--cross-file ${WORKDIR}/soup.cross" +EXTRA_OEMESON:append:class-target = " --cross-file ${WORKDIR}/soup.cross" EXTRA_OEMESON += "-Dvapi=disabled -Dtls_check=false"
Signature · 1 line
2.34.1
PATCH 26/27 oeqa/selftest/wic: Improve assertTrue calls
In reply to Steve SakomanFrom: Richard Purdie <[email protected]>
assertTrue is a problematic call use in test cases since when it fails, you just get an unhelpful "False is not True" message.
Replace some uses with assertIn/assertNotIn which will give more helpful results and for the rest, add msg entries which given more helpful debugging.
For example, this patch would help debugging of #15176.
--- meta/lib/oeqa/selftest/cases/wic.py | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-)
meta/lib/oeqa/selftest/cases/wic.py +18 -18
@@ -729,7 +729,7 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc wicout = glob(os.path.join(self.resultdir, "wictestdisk-*.direct")) self.assertEqual(1, len(wicout)) size = os.path.getsize(wicout[0]) - self.assertTrue(size > extraspace) + self.assertTrue(size > extraspace, msg="Extra space not present (%s vs %s)" % (size, extraspace)) class Wic2(WicTestCase):
@@ -756,7 +756,7 @@ class Wic2(WicTestCase): basename = bb_vars['IMAGE_BASENAME'] self.assertEqual(basename, image) path = os.path.join(imgdatadir, basename) + '.env' - self.assertTrue(os.path.isfile(path)) + self.assertTrue(os.path.isfile(path), msg="File %s wasn't generated as expected" % path) wicvars = set(bb_vars['WICVARS'].split()) # filter out optional variables
@@ -769,7 +769,7 @@ class Wic2(WicTestCase): # test if variables used by wic present in the .env file for var in wicvars: self.assertTrue(var in content, "%s is not in .env file" % var) - self.assertTrue(content[var]) + self.assertTrue(content[var], "%s doesn't have a value (%s)" % (var, content[var])) def test_image_vars_dir_short(self): """Test image vars directory selection -v option"""
@@ -816,8 +816,8 @@ class Wic2(WicTestCase): # pointing to existing files for suffix in ('wic', 'manifest'): path = prefix + suffix - self.assertTrue(os.path.islink(path)) - self.assertTrue(os.path.isfile(os.path.realpath(path))) + self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path) + self.assertTrue(os.path.isfile(os.path.realpath(path)), msg="File linked to by %s wasn't generated as expected" % path) # TODO this should work on aarch64 @skipIfNotArch(['i586', 'i686', 'x86_64'])
@@ -1087,7 +1087,7 @@ class Wic2(WicTestCase): self.remove_config(config) bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], '%s.wic' % bb_vars['IMAGE_LINK_NAME']) - self.assertTrue(os.path.exists(image_path)) + self.assertTrue(os.path.exists(image_path), msg="Image file %s wasn't generated as expected" % image_path) sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
@@ -1328,11 +1328,11 @@ class Wic2(WicTestCase): orig_sizes = [int(line.split()[3]) for line in orig.output.split('\n')[1:]] exp_sizes = [int(line.split()[3]) for line in exp.output.split('\n')[1:]] self.assertEqual(orig_sizes[0], exp_sizes[0]) # first partition is not resized - self.assertTrue(orig_sizes[1] < exp_sizes[1]) + self.assertTrue(orig_sizes[1] < exp_sizes[1], msg="Parition size wasn't enlarged (%s vs %s)" % (orig_sizes[1], exp_sizes[1])) # Check if all free space is partitioned result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path)) - self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output) + self.assertIn("0 B, 0 bytes, 0 sectors", result.output) os.rename(image_path, image_path + '.bak') os.rename(new_image_path, image_path)
@@ -1390,7 +1390,7 @@ class ModifyTests(WicTestCase): # check if file is there result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) self.assertEqual(7, len(result.output.split('\n'))) - self.assertTrue(os.path.basename(testfile.name) in result.output) + self.assertIn(os.path.basename(testfile.name), result.output) # prepare directory testdir = os.path.join(self.resultdir, 'wic-test-cp-dir')
@@ -1404,13 +1404,13 @@ class ModifyTests(WicTestCase): # check if directory is there result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) self.assertEqual(8, len(result.output.split('\n'))) - self.assertTrue(os.path.basename(testdir) in result.output) + self.assertIn(os.path.basename(testdir), result.output) # copy the file from the partition and check if it success dest = '%s-cp' % testfile.name runCmd("wic cp %s:1/%s %s -n %s" % (images[0], os.path.basename(testfile.name), dest, sysroot)) - self.assertTrue(os.path.exists(dest)) + self.assertTrue(os.path.exists(dest), msg="File %s wasn't generated as expected" % dest) def test_wic_rm(self):
@@ -1454,7 +1454,7 @@ class ModifyTests(WicTestCase): # list directory content of the second ext4 partition result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset( - set(line.split()[-1] for line in result.output.split('\n') if line))) + set(line.split()[-1] for line in result.output.split('\n') if line)), msg="Expected directories not present %s" % result.output) def test_wic_cp_ext(self): """Test copy files and directories to the ext partition."""
@@ -1469,7 +1469,7 @@ class ModifyTests(WicTestCase): # list directory content of the ext4 partition result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) dirs = set(line.split()[-1] for line in result.output.split('\n') if line) - self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset(dirs)) + self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset(dirs), msg="Expected directories not present %s" % dirs) with NamedTemporaryFile("w", suffix=".wic-cp") as testfile: testfile.write("test")
@@ -1484,12 +1484,12 @@ class ModifyTests(WicTestCase): # check if the file to copy is in the partition result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) - self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line]) + self.assertIn('fstab', [line.split()[-1] for line in result.output.split('\n') if line]) # copy file from the partition, replace the temporary file content with it and # check for the file size to validate the copy runCmd("wic cp %s:2/etc/fstab %s -n %s" % (images[0], testfile.name, sysroot)) - self.assertTrue(os.stat(testfile.name).st_size > 0) + self.assertTrue(os.stat(testfile.name).st_size > 0, msg="Filesize not as expected %s" % os.stat(testfile.name).st_size) def test_wic_rm_ext(self):
@@ -1504,18 +1504,18 @@ class ModifyTests(WicTestCase): # list directory content of the /etc directory on ext4 partition result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) - self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line]) + self.assertIn('fstab', [line.split()[-1] for line in result.output.split('\n') if line]) # remove file runCmd("wic rm %s:2/etc/fstab -n %s" % (images[0], sysroot)) # check if it's removed result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) - self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line]) + self.assertNotIn('fstab', [line.split()[-1] for line in result.output.split('\n') if line]) # remove non-empty directory runCmd("wic rm -r %s:2/etc/ -n %s" % (images[0], sysroot)) # check if it's removed result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) - self.assertTrue('etc' not in [line.split()[-1] for line in result.output.split('\n') if line]) + self.assertNotIn('etc', [line.split()[-1] for line in result.output.split('\n') if line])
Signature · 1 line
2.34.1
PATCH 27/27 gdb: fix RDEPENDS for PACKAGECONFIG[tui]
In reply to Steve SakomanFrom: Stefan Tauner <[email protected]>
TUI mode needs terminfo at runtime, which is required to be explicitly stated in the respective PACKAGECONFIG variable.
Without this change /etc/terminfo/ might be missing, which leads to a runtime error when trying to use tui, e.g.:
(gdb) tui enable
Cannot enable the TUI: error opening terminal [TERM=xterm-256color]
--- meta/recipes-devtools/gdb/gdb-common.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -2
@@ -35,8 +35,7 @@ PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs" PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace" -# ncurses is already a hard DEPENDS, but would be added here if it weren't -PACKAGECONFIG[tui] = "--enable-tui,--disable-tui" +PACKAGECONFIG[tui] = "--enable-tui,--disable-tui,,ncurses-terminfo-base" PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz" PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
Signature · 1 line
2.34.1