From patchwork Wed Sep 7 14:20:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12420 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 22F29C38145 for ; Wed, 7 Sep 2022 14:20:45 +0000 (UTC) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web11.8209.1662560440200858360 for ; Wed, 07 Sep 2022 07:20:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=mvYphL9C; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id x1so10355729plv.5 for ; Wed, 07 Sep 2022 07:20:40 -0700 (PDT) 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; bh=Ig4zRYvph5JNIUAbdYGKvURniGC86q6AFYA63PtWMsw=; b=mvYphL9C4L/FixR/7oZM4cphdbzJGvzpcbAZsdxJ++77+53B/GctQ0Hz8HbtW/bhbM +m3tyOElMfYyfm3hmw1gKymRNMJpuqPa0bHPohI+OVdBjhQW5jcv/L84k3UDK8iAz1/N v8gM7cbAtAgzD3BPNeyJk/yLdCsa+Ij2vIjXKmjcUJVuBsABGBubFXCtAtxv1icxZvSo LUNrkmGVohJnAqKCs8B+siGY4c45GuEr07A8+N/IXDy07Tl7atIWNZyTPgLsBij1WF1H sTyB7RxjNHmus91a++YBEQ4ricxrlkDge4/at8Jephs8ThjJpD5L6+P9xEjS9YkShgIu 2qdg== 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; bh=Ig4zRYvph5JNIUAbdYGKvURniGC86q6AFYA63PtWMsw=; b=KXSRX+5HUrVUg4XKNqW+z4/9TClUkPJXxy3DgUzio1a/zXKwYE+LGzK8eKTvQJ3tyG 3K/R4+rMeIk3KRo+lSeNywYzmcGxRQzk7V8uNwxNQKVxwJnafbqNMBCFXjrz6RvxrAXH 8XYGHuL8Pyl1RCPu3/v4DVZXvDii/c1RRJ527vB57ioIVRBjXbGrug4gLmr5Roc4EQZr K63u2hMJ5jsERwkOdeSSr0fVqb4EW7rQYMn1j5RROhKwqvJzYSeDmkCCtE9dNd56AP1A 7BQEGmlOTuWlfvyO1liqU4YjvZ1afciK4q9qnJkGuFNvGc8VoEKRgHAo6ZhR/IYw0Y/a Go3g== X-Gm-Message-State: ACgBeo0txsYOlSWfPNFCHdXEuHQS6hWUCiT4BFbdeDqJpBLmMK5i9W82 x6E04NBW3XN7gwWdJBrECE/RWnTCGoA80xun X-Google-Smtp-Source: AA6agR64QnbLeSSb/WvsUWmhupoJ1cU80K7v46wTeoDp0LBCfg/68hEyxBW7yRE0xPFDdopKD/uYGA== X-Received: by 2002:a17:902:a502:b0:172:5f2a:9e35 with SMTP id s2-20020a170902a50200b001725f2a9e35mr3853331plq.79.1662560439148; Wed, 07 Sep 2022 07:20:39 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:38 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 01/24] sqlite: add CVE-2022-35737 patch to SRC_URI Date: Wed, 7 Sep 2022 04:20: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 ; Wed, 07 Sep 2022 14:20:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170396 From: Chee Yang Lee SRC_URI include patch introduced in oe-core commit fdc82b2314b580c0135c16b7278ebf8786311dec Signed-off-by: Chee Yang Lee Signed-off-by: Steve Sakoman --- meta/recipes-support/sqlite/sqlite3_3.38.5.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb index d56a3a0209..628f630657 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb @@ -3,7 +3,9 @@ require sqlite3.inc LICENSE = "PD" LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" -SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz" +SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz \ + file://0001-sqlite-Increased-the-size-of-loop-variables-in-the-printf-implementation.patch \ +" SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c" # -19242 is only an issue in specific development branch commits From patchwork Wed Sep 7 14:20:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12419 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 277DFC6FA86 for ; Wed, 7 Sep 2022 14:20:45 +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.web10.8250.1662560442478025749 for ; Wed, 07 Sep 2022 07:20:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=UQUF8ccm; spf=softfail (domain: sakoman.com, ip: 209.85.214.175, mailfrom: steve@sakoman.com) Received: by mail-pl1-f175.google.com with SMTP id t3so9636717ply.2 for ; Wed, 07 Sep 2022 07:20:42 -0700 (PDT) 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; bh=NA9h+i08h4oxJpfZP6mPV38dI1GRyGWASVRl0GbnCi0=; b=UQUF8ccmqc/qsFFA0E/Rn5MlQtyYKNGYMeUilkm32lyReKXtfGOTvriD2rgi4li3Ca o3UIBkX1FsUiR/S5dY4YjmXx5FFvG0QWoXljgqqhzgYI/N9GCRnsZ+NJiihqnDTdrmGI Ddzmr+H6jQN4v4uWTdPcC93pZ6Ai7F2a2OVduFj/Qg5sNrOD+4LCpjykHSWX0pbtou+B gaSquM/tX0UoxWnNBedAYliFtzPikyDqCxqwSSa6/Qu/KrRRzbWesaxsm6aIz2rdwzFX xs49MswkJaMgB2+FCnemVeoQqLqYCeBnbGsnle7XUHHBW1ZHlCsbCn7DR5GYe2SwGf9D INYw== 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; bh=NA9h+i08h4oxJpfZP6mPV38dI1GRyGWASVRl0GbnCi0=; b=QwnaAT4F+gv8BtjcYU1DchIufgcroW1UdMNgnkOwtUoXcZCOyi8nh2YpqMEHlpePZB Xyssl5oJBn++BO6AWL5fHrNLQRHaar3UUP8EPOa6QgUQwBXQpfdSaPmfrwfXUvhxSX72 6h0khrF+ZaLf6O1MnzpyGpl/fKrqPziPmKDO/ZvyG6dPs/z0Eh9LCOGYbQAWofTtowws q8PGs96OeNbzREqis6myJgFTFFQrwtN7nwOylFoz1y++CLdb6aP/V3YYGW+6a+KqYP+O 0VICQp3kElwqcDH3F8GrzOSOK04/Yryosxg0qjzz94pQ3UIAKvyZkfjnuzPfTug8boMJ fobQ== X-Gm-Message-State: ACgBeo31P2aCA6SycUcus22ksE3a5yWQdVouUCJJIk94Q/USASoaCMyh mMAhp6BvgA6lDoQfZbKdqyRKkWy8gkJHMAyd X-Google-Smtp-Source: AA6agR6QyIyfXe2h+KRKwx3IA9pTX5Qab+wuSRV5tkLJn1hoc+EKkFQ9oY9CwAi5ukAZyqKUiFoWUg== X-Received: by 2002:a17:903:514:b0:172:dab0:b228 with SMTP id jn20-20020a170903051400b00172dab0b228mr4124997plb.170.1662560441371; Wed, 07 Sep 2022 07:20:41 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:40 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 02/24] curl: Backport patch for CVE-2022-35252 Date: Wed, 7 Sep 2022 04:20:03 -1000 Message-Id: <40bbdb43b247ffc5dd1990f51fb824a089c0987f.1662559557.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 ; Wed, 07 Sep 2022 14:20:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170397 From: Robert Joslyn https://curl.se/docs/CVE-2022-35252.html Signed-off-by: Robert Joslyn Signed-off-by: Steve Sakoman --- .../curl/curl/CVE-2022-35252.patch | 72 +++++++++++++++++++ meta/recipes-support/curl/curl_7.82.0.bb | 1 + 2 files changed, 73 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2022-35252.patch diff --git a/meta/recipes-support/curl/curl/CVE-2022-35252.patch b/meta/recipes-support/curl/curl/CVE-2022-35252.patch new file mode 100644 index 0000000000..7b6f81bd02 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-35252.patch @@ -0,0 +1,72 @@ +From 62c09239ac4e08239c8e363b06901fc80637d8c7 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 29 Aug 2022 00:09:17 +0200 +Subject: [PATCH] cookie: reject cookies with "control bytes" + +Rejects 0x01 - 0x1f (except 0x09) plus 0x7f + +Reported-by: Axel Chong + +Bug: https://curl.se/docs/CVE-2022-35252.html + +CVE-2022-35252 + +Closes #9381 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/8dfc93e573ca740544a2d79ebb] + +Signed-off-by: Robert Joslyn +--- + lib/cookie.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/lib/cookie.c b/lib/cookie.c +index cb0c03b..e0470a1 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -438,6 +438,30 @@ static bool bad_domain(const char *domain) + return TRUE; + } + ++/* ++ RFC 6265 section 4.1.1 says a server should accept this range: ++ ++ cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E ++ ++ But Firefox and Chrome as of June 2022 accept space, comma and double-quotes ++ fine. The prime reason for filtering out control bytes is that some HTTP ++ servers return 400 for requests that contain such. ++*/ ++static int invalid_octets(const char *p) ++{ ++ /* Reject all bytes \x01 - \x1f (*except* \x09, TAB) + \x7f */ ++ static const char badoctets[] = { ++ "\x01\x02\x03\x04\x05\x06\x07\x08\x0a" ++ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14" ++ "\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f" ++ }; ++ size_t vlen, len; ++ /* scan for all the octets that are *not* in cookie-octet */ ++ len = strcspn(p, badoctets); ++ vlen = strlen(p); ++ return (len != vlen); ++} ++ + /* + * Curl_cookie_add + * +@@ -590,6 +614,11 @@ Curl_cookie_add(struct Curl_easy *data, + badcookie = TRUE; + break; + } ++ if(invalid_octets(whatptr) || invalid_octets(name)) { ++ infof(data, "invalid octets in name/value, cookie dropped"); ++ badcookie = TRUE; ++ break; ++ } + } + else if(!len) { + /* +-- +2.35.1 + diff --git a/meta/recipes-support/curl/curl_7.82.0.bb b/meta/recipes-support/curl/curl_7.82.0.bb index 67de0220c6..5368c91f5c 100644 --- a/meta/recipes-support/curl/curl_7.82.0.bb +++ b/meta/recipes-support/curl/curl_7.82.0.bb @@ -28,6 +28,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2022-32206.patch \ file://CVE-2022-32207.patch \ file://CVE-2022-32208.patch \ + file://CVE-2022-35252.patch \ " SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" From patchwork Wed Sep 7 14:20:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12424 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 0FAD3C6FA86 for ; Wed, 7 Sep 2022 14:20:55 +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.web12.8356.1662560445113510708 for ; Wed, 07 Sep 2022 07:20:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=wTyqQI1p; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id fv3so8596380pjb.0 for ; Wed, 07 Sep 2022 07:20:45 -0700 (PDT) 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; bh=OCzS/U8kRjB/NdaBN/k125K9o6q45GZohHlsid32Y30=; b=wTyqQI1p7ASdboIkKmNHIZivwxSQbUSSQnCjOBpDBpapb6itAy68lJWfIJwfm6dRFx s5br9xjDzo+T4wwuW7JXL+3RB6z78ZhHQ+kkbKctahEHVFAMv2ccC+LzUtgz+PMqtg7U a+aHOwBFbNdFSBZpu7XtNCBo2HrH8BwXpv8bUyQbrg61m5WMBJu4fs4Ae2JpvumT+MtI NCMM2yrKg4yrHADm0l/TvfCZx4GpXrSLvxWQfImI87kTlLb2/7eP3t6JONxBPl++WYu1 Z3isgcNZwnc9tlvQn8pxOE9CHzD9BCzR2tCADSm/HT2HFP7SPQ1FK3m3mhBRwYP7GmFo pyew== 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; bh=OCzS/U8kRjB/NdaBN/k125K9o6q45GZohHlsid32Y30=; b=b4ZhcuYD/2ev5zQqZD7KBEBBPOT5stbzCB8At+2Qp0TUe8f0U/AB7GSiL4WZkJuZLQ NwfakYtD4DMr8p4NJC59qj9jPatPPLy4Q1f1sKHEW0JIIX8flYaaLnGJD7vb589SqVO4 Lt7ni93zyakLI2pSuwBbmwfQqL3WOXM+PhBzogNH6VSc+zFZerHA5tecSEN+Xhn9n5d1 XW5NYzUUd7o8IZ+PYmJiIYOoFz1oVLK9FckLDDeNVWuT7bROEe8nvOUsRgAG9EPosEaC X3xg/9wR4tXGViMSBotwwKfxu8ltIMXOzd7EcOLWg2OojPKwP++1cY1zdR6oTSPZZTJ4 BJBA== X-Gm-Message-State: ACgBeo0bt5oqK5VF8PYKez5C0KtXRch7tps37CiDby3hV7jcG9IyZPGQ nIFjAxZFQOjeD/BmQDaOpSs4HJTJCmLvpLQU X-Google-Smtp-Source: AA6agR7M2s5RJtVXkqnJrrgPv7uu0Z0Aa+pA8Dalh87ubpBl3EI4YuLRfUlHj80YZjpYZMxrGhP8/w== X-Received: by 2002:a17:903:244f:b0:176:85e3:4236 with SMTP id l15-20020a170903244f00b0017685e34236mr4293832pls.103.1662560443402; Wed, 07 Sep 2022 07:20:43 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:42 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 03/24] binutils : CVE-2022-38533 Date: Wed, 7 Sep 2022 04:20:04 -1000 Message-Id: <9644d9a38dac8d2c0263f4e8a67624da7a8bc55b.1662559557.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 ; Wed, 07 Sep 2022 14:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170398 From: pgowda Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ef186fe54aa6d281a3ff8a9528417e5cc614c797] Signed-off-by: pgowda Signed-off-by: Steve Sakoman --- .../binutils/binutils-2.38.inc | 1 + .../binutils/0015-CVE-2022-38533.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0015-CVE-2022-38533.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc index eed252976a..8aa8295881 100644 --- a/meta/recipes-devtools/binutils/binutils-2.38.inc +++ b/meta/recipes-devtools/binutils/binutils-2.38.inc @@ -33,5 +33,6 @@ SRC_URI = "\ file://0012-Check-for-clang-before-checking-gcc-version.patch \ file://0013-Avoid-as-info-race-condition.patch \ file://0014-CVE-2019-1010204.patch \ + file://0015-CVE-2022-38533.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-devtools/binutils/binutils/0015-CVE-2022-38533.patch b/meta/recipes-devtools/binutils/binutils/0015-CVE-2022-38533.patch new file mode 100644 index 0000000000..5d9ac2cb1f --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0015-CVE-2022-38533.patch @@ -0,0 +1,36 @@ +From ef186fe54aa6d281a3ff8a9528417e5cc614c797 Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Sat, 13 Aug 2022 15:32:47 +0930 +Subject: [PATCH] PR29482 - strip: heap-buffer-overflow + + PR 29482 + * coffcode.h (coff_set_section_contents): Sanity check _LIB. + +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ef186fe54aa6d281a3ff8a9528417e5cc614c797] + +Signed-off-by: Pgowda + +--- + bfd/coffcode.h | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/bfd/coffcode.h b/bfd/coffcode.h +index 67aaf158ca1..52027981c3f 100644 +--- a/bfd/coffcode.h ++++ b/bfd/coffcode.h +@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd, + + rec = (bfd_byte *) location; + recend = rec + count; +- while (rec < recend) ++ while (recend - rec >= 4) + { ++ size_t len = bfd_get_32 (abfd, rec); ++ if (len == 0 || len > (size_t) (recend - rec) / 4) ++ break; ++ rec += len * 4; + ++section->lma; +- rec += bfd_get_32 (abfd, rec) * 4; + } + + BFD_ASSERT (rec == recend); From patchwork Wed Sep 7 14:20:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12423 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 1C86CC6FA8B for ; Wed, 7 Sep 2022 14:20:55 +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.web12.8357.1662560446655848573 for ; Wed, 07 Sep 2022 07:20:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=zvavRcfw; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id t11-20020a17090a510b00b001fac77e9d1fso18445924pjh.5 for ; Wed, 07 Sep 2022 07:20:46 -0700 (PDT) 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; bh=6e6zkXavoz2ATx82Eph8mMAqIIiXUWp9wLLPZ4PWzsk=; b=zvavRcfwLwbWDE/Fil3PG9lTLA66pTMoUgM77Z3Kfr1cy5KANCjdA4SraTwWw7EPNB F82YQLDge/t+QvBsCAQiePv1Flg2n06DxxspOabRGHKbFlf//u4Z0+FpVADVh79wQxvx U+Fb2cczf3LMwvwjcA7FMTE1c8ZuFXQV7PkR0YRXCKSH3GsJ4I9l1g55MJmTzqhOZRUw imLzlhqSIVjzUozW1pHa8XzxycD+nnrGSEIGxYdXX4Ym7MyxOG6lEsJLpAVlm0ApxeMM N5/WZ82jf57r/N44FpVsAxYDXvXldJaHlL7ndj2l9CGpyuwG12rqud1AQyZQaxz2qzIN z7iQ== 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; bh=6e6zkXavoz2ATx82Eph8mMAqIIiXUWp9wLLPZ4PWzsk=; b=26S3Zz3SjpVXu1q/pZQYlugGWF9s2Sds9pj0w2pbEskwHI5aPpuw9qePHzzDdtkxdG LwuERLrhOHl3GDKqMPE+njZSrOqNZo7KexnM/sNfN6Ccpy5mpTPg4Jbm6S1OZTyMvzn8 xwEdxRWgigK4XoWqOPo1dmUXLwbDKBctxQIibnKruf+mncGWzVG7wy4gkXWEk4y6K458 JkAAijSretn2B+iMeDgRzr1mWkcCykbCjapzSMmdc6T8t26rLQGHAu6qIB4fe9eWUZOC JGUvrlaF4aGY5brvgCkXLATxgC0+bYhB2QLvLG2nlsVREIL+BezoXDuguneCnNBYpgfB XQUw== X-Gm-Message-State: ACgBeo1Xn6AMXg988SqPyjoBgqhAHaNisGJFwO5+oZS9VuC5E9tm3nno w3oTGSBOaXO5nLUo2iez9ZeQIqxLcJ6J7piE X-Google-Smtp-Source: AA6agR7A2iWaHDAGcyaLlfo+71NiJqaKqIhDx7tl5f6gM3LjB8HRohnsAT+hAhstnZBqA46qJhZ1eA== X-Received: by 2002:a17:902:ea11:b0:176:b283:9596 with SMTP id s17-20020a170902ea1100b00176b2839596mr4129326plg.69.1662560445751; Wed, 07 Sep 2022 07:20:45 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 04/24] classes: cve-check: Get shared database lock Date: Wed, 7 Sep 2022 04:20:05 -1000 Message-Id: <655bc5acdebdee9b4dfd3c964104a84b6845b2d4.1662559557.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 ; Wed, 07 Sep 2022 14:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170399 From: Joshua Watt The CVE check database needs to have a shared lock acquired on it before it is accessed. This to prevent cve-update-db-native from deleting the database file out from underneath it. [YOCTO #14899] Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie (cherry picked from commit 20a9911b73df62a0d0d1884e57085f13ac5016dd) Signed-off-by: Steve Sakoman --- meta/classes/cve-check.bbclass | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index da7f93371c..b751c986ef 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -139,17 +139,18 @@ python do_cve_check () { """ from oe.cve_check import get_patched_cves - if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")): - try: - patched_cves = get_patched_cves(d) - except FileNotFoundError: - bb.fatal("Failure in searching patches") - ignored, patched, unpatched, status = check_cves(d, patched_cves) - if patched or unpatched or (d.getVar("CVE_CHECK_COVERAGE") == "1" and status): - cve_data = get_cve_info(d, patched + unpatched + ignored) - cve_write_data(d, patched, unpatched, ignored, cve_data, status) - else: - bb.note("No CVE database found, skipping CVE check") + with bb.utils.fileslocked([d.getVar("CVE_CHECK_DB_FILE_LOCK")], shared=True): + if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")): + try: + patched_cves = get_patched_cves(d) + except FileNotFoundError: + bb.fatal("Failure in searching patches") + ignored, patched, unpatched, status = check_cves(d, patched_cves) + if patched or unpatched or (d.getVar("CVE_CHECK_COVERAGE") == "1" and status): + cve_data = get_cve_info(d, patched + unpatched + ignored) + cve_write_data(d, patched, unpatched, ignored, cve_data, status) + else: + bb.note("No CVE database found, skipping CVE check") } From patchwork Wed Sep 7 14:20:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12425 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 1BE4BC54EE9 for ; Wed, 7 Sep 2022 14:20:55 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web08.8297.1662560448885136595 for ; Wed, 07 Sep 2022 07:20:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ZBXlsThA; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id y136so9843386pfb.3 for ; Wed, 07 Sep 2022 07:20:48 -0700 (PDT) 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; bh=ZbQ6RALgq7wRyxNzu2d371dcejw15G6fqBKHXtufUXQ=; b=ZBXlsThAYmWiIb1XJFo7TvkdbZtKdjMoQ2afHIDTwcNoxLqWGjUbDSU2GQ3X8IF/qb kreX4vPPe0AWFLVwWkPdgbVzkUdpyegyno+iJ+vcXS24rvzOHhlQw4lf4XwdybR0+Qcr YvY6Mt8MPyycFNxhZ3i8pN7dp5GZdzb+1DeWDy5a13bHflsTjqTg6l//Wr/DSWNDyLBN NQOcB0gR4Xog+AmqrPsPEtAKvyKL+058t/DbnulHL+h2dQVFKLLCK02lyBAj51GSXHTe e57LfsZDzjnfa6Nj5KfbY7DltSZSbypK5fwU4ZbaBfjAth2ywKqFM/j9gK0YjX4QmaR4 O9Nw== 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; bh=ZbQ6RALgq7wRyxNzu2d371dcejw15G6fqBKHXtufUXQ=; b=XVGr/sPx4HeSXKSAmQfb536HkSU6QzHJ77WDzU8Ot+X6W8tr5EaywVXuurkNfZpJ7v wgHK4dRxG6P58aSj8El41JHv9OuYYQDDEAjKDvBBH2Ryh5apMm1zxmvY6164FboY0T4x tkH5fUJwHHvEUmSKzN6f8OpFVmcfj77CEifEY+0ur1Jz2orqP0QVQd835RMCgM+wkpBn GQw3lpUg1IjZ7mwgHVktBMFCERZor0Vd32+mNGnOcpLUSZ+SElpdVjqIAwTNpIe4EpZI lthcQcFzp//mDpHE27DY4tHHzT6mn4m+39Letqv8xH+UMQMw8ngbvxqp2ma1xhf/IiYh loQQ== X-Gm-Message-State: ACgBeo0bhChzpmJ/pSkaDCYSQWp6uotxclkZIc7pKvzjTvlSHDU/jtLf xYedp1xNIHGcVwXL1UGGnpcmi80SiUn74FHf X-Google-Smtp-Source: AA6agR5tAKx4+plhoH4HyadBiqwbYXLmjBRPvMsLjpZpFYQMjbWh9rXgEgHCsiLWCBZUtT9w4D12zA== X-Received: by 2002:a63:cc51:0:b0:41f:12f5:675b with SMTP id q17-20020a63cc51000000b0041f12f5675bmr3534613pgi.69.1662560447809; Wed, 07 Sep 2022 07:20:47 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:47 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 05/24] cve-check: close cursors as soon as possible Date: Wed, 7 Sep 2022 04:20:06 -1000 Message-Id: <90917cadeb7201e56c74294e9156fe899d5455d7.1662559557.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 ; Wed, 07 Sep 2022 14:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170400 From: Ross Burton We can have multiple processes reading the database at the same time, and cursors only release their locks when they're garbage collected. This might be the cause of random sqlite errors on the autobuilder, so explicitly close the cursors when we're done with them. Signed-off-by: Ross Burton Signed-off-by: Luca Ceresoli (cherry picked from commit 5d2e90e4a58217a943ec21140bc2ecdd4357a98a) Signed-off-by: Steve Sakoman --- meta/classes/cve-check.bbclass | 13 +++-- .../recipes-core/meta/cve-update-db-native.bb | 51 ++++++++++--------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index b751c986ef..16466586a7 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -291,7 +291,8 @@ def check_cves(d, patched_cves): vendor = "%" # Find all relevant CVE IDs. - for cverow in conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)): + cve_cursor = conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)) + for cverow in cve_cursor: cve = cverow[0] if cve in cve_ignore: @@ -310,7 +311,8 @@ def check_cves(d, patched_cves): vulnerable = False ignored = False - for row in conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)): + product_cursor = conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)) + for row in product_cursor: (_, _, _, version_start, operator_start, version_end, operator_end) = row #bb.debug(2, "Evaluating row " + str(row)) if cve in cve_ignore: @@ -354,10 +356,12 @@ def check_cves(d, patched_cves): bb.note("%s-%s is vulnerable to %s" % (pn, real_pv, cve)) cves_unpatched.append(cve) break + product_cursor.close() if not vulnerable: bb.note("%s-%s is not vulnerable to %s" % (pn, real_pv, cve)) patched_cves.add(cve) + cve_cursor.close() if not cves_in_product: bb.note("No CVE records found for product %s, pn %s" % (product, pn)) @@ -382,14 +386,15 @@ def get_cve_info(d, cves): conn = sqlite3.connect(db_file, uri=True) for cve in cves: - for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)): + cursor = conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)) + for row in cursor: cve_data[row[0]] = {} cve_data[row[0]]["summary"] = row[1] cve_data[row[0]]["scorev2"] = row[2] cve_data[row[0]]["scorev3"] = row[3] cve_data[row[0]]["modified"] = row[4] cve_data[row[0]]["vector"] = row[5] - + cursor.close() conn.close() return cve_data diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index 18af89b53e..944243fce9 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -66,9 +66,7 @@ python do_fetch() { # Connect to database conn = sqlite3.connect(db_file) - c = conn.cursor() - - initialize_db(c) + initialize_db(conn) with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f: total_years = date.today().year + 1 - YEAR_START @@ -98,19 +96,21 @@ python do_fetch() { return # Compare with current db last modified date - c.execute("select DATE from META where YEAR = ?", (year,)) - meta = c.fetchone() + cursor = conn.execute("select DATE from META where YEAR = ?", (year,)) + meta = cursor.fetchone() + cursor.close() + if not meta or meta[0] != last_modified: bb.debug(2, "Updating entries") # Clear products table entries corresponding to current year - c.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,)) + conn.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,)).close() # Update db with current year json file try: response = urllib.request.urlopen(json_url) if response: - update_db(c, gzip.decompress(response.read()).decode('utf-8')) - c.execute("insert or replace into META values (?, ?)", [year, last_modified]) + update_db(conn, gzip.decompress(response.read()).decode('utf-8')) + conn.execute("insert or replace into META values (?, ?)", [year, last_modified]).close() except urllib.error.URLError as e: cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n') bb.warn("Cannot parse CVE data (%s), update failed" % e.reason) @@ -129,21 +129,26 @@ do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}" do_fetch[file-checksums] = "" do_fetch[vardeps] = "" -def initialize_db(c): - c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") +def initialize_db(conn): + with conn: + c = conn.cursor() + + c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") + + c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ + SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)") - c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ - SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)") + c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ + VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \ + VERSION_END TEXT, OPERATOR_END TEXT)") + c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);") - c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ - VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \ - VERSION_END TEXT, OPERATOR_END TEXT)") - c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);") + c.close() -def parse_node_and_insert(c, node, cveId): +def parse_node_and_insert(conn, node, cveId): # Parse children node if needed for child in node.get('children', ()): - parse_node_and_insert(c, child, cveId) + parse_node_and_insert(conn, child, cveId) def cpe_generator(): for cpe in node.get('cpe_match', ()): @@ -200,9 +205,9 @@ def parse_node_and_insert(c, node, cveId): # Save processing by representing as -. yield [cveId, vendor, product, '-', '', '', ''] - c.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator()) + conn.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator()).close() -def update_db(c, jsondata): +def update_db(conn, jsondata): import json root = json.loads(jsondata) @@ -226,12 +231,12 @@ def update_db(c, jsondata): accessVector = accessVector or "UNKNOWN" cvssv3 = 0.0 - c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)", - [cveId, cveDesc, cvssv2, cvssv3, date, accessVector]) + conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)", + [cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close() configurations = elt['configurations']['nodes'] for config in configurations: - parse_node_and_insert(c, config, cveId) + parse_node_and_insert(conn, config, cveId) do_fetch[nostamp] = "1" From patchwork Wed Sep 7 14:20:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12422 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 117F1C6FA89 for ; Wed, 7 Sep 2022 14:20:55 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web09.8323.1662560451147765112 for ; Wed, 07 Sep 2022 07:20:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=vebw1Vcx; spf=softfail (domain: sakoman.com, ip: 209.85.214.169, mailfrom: steve@sakoman.com) Received: by mail-pl1-f169.google.com with SMTP id p18so14701883plr.8 for ; Wed, 07 Sep 2022 07:20:51 -0700 (PDT) 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; bh=2WUmndzMAz70tLK20NP6krGxqJYhxlzWekVncW9vDng=; b=vebw1Vcxnj0x/a89JtSDWNuLnfNMASEIsUvqZny2fVM8fDjcY8RQzruOkNEh7AnLC/ JfRZB448hk6JMVbExnYlY2XGFKdnYChAgs5guU9gs2Bv6yzdDx0fExSp1mMwazu8hzew zZIEBD3/6iAnU9UXNp4vNLdApddRIxTsbWD94tCejrBun6dXG1udU6yAesH3ZjUWoBmh is+2C1UvUTiA2+cadMSbmVbdRwY4sVUwo36dRAveBXW8YcRTMIGEyos1SOK4nEC3DvUC UwAfGBCJ2hkXzojPgI9SaO7vC2zbFvkzJBvrlNEbCw0PTKAvrprbNMNf+LNIFIzC8wBT SZ9Q== 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; bh=2WUmndzMAz70tLK20NP6krGxqJYhxlzWekVncW9vDng=; b=LTQPYWQcIHmZyUg7Tmcg4b8GD6SdaJ1oK+YWPBMOx7DSr4FhJpMno8GcL3adedzEKl K7Jze/YlpapniYhASQsNINnO0NLNWd7gIpsgpGEpHZEHKWrIigP+yaVinvdGTWtVvMmE T6Xt17TBwOv0EvFFMMX5h3Yu7jGUlVdjMqPnu8lYbQJtN9X8U7jcGnc4VcCj4DNFzpzZ fZfmBbUrV0h8DAjSawRQH61wsISQoCYyaGk0TCbxDMasGAOzZ6gJf5KrFWlGnsHHATah tzjIexBUP02P3d9TdPZMlLK0MOOFt2VYpsOiNTxzdwM0mGz8xjlnrJ5Yl9QuXhqyzMU3 REWQ== X-Gm-Message-State: ACgBeo1H6Tw73KZbraWq13XUvk/6s3dt+kzsQViQ9W70mvKS6Azy7mMp 8kPFVwvC8m1eXk+gDYswYTtodEgDJfVz4NSC X-Google-Smtp-Source: AA6agR6aXcG9CzqcR0SKLYjpXjrycdsQAguerXiP0k+pWTivW357swpuqlEYIv2e5+G+mOBFABUTwA== X-Received: by 2002:a17:90b:4b49:b0:200:a103:12a5 with SMTP id mi9-20020a17090b4b4900b00200a10312a5mr9135185pjb.131.1662560450130; Wed, 07 Sep 2022 07:20:50 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:49 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 06/24] vim: Upgrade 9.0.0242 -> 9.0.0341 Date: Wed, 7 Sep 2022 04:20:07 -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 ; Wed, 07 Sep 2022 14:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170401 From: Richard Purdie Addresses CVE-2022-2980, CVE-2022-2946 and CVE-2022-2982. Signed-off-by: Richard Purdie Signed-off-by: Alexandre Belloni (cherry picked from commit 01c08d47ecfcc7aefacc8280e0055c75b13795b2) Signed-off-by: Steve Sakoman --- meta/recipes-support/vim/vim.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index 5b95ab2625..33a8299243 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc @@ -20,8 +20,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://no-path-adjust.patch \ " -PV .= ".0242" -SRCREV = "171c683237149262665135c7d5841a89bb156f53" +PV .= ".0341" +SRCREV = "92a3d20682d46359bb50a452b4f831659e799155" # Remove when 8.3 is out UPSTREAM_VERSION_UNKNOWN = "1" From patchwork Wed Sep 7 14:20:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12421 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 0E3D3C38145 for ; Wed, 7 Sep 2022 14:20:55 +0000 (UTC) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web11.8209.1662560440200858360 for ; Wed, 07 Sep 2022 07:20:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=dmUjlRyL; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id x1so10356466plv.5 for ; Wed, 07 Sep 2022 07:20:53 -0700 (PDT) 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; bh=9RV1otr5sAmHuqhdJk7DSik1VqqlWDWd6Vyut8qkvVM=; b=dmUjlRyLVvQHdF9bck3uhIj4H5rwPMooWvqam7adArEfwIgCEAlVtjmD1rJeX65BYh e+dufNc9klbzBPhJrk2C8ioapxK+vA41WWXeKnx4lLysxGZ8JpUN4MOe7cy1LjLM+h/2 9dq2riBDvGDsRQWcwzT7RoDLCyEz05MTBFa7szfskmgTUmUsdRlypeIjohaUrrFJmQQh Cl1uPelZjD/PewHzUhta+VT8pZ/6gk5REJIeRT9kGk3LqslvPmAwxYnCaLoTxQaY1W8M rXp6gbrekPJ1v9Mout6dicA0U/Pr8p6o7RdDfSEFj9vVB76bvvbMhL76g9Rs57UdBl97 AQnA== 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; bh=9RV1otr5sAmHuqhdJk7DSik1VqqlWDWd6Vyut8qkvVM=; b=HZthn+dYionSzj/I3zRaJs5q9Bdmwq5MzgdNTF2i4KsnSztIiBAv+zzJAkMbO+XBuE wy+ZGegavVNKjit6a9j098hjBr7l/2veG45qgf9xo310NwwTTxLrScyEhMIkF4mmwJiz Xt210sZ3H1l0lnEVL0DERziL5uY8gDg8LyKs3FFESEp9eR0jEb9kMeq6SABX2y4FzGvl Z8x9TZfR6uwAFscnFlcco2GXVyIjm6A6twArnK4bF8SQNb4i6zyHs2o+ZAGkp9utDHPK mgD79Pujm9dtpLBjYbeCgmeoT5T8pBbUZk8ZnAIKP/+5k0W5CfNVG52PZn8zVRyP0r8P vO1w== X-Gm-Message-State: ACgBeo0l4xibfhUuMw1nQe+/5AlwmhzquthNQLTmwI3U2F/jmFkwlJvI FiqAN4xmxyUdu0dEUfAoAbFMC7U8zvvD/wb4 X-Google-Smtp-Source: AA6agR7Tr2VbmU7Q1h1ddrOAx+4DBROq1ekgQRvlUgxzomiildvLYjxxAqGA8TiywsaKJ412X76iow== X-Received: by 2002:a17:90a:39ca:b0:202:54df:b1a4 with SMTP id k10-20020a17090a39ca00b0020254dfb1a4mr1510495pjf.210.1662560452636; Wed, 07 Sep 2022 07:20:52 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:51 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 07/24] libtasn1: upgrade 4.18.0 -> 4.19.0 Date: Wed, 7 Sep 2022 04:20:08 -1000 Message-Id: <005bfa0639724248f2a257cae0108ecd16e7314b.1662559557.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 ; Wed, 07 Sep 2022 14:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170402 From: wangmy Changelog: =========== - Clarify libtasn1.map license. Closes: #38. - Fix ETYPE_OK out of bounds read. Closes: #32. - Update gnulib files and various maintenance fixes. Signed-off-by: Wang Mingyu Signed-off-by: Alexandre Belloni (cherry picked from commit b8f2c6ec61ffcc607a35bd5c11f5020c9b676226) Signed-off-by: Steve Sakoman --- .../gnutls/{libtasn1_4.18.0.bb => libtasn1_4.19.0.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-support/gnutls/{libtasn1_4.18.0.bb => libtasn1_4.19.0.bb} (90%) diff --git a/meta/recipes-support/gnutls/libtasn1_4.18.0.bb b/meta/recipes-support/gnutls/libtasn1_4.19.0.bb similarity index 90% rename from meta/recipes-support/gnutls/libtasn1_4.18.0.bb rename to meta/recipes-support/gnutls/libtasn1_4.19.0.bb index db49adc1c2..5fb8b54c06 100644 --- a/meta/recipes-support/gnutls/libtasn1_4.18.0.bb +++ b/meta/recipes-support/gnutls/libtasn1_4.19.0.bb @@ -16,7 +16,7 @@ SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \ DEPENDS = "bison-native" -SRC_URI[sha256sum] = "4365c154953563d64c67a024b607d1ee75c6db76e0d0f65709ea80a334cd1898" +SRC_URI[sha256sum] = "1613f0ac1cf484d6ec0ce3b8c06d56263cc7242f1c23b30d82d23de345a63f7a" inherit autotools texinfo lib_package gtk-doc From patchwork Wed Sep 7 14:20:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12429 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 0D7E4C54EE9 for ; Wed, 7 Sep 2022 14:21:05 +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.8212.1662560455837837317 for ; Wed, 07 Sep 2022 07:20:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=oUW3urW/; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id 9so11491379plj.11 for ; Wed, 07 Sep 2022 07:20:55 -0700 (PDT) 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; bh=PqYsW/GXJ/AEKSFn8jeg2PcWmgNQdksiZ8YxGIv1ABo=; b=oUW3urW/ZFvuNLHPvIV73I/oWXsHwnyfcI0EXKQMXpVDKHCm1gA2lLy2WlOPkkcSeI ycssWyzDexIctGh2MscaV1RG+mfvEmDpGNbgPZls53lbt3oWfD1NI4f3oixezEn+47he jBP3LZ5X81t0fMwRiJHXvn/i12t6NillJvCRdsJ8fEA7kyn2LSGnp45HjkS3t2kSOXrP CTYo1cYt4nFcLEcHUM26nyM+8gi9cSU/WyE2sVCWmV3jPmWtLRQbeVXqJsY6QmrhDx5W EfnKkGpwbhhz9VSiN736KTPFX0P3Ql1aaFXO910rFDgju3rRq7ujGQXK9J9oS9Diz/DH tGsw== 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; bh=PqYsW/GXJ/AEKSFn8jeg2PcWmgNQdksiZ8YxGIv1ABo=; b=CJNuC4ycjb4Izyf5nnHau6afymjdk+5JWLrbU+eDJfnvMjmGR15ZoUYCRYy5eU3wnJ YpjXuX+dckrzDijoAGCOijT2Iq6KyqizNOVoysOrFQwDfHSzJhRwmsWlP3BOH2son3Dp PaK4SL7EvzCM35NHbTp0/C24/W4hSRdlci76p5B9Xi+VWloN8wWF6pbW645RHO6oHnwY vyNWAsuaFNMIhdTJRMYqwowTigqZbLPHPg8Ep/69OsgOJMMMHVe2m2h9ul9XaxFH+cYy 7Bl494cSuoVCr8MQlhiF3hJXMM7Tn4D9336ePi3a361R2Jjw/GhmjModRz5OXKcS9NVV AagQ== X-Gm-Message-State: ACgBeo0CSCagNdFrVQY4EvuXeyhv6yBAX0vt1gijh6hyLUqmeW/xcc8S y+a2b2f6vUZO49Pa6uTJs6jprjmeMDBIwfyG X-Google-Smtp-Source: AA6agR63etROVKVn3slpQSEZJkfSQAiAzr+MIljiBOD+TeChLSyCa4G6ZYL82YGeX77TbT4bLdMGZw== X-Received: by 2002:a17:90b:4c11:b0:1fb:66d3:79f with SMTP id na17-20020a17090b4c1100b001fb66d3079fmr4458178pjb.44.1662560454898; Wed, 07 Sep 2022 07:20:54 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:54 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 08/24] liburcu: upgrade 0.13.1 -> 0.13.2 Date: Wed, 7 Sep 2022 04:20:09 -1000 Message-Id: <2852ebcba6c718640b306adfd33907411ac02d21.1662559557.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 ; Wed, 07 Sep 2022 14:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170403 From: wangmy 2022-08-18 Userspace RCU 0.13.2 * Revert "Fix: remove type constness in URCU_FORCE_CAST's C++ version" * Fix: futex.h: include headers outside extern C * Fix: add missing unused attribute to _rcu_dereference * Fix: change method used by _rcu_dereference to strip type constness * Fix: remove type constness in URCU_FORCE_CAST's C++ version * Move extern "C" down in include/urcu/urcu-bp.h * fix: ifdef linux specific cpu count compat * Set git-review branch to stable-0.13 * fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id * Fix: revise obsolete command in README.md * Fix: workqueue: remove unused variable "ret" * Fix: urcu-qsbr: futex wait: handle spurious futex wakeups * Fix: urcu: futex wait: handle spurious futex wakeups * Fix: urcu-wait: futex wait: handle spurious futex wakeups * Fix: defer_rcu: futex wait: handle spurious futex wakeups * Fix: call_rcu: futex wait: handle spurious futex wakeups * Fix: workqueue: futex wait: handle spurious futex wakeups * Fix: Use %lu rather than %ld to print count Signed-off-by: Wang Mingyu Signed-off-by: Alexandre Belloni (cherry picked from commit b9ce9d9ab53baab7ba84187d17b34e48ff9eb16e) Signed-off-by: Steve Sakoman --- .../liburcu/{liburcu_0.13.1.bb => liburcu_0.13.2.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-support/liburcu/{liburcu_0.13.1.bb => liburcu_0.13.2.bb} (91%) diff --git a/meta/recipes-support/liburcu/liburcu_0.13.1.bb b/meta/recipes-support/liburcu/liburcu_0.13.2.bb similarity index 91% rename from meta/recipes-support/liburcu/liburcu_0.13.1.bb rename to meta/recipes-support/liburcu/liburcu_0.13.2.bb index 66763349d2..6ecf2e21c0 100644 --- a/meta/recipes-support/liburcu/liburcu_0.13.1.bb +++ b/meta/recipes-support/liburcu/liburcu_0.13.2.bb @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \ SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2" -SRC_URI[sha256sum] = "3213f33d2b8f710eb920eb1abb279ec04bf8ae6361f44f2513c28c20d3363083" +SRC_URI[sha256sum] = "1213fd9f1b0b74da7de2bb74335b76098db9738fec5d3cdc07c0c524f34fc032" S = "${WORKDIR}/userspace-rcu-${PV}" inherit autotools multilib_header From patchwork Wed Sep 7 14:20:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12428 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 193A5C6FA89 for ; Wed, 7 Sep 2022 14:21:05 +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.8213.1662560458100920405 for ; Wed, 07 Sep 2022 07:20:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=7rQ7qN32; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id q3so14698746pjg.3 for ; Wed, 07 Sep 2022 07:20:58 -0700 (PDT) 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; bh=Fz1Ct8N5aGEd2zhRwUzxFEUsw+YhF4GXf44X38z8xOQ=; b=7rQ7qN32LTHBD41/NoKL/vSMSxtsMDtiy30ZL1WXs2LYJNXoKodxUKirOBWjf4cPjw BI3AVQduDGGCLrSXuYxH5RAMk0MNj3rO1DU0ykVgL/XqQTRGJL/Hd0N9y/cvqr5AROqd pYgA+tSOEYCH7rPVftHgWIG431ud7nifHJ7GGb5kS2e9zdZ3q0LE3CK4SMlT3/PRL6Xa yvrmbnZqV0KTT8gTGBPhp0gT67LcyPaHLUsE9W1ROUAWQqsQmsorViNTEGspTi9cl2h/ XWmDobZjuYV2B/N9uNSztg3V4cwRU4HDUyHS3JeCuedHOIPnVJqBaRkHFOijSWn6HNaR w38w== 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; bh=Fz1Ct8N5aGEd2zhRwUzxFEUsw+YhF4GXf44X38z8xOQ=; b=n9VpXdkAKfP/DdJpGCCMpkVk1jbP/mN6pBawhARuKaZuMgsw8atsrX81yN+4t0Chf6 TeurIpaKVBi6tDlFfwAjgZgbnfz/Z2l8FfY+szSfX5JemlUEzgCsl0jGgHBAkNHXMIcJ +pX0X3FQwAhHgQ6+MINVP/M7NR+oL2JyqaJE1qKF59gZ9XvXl2THZBatwj0K2ZviEvb2 CBzfu3Cv6SKeMZYcNXmwQzdYkheVnnU8ciSkk+nlPFz1rxfNSPuAwtkxnF0W3otD6q9L 97HTWvfLYyiYE6pLODGI1gAjG+SDuc17Y+unicSzhf1/6k0jiXQUvPHAocHNaWWUNg8Q Qrdg== X-Gm-Message-State: ACgBeo2zofdNR1dkBtEkYH7MfYFCmIFNvIZj2/72mCUfGGMmCjitysMe XMsWiB884lF9F+4Ndr020/EqpYAMCKYjBHWA X-Google-Smtp-Source: AA6agR5067hiDWphgV8EzmURNRUJnajIAY0s7pQhFZHePnWHLA0G/1jOi2nN1IOaSJZ3SepmczJUZQ== X-Received: by 2002:a17:903:2c7:b0:16c:ebf6:db22 with SMTP id s7-20020a17090302c700b0016cebf6db22mr3858568plk.16.1662560457124; Wed, 07 Sep 2022 07:20:57 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:56 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 09/24] libwpe: upgrade 1.12.2 -> 1.12.3 Date: Wed, 7 Sep 2022 04:20: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 ; Wed, 07 Sep 2022 14:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170404 From: wangmy Changelog: Fix the build when using Clang's libc++ or the Musl libc. 0001-Fix-build-failure-due-to-libc-using-libc-functions.patch removed since it's included in 1.12.3 Signed-off-by: Wang Mingyu Signed-off-by: Alexandre Belloni (cherry picked from commit f8d8cc58c9b9c221158414be186bc12aa5d80e91) Signed-off-by: Steve Sakoman --- ...ure-due-to-libc-using-libc-functions.patch | 42 ------------------- .../{libwpe_1.12.2.bb => libwpe_1.12.3.bb} | 6 +-- 2 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch rename meta/recipes-sato/webkit/{libwpe_1.12.2.bb => libwpe_1.12.3.bb} (72%) diff --git a/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch deleted file mode 100644 index 6d27b4835d..0000000000 --- a/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch +++ /dev/null @@ -1,42 +0,0 @@ -From ccf8a58c3536ca0e62748e0ea477514e14d821bc Mon Sep 17 00:00:00 2001 -From: Adrian Perez de Castro -Date: Thu, 4 Aug 2022 12:19:05 +0300 -Subject: [PATCH] Fix build failure due to libc++ using libc functions - -Include the "alloc-private.h" header after the C++ standard library -headers. This sidesteps build failures caused by implementations of -std::map and std::string which use libc memory allocation functions -in expanded templates after they have been marked with the "poison" -pragma. - -Fixes #115 - -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin ---- - src/pasteboard-generic.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/pasteboard-generic.cpp b/src/pasteboard-generic.cpp -index 86fe4ee..a357027 100644 ---- a/src/pasteboard-generic.cpp -+++ b/src/pasteboard-generic.cpp -@@ -26,12 +26,15 @@ - - #include "pasteboard-private.h" - --#include "alloc-private.h" --#include --#include - #include - #include - -+// We need to include this header last, in order to avoid template expansions -+// from the C++ standard library happening after it forbids usage of the libc -+// memory functions. -+#include "alloc-private.h" -+#include -+ - namespace Generic { - using Pasteboard = std::map; - } diff --git a/meta/recipes-sato/webkit/libwpe_1.12.2.bb b/meta/recipes-sato/webkit/libwpe_1.12.3.bb similarity index 72% rename from meta/recipes-sato/webkit/libwpe_1.12.2.bb rename to meta/recipes-sato/webkit/libwpe_1.12.3.bb index e23a9ac32d..77ca517ef7 100644 --- a/meta/recipes-sato/webkit/libwpe_1.12.2.bb +++ b/meta/recipes-sato/webkit/libwpe_1.12.3.bb @@ -10,10 +10,8 @@ inherit cmake features_check pkgconfig REQUIRED_DISTRO_FEATURES = "opengl" -SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz \ - file://0001-Fix-build-failure-due-to-libc-using-libc-functions.patch \ - " -SRC_URI[sha256sum] = "4ac4fd0a8b562b721bffd0f46ae9f06c2b5a3114407581978be875a9d651642a" +SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz" +SRC_URI[sha256sum] = "b84fdbfbc849ce4fdf084bb28b58e5463b1b4b6cc8f200dc77b41f8545d5329d" # This is a tweak of upstream-version-is-even needed because # ipstream directory contains tarballs for other components as well. From patchwork Wed Sep 7 14:20:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12426 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 0DA3AC6FA86 for ; Wed, 7 Sep 2022 14:21:05 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mx.groups.io with SMTP id smtpd.web12.8360.1662560460579591170 for ; Wed, 07 Sep 2022 07:21:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=4VxIVyQd; spf=softfail (domain: sakoman.com, ip: 209.85.216.47, mailfrom: steve@sakoman.com) Received: by mail-pj1-f47.google.com with SMTP id z9-20020a17090a468900b001ffff693b27so13544127pjf.2 for ; Wed, 07 Sep 2022 07:21:00 -0700 (PDT) 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; bh=y3e65OGs6a5Oe/+FbzZqn7AdlzjOYMw3Pn9uv+2CoyU=; b=4VxIVyQdiwz6mGMO73tH2h8WludSXL/0FriU8N7CXfZSfZHoEPIK+PCsfuMrJjrZth tsqP3j2MZiwQQhLcRIKx4xa14cmhVa00sAf4w7Yv1pxEWtc1FuUCvTvaKxPLTZDtQeQ5 y7iLMfQZ898/5yAuxxCHwhp4OGR+1Lq6/D4htQZAoC2PVe46PzArm2CoQpALe1Z7tZmc 1sVgTJZ2U3vlzkOe1in44ocOI8Jwokm8QqMFcrCA1fY4bi/Whk+Sqncn9XnC6JzGv+7T fOU7hIjwJYfol0WVmBmkxWByJDyVMUmoZKtbf6HS+HfWgamTwYseLToB56dQxMTKlq1E o+7w== 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; bh=y3e65OGs6a5Oe/+FbzZqn7AdlzjOYMw3Pn9uv+2CoyU=; b=rlXCSLEW1aQC2Tk49Bo/AHTApInl2ApsdCovKTfL7X7QiTcbemPyUflT/RDRsd/KZ9 DW8ZXSvxHuCv7SHIzt9pJzSo6SlT+uCNaeVlFBj1na94/5sXKt/bfOwckJCHKCYFWI9c /ucpxOAt11X3CQAUPXB1WzFlzUYG0TC7GdxBSTlivPjRo6A/o0YL6Xm6D+APLpvGIH8q AZXNV5G9zEkej+AUKcRjhilRKGcbvqAtUE6nmfq3cJAuIxjvvFmkl/5crgcQtRB2e1UB NZaQ/4V5j08SPX9OlRPXZzJcmxW9fciDBH8cD4ahaoFG4DCHNJUQAgzbzD7mOXt2H0Rr pxKg== X-Gm-Message-State: ACgBeo3mOnmMrG98TvX+cFDSg3VQYgay0EbURGIJ4S8VWU72Cnrqx/6w bsJfi4P8NKi+WU0vbF2kEKNTC242k1sNq4hJ X-Google-Smtp-Source: AA6agR5MCq6g64hSaIgl6svxcOnsB0N+VK6r0Caxc/q53iP/xl51NePAOOpg8WbRYCqR8XPbw7LUuw== X-Received: by 2002:a17:902:a418:b0:174:6711:92c1 with SMTP id p24-20020a170902a41800b00174671192c1mr4156013plq.146.1662560459577; Wed, 07 Sep 2022 07:20:59 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.20.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:20:58 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 10/24] libatomic-ops: upgrade 7.6.12 -> 7.6.14 Date: Wed, 7 Sep 2022 04:20:11 -1000 Message-Id: <8bcf5d5885abbc405f17a56027aa19f826dcdb71.1662559557.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 ; Wed, 07 Sep 2022 14:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170405 From: wangmy License-Update: Adjust/reformat content of LICENSING.txt ========================================================= "libatomic_ops_gpl.a" changed to "libatomic_ops_gpl.a file" "sysdeps" changed to "atomic_ops/sysdeps" "This applies only to test code, sample applications," changed to "This applies only to the test code" Changelog: ========== Add note to README that AO malloc code has same license as AO stack Adjust/reformat content of LICENSING.txt Avoid AO_stack_t to cross CPU cache line boundary Do not assume 'ordered except earlier write' for UWP/arm64 Do not name GCC intrinsics as C11 ones in ChangeLog and configure Eliminate '-pedantic is not option that controls warnings' GCC-6.3 message Ensure result of AO_test_and_set is always AO_TS_CLEAR or AO_TS_SET Fix 'AO_malloc redefinition' MS VC warning caused by attributes mismatch Fix 'use of undeclared SIG_BLOCK' Clang error if -std=c89 on Cygwin Fix AO_compare_and_swap_full asm code for clang on sparc Fix a typo in comment of AO_stack_push_explicit_aux_release Fix code indentation in main() of test_stack.c Refine AO_UNIPROCESSOR macro description in configure Remove outdated comment about unsupported Win64 in atomic_ops_stack.h Repeat black list check on CAS fail in stack_push_explicit_aux_release Signed-off-by: Wang Mingyu Signed-off-by: Alexandre Belloni (cherry picked from commit a0f177ef7f52bab06d8fff752ba8390defd71ed5) Signed-off-by: Steve Sakoman --- .../{libatomic-ops_7.6.12.bb => libatomic-ops_7.6.14.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-support/libatomic-ops/{libatomic-ops_7.6.12.bb => libatomic-ops_7.6.14.bb} (80%) diff --git a/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.12.bb b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb similarity index 80% rename from meta/recipes-support/libatomic-ops/libatomic-ops_7.6.12.bb rename to meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb index 8ea8436977..fad92df507 100644 --- a/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.12.bb +++ b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb @@ -5,13 +5,13 @@ SECTION = "optional" PROVIDES += "libatomics-ops" LICENSE = "GPL-2.0-only & MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \ + file://doc/LICENSING.txt;md5=dfc50c7cea7b66935844587a0f7389e7 \ " SRC_URI = "https://github.com/ivmai/libatomic_ops/releases/download/v${PV}/libatomic_ops-${PV}.tar.gz" UPSTREAM_CHECK_URI = "https://github.com/ivmai/libatomic_ops/releases" -SRC_URI[sha256sum] = "f0ab566e25fce08b560e1feab6a3db01db4a38e5bc687804334ef3920c549f3e" +SRC_URI[sha256sum] = "390f244d424714735b7050d056567615b3b8f29008a663c262fb548f1802d292" S = "${WORKDIR}/libatomic_ops-${PV}" From patchwork Wed Sep 7 14:20:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12427 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 13563C38145 for ; Wed, 7 Sep 2022 14:21:05 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web08.8302.1662560463065190118 for ; Wed, 07 Sep 2022 07:21:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=eeMIxt2a; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id 65so4552435pfx.0 for ; Wed, 07 Sep 2022 07:21:03 -0700 (PDT) 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; bh=fxg137MTz6c1D1tR5/r2OOq97gA9LlRczr24yyEK3zw=; b=eeMIxt2aqITcH52obYGNmBrqAdXoEFb0WKj5kzbpy5cgewRKtdUvxVRHBmpsfcT6pr 2tnvuI52bNm2aDznSo87W+ImrXc4fzTy5RxXHqwJF0CM4ZkiDYTmDaAUyr1lVW5nobvi mCp+9ZGyJjvCKofepmNaoaNNALuaGWih5i+03DPJ0BsUSAJLsu0wG69Spk9g01HWgyqW 3yCe0RbGlnuFABhyYvrLjPzZassBbMLcLDCuMxkqyK+shUpwpT9q3eC7TSo3N0dPz30u MjNLRdCjAYonqrymENjIB4hLQrVr1Da4qtN+GFCbwVqv2dnsKdraSyO2+8z2FdU+5h2g E7OA== 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; bh=fxg137MTz6c1D1tR5/r2OOq97gA9LlRczr24yyEK3zw=; b=mdLevYq5ztw+KR8nJh2NrD1GJsh+WrKYY6AQ0WracPhtODxbBQH+wGDhHBvVKIlh2e Cag27+/aZyU0m0uNoVbW4tonMuRhlgeS8Wy6w59eN0fuIs5RUtgKUODPKqqoJiOKLcie ihm8nyPViAXg1zKCOMTo1bsDd0rNIkg2CrQmsRvx6+Rzf03icgkrA8jqo3Ce0mIL3t7u uVUN5FnN9/XNaojV6+OFzwa4MB+IgP7fzXdvjX2SUSpAvtrZk38g34UNHdp+ObcQb2Ou uqjnEaLG/P0E/vM1nX6KZPb0VC4nkaFbLV95yIuIgnFd0vxzBlQJ0XeNgWM13iF1Ijdn kg/g== X-Gm-Message-State: ACgBeo2WdjDA/GxA1rZbQsFdbDZAZirKR5Em5rD+wlSCUgMgCBeCUZq8 4wdgSkdMnuDb7qlwkNCUAUGCj7LpRTBvYYR0 X-Google-Smtp-Source: AA6agR6gbo5MweFgip4RyoNChUTQvZFmAmrgrJqadR/PGJ/UmFz46icnreL0HGwfIsWLKWFxSpH5yA== X-Received: by 2002:a63:86c6:0:b0:434:fe98:9f8a with SMTP id x189-20020a6386c6000000b00434fe989f8amr1456243pgd.541.1662560461922; Wed, 07 Sep 2022 07:21:01 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:01 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 11/24] lz4: upgrade 1.9.3 -> 1.9.4 Date: Wed, 7 Sep 2022 04:20:12 -1000 Message-Id: <8883d3992078ae24c2601ebf844223fa6e056ded.1662559557.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 ; Wed, 07 Sep 2022 14:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170406 From: wangmy CVE-2021-3520.patch removed since it's included in 1.9.4 License-Update: Copyright year updated to 2020 description of 3rd party applications changed Signed-off-by: Wang Mingyu Signed-off-by: Alexandre Belloni (cherry picked from commit f95c66050bc69af7769d1868b0118cefb24e5b0d) Signed-off-by: Steve Sakoman --- .../lz4/files/CVE-2021-3520.patch | 27 ------------------- .../lz4/{lz4_1.9.3.bb => lz4_1.9.4.bb} | 10 +++---- 2 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 meta/recipes-support/lz4/files/CVE-2021-3520.patch rename meta/recipes-support/lz4/{lz4_1.9.3.bb => lz4_1.9.4.bb} (78%) diff --git a/meta/recipes-support/lz4/files/CVE-2021-3520.patch b/meta/recipes-support/lz4/files/CVE-2021-3520.patch deleted file mode 100644 index 5ac8f6691f..0000000000 --- a/meta/recipes-support/lz4/files/CVE-2021-3520.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8301a21773ef61656225e264f4f06ae14462bca7 Mon Sep 17 00:00:00 2001 -From: Jasper Lievisse Adriaanse -Date: Fri, 26 Feb 2021 15:21:20 +0100 -Subject: [PATCH] Fix potential memory corruption with negative memmove() size - -Upstream-Status: Backport -https://github.com/lz4/lz4/commit/8301a21773ef61656225e264f4f06ae14462bca7#diff-7055e9cf14c488aea9837aaf9f528b58ee3c22988d7d0d81d172ec62d94a88a7 -CVE: CVE-2021-3520 -Signed-off-by: Armin Kuster - ---- - lib/lz4.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/lib/lz4.c -=================================================================== ---- git.orig/lib/lz4.c -+++ git/lib/lz4.c -@@ -1665,7 +1665,7 @@ LZ4_decompress_generic( - const size_t dictSize /* note : = 0 if noDict */ - ) - { -- if (src == NULL) { return -1; } -+ if ((src == NULL) || (outputSize < 0)) { return -1; } - - { const BYTE* ip = (const BYTE*) src; - const BYTE* const iend = ip + srcSize; diff --git a/meta/recipes-support/lz4/lz4_1.9.3.bb b/meta/recipes-support/lz4/lz4_1.9.4.bb similarity index 78% rename from meta/recipes-support/lz4/lz4_1.9.3.bb rename to meta/recipes-support/lz4/lz4_1.9.4.bb index 129a86b681..a2a178bab5 100644 --- a/meta/recipes-support/lz4/lz4_1.9.3.bb +++ b/meta/recipes-support/lz4/lz4_1.9.4.bb @@ -3,18 +3,16 @@ DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing comp HOMEPAGE = "https://github.com/lz4/lz4" LICENSE = "BSD-2-Clause | GPL-2.0-only" -LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \ +LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=5cd5f851b52ec832b10eedb3f01f885a \ file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \ + file://LICENSE;md5=c5cc3cd6f9274b4d32988096df9c3ec3 \ " PE = "1" -SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3" +SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964" -SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ - file://CVE-2021-3520.patch \ - " +SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https" UPSTREAM_CHECK_GITTAGREGEX = "v(?P.*)" S = "${WORKDIR}/git" From patchwork Wed Sep 7 14:20:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12432 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 10EB7C6FA89 for ; Wed, 7 Sep 2022 14:21:15 +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.web08.8305.1662560464956453561 for ; Wed, 07 Sep 2022 07:21:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=Ye6KnURW; spf=softfail (domain: sakoman.com, ip: 209.85.216.52, mailfrom: steve@sakoman.com) Received: by mail-pj1-f52.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so11031121pjl.0 for ; Wed, 07 Sep 2022 07:21:04 -0700 (PDT) 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; bh=kf3S3MC+IU4IcSNosaOc15KjoVwosxzA5sUbpIEY7uY=; b=Ye6KnURW/k1VQnzJg2B/QJGxpUi4MfPQX7grni9Fa4yHGjkeu/sKyERWoMD4irViiP LYKcOynZuoq/IG5cn4sApy6CabyFq56S0FsFKrcoqX9qJMOpX8JJIWrQCXnwJAB7DGgH THqRKDCLekCIw1TJXOdOfhA3/HIg+D08dud3FeAsMoPbl+qKb0/63JjmCJCa1wfopi3t M/QCMDD/oZyWgzUBOzXOlOWXvIqCNX4eF+w+1JYLj6X39oU6vmNvU00a+uMNUnqcc1G3 RG+De5TCcftt1+m8bnA7qoZEso36skpON+AAp9Pz4+Vv0QWTgZikYJQvWs73+5YxFbPF ERpQ== 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; bh=kf3S3MC+IU4IcSNosaOc15KjoVwosxzA5sUbpIEY7uY=; b=yDNLSmm+Tv2ah/XtXaDyba/jFuJMoDYwtEDrNZiXdDdXJOsouJ9IzQe/abYE8vpDVp m2+eCnzOkMMnibbxHM7GH04s2qXJ0Ul5GmTm8sTVT94nNSSjxCMmNDIoOWWw+oa+18f1 RVCmeawEECP/hh8J4bAQ1nIbThfAniG1uosWbzCs+FAytF/8rAEovPuC+tyZKE8QE/sE WUlUR2Z2Yh/NaZ+Q6ih6Ureu5vZZhXRnHFZrEq5z4ifYAjfGD2C1+vTncB1M/l6Pvbjh egJ0ihnQKSc28cgQ6SYH4Pgb7mMc/l8WhUE+E3jibyhtFmmyNWYKDNpcRLtiRVOrt6bI 7ecw== X-Gm-Message-State: ACgBeo1PrJwhZkREZ39mcCK1TEgsoFu0yjyaPNhhO38og5yddcb3ufdA WFJtYtZrdwWy4mIVqfZOxf/nSrkBY3gclu3y X-Google-Smtp-Source: AA6agR7dQuDaWoT08q4ns7OvnGclnMtaqRw0r6KvInLlFBIL1gfrRZh0QXtNkNNUnitoSHf/GQ0bUw== X-Received: by 2002:a17:902:694a:b0:172:bd15:3ece with SMTP id k10-20020a170902694a00b00172bd153ecemr4114159plt.116.1662560463987; Wed, 07 Sep 2022 07:21:03 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:03 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 12/24] insane.bbclass: Skip patches not in oe-core by full path Date: Wed, 7 Sep 2022 04:20:13 -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 ; Wed, 07 Sep 2022 14:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170407 From: Yang Xu The full path of patch may contain '/meta/' but not in oe-core, skip patches by checking it starts with oe-core full path or not. Signed-off-by: Yang Xu Signed-off-by: Alexandre Belloni (cherry picked from commit d8a525afdfb5d371e76b09301c8b2741d23d1d10) Signed-off-by: Steve Sakoman --- meta/classes/insane.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index f3f80334f6..0d93d50e58 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -1196,11 +1196,12 @@ python do_qa_patch() { import re from oe import patch + coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '') for url in patch.src_patches(d): (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url) # skip patches not in oe-core - if '/meta/' not in fullpath: + if not os.path.abspath(fullpath).startswith(coremeta_path): continue kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE) From patchwork Wed Sep 7 14:20:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12434 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 1ED28C6FA8A for ; Wed, 7 Sep 2022 14:21:15 +0000 (UTC) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web11.8209.1662560440200858360 for ; Wed, 07 Sep 2022 07:21:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=xdVhzTFN; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id x1so10357209plv.5 for ; Wed, 07 Sep 2022 07:21:06 -0700 (PDT) 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; bh=AQ3DD2Ofit3I9SDGWFgFBSHC43QIPorJ2pRoLkVnNbw=; b=xdVhzTFN2V6rpWKE7jHh/czhXOgQYnJbLlBgr85EcgCjA/OmdzStov1LhBeFYBmfiT 209KaCzB2Y0x18p8fEYEctNB7rejyK340m9difMmpY90iYmDqW2MJNvtE/rPyE2+Wa7D roYeWUQltmFd+TX40D+nK3bOFscWLw1Zpxh709a1qCHnpx3xxREzx/oD1Ytg3lzcptib Xovk+41LHpd/v4FPi9NosZ9oq+ap4+L8HyLew3/hjoKXv2XLXdTqogOMgYEwSgNjT7n1 tprdPL8noxCb1Lp7Yq34OhhgUTfkz8qIyETwoe7PG8XsHSt0EBM7u44tgqOIGgmuVLz0 QhBg== 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; bh=AQ3DD2Ofit3I9SDGWFgFBSHC43QIPorJ2pRoLkVnNbw=; b=2H6mKxakI3/6pgIz6aTtBvZfxrE+zvkoyJvV6VALA4kZY1lPYorW83M0HTEg4B3vXA K/IaNg01M8z+c1qBAtUefTAvj7gA1oDts9Ug/j0BuKmX2ppr/yE8XGVs7mGI+3cScOet UsxFyyreKkq0VENgss46j5d4HjmnjSoCylsrmhC8w7qBUJX1hluDYTQ3MBy+JDa5bT91 1RJWm3c3ura0tZKz9ZLLJxJTpF/mF6j3KLJTYfjBvf7llm4JhESDpSW0BSftIt1K0W8M uFSzpArxcFW+mpNphelilbDPoevPaHMyYe2ATEXRJpTny0u3hsdo9UhGBpzi698z6AJ4 I84g== X-Gm-Message-State: ACgBeo3+2Gc6MEdR94O6aK5eD39BCddMgt3yIRzfXEJ5vW7FVAj34Prc KKr9zwNOMIrkHdkgDM9FmsCZKlPaEBGdwtxk X-Google-Smtp-Source: AA6agR7OczoOGBpw2ueVzQ1zuShasdhNc+tB6E0QctKfxZpeMm3gAp1Dmv7wASYVHEzgFUoojQURMg== X-Received: by 2002:a17:903:2104:b0:176:a9ef:418b with SMTP id o4-20020a170903210400b00176a9ef418bmr4146915ple.134.1662560466202; Wed, 07 Sep 2022 07:21:06 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:05 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 13/24] maintainers: update opkg maintainer Date: Wed, 7 Sep 2022 04:20:14 -1000 Message-Id: <371e574acaab78b44ac171de92b668157df787de.1662559557.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 ; Wed, 07 Sep 2022 14:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170408 From: Alex Stewart Alex Stewart assumed maintainership of the yocto project's opkg fork, and opkg recipes, from Alejandro Del Castilo back in Q1 of 2020. Update maintainership of the opkg recipes. Signed-off-by: Alex Stewart Signed-off-by: Luca Ceresoli (cherry picked from commit fd0511080fb5744b4b58df43184fa2561cc37134) Signed-off-by: Steve Sakoman --- meta/conf/distro/include/maintainers.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 0a1897fc92..4778b1e5e6 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -544,10 +544,10 @@ RECIPE_MAINTAINER:pn-ofono = "Ross Burton " RECIPE_MAINTAINER:pn-opensbi = "Alistair Francis " RECIPE_MAINTAINER:pn-openssh = "Unassigned " RECIPE_MAINTAINER:pn-openssl = "Alexander Kanavin " -RECIPE_MAINTAINER:pn-opkg = "Alejandro del Castillo " -RECIPE_MAINTAINER:pn-opkg-arch-config = "Alejandro del Castillo " -RECIPE_MAINTAINER:pn-opkg-keyrings = "Alejandro del Castillo " -RECIPE_MAINTAINER:pn-opkg-utils = "Alejandro del Castillo " +RECIPE_MAINTAINER:pn-opkg = "Alex Stewart " +RECIPE_MAINTAINER:pn-opkg-arch-config = "Alex Stewart " +RECIPE_MAINTAINER:pn-opkg-keyrings = "Alex Stewart " +RECIPE_MAINTAINER:pn-opkg-utils = "Alex Stewart " RECIPE_MAINTAINER:pn-orc = "Anuj Mittal " RECIPE_MAINTAINER:pn-os-release = "Ross Burton " RECIPE_MAINTAINER:pn-ovmf = "Ricardo Neri " From patchwork Wed Sep 7 14:20:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12433 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 16D59C6FA86 for ; Wed, 7 Sep 2022 14:21:15 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web08.8308.1662560469280703160 for ; Wed, 07 Sep 2022 07:21:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=lLTfk3bH; spf=softfail (domain: sakoman.com, ip: 209.85.210.174, mailfrom: steve@sakoman.com) Received: by mail-pf1-f174.google.com with SMTP id l65so14781635pfl.8 for ; Wed, 07 Sep 2022 07:21:09 -0700 (PDT) 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; bh=PFN61DMNCaneY/sfYckswUntm5kQrwbwty/hTSRVRCY=; b=lLTfk3bHLXXcwjuzjAfV4GIK6MjJpSctARCJemWQovPxMuMane0CxhKBMU8f+3hutk r1/dj5bDfyJDu7Xlq8j4c2A+AfX+zDS2JRxtx31wmsADF8s2YBmmJm2bGx9T4FYKKOOq /VXZSE8BA/0qyQR5pduHE3Vk0/95mtZi/OFufPEuGTkMmdWyNyR0Vp45NRM7QQR/nYyc xy4EX0I/WsfC0gdX4a4Spqs31Ytv3msRoyjknxFdEHdCH+fYqRTuy7cqHJ+/FYsoBDNT xfpSUO1syM0KIV2fFIXzOclEbtF0e5nCQLERLCG6K2qO0xmQlMnESlFUi+4272yBfZcn KqiA== 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; bh=PFN61DMNCaneY/sfYckswUntm5kQrwbwty/hTSRVRCY=; b=32x23+8t+8eEapNj96W9GIUsyFjDqBh764NSJvqeAJ4DLJECP6YNmtBGcuv5kBnGsL dDkJ9Eef/0FFJ1MQt6ZydhUkGWkCcpxD+V6QUXBOlfNfVDAd9lbvv5axpkhZj9HwPJRG 0ATPkmwtYhHTaADtDnkdwLBC9BiYz1+RjAaUMYvufr5BRiukkfxnyMeYGwbvWj/9oiL7 glo3dXzt9J9DkgTRjtfLl1nwommOgqAq3so//3JdTej8ohU02SkJnxkktYAO8ZPWsiPW dg/vYrBT8pPkJkA43R9fe/nTB+lnGGviANHBNaNTosODh92/qRomHHaXflWgLSwMCGfD MvCA== X-Gm-Message-State: ACgBeo0koO8uQ74C6i+/8fsnA4XM1x64FPtMNr11z+lUHFxTWZfd3ETv FVaU9nR3M1bWFAhJ2+HTWHddsTmcF6+tA/Mz X-Google-Smtp-Source: AA6agR61z1vTOH6ZaN0bouLQ+hyFe/BSHC4u8xMN8SIghlkq6fo0gGDpEhSl9BENUIeO2ZkN9G5ctw== X-Received: by 2002:aa7:95b0:0:b0:537:cdbe:5c8a with SMTP id a16-20020aa795b0000000b00537cdbe5c8amr4125127pfk.59.1662560468269; Wed, 07 Sep 2022 07:21:08 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:07 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 14/24] apr: Cache configure tests which use AC_TRY_RUN Date: Wed, 7 Sep 2022 04:20:15 -1000 Message-Id: <8784e3712add2fbdf684d442a14fb94e5a7fc61f.1662559557.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 ; Wed, 07 Sep 2022 14:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170409 From: Khem Raj AC_TRY_RUN macro means the test needs to run to find the result and we are cross compiling so this will always get wrong results, this results in miscompiling apache2 on musl because it disables rlimit (ac_cv_struct_rlimit) wrongly. All these variables are determined with AC_TRY_RUN checks Signed-off-by: Khem Raj Signed-off-by: Luca Ceresoli (cherry picked from commit 504eb0ff1cae200ee85ec18ebae564cae9bf9c8c) Signed-off-by: Steve Sakoman --- ...-runtime-test-for-mmap-that-can-map-.patch | 62 +++++++++++++++++++ meta/recipes-support/apr/apr_1.7.0.bb | 15 ++++- 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch diff --git a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch new file mode 100644 index 0000000000..fa6202da79 --- /dev/null +++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch @@ -0,0 +1,62 @@ +From ee728971fd9d2da39356f1574d58d5daa3b24520 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 26 Aug 2022 00:28:08 -0700 +Subject: [PATCH] configure: Remove runtime test for mmap that can map + /dev/zero + +This never works for cross-compile moreover it ends up disabling +ac_cv_file__dev_zero which then results in compiler errors in shared +mutexes + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Khem Raj +--- + configure.in | 32 -------------------------------- + 1 file changed, 32 deletions(-) + +diff --git a/configure.in b/configure.in +index a99049d..f1f55c7 100644 +--- a/configure.in ++++ b/configure.in +@@ -1182,38 +1182,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \ + APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) + AC_CHECK_FILE(/dev/zero) + +-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that. +-if test "$ac_cv_func_mmap" = "yes" && +- test "$ac_cv_file__dev_zero" = "yes"; then +- AC_MSG_CHECKING(for mmap that can map /dev/zero) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#ifdef HAVE_SYS_MMAN_H +-#include +-#endif +- int main() +- { +- int fd; +- void *m; +- fd = open("/dev/zero", O_RDWR); +- if (fd < 0) { +- return 1; +- } +- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); +- if (m == (void *)-1) { /* aka MAP_FAILED */ +- return 2; +- } +- if (munmap(m, sizeof(void*)) < 0) { +- return 3; +- } +- return 0; +- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no]) +- +- AC_MSG_RESULT($ac_cv_file__dev_zero) +-fi +- + # Now we determine which one is our anonymous shmem preference. + haveshmgetanon="0" + havemmapzero="0" +-- +2.37.2 + diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.0.bb index 07bf61545e..cb4bb936d7 100644 --- a/meta/recipes-support/apr/apr_1.7.0.bb +++ b/meta/recipes-support/apr/apr_1.7.0.bb @@ -25,6 +25,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ file://0001-Add-option-to-disable-timed-dependant-tests.patch \ file://autoconf270.patch \ file://0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch \ + file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \ file://CVE-2021-35940.patch \ " @@ -37,12 +38,22 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" - +# Enable largefile +CACHED_CONFIGUREVARS += "apr_cv_use_lfs64=yes" +# Additional AC_TRY_RUN tests which will need to be cached for cross compile +CACHED_CONFIGUREVARS += "apr_cv_epoll=yes epoll_create1=yes apr_cv_sock_cloexec=yes \ + ac_cv_struct_rlimit=yes \ + ac_cv_func_sem_open=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_mutex_robust_shared=yes \ + " # Also suppress trying to use sctp. # CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" -CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes" +# ac_cv_sizeof_struct_iovec is deduced using runtime check which will fail during cross-compile +CACHED_CONFIGUREVARS += "${@['ac_cv_sizeof_struct_iovec=16','ac_cv_sizeof_struct_iovec=8'][d.getVar('SITEINFO_BITS') != '32']}" + CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" CACHED_CONFIGUREVARS:append:libc-musl = " ac_cv_strerror_r_rc_int=yes" From patchwork Wed Sep 7 14:20:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12431 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 0E303C54EE9 for ; Wed, 7 Sep 2022 14:21:15 +0000 (UTC) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mx.groups.io with SMTP id smtpd.web08.8309.1662560471939568119 for ; Wed, 07 Sep 2022 07:21:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=t1Q2gS0E; spf=softfail (domain: sakoman.com, ip: 209.85.216.43, mailfrom: steve@sakoman.com) Received: by mail-pj1-f43.google.com with SMTP id p1-20020a17090a2d8100b0020040a3f75eso10023875pjd.4 for ; Wed, 07 Sep 2022 07:21:11 -0700 (PDT) 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; bh=zlREAsnoiOPB0R49ESP+hr+PIeGNyDMLft+qAHJvRo8=; b=t1Q2gS0EBJzFAYreE9i9Nz0WiCF/bRlvIPcRNURqXtdMOCtbu5I7zGu7OED3zi6iJ0 MSoV219GFsWTYrgjDP0KzSJUT1pNYEZzgLc5F74KlaJkmpN9iCfD2AakeLHkpKeiBDME RujVoo+CIHDgUFmZzi6v7UuVzZUEt9I5unNSaYo9+DtDEUt6KU8lUCJWzJHpM1hmjPjV JT6BHxi3ZGVtZ8MpIuPK68BKF5RFN3sqZHMz/qnbpZZfxg5/EsYJDKoR3mjTH+HSpCbC c9XvqIEL7cD6C0pWXpN3rwOzLh8rTJiGuuaIjrncfett+sp0jzz8yXo3d5jY3ONOmTL8 xjjw== 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; bh=zlREAsnoiOPB0R49ESP+hr+PIeGNyDMLft+qAHJvRo8=; b=AROC1GobxRny9TGxhaNNQGFpiMuce6LM3JWZ/QnlOR1j4g0ncT/vzw96JL8qRSFNZF 5fLmt5wgkZ6cwxuI62XcCB/i2byghar6ks3J9OqQj/H3pU4HyJc48kzswbSY78rK2OZi 7QNFkRO5vEW4LqRdk1pLgDApS7fsxfQh9JPA482znIVhoSLuhJGZo2MIo75SseVLhbFu ELQLWnZ4uXeOVDDxx2oztgtE1teTxdYryPwi7hFvchcJrjMvYPDvjt0btcPVizyIZKVb ZD8O18Q4w3K3auN5qMYUI4//HLe8n6yKk47UpVAhLi0e+08Z2BRJ73FKs6j8rVW9TQAw bK8Q== X-Gm-Message-State: ACgBeo1Zauyj5lOkRbgpk4r5XgPO/9ChHTYoWclGiVnpi9jnOkXAVqlj Dcix4Os4T+5C860eBrIOUWb7A/J5c3Iyzedr X-Google-Smtp-Source: AA6agR6LpCXYQTtS1vYriY/Yg9nQ9w2FIL/B7Z665OHssEBXp3JZV6dei4avlU9JGg3poDypfOJ2TA== X-Received: by 2002:a17:90b:3a8d:b0:1fb:1487:1cca with SMTP id om13-20020a17090b3a8d00b001fb14871ccamr4294447pjb.196.1662560470942; Wed, 07 Sep 2022 07:21:10 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:09 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 15/24] bitbake.conf: set BB_DEFAULT_UMASK using ??= Date: Wed, 7 Sep 2022 04:20:16 -1000 Message-Id: <4d603ccf0713ade69d98e452b991a4d1d71c144a.1662559557.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 ; Wed, 07 Sep 2022 14:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170410 From: Rasmus Villemoes Currently, there's no way for the user's site.conf, local.conf or similar to set BB_DEFAULT_UMASK, because those files are included by bitbake.conf prior to the unconditional assignment of BB_DEFAULT_UMASK. To make that possible, use a weak default assignment instead. This is also consistent with most other variable assignments in the lower half of bitbake.conf. I believe the risk of a regression is very small; it would require something like somebody having a definition of BB_DEFAULT_UMASK in a local configuration file, and having been relying on that _not_ taking effect. Signed-off-by: Rasmus Villemoes Signed-off-by: Luca Ceresoli (cherry picked from commit e3dbded499f0bd1e71abb0650ae98fd9ade94250) Signed-off-by: Steve Sakoman --- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 2a3cf6f8aa..516a30c963 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -924,7 +924,7 @@ SHELL[unexport] = "1" TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH').replace("_", "-")}" # Set a default umask to use for tasks for determinism -BB_DEFAULT_UMASK = "022" +BB_DEFAULT_UMASK ??= "022" # Complete output from bitbake BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log" From patchwork Wed Sep 7 14:20:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12430 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 086C4C38145 for ; Wed, 7 Sep 2022 14:21:15 +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.web12.8356.1662560445113510708 for ; Wed, 07 Sep 2022 07:21:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=c/iU1bti; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id fv3so8597896pjb.0 for ; Wed, 07 Sep 2022 07:21:14 -0700 (PDT) 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; bh=ju31NVRh00hUomPemkXaZN5Q4dlD15WJQyk+Ldkxp7E=; b=c/iU1btiEDgX4duD6DBQ7Vioe+XPcasfbb7qu8vrGC5UaynW45UNyK60oBPp4BuOTq Zep1DmaU2aptTu+EQz7IU38dwb53JFG5sC3S0Xxfnxtp0KAK9ChfDqBkFxWQMxA7TBJZ chL2kNEYPhiCNm7O+8Um0XZ47xan9xTErrPhyviMW6af41n1gqjKvTUnXwQInUTZQepT 7cvHOWlghbgFDZH+gN633UKS/1PtNFxUVoj3I5jq5L/E0IU+HIZctDgy2fe2Swtef7ho AZvL57xu1wYukepruV1BPcAyPgG6PCaJBmMnoS8180Yj7zsYA7bJDEwqlkfAcLmNRSF4 3GBw== 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; bh=ju31NVRh00hUomPemkXaZN5Q4dlD15WJQyk+Ldkxp7E=; b=Nyu78s4jRFLOnLDjPHsf6VTcQL91VFqBTA/uhCOCz0saZKgQ5NB7wH4gVWMvXG2L5a Hc6wBwCHv3N2zwHRb4/HUetWWro8F25hKMoCl66UE/tL/8kC0ajbT/YObe94q+Gfoyut l4G7cxirm05KCkBGj1GrKZ9vVOlunW6+eZCsY6zLfPM42+00sGzzMDDbRLa2Gl4yPjGT h6EeEDiW2+80OCl7CqumhCdYRKqUs2OnIWSWdBdlChhIrf06zOSraSslCMj/fCwm7fXZ XWVnXsfhuknx0tzRoP3kB6NrVWcunc1yM2++qE9PssiCI7K0MM1GGHqEXknZqK6kwWFb lT1Q== X-Gm-Message-State: ACgBeo1Puq72bV1fIm46h3Dd5B4cs4HbcmIqGsXk9SaCOvooTR+Sjz+v jjGkE6er6o6/st3fjyJimdDgU7S9tuw9R6d0 X-Google-Smtp-Source: AA6agR6gG2iS1e1aZ+2taHOUc805IZeIflPaHx1yDPqzh7LjtYLU8Za4knZ20WtNRLesI8W3JvViOw== X-Received: by 2002:a17:90b:4f91:b0:1cd:3a73:3a5d with SMTP id qe17-20020a17090b4f9100b001cd3a733a5dmr4304342pjb.98.1662560473467; Wed, 07 Sep 2022 07:21:13 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:12 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 16/24] pseudo: Update to include recent upstream minor fixes Date: Wed, 7 Sep 2022 04:20:17 -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 ; Wed, 07 Sep 2022 14:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170411 From: Richard Purdie Pull in some minor fixes: pseudo_util: Silence symlink errors and fix resolution bug ports/linux: Remove build dependency on libattr Minor build fixes pseudo_util: Fix resolving relative paths from "/" Signed-off-by: Richard Purdie (cherry picked from commit c57d0c57d00cdef622dab3bf783a10d52f8d9ffb) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index e7ef6a730c..c34580b4ff 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -13,7 +13,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "2b4b88eb513335b0ece55fe51854693d9b20de35" +SRCREV = "c9670c27ff67ab899007ce749254b16091577e55" S = "${WORKDIR}/git" PV = "1.9.0+git${SRCPV}" From patchwork Wed Sep 7 14:20:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 14286 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: "Steve Sakoman" Subject: [OE-core][kirkstone 17/24] scripts/runqemu.README: fix typos and trailing whitespaces Date: Wed, 7 Sep 2022 04:20:18 -1000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 List-id: To: openembedded-core@lists.openembedded.org From: Ulrich Ölmann Signed-off-by: Ulrich Ölmann Signed-off-by: Richard Purdie (cherry picked from commit 217b00d378f359689613ca4c0666bb2eed040f69) Signed-off-by: Steve Sakoman --- scripts/runqemu.README | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/runqemu.README b/scripts/runqemu.README index da9abd7dfb..e5f4b4634c 100644 --- a/scripts/runqemu.README +++ b/scripts/runqemu.README @@ -1,12 +1,12 @@ Using OE images with QEMU ========================= -OE-Core can generate qemu bootable kernels and images with can be used +OE-Core can generate qemu bootable kernels and images which can be used on a desktop system. The scripts currently support booting ARM, MIPS, PowerPC -and x86 (32 and 64 bit) images. The scripts can be used within the OE build -system or externaly. +and x86 (32 and 64 bit) images. The scripts can be used within the OE build +system or externally. -The runqemu script is run as: +The runqemu script is run as: runqemu @@ -15,13 +15,13 @@ where: is the machine/architecture to use (qemuarm/qemumips/qemuppc/qemux86/qemux86-64) is the path to a kernel (e.g. zimage-qemuarm.bin) is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) or an nfs directory - -If isn't specified, the script will try to detect the machine name + +If isn't specified, the script will try to detect the machine name from the name of the file. If isn't specified, nfs booting will be assumed. -When used within the build system, it will default to qemuarm, ext2 and the last kernel and +When used within the build system, it will default to qemuarm, ext2 and the last kernel and core-image-sato-sdk image built by the build system. If an sdk image isn't present it will look for sato and minimal images. @@ -31,7 +31,7 @@ Full usage instructions can be seen by running the command with no options speci Notes ===== - - The scripts run qemu using sudo. Change perms on /dev/net/tun to + - The scripts run qemu using sudo. Change perms on /dev/net/tun to run as non root. The runqemu-gen-tapdevs script can also be used by root to prepopulate the appropriate network devices. - You can access the host computer at 192.168.7.1 within the image. From patchwork Wed Sep 7 14:20:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12437 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 1514FC54EE9 for ; Wed, 7 Sep 2022 14:21:25 +0000 (UTC) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mx.groups.io with SMTP id smtpd.web09.8331.1662560478505957919 for ; Wed, 07 Sep 2022 07:21:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=YHW25gPR; spf=softfail (domain: sakoman.com, ip: 209.85.214.170, mailfrom: steve@sakoman.com) Received: by mail-pl1-f170.google.com with SMTP id t3so9638668ply.2 for ; Wed, 07 Sep 2022 07:21:18 -0700 (PDT) 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; bh=IkrBG6XVVeuFhpkpS9fXYi14y2ECmRyqavZqgqfu6s8=; b=YHW25gPRDF6t0iWXEKB3NIjw1UAjAIqbPSq0I1xzuaCmoRrqJGu/OGC27nqP4kp6A2 3hgJrQ3O7BcAgYHsvfk62sS0pxw5gRIGh+WmnNBSxAgfBHMoZQWxsjowPufDI8CqyVgY fp3HHASe+kbmFA/Yz0c1DrFiLGhSnUrth9kh9upf8KSa0FFGLb/qIbYjOd6iiAHaf8Bx aLuL1osHsGwgbA1X8xhOUSTsyAQH+VeP4RNWguqlB4g4GnNu2+l8sF0ZmGb/3yjDGngo +ceDTp8y4wRXU7h1/KKe2CjLZbKJw/cTDMLypQ7ly3F/Dr0izQc0OLTEYcG71g0Rhoc1 rtKg== 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; bh=IkrBG6XVVeuFhpkpS9fXYi14y2ECmRyqavZqgqfu6s8=; b=rEmCWt5B+DNcTx6p/hRgSsVM+VyfkDPaI9pISMts/FvDjeVHPnQU5M+uL/zsbvWcR8 ks9gUmJUcwemWP6m7c1XWvbOB5Qkh5Caawubr1aUOqyVf96ATNhR0sjA4lqM3CD1Prrc d+gZG4FXK110DDNtkYqgc5jVpZeMkUdRjOntzmsXcgK2n+enhrk4nSjcH2o1NQ1NtkUY fiNE+OxioMtCLvi8r0cMbT1gqCbLsCxW8YqvcVCT1xEmbnYnQd/kdBJNeJz9Pdt21amh 7MCIK/HHcibi4ySGCkSAlxYqq4ZtgmtliwOZDq8Eoz9V5UjLBEGudpFK677k+ClzBr1J Ja4A== X-Gm-Message-State: ACgBeo2umNeWF7A4JZW4nDeZCTMgRzWg38YhcYkFPkh9bPyuuWlLCkaP s7oHo2PooSo+jJuJTUxFlWOEtco/PN554rpm X-Google-Smtp-Source: AA6agR6HJTBW4J8W9m04I6/B1dZ7g9m5h1Iqk8cJexgLN3xlNquZld/xoikCTiiG3Uka4KxKiDIf7Q== X-Received: by 2002:a17:90b:2745:b0:1fb:1666:80f6 with SMTP id qi5-20020a17090b274500b001fb166680f6mr30700735pjb.103.1662560477468; Wed, 07 Sep 2022 07:21:17 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:16 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 18/24] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE Date: Wed, 7 Sep 2022 04:20:19 -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 ; Wed, 07 Sep 2022 14:21:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170413 From: Ming Liu Sometimes an end user might want to choose another kernel type argument for uboot-mkimage other than "kernel", for instance: "kernel_noload". Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that, and it could be used by BSP layers as well. (From OE-Core rev: e288686e97de1265eeeaf452141e1473867efb1b) Signed-off-by: Ming Liu Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 4eb7bbcc2f08b25387a15b7e4a89ef199783c973) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/classes/kernel-fitimage.bbclass | 2 +- meta/classes/kernel-uboot.bbclass | 3 +++ meta/classes/kernel-uimage.bbclass | 2 +- meta/lib/oeqa/selftest/cases/fitimage.py | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 56d71ba8fa..7b16633f6f 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass @@ -148,7 +148,7 @@ fitimage_emit_section_kernel() { kernel-$2 { description = "Linux kernel"; data = /incbin/("$3"); - type = "kernel"; + type = "${UBOOT_MKIMAGE_KERNEL_TYPE}"; arch = "${UBOOT_ARCH}"; os = "linux"; compression = "$4"; diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass index 2facade818..1bc98e042d 100644 --- a/meta/classes/kernel-uboot.bbclass +++ b/meta/classes/kernel-uboot.bbclass @@ -2,6 +2,9 @@ FIT_KERNEL_COMP_ALG ?= "gzip" FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz" +# Kernel image type passed to mkimage (i.e. kernel kernel_noload...) +UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel" + uboot_prep_kimage() { if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass index cedb4fa070..2e661ea916 100644 --- a/meta/classes/kernel-uimage.bbclass +++ b/meta/classes/kernel-uimage.bbclass @@ -30,6 +30,6 @@ do_uboot_mkimage() { awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'` fi - uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T ${UBOOT_MKIMAGE_KERNEL_TYPE} -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage rm -f linux.bin } diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index e6bfd1257e..d732a9020d 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -738,6 +738,7 @@ UBOOT_LOADADDRESS = "0x80000000" UBOOT_DTB_LOADADDRESS = "0x82000000" UBOOT_ARCH = "arm" UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" +UBOOT_MKIMAGE_KERNEL_TYPE = "kernel" UBOOT_EXTLINUX = "0" FIT_GENERATE_KEYS = "1" KERNEL_IMAGETYPE_REPLACEMENT = "zImage" @@ -763,6 +764,7 @@ FIT_HASH_ALG = "sha256" kernel_load = str(get_bb_var('UBOOT_LOADADDRESS')) kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT')) + kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE')) kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG')) uboot_arch = str(get_bb_var('UBOOT_ARCH')) fit_hash_alg = str(get_bb_var('FIT_HASH_ALG')) @@ -775,7 +777,7 @@ FIT_HASH_ALG = "sha256" 'kernel-1 {', 'description = "Linux kernel";', 'data = /incbin/("linux.bin");', - 'type = "kernel";', + 'type = "' + kernel_type + '";', 'arch = "' + uboot_arch + '";', 'os = "linux";', 'compression = "' + kernel_compression + '";', From patchwork Wed Sep 7 14:20:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12435 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 0EB15C6FA86 for ; Wed, 7 Sep 2022 14:21:25 +0000 (UTC) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web08.8313.1662560480542369219 for ; Wed, 07 Sep 2022 07:21:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=V9OADsv4; spf=softfail (domain: sakoman.com, ip: 209.85.215.172, mailfrom: steve@sakoman.com) Received: by mail-pg1-f172.google.com with SMTP id t65so2790656pgt.2 for ; Wed, 07 Sep 2022 07:21:20 -0700 (PDT) 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; bh=jPWTSis9XRvhbQi46NfqjdA0WRA+3NWizthB9iyUxCc=; b=V9OADsv4ym7vq0y8yVJrLLMxpcAMyhgGwKgp22nPQmuy5XbFJmb3CsBNDsHbxgyHx3 O07J8QEIXc05LQUlbeWn4QDvrO7TddgF7IG1juhSlBxpQ6pI2RYINeAvql9IpRBRFwJZ PRmHEUOotcV0C+4DeJvXvxT+XxAcPGvn9vxAgKeNxxE5Pxrl8DWH9faLBKnQzLrrEhsU 1CvdsQdOjUXV7BCxzmEbDUrCPuSWuTd7ImDciBk2m8pJVRsP41r7NI04CulK+kLZmzfS u5KJbVE7quEBd5R5l1Hzfy9ICea5Llp3K+05DjO7QhtQ3SaUCXSjGV1+jgH6QYfVbw72 AsZQ== 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; bh=jPWTSis9XRvhbQi46NfqjdA0WRA+3NWizthB9iyUxCc=; b=NuERRsS+x6CXALNuNekFY9l25w3l++PmAmLZpr+jEhquzeqDB5vExcnR8WBwFWTMFe Idtqd+Z+XfmGoPajZRyZmisNS8lyjme79SIXvWTtSiMnn7D5xRGHDhKTyBSxd7vX7+TN l7sitKPcfmCRScyk+7p67CL4pxF7ie6PlGwHXt/c2w1qZ4jfgucogR7uBCKzkaseTLYv Ivgv8Mh96NAA4/yhw3EM+aE47sXY4s4P1DDcZ1zRd0C2uktSlJRwEGyF5OfrUeewMs0c n2EzB7NJ8Vz09JatbjwPGN5c8zDlB72dpWcTEKZRMVOUWvkvKH9L23DnL/rDw4bF6LRk K+HA== X-Gm-Message-State: ACgBeo3URRTPa8M6S1+IVXKCcQrU+jRoZi7T0qlm52JvrRRcrNiJUsIw 0ikeXOw34PzZ8WBY0Qdu0cOKXpIm05T85SQp X-Google-Smtp-Source: AA6agR7MqKc0SVDdDK3eFvvmFPyTy8kEITVNIZNW8Luie3Yn99qZp+uc2whaV3JV00sUYaJVfWhBXg== X-Received: by 2002:a05:6a00:1c69:b0:53e:a212:2b0b with SMTP id s41-20020a056a001c6900b0053ea2122b0bmr321509pfw.30.1662560479582; Wed, 07 Sep 2022 07:21:19 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:18 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 19/24] kernel-fitimage.bbclass: add padding algorithm property in config nodes Date: Wed, 7 Sep 2022 04:20:20 -1000 Message-Id: <149f61eef11b2e1e20aabed7054df237272ad7f4.1662559557.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 ; Wed, 07 Sep 2022 14:21:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170414 From: LUIS ENRIQUEZ This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss. Signed-off-by: LUIS ENRIQUEZ Signed-off-by: Alexandre Belloni (cherry picked from commit 29d5336c728b28890bbaadebf0ccff00ad90a64d) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/classes/kernel-fitimage.bbclass | 2 ++ meta/classes/uboot-sign.bbclass | 3 +++ 2 files changed, 5 insertions(+) diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 7b16633f6f..983392c23a 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass @@ -346,6 +346,7 @@ fitimage_emit_section_config() { conf_csum="${FIT_HASH_ALG}" conf_sign_algo="${FIT_SIGN_ALG}" + conf_padding_algo="${FIT_PAD_ALG}" if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" fi @@ -465,6 +466,7 @@ EOF signature-1 { algo = "$conf_csum,$conf_sign_algo"; key-name-hint = "$conf_sign_keyname"; + padding = "$conf_padding_algo"; $sign_line }; EOF diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass index 31ffe1f472..eecdec9160 100644 --- a/meta/classes/uboot-sign.bbclass +++ b/meta/classes/uboot-sign.bbclass @@ -73,6 +73,9 @@ UBOOT_FIT_HASH_ALG ?= "sha256" FIT_SIGN_ALG ?= "rsa2048" UBOOT_FIT_SIGN_ALG ?= "rsa2048" +# Kernel / U-Boot fitImage Padding Algo +FIT_PAD_ALG ?= "pkcs-1.5" + # Generate keys for signing Kernel / U-Boot fitImage FIT_GENERATE_KEYS ?= "0" UBOOT_FIT_GENERATE_KEYS ?= "0" From patchwork Wed Sep 7 14:20:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12436 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 0DE40C38145 for ; Wed, 7 Sep 2022 14:21:25 +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.web12.8356.1662560445113510708 for ; Wed, 07 Sep 2022 07:21:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=WYyVPyrb; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id fv3so8598287pjb.0 for ; Wed, 07 Sep 2022 07:21:22 -0700 (PDT) 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; bh=z1T3JNdMO4gz0n5/kHOtKJCw54dQ/OtyMzg5deH//F0=; b=WYyVPyrb3cTvTTkpC/kC68PiIj+qixc6fiLCv6ignAyH8hc+wV+jh6fRGZok77SoCk a1XsFyt4BdhFASbtbzeSzVLSQPvft025NP1QwsPxaxh+TPq6iuRODcwaZkCN/CMr8zwE q6Ysa2d1GL51LTxmhPytLCv7bVqgU3WfQgn1RmRFnkesKkh/FWamaqkJtGFxFyRinLmp rKU4TN//+210AMmgNCt8+p6vMMkGKyEPCqtcavciOgkwXLfEyPSpPLsY/ntb99Fufp7D F1X1ei+E7V/yLFPizW2uI8WF6RcVYQYJSQH6GNTO6Miu07/i3DKNd7osN1CYNAET3P2m QEhQ== 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; bh=z1T3JNdMO4gz0n5/kHOtKJCw54dQ/OtyMzg5deH//F0=; b=aQy/hjdHQNZK35qwY/0thdyBzvPOxV8t4phHC0xX6+ypHq8RD8JQMt7OOS8o3M9ggY MbBUJVUAsRr47+5IW2x+gs0OeAg+dcTytYa5yP0pzZZJJfp9aGgR8rudDsGRW7G6n0Zz K0lKJwhjVpUCaP4M9DlBnWQ6BlQFPja8tpV6JQ7KNtJ8W3KfCyeLb6Bh05sU5qc10f8E Zi40o7PWy8TN5GQsaJYNQHBEYUrJX27zCjN8bi3XR/YuB58v2o0PMbwlQveMLjNyWsrF XnyQopRVO457SoXl0YGxlOH3TLcM8KA0hSO8wBG+eAVt3yb3d54owk7IYN3aGe3Iz9lW U9yA== X-Gm-Message-State: ACgBeo34sPRRF48FA6pw9ZjxL0BMkXDNuSZVEJDx6/soBHAi41knjS+c MmhfMOroRoRet9u1kUMqn3BNpXtoSsmBrgeA X-Google-Smtp-Source: AA6agR4aPVBg473RGH9fvPNr99fFjT1CqenPwF0c86K8D3cryjwt47NsfOZ006sL/oqY0xs4sQ1Qsg== X-Received: by 2002:a17:902:720c:b0:172:a1ff:8c21 with SMTP id ba12-20020a170902720c00b00172a1ff8c21mr4181730plb.159.1662560481680; Wed, 07 Sep 2022 07:21:21 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:21 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 20/24] npm: replace 'npm pack' call by 'tar czf' Date: Wed, 7 Sep 2022 04:20:21 -1000 Message-Id: <8a83fbca45a74c30265168767a716e1a272df89b.1662559557.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 ; Wed, 07 Sep 2022 14:21:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170415 From: Enrico Scholz 'npm pack' is a maintainer tool which tries to execute 'prepare' and similar scripts. This fails usually in OE because it requires completely installed 'node_modules'. Earlier nodejs versions supported an undocumented 'ignore-scripts' option. This has been removed in nodejs 16. We could patch 'package.json' and remove the unwanted scripts. But this might complicate local workflows (applying patches) and installed packages will contain the modified 'package.json'. Instead of, package it manually by 'tar czf'. As a sideeffect, 'do_configure' is running much faster now. Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie (cherry picked from commit 68b480d64ffb6750699cc8fa00d2ac0bc6a2e58a) Signed-off-by: Steve Sakoman --- meta/classes/npm.bbclass | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index ba50fcac20..91f8f36b0d 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -57,13 +57,36 @@ def npm_global_configs(d): configs.append(("cache", d.getVar("NPM_CACHE"))) return configs +## 'npm pack' runs 'prepare' and 'prepack' scripts. Support for +## 'ignore-scripts' which prevents this behavior has been removed +## from nodejs 16. Use simple 'tar' instead of. def npm_pack(env, srcdir, workdir): - """Run 'npm pack' on a specified directory""" - import shlex - cmd = "npm pack %s" % shlex.quote(srcdir) - args = [("ignore-scripts", "true")] - tarball = env.run(cmd, args=args, workdir=workdir).strip("\n") - return os.path.join(workdir, tarball) + """Emulate 'npm pack' on a specified directory""" + import subprocess + import os + import json + + src = os.path.join(srcdir, 'package.json') + with open(src) as f: + j = json.load(f) + + # base does not really matter and is for documentation purposes + # only. But the 'version' part must exist because other parts of + # the bbclass rely on it. + base = j['name'].split('/')[-1] + tarball = os.path.join(workdir, "%s-%s.tgz" % (base, j['version'])); + + # TODO: real 'npm pack' does not include directories while 'tar' + # does. But this does not seem to matter... + subprocess.run(['tar', 'czf', tarball, + '--exclude', './node-modules', + '--exclude-vcs', + '--transform', 's,^\./,package/,', + '--mtime', '1985-10-26T08:15:00.000Z', + '.'], + check = True, cwd = srcdir) + + return tarball python npm_do_configure() { """ From patchwork Wed Sep 7 14:20:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12440 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 14F24C54EE9 for ; Wed, 7 Sep 2022 14:21:35 +0000 (UTC) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mx.groups.io with SMTP id smtpd.web11.8219.1662560486374444602 for ; Wed, 07 Sep 2022 07:21:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=GA7csQJL; spf=softfail (domain: sakoman.com, ip: 209.85.215.173, mailfrom: steve@sakoman.com) Received: by mail-pg1-f173.google.com with SMTP id s206so13739593pgs.3 for ; Wed, 07 Sep 2022 07:21:26 -0700 (PDT) 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; bh=tk+Bhq6O5XWtHWn07voD88OoQkYwPLO76jFl3H0DtCc=; b=GA7csQJLiuljODzcM3utazIFD8QtKSKl/LmK6u1v4lPP6k8UjkA7x4+hEXq2S6CfqU Qve5MkrDTy0cUO4rlqujOvxz1XTILEeHUZx3tpRF9pU+EAD5kpwu09pkNHgnsbxV3mjO qj9+EdP3VkKHRDSzuuwg1suNJRQP1N4BOmPicL8f5WqP1yyHt5W/FoMlOoSuMHf1us9F VkCutujC13rWEtPgoihpbRvcwPPIhMptrcEtIMQua9jtnCxFMS972+o+JL4Y9XN44KUf 9Utrzx148XIdr0jp9XaDpeCNl0Ux6EBMasuAaqWu5ij8/uv1VFPm8JljjeHEy41xsa8H HX0g== 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; bh=tk+Bhq6O5XWtHWn07voD88OoQkYwPLO76jFl3H0DtCc=; b=LwlRdCyBzwN7gUdhRgdV78OYBfsy4atW0oCuUe6OFqRHgodUSXnhNTt88igbjY+LrB FBbb0R5d32L8w04HUQnjJ+m4t9JUDb6Vdv+mx9e7vvwOmkrBNnY1wCNGzNVwmINoRx5j oYEA4UCOkO3tKNR9w41laM8z0Bl/BO1KCtLoA5+jTweesuxXNDzT8jyqB5E/x8y8tZiz rLf6mETyK+bd1sj0sDX6aOhUQ/gLJXFh536GT3Nz1ZHTHi7GLnKQ+4YaTfnOlT3SOkMr OpJCEaUE21lpIl8gBFUDUbta7i0pS/yV03DQElIIA4ulTi+hkPfivkIYI1D06CkZL8cR MFyg== X-Gm-Message-State: ACgBeo0JU4IDyFFLQudXnDESY/r00oYDVueELieWeSsD7TkbqRmAbAex ASvHYMJD+lEE86jobJbqigAW9AUxfB03Q5Lb X-Google-Smtp-Source: AA6agR4HnqCq7aNyXroGRiX+6cgGvjaPVAWqJ+rAFgCIpCNBPcE1MmxW+h3qISA7XgakK22UVyU6NA== X-Received: by 2002:a05:6a00:2393:b0:53a:c7a3:16f3 with SMTP id f19-20020a056a00239300b0053ac7a316f3mr4006082pfc.17.1662560485420; Wed, 07 Sep 2022 07:21:25 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:24 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 21/24] npm: return content of 'package.json' in 'npm_pack' Date: Wed, 7 Sep 2022 04:20:22 -1000 Message-Id: <2f5c53745b4420dac9198ec013c6653b3e339a6b.1662559557.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 ; Wed, 07 Sep 2022 14:21:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170416 From: Enrico Scholz We have to read 'package.json' to calculate the name of the tarball. This content is interesting for later patches. Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie (cherry picked from commit d67367e389c492ae90f9021066d6a4d5ebcf68e5) Signed-off-by: Steve Sakoman --- meta/classes/npm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 91f8f36b0d..014f793450 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -86,7 +86,7 @@ def npm_pack(env, srcdir, workdir): '.'], check = True, cwd = srcdir) - return tarball + return (tarball, j) python npm_do_configure() { """ @@ -186,7 +186,7 @@ python npm_do_configure() { with tempfile.TemporaryDirectory() as tmpdir: # Add the dependency to the npm cache destdir = os.path.join(d.getVar("S"), destsuffix) - tarball = npm_pack(env, destdir, tmpdir) + (tarball, pkg) = npm_pack(env, destdir, tmpdir) _npm_cache_add(tarball) # Add its signature to the cached shrinkwrap dep = _npmsw_dependency_dict(cached_shrinkwrap, deptree) @@ -207,7 +207,7 @@ python npm_do_configure() { # Configure the main package with tempfile.TemporaryDirectory() as tmpdir: - tarball = npm_pack(env, d.getVar("S"), tmpdir) + (tarball, _) = npm_pack(env, d.getVar("S"), tmpdir) npm_unpack(tarball, d.getVar("NPM_PACKAGE"), d) # Configure the cached manifest file and cached shrinkwrap file @@ -280,7 +280,7 @@ python npm_do_compile() { args.append(("build-from-source", "true")) # Pack and install the main package - tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) + (tarball, _) = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) cmd = "npm install %s %s" % (shlex.quote(tarball), d.getVar("EXTRA_OENPM")) env.run(cmd, args=args) } From patchwork Wed Sep 7 14:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12441 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 1B600C6FA8A for ; Wed, 7 Sep 2022 14:21:35 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web09.8334.1662560488595025869 for ; Wed, 07 Sep 2022 07:21:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=i23MqRNG; spf=softfail (domain: sakoman.com, ip: 209.85.210.175, mailfrom: steve@sakoman.com) Received: by mail-pf1-f175.google.com with SMTP id y136so9845557pfb.3 for ; Wed, 07 Sep 2022 07:21:28 -0700 (PDT) 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; bh=pzFnDsckVK9zeMjU5yxJI5KqJpdkLmejGLZl0W5jw0s=; b=i23MqRNGq2HF3uZvl//iEQ8mGoTXCKZBYVT92b31IhjWIucVCpmf6377HoRqRYYBpW H/rGxLiaij4Gr3M3LwANhWHEba7c5TH6/UWzWpW/V86NDldAjgBeAGTy9x0G4m/Tb7zL gQIUKoAs6DHe6jlp6KHVr2GD9V2dcRH7zMpYyOfEKFKWf7gmfZ1+3ffbRBmjj0MAn7xx hDI0ixvCr80ee9Bp2FxzXYsgkNa8w2W+r17hG48WOCZwjF5Oyp0UUGHn7L4QxkpS3BBO 4Mx4nL9hjx9YSZVqS51hbpF6JwVQxhmIzOjsURqvvmRTKK/b249F2rv3gCCBXr17Cfo3 7gwg== 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; bh=pzFnDsckVK9zeMjU5yxJI5KqJpdkLmejGLZl0W5jw0s=; b=Q3rvsZpP0fSOsimbrUNKWkcplRBW5rI0QQuG8RegWTyJIVNn9uYfMgkNNBKWIeKD1N aH4k9VA4boFv58g63s1zR53jheHw+4Wu5RunnPY4Ig/d+HeBWYV6Xjy9EF4cguEvnbVW j7jDk6jT/zabvF1Ni5WbKY6qcxyh9Fnx76YsFpf2YFypA1sDa1SZXgP1/35ZJB8Pfsoz A1wopwFyNa6xhXaVgKNfHJM0cSgsOXwICzuhPZ9Z0T2kGECEIkdyixWaRCM+Y3Y+kfog FQXVnTXTgSKCav7+DKeHBK3t5aEKb4+itP9vzmaMkURDOWepWNnbyR3T8mEnXa+SXE6q 0Cvw== X-Gm-Message-State: ACgBeo22GSGKWqeW8dsoWYC14YtflYGIAKhbjvz29nK2//9nxisamV8d 8gPReWrQ4dKNwMuxvlFJFxk+1eaFOEx6vcl0 X-Google-Smtp-Source: AA6agR4tTj+EtaeIRU8BKcEAP5fehwNWMgLO1dfe3WRR2dWGt8Ph0zuQfe3gyXM7dHxJt2EiBhp02A== X-Received: by 2002:a62:1b12:0:b0:536:715c:4d96 with SMTP id b18-20020a621b12000000b00536715c4d96mr4080422pfb.77.1662560487595; Wed, 07 Sep 2022 07:21:27 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:27 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 22/24] npm: take 'version' directly from 'package.json' Date: Wed, 7 Sep 2022 04:20:23 -1000 Message-Id: <81ad70619017570779adbc1ca928b2412ad9bce7.1662559557.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 ; Wed, 07 Sep 2022 14:21:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170417 From: Enrico Scholz We know the content of 'package.json' from earlier patches; there is no need to parse the tarball name to extract the version. Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie (cherry picked from commit f553e528e76f7e3925ed1c0950d96e73aec37da9) Signed-off-by: Steve Sakoman --- meta/classes/npm.bbclass | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 014f793450..11c80a738e 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -125,11 +125,6 @@ python npm_do_configure() { sha512 = bb.utils.sha512_file(tarball) return "sha512-" + base64.b64encode(bytes.fromhex(sha512)).decode() - def _npm_version(tarball): - """Return the version of a specified tarball""" - regex = r"-(\d+\.\d+\.\d+(-.*)?(\+.*)?)\.tgz" - return re.search(regex, tarball).group(1) - def _npmsw_dependency_dict(orig, deptree): """ Return the sub dictionary in the 'orig' dictionary corresponding to the @@ -190,7 +185,7 @@ python npm_do_configure() { _npm_cache_add(tarball) # Add its signature to the cached shrinkwrap dep = _npmsw_dependency_dict(cached_shrinkwrap, deptree) - dep["version"] = _npm_version(tarball) + dep["version"] = pkg['version'] dep["integrity"] = _npm_integrity(tarball) if params.get("dev", False): dep["dev"] = True From patchwork Wed Sep 7 14:20:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12438 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 10C79C6FA86 for ; Wed, 7 Sep 2022 14:21:35 +0000 (UTC) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mx.groups.io with SMTP id smtpd.web09.8331.1662560478505957919 for ; Wed, 07 Sep 2022 07:21:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=nKkDOsen; spf=softfail (domain: sakoman.com, ip: 209.85.214.170, mailfrom: steve@sakoman.com) Received: by mail-pl1-f170.google.com with SMTP id t3so9639302ply.2 for ; Wed, 07 Sep 2022 07:21:30 -0700 (PDT) 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; bh=Y8lQU0RF4e1Ve/7ITKpXx3MwmKXzKsM5mAjzDyi/TQY=; b=nKkDOsenvQi+H+d8pFxLts7ZRuYDe9crKqhMoE2VEVAbnyVFbYjYbi/s5EpaIIfgcV pYSYik0V2wwl76O8ge6l0dIbwJkA1PXAKHQsz7ZDaMYVAg+I6OpAdpCh30/SIB/JdY8b l5FvV+l6/CGsHOFZ9aqL9cZcEPT47nncgsX9KM0jHl3MFcBrR66+Vbd8cvSIqc6KcjwA 9CRLruXoHgpDBHA/PwUKELscksj+Djn70L8+AkfYNvEUMlX2lpPAUQ5lUOJWvh9pEeow zZQzqz932iHR6gSBijHHJ2vIhwokMBEFaBAnycLd5BolING9ZLBqkaFTUb7qseEi4HXL 8ucQ== 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; bh=Y8lQU0RF4e1Ve/7ITKpXx3MwmKXzKsM5mAjzDyi/TQY=; b=ik4/FIJ+pBuzzeShEP9sVmdKBxEU9/7MFMIJowTzu34GQYqhy8cvjRezyHQO1joXMN Dmtarw2XvxEiH+hBZdUtcyWAS9699LeQG0JsblMhMzwH8GJHuyPM0uAb/h3dKPDfhYVh imH/0PopfmXcWYRfIUeDX3+ysw357X5dAhiIZErMxWm5+j2NdSkyMV/W25UnYuTS0XNk PhxvTEM1sfnxnnKxjwv/cDIrhQkiewnha/eXFj5D62+Wj9uqcVKX3+53lmg2WPnO7Ob/ w31GJnD90o1rrMNfhs9yAtTod9DeJNxjo1m4tz13EIG5+lYHYzx6MLGncPCptNiooRV0 sTSQ== X-Gm-Message-State: ACgBeo17kFG/xVYLRZR4ec0OwTOC9t976pLVQ1Y+uU7GgOyoF6QyWr1a vpcbxQrZUlG1hN08WgGRVZaVdsSMhKDXMYM/ X-Google-Smtp-Source: AA6agR4x1vDeswPWHBGF4v1nR1My6UzJxFzjgl645cspUB+m/2tKd+7KM57LL8i6EIrd1dbDXOi2vA== X-Received: by 2002:a17:902:7d86:b0:176:a6eb:1758 with SMTP id a6-20020a1709027d8600b00176a6eb1758mr4316575plm.90.1662560489492; Wed, 07 Sep 2022 07:21:29 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:29 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 23/24] lib:npm_registry: initial checkin Date: Wed, 7 Sep 2022 04:20:24 -1000 Message-Id: <17132402031f4659db5cc1f84263278b82b27ffa.1662559557.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 ; Wed, 07 Sep 2022 14:21:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170418 From: Enrico Scholz Helper module to: - generate meta information from package.json content. This data has a format as provided by https://registry.npmjs.org - put this meta information and the corresponding tarball in the nodejs cache. This uses an external, nodejs version specific helper script (oe-npm-cache) shipped in oe-meta To avoid further nodejs version dependencies, future versions of this module might omit the caching completely and serve meta information and tarball by an http server. Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie (cherry picked from commit 6cd5886ad05fee704e8a5892bd370c360c8c3b54) Signed-off-by: Steve Sakoman --- meta/lib/oe/npm_registry.py | 169 ++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 meta/lib/oe/npm_registry.py diff --git a/meta/lib/oe/npm_registry.py b/meta/lib/oe/npm_registry.py new file mode 100644 index 0000000000..96c0affb45 --- /dev/null +++ b/meta/lib/oe/npm_registry.py @@ -0,0 +1,169 @@ +import bb +import json +import subprocess + +_ALWAYS_SAFE = frozenset('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789' + '_.-~') + +MISSING_OK = object() + +REGISTRY = "https://registry.npmjs.org" + +# we can not use urllib.parse here because npm expects lowercase +# hex-chars but urllib generates uppercase ones +def uri_quote(s, safe = '/'): + res = "" + safe_set = set(safe) + for c in s: + if c in _ALWAYS_SAFE or c in safe_set: + res += c + else: + res += '%%%02x' % ord(c) + return res + +class PackageJson: + def __init__(self, spec): + self.__spec = spec + + @property + def name(self): + return self.__spec['name'] + + @property + def version(self): + return self.__spec['version'] + + @property + def empty_manifest(self): + return { + 'name': self.name, + 'description': self.__spec.get('description', ''), + 'versions': {}, + } + + def base_filename(self): + return uri_quote(self.name, safe = '@') + + def as_manifest_entry(self, tarball_uri): + res = {} + + ## NOTE: 'npm install' requires more than basic meta information; + ## e.g. it takes 'bin' from this manifest entry but not the actual + ## 'package.json' + for (idx,dflt) in [('name', None), + ('description', ""), + ('version', None), + ('bin', MISSING_OK), + ('man', MISSING_OK), + ('scripts', MISSING_OK), + ('directories', MISSING_OK), + ('dependencies', MISSING_OK), + ('devDependencies', MISSING_OK), + ('optionalDependencies', MISSING_OK), + ('license', "unknown")]: + if idx in self.__spec: + res[idx] = self.__spec[idx] + elif dflt == MISSING_OK: + pass + elif dflt != None: + res[idx] = dflt + else: + raise Exception("%s-%s: missing key %s" % (self.name, + self.version, + idx)) + + res['dist'] = { + 'tarball': tarball_uri, + } + + return res + +class ManifestImpl: + def __init__(self, base_fname, spec): + self.__base = base_fname + self.__spec = spec + + def load(self): + try: + with open(self.filename, "r") as f: + res = json.load(f) + except IOError: + res = self.__spec.empty_manifest + + return res + + def save(self, meta): + with open(self.filename, "w") as f: + json.dump(meta, f, indent = 2) + + @property + def filename(self): + return self.__base + ".meta" + +class Manifest: + def __init__(self, base_fname, spec): + self.__base = base_fname + self.__spec = spec + self.__lockf = None + self.__impl = None + + def __enter__(self): + self.__lockf = bb.utils.lockfile(self.__base + ".lock") + self.__impl = ManifestImpl(self.__base, self.__spec) + return self.__impl + + def __exit__(self, exc_type, exc_val, exc_tb): + bb.utils.unlockfile(self.__lockf) + +class NpmCache: + def __init__(self, cache): + self.__cache = cache + + @property + def path(self): + return self.__cache + + def run(self, type, key, fname): + subprocess.run(['oe-npm-cache', self.__cache, type, key, fname], + check = True) + +class NpmRegistry: + def __init__(self, path, cache): + self.__path = path + self.__cache = NpmCache(cache + '/_cacache') + bb.utils.mkdirhier(self.__path) + bb.utils.mkdirhier(self.__cache.path) + + @staticmethod + ## This function is critical and must match nodejs expectations + def _meta_uri(spec): + return REGISTRY + '/' + uri_quote(spec.name, safe = '@') + + @staticmethod + ## Exact return value does not matter; just make it look like a + ## usual registry url + def _tarball_uri(spec): + return '%s/%s/-/%s-%s.tgz' % (REGISTRY, + uri_quote(spec.name, safe = '@'), + uri_quote(spec.name, safe = '@/'), + spec.version) + + def add_pkg(self, tarball, pkg_json): + pkg_json = PackageJson(pkg_json) + base = os.path.join(self.__path, pkg_json.base_filename()) + + with Manifest(base, pkg_json) as manifest: + meta = manifest.load() + tarball_uri = self._tarball_uri(pkg_json) + + meta['versions'][pkg_json.version] = pkg_json.as_manifest_entry(tarball_uri) + + manifest.save(meta) + + ## Cache entries are a little bit dependent on the nodejs + ## version; version specific cache implementation must + ## mitigate differences + self.__cache.run('meta', self._meta_uri(pkg_json), manifest.filename); + self.__cache.run('tgz', tarball_uri, tarball); From patchwork Wed Sep 7 14:20:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 12439 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 10C3CC38145 for ; Wed, 7 Sep 2022 14:21:35 +0000 (UTC) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mx.groups.io with SMTP id smtpd.web08.8309.1662560471939568119 for ; Wed, 07 Sep 2022 07:21:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=szMJhshz; spf=softfail (domain: sakoman.com, ip: 209.85.216.43, mailfrom: steve@sakoman.com) Received: by mail-pj1-f43.google.com with SMTP id p1-20020a17090a2d8100b0020040a3f75eso10024957pjd.4 for ; Wed, 07 Sep 2022 07:21:32 -0700 (PDT) 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; bh=/GIO0QsPNYUHwpfZC5pkeVs6z/T/+qWGrRrnPF2MJC8=; b=szMJhshzHirMNpc3FzbwvM7B5qlAA4f7L/tmd8zxZEV/sit+EfiLcVmyusVH8AE3lO IgTQ+DYqedgk4KqJpTDglk8HFnmMOiVNQrbOmb/v0KfKhiC7om7e8pA0yvsLQHfyrv00 7b5IAKrB9LSl0DkcWZ5jwvKk9qoOCsiHjrJj36v8RiMmkaFNNVk7VywCnb2rH6eHHIB7 z1rCVMY4U3GzrtBOlAgJfTl1JhBjD4LrEBoAePUA+yyH5gbE/yGEUOcSekB/jHXw5spb yPscZYjU1lKX5799vcQE/xtb+6P073MfTUiTuxrYkcH31QKc2t4y9cowbuiTskd33cvD 49CQ== 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; bh=/GIO0QsPNYUHwpfZC5pkeVs6z/T/+qWGrRrnPF2MJC8=; b=WYjuqEruOQJjZVQJqXCT6+XqnzJppey0QC1cwjdPswzDeGfbgNvaI9f7xaIF0GBwYZ jRnJqOhu7essz56f8zDM1eUnFC0ZEKZF2dIL5kYtjMeTz1UdT6FfTdPffIqBVea1jN6r RZ4adel139o2wT4KsQCUyfSIzrjKcTflvtn68wntwrmC9CfUHM+6prwUIMg75o5YJT+6 Aq9RjHmE5575VJNMNCixzZV+/mnAcvJOe6Pd5zbXIGBGNidroHcrp5LKqsCSXNUc5rZB LMWBHtyBrz9rtK1REBldZT2r0x4VWyzc/uicCpiMQOBEoFaoMqdHzKzxAaSTKGEgWCKK gi0w== X-Gm-Message-State: ACgBeo1NG7JHutAllapL90a90OPfceMP+qdEidEpyiWZLjwOG/mHl6U9 qqsaflxu0/KUtT7Cyzv4rwwTtmtUYS71twZg X-Google-Smtp-Source: AA6agR7Xy6HIttLnuvyhbMZadMaCU7b+EKLg+67qE0Tl96QhII0YrgkxgmCSS3HEQZ9hhEcMrAcqLg== X-Received: by 2002:a17:902:f68d:b0:172:a34c:ff96 with SMTP id l13-20020a170902f68d00b00172a34cff96mr4282664plg.26.1662560491576; Wed, 07 Sep 2022 07:21:31 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id x13-20020a17090a1f8d00b001f510175984sm14776198pja.41.2022.09.07.07.21.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:21:31 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 24/24] npm: use npm_registry to cache package Date: Wed, 7 Sep 2022 04:20:25 -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 ; Wed, 07 Sep 2022 14:21:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170419 From: Enrico Scholz With nodejs 16, the simple 'npm cache add' approach does not work anymore because its fetcher implementation downloads also meta information from the registry. We have to generate these information and add them to the cache. There is no direct support in 'npm' for task so we have to implement it manually. This implementation consists of a openembedded python module (in oe-core) and a nodejs version specific helper (in oe-meta). Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie (cherry picked from commit 019b9c341d539939098962c228c1fd5c99331312) Signed-off-by: Steve Sakoman --- meta/classes/npm.bbclass | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 11c80a738e..8379c7b988 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -19,7 +19,7 @@ inherit python3native -DEPENDS:prepend = "nodejs-native " +DEPENDS:prepend = "nodejs-native nodejs-oe-cache-native " RDEPENDS:${PN}:append:class-target = " nodejs" EXTRA_OENPM = "" @@ -46,6 +46,7 @@ NPM_ARCH ?= "${@npm_target_arch_map(d.getVar("TARGET_ARCH"))}" NPM_PACKAGE = "${WORKDIR}/npm-package" NPM_CACHE = "${WORKDIR}/npm-cache" NPM_BUILD = "${WORKDIR}/npm-build" +NPM_REGISTRY = "${WORKDIR}/npm-registry" def npm_global_configs(d): """Get the npm global configuration""" @@ -109,16 +110,18 @@ python npm_do_configure() { from bb.fetch2.npm import npm_unpack from bb.fetch2.npmsw import foreach_dependencies from bb.progress import OutOfProgressHandler + from oe.npm_registry import NpmRegistry bb.utils.remove(d.getVar("NPM_CACHE"), recurse=True) bb.utils.remove(d.getVar("NPM_PACKAGE"), recurse=True) env = NpmEnvironment(d, configs=npm_global_configs(d)) + registry = NpmRegistry(d.getVar('NPM_REGISTRY'), d.getVar('NPM_CACHE')) - def _npm_cache_add(tarball): - """Run 'npm cache add' for a specified tarball""" - cmd = "npm cache add %s" % shlex.quote(tarball) - env.run(cmd) + def _npm_cache_add(tarball, pkg): + """Add tarball to local registry and register it in the + cache""" + registry.add_pkg(tarball, pkg) def _npm_integrity(tarball): """Return the npm integrity of a specified tarball""" @@ -182,7 +185,7 @@ python npm_do_configure() { # Add the dependency to the npm cache destdir = os.path.join(d.getVar("S"), destsuffix) (tarball, pkg) = npm_pack(env, destdir, tmpdir) - _npm_cache_add(tarball) + _npm_cache_add(tarball, pkg) # Add its signature to the cached shrinkwrap dep = _npmsw_dependency_dict(cached_shrinkwrap, deptree) dep["version"] = pkg['version']