From patchwork Mon Feb 20 22:20:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19863 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 C881CC61DA3 for ; Mon, 20 Feb 2023 22:20:42 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web10.27666.1676931632661902981 for ; Mon, 20 Feb 2023 14:20:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=S9QBuTxw; spf=softfail (domain: sakoman.com, ip: 209.85.214.172, mailfrom: steve@sakoman.com) Received: by mail-pl1-f172.google.com with SMTP id z2so3139286plf.12 for ; Mon, 20 Feb 2023 14:20:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Zp1vk4kUOmVAEqybZ4ZHyfCcGLaruBZ/AuKsSvRPlQ4=; b=S9QBuTxwHoopQ3V2ZPh0nnHUEwwRiGvKn2uJkGDnb4Ts9nII34ZdOuay6vHuKTswNv 5yjGvED2EfmMfbL5ojg4Eyl2yq/rx6SOiAylBYCEXFAsBAjBEUp478hga/6MdTx09/AA 1ocaSx48fQjyqt1qgG5ekVOoC+7/SisbphgYyxqN5zbt9ePDHbXUkLOilAyAPJttmU8z M5Y4sbBkIwnSCJOJnnpuHd8WUN6/Sz9dposlHj0xRvHe98ldX80tBPxiFEN9BK1VQKBr oRw8ejM8AiTFseq/dN3c4PzkATb42LOWUZAy/+Xi6d/gBr3Oqz1qAxjPQMA+6c6+r0V4 4VTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zp1vk4kUOmVAEqybZ4ZHyfCcGLaruBZ/AuKsSvRPlQ4=; b=fYlW6g0rjZ0FIEw4vLXyH3njZ2ppx7tSVggcfgf1NxgHpXvInvAx9KK0m+o7aFZ1qI g9tJzaPKpw0ZXB4tRHl/tscVYpNIeFL2IxFoNc3WjTQ6sRQbTTXRkulwh5DBVrR1u29w Pq7mkS/sLiE0ci5yzerZq/JFAyfONyrwcUX3OVXSQn/U7cxdwf44R/n/Jpg4sgP/jBVf hDm22LuNofg7HkIJV0UT7M3mrn9h0qOYY5J6tp1O4xl2bViYxQtrUizRhFk4txXUnRce QC6Kf12VrNMqe+5AGnNBq6ShvprX57JEeajFjARR9lkwoanmNuRqFdw0VXAB9eSIOBn/ G33A== X-Gm-Message-State: AO0yUKXYMSGpXBaw4SaZumbBWnNL1uG5lavafhWd4pI1Yl1c0ecsdoHy M0xlKtaqvNqZPi/01hWWUJjwHFfSVU3kOpsWizU= X-Google-Smtp-Source: AK7set/ZTgnkh6hVb13FD5oLt5rkIFD7tuHT8438yjpHsDmbjxp4nmiGLUKYgoOz65xYzMryxY02Uw== X-Received: by 2002:a17:903:18d:b0:19a:723a:832f with SMTP id z13-20020a170903018d00b0019a723a832fmr4694454plg.7.1676931631334; Mon, 20 Feb 2023 14:20:31 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:30 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 01/16] qemu: Fix slirp determinism issue Date: Mon, 20 Feb 2023 12:20:08 -1000 Message-Id: X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177461 Add a PACKAGECONFIG option for slirp, defaulting to internal. This avoids the presence of libslirp on the host causing qemu to link against that instead breaking reproducibility and usability of the binary on hosts where the library isn't present. We need to add it to PACKAGECONFIG by default since users do expect slirp to be enabled in the wider community. Note: qemu version 4.2.0 doesn't support an "internal" option for enable-slirp, so use "git" instead which uses the same configure code path, avoids host libslirp contamination and forces use of the qemu internal slirp implementation. Signed-off-by: Richard Purdie (cherry picked from commit 5a9a64132bf5ecac9d611d29751226a466c4a2c1) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb | 2 +- meta/recipes-devtools/qemu/qemu.inc | 2 ++ meta/recipes-devtools/qemu/qemu_4.2.0.bb | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb index d83ee59375..5ae6a37f26 100644 --- a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb +++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb @@ -9,7 +9,7 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native" EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" -PACKAGECONFIG ??= "fdt alsa kvm" +PACKAGECONFIG ??= "fdt alsa kvm slirp" # Handle distros such as CentOS 5 32-bit that do not have kvm support PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index fff2c87780..e9fcb239b4 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -279,6 +279,8 @@ PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" +# version 4.2.0 doesn't have an "internal" option for enable-slirp, so use "git" which uses the same configure code path +PACKAGECONFIG[slirp] = "--enable-slirp=git,--disable-slirp" PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd" PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" diff --git a/meta/recipes-devtools/qemu/qemu_4.2.0.bb b/meta/recipes-devtools/qemu/qemu_4.2.0.bb index f9905e2812..05449afe4e 100644 --- a/meta/recipes-devtools/qemu/qemu_4.2.0.bb +++ b/meta/recipes-devtools/qemu/qemu_4.2.0.bb @@ -24,8 +24,8 @@ do_install_append_class-nativesdk() { } PACKAGECONFIG ??= " \ - fdt sdl kvm \ + fdt sdl kvm slirp \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ " -PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" +PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm slirp" From patchwork Mon Feb 20 22:20:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19866 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 D7ED1C678DB for ; Mon, 20 Feb 2023 22:20:42 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web11.28058.1676931634468030927 for ; Mon, 20 Feb 2023 14:20:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=xLCWv6nV; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id b14-20020a17090a8c8e00b002349579949aso2732454pjo.5 for ; Mon, 20 Feb 2023 14:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bI5hPArnzxHVsTj1xQKLFyc2jY1DoUDDxwbexLAODDI=; b=xLCWv6nVaIdV0jWQZ7xodaX18siIJxXZ8ZBPkZrDlsgNI0XfEGXDLeSklGEWoTz/L5 gVJV9dFu7QziuWqP15yZjd1NGDyzqoMVida2vOSyM/v2InxSVZaMkDOHC90p2bk/O39S 5kr6gA7VK8UAfTX+s9Vrm1VVfjTkWO3pfGs8hZfYNB/GgT8QAIWSKKnBiQtWNvm3N6Ox nGQmKdbRaR4dntUthvYtaE0yjC/HtfT+26B1HU9Crrt06knsdSCt8KcdGyhqItWKlVlZ YUbhCwDNyz89IkRYNm+BQindgSgZZDR8RkwLs8elBFHbvgrhEnuSgYWnoz20poQVBFfH 8S1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bI5hPArnzxHVsTj1xQKLFyc2jY1DoUDDxwbexLAODDI=; b=3DaEV8sbPX4ounKtCgHIQlxm8BeuANRsPoJFbieHgJs4lQ7khkQV7lJQpXbM28wca/ PmNH0y6UWnPveqrX0dlzgB317Y3ac2oSiXcsPSNn7zoW1QXrBg6nwMk9nI5Kl78T+XUZ e7U+evYzGY0RMvweiDAiESDxWCvulj/tPV8jFvWp6z76dFisSvJFhruIo6xF3pPIbt0y i8S7APeddSpIewESFwkccF9iv0m5ipTG+5tlMF6ZhtSeoV671pLAHYhgXLBlSAzfhHR8 VE9V5fEFal7CQi1foHaNB07oiZkiribkDNRhLXpJ++HcXw4sdGCQB1l+oImI6SSv/O4N issA== X-Gm-Message-State: AO0yUKV0Oct5ByBgMaguAoduJjG6X+86fog315eWzmmHJC3Q3RvmCAtU pJyrR5BxcApIP1nB8hVHpsg/K/fECaCS8WFQUCo= X-Google-Smtp-Source: AK7set94p0JxaSojnGXiPzrZdC/8m/xeY9mwnUj7Ux/T2cyyu57Gc7i3oGlsSl0TGQcVmYAnttBjzQ== X-Received: by 2002:a17:902:ecd0:b0:195:e9d4:5380 with SMTP id a16-20020a170902ecd000b00195e9d45380mr3837101plh.56.1676931633176; Mon, 20 Feb 2023 14:20:33 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:32 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 02/16] qemu: fix CVE-2021-3929 nvme DMA reentrancy issue leads to use-after-free Date: Mon, 20 Feb 2023 12:20:09 -1000 Message-Id: <18056190f72eef9a44397cd87d79022dd2a9d4e3.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177462 From: Vivek Kumbhar Signed-off-by: Vivek Kumbhar Signed-off-by: Steve Sakoman --- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2021-3929.patch | 78 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3929.patch diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index e9fcb239b4..36d0b9320f 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -115,6 +115,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3638.patch \ file://CVE-2021-20196.patch \ file://CVE-2021-3507.patch \ + file://CVE-2021-3929.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3929.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3929.patch new file mode 100644 index 0000000000..3df2f8886a --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3929.patch @@ -0,0 +1,78 @@ +From 736b01642d85be832385063f278fe7cd4ffb5221 Mon Sep 17 00:00:00 2001 +From: Klaus Jensen +Date: Fri, 17 Dec 2021 10:44:01 +0100 +Subject: [PATCH] hw/nvme: fix CVE-2021-3929 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the +device itself. This still allows DMA to MMIO regions of other devices +(e.g. doing P2P DMA to the controller memory buffer of another NVMe +device). + +Fixes: CVE-2021-3929 +Reported-by: Qiuhao Li +Reviewed-by: Keith Busch +Reviewed-by: Philippe Mathieu-Daudé +Signed-off-by: Klaus Jensen + +Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/736b01642d85be832385] +CVE: CVE-2021-3929 +Signed-off-by: Vivek Kumbhar +--- + hw/block/nvme.c | 23 +++++++++++++++++++++++ + hw/block/nvme.h | 1 + + 2 files changed, 24 insertions(+) + +diff --git a/hw/block/nvme.c b/hw/block/nvme.c +index 12d82542..e7d0750c 100644 +--- a/hw/block/nvme.c ++++ b/hw/block/nvme.c +@@ -52,8 +52,31 @@ + + static void nvme_process_sq(void *opaque); + ++static inline bool nvme_addr_is_iomem(NvmeCtrl *n, hwaddr addr) ++{ ++ hwaddr hi, lo; ++ ++ /* ++ * The purpose of this check is to guard against invalid "local" access to ++ * the iomem (i.e. controller registers). Thus, we check against the range ++ * covered by the 'bar0' MemoryRegion since that is currently composed of ++ * two subregions (the NVMe "MBAR" and the MSI-X table/pba). Note, however, ++ * that if the device model is ever changed to allow the CMB to be located ++ * in BAR0 as well, then this must be changed. ++ */ ++ lo = n->bar0.addr; ++ hi = lo + int128_get64(n->bar0.size); ++ ++ return addr >= lo && addr < hi; ++} ++ + static void nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size) + { ++ ++ if (nvme_addr_is_iomem(n, addr)) { ++ return NVME_DATA_TRAS_ERROR; ++ } ++ + if (n->cmbsz && addr >= n->ctrl_mem.addr && + addr < (n->ctrl_mem.addr + int128_get64(n->ctrl_mem.size))) { + memcpy(buf, (void *)&n->cmbuf[addr - n->ctrl_mem.addr], size); +diff --git a/hw/block/nvme.h b/hw/block/nvme.h +index 557194ee..5a2b119c 100644 +--- a/hw/block/nvme.h ++++ b/hw/block/nvme.h +@@ -59,6 +59,7 @@ typedef struct NvmeNamespace { + + typedef struct NvmeCtrl { + PCIDevice parent_obj; ++ MemoryRegion bar0; + MemoryRegion iomem; + MemoryRegion ctrl_mem; + NvmeBar bar; +-- +2.30.2 + From patchwork Mon Feb 20 22:20:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19868 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 D9D44C678D5 for ; Mon, 20 Feb 2023 22:20:42 +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.web10.27668.1676931636337738602 for ; Mon, 20 Feb 2023 14:20:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=BdHGt0nm; spf=softfail (domain: sakoman.com, ip: 209.85.216.52, mailfrom: steve@sakoman.com) Received: by mail-pj1-f52.google.com with SMTP id d1-20020a17090a3b0100b00229ca6a4636so3004485pjc.0 for ; Mon, 20 Feb 2023 14:20:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=rqHledPBZOHdUI+rDi994danzU+faEx3RO61ITwTows=; b=BdHGt0nmWbdBNGyCv1TjVqq/Wg5JMc/8VGU3RpDb562w7AhZbKmk8YFxf43teiALH/ xlWss/sGAX34Hk3vBfRn/JoAvkY21LG5iNoc9bGyHSDfAQIyp5Bqk/m8ScTOkbd3cfQg FLfb148UfbyF1xLmCUygoZfi6nRg8gWzBxl+PPEFBISWrkE7HdVljVhtr5/tFE+u9phG kF0ozhDFriGxEC8UwdxhRsWDCxhCAtXpD6Wp5/JeYmS/CoiuFKP857T4tMorfYXHMAM8 q9fUQvm7MjTcrmaSJCrx7RF1MzumyJi+kyCLcw1+BmD4v1Dg2EmZVdknmCa/UfZeTkeF QkHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rqHledPBZOHdUI+rDi994danzU+faEx3RO61ITwTows=; b=0BkJ54CVRHb7oM/rhyieElP0RLQorvQt15aT1T0WKSu7ZgrxgK/EqyNB2BTpZ32agH gVppGhS9NJi1oaMgXvDSCTbM0V8Z/Ps/q26S09M3pCtW3OZIwhM9mxFQBali/P4XEFmH JKznMNJNfsf9enF7cmhzpLbkgXQflyWfeht8e7n2VN8K1RNAWmrjtH3zfzdrtBiIiD2X 6erKTMnqCDtKyYWjcQMOSDlblnmc6KP/al889Hp5MD0W3KMS2l8+aFE5SqL8DzDrDYyF qXFfVh7KOaMMb62jhMkQO+fd3D54v3I13wGHquNkLawtpGtbJQy0XywhnqTGkCREOXlP ne7Q== X-Gm-Message-State: AO0yUKXbyLEoQnWU65SdkFbhy8d+0/quR6jqy5bIZoQyVLUht6PqZYVV fdjRktXT6+O6WXaKpDWOXXJT4cFR8iOXhA0Lu5c= X-Google-Smtp-Source: AK7set9o0Q2MCSRiuqPI7rTcSFziAvp26Eoq+IwBhplrwVrS0NVJtg63XHTNX7ts0kLA9oRP/OoKuQ== X-Received: by 2002:a17:902:e5d1:b0:198:f1c4:dd59 with SMTP id u17-20020a170902e5d100b00198f1c4dd59mr4973495plf.14.1676931635087; Mon, 20 Feb 2023 14:20:35 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:34 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 03/16] sudo: Fix CVE-2023-22809 Date: Mon, 20 Feb 2023 12:20:10 -1000 Message-Id: <186a5ab41927e6be0920e03e743f32ae4477c58e.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177463 From: Omkar Patil Add CVE-2023-22809.patch to fix CVE-2023-22809. Signed-off-by: Omkar Patil Signed-off-by: pawan Signed-off-by: Steve Sakoman --- .../sudo/files/CVE-2023-22809.patch | 113 ++++++++++++++++++ meta/recipes-extended/sudo/sudo_1.8.32.bb | 1 + 2 files changed, 114 insertions(+) create mode 100644 meta/recipes-extended/sudo/files/CVE-2023-22809.patch diff --git a/meta/recipes-extended/sudo/files/CVE-2023-22809.patch b/meta/recipes-extended/sudo/files/CVE-2023-22809.patch new file mode 100644 index 0000000000..6c47eb3e44 --- /dev/null +++ b/meta/recipes-extended/sudo/files/CVE-2023-22809.patch @@ -0,0 +1,113 @@ +Backport of: + +# HG changeset patch +# Parent 7275148cad1f8cd3c350026460acc4d6ad349c3a +sudoedit: do not permit editor arguments to include "--" +We use "--" to separate the editor and arguments from the files to edit. +If the editor arguments include "--", sudo can be tricked into allowing +the user to edit a file not permitted by the security policy. +Thanks to Matthieu Barjole and Victor Cutillas of Synacktiv +(https://synacktiv.com) for finding this bug. + +CVE: CVE-2023-22809 +Upstream-Staus: Backport [http://archive.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.8.31-1ubuntu1.4.debian.tar.xz] +Signed-off-by: Omkar Patil + +--- a/plugins/sudoers/editor.c ++++ b/plugins/sudoers/editor.c +@@ -56,7 +56,7 @@ resolve_editor(const char *ed, size_t ed + const char *cp, *ep, *tmp; + const char *edend = ed + edlen; + struct stat user_editor_sb; +- int nargc; ++ int nargc = 0; + debug_decl(resolve_editor, SUDOERS_DEBUG_UTIL) + + /* +@@ -102,6 +102,21 @@ resolve_editor(const char *ed, size_t ed + free(editor_path); + while (nargc--) + free(nargv[nargc]); ++ free(nargv); ++ debug_return_str(NULL); ++ } ++ ++ /* ++ * We use "--" to separate the editor and arguments from the files ++ * to edit. The editor arguments themselves may not contain "--". ++ */ ++ if (strcmp(nargv[nargc], "--") == 0) { ++ sudo_warnx(U_("ignoring editor: %.*s"), (int)edlen, ed); ++ sudo_warnx("%s", U_("editor arguments may not contain \"--\"")); ++ errno = EINVAL; ++ free(editor_path); ++ while (nargc--) ++ free(nargv[nargc]); + free(nargv); + debug_return_str(NULL); + } +--- a/plugins/sudoers/sudoers.c ++++ b/plugins/sudoers/sudoers.c +@@ -616,20 +616,31 @@ sudoers_policy_main(int argc, char * con + + /* Note: must call audit before uid change. */ + if (ISSET(sudo_mode, MODE_EDIT)) { ++ const char *env_editor = NULL; + int edit_argc; +- const char *env_editor; + + free(safe_cmnd); + safe_cmnd = find_editor(NewArgc - 1, NewArgv + 1, &edit_argc, + &edit_argv, NULL, &env_editor, false); + if (safe_cmnd == NULL) { +- if (errno != ENOENT) ++ switch (errno) { ++ case ENOENT: ++ audit_failure(NewArgc, NewArgv, N_("%s: command not found"), ++ env_editor ? env_editor : def_editor); ++ sudo_warnx(U_("%s: command not found"), ++ env_editor ? env_editor : def_editor); ++ goto bad; ++ case EINVAL: ++ if (def_env_editor && env_editor != NULL) { ++ /* User tried to do something funny with the editor. */ ++ log_warningx(SLOG_NO_STDERR|SLOG_SEND_MAIL, ++ "invalid user-specified editor: %s", env_editor); ++ goto bad; ++ } ++ /* FALLTHROUGH */ ++ default: + goto done; +- audit_failure(NewArgc, NewArgv, N_("%s: command not found"), +- env_editor ? env_editor : def_editor); +- sudo_warnx(U_("%s: command not found"), +- env_editor ? env_editor : def_editor); +- goto bad; ++ } + } + if (audit_success(edit_argc, edit_argv) != 0 && !def_ignore_audit_errors) + goto done; +--- a/plugins/sudoers/visudo.c ++++ b/plugins/sudoers/visudo.c +@@ -308,7 +308,7 @@ static char * + get_editor(int *editor_argc, char ***editor_argv) + { + char *editor_path = NULL, **whitelist = NULL; +- const char *env_editor; ++ const char *env_editor = NULL; + static char *files[] = { "+1", "sudoers" }; + unsigned int whitelist_len = 0; + debug_decl(get_editor, SUDOERS_DEBUG_UTIL) +@@ -342,7 +342,11 @@ get_editor(int *editor_argc, char ***edi + if (editor_path == NULL) { + if (def_env_editor && env_editor != NULL) { + /* We are honoring $EDITOR so this is a fatal error. */ +- sudo_fatalx(U_("specified editor (%s) doesn't exist"), env_editor); ++ if (errno == ENOENT) { ++ sudo_warnx(U_("specified editor (%s) doesn't exist"), ++ env_editor); ++ } ++ exit(EXIT_FAILURE); + } + sudo_fatalx(U_("no editor found (editor path = %s)"), def_editor); + } diff --git a/meta/recipes-extended/sudo/sudo_1.8.32.bb b/meta/recipes-extended/sudo/sudo_1.8.32.bb index 10785beedf..5bc48ec6fa 100644 --- a/meta/recipes-extended/sudo/sudo_1.8.32.bb +++ b/meta/recipes-extended/sudo/sudo_1.8.32.bb @@ -5,6 +5,7 @@ SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ file://0001-Include-sys-types.h-for-id_t-definition.patch \ file://0001-Fix-includes-when-building-with-musl.patch \ file://CVE-2022-43995.patch \ + file://CVE-2023-22809.patch \ " PAM_SRC_URI = "file://sudo.pam" From patchwork Mon Feb 20 22:20:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19867 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 C974FC64ED9 for ; Mon, 20 Feb 2023 22:20:42 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web11.28058.1676931634468030927 for ; Mon, 20 Feb 2023 14:20:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=dQ9JvydY; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id b14-20020a17090a8c8e00b002349579949aso2732575pjo.5 for ; Mon, 20 Feb 2023 14:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fq1TYzzEYRiFzYU85wzJ8iWsE0HjHYzBy5ZFDmmwbzU=; b=dQ9JvydYrpVHV160BTqwtpeBFhOn9YnFcJLxqqTC7tXQDYd3kvIEPmErazEecV28SD tJ7ztSvzieBnhhW4W9dPcyjKy3SZwIDHBXHy15fRBDIZQvzlX4WdvH5IJUJgZtKcZ96J p3/v3KC+Lwty4VPAYFWmwc541YyeHCYwk441FtMI3I1eETq/SBgXqYR+vK3M15MWLaSW NZbHpVZpBL7rR28jwhZ/GGXeC9a37MBzTWszgAJf8h8F7JRbTJah6XDSpLogHIEOSLTd /8IetJSEDp3WBTDURcy1I4Nix9wDbaMT4t5uBQKQIMdYjBXLaHxckEzXnFW18XsBggim cA6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fq1TYzzEYRiFzYU85wzJ8iWsE0HjHYzBy5ZFDmmwbzU=; b=RTJ0I4Lfsgc5lpkFNVp9k2DRRv8GvQG08Kjlmw42tmvRxzkenyhuBydD3n/IIN3YVI eyOPT+DQ8xWmPD/13IVfOC5d5ilQbdB7pSBzDUDxKhAbX/HfXQaUsFGcMihjvhdwQDTw pfFfoBFNMq2BLBv8x9a6ZOuhvAqyzkHkPHP8it+gbWeqt3s0pFc827+NOrIIU3IeAf7T 9pZLP900eHWym4pzEMMYgOcdPbnGEoSZwNRuolLdNoUGt1d07mry5PhUd5WxbqhsJPAv tCBOmCgQ40mZpXgxN20D3OYrf6OtwK6Bz1Tj0Nk2aYGRTVP/4zo2LVSDWcgQ4IT+Z8ci kVpg== X-Gm-Message-State: AO0yUKXoNaDR6yn4ULd9d9Bgl+a0lg861Q6qJSRKK1R8aqKoEETkHAsR 6keNGP4Tov2KxKl56EqIRfM1CuPAKEJlOE8NtcY= X-Google-Smtp-Source: AK7set8IeAVnCS6pxDL9EXeJ+al4Ny3ZacG50wlcutIOL4dcx5JX5Q5s/Wbmbu0k5mZ69QOocXjwfw== X-Received: by 2002:a17:903:28c6:b0:196:780a:ada8 with SMTP id kv6-20020a17090328c600b00196780aada8mr3132631plb.6.1676931637136; Mon, 20 Feb 2023 14:20:37 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:36 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 04/16] git: CVE-2022-23521 gitattributes parsing integer overflow Date: Mon, 20 Feb 2023 12:20:11 -1000 Message-Id: <4f4baa56656291b259b9474a3637cf31f6569ff3.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177464 From: Hitendra Prajapati Backport from: https://github.com/git/git/commit/eb22e7dfa23da6bd9aed9bd1dad69e1e8e167d24 https://github.com/git/git/commit/8d0d48cf2157cfb914db1f53b3fe40785b86f3aa https://github.com/git/git/commit/24557209500e6ed618f04a8795a111a0c491a29c https://github.com/git/git/commit/34ace8bad02bb14ecc5b631f7e3daaa7a9bba7d9 https://github.com/git/git/commit/447ac906e189535e77dcb1f4bbe3f1bc917d4c12 https://github.com/git/git/commit/e1e12e97ac73ded85f7d000da1063a774b3cc14f https://github.com/git/git/commit/a60a66e409c265b2944f18bf43581c146812586d https://github.com/git/git/commit/d74b1fd54fdbc45966d12ea907dece11e072fb2b https://github.com/git/git/commit/dfa6b32b5e599d97448337ed4fc18dd50c90758f https://github.com/git/git/commit/3c50032ff5289cc45659f21949c8d09e52164579 Signed-off-by: Hitendra Prajapati Signed-off-by: Steve Sakoman --- .../git/files/CVE-2022-23521.patch | 367 ++++++++++++++++++ meta/recipes-devtools/git/git.inc | 2 +- 2 files changed, 368 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/git/files/CVE-2022-23521.patch diff --git a/meta/recipes-devtools/git/files/CVE-2022-23521.patch b/meta/recipes-devtools/git/files/CVE-2022-23521.patch new file mode 100644 index 0000000000..974546013d --- /dev/null +++ b/meta/recipes-devtools/git/files/CVE-2022-23521.patch @@ -0,0 +1,367 @@ +From eb22e7dfa23da6bd9aed9bd1dad69e1e8e167d24 Mon Sep 17 00:00:00 2001 +From: Patrick Steinhardt +Date: Thu, 1 Dec 2022 15:45:15 +0100 +Subject: [PATCH] CVE-2022-23521 + +attr: fix overflow when upserting attribute with overly long name + +The function `git_attr_internal()` is called to upsert attributes into +the global map. And while all callers pass a `size_t`, the function +itself accepts an `int` as the attribute name's length. This can lead to +an integer overflow in case the attribute name is longer than `INT_MAX`. + +Now this overflow seems harmless as the first thing we do is to call +`attr_name_valid()`, and that function only succeeds in case all chars +in the range of `namelen` match a certain small set of chars. We thus +can't do an out-of-bounds read as NUL is not part of that set and all +strings passed to this function are NUL-terminated. And furthermore, we +wouldn't ever read past the current attribute name anyway due to the +same reason. And if validation fails we will return early. + +On the other hand it feels fragile to rely on this behaviour, even more +so given that we pass `namelen` to `FLEX_ALLOC_MEM()`. So let's instead +just do the correct thing here and accept a `size_t` as line length. + +Upstream-Status: Backport [https://github.com/git/git/commit/eb22e7dfa23da6bd9aed9bd1dad69e1e8e167d24 &https://github.com/git/git/commit/8d0d48cf2157cfb914db1f53b3fe40785b86f3aa & https://github.com/git/git/commit/24557209500e6ed618f04a8795a111a0c491a29c & https://github.com/git/git/commit/34ace8bad02bb14ecc5b631f7e3daaa7a9bba7d9 & https://github.com/git/git/commit/447ac906e189535e77dcb1f4bbe3f1bc917d4c12 & https://github.com/git/git/commit/e1e12e97ac73ded85f7d000da1063a774b3cc14f & https://github.com/git/git/commit/a60a66e409c265b2944f18bf43581c146812586d & https://github.com/git/git/commit/d74b1fd54fdbc45966d12ea907dece11e072fb2b & https://github.com/git/git/commit/dfa6b32b5e599d97448337ed4fc18dd50c90758f & https://github.com/git/git/commit/3c50032ff5289cc45659f21949c8d09e52164579 + +CVE: CVE-2022-23521 + +Reviewed-by: Sylvain Beucler +Signed-off-by: Patrick Steinhardt +Signed-off-by: Junio C Hamano +Signed-off-by: Hitendra Prajapati +--- + attr.c | 97 +++++++++++++++++++++++++++---------------- + attr.h | 12 ++++++ + t/t0003-attributes.sh | 59 ++++++++++++++++++++++++++ + 3 files changed, 132 insertions(+), 36 deletions(-) + +diff --git a/attr.c b/attr.c +index 11f19b5..63484ab 100644 +--- a/attr.c ++++ b/attr.c +@@ -29,7 +29,7 @@ static const char git_attr__unknown[] = "(builtin)unknown"; + #endif + + struct git_attr { +- int attr_nr; /* unique attribute number */ ++ unsigned int attr_nr; /* unique attribute number */ + char name[FLEX_ARRAY]; /* attribute name */ + }; + +@@ -221,7 +221,7 @@ static void report_invalid_attr(const char *name, size_t len, + * dictionary. If no entry is found, create a new attribute and store it in + * the dictionary. + */ +-static const struct git_attr *git_attr_internal(const char *name, int namelen) ++static const struct git_attr *git_attr_internal(const char *name, size_t namelen) + { + struct git_attr *a; + +@@ -237,8 +237,8 @@ static const struct git_attr *git_attr_internal(const char *name, int namelen) + a->attr_nr = hashmap_get_size(&g_attr_hashmap.map); + + attr_hashmap_add(&g_attr_hashmap, a->name, namelen, a); +- assert(a->attr_nr == +- (hashmap_get_size(&g_attr_hashmap.map) - 1)); ++ if (a->attr_nr != hashmap_get_size(&g_attr_hashmap.map) - 1) ++ die(_("unable to add additional attribute")); + } + + hashmap_unlock(&g_attr_hashmap); +@@ -283,7 +283,7 @@ struct match_attr { + const struct git_attr *attr; + } u; + char is_macro; +- unsigned num_attr; ++ size_t num_attr; + struct attr_state state[FLEX_ARRAY]; + }; + +@@ -300,7 +300,7 @@ static const char *parse_attr(const char *src, int lineno, const char *cp, + struct attr_state *e) + { + const char *ep, *equals; +- int len; ++ size_t len; + + ep = cp + strcspn(cp, blank); + equals = strchr(cp, '='); +@@ -344,8 +344,7 @@ static const char *parse_attr(const char *src, int lineno, const char *cp, + static struct match_attr *parse_attr_line(const char *line, const char *src, + int lineno, int macro_ok) + { +- int namelen; +- int num_attr, i; ++ size_t namelen, num_attr, i; + const char *cp, *name, *states; + struct match_attr *res = NULL; + int is_macro; +@@ -356,6 +355,11 @@ static struct match_attr *parse_attr_line(const char *line, const char *src, + return NULL; + name = cp; + ++ if (strlen(line) >= ATTR_MAX_LINE_LENGTH) { ++ warning(_("ignoring overly long attributes line %d"), lineno); ++ return NULL; ++ } ++ + if (*cp == '"' && !unquote_c_style(&pattern, name, &states)) { + name = pattern.buf; + namelen = pattern.len; +@@ -392,10 +396,9 @@ static struct match_attr *parse_attr_line(const char *line, const char *src, + goto fail_return; + } + +- res = xcalloc(1, +- sizeof(*res) + +- sizeof(struct attr_state) * num_attr + +- (is_macro ? 0 : namelen + 1)); ++ res = xcalloc(1, st_add3(sizeof(*res), ++ st_mult(sizeof(struct attr_state), num_attr), ++ is_macro ? 0 : namelen + 1)); + if (is_macro) { + res->u.attr = git_attr_internal(name, namelen); + } else { +@@ -458,11 +461,12 @@ struct attr_stack { + + static void attr_stack_free(struct attr_stack *e) + { +- int i; ++ unsigned i; + free(e->origin); + for (i = 0; i < e->num_matches; i++) { + struct match_attr *a = e->attrs[i]; +- int j; ++ size_t j; ++ + for (j = 0; j < a->num_attr; j++) { + const char *setto = a->state[j].setto; + if (setto == ATTR__TRUE || +@@ -671,8 +675,8 @@ static void handle_attr_line(struct attr_stack *res, + a = parse_attr_line(line, src, lineno, macro_ok); + if (!a) + return; +- ALLOC_GROW(res->attrs, res->num_matches + 1, res->alloc); +- res->attrs[res->num_matches++] = a; ++ ALLOC_GROW_BY(res->attrs, res->num_matches, 1, res->alloc); ++ res->attrs[res->num_matches - 1] = a; + } + + static struct attr_stack *read_attr_from_array(const char **list) +@@ -711,21 +715,37 @@ void git_attr_set_direction(enum git_attr_direction new_direction) + + static struct attr_stack *read_attr_from_file(const char *path, int macro_ok) + { ++ struct strbuf buf = STRBUF_INIT; + FILE *fp = fopen_or_warn(path, "r"); + struct attr_stack *res; +- char buf[2048]; + int lineno = 0; ++ int fd; ++ struct stat st; + + if (!fp) + return NULL; +- res = xcalloc(1, sizeof(*res)); +- while (fgets(buf, sizeof(buf), fp)) { +- char *bufp = buf; +- if (!lineno) +- skip_utf8_bom(&bufp, strlen(bufp)); +- handle_attr_line(res, bufp, path, ++lineno, macro_ok); ++ ++ fd = fileno(fp); ++ if (fstat(fd, &st)) { ++ warning_errno(_("cannot fstat gitattributes file '%s'"), path); ++ fclose(fp); ++ return NULL; + } ++ if (st.st_size >= ATTR_MAX_FILE_SIZE) { ++ warning(_("ignoring overly large gitattributes file '%s'"), path); ++ fclose(fp); ++ return NULL; ++ } ++ ++ CALLOC_ARRAY(res, 1); ++ while (strbuf_getline(&buf, fp) != EOF) { ++ if (!lineno && starts_with(buf.buf, utf8_bom)) ++ strbuf_remove(&buf, 0, strlen(utf8_bom)); ++ handle_attr_line(res, buf.buf, path, ++lineno, macro_ok); ++ } ++ + fclose(fp); ++ strbuf_release(&buf); + return res; + } + +@@ -736,13 +756,18 @@ static struct attr_stack *read_attr_from_index(const struct index_state *istate, + struct attr_stack *res; + char *buf, *sp; + int lineno = 0; ++ size_t size; + + if (!istate) + return NULL; + +- buf = read_blob_data_from_index(istate, path, NULL); ++ buf = read_blob_data_from_index(istate, path, &size); + if (!buf) + return NULL; ++ if (size >= ATTR_MAX_FILE_SIZE) { ++ warning(_("ignoring overly large gitattributes blob '%s'"), path); ++ return NULL; ++ } + + res = xcalloc(1, sizeof(*res)); + for (sp = buf; *sp; ) { +@@ -1012,12 +1037,12 @@ static int macroexpand_one(struct all_attrs_item *all_attrs, int nr, int rem); + static int fill_one(const char *what, struct all_attrs_item *all_attrs, + const struct match_attr *a, int rem) + { +- int i; ++ size_t i; + +- for (i = a->num_attr - 1; rem > 0 && i >= 0; i--) { +- const struct git_attr *attr = a->state[i].attr; ++ for (i = a->num_attr; rem > 0 && i > 0; i--) { ++ const struct git_attr *attr = a->state[i - 1].attr; + const char **n = &(all_attrs[attr->attr_nr].value); +- const char *v = a->state[i].setto; ++ const char *v = a->state[i - 1].setto; + + if (*n == ATTR__UNKNOWN) { + debug_set(what, +@@ -1036,11 +1061,11 @@ static int fill(const char *path, int pathlen, int basename_offset, + struct all_attrs_item *all_attrs, int rem) + { + for (; rem > 0 && stack; stack = stack->prev) { +- int i; ++ unsigned i; + const char *base = stack->origin ? stack->origin : ""; + +- for (i = stack->num_matches - 1; 0 < rem && 0 <= i; i--) { +- const struct match_attr *a = stack->attrs[i]; ++ for (i = stack->num_matches; 0 < rem && 0 < i; i--) { ++ const struct match_attr *a = stack->attrs[i - 1]; + if (a->is_macro) + continue; + if (path_matches(path, pathlen, basename_offset, +@@ -1071,11 +1096,11 @@ static void determine_macros(struct all_attrs_item *all_attrs, + const struct attr_stack *stack) + { + for (; stack; stack = stack->prev) { +- int i; +- for (i = stack->num_matches - 1; i >= 0; i--) { +- const struct match_attr *ma = stack->attrs[i]; ++ unsigned i; ++ for (i = stack->num_matches; i > 0; i--) { ++ const struct match_attr *ma = stack->attrs[i - 1]; + if (ma->is_macro) { +- int n = ma->u.attr->attr_nr; ++ unsigned int n = ma->u.attr->attr_nr; + if (!all_attrs[n].macro) { + all_attrs[n].macro = ma; + } +@@ -1127,7 +1152,7 @@ void git_check_attr(const struct index_state *istate, + collect_some_attrs(istate, path, check); + + for (i = 0; i < check->nr; i++) { +- size_t n = check->items[i].attr->attr_nr; ++ unsigned int n = check->items[i].attr->attr_nr; + const char *value = check->all_attrs[n].value; + if (value == ATTR__UNKNOWN) + value = ATTR__UNSET; +diff --git a/attr.h b/attr.h +index b0378bf..f424285 100644 +--- a/attr.h ++++ b/attr.h +@@ -1,6 +1,18 @@ + #ifndef ATTR_H + #define ATTR_H + ++/** ++ * The maximum line length for a gitattributes file. If the line exceeds this ++ * length we will ignore it. ++ */ ++#define ATTR_MAX_LINE_LENGTH 2048 ++ ++ /** ++ * The maximum size of the giattributes file. If the file exceeds this size we ++ * will ignore it. ++ */ ++#define ATTR_MAX_FILE_SIZE (100 * 1024 * 1024) ++ + struct index_state; + + /* An attribute is a pointer to this opaque structure */ +diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh +index 71e63d8..556245b 100755 +--- a/t/t0003-attributes.sh ++++ b/t/t0003-attributes.sh +@@ -342,4 +342,63 @@ test_expect_success 'query binary macro directly' ' + test_cmp expect actual + ' + ++test_expect_success 'large attributes line ignored in tree' ' ++ test_when_finished "rm .gitattributes" && ++ printf "path %02043d" 1 >.gitattributes && ++ git check-attr --all path >actual 2>err && ++ echo "warning: ignoring overly long attributes line 1" >expect && ++ test_cmp expect err && ++ test_must_be_empty actual ++' ++ ++test_expect_success 'large attributes line ignores trailing content in tree' ' ++ test_when_finished "rm .gitattributes" && ++ # older versions of Git broke lines at 2048 bytes; the 2045 bytes ++ # of 0-padding here is accounting for the three bytes of "a 1", which ++ # would knock "trailing" to the "next" line, where it would be ++ # erroneously parsed. ++ printf "a %02045dtrailing attribute\n" 1 >.gitattributes && ++ git check-attr --all trailing >actual 2>err && ++ echo "warning: ignoring overly long attributes line 1" >expect && ++ test_cmp expect err && ++ test_must_be_empty actual ++' ++ ++test_expect_success EXPENSIVE 'large attributes file ignored in tree' ' ++ test_when_finished "rm .gitattributes" && ++ dd if=/dev/zero of=.gitattributes bs=101M count=1 2>/dev/null && ++ git check-attr --all path >/dev/null 2>err && ++ echo "warning: ignoring overly large gitattributes file ${SQ}.gitattributes${SQ}" >expect && ++ test_cmp expect err ++' ++ ++test_expect_success 'large attributes line ignored in index' ' ++ test_when_finished "git update-index --remove .gitattributes" && ++ blob=$(printf "path %02043d" 1 | git hash-object -w --stdin) && ++ git update-index --add --cacheinfo 100644,$blob,.gitattributes && ++ git check-attr --cached --all path >actual 2>err && ++ echo "warning: ignoring overly long attributes line 1" >expect && ++ test_cmp expect err && ++ test_must_be_empty actual ++' ++ ++test_expect_success 'large attributes line ignores trailing content in index' ' ++ test_when_finished "git update-index --remove .gitattributes" && ++ blob=$(printf "a %02045dtrailing attribute\n" 1 | git hash-object -w --stdin) && ++ git update-index --add --cacheinfo 100644,$blob,.gitattributes && ++ git check-attr --cached --all trailing >actual 2>err && ++ echo "warning: ignoring overly long attributes line 1" >expect && ++ test_cmp expect err && ++ test_must_be_empty actual ++' ++ ++test_expect_success EXPENSIVE 'large attributes file ignored in index' ' ++ test_when_finished "git update-index --remove .gitattributes" && ++ blob=$(dd if=/dev/zero bs=101M count=1 2>/dev/null | git hash-object -w --stdin) && ++ git update-index --add --cacheinfo 100644,$blob,.gitattributes && ++ git check-attr --cached --all path >/dev/null 2>err && ++ echo "warning: ignoring overly large gitattributes blob ${SQ}.gitattributes${SQ}" >expect && ++ test_cmp expect err ++' ++ + test_done +-- +2.25.1 + diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc index b5d0004712..d707f25456 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git.inc @@ -11,8 +11,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \ file://fixsort.patch \ file://CVE-2021-40330.patch \ + file://CVE-2022-23521.patch \ " - S = "${WORKDIR}/git-${PV}" LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1" From patchwork Mon Feb 20 22:20:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19865 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 CAD56C6379F for ; Mon, 20 Feb 2023 22:20:42 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web11.28059.1676931640156998778 for ; Mon, 20 Feb 2023 14:20:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=3J6utc1N; spf=softfail (domain: sakoman.com, ip: 209.85.214.172, mailfrom: steve@sakoman.com) Received: by mail-pl1-f172.google.com with SMTP id l15so4141971pls.1 for ; Mon, 20 Feb 2023 14:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eRSNfneR24nLphxumZzBxF5ZZ7l46UXilX0lHToNyIQ=; b=3J6utc1N0xLYrUnPex8TQsGHe+Ku5qH0XS4k2moZXhg2PFtokfFLaPLzM/hc0Iyzv8 PflPo/ffoj0mvDz5p5OJs9qQY9voW0xK/FB0kM5tsnUS1mmGcoZLon++hD3RlJFjScT1 fYHKBvnqZRuJnAA6+9TtsADTmdmA+O1b/G3j2VJgDOwZWVUYXefX4ohIpN/89Za9gk7k alYIfxZiwrC/ZGmyHLkrIcMA53iK2NtOIt+X7iS+mK4XCCAvHZ4zQKvYo0hZyeyxDDON mqORjgfNwMslqMSjEZ55NQ8wLsJCv2tWDE1JjE8i2fZcoRKhmEUKuTOp5HAZ52VOriTe TqKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eRSNfneR24nLphxumZzBxF5ZZ7l46UXilX0lHToNyIQ=; b=l5ZRn17GA1DJb/zlnYgUIiEKt2TpSHNrtzJ6FfbenSCZ3HS0qgEt4K0ssegFrfYcNp FSo7E4pBJesr3DGd8fN3uzWbig9DfvZkP9OlFWEWtQA7Rk5fOydojY+hFC37KLXQHc18 knpmGt44RQiOTwg+jlcEsHdaovSfSHqNqY2Kj++qX9PBrTkWXI6zDLHC2RX2WXByC2xU pbyKHhuyQS/B3RjUzd7SVwDabjXCMBSS8/FvTD4/WGkUxA+I6f7QeA2M96MVAPT84Fju eDNmAHsBV95S4JpEacDYSLwf0KgNqZWEY9VMNru1yYHZINVoIf099k9NTW0j7lo9LxtM jB7w== X-Gm-Message-State: AO0yUKXoY0cjh+Z0f3gRjxCsvVE8n/C5MPsHHrbg4FU6nbc/Hnu1ls94 99QP4rNMHCTloANy7ceu94e+UcryGMgK5jQIJw4= X-Google-Smtp-Source: AK7set8OVXB/G71sQdmDd4l41nEtpS3c9p6qaCD9NvcP7Haxp35CQaVYbWX9kbp+1Xnk5t9OV6AmHA== X-Received: by 2002:a17:902:f54a:b0:19a:a647:1891 with SMTP id h10-20020a170902f54a00b0019aa6471891mr5885285plf.67.1676931639112; Mon, 20 Feb 2023 14:20:39 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:38 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 05/16] nativesdk: Handle chown/chgrp calls in nativesdk do_install tasks Date: Mon, 20 Feb 2023 12:20:12 -1000 Message-Id: X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177465 From: Richard Purdie We disable the useradd code for nativesdk targets since we don't support postinstalls or multiple users in those cases. This means any usage of chown/chgrp inside do_install tasks won't work and would have to be conditional. Rather than require all recipes to do that, add intercepts of the calls and map those to root/root user/groups. We can't just ignore them as some calls are used to remove host contamination from the host user ID so they need to be made, just as root. Signed-off-by: Richard Purdie (cherry picked from commit e1f40670c438e33cae87678425de72ca03566888) Signed-off-by: Steve Sakoman --- meta/classes/nativesdk.bbclass | 2 ++ scripts/nativesdk-intercept/chgrp | 27 +++++++++++++++++++++++++++ scripts/nativesdk-intercept/chown | 27 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100755 scripts/nativesdk-intercept/chgrp create mode 100755 scripts/nativesdk-intercept/chown diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index 7f2692c51a..dc5a9756b6 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass @@ -113,3 +113,5 @@ do_packagedata[stamp-extra-info] = "" USE_NLS = "${SDKUSE_NLS}" OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}" + +PATH_prepend = "${COREBASE}/scripts/nativesdk-intercept:" diff --git a/scripts/nativesdk-intercept/chgrp b/scripts/nativesdk-intercept/chgrp new file mode 100755 index 0000000000..30cc417d3a --- /dev/null +++ b/scripts/nativesdk-intercept/chgrp @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +# +# Wrapper around 'chgrp' that redirects to root in all cases + +import os +import shutil +import sys + +# calculate path to the real 'chgrp' +path = os.environ['PATH'] +path = path.replace(os.path.dirname(sys.argv[0]), '') +real_chgrp = shutil.which('chgrp', path=path) + +args = list() + +found = False +for i in sys.argv: + if i.startswith("-"): + args.append(i) + continue + if not found: + args.append("root") + found = True + else: + args.append(i) + +os.execv(real_chgrp, args) diff --git a/scripts/nativesdk-intercept/chown b/scripts/nativesdk-intercept/chown new file mode 100755 index 0000000000..3914b3e384 --- /dev/null +++ b/scripts/nativesdk-intercept/chown @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +# +# Wrapper around 'chown' that redirects to root in all cases + +import os +import shutil +import sys + +# calculate path to the real 'chown' +path = os.environ['PATH'] +path = path.replace(os.path.dirname(sys.argv[0]), '') +real_chown = shutil.which('chown', path=path) + +args = list() + +found = False +for i in sys.argv: + if i.startswith("-"): + args.append(i) + continue + if not found: + args.append("root:root") + found = True + else: + args.append(i) + +os.execv(real_chown, args) From patchwork Mon Feb 20 22:20:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19864 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 D69D7C677F1 for ; Mon, 20 Feb 2023 22:20:42 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web11.28058.1676931634468030927 for ; Mon, 20 Feb 2023 14:20:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=J4S/Sbuw; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id b14-20020a17090a8c8e00b002349579949aso2732670pjo.5 for ; Mon, 20 Feb 2023 14:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=95Ik5+cDxOifQ/8Owt9McQ0F/wzmUTihLozPtc7nhKQ=; b=J4S/SbuwqhLNUzRqzunLHhWMbKu1Xmsie6h+ESAfgk4bBIUSLp00Tw38MPCq8esJUB 7mC8uSeiJ7OqtG+HP84LITIVmcNu0DS5N3Hwsb9pDLGX0Gt89WTelUhyv9iDW5iIx8FR EOqXe1Ql/gHFgcfCYkTPZykY3RCnYqoiMZxUN/HAR5hdQy1INgkrbaxLHWIw1m/E/jIp E3ZJih6c+18t3ryO8rcJE+cWUOgTbUDx+uiTJEmZLejnbtzyaIUUYlPlH6T18GK0KEOh mM1p9V2lQ/HsjcVaPS/tTZiP0oymo+hu6wt0Io1qZBgis4vzY+kzbMEG+tLKevmL1eDt uDNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=95Ik5+cDxOifQ/8Owt9McQ0F/wzmUTihLozPtc7nhKQ=; b=5wZuyILCLD+S3Mqsklywt8Mjbj8SdFUHG4vO/XYqSFOFl2iUUimvdsDefN5PCNxvEv 4+8r9+6Ec9OT8z42hvSlflKLPK8fEwpTEocmmP2/+hPwOHb/OmQXqlrCrrabpu1nTbhT qLGBQqvkktEYxSuBSUxmrXk+MScCcg05md9kx/eTazidpK0JoSq+pOFoB18k+BtMRINX sSQTZK0C0wnZK1xwOjzbXj050oQe7qAdX1zTkpFnmUQ3rLcFpz4bCx9XFqC3II3iRi9W pjAgWh1IsbXDzoW/c4qSmbuN4ain2otpWUBN0RJSz4jNx1FoyUYZ4fQ4q0va2JnAmPvn cnZA== X-Gm-Message-State: AO0yUKWcDWi+/ckgnlBDCMIurcibNyZGWrYEg/lu07V5S0/b/c/0PKpi p+NV81bflYPbWJXHvWp01ign5YsKn2bpRlHDTEo= X-Google-Smtp-Source: AK7set/OWLjw3zc0Y76N8L8bt5xnrxBXo/J8a39mTyj6rFzqtHiZvqX6etZTPCD2PQxceQXckfHDiQ== X-Received: by 2002:a17:903:244c:b0:19a:95ab:6b63 with SMTP id l12-20020a170903244c00b0019a95ab6b63mr2787573pls.66.1676931640934; Mon, 20 Feb 2023 14:20:40 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:40 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 06/16] quilt: fix intermittent failure in faildiff.test Date: Mon, 20 Feb 2023 12:20:13 -1000 Message-Id: <2c9fe8c3bb1cc1883c7bd445d019b2107e85ab2b.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177466 From: Ross Burton This test assumes that if a child process writes one line to stderr and then another line to stdout, and stderr is redirected to stdout, that the order the lines will be read is stable. This isn't the case and occasionally the lines will be read in a different order. Change the test to ignore line ordering. [ YOCTO #14469 ] Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit 1ddbe4d2bd8d8da10dac8a054f130fcd1d242219) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/quilt/quilt.inc | 1 + .../quilt/quilt/faildiff-order.patch | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-devtools/quilt/quilt/faildiff-order.patch diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc index d7ecda7aaa..ad23b8d922 100644 --- a/meta/recipes-devtools/quilt/quilt.inc +++ b/meta/recipes-devtools/quilt/quilt.inc @@ -12,6 +12,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ file://Makefile \ file://test.sh \ file://0001-tests-Allow-different-output-from-mv.patch \ + file://faildiff-order.patch \ " SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch" diff --git a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch new file mode 100644 index 0000000000..40f3c2636a --- /dev/null +++ b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch @@ -0,0 +1,28 @@ +This test assumes that two lines that are output on different streams (stdout +and stderr) will be read in the same order, but thanks to buffering that may not +be the case. + +Change the expected lines to be regexs that each match both expected lines, so +the test always works no matter the actual order the lines are read in. + +Bug filed at https://savannah.nongnu.org/bugs/index.php?63651 to discuss a +proper solution. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/test/faildiff.test b/test/faildiff.test +index 5afb8e3..5f32f71 100644 +--- a/test/faildiff.test ++++ b/test/faildiff.test +@@ -28,8 +28,8 @@ What happens on binary files? + + $ printf "\\003\\000\\001" > test.bin + $ quilt diff -pab --no-index +- >~ (Files|Binary files) a/test\.bin and b/test\.bin differ +- > Diff failed on file 'test.bin', aborting ++ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting) ++ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting) + $ echo %{?} + > 1 + From patchwork Mon Feb 20 22:20:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19869 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 B8839C6379F for ; Mon, 20 Feb 2023 22:20:52 +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.web10.27674.1676931643766749361 for ; Mon, 20 Feb 2023 14:20:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=CRgUgQP1; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id u17so3062988plh.6 for ; Mon, 20 Feb 2023 14:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GXGSp4f/rTrjJ5kWIbKpL8tGIcvDBuOj/JHmbmWINIw=; b=CRgUgQP1jogCP3E2YxG0rHytfw1331RDSzFBHwXcbOfRUGyMJm7Aauyd+RXChXuy/N V8HnYuVfCu4is/wdNLxUeqiNCDQg/qb0egbNc2uybKfZ0aceAIpTOrmVUHQSdjisy35q zQiSBa9AGtUEqovGcb2wBs8O/uZDHOxOtgow5nKWoW1BQeHUIZpKkIip3b4shTrLIL3V gk6iHH+OaboBmH67PZ1BgA1xB1YsUPu0Yq0gDXICScRAET7rmw5Md254wdjIEbfCgksj FSTFGjDgbpsenXhaoMdiyTQ+YmzYucJ9vuTaEbwKA8Y1BQl++G8Cmkldv908q60T8QFq TqxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GXGSp4f/rTrjJ5kWIbKpL8tGIcvDBuOj/JHmbmWINIw=; b=b46IV2RuEmbnB35L1VnZvLlEMGZafk6ggELmA4THtHKguKJFqWiKVA6Y8tYeJw4a/D U/hacHdXXx3Hgvm+XdysaOT3Bxnu7i319RUe12l02HKgjUO9JcFNijU80YMkaJbAyJC7 kU9PsOYy47THdyric1p5SgqU5EbTR6QE0vEiPsi4h9BUcABVSAI3daQfJDZZXjupQrCi 5/Z+6nqaiFcvAo1bI9uZzegYWrR7Zl4LylBnboUSn12Dvgbl5nwiEQF4wI95cMMLJSJM mkGvV7sgA6FAadDRARfHm2/NCB5ZmQmEmbOYC5BIWagLMm6nCw3zt8DK9Yv0ucWehP50 V/yw== X-Gm-Message-State: AO0yUKUkjhpDIRN08N3LznRLUF+BewEanOBXhhSwtU/Ifp9II6gtYTrl a2OBMURTXCn61BYmNQPt8XPRtGAvqzpJqRydo0o= X-Google-Smtp-Source: AK7set8DPlYFNgpWyrlhX7bVHIgs8Lbv+tHZP9rUPdgRg/ELVZmPrqkUXix9aGp48cG1E7y3L+G+VA== X-Received: by 2002:a05:6a20:6a0e:b0:be:b137:9d2d with SMTP id p14-20020a056a206a0e00b000beb1379d2dmr3130964pzk.58.1676931642699; Mon, 20 Feb 2023 14:20:42 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:42 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 07/16] quilt: use upstreamed faildiff.test fix Date: Mon, 20 Feb 2023 12:20:14 -1000 Message-Id: <444494290c349d481a164b865ef97db7f84ffd44.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177467 From: Ross Burton Signed-off-by: Ross Burton Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit 50b81a263187af4452d3b99967bffd01c6ddb476) Signed-off-by: Steve Sakoman --- .../quilt/quilt/faildiff-order.patch | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch index 40f3c2636a..f22065a250 100644 --- a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch +++ b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch @@ -1,28 +1,41 @@ -This test assumes that two lines that are output on different streams (stdout -and stderr) will be read in the same order, but thanks to buffering that may not -be the case. +Upstream-Status: Backport +Signed-off-by: Ross Burton -Change the expected lines to be regexs that each match both expected lines, so -the test always works no matter the actual order the lines are read in. +From 4dfe7f9e702c85243a71e4de267a13e434b6d6c2 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Fri, 20 Jan 2023 12:56:08 +0100 +Subject: [PATCH] test: Fix a race condition -Bug filed at https://savannah.nongnu.org/bugs/index.php?63651 to discuss a -proper solution. +The test suite does not differentiate between stdout and stderr. When +messages are printed to both, the order in which they will reach us +is apparently not guaranteed. Ideally this would be deterministic, but +until then, explicitly test stdout and stderr separately in the test +case itself. Otherwise the test suite fails randomly, which is a pain +for distribution package maintainers. -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton +This fixes bug #63651 reported by Ross Burton: +https://savannah.nongnu.org/bugs/index.php?63651 + +Signed-off-by: Jean Delvare +--- + test/faildiff.test | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/faildiff.test b/test/faildiff.test -index 5afb8e3..5f32f71 100644 +index 5afb8e3..0444c15 100644 --- a/test/faildiff.test +++ b/test/faildiff.test -@@ -28,8 +28,8 @@ What happens on binary files? +@@ -27,8 +27,9 @@ What happens on binary files? + > File test.bin added to patch %{P}test.diff $ printf "\\003\\000\\001" > test.bin - $ quilt diff -pab --no-index -- >~ (Files|Binary files) a/test\.bin and b/test\.bin differ -- > Diff failed on file 'test.bin', aborting -+ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting) -+ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting) +- $ quilt diff -pab --no-index ++ $ quilt diff -pab --no-index 2>/dev/null + >~ (Files|Binary files) a/test\.bin and b/test\.bin differ ++ $ quilt diff -pab --no-index >/dev/null + > Diff failed on file 'test.bin', aborting $ echo %{?} > 1 - +-- +2.34.1 + From patchwork Mon Feb 20 22:20:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19871 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 C63A1C61DA3 for ; Mon, 20 Feb 2023 22:20:52 +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.28065.1676931645562937440 for ; Mon, 20 Feb 2023 14:20:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=pHUDRmP0; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id il18-20020a17090b165200b0023127b2d602so2853294pjb.2 for ; Mon, 20 Feb 2023 14:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KRsIBkNEJehomLcJmmfNfv9YPg+kOMU8tNXZSzBL9cw=; b=pHUDRmP0SjZy+vO2Sh90RTkmnyfQWQYeFnr7eh/BMn/7KPQrUTY9aItpHsuP+lYMh9 F6Lc+u3GGcL0uS7SBAEeNSG14c7SGJDowb5fgejsuEgILRA7Qrt3oVx3i6KQC0sDkgkK oIGtix+s+NE4UwZkyt2wNFR9W0VYL2hXlfy5WLRJEwT0dCHYF55TFUrzQY1PNGr4MnXX LeyIRcDjb2pHYgvHinDZrVXeCevt3/hJzuEdSjZXBRq2niekk2SGIrdqh0pUrXuB7TGu v0XRfbFTyQACZMwfzWp1eyfQp/+hoRnz+Hb8PMuvNJ54DSXL3zlLufmF9G87739apjfC G0IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KRsIBkNEJehomLcJmmfNfv9YPg+kOMU8tNXZSzBL9cw=; b=56uh8Ac7uvlk03XkFDXaoNLXEZ0yBQejBe/YWlyRyHGLyPGffauM5HBRI2LYDOlDPu T2mh6TxdaPYcGD5e/zcBwBgFWxvg6kY8TrpeAz5Wb0Fos4kML2OSda89OOO+2r8dc75M LUkUyIqmkYN1avSFkZfOGMLr0qRuEvxnpXhdP9F7XnxDHhjVfvj+rBoa9ejh4jF7r2Vw 565Q3FAZFH011Fo1Y8TWN2JbK895cgmxwCb6/rTFwYU/VZ5HA/LfvvUKcHXdHq2Z/AOj ArFojHoH8Vg+6sd6h3gYOo7NEmZqZTcXYyMg9+vhF9awKt9JGBX4mqz5XKq7myPeoo4i TkbQ== X-Gm-Message-State: AO0yUKXTLvV2mAKJsda4AP68MUeGuOT7dCd6fTICDtrfbwsfmzvFqh4g MZU0KkuBWRHdpmumsHyJvyznxqeiBd4TPGvkSws= X-Google-Smtp-Source: AK7set/sCtqEHwsoHRs08LfAaumJ5naa9wwkmJ62lcIar3TOznJLfday6DyVIVdTKBm4I1K9BzFpMQ== X-Received: by 2002:a17:902:eccc:b0:19c:387c:bd65 with SMTP id a12-20020a170902eccc00b0019c387cbd65mr3676969plh.10.1676931644512; Mon, 20 Feb 2023 14:20:44 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:44 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 08/16] git: ignore CVE-2022-41953 Date: Mon, 20 Feb 2023 12:20:15 -1000 Message-Id: X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177468 From: Ross Burton This is specific to Git-for-Windows. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit c8849af809e0213d43e18e5d01067eeeb61b330d) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/git/git.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc index d707f25456..ed6308ea2d 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git.inc @@ -23,6 +23,8 @@ CVE_PRODUCT = "git-scm:git" # in mirrored git repos. Most OE users wouldn't build the docs and # we don't see this as a major issue for our general users/usecases. CVE_CHECK_WHITELIST += "CVE-2022-24975" +# This is specific to Git-for-Windows +CVE_CHECK_WHITELIST += "CVE-2022-41953" PACKAGECONFIG ??= "" PACKAGECONFIG[cvsserver] = "" From patchwork Mon Feb 20 22:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19872 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 C63D8C678D5 for ; Mon, 20 Feb 2023 22:20:52 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web11.28055.1676931630559771113 for ; Mon, 20 Feb 2023 14:20:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=aVECN0+x; spf=softfail (domain: sakoman.com, ip: 209.85.214.176, mailfrom: steve@sakoman.com) Received: by mail-pl1-f176.google.com with SMTP id q5so2992298plh.9 for ; Mon, 20 Feb 2023 14:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JbWErJl5H9I7MHyubojrULiWuIOf187SSG7ccEMMjfA=; b=aVECN0+xOX7qlmo5Ollit9YTw7sNym/GEIBi80AvksoBMLLCW9BMo1JG3uFsaU7opv 5lg2vbtNzyFNk/4F5cXiukq55MKCrBY5V+wVYYzJJiFsPDiEYD+0FwpFAp96Lh6lyTvg q3gnpIfTeG5CYEmHH5qWE1zZ96l61v/Wan6SjuaT7XnXZBUPQcy8RPYgPJmY9AsyaY+U Y2jgowo5knREwic2TVsWkhpEMeKeLav/ZpI1C4DlVcopxI/jmSygZ8vqyHVM1BWH/hRp 7iYLwFEeMaldfVIumOdxHozEOK2WgaGDcRnveA0bWZgYac4j5BS6b/DNDd3uMB+/wNnl mBKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JbWErJl5H9I7MHyubojrULiWuIOf187SSG7ccEMMjfA=; b=r0kQhhaXjQ2+YP0wOsP5uGUk5Eiz7GEW59qpEeo3QP4pc1epVLA5sjSDefrAmELIQ0 Q/vQ+Zno5gRxf94Y0rfk3y3dDs8OdhPi6afYqvkJIRRmAZLiQtp12KE6FTFQffZPnkUA Dy42srB30FwDr+68aZxr2Mo1ZlNu2AUtlgB8vxq+/IKTlPC2XqP4ZDawHmCXKKlXwgiR 4v63tF6RsEy+LDGxfrHIcFFbxVIz6GGsVshI3j19nudLcy6D1SDkwvdphm0ufrSDxdpF r5mWW9T7r7veqkkTKqxMCo4Yr+1qL6JGMDmbsuXqvBjOGP22vITXSRwLtAVcHCBjyj2X NeAQ== X-Gm-Message-State: AO0yUKUcvY5FmHTza4VqGFUiU40NsPp7GOGyfCNdPRvqMjUzb9RG3Oph qkM6f8YJsCAgawlzBI3SBM8xvXStKZWkEmgNhfU= X-Google-Smtp-Source: AK7set9Rf7ZTuI4+zbhzYzX88Z9AcyLkSbtUvo7o72trocI1x+qt2N1AC+eD9VSra2Ec00kc0S3euw== X-Received: by 2002:a17:902:db07:b0:19b:f5b:4ca6 with SMTP id m7-20020a170902db0700b0019b0f5b4ca6mr4197981plx.31.1676931646284; Mon, 20 Feb 2023 14:20:46 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:45 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 09/16] classes/fs-uuid: Fix command output decoding issue Date: Mon, 20 Feb 2023 12:20:16 -1000 Message-Id: <622fea338a0c43f95185469b54cc72c545b73100.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177469 From: Pawel Zalewski The default return value from subprocess.check_output is an encoded byte. The applied fix will decode the value to a string. Signed-off-by: Pawel Zalewski Signed-off-by: Alexandre Belloni (cherry picked from commit 046769fa952a511865c416b80d10af6287147fb7) Signed-off-by: Steve Sakoman --- meta/classes/fs-uuid.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/fs-uuid.bbclass b/meta/classes/fs-uuid.bbclass index 9b53dfba7a..731ea575bd 100644 --- a/meta/classes/fs-uuid.bbclass +++ b/meta/classes/fs-uuid.bbclass @@ -4,7 +4,7 @@ def get_rootfs_uuid(d): import subprocess rootfs = d.getVar('ROOTFS') - output = subprocess.check_output(['tune2fs', '-l', rootfs]) + output = subprocess.check_output(['tune2fs', '-l', rootfs], text=True) for line in output.split('\n'): if line.startswith('Filesystem UUID:'): uuid = line.split()[-1] From patchwork Mon Feb 20 22:20:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19870 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 B9A53C64ED9 for ; Mon, 20 Feb 2023 22:20:52 +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.28072.1676931649220526811 for ; Mon, 20 Feb 2023 14:20:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=6JMeV1fE; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id e5so4042373plg.8 for ; Mon, 20 Feb 2023 14:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pT//dQa2ArAGUor0G27lRQEIfegOHmQIzdvE8+tO+24=; b=6JMeV1fEi1gB2LWpzHQLSlXwA8m4qeYJsCvB+G6mdNe7bgn3IqKKzwUpMVc6vWTQ4/ zHV8O9JtUinuLwasJtkR9WZ6MNI1TT9k1Immpi7UC9kVhnMSsHVXXu28rC3kjTgRvEOm PX1i/aNQS0mEwQIQVb+OPpPH5ozGPoEFUhcZ824gGD0MrqU4hctDMFed8vuFeNmY2b5f FGEVutulntPEdS0DHmCbvwa4nG+KgnGays1QCawk2D5zy3c00h2EmCJIK2d19D232+TL HDbLT+a0oJUEgdTU5nlOruAun06vtoF4gMNNpGpqN2CtCPdFVnsIiBZTjsh+Y1SzjInj 1rCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pT//dQa2ArAGUor0G27lRQEIfegOHmQIzdvE8+tO+24=; b=LknTyFsWRRMq+Jkni7fPMhPmVDEGNiRYRwWtIF8qPE01+KSADPNyAuB4QuT9mV0bkn hq2o2/fkzIK+Tlbow2jd/eyq6oAFCvbIq7u0oh/AVwP3Bjmy7E2gVLrfks9YveOM8YEF RQtVA3SRfVD/dztWXQLfpQ9DVmwM+xFtQg9+x4LzWvRo+Fi3Ngk//3glXQO/qj2H+jBb LPA/dwsIMFJLJOkNNh7lhh+0oeNIXzHKZrlH9Mm2F2GI2SLnP1A5PTJPAeorUSOkgohe CPWcmJORCBgVw6+JfdL9YnBJx7q5L3pLd81VusC9mjKTSxx58MyH99IyTtvGkP6ueR1M jlrA== X-Gm-Message-State: AO0yUKVYfRjmRxktcJqbGaylyWpLvYGPqiKHZUyrWfmc8ijuo6bFo0UL 4027+OW2wN7MHFcdvOxZNjI+dbQevBnLRmVMONE= X-Google-Smtp-Source: AK7set8EsHVuXUZ8T42BV+QeMoCwLDcMZI3OOHoCWqc8urafOMIM5NZ2ifhS6DWx1ui7e9fGNGz5ig== X-Received: by 2002:a17:903:284:b0:19a:9797:1631 with SMTP id j4-20020a170903028400b0019a97971631mr3350320plr.3.1676931648109; Mon, 20 Feb 2023 14:20:48 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:47 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 10/16] make-mod-scripts: Ensure kernel build output is deterministic Date: Mon, 20 Feb 2023 12:20:17 -1000 Message-Id: <85cb9212a85e32715209705a29c6928b368d87c7.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177470 From: Richard Purdie The definitions in linux-kernel-base are needed to ensure the generated headers are consistent. This was a small step that was missing from the previous changes to linux-kernel-base as both kernel-devsrc and make-mod-scripts need this information defined consistently. Signed-off-by: Richard Purdie (cherry picked from commit 0d79d4883f924cef0d0ba361506ad75d441b9721) Signed-off-by: Steve Sakoman --- meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb index f9df345ca5..32b89bb5ea 100644 --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://www.yoctoproject.org/" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -inherit kernel-arch +inherit kernel-arch linux-kernel-base inherit pkgconfig PACKAGE_ARCH = "${MACHINE_ARCH}" From patchwork Mon Feb 20 22:20:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19873 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 B880BC636D6 for ; Mon, 20 Feb 2023 22:20:52 +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.28072.1676931649220526811 for ; Mon, 20 Feb 2023 14:20:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=oOusrame; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id e5so4042428plg.8 for ; Mon, 20 Feb 2023 14:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vXQ2CWnD1RjRbvXlgFpTkYk4PMmsSo3O/ylMc49sPnE=; b=oOusrameUO7AHYoT4pxHqDW+QEq3ut3c7lIXx2gY4gLhQQCA7C4bQupnpORF0qXPZt cJu2P6lXZimG4isrg41tFzrEeVv/ivG8gUxCuRHst8Xk8L6W5kx3BIoZehdEEQmwEQAW 9HVR9r7jI5MMbn+lNEwDhDFdEt0dlFlGVzJHzMWS3EZ9mC3fAO83lXkai3B3YKmMH0vT 4cCZmv1JAPAHOqlt/eGMUuYs8cNskHIy5InS14czHTELzkxXCGPyxboTbh7GFLoBVRCY BnJ0qyU6bLWWIC553n9hWJD3xOMU0C2bCfwaXWScYAQkEK3JY7wd1U0FSzg1fQYom69/ PxnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vXQ2CWnD1RjRbvXlgFpTkYk4PMmsSo3O/ylMc49sPnE=; b=EktyU+1ea32VvCby5B0IfOIKK4Wnf3daYIoF7av1B6WbZJ7THXITgh0e9EZH/qtmnK Wk3apWa9WcaVY3UNnLe0bdzwdgDsNAorX8JXZyYrj9kJWI87gAWWvYVMG7B4lUYyuxuY At80luOb3NY3M/LUZneil7qwIz3TNizTY/fYL+p/DCl/MFwcyQ7zqRP/5xH1G4hfgvel RSpEp3cM40KuWZyL+UoZmoqZf2lN1t75on060BrMUuXzylBxjSM9NNegQGBLqH/Gmx0n buvB5NiZPFm67pm5Y23nMcQTFKU4vHlwODdTjqPrtzx8ThCBDsyRh9rrKZ12tccIxeKx xKWA== X-Gm-Message-State: AO0yUKVZxuNveQm+vyhUCyNzgeokWZkRJppxgw0iqvxNUo7VaF3cRo/4 w4ERHnnxN80GA/In3z4JrAfezA8O2ol2xmwTgZM= X-Google-Smtp-Source: AK7set823U0VewTZ20vpWgEuZ0ZsTLIa85orhpslt06i8UR6pJzGiNnkkCeMtLMIYmEQaiv2zfWp2w== X-Received: by 2002:a17:903:78c:b0:196:f00:c8f9 with SMTP id kn12-20020a170903078c00b001960f00c8f9mr2330216plb.10.1676931649858; Mon, 20 Feb 2023 14:20:49 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:49 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 11/16] oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signal Date: Mon, 20 Feb 2023 12:20:18 -1000 Message-Id: <3793662bcfdab230d7b98bde2bc6757949b0aca0.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:20:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177471 From: Alexander Kanavin This does not actually guarantee that the child runqemu process has completely exited: poll() may return prematurely while the SIGTERM handler in runqemu is still running. This thwarts the rest of the processing, and may terminate the handler before it completes. Use Popen.communicate() instead: this is what python documentation recommends as well: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie (cherry picked from commit cd3e55606c427287f37585c5d7cde936471e52f4) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/utils/qemurunner.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index de0dff3ff0..c84d299a80 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -432,10 +432,13 @@ class QemuRunner: except OSError as e: if e.errno != errno.ESRCH: raise - endtime = time.time() + self.runqemutime - while self.runqemu.poll() is None and time.time() < endtime: - time.sleep(1) - if self.runqemu.poll() is None: + try: + outs, errs = self.runqemu.communicate(timeout = self.runqemutime) + if outs: + self.logger.info("Output from runqemu:\n%s", outs.decode("utf-8")) + if errs: + self.logger.info("Stderr from runqemu:\n%s", errs.decode("utf-8")) + except TimeoutExpired: self.logger.debug("Sending SIGKILL to runqemu") os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL) if not self.runqemu.stdout.closed: From patchwork Mon Feb 20 22:20:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19877 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 BA25EC6379F for ; Mon, 20 Feb 2023 22:21:02 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web10.27681.1676931652644316702 for ; Mon, 20 Feb 2023 14:20:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=0ViI/w8m; spf=softfail (domain: sakoman.com, ip: 209.85.216.54, mailfrom: steve@sakoman.com) Received: by mail-pj1-f54.google.com with SMTP id cp9so3856549pjb.0 for ; Mon, 20 Feb 2023 14:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QXFcDD1ADQbZVykYmih4blxzVECTq2HWp8Ggwa5nAlU=; b=0ViI/w8m41MHc8D65ln0Lss7EtvSiuBNY1iOq+1YnTSze8rybmGVbzMhT4/SgOpKJ1 ghdZtXyH7Qc36Ad4GkVMJNI78nFTOBjuK+cE4GsOBBnYEYNDgHRwREwNTNolgoXkE7WG kIL9SGMkb4Q3QFM/On2BpI32J70Ti96SvjljcwW+x6dpbQOEmNr8aPwbAN0KMFwIiKXK C6fXznouHon4lRFSVXH/4sIgiTHXffYCDATuAiZJiWQWuOE8HAC+DsiJ+oaM174QUVMY EbXfSdsgK6TLk27spwJJCOq8YHL9D3nFQoSnxhx3r4sQenc+s/JnHwn/HucmzAJAgjQr RN2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QXFcDD1ADQbZVykYmih4blxzVECTq2HWp8Ggwa5nAlU=; b=c1v7qE7TEkrz5cRf33XVR/HTXNRjWsJEUaTYnyrwXjh9v3m9xetsl57/TFqZF9PzKB hSfzq7i7roTLocjUFKpUk/vJQOOAcPXjS2rg9FmsXeJ4Ia+q0HaiTyibMcyl0ongcM4C Yrs9MY3jDMv0oXeP/3BNFnNDANWYgbc+KU5YfE/jcO+Q/Kgd3anl+yZebb6aJ/KhWF+L v07mBtYxSZdWb7t+aWbc1TKr1q8CRlvKqIKUetmQSgCvldKJjmZP2GJOg2lhGTJ89l5l XHAYQZoHhaReeROGwO835A6xB/dv2x5yQHCLy4SBcl1PkV1u+3kb5iu0/7sSYloT7Ot0 YeYA== X-Gm-Message-State: AO0yUKV/Ncf3RrlRCh5RNlON4dIKhNfomWZYaKpnnYGuhUhkzBd0HMn8 7b1+EBZ6rD+hM90Q7dhmmfV3u7ebeeTTNIV2s/A= X-Google-Smtp-Source: AK7set95neXCsVWFWgSb+E7zCszTGcyNDveIRRUcAi1s4RnOY4zfQD5QYSUn0umxVke4OSwESC9KPA== X-Received: by 2002:a17:903:41d1:b0:19a:a2d8:f252 with SMTP id u17-20020a17090341d100b0019aa2d8f252mr4395726ple.27.1676931651564; Mon, 20 Feb 2023 14:20:51 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:51 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 12/16] meta: remove True option to getVar and getVarFlag calls (again) Date: Mon, 20 Feb 2023 12:20:19 -1000 Message-Id: <4ec04d14899cb7725ce908e3ef6302838275f0a8.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:21:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177472 From: Martin Jansa * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie (cherry picked from commit 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Steve Sakoman (cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289) Signed-off-by: Steve Sakoman (cherry picked from commit de7bf6689a19dc614ce4b39c84ffd825bee1b962) Signed-off-by: Steve Sakoman --- meta/classes/image.bbclass | 2 +- meta/classes/license_image.bbclass | 2 +- meta/recipes-devtools/go/go_1.14.bb | 4 ++-- scripts/lib/devtool/menuconfig.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0d77d2f676..a241543ff2 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -437,7 +437,7 @@ python () { localdata.delVar('DATETIME') localdata.delVar('DATE') localdata.delVar('TMPDIR') - vardepsexclude = (d.getVarFlag('IMAGE_CMD_' + realt, 'vardepsexclude', True) or '').split() + vardepsexclude = (d.getVarFlag('IMAGE_CMD_' + realt, 'vardepsexclude') or '').split() for dep in vardepsexclude: localdata.delVar(dep) diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index 9f3a0c3727..325b3cbba7 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass @@ -211,7 +211,7 @@ def get_deployed_dependencies(d): deploy = {} # Get all the dependencies for the current task (rootfs). taskdata = d.getVar("BB_TASKDEPDATA", False) - pn = d.getVar("PN", True) + pn = d.getVar("PN") depends = list(set([dep[0] for dep in list(taskdata.values()) if not dep[0].endswith("-native") and not dep[0] == pn])) diff --git a/meta/recipes-devtools/go/go_1.14.bb b/meta/recipes-devtools/go/go_1.14.bb index c17527998b..76ff788238 100644 --- a/meta/recipes-devtools/go/go_1.14.bb +++ b/meta/recipes-devtools/go/go_1.14.bb @@ -7,8 +7,8 @@ export CGO_ENABLED_riscv64 = "" # windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking # for windows/mips/riscv and their variants. python() { - if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True): - d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel") + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH') or 'windows' in d.getVar('TARGET_GOOS'): + d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") else: d.setVar('GOBUILDMODE', 'pie') } diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py index 95384c5333..ff9227035d 100644 --- a/scripts/lib/devtool/menuconfig.py +++ b/scripts/lib/devtool/menuconfig.py @@ -43,7 +43,7 @@ def menuconfig(args, config, basepath, workspace): return 1 check_workspace_recipe(workspace, args.component) - pn = rd.getVar('PN', True) + pn = rd.getVar('PN') if not rd.getVarFlag('do_menuconfig','task'): raise DevtoolError("This recipe does not support menuconfig option") From patchwork Mon Feb 20 22:20:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19876 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 C8590C64ED9 for ; Mon, 20 Feb 2023 22:21:02 +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.28072.1676931649220526811 for ; Mon, 20 Feb 2023 14:20:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=jrLh9oJs; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id e5so4042551plg.8 for ; Mon, 20 Feb 2023 14:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=I6VkclOIpPDRiD86UiuJ5LytlToGujKk1DrtwNMwbsk=; b=jrLh9oJs+vpku/9a08oAi8dy/GpJmo5lM2uclL3Op6camVd+b03GhzKFZ45xGaAgnl RlGfaWcUOwA48ZTPZIyJKGUyAOBAZTHhZVkFmAIOQCB0/5vM2+qsBhdrGjsHM1+5DH+r SPok8gdQotqFiJLlsRgqinRs2jZPdYoyLzvtcrUXdnH8+u5ebrj4KkdNNxSHL+gpmtfS hY0xu8DKBmUvvcm3Sgjs34ZrGmaynQThXGiXMx2vH/kCQrnIO2vJm8oSSEGGSkeQu7GE wFES63bP1+0sjZRyloCL2lSooirvhjUuZOM1wZ55+Mf7shJum2AnhZRloj8+AYO2Z1Ur OgjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I6VkclOIpPDRiD86UiuJ5LytlToGujKk1DrtwNMwbsk=; b=OPc+C9WGkOwnVKuWFtIr51TkPvzCgyPVilQ93GESjpnDa+xzL80tNIMebJdZwDuso7 HNha3qhKMgrln1a3cVSVudL5UbOecpe/YJrgQgS6h9Bp963QbbuXnrRzRSrKLAtRgzpf ftl/9WIpvB9SvA7SmPvkvgZ4dz7Ew4NtHOU4Veg77j18jZEO0VYBRitDEb4xoIv59B90 k6UCUy7kwYGFehc6vxG1g37QB18AmPX12Gl6dG8HFajQuTJi1ahrYxQHRDyw7/isFfZt k4YQQcVyNtlsYnwYOO2vn9gvjdSf0iF0FmTkq+zGok0bcVVqponALNjKeFyIICkjSLjg v1MQ== X-Gm-Message-State: AO0yUKUOnAiJxz3WpCIuSFLR6XtKPERYpZxUWqa62m5+YLozDEzC54rG GlSF/FpzxIVUPB4uxiJPpxNPaNiYu2TfgQYrijo= X-Google-Smtp-Source: AK7set9TFEWAhpXfK4dr18OnULyWh6vH3rcU6/oksAl75F3DvRDJYt0sbmkJJWhWJl5xwLPJn6OE8Q== X-Received: by 2002:a17:902:dac1:b0:19a:9055:6658 with SMTP id q1-20020a170902dac100b0019a90556658mr5427379plx.18.1676931653528; Mon, 20 Feb 2023 14:20:53 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:53 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 13/16] libc-locale: Fix on target locale generation Date: Mon, 20 Feb 2023 12:20:20 -1000 Message-Id: <63141bd8c19285bbef33f3d32a89ca127da0c658.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:21:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177473 From: Richard Purdie If on target locale generation is used, it fails at first boot showing errors about a missing directory. Ensure the directory exists. Signed-off-by: Richard Purdie (cherry picked from commit f2844c9f1bbb729562063d96a3d1cc9d44dafa0a) Signed-off-by: Steve Sakoman --- meta/classes/libc-package.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 1143f538d6..72f489d673 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -45,6 +45,7 @@ PACKAGE_NO_GCONV ?= "0" OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" locale_base_postinst_ontarget() { +mkdir ${libdir}/locale localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s } From patchwork Mon Feb 20 22:20:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19874 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 C43EEC677F1 for ; Mon, 20 Feb 2023 22:21:02 +0000 (UTC) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.28075.1676931656448552141 for ; Mon, 20 Feb 2023 14:20:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=y2GpvfrS; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id u10so2684209pjc.5 for ; Mon, 20 Feb 2023 14:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=o9BP38ivoEeQSt+rtFpaH10VJ3PnDP4SmflkkKKIe04=; b=y2GpvfrSQA8VHXBH4RqXB6iF/XVMcPECWi6K+hpvSifZBQRuDJIS/+aLiYMLIv0qba XBaNwnYWE3+YIMfnWmHyiZqfvIdtf4QHyqzqYCHVV2DVUMB6x4sE5uW4/k24tamCAbgO ts6WyuGYguI4FpNj+Ox4p24oF7Lkh0VKeiqoXrgphv891OkRYagz4qMQUV5DDTVz6iTy 9Jp701OIX/fKg9JbFOVUoa0zjmQ6I3YWQrzxkd/xxp81v+Ajo31H/BTPJdN7YWTTtXXW h58P6X/GNng7s5DklyRMLOSiJRkL8b6gPs9BoGiECJx5CsAMxmZ27lkY2EgihV466IeL UuYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o9BP38ivoEeQSt+rtFpaH10VJ3PnDP4SmflkkKKIe04=; b=t091UXLSI1lvj1j4T5t9/CBMCY6Q48z8OrlersOQPUz1st4UmT6AbvyJK2pCz9EL3p H3ayCjRz6SPgG2+AEL8AFqzn2E7eKcPQ/0emOsUR/rVBoCr+Xt1Y8ko5S/C8SHUFR7QU LshEEviPtEXrhxuNzpYj1y6o9yTOCa4FvcYc5s6TjGYZZq+CbCTPwNLbeOTkNMlZIvSE v8I+U2k8G7/p5uVlJI5ci2dDHaVI5LtAo7FbWtHEhTN/YUipJ5RGNnu5Tc7JQKB7HJWf LjlwlJ16LSnxneL/kvVeUNQ3mkp8BB/KCEJvbiVN+KJyXljmuWbbcn+gtZRMbsiOF5bA TVvw== X-Gm-Message-State: AO0yUKVuL88kzbBd0ePavlpnJi1pfBmJeFoz6MIoRX9+GfasW+un6smK kc/2Po6QBRKlaCtRF32IkfUtr2FtI9yzAgaMwuc= X-Google-Smtp-Source: AK7set/ngaXiIuW+aE2bCzA6xRnyKpzTPWh+Q+SBicPzm4Nq+NrTjLlro6BDLd2zCPzHPU5n9WixZA== X-Received: by 2002:a17:902:ecd1:b0:19a:b302:5176 with SMTP id a17-20020a170902ecd100b0019ab3025176mr3102711plh.46.1676931655460; Mon, 20 Feb 2023 14:20:55 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:55 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 14/16] oeqa context.py: fix --target-ip comment to include ssh port number Date: Mon, 20 Feb 2023 12:20:21 -1000 Message-Id: <4a9bf2d4693fd9e6eb2186a39e50c7e1630fb823.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:21:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177474 From: Mikko Rapeli Providing ssh port number is supported too with "--target-ip 192.168.0.10:22". Signed-off-by: Mikko Rapeli Signed-off-by: Richard Purdie (cherry picked from commit 637919b9df0abc06da5b2f9b389cf25376bd6b7c) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/runtime/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py index d707ab263a..8a0dbd0736 100644 --- a/meta/lib/oeqa/runtime/context.py +++ b/meta/lib/oeqa/runtime/context.py @@ -67,11 +67,11 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): % self.default_target_type) runtime_group.add_argument('--target-ip', action='store', default=self.default_target_ip, - help="IP address of device under test, default: %s" \ + help="IP address and optionally ssh port (default 22) of device under test, for example '192.168.0.7:22'. Default: %s" \ % self.default_target_ip) runtime_group.add_argument('--server-ip', action='store', default=self.default_target_ip, - help="IP address of device under test, default: %s" \ + help="IP address of the test host from test target machine, default: %s" \ % self.default_server_ip) runtime_group.add_argument('--host-dumper-dir', action='store', From patchwork Mon Feb 20 22:20:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19878 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 C04A3C61DA3 for ; Mon, 20 Feb 2023 22:21:02 +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.web10.27684.1676931658416612072 for ; Mon, 20 Feb 2023 14:20:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=nimdurpB; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id bh1so2991813plb.11 for ; Mon, 20 Feb 2023 14:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=x5M/jU9hBaDkvGGRBO3Cs32NH86JP+TTLyHL4ctR6DY=; b=nimdurpB3T0oAnq0K1iU/2/RM7/u5UJLpR6QfrGO5AqFt6vYwsyq5lkaoBMLfe4JnD GXaR5uwk/V04tH2xOsvt7HIjKKA24XnuvYtjIVvcV5YFXV1M5ObapsMAxdejQPzsnY4v NATjua+bIURvuODJCbloAWL5HXXu+mi9ZEppw7ByQbZAavu3+R5mmntQIXmAFNY1zOz4 Kk+ZKgxJJPh1vhuyQsNaAErDditGiGKwLqM17Jiwtc/hUwIM1YWA7wyiKznoFM86SYT4 +x7XvOtxuZt8+/tBHHLGJttC8xE5gx5qn7nE1dKymtAwjHaq8KyL1CKcB7/AYWa2zhgM em3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x5M/jU9hBaDkvGGRBO3Cs32NH86JP+TTLyHL4ctR6DY=; b=nUNnIuDOip4+X3aj1gdOxdUB43BLRfEyZI/PNVenEj/tcgczJRajE3BbBnAsmisjv5 VFRaQXhQ/5zA6so0jWRWqruVDpRhZDl6dZ7pbfD4Y0h5pJPfTztoVk3s7AXU0drRWJk2 Ru0fAphUZIDf9OvWrBzmZiFcYPl2kzF+v/In88yYG3i5N9iZ3bTw5tr2tMQUEqfMXte1 zb86grpdDZ8v3PuUbwdpqVkt5VYow2K17xE4AylvF/bay0gEypjbqsx87oLQshD4Wsgz Pz8rc5cQzvhDH1KTuDzVM3SX1uBN+eOSpaoFjR/s7zE9fpuHI68hZR4VpZff0EQZzPzM /bWA== X-Gm-Message-State: AO0yUKU9LbXpojZIIBgA0MRk7CNdfJWgEQdNwXIXkrgdwRymFCmuA9zh cCK1c9KytZ39TiMdId689fOnuBNWcMCXNzy7gkI= X-Google-Smtp-Source: AK7set8ioUdA9a+qAzcKSvITkPkU5anwIPPQNLjpW0zCyQREhL+2CdId5s2K7RnnXXhetcBoG+eQQg== X-Received: by 2002:a17:903:1252:b0:19a:ea48:7301 with SMTP id u18-20020a170903125200b0019aea487301mr3209241plh.66.1676931657358; Mon, 20 Feb 2023 14:20:57 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:56 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 15/16] busybox: always start do_compile with orig config files Date: Mon, 20 Feb 2023 12:20:22 -1000 Message-Id: <7ef76eaf5b68d52afdc4292bbe20309e29bb464a.1676931497.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:21:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177475 From: Antonin Godard When compiling busybox a second time (e.g. with `compile -f`), busybox can use an altered autoconf.h file for compiling, which can ultimately produces different and unwanted binaries. This can produce errors like this one: ERROR: busybox-1.35.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: 0001: *** 0002:ptest_update_alternatives(d) 0003: File: '…/poky/meta/classes/ptest.bbclass', lineno: 100, function: ptest_update_alternatives 0096: for alt_name, alt_link, alt_target, _ in alternatives: 0097: # Some alternatives are for man pages, 0098: # check if the alternative is in PATH 0099: if os.path.dirname(alt_link) in bin_paths: *** 0100: os.symlink(alt_target, os.path.join(ptest_bindir, alt_name)) 0101:} 0102: 0103:do_configure_ptest_base[dirs] = "${B}" 0104:do_compile_ptest_base[dirs] = "${B}" Exception: FileExistsError: [Errno 17] File exists: '/bin/busybox.suid' -> '…/busybox/1.35.0-r0/package/usr/lib/busybox/ptest/bin/login' This happens because ALTERNATIVE:busybox contains `/bin/login` twice, initially that's because `/bin/login` is present in both busybox.links.suid and busybox.links.nosuid. The reason for that is because of the altered autoconf.h. Steps to reproduce above error: bitbake busybox -c clean bitbake busybox -c package -f bitbake busybox -c compile -f bitbake busybox -c package -f This patch guards against potential bugs by: - making a backup of .config and autoconf.h that have matching timestamps. - make sure do_compile always starts with these files. - restore .config and autoconf.h at the end of do_compile. Signed-off-by: Antonin Godard Signed-off-by: Steve Sakoman --- meta/recipes-core/busybox/busybox.inc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 3553376582..616a23258a 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -139,6 +139,10 @@ do_configure () { do_prepare_config merge_config.sh -m .config ${@" ".join(find_cfgs(d))} cml1_do_configure + + # Save a copy of .config and autoconf.h. + cp .config .config.orig + cp include/autoconf.h include/autoconf.h.orig } do_compile() { @@ -146,13 +150,14 @@ do_compile() { if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then export KCONFIG_NOTIMESTAMP=1 fi + + # Ensure we start do_compile with the original .config and autoconf.h. + # These files should always have matching timestamps. + cp .config.orig .config + cp include/autoconf.h.orig include/autoconf.h + if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then # split the .config into two parts, and make two busybox binaries - if [ -e .config.orig ]; then - # Need to guard again an interrupted do_compile - restore any backup - cp .config.orig .config - fi - cp .config .config.orig oe_runmake busybox.cfg.suid oe_runmake busybox.cfg.nosuid @@ -189,15 +194,18 @@ do_compile() { bbfatal "busybox suid binary incorrectly provides /bin/sh" fi - # copy .config.orig back to .config, because the install process may check this file - cp .config.orig .config # cleanup - rm .config.orig .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps + rm .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps else oe_runmake busybox_unstripped cp busybox_unstripped busybox oe_runmake busybox.links fi + + # restore original .config and autoconf.h, because the install process + # may check these files + cp .config.orig .config + cp include/autoconf.h.orig include/autoconf.h } do_install () { From patchwork Mon Feb 20 22:20:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 19875 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 B4DA6C636D6 for ; Mon, 20 Feb 2023 22:21:02 +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.web10.27684.1676931658416612072 for ; Mon, 20 Feb 2023 14:21:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=12mfhHZ1; spf=softfail (domain: sakoman.com, ip: 209.85.214.174, mailfrom: steve@sakoman.com) Received: by mail-pl1-f174.google.com with SMTP id bh1so2991877plb.11 for ; Mon, 20 Feb 2023 14:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fosyJ8kkmQCwIOg52M8I34mXOgaBKNJ0j0Ilbs8El3I=; b=12mfhHZ1JfgOxa2laW29XTC1G6NtSs4YF5jofjjaTIXe15Ew0WmmlcgRayfjJVRwY+ MFsboPS08NuMoTZeKAUVkbBzNN4QY8xfKWIK5Wu0Hy2hlRBJwUblE++aoPtgPg5mcXUQ IagdUVA8gsAOFi+lu0tObX570Owp2TTWLT1U1XWqWFcEV51n3cu0Ndu77HaT6MPbksPF OWZAsQIvYhQT/3vL1vahcxkl/THyCOfvk8RaBdLbYWU1emUlqU6mJaT04m38XNmNbLCH S+YZbdLaLZqTiSZb5lDOmOZlCPdo2zpzWenNN0Jsyrd9EI9pAEZcVw7+sV4+07OaKoqe b+Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fosyJ8kkmQCwIOg52M8I34mXOgaBKNJ0j0Ilbs8El3I=; b=ygBAtej2f2WVOGGyvubn5kJIlTYhwzPr18s9YNJiYVGe8G3VwW6Xvf7kn4tzChlhOC QwXQqGoPxCAzCGJv1CR2v0Ech1HWQg7mMDAyzYBbGkhJPcRXYAhzkFxG/Ww8ABxUgPci 0Ge4wMifueCN3INE6MfWrebZ8Q9mTuMRyJO7VNfirMmljGwnjYMSpQZMxz+nIeIs7/Zg ZMUmfdd8u+eJAXIqJcZVyxlrwxcaG98XTKuKjIVnIshVEsOeUy/QC50MbdP7EiinYzS8 HrW59ybzCwqC0UIDZNChTnP0wbwgOQiKB9VMN6qFJEb3PgEG6KxSY3ujgrCgNA114aQ0 gnLw== X-Gm-Message-State: AO0yUKWSbr++OaykUHi84YC57FZKJG4jyspwhqzA9r6pvFSjXMUbq4MM v/Bpkl/RFPs7W1ur2YJxMEsEhRJLoK7cAeEc/qk= X-Google-Smtp-Source: AK7set9JB7Ahz4HjDKlW6VnSSzKL1RaUOt/qxiMC32hzjAE1PACgxMPWaMLVaUsEzyIV+kY4EQWU0w== X-Received: by 2002:a17:903:183:b0:19b:33c0:40ab with SMTP id z3-20020a170903018300b0019b33c040abmr2829491plg.43.1676931659467; Mon, 20 Feb 2023 14:20:59 -0800 (PST) Received: from hexa.router0800d9.com (dhcp-72-253-4-112.hawaiiantel.net. [72.253.4.112]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019719f752c5sm8401200plb.59.2023.02.20.14.20.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:20:59 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 16/16] busybox: rm temporary files if do_compile was interrupted Date: Mon, 20 Feb 2023 12:20:23 -1000 Message-Id: X-Mailer: git-send-email 2.34.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 ; Mon, 20 Feb 2023 22:21:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177476 From: Antonin Godard To avoid working with undeterministic config files, remove all the temporary files to start from scratch. Signed-off-by: Antonin Godard Signed-off-by: Steve Sakoman --- meta/recipes-core/busybox/busybox.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 616a23258a..f0c5666f47 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -157,6 +157,9 @@ do_compile() { cp include/autoconf.h.orig include/autoconf.h if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then + # Guard againt interrupted do_compile: clean temporary files. + rm -f .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps + # split the .config into two parts, and make two busybox binaries oe_runmake busybox.cfg.suid oe_runmake busybox.cfg.nosuid