From patchwork Thu Jan 12 02:33:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18040 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92168C46467 for ; Thu, 12 Jan 2023 02:33:24 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web11.45234.1673490804175441355 for ; Wed, 11 Jan 2023 18:33:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=N0dZ8PdP; spf=softfail (domain: sakoman.com, ip: 209.85.216.52, mailfrom: steve@sakoman.com) Received: by mail-pj1-f52.google.com with SMTP id z4-20020a17090a170400b00226d331390cso19298388pjd.5 for ; Wed, 11 Jan 2023 18:33:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Kiykc5uxO4M+9TzKTFLEN5f9DeyIUH7HGGqgfna2p1E=; b=N0dZ8PdPxlq20gmGWpw6MHnf0Leuo/tz+hZz7D0KS2wVDOdgGce0ldyhhZxrg7xeQx ItPInc+ekYCJmSElIerKRQ9FW0Yu05oqCX/Bwrn1eM1dZ89gOSdFmlGpFPDiXYsg6kEO rfsGiRWGg5TTrgi5eT0sc8Evl0Prg4i7XDDwhU+Xdp702iX7Dt1j20Tf0YHHCFsMbvZ2 EYsCgQRmBZRQvgQPB2sz0ILuHI6GAIjSc56wTGzKh8Yo38n3DQ1Po5FXYugqo4ctoq4U PRhYaNpr9mj7Hsu2oKa9U2A6yYyrhsMqewdNdqhT6seZ09p5nOFVJr4EdVvnECRc7uYD knaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kiykc5uxO4M+9TzKTFLEN5f9DeyIUH7HGGqgfna2p1E=; b=1RougQjgKb2cKZdFEMcNBRS0R8HJoh2dOGQ72FoEP8hzQCmql5Zy4e35HvYs+Vus1u 1LsLPNQayhmR52XNAuawzTmd4+jvzFFULCVMNO8R8FHeya2335VVd9NcguCkk4zcIGoX zu+lStG9kQZzM5UFHPJio8g7YCdHcu2qXr4YBztfYrD0Ey122pHvN4MmVsjQ+9DdG8Z9 e8EdQuILRluJKvp9JPfLnXmx3dW2rd8dV4j39snh2vSCY+BwX4dBCC5UZNLCAyELXc3U SrA1KVvjZhYTJ37EA/tRl7Lrs+f+F+I0Cw0T1BOlrq3p2if0MQb9M7UiR232udEFh7KR V2Cg== X-Gm-Message-State: AFqh2kq44baMwZ88Ly8f+F91z2oF0cxRCdw0psWtEeEJLrxHVI3aGqpO HpEcBOk6rrq5qXOmORZnPgj/BhWp2fCGURndHwo= X-Google-Smtp-Source: AMrXdXuSGaGS3V84Z7SnPu6vOrVf6kAV2JpsDAj/JmIcu9XfXBXikepnFh+h8/3zBBLzN3FX4rmV1w== X-Received: by 2002:a17:902:8e86:b0:192:b43e:272 with SMTP id bg6-20020a1709028e8600b00192b43e0272mr40568169plb.53.1673490803115; Wed, 11 Jan 2023 18:33:23 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:22 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 01/11] systemd: CVE-2022-45873 deadlock in systemd-coredump via a crash with a long backtrace Date: Wed, 11 Jan 2023 16:33:02 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:24 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175774 From: Hitendra Prajapati Upstream-Status: Backport from https://github.com/systemd/systemd/commit/076b807be472630692c5348c60d0c2b7b28ad437 Signed-off-by: Hitendra Prajapati Signed-off-by: Steve Sakoman --- .../systemd/systemd/CVE-2022-45873.patch | 124 ++++++++++++++++++ meta/recipes-core/systemd/systemd_250.5.bb | 1 + 2 files changed, 125 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/CVE-2022-45873.patch diff --git a/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch b/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch new file mode 100644 index 0000000000..94bd22ca43 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch @@ -0,0 +1,124 @@ +From 076b807be472630692c5348c60d0c2b7b28ad437 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Oct 2022 18:23:53 +0200 +Subject: [PATCH] coredump: avoid deadlock when passing processed backtrace + data + +We would deadlock when passing the data back from the forked-off process that +was doing backtrace generation back to the coredump parent. This is because we +fork the child and wait for it to exit. The child tries to write too much data +to the output pipe, and and after the first 64k blocks on the parent because +the pipe is full. The bug surfaced in Fedora because of a combination of four +factors: +- 87707784c70dc9894ec613df0a6e75e732a362a3 was backported to v251.5, which + allowed coredump processing to be successful. +- 1a0281a3ebf4f8c16d40aa9e63103f16cd23bb2a was NOT backported, so the output + was very verbose. +- Fedora has the ELF package metadata available, so a lot of output can be + generated. Most other distros just don't have the information. +- gnome-calendar crashes and has a bazillion modules and 69596 bytes of output + are generated for it. + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2135778. + +The code is changed to try to write data opportunistically. If we get partial +information, that is still logged. In is generally better to log partial +backtrace information than nothing at all. + +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/076b807be472630692c5348c60d0c2b7b28ad437] +CVE: CVE-2022-45873 +Signed-off-by: Hitendra Prajapati +--- + src/shared/elf-util.c | 37 +++++++++++++++++++++++++++++++------ + 1 file changed, 31 insertions(+), 6 deletions(-) + +diff --git a/src/shared/elf-util.c b/src/shared/elf-util.c +index 6d9fcfbbf2..bd27507346 100644 +--- a/src/shared/elf-util.c ++++ b/src/shared/elf-util.c +@@ -30,6 +30,9 @@ + #define THREADS_MAX 64 + #define ELF_PACKAGE_METADATA_ID 0xcafe1a7e + ++/* The amount of data we're willing to write to each of the output pipes. */ ++#define COREDUMP_PIPE_MAX (1024*1024U) ++ + static void *dw_dl = NULL; + static void *elf_dl = NULL; + +@@ -700,13 +703,13 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha + return r; + + if (ret) { +- r = RET_NERRNO(pipe2(return_pipe, O_CLOEXEC)); ++ r = RET_NERRNO(pipe2(return_pipe, O_CLOEXEC|O_NONBLOCK)); + if (r < 0) + return r; + } + + if (ret_package_metadata) { +- r = RET_NERRNO(pipe2(json_pipe, O_CLOEXEC)); ++ r = RET_NERRNO(pipe2(json_pipe, O_CLOEXEC|O_NONBLOCK)); + if (r < 0) + return r; + } +@@ -750,8 +753,24 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha + goto child_fail; + + if (buf) { +- r = loop_write(return_pipe[1], buf, strlen(buf), false); +- if (r < 0) ++ size_t len = strlen(buf); ++ ++ if (len > COREDUMP_PIPE_MAX) { ++ /* This is iffy. A backtrace can be a few hundred kilobytes, but too much is ++ * too much. Let's log a warning and ignore the rest. */ ++ log_warning("Generated backtrace is %zu bytes (more than the limit of %u bytes), backtrace will be truncated.", ++ len, COREDUMP_PIPE_MAX); ++ len = COREDUMP_PIPE_MAX; ++ } ++ ++ /* Bump the space for the returned string. ++ * Failure is ignored, because partial output is still useful. */ ++ (void) fcntl(return_pipe[1], F_SETPIPE_SZ, len); ++ ++ r = loop_write(return_pipe[1], buf, len, false); ++ if (r == -EAGAIN) ++ log_warning("Write failed, backtrace will be truncated."); ++ else if (r < 0) + goto child_fail; + + return_pipe[1] = safe_close(return_pipe[1]); +@@ -760,13 +779,19 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha + if (package_metadata) { + _cleanup_fclose_ FILE *json_out = NULL; + ++ /* Bump the space for the returned string. We don't know how much space we'll need in ++ * advance, so we'll just try to write as much as possible and maybe fail later. */ ++ (void) fcntl(json_pipe[1], F_SETPIPE_SZ, COREDUMP_PIPE_MAX); ++ + json_out = take_fdopen(&json_pipe[1], "w"); + if (!json_out) { + r = -errno; + goto child_fail; + } + +- json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); ++ r = json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); ++ if (r < 0) ++ log_warning_errno(r, "Failed to write JSON package metadata, ignoring: %m"); + } + + _exit(EXIT_SUCCESS); +@@ -801,7 +826,7 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha + + r = json_parse_file(json_in, NULL, 0, &package_metadata, NULL, NULL); + if (r < 0 && r != -EINVAL) /* EINVAL: json was empty, so we got nothing, but that's ok */ +- return r; ++ log_warning_errno(r, "Failed to read or parse json metadata, ignoring: %m"); + } + + if (ret) +-- +2.25.1 + diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb index ab349b7307..acca49c3cb 100644 --- a/meta/recipes-core/systemd/systemd_250.5.bb +++ b/meta/recipes-core/systemd/systemd_250.5.bb @@ -26,6 +26,7 @@ SRC_URI += "file://touchscreen.rules \ file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ file://CVE-2022-3821.patch \ + file://CVE-2022-45873.patch \ " # patches needed by musl From patchwork Thu Jan 12 02:33:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18042 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77E87C54EBC for ; Thu, 12 Jan 2023 02:33:34 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web11.45236.1673490806146226232 for ; Wed, 11 Jan 2023 18:33:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=rzzM/+LS; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id jn22so18769138plb.13 for ; Wed, 11 Jan 2023 18:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qZi47jHK2O4SnJpGFWocns5R/B9IhyPRx7dDn1oBYFg=; b=rzzM/+LSSnujS4AuRtr34jiNDzSx1sdXnTe/MZGyQ80Pgc+DLeQ40n1CDxAanuXRO3 jXYLZxkwTNekw0jMMJLXIQYMkVY/zpZfUppEBK3qHMmMg538+pDTS5JTW85pWPN+5jBM glvRmv/7X9xtnsjcI8PeD1rLhgoKVJ2xko42sWzwSqA0izDlbgeoL91MVZZ561CgxylQ T4T5L+QfmEtg/gS/m+/k3CcEgejHYV1SQhdZpFWHxOV7pyir548V+a9y0J6O2pYcxiIY XE/uYYaW03HcsVidsCBuH+ZJIVkd487doNCkgzfaznay033oSXiXJEvjjP3ezaoctcVw KxWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qZi47jHK2O4SnJpGFWocns5R/B9IhyPRx7dDn1oBYFg=; b=SqceSbfGm3GanSxrt+3ZilNpRlmeh190BoyAbpQyIgyc9ca2fpAQ3damNLLrm+GyDM QLJMYcjtRt5Nxf13aJTRQ0SUSpFfXMC3KGM/smMZsA/Zr/bMgw33KoAJVF1i7StXxH5D FsjZbBR1RsSiHgi8rTyeIuDWauYF+p0Xvhf5dpvJzsIvfJu/FV9Xg9h54IHs5jcVs13r /5NW1VHUAVyC8A3Pgr9Kv2BwTtdlqh+fMtZZN8dGg+MN7z7NiZIeRIwO/DX1GBGyHhtO K4u2KAnrRqTROnP1kk3xQpXflOizYtwVrWXUcoew47OjWnhZcJ1JJXGc/eP8nnah8GpY VSDQ== X-Gm-Message-State: AFqh2kp4HGfckQkGIFGK+RaiYQ7GnSEdefOagMZamrOREhw6wqZGlZDA QVBAomYIhVuqcT4gd+x0nwTI8x860mQkECvr78g= X-Google-Smtp-Source: AMrXdXspI1/WAFyZCbp/PqYPnh4+pmYjQn08z7yzwaniebbawxqrXZJJ2JCvu16df5Wn2bPlasMFlg== X-Received: by 2002:a17:902:e951:b0:193:2ed4:561a with SMTP id b17-20020a170902e95100b001932ed4561amr14224451pll.38.1673490805096; Wed, 11 Jan 2023 18:33:25 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:24 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 02/11] systemd: backport another change from v252 to fix build with CVE-2022-45873.patch Date: Wed, 11 Jan 2023 16:33:03 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175775 From: Martin Jansa * CVE-2022-45873.patch was backported from systemd/main, but it doesn't build without another change from v252 when elfutils PACKAGECONFIG is enabled. * fixes: | ../git/src/shared/elf-util.c: In function 'parse_elf_object': | ../git/src/shared/elf-util.c:792:27: error: void value not ignored as it ought to be | 792 | r = json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); | | ^ Signed-off-by: Martin Jansa Signed-off-by: Steve Sakoman --- ...w-json_variant_dump-to-return-an-err.patch | 60 +++++++++++++++++++ meta/recipes-core/systemd/systemd_250.5.bb | 1 + 2 files changed, 61 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch diff --git a/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch b/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch new file mode 100644 index 0000000000..b23b735507 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch @@ -0,0 +1,60 @@ +From 25492154b42f68a48752a7f61eaf1fb61e454e52 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Oct 2022 18:09:06 +0200 +Subject: [PATCH] shared/json: allow json_variant_dump() to return an error + +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/7922ead507e0d83e4ec72a8cbd2b67194766e58c] + +Needed to fix CVE-2022-45873.patch backported from systemd/main, +otherwise it fails to build with: + +| ../git/src/shared/elf-util.c: In function 'parse_elf_object': +| ../git/src/shared/elf-util.c:792:27: error: void value not ignored as it ought to be +| 792 | r = json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); +| | ^ + +Signed-off-by: Martin Jansa +--- + src/shared/json.c | 7 ++++--- + src/shared/json.h | 2 +- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/shared/json.c b/src/shared/json.c +index dff95eda26..81c05efe22 100644 +--- a/src/shared/json.c ++++ b/src/shared/json.c +@@ -1792,9 +1792,9 @@ int json_variant_format(JsonVariant *v, JsonFormatFlags flags, char **ret) { + return (int) sz - 1; + } + +-void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix) { ++int json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix) { + if (!v) +- return; ++ return 0; + + if (!f) + f = stdout; +@@ -1820,7 +1820,8 @@ void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const cha + fputc('\n', f); /* In case of SSE add a second newline */ + + if (flags & JSON_FORMAT_FLUSH) +- fflush(f); ++ return fflush_and_check(f); ++ return 0; + } + + int json_variant_filter(JsonVariant **v, char **to_remove) { +diff --git a/src/shared/json.h b/src/shared/json.h +index 8760354b66..c712700763 100644 +--- a/src/shared/json.h ++++ b/src/shared/json.h +@@ -187,7 +187,7 @@ typedef enum JsonFormatFlags { + } JsonFormatFlags; + + int json_variant_format(JsonVariant *v, JsonFormatFlags flags, char **ret); +-void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix); ++int json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix); + + int json_variant_filter(JsonVariant **v, char **to_remove); + diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb index acca49c3cb..7df7bca4cc 100644 --- a/meta/recipes-core/systemd/systemd_250.5.bb +++ b/meta/recipes-core/systemd/systemd_250.5.bb @@ -27,6 +27,7 @@ SRC_URI += "file://touchscreen.rules \ file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ file://CVE-2022-3821.patch \ file://CVE-2022-45873.patch \ + file://0001-shared-json-allow-json_variant_dump-to-return-an-err.patch \ " # patches needed by musl From patchwork Thu Jan 12 02:33:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BC15C46467 for ; Thu, 12 Jan 2023 02:33:34 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web10.45160.1673490808451027372 for ; Wed, 11 Jan 2023 18:33:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=Q1LfEa1K; spf=softfail (domain: sakoman.com, ip: 209.85.216.53, mailfrom: steve@sakoman.com) Received: by mail-pj1-f53.google.com with SMTP id o7-20020a17090a0a0700b00226c9b82c3aso19302837pjo.3 for ; Wed, 11 Jan 2023 18:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gJRv9Qp3PuyZ9Xaxe4dk4TnbuULEy7brUPWl47voCeA=; b=Q1LfEa1KizDBKAKR4Ta1VPlzq9Kj5SmIYZZJ1lEokKfpd5wJfhlwQFwS2D8Gy1ffXr tpbAFzx+jTXk6F4PVWy42TFLvjt2t8GFnfolwR8wugwTM6KFHuT63YNxy8OMDx/Leala r4Jvhcd89xo5GosaDu/mlccuPdQGuO3EvtNUCvdHnQNzgzt4ZTV0mLIKrxwWpXz1iAVv pw66Rg/feMF8OpsTU9WKo9UvVTHneqJ3BbphKGvrTXd7dDgenqI3FOX9adL4zfaXPaDC yu1V3aEty+BL7HgTAPdP1ERlanYjS6uCaSjwy67ClyKi7RLF/id8NSKCWWSkDwPFboP4 iD5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gJRv9Qp3PuyZ9Xaxe4dk4TnbuULEy7brUPWl47voCeA=; b=p/6TzL++I14Eicvcj/QAfFFftUwMr50jNenY4unvo7XqhM1cqC56mWVt1P3RayZRvS vf+Y8YJg6fWOhJCFABo+uI2dDOYUGa18XDnShiLsnIMjVPZw2uat4SJJjxRCD9tquv1A Zxwv/Y+Xfc9f7F/87bMr+3i9dgR2aPBRp85PCePDc5TQTsmfX0BAR/tVGK13Suz/EWR9 LdqmDjnrwjpTxZ8AmvpRFhAenB9K42u8cyKvbmgttZ+YY/ZPpRUnBOetUfVedRI3v1r9 f4JVYQyPJI/P2195mLWKFOJ/DtcSqvFWs7v7MBEPbJanjIqqnj2fnSo4mfdCamE1WvkI S84A== X-Gm-Message-State: AFqh2krvoUVa7G/BI0d3bdI7rdKKifkS/Z0K+J1WwSFCEK/9o+ejnbeH 6LmU/GrLpdO8qyUW69Ldj01sJ8cX/ugnXsChHhc= X-Google-Smtp-Source: AMrXdXsV+XuCJrBld1QxRFjKhxNnbBuoavhQdy9S9yGxsxpyyOfB2DYGF7ZMI1YEg6Pg1rN+02eSwA== X-Received: by 2002:a17:903:482:b0:192:f961:c391 with SMTP id jj2-20020a170903048200b00192f961c391mr29279673plb.53.1673490807423; Wed, 11 Jan 2023 18:33:27 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:27 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 03/11] ffmpeg: fix for CVE-2022-3109 Date: Wed, 11 Jan 2023 16:33:04 -1000 Message-Id: <30119a4797c89b8b501246c4266b08a62467833d.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175776 From: Narpat Mali An issue was discovered in the FFmpeg package, where vp3_decode_frame in libavcodec/vp3.c lacks check of the return value of av_malloc() and will cause a null pointer dereference, impacting availability. CVE: CVE-2022-3109 Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/656cb0450aeb73b25d7d26980af342b37ac4c568] Signed-off-by: Narpat Mali Signed-off-by: Steve Sakoman --- ...-vp3-Add-missing-check-for-av_malloc.patch | 44 +++++++++++++++++++ .../recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb | 3 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch new file mode 100644 index 0000000000..94858a6cdd --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch @@ -0,0 +1,44 @@ +From 656cb0450aeb73b25d7d26980af342b37ac4c568 Mon Sep 17 00:00:00 2001 +From: Jiasheng Jiang +Date: Tue, 15 Feb 2022 17:58:08 +0800 +Subject: [PATCH] avcodec/vp3: Add missing check for av_malloc + +Since the av_malloc() may fail and return NULL pointer, +it is needed that the 's->edge_emu_buffer' should be checked +whether the new allocation is success. + +Fixes: d14723861b ("VP3: fix decoding of videos with stride > 2048") +Reviewed-by: Peter Ross +Signed-off-by: Jiasheng Jiang + +CVE: CVE-2022-3109 + +Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/656cb0450aeb73b25d7d26980af342b37ac4c568] + +Signed-off-by: Narpat Mali +--- + libavcodec/vp3.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c +index e9ab54d736..e2418eb6fa 100644 +--- a/libavcodec/vp3.c ++++ b/libavcodec/vp3.c +@@ -2679,8 +2679,13 @@ static int vp3_decode_frame(AVCodecContext *avctx, + AV_GET_BUFFER_FLAG_REF)) < 0) + goto error; + +- if (!s->edge_emu_buffer) ++ if (!s->edge_emu_buffer) { + s->edge_emu_buffer = av_malloc(9 * FFABS(s->current_frame.f->linesize[0])); ++ if (!s->edge_emu_buffer) { ++ ret = AVERROR(ENOMEM); ++ goto error; ++ } ++ } + + if (s->keyframe) { + if (!s->theora) { +-- +2.34.1 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb index 95b4bf50ac..c5bebe9c2d 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb @@ -26,7 +26,8 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ file://0001-avcodec-rpzaenc-stop-accessing-out-of-bounds-frame.patch \ file://0001-avcodec-smcenc-stop-accessing-out-of-bounds-frame.patch \ - " + file://0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch \ + " SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b" From patchwork Thu Jan 12 02:33:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18046 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 771E4C5479D for ; Thu, 12 Jan 2023 02:33:34 +0000 (UTC) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.45239.1673490810496202293 for ; Wed, 11 Jan 2023 18:33:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=qbCPq36C; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id s13-20020a17090a6e4d00b0022900843652so553189pjm.1 for ; Wed, 11 Jan 2023 18:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GilXtXd4dNBh+KQyS+oHjDCX32YmT5G4NSmqSb3eScY=; b=qbCPq36C/UFB2U1hTp+dieS5d+D3IyHDhyiC+3EFgrQxSldL+q8QuIDCBuRd7kCZLW Wlatkpjpk8bpWtHosebiAQHF6gz4MWJJo6WfKfnMNDLAp+vZbLyqRPSBQEk+m+ZeNQdn a23ccDFVVHyx1yZCqtptPx7LXAE4yqSrXEyzcq/W1aHPkRsIXktMKXCelwsyo9QUXl/W sJPihHWx0upCpXMO0UsB3Je2rMKgCMdKzs/vIiJIan6lJ+QgL3/6EPA7lSDCy0JgpkY6 MgzJw4c01+93ZS7lPPVuDLEmGviyhWraZWEgaS+3yFdGFMFk462hRa0PagEPAzgzVrg5 GKmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GilXtXd4dNBh+KQyS+oHjDCX32YmT5G4NSmqSb3eScY=; b=zRse/ydss7V6cfzZhxklkY5xedTwKS0KoEtuiVdb2ij/81kT3nsUgtJxGtQil7jTxZ iIZtn7FBnYWnOOMD3s1q5jKSY4Ak3AG/Yrr+2sZ03Ev4joNaYgVLu83xtiTuH7rrNTZ4 4ckJPw7rvTsZ1AufHkjhcfm3td05eOzqAOxVPKSB0ZbcPjdzqxSCI5aRUbRsY0U+kk8l BHl7SIzIuZ+8lJQTQwTqLFlENj/J79XNfKaqFwwRTuSZjdWBPXntsUKVVA1GEq8VcJVY HCW77elIB4o7P8cI68VTzwP4qnzA8nT40ArV+AJrn8xuPei8+rsIMEmdhuvg9NOwiCVm I2xg== X-Gm-Message-State: AFqh2kq7bPNLI+8uTX7B9aJlbFMCbPaPiLReDFd4G7xZ4Id55BY7oGM3 6lKSepY1QZdnZpmExJvsO4J+jNF/6fI1wKYpU5Y= X-Google-Smtp-Source: AMrXdXsqjgJAfQSMI4gHLn+rWahCE08nCFg9E+/WJyjPgekEoml5E36vrGKDryvLt4rpGe0FsFaMaw== X-Received: by 2002:a17:903:12cf:b0:194:5178:1135 with SMTP id io15-20020a17090312cf00b0019451781135mr3142959plb.30.1673490809419; Wed, 11 Jan 2023 18:33:29 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:28 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 04/11] libarchive: upgrade 3.6.1 -> 3.6.2 Date: Wed, 11 Jan 2023 16:33:05 -1000 Message-Id: <58417a8f1d9981a181aa93354b743d8815f4444e.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175777 From: Alexander Kanavin Libarchive 3.6.2 is a bugfix and security release. Important security fixes: NULL pointer dereference vulnerability in archive_write.c (#1754, #1759, CVE-2022-36227) Important bug fixes: include ZSTD in Windows builds (#1688) SSL fixes on Windows (#1714, #1723, #1724) rar5 reader: fix possible garbled output with bsdtar -O (#1745) mtree reader: support reading mtree files with tabs (#1783) various small fixes for issues found by CodeQL Use --without-iconv as otherwise autotools write a bogus iconv dependency into .pc file. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie (cherry picked from commit edce1bce81fe2f47fb2c5e2b94ebda73f95cbaea) Signed-off-by: Steve Sakoman (cherry picked from commit 93b972845a28b62ea01ee0f4a1e043bd58fc0892) Signed-off-by: Steve Sakoman --- .../libarchive/CVE-2022-36227.patch | 42 ------------------- ...ibarchive_3.6.1.bb => libarchive_3.6.2.bb} | 8 ++-- 2 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2022-36227.patch rename meta/recipes-extended/libarchive/{libarchive_3.6.1.bb => libarchive_3.6.2.bb} (92%) diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2022-36227.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2022-36227.patch deleted file mode 100644 index d0d143710c..0000000000 --- a/meta/recipes-extended/libarchive/libarchive/CVE-2022-36227.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b5332ed6d59ba5113a0a2c67fd82b69fcd5cde68 Mon Sep 17 00:00:00 2001 -From: obiwac -Date: Fri, 22 Jul 2022 22:41:10 +0200 -Subject: [PATCH] libarchive: CVE-2022-36227 Handle a `calloc` returning NULL - (fixes #1754) - -Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/bff38efe8c110469c5080d387bec62a6ca15b1a5] -CVE: CVE-2022-36227 -Signed-off-by: Hitendra Prajapati archive = _a; - f->state = ARCHIVE_WRITE_FILTER_STATE_NEW; - if (a->filter_first == NULL) -@@ -548,6 +552,10 @@ archive_write_open2(struct archive *_a, void *client_data, - a->client_data = client_data; - - client_filter = __archive_write_allocate_filter(_a); -+ -+ if (client_filter == NULL) -+ return (ARCHIVE_FATAL); -+ - client_filter->open = archive_write_client_open; - client_filter->write = archive_write_client_write; - client_filter->close = archive_write_client_close; --- -2.25.1 - diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.1.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb similarity index 92% rename from meta/recipes-extended/libarchive/libarchive_3.6.1.bb rename to meta/recipes-extended/libarchive/libarchive_3.6.2.bb index df9df5e0a6..acc84de9da 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.1.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb @@ -30,14 +30,12 @@ PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls," PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," -EXTRA_OECONF += "--enable-largefile" +EXTRA_OECONF += "--enable-largefile --without-iconv" -SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ - file://CVE-2022-36227.patch \ - " +SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz" UPSTREAM_CHECK_URI = "http://libarchive.org/" -SRC_URI[sha256sum] = "c676146577d989189940f1959d9e3980d28513d74eedfbc6b7f15ea45fe54ee2" +SRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3" inherit autotools update-alternatives pkgconfig From patchwork Thu Jan 12 02:33:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87B3AC678D5 for ; Thu, 12 Jan 2023 02:33:34 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web10.45161.1673490812585027949 for ; Wed, 11 Jan 2023 18:33:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=PtvrKRjI; spf=softfail (domain: sakoman.com, ip: 209.85.214.172, mailfrom: steve@sakoman.com) Received: by mail-pl1-f172.google.com with SMTP id d3so18777026plr.10 for ; Wed, 11 Jan 2023 18:33:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iYSbgHrKl+OV0kkgR/HMmmwmDuL46j8qMFbCPapU9w4=; b=PtvrKRjIAdKess8tKBZSYbsNWwvzRL3b5q4W6gR9OdixkDO3vHbEJw7eCMOAPf2sHN OxLzAPPBhgyOqYROMze/bKEYJeYUMvXg7HOJ9kmQbpC76TniINi0aCvAUVC6s1ziT+xm beSCZ5eWperULN+fRe8n4JhwM1MxodxqrwWplKsWIiXrTfa47O8EjzaQf3kmBh/5JokS B1ftMaHEAYku5r+O+gWAW7MonFb3rn5+H1glwUWpsKkLDe61t0qaWlEBHHfIsnVTN4DO gN897zDtoOAc3WT8Ypw5tMDJ5cC0hqjEbyb/vZ8meYtzGlYMKn11b+JK0FePARN/4RdR 4jHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iYSbgHrKl+OV0kkgR/HMmmwmDuL46j8qMFbCPapU9w4=; b=EkeVdmnpgXYkbobU8hLd3YYuyyNcpD9Gj4/qPQJVxSHgdm5tHIFN9qqhZBslxQqBnV HCdvZQmLT1UqAtaQ/x4A3+YKFEc0Gt8d8d5BA4HBfQMaDRDscHmSXNuBZ18GkX/ItvNT 3XJlzaWRX1bjXmjy4+LPqZG5Q81PTRH3hmoFfwsEXazdpzqcfXbQ182bzP3Xshtn6ZnC pZUfArent2ffrrPpf5P1wiZaUNyiGLd+k0Myfj1G1NVN+lP/DiXrWE+pgBE0tA2ZOmr4 E2IXI7enC6iV3u23MwCKl3eAnnFrOYtWDEhjvrLcM1Bm65iJ9GYlTGFS1nVdLGQ+bUTi gKyw== X-Gm-Message-State: AFqh2kohphDd8jrkrYZRfr01WggF/BgfPsS7i53UnrlzbWFrFS+3LvSv 4/Qz+QSpXkwyHz+VTzNZTxlmbr2eha44kwVD6dg= X-Google-Smtp-Source: AMrXdXsTfYzF/mNIbtw/jbBNz9V+0UzWRMo7knP6zY00y5i3+eufxK5EaGQYCuPdnXREQz/M4vEBnA== X-Received: by 2002:a17:903:230a:b0:189:d3d9:9308 with SMTP id d10-20020a170903230a00b00189d3d99308mr101120251plh.34.1673490811506; Wed, 11 Jan 2023 18:33:31 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:31 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 05/11] bind: upgrade 9.18.9 -> 9.18.10 Date: Wed, 11 Jan 2023 16:33:06 -1000 Message-Id: <180b8b72513dcfe23bb75d00a7ceb1dfeffa8279.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175778 From: Wang Mingyu Changelog: ========== The key file IO locks objects would never get deleted from the hashtable due to off-by-one error. ANY responses could sometimes have the wrong TTL. Speed up the named shutdown time by explicitly canceling all recursing ns_client objects for Removing a catalog zone from catalog-zones without also removing the referenced zone could leave a dangling pointer. [GL #3683] nslookup and host were not honoring the selected port in TCP mode. [GL #3721] Deprecate alt-transfer-source, alt-transfer-source-v6 and use-alt-transfer-source. [GL #3694] Move the "final reference detached" log message from dns_zone unit to the DEBUG(1) log level. Fix assertion failure in isc_http API used by statschannel if the read callback would be called on HTTP request that has been already closed. Deduplicate time unit conversion factors. Copy TLS identifier when setting up primaries for catalog member zones. Deprecate 'auto-dnssec'. [GL #3667] The decompression implementation in dns_name_fromwire() is now smaller and faster. [GL #3655] Use the current domain name when checking answers from a dual-stack-server. Ensure 'named-checkconf -z' respects the check-wildcard option when loading a zone. [GL #1905] Deprecate 'coresize', 'datasize', 'files', and 'stacksize' named.conf options. The view's zone table was not locked when it should have been leading to race conditions when external extensions that manipulate the zone table where in use. Some browsers (Firefox) send more than 10 HTTP headers. Bump the number of allowed HTTP headers to 100. [GL #3670] NXDOMAIN cache records are no longer retained in the cache after expiry, even when serve-stale is in use. [GL #3386] Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie (cherry picked from commit 1c093c38e247b522f279f616d16373795a4cdf89) Signed-off-by: Steve Sakoman (cherry picked from commit 410d69c684ba4eb6dd279a40436043259f94b6b9) Signed-off-by: Steve Sakoman --- .../0001-avoid-start-failure-with-bind-user.patch | 0 .../0001-named-lwresd-V-and-start-log-hide-build-options.patch | 0 .../bind-ensure-searching-for-json-headers-searches-sysr.patch | 0 .../bind/{bind-9.18.9 => bind-9.18.10}/bind9 | 0 .../bind/{bind-9.18.9 => bind-9.18.10}/conf.patch | 0 .../bind/{bind-9.18.9 => bind-9.18.10}/generate-rndc-key.sh | 0 .../init.d-add-support-for-read-only-rootfs.patch | 0 .../make-etc-initd-bind-stop-work.patch | 0 .../bind/{bind-9.18.9 => bind-9.18.10}/named.service | 0 .../bind/{bind_9.18.9.bb => bind_9.18.10.bb} | 2 +- 10 files changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/0001-avoid-start-failure-with-bind-user.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/0001-named-lwresd-V-and-start-log-hide-build-options.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/bind-ensure-searching-for-json-headers-searches-sysr.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/bind9 (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/conf.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/generate-rndc-key.sh (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/init.d-add-support-for-read-only-rootfs.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/make-etc-initd-bind-stop-work.patch (100%) rename meta/recipes-connectivity/bind/{bind-9.18.9 => bind-9.18.10}/named.service (100%) rename meta/recipes-connectivity/bind/{bind_9.18.9.bb => bind_9.18.10.bb} (97%) diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/0001-avoid-start-failure-with-bind-user.patch b/meta/recipes-connectivity/bind/bind-9.18.10/0001-avoid-start-failure-with-bind-user.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/0001-avoid-start-failure-with-bind-user.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/0001-avoid-start-failure-with-bind-user.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/0001-named-lwresd-V-and-start-log-hide-build-options.patch b/meta/recipes-connectivity/bind/bind-9.18.10/0001-named-lwresd-V-and-start-log-hide-build-options.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/0001-named-lwresd-V-and-start-log-hide-build-options.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/0001-named-lwresd-V-and-start-log-hide-build-options.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta/recipes-connectivity/bind/bind-9.18.10/bind-ensure-searching-for-json-headers-searches-sysr.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/bind-ensure-searching-for-json-headers-searches-sysr.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/bind-ensure-searching-for-json-headers-searches-sysr.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/bind9 b/meta/recipes-connectivity/bind/bind-9.18.10/bind9 similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/bind9 rename to meta/recipes-connectivity/bind/bind-9.18.10/bind9 diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/conf.patch b/meta/recipes-connectivity/bind/bind-9.18.10/conf.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/conf.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/conf.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind-9.18.10/generate-rndc-key.sh similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/generate-rndc-key.sh rename to meta/recipes-connectivity/bind/bind-9.18.10/generate-rndc-key.sh diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/init.d-add-support-for-read-only-rootfs.patch b/meta/recipes-connectivity/bind/bind-9.18.10/init.d-add-support-for-read-only-rootfs.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/init.d-add-support-for-read-only-rootfs.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/init.d-add-support-for-read-only-rootfs.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/make-etc-initd-bind-stop-work.patch b/meta/recipes-connectivity/bind/bind-9.18.10/make-etc-initd-bind-stop-work.patch similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/make-etc-initd-bind-stop-work.patch rename to meta/recipes-connectivity/bind/bind-9.18.10/make-etc-initd-bind-stop-work.patch diff --git a/meta/recipes-connectivity/bind/bind-9.18.9/named.service b/meta/recipes-connectivity/bind/bind-9.18.10/named.service similarity index 100% rename from meta/recipes-connectivity/bind/bind-9.18.9/named.service rename to meta/recipes-connectivity/bind/bind-9.18.10/named.service diff --git a/meta/recipes-connectivity/bind/bind_9.18.9.bb b/meta/recipes-connectivity/bind/bind_9.18.10.bb similarity index 97% rename from meta/recipes-connectivity/bind/bind_9.18.9.bb rename to meta/recipes-connectivity/bind/bind_9.18.10.bb index b95b900069..2432131f5c 100644 --- a/meta/recipes-connectivity/bind/bind_9.18.9.bb +++ b/meta/recipes-connectivity/bind/bind_9.18.10.bb @@ -20,7 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ file://0001-avoid-start-failure-with-bind-user.patch \ " -SRC_URI[sha256sum] = "6a9665998d568604460df0918fc8ccfad7d29388d4d842560c056cc211cbb243" +SRC_URI[sha256sum] = "f415a92feb62568b50854a063cb231e257351f8672186d0ab031a49b3de2cac6" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # follow the ESV versions divisible by 2 From patchwork Thu Jan 12 02:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18044 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87B00C63797 for ; Thu, 12 Jan 2023 02:33:34 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web11.45241.1673490814240706503 for ; Wed, 11 Jan 2023 18:33:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=0OSxtiTe; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id y1so18813515plb.2 for ; Wed, 11 Jan 2023 18:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=rvVDmXDGQd3/Zqp3TTs58kGDzQUhsmijnz6KCKfwZ4A=; b=0OSxtiTe4eQ0Mb6oFaQa0sI2ghWHnAB12NwpJQCB7x5O3m8K8k+Y9cQSjC1bSlv8tD bm4Ry6xfLl2MBWRB9n/xwtAfIeUQjgVJIvD0i8yiLKfQr0k6fM3Aj4QC4B//fKXGA2Vc lDTR+qNhXcSxxhowSo77SJEHFEZfAfoMwm/Uto7fLSwBh0eABaOi5RfD0xAwsc6Yo8kF 2R5GsFnFluGmL9Tv68iNn5bOUVPdCJlKUZc4Xo3Tr84HT3nwE2HQW+IjVd0xKf+AWOq9 r2oz9cgkjCpP+jsf5lsSiRGgrqsgq+KUxUg8Eps1q+kDKcaxLopsebw64NLJ4yzkOwF7 dd+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rvVDmXDGQd3/Zqp3TTs58kGDzQUhsmijnz6KCKfwZ4A=; b=Fc8IcY0IYmE5I8dQ4LFu4i74r2GIby/fuvUYNxOmBpkNJ83XMHe1WJlpT6/9pk559Q pRSp4L5i5ZgrLkRNMdHUcANPkp4arbgg4cNyICkNrmPe9TmAQtWySQMjMqt+CXPOF05V auZfrRI/7CGty+jJcdBrlzWGNQ7v/fgCS8QmMyHxizU8IAK1YFL7zUmzxnNizcjCwcMF E1z1o+qJHWwe+fClJk/waQJgXiwfqvoW2fmQx4KwprxOKlng2CMNTG19EjUNimygmLTE PKnVgLNTK7J4oVFE10+fwnHRJKousQ3dXQqeVpTeG8WvSvNWole7ytay2BRvZOzkNGjK ivpQ== X-Gm-Message-State: AFqh2kpl4AtbqIar0Si5sFMiBwiUFuUZed1lPDyYCen2mPodrJA5hbGt IqokphZ11aAROahJytdWwTrPmPrFZ/kgim2s0LI= X-Google-Smtp-Source: AMrXdXsasuF6cm7coUwflbLddpWVMSavUzHCZNEgeJ/oV/mMAbY23ELFOeHbwo3z7RqydtxMG0CXGg== X-Received: by 2002:a17:902:8688:b0:189:e7ea:9ff9 with SMTP id g8-20020a170902868800b00189e7ea9ff9mr65392340plo.42.1673490813343; Wed, 11 Jan 2023 18:33:33 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:32 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 06/11] base.bbclass: Fix way to check ccache path Date: Wed, 11 Jan 2023 16:33:07 -1000 Message-Id: <5038a93d5e511c73f160bd9c284791be4931f1e9.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175779 From: Changqing Li The previous code had 2 issues: 1. make hosttools/ccache always link to host's ccache (/usr/bin/ccache) even we have one buildtools 2. make hosttools/gcc etc, link to host's gcc event we have one buildtools when keyword ccache in buildtools's path, eg: /mnt/ccache/bin/buildtools This patch is for fix above issues. Signed-off-by: Changqing Li Signed-off-by: Richard Purdie (cherry picked from commit 1b7c81414cf252a7203d95703810a770184d7e4d) Signed-off-by: Steve Sakoman --- meta/classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index cb9da78ab6..b15c5839b6 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -132,7 +132,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) # would return /usr/local/bin/ccache/gcc, but what we need is # /usr/bin/gcc, this code can check and fix that. - if "ccache" in srctool: + if os.path.islink(srctool) and os.path.basename(os.readlink(srctool)) == 'ccache': srctool = bb.utils.which(path, tool, executable=True, direction=1) if srctool: os.symlink(srctool, desttool) From patchwork Thu Jan 12 02:33:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CB84C54EBC for ; Thu, 12 Jan 2023 02:33:44 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web11.45241.1673490814240706503 for ; Wed, 11 Jan 2023 18:33:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=4jXn7XEP; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id y1so18813571plb.2 for ; Wed, 11 Jan 2023 18:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RWoQ7ZdID0852oC1UT3BKqalSRewBsNwDifkjs3CYPA=; b=4jXn7XEP3RRQAdFCHtTMPxH3NtErxMapVzTOHMjjXubsbADNTQXFmfCq7XdPJi9kxC 5n7J8uUvIrjFI43TcTApWP2oCnhrPivDzbdQzAxLP6zwu5Am5da2373lk1DWmRYk0H3w Q+oZr3fZvQaMdL5zVMExUlDdMJZgnjHer4O3VrFUau8mrvMWWRiL916OFTfZGuI66fSK HawpMjyIhB6msK0D9xziAJsy3MP70auqpnv00STPUt0btp8wOykIb7c4wR208tnbTErN lqfY1bbtQVWg2YSrlpnRbm26DCBNEDM+9OekrPtfmP/L+ba4oGjZaSJEd3RWR5z2Ost1 Y8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RWoQ7ZdID0852oC1UT3BKqalSRewBsNwDifkjs3CYPA=; b=775mokco1m9s3jrGZXAgryvzQXb3qsSuGQTpRXkixSn0f7CzWVYn/ZSh6Fxgr4Socb ymWByxgrb1PpUYF2Ggp+cFGegzU4mX4lmEFuPRGYF/8wy5Od2s1/0+1Q6XIyEaVUalZ6 ugwPbZok4HATpKwIkS9I8r3NyV68aSBmdPIZubyV0Z1ktgzKUrWf659XP0+H5q+Tq7ee TK0lmuG5p8CjXhzGJXcgaq1JqI6fJMUZRfQmiizeQbbQjt9vg8dGYECwUt0scZJyNmAF 6Ny7gxmai2rRcWa5rKrEJ/0wzxXM6C7illMaCcym8QuMvSsovuDeUjTUIB168r490i3n WeXw== X-Gm-Message-State: AFqh2koIKG+Q3BxVzn3VC/jyI33X95MH4rjgXZadifYAivuzoY26nETP TPZ+ohIuz+nPNiZ4rjzAFxJQtYqHoPhVSbIba9c= X-Google-Smtp-Source: AMrXdXsVVMrqEdADaw3OaX6ularg9cm2OWqist58AcgVU81iFKntauQ98DTo3JF/9yqghiRqiJl00A== X-Received: by 2002:a17:902:b085:b0:192:d5dc:c84b with SMTP id p5-20020a170902b08500b00192d5dcc84bmr31543755plr.50.1673490815135; Wed, 11 Jan 2023 18:33:35 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:34 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 07/11] rm_work.bbclass: use HOSTTOOLS 'rm' binary exclusively Date: Wed, 11 Jan 2023 16:33:08 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175780 From: Luis The do_rm_work() task is using the first available 'rm' binary available in PATH to remove files and folders. However, depending on the PATH setup and RECIPE_SYSROOT_NATIVE contents, the function can be using the 'rm' binary available in RECIPE_SYSROOT_NATIVE, a folder that will get removed. This causes a sporadic race-condition when trying to access the 'rm' binary of a folder already deleted. Solve this by exclusively using the HOSTTOOLS 'rm' binary, as this folder will not get removed. Signed-off-by: Luis Martins Signed-off-by: Richard Purdie (cherry picked from commit edcd9ad333bc4e504594e8af83e8cb7007d2e35c) Signed-off-by: Steve Sakoman --- meta/classes/rm_work.bbclass | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 8979714e62..f7ededff26 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass @@ -27,6 +27,13 @@ BB_SCHEDULER ?= "completion" BB_TASK_IONICE_LEVEL:task-rm_work = "3.0" do_rm_work () { + # Force using the HOSTTOOLS 'rm' - otherwise the SYSROOT_NATIVE 'rm' can be selected depending on PATH + # Avoids race-condition accessing 'rm' when deleting WORKDIR folders at the end of this function + RM_BIN="$(PATH=${HOSTTOOLS_DIR} command -v rm)" + if [ -z "${RM_BIN}" ]; then + bbfatal "Binary 'rm' not found in HOSTTOOLS_DIR, cannot remove WORKDIR data." + fi + # If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe. for p in ${RM_WORK_EXCLUDE}; do if [ "$p" = "${PN}" ]; then @@ -73,7 +80,7 @@ do_rm_work () { # sstate version since otherwise we'd need to leave 'plaindirs' around # such as 'packages' and 'packages-split' and these can be large. No end # of chain tasks depend directly on do_package anymore. - rm -f -- $i; + "${RM_BIN}" -f -- $i; ;; *_setscene*) # Skip stamps which are already setscene versions @@ -90,7 +97,7 @@ do_rm_work () { ;; esac done - rm -f -- $i + "${RM_BIN}" -f -- $i esac done @@ -100,9 +107,9 @@ do_rm_work () { # Retain only logs and other files in temp, safely ignore # failures of removing pseudo folers on NFS2/3 server. if [ $dir = 'pseudo' ]; then - rm -rf -- $dir 2> /dev/null || true + "${RM_BIN}" -rf -- $dir 2> /dev/null || true elif ! echo "$excludes" | grep -q -w "$dir"; then - rm -rf -- $dir + "${RM_BIN}" -rf -- $dir fi done } From patchwork Thu Jan 12 02:33:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D01FC5479D for ; Thu, 12 Jan 2023 02:33:44 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web11.45236.1673490806146226232 for ; Wed, 11 Jan 2023 18:33:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=29m0ct0/; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id jn22so18769493plb.13 for ; Wed, 11 Jan 2023 18:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NuRFmRLn/MSSa14UUti0pBrxhByfafb/HNEmMma+FBQ=; b=29m0ct0/3PehpCyjxPyQ+9n1HMj2BZLvkpVm0pwaCIV8U/SIPlWPLNDvWV65JLmYOz XyKZ0H9mF8uHcex9Vnhi+Ue/LQO0rFfJtobYf1sWXelvshemwvK3Wzf54zb+GaU7AZcW Jfmf24ZQ6DKHtznI/EjxCLQ9txcF9ApOt1bA7DFoNCWoFxn16w51csqtzvqfI0OiLNvK FPviompQ7CGZVmsLHFeq9JiEoyAGL5XtNfaWXMiLyxrxW8RWnbs3OZQxljasiUSOYmTw VeopzAO+IwZZ1m0yZCsl1JcfvHksXP4h0fz3GwQhe+QlvEo8wWwhnuO79NQ5Zael+mg1 nu2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NuRFmRLn/MSSa14UUti0pBrxhByfafb/HNEmMma+FBQ=; b=0x6B7WZspW/s/IIC6zAX7f1ErvMJ9SGcqMnAsLOU3mZ5kZ4CB35zMgHh+r69m06eIk GowRX21HgUjtsjjPHSuGaBNQ7KiqAwihRy2DUKVwHOpB90yb4IXz3cKVwcmb4wlShizH hHW2VL0D+PK7LIuFGqc0rvCKliCN9hDxK9q8wwcmq8ACUSRY0bF4WgYBAqZA4n58M3wo ZJpyJLy98oXJAyaOyDULACpeyM6rcbB8dohH+so8AqFhV5wl9mhzK3XbMkJnTwBOikB7 4ljtmLoUgNb8rxdMMCA4iiixPo8nwZbpYBDFN/MKZ1CcV++iCHgfj8QR3/hG0LNQvtIv 7x1Q== X-Gm-Message-State: AFqh2kotmL7QOcP7jhx2QMbvFfnkUdScVweDRVYv/FymcjWhKfqi+frX iIQNFaYTNomCj3GcSSyx8EmG3YaJ6DwcqX4QUeY= X-Google-Smtp-Source: AMrXdXvvIwwCqxd95VC5R9e8JJvx5HISHS1OEEEAC03Gk67MRRH0r+BuQrayKoJf70Nw5Ap0FZb3hQ== X-Received: by 2002:a17:903:32c2:b0:192:b0cb:2e23 with SMTP id i2-20020a17090332c200b00192b0cb2e23mr57414309plr.46.1673490816973; Wed, 11 Jan 2023 18:33:36 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:36 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 08/11] oeqa/rpm.py: Increase timeout and add debug output Date: Wed, 11 Jan 2023 16:33:09 -1000 Message-Id: <46b5bb52e029e435357f4cf3f37d0c8770f9154b.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175781 From: Pavel Zhukov [Yocto #14346] Systemd may be slow in killing pam session sometimes [1][2]. It may cause rpm test to fail because there's process (sd_pam) running and own by "test1" user after timeout. Increasing timeout to 2 mins and assert earlier with debug output if there's such process(es). If increasing of timeout doesn't help we may want to force deletion of the user as [2] suggests. [1] https://github.com/systemd/systemd/issues/8598 [2] https://access.redhat.com/solutions/6969188 Signed-off-by: Pavel Zhukov Signed-off-by: Richard Purdie (cherry picked from commit 972fcc0ed1e0d36c3470071a9c667c5327c1ef78) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/runtime/cases/rpm.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py index a4339116bf..5bdce3d522 100644 --- a/meta/lib/oeqa/runtime/cases/rpm.py +++ b/meta/lib/oeqa/runtime/cases/rpm.py @@ -49,21 +49,20 @@ class RpmBasicTest(OERuntimeTestCase): msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output) self.assertEqual(status, 0, msg=msg) - def check_no_process_for_user(u): - _, output = self.target.run(self.tc.target_cmds['ps']) - if u + ' ' in output: - return False - else: - return True + def wait_for_no_process_for_user(u, timeout = 120): + timeout_at = time.time() + timeout + while time.time() < timeout_at: + _, output = self.target.run(self.tc.target_cmds['ps']) + if u + ' ' not in output: + return + time.sleep(1) + user_pss = [ps for ps in output.split("\n") if u + ' ' in ps] + msg = "There're %s 's process(es) still running: %s".format(u, "\n".join(user_pss)) + assertTrue(True, msg=msg) def unset_up_test_user(u): # ensure no test1 process in running - timeout = time.time() + 30 - while time.time() < timeout: - if check_no_process_for_user(u): - break - else: - time.sleep(1) + wait_for_no_process_for_user(u) status, output = self.target.run('userdel -r %s' % u) msg = 'Failed to erase user: %s' % output self.assertTrue(status == 0, msg=msg) From patchwork Thu Jan 12 02:33:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F05C63797 for ; Thu, 12 Jan 2023 02:33:44 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web11.45242.1673490820064774024 for ; Wed, 11 Jan 2023 18:33:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=GJPOYzaJ; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id o13so14245009pjg.2 for ; Wed, 11 Jan 2023 18:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ul7LwdV60gybaykpx0E+SMqsSYsxLLt3eChOaxMH+zk=; b=GJPOYzaJyI5pqfY16jClbacWLWXxsJVZi02tOvmL+kzKbsxUvvQAttkCPo7EOOa7in 9FxFnKlGbw1Gr/cJOtaFDFDWBIL4CzP1yFkK18wGwFx/RD1AB26ByB79kCt3TxtaMFSq gG80mQqsaKH2U87U/xi3nOWUtbQnVQ/zHeOQVg9rHTa6fqyY1v/cMBA7anqb3HnkCex8 w3h3JnnsU4xUnPLrrUWhvpHKizsmOx2Ym7vZqmPoe3HYSC7arueOlPenX2PgIIdV6wcf PGoNa/bM96t0DknM4DOOTXRYQfJeSMZwsmfGI7nxOl+ad48F13hAYdSXPtHCYQ9LJ6wn hP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ul7LwdV60gybaykpx0E+SMqsSYsxLLt3eChOaxMH+zk=; b=Q3WJoel2dZEr78fsyYRe/7EYUu5L8eq2iCR+0jCevPi/MHcc0jDAh3Th9vT44agIpE OKBfvPJsMTakvqQZzGHr3Um++WrhML6wA3Jln93TZmFKHiHiLGbDgBKVDX8lvHKyPKiZ 25NX3ykDVJIyMrah6J0+ysPdCxSXN30L7bJmtKTdGnCu3vbu+OIjh0G2q2rUebNTxZHE YM95MMx2/X5bI6mmMzKbl03g9O12Zc3KpIj7S8u1XzFtqWItQQhc8qCVJEMWXBbp7hBu rdng32eqmh2UvqstL8cEq0u1/FkyuakoFEwUUqKE3qSCbkXefcuQQ/M/Li0axLFyKsqP JaRw== X-Gm-Message-State: AFqh2koM2AMLZ+0oQDo36LqTLC4HV7Bx3nQWRq/BChCDXRnVB9nVA70z dQezXsX8qyPrnJ05r8ijhtFDB9tD2zlIBUGFi7E= X-Google-Smtp-Source: AMrXdXv/zmMeX0t+cEBnF325RTRWYyRx58iuI4ylXo2in+j532vTstNvgVYU5fEJzCiCxWuHW0+/hg== X-Received: by 2002:a17:902:7601:b0:192:8e8b:bcf with SMTP id k1-20020a170902760100b001928e8b0bcfmr51683333pll.56.1673490819018; Wed, 11 Jan 2023 18:33:39 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:38 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 09/11] Revert "gstreamer1.0: disable flaky gstbin:test_watch_for_state_change test" Date: Wed, 11 Jan 2023 16:33:10 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175782 From: Jose Quaresma This reverts commit 220a527d269f146bdabd66040b5bee7de9e3fd3f. - Drop this patch and use the upstream solution https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2643 Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie (cherry picked from commit 9660045d07a2b492ac48a1f1b08aa4288b45d64a) Signed-off-by: Steve Sakoman --- ...bin-test_watch_for_state_change-test.patch | 107 ------------------ .../gstreamer/gstreamer1.0_1.20.5.bb | 1 - 2 files changed, 108 deletions(-) delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch deleted file mode 100644 index f51df6d20b..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch +++ /dev/null @@ -1,107 +0,0 @@ -From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001 -From: Claudius Heine -Date: Wed, 2 Feb 2022 13:47:02 +0100 -Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase - -This testcase seems to be flaky, and upstream marked it as such: -https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778 - -This patch removes the testcase to avoid it interfering with out ptest. - -Signed-off-by: Claudius Heine - -Upstream-Status: Inappropriate [needs proper upstream fix] ---- - tests/check/gst/gstbin.c | 69 ------------------- - 1 file changed, 69 deletions(-) - -diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c -index e366d5fe20..ac29d81474 100644 ---- a/tests/check/gst/gstbin.c -+++ b/tests/check/gst/gstbin.c -@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children) - - GST_END_TEST; - --GST_START_TEST (test_watch_for_state_change) --{ -- GstElement *src, *sink, *bin; -- GstBus *bus; -- GstStateChangeReturn ret; -- -- bin = gst_element_factory_make ("bin", NULL); -- fail_unless (bin != NULL, "Could not create bin"); -- -- bus = g_object_new (gst_bus_get_type (), NULL); -- gst_object_ref_sink (bus); -- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus); -- -- src = gst_element_factory_make ("fakesrc", NULL); -- fail_if (src == NULL, "Could not create fakesrc"); -- sink = gst_element_factory_make ("fakesink", NULL); -- fail_if (sink == NULL, "Could not create fakesink"); -- -- gst_bin_add (GST_BIN (bin), sink); -- gst_bin_add (GST_BIN (bin), src); -- -- fail_unless (gst_element_link (src, sink), "could not link src and sink"); -- -- /* change state, spawning two times three messages */ -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); -- fail_unless (ret == GST_STATE_CHANGE_ASYNC); -- ret = -- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, -- GST_CLOCK_TIME_NONE); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- pop_state_changed (bus, 6); -- pop_async_done (bus); -- pop_latency (bus); -- -- fail_unless (gst_bus_have_pending (bus) == FALSE, -- "Unexpected messages on bus"); -- -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- pop_state_changed (bus, 3); -- -- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); -- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); -- -- pop_state_changed (bus, 3); -- if (ret == GST_STATE_CHANGE_ASYNC) { -- pop_async_done (bus); -- pop_latency (bus); -- } -- -- fail_unless (gst_bus_have_pending (bus) == FALSE, -- "Unexpected messages on bus"); -- -- gst_bus_set_flushing (bus, TRUE); -- -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- /* clean up */ -- gst_object_unref (bus); -- gst_object_unref (bin); --} -- --GST_END_TEST; -- - GST_START_TEST (test_state_change_error_message) - { - GstElement *src, *sink, *bin; -@@ -1956,7 +1888,6 @@ gst_bin_suite (void) - tcase_add_test (tc_chain, test_message_state_changed); - tcase_add_test (tc_chain, test_message_state_changed_child); - tcase_add_test (tc_chain, test_message_state_changed_children); -- tcase_add_test (tc_chain, test_watch_for_state_change); - tcase_add_test (tc_chain, test_state_change_error_message); - tcase_add_test (tc_chain, test_add_linked); - tcase_add_test (tc_chain, test_add_self); --- -2.33.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb index bb4dba3861..5a96764780 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb @@ -21,7 +21,6 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \ file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \ file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \ - file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \ " SRC_URI[sha256sum] = "5a19083faaf361d21fc391124f78ba6d609be55845a82fa8f658230e5fa03dff" From patchwork Thu Jan 12 02:33:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91D76C46467 for ; Thu, 12 Jan 2023 02:33:44 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web10.45168.1673490822010745414 for ; Wed, 11 Jan 2023 18:33:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=AUFx5zi6; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id c8-20020a17090a4d0800b00225c3614161so22072950pjg.5 for ; Wed, 11 Jan 2023 18:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xlzSJTjLdEuRh5c6si/BUKP9ll9uBpnMfbW3OAg/WpQ=; b=AUFx5zi6NjHNj+kQUxQkajtorZUFYaaZ71nvh7bQhfeGuiPG/QdIXqkf8+uXGv7VM+ Es7GETgRkYN4J3FlcjKlf9upxzlBjmYR1/6ypwYm84DZExhzkSPWGa1Hd0V0+sFKEkrL WlrOmVds/KwYqcyiQT3kjzIqVshV6dpvFSfFtVFWY8I0wpS554/NjH4hClVZBBPPnQpK goAIKpmYwoaqZe7zFUazIk8y2cf1Lu+UasxG22TT4kaZs60X1mla/e5Rwfpnb85JE4/I aYo/eV1OMxvEPZ8S5wsq8eYjnH2dDPtgK/L+foKBiycQ3DqxIX3HDqS88SHxX3mNlO9m msBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xlzSJTjLdEuRh5c6si/BUKP9ll9uBpnMfbW3OAg/WpQ=; b=YUMdFVhO3dTz02vEKSD00cutt8hHjoACHDV80hCnHae/FZM+MUjxByUIZZc677YNUe OKttkiA1P767E6Y0XtH0kwh3DQBNpd8dEPmiWO3cgKoNfaSuJ+QhDPnEfugUOnfvJ5MX n7drKhG1tpHO85xSpAcX1Cn65nSDz9/lW2W3bh1rIjVUIfrYNIrKNuMQNFO92ytmkwfK 4L1xCiy6DkaHaCNiDUi++uU3Fdvh4SgqGIYh+1JgNWcJNj5GpXEHYRu0h82PvhtiCA9S UZ3KqweNDenJoIEnCpwwsM78tsj0TrrA60N7nxeH0LgacLQkfcwCWK+nvBamLIv9gPyb 7DjA== X-Gm-Message-State: AFqh2kozsLsx2mS/Fg57ND4kOgpxbwnAfiuD7p4N5nFyAc8O2ShlMyo6 bpZ4jGMk+5oevLgmhv+TaBw6q6S2qGkyUv3d/BE= X-Google-Smtp-Source: AMrXdXsoTB+0SGDU61USnama44ComUnOcdViubSyGlCb4bqQ52Hz897BYbxhuvzbhL5Fugr9sYj3Pw== X-Received: by 2002:a17:902:8d94:b0:194:4337:d9df with SMTP id v20-20020a1709028d9400b001944337d9dfmr6853542plo.43.1673490820889; Wed, 11 Jan 2023 18:33:40 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:40 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 10/11] gstreamer1.0: Fix race conditions in gstbin tests Date: Wed, 11 Jan 2023 16:33:11 -1000 Message-Id: <8b3efd652d71f20615e7d09a3aee64e7d66b2150.1673490673.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175783 From: Jose Quaresma Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie (cherry picked from commit b57df3fe9c1623ba2f5a9a0e11a85dcdc77e76a5) Signed-off-by: Steve Sakoman --- ...005-bin-Fix-race-conditions-in-tests.patch | 300 ++++++++++++++++++ .../gstreamer/gstreamer1.0_1.20.5.bb | 1 + 2 files changed, 301 insertions(+) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-bin-Fix-race-conditions-in-tests.patch diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-bin-Fix-race-conditions-in-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-bin-Fix-race-conditions-in-tests.patch new file mode 100644 index 0000000000..f1fac2df57 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-bin-Fix-race-conditions-in-tests.patch @@ -0,0 +1,300 @@ +From e1e2d8d58c1e09e065849cdb1f6466c0537a7c51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Tue, 21 Jun 2022 11:51:35 +0300 +Subject: [PATCH] bin: Fix race conditions in tests + +The latency messages are non-deterministic and can arrive before/after +async-done or during state-changes as they are posted by e.g. sinks from +their streaming thread but bins are finishing asynchronous state changes +from a secondary helper thread. + +To solve this, expect latency messages at any time and assert that we +receive one at some point during the test. + +Part-of: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2643] +Signed-off-by: Jose Quaresma +--- + .../gstreamer/tests/check/gst/gstbin.c | 132 ++++++++++++------ + 1 file changed, 92 insertions(+), 40 deletions(-) + +diff --git a/subprojects/gstreamer/tests/check/gst/gstbin.c b/subprojects/gstreamer/tests/check/gst/gstbin.c +index e366d5fe20f..88ff44db0c3 100644 +--- a/subprojects/gstreamer/tests/check/gst/gstbin.c ++++ b/subprojects/gstreamer/tests/check/gst/gstbin.c +@@ -27,50 +27,95 @@ + #include + + static void +-pop_async_done (GstBus * bus) ++pop_async_done (GstBus * bus, gboolean * had_latency) + { + GstMessage *message; ++ GstMessageType types = GST_MESSAGE_ASYNC_DONE; ++ ++ if (!*had_latency) ++ types |= GST_MESSAGE_LATENCY; + + GST_DEBUG ("popping async-done message"); +- message = gst_bus_poll (bus, GST_MESSAGE_ASYNC_DONE, -1); + +- fail_unless (message && GST_MESSAGE_TYPE (message) +- == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE"); ++ do { ++ message = gst_bus_poll (bus, types, -1); + +- gst_message_unref (message); +- GST_DEBUG ("popped message"); ++ fail_unless (message); ++ GST_DEBUG ("popped message %s", ++ gst_message_type_get_name (GST_MESSAGE_TYPE (message))); ++ ++ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) { ++ fail_unless (*had_latency == FALSE); ++ *had_latency = TRUE; ++ gst_clear_message (&message); ++ types &= ~GST_MESSAGE_LATENCY; ++ continue; ++ } ++ ++ fail_unless (GST_MESSAGE_TYPE (message) ++ == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE"); ++ ++ gst_clear_message (&message); ++ break; ++ } while (TRUE); + } + + static void +-pop_latency (GstBus * bus) ++pop_latency (GstBus * bus, gboolean * had_latency) + { + GstMessage *message; + +- GST_DEBUG ("popping async-done message"); ++ if (*had_latency) ++ return; ++ ++ GST_DEBUG ("popping latency message"); + message = gst_bus_poll (bus, GST_MESSAGE_LATENCY, -1); + +- fail_unless (message && GST_MESSAGE_TYPE (message) ++ fail_unless (message); ++ fail_unless (GST_MESSAGE_TYPE (message) + == GST_MESSAGE_LATENCY, "did not get GST_MESSAGE_LATENCY"); + +- gst_message_unref (message); +- GST_DEBUG ("popped message"); ++ GST_DEBUG ("popped message %s", ++ gst_message_type_get_name (GST_MESSAGE_TYPE (message))); ++ gst_clear_message (&message); ++ ++ *had_latency = TRUE; + } + + static void +-pop_state_changed (GstBus * bus, int count) ++pop_state_changed (GstBus * bus, int count, gboolean * had_latency) + { + GstMessage *message; +- ++ GstMessageType types = GST_MESSAGE_STATE_CHANGED; + int i; + ++ if (!*had_latency) ++ types |= GST_MESSAGE_LATENCY; ++ + GST_DEBUG ("popping %d messages", count); + for (i = 0; i < count; ++i) { +- message = gst_bus_poll (bus, GST_MESSAGE_STATE_CHANGED, -1); +- +- fail_unless (message && GST_MESSAGE_TYPE (message) +- == GST_MESSAGE_STATE_CHANGED, "did not get GST_MESSAGE_STATE_CHANGED"); +- +- gst_message_unref (message); ++ do { ++ message = gst_bus_poll (bus, types, -1); ++ ++ fail_unless (message); ++ GST_DEBUG ("popped message %s", ++ gst_message_type_get_name (GST_MESSAGE_TYPE (message))); ++ ++ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) { ++ fail_unless (*had_latency == FALSE); ++ *had_latency = TRUE; ++ gst_clear_message (&message); ++ types &= ~GST_MESSAGE_LATENCY; ++ continue; ++ } ++ ++ fail_unless (GST_MESSAGE_TYPE (message) ++ == GST_MESSAGE_STATE_CHANGED, ++ "did not get GST_MESSAGE_STATE_CHANGED"); ++ ++ gst_message_unref (message); ++ break; ++ } while (TRUE); + } + GST_DEBUG ("popped %d messages", count); + } +@@ -538,6 +583,7 @@ GST_START_TEST (test_message_state_changed_children) + GstBus *bus; + GstStateChangeReturn ret; + GstState current, pending; ++ gboolean had_latency = FALSE; + + pipeline = GST_PIPELINE (gst_pipeline_new (NULL)); + fail_unless (pipeline != NULL, "Could not create pipeline"); +@@ -576,7 +622,7 @@ GST_START_TEST (test_message_state_changed_children) + ASSERT_OBJECT_REFCOUNT (sink, "sink", 2); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2); + +- pop_state_changed (bus, 3); ++ pop_state_changed (bus, 3, &had_latency); + fail_if (gst_bus_have_pending (bus), "unexpected pending messages"); + + ASSERT_OBJECT_REFCOUNT (bus, "bus", 2); +@@ -619,9 +665,9 @@ GST_START_TEST (test_message_state_changed_children) + * its state_change message */ + ASSERT_OBJECT_REFCOUNT_BETWEEN (pipeline, "pipeline", 3, 4); + +- pop_state_changed (bus, 3); +- pop_async_done (bus); +- pop_latency (bus); ++ pop_state_changed (bus, 3, &had_latency); ++ pop_async_done (bus, &had_latency); ++ pop_latency (bus, &had_latency); + fail_if ((gst_bus_pop (bus)) != NULL); + + ASSERT_OBJECT_REFCOUNT_BETWEEN (bus, "bus", 2, 3); +@@ -648,7 +694,7 @@ GST_START_TEST (test_message_state_changed_children) + ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 4); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3); + +- pop_state_changed (bus, 3); ++ pop_state_changed (bus, 3, &had_latency); + fail_if ((gst_bus_pop (bus)) != NULL); + + ASSERT_OBJECT_REFCOUNT (bus, "bus", 2); +@@ -669,7 +715,7 @@ GST_START_TEST (test_message_state_changed_children) + ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 3, 4); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3); + +- pop_state_changed (bus, 6); ++ pop_state_changed (bus, 6, &had_latency); + fail_if ((gst_bus_pop (bus)) != NULL); + + ASSERT_OBJECT_REFCOUNT (src, "src", 1); +@@ -696,6 +742,7 @@ GST_START_TEST (test_watch_for_state_change) + GstElement *src, *sink, *bin; + GstBus *bus; + GstStateChangeReturn ret; ++ gboolean had_latency = FALSE; + + bin = gst_element_factory_make ("bin", NULL); + fail_unless (bin != NULL, "Could not create bin"); +@@ -722,9 +769,9 @@ GST_START_TEST (test_watch_for_state_change) + GST_CLOCK_TIME_NONE); + fail_unless (ret == GST_STATE_CHANGE_SUCCESS); + +- pop_state_changed (bus, 6); +- pop_async_done (bus); +- pop_latency (bus); ++ pop_state_changed (bus, 6, &had_latency); ++ pop_async_done (bus, &had_latency); ++ pop_latency (bus, &had_latency); + + fail_unless (gst_bus_have_pending (bus) == FALSE, + "Unexpected messages on bus"); +@@ -732,16 +779,17 @@ GST_START_TEST (test_watch_for_state_change) + ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); + fail_unless (ret == GST_STATE_CHANGE_SUCCESS); + +- pop_state_changed (bus, 3); ++ pop_state_changed (bus, 3, &had_latency); + ++ had_latency = FALSE; + /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ + ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); + gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); + +- pop_state_changed (bus, 3); ++ pop_state_changed (bus, 3, &had_latency); + if (ret == GST_STATE_CHANGE_ASYNC) { +- pop_async_done (bus); +- pop_latency (bus); ++ pop_async_done (bus, &had_latency); ++ pop_latency (bus, &had_latency); + } + + fail_unless (gst_bus_have_pending (bus) == FALSE, +@@ -898,6 +946,7 @@ GST_START_TEST (test_children_state_change_order_flagged_sink) + GstStateChangeReturn ret; + GstState current, pending; + GstBus *bus; ++ gboolean had_latency = FALSE; + + pipeline = gst_pipeline_new (NULL); + fail_unless (pipeline != NULL, "Could not create pipeline"); +@@ -951,10 +1000,11 @@ GST_START_TEST (test_children_state_change_order_flagged_sink) + ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 107); + #else + +- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */ ++ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */ + ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED, + 108); +- pop_async_done (bus); ++ pop_async_done (bus, &had_latency); ++ pop_latency (bus, &had_latency); + #endif + /* PAUSED => PLAYING */ + GST_DEBUG ("popping PAUSED -> PLAYING messages"); +@@ -972,8 +1022,8 @@ GST_START_TEST (test_children_state_change_order_flagged_sink) + fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed"); + + /* TODO: do we need to check downwards state change order as well? */ +- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */ +- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */ ++ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */ ++ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */ + + while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1) + THREAD_SWITCH (); +@@ -1002,6 +1052,7 @@ GST_START_TEST (test_children_state_change_order_semi_sink) + GstStateChangeReturn ret; + GstState current, pending; + GstBus *bus; ++ gboolean had_latency = FALSE; + + /* (2) Now again, but check other code path where we don't have + * a proper sink correctly flagged as such, but a 'semi-sink' */ +@@ -1056,10 +1107,11 @@ GST_START_TEST (test_children_state_change_order_semi_sink) + ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 206); + ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 207); + #else +- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */ ++ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */ + ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED, + 208); +- pop_async_done (bus); ++ pop_async_done (bus, &had_latency); ++ pop_latency (bus, &had_latency); + + /* PAUSED => PLAYING */ + GST_DEBUG ("popping PAUSED -> PLAYING messages"); +@@ -1076,8 +1128,8 @@ GST_START_TEST (test_children_state_change_order_semi_sink) + fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed"); + + /* TODO: do we need to check downwards state change order as well? */ +- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */ +- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */ ++ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */ ++ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */ + + GST_DEBUG ("waiting for pipeline to reach refcount 1"); + while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1) +-- +GitLab + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb index 5a96764780..ce9c1c116f 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.5.bb @@ -21,6 +21,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \ file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \ file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \ + file://0005-bin-Fix-race-conditions-in-tests.patch;striplevel=3 \ " SRC_URI[sha256sum] = "5a19083faaf361d21fc391124f78ba6d609be55845a82fa8f658230e5fa03dff" From patchwork Thu Jan 12 02:33:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 18051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93C8CC67871 for ; Thu, 12 Jan 2023 02:33:44 +0000 (UTC) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mx.groups.io with SMTP id smtpd.web11.45245.1673490823899470590 for ; Wed, 11 Jan 2023 18:33:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=R5lG9zKh; spf=softfail (domain: sakoman.com, ip: 209.85.214.175, mailfrom: steve@sakoman.com) Received: by mail-pl1-f175.google.com with SMTP id c6so18812629pls.4 for ; Wed, 11 Jan 2023 18:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RgziQidodPX62v+gd/dUvRcx/19+TVTD0RN4fSjFlAI=; b=R5lG9zKhZ1s41dQ2MGZIgdH0YbWcN82BsSJTlJApOCcNtCqpaq+avZBb0qg6XhRslE PXIMCUNvAgrBLzSVnSw1AAlU8HKpLq+QaVSd/SzJp7y37+5amvZv9mqyqe8WPFKVJ6PF 9ada95RVrvrfIPM3FkNJ3d0d/H+PPjkETjv2E/wLVnBUIewX3BvGu/JXuxprN6Kgg29j k9NoQr/j0oP/r9ppENjJJoiPb8QAwcDcDhyo9ULDHQQVEtG/1qLexhSfTz5XeiRmiNE4 N09hCSf/JpQtOs6dMy+rpy5h6VwXzIFT4ADmYBdvYG7o6lBLTcZauwHJcrtCj5B4QfyY bSFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RgziQidodPX62v+gd/dUvRcx/19+TVTD0RN4fSjFlAI=; b=4jEY7J3EzITTOO9+v/nUkCEBZ5ILuQFAkZaY4h8LorKQpP3KyFvQN+65kxddHcD3Fw 6weju+9hsG0rNW0JS708hcz/dYJojSAnyv9Zu5DZnAPrWMks6YpYX0mhN8PIy3zvTiNV Da0GEjnVmRDw8pur8U8G+zywbcoDas8Ng9ahhevansKaG2z6irlLuWQspMBpqSlqXiAO A+JzLs6Qea5X/kcvtPxml5h9Di2VHp7tkRyiH/ieX/DPu1vsu4QGZayeWh4oaseDWsr6 F7rGJ8CAUhjsN2qG7FJSYkI4/pN0c0B4jLtjIR/xw/Vrnm06lfrKtrcp469lUwNDTx1g H/fw== X-Gm-Message-State: AFqh2kopDF1gom8HN8L6sEMX7JFpy4p3oqNsBH99Qb7Ex0yaJ9lcIUDn IyHiLHxtuYHEDS+8AyeN6Eg8h8wug4OakLcoX2A= X-Google-Smtp-Source: AMrXdXv1zlVaDmc3yHANWWeOC6OPaGiHmP0AWxM+ZV1nr7BBu29d4fQhjw+n4pmSW1bsGNq07unMsA== X-Received: by 2002:a17:902:9888:b0:192:ce7e:93b7 with SMTP id s8-20020a170902988800b00192ce7e93b7mr36880598plp.49.1673490822759; Wed, 11 Jan 2023 18:33:42 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-5-74.hawaiiantel.net. [72.253.5.74]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b00192d389db91sm11006719plg.75.2023.01.11.18.33.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 18:33:42 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 11/11] devtool: process local files only for the main branch Date: Wed, 11 Jan 2023 16:33:12 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 12 Jan 2023 02:33:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175784 From: Alexander Kanavin devtool modify/upgrade are not currently equipped to handle conditional local files in SRC_URI, and provide only the main no-override set in a workspace under source/component/oe-local-files/ (this is done via meta/classes/devtool-source.bbclass). On the other hand, updating the changes from workspace into a recipe is run iteratively against all overrides; this works for patches (as they all are directed into their own override branches in the workspace git source tree), but breaks down when trying to match local files in a workspace against local files in overridden SRC_URI lists, resulting in bad recipe breakage. (there's an additional twist here: existing code has a guard against this but the guard relies on metadata in workspace .bbappend that is only there in modify operations, but not upgrades. This commit replaces the guard with a general check that will work everywhere). Implementing multiple sets of local files is significant work; let's for now simply not touch local files in recipes except when on the no-override variant. Also, adjust the selftest cases to include conditional local files in sample recipes, so the situation is covered by the tests. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie (cherry picked from commit 3a8654b860fa98f94e80c3c3fff359ffed14bbe7) Signed-off-by: Steve Sakoman --- .../devtool/devtool-test-local/file3 | 1 + .../devtool/devtool-test-local_6.03.bb | 3 ++ .../devtool/devtool-test-localonly.bb | 3 ++ .../devtool/devtool-test-localonly/file3 | 1 + scripts/lib/devtool/standard.py | 38 +++++++++++-------- 5 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local/file3 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file3 b/meta-selftest/recipes-test/devtool/devtool-test-local/file3 new file mode 100644 index 0000000000..0f30e9eec4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file3 @@ -0,0 +1 @@ +The third file. diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb index 463cfe0a7a..d0fd697978 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb @@ -7,9 +7,12 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.x file://file1 \ file://file2" +SRC_URI:append:class-native = " file://file3" + SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" S = "${WORKDIR}/syslinux-${PV}" EXCLUDE_FROM_WORLD = "1" +BBCLASSEXTEND = "native" diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb index 3f7123cda0..e767619879 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb @@ -4,4 +4,7 @@ INHIBIT_DEFAULT_DEPS = "1" SRC_URI = "file://file1 \ file://file2" +SRC_URI:append:class-native = " file://file3" + EXCLUDE_FROM_WORLD = "1" +BBCLASSEXTEND = "native" diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 new file mode 100644 index 0000000000..0f30e9eec4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 @@ -0,0 +1 @@ +The third file. diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 4bbf9dd5a5..e2a8335a62 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1409,6 +1409,18 @@ def _export_local_files(srctree, rd, destdir, srctreebase): updated = OrderedDict() added = OrderedDict() removed = OrderedDict() + + # Get current branch and return early with empty lists + # if on one of the override branches + # (local files are provided only for the main branch and processing + # them against lists from recipe overrides will result in mismatches + # and broken modifications to recipes). + stdout, _ = bb.process.run('git rev-parse --abbrev-ref HEAD', + cwd=srctree) + branchname = stdout.rstrip() + if branchname.startswith(override_branch_prefix): + return (updated, added, removed) + local_files_dir = os.path.join(srctreebase, 'oe-local-files') git_files = _git_ls_tree(srctree) if 'oe-local-files' in git_files: @@ -1638,31 +1650,25 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil tempdir = tempfile.mkdtemp(prefix='devtool') try: local_files_dir = tempfile.mkdtemp(dir=tempdir) - if filter_patches: - upd_f = {} - new_f = {} - del_f = {} - else: - upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase) - - remove_files = [] - if not no_remove: - # Get all patches from source tree and check if any should be removed - all_patches_dir = tempfile.mkdtemp(dir=tempdir) - _, _, del_p = _export_patches(srctree, rd, initial_rev, - all_patches_dir) - # Remove deleted local files and patches - remove_files = list(del_f.values()) + list(del_p.values()) + upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase) # Get updated patches from source tree patches_dir = tempfile.mkdtemp(dir=tempdir) upd_p, new_p, _ = _export_patches(srctree, rd, update_rev, patches_dir, changed_revs) + # Get all patches from source tree and check if any should be removed + all_patches_dir = tempfile.mkdtemp(dir=tempdir) + _, _, del_p = _export_patches(srctree, rd, initial_rev, + all_patches_dir) logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p))) if filter_patches: new_p = OrderedDict() upd_p = OrderedDict((k,v) for k,v in upd_p.items() if k in filter_patches) - remove_files = [f for f in remove_files if f in filter_patches] + del_p = OrderedDict((k,v) for k,v in del_p.items() if k in filter_patches) + remove_files = [] + if not no_remove: + # Remove deleted local files and patches + remove_files = list(del_f.values()) + list(del_p.values()) updatefiles = False updaterecipe = False destpath = None