From patchwork Thu Jul 20 10:20:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 27740 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 4F272EB64DD for ; Thu, 20 Jul 2023 10:20:35 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.web10.9713.1689848425075734604 for ; Thu, 20 Jul 2023 03:20:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=dHoT9x2t; spf=pass (domain: gmail.com, ip: 209.85.128.45, mailfrom: alex.kiernan@gmail.com) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-3fbf1b82d9cso4677285e9.2 for ; Thu, 20 Jul 2023 03:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689848423; x=1690453223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RWhhiObnZladReoRp+tgOtB5eE84bX4EI9ocX1MnUyw=; b=dHoT9x2tCBLXegVq1KlvIhR5MMcd/1TMfFAHwIEAzmv2/vRZhM/CF5RB+yiLGc5Ml4 oSIrXd54pACNbzaY7tfC0HyJX4wsWL1ZQltekJBIKzM3FclB7tKAMQveV6OB22T4xpZ/ T4rLALORPa4DXQ7O5Jn7yLN7TjJpxw7C0j8ENVp2XTZh4Y4wHjd6wRlyf6K60wkZVr8g 7uaeIMt5P6y6Tu5vLJWFNmWOX8nyUgtcwmlhQ1jqSNHh4zJqkkppVKe53kbY3Mne2OCt E1/hh130CI0WsIlSKeL2wk1RSn65X4A3BVe2s1B0wmBep9adupxZUw3+BByRdhkYTvtw PQfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689848423; x=1690453223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RWhhiObnZladReoRp+tgOtB5eE84bX4EI9ocX1MnUyw=; b=YHU3F4Kg/NgYrJSjFDbJhY6bGBCFxJKLxECEDMiJN18FcKaRTgsdRToizXyfYEyRYR GHNuEbhI64QMwK7iimJjtV+VR07XNKIEnARIGFG+6yGNZhZQANwpec+qz8Kz7mIz7G0b 6LynpP+WVwEJoX2XXS7ZfuV1a31ljMJJFGyPlLvOwTnoes0n9JUfQeZzcFkNk2TXk1M0 nrwYbjwTEFuI0aK2olDjyElVAsfq9lEoMOMaMEoAnn1zIXkK8dl5lCBpCAz6jgpo1AJY z8vr712vHZAUOZwq1shAk6Cxcvb29bL009nSHPA9rsawPuSC/r7cauv62BdGVU2cN1eR gZ9g== X-Gm-Message-State: ABy/qLZ7te2aoE70fTIWqXp/PRVMaiH0fFI7mbl7hlSu1he9biqnhasE napbd8rhKuqKM4sThjGRHw0lpT/+dMw= X-Google-Smtp-Source: APBJJlGy5F/fTA5NxdgfuP16iByqzZmAMoJS3Y4L3ZfAdD5mhEbQ2dgxiMJB3MuB2jpm+XBF6j1RGg== X-Received: by 2002:a7b:c84c:0:b0:3f7:678c:74b0 with SMTP id c12-20020a7bc84c000000b003f7678c74b0mr4012624wml.12.1689848422776; Thu, 20 Jul 2023 03:20:22 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id f12-20020a7bcc0c000000b003fc0062f0f8sm841604wmh.9.2023.07.20.03.20.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 03:20:22 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH v2 1/3] rootfs: Add debugfs package db file copy and cleanup Date: Thu, 20 Jul 2023 11:20:12 +0100 Message-Id: <20230720102014.11236-1-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 20 Jul 2023 10:20:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/184628 When copying the package database files for the debugfs, add individual file copy as well as tree copying. After the debug rootfs has been created, cleanup the package files. This then allows us to avoid a problem where (for rpm at least) extraneous files in the debug rootfs would cause failures during oe-selftest because some files existed in both regular and debugfs images. Signed-off-by: Alex Kiernan --- Changes in v2: - New in v2 meta/lib/oe/rootfs.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 890ba5f03984..1a48ed10b3f6 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -106,7 +106,7 @@ class Rootfs(object, metaclass=ABCMeta): def _cleanup(self): pass - def _setup_dbg_rootfs(self, dirs): + def _setup_dbg_rootfs(self, package_paths): gen_debugfs = self.d.getVar('IMAGE_GEN_DEBUGFS') or '0' if gen_debugfs != '1': return @@ -122,11 +122,12 @@ class Rootfs(object, metaclass=ABCMeta): bb.utils.mkdirhier(self.image_rootfs) bb.note(" Copying back package database...") - for dir in dirs: - if not os.path.isdir(self.image_rootfs + '-orig' + dir): - continue - bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(dir)) - shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir, symlinks=True) + for path in package_paths: + bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(path)) + if os.path.isdir(self.image_rootfs + '-orig' + path): + shutil.copytree(self.image_rootfs + '-orig' + path, self.image_rootfs + path, symlinks=True) + elif os.path.isfile(self.image_rootfs + '-orig' + path): + shutil.copyfile(self.image_rootfs + '-orig' + path, self.image_rootfs + path) # Copy files located in /usr/lib/debug or /usr/src/debug for dir in ["/usr/lib/debug", "/usr/src/debug"]: @@ -162,6 +163,13 @@ class Rootfs(object, metaclass=ABCMeta): bb.note(" Install extra debug packages...") self.pm.install(extra_debug_pkgs.split(), True) + bb.note(" Removing package database...") + for path in package_paths: + if os.path.isdir(self.image_rootfs + path): + shutil.rmtree(self.image_rootfs + path) + elif os.path.isfile(self.image_rootfs + path): + os.remove(self.image_rootfs + path) + bb.note(" Rename debug rootfs...") try: shutil.rmtree(self.image_rootfs + '-dbg') From patchwork Thu Jul 20 10:20:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 27741 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 2E232EB64DA for ; Thu, 20 Jul 2023 10:22:25 +0000 (UTC) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by mx.groups.io with SMTP id smtpd.web11.9664.1689848534800493899 for ; Thu, 20 Jul 2023 03:22:15 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=BGrSrJdq; spf=pass (domain: gmail.com, ip: 209.85.208.169, mailfrom: alex.kiernan@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2b962535808so8684601fa.0 for ; Thu, 20 Jul 2023 03:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689848533; x=1690453333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QugPQsg0L5y+8ntcQYf6mdVmAP0TiAYI1dzpiagwB3M=; b=BGrSrJdqnZyEafkNIFXYXuArOuxckMSUxtiOYp1N/vas+T6oCqQR2aMcrps0CuThp5 VgaBaiLCURnkd8Ru1sn5CQonH/robFUnzD90kHBeZD9yqu3/zaLciksrVWDV9tgdM6Pw aWLPEPivYgGMuClTx8k51REo0LXgcWC30JtX93nhc2ZtuClCsyLOBLyfLSzMJ48WlV8i HoPCzsFmutPtG541ih1foSeYpJlStgUP9+ZYlUOCaZgf7jcwp5ZziuhIhlwzJZFnBq/z N8Kc+DxFCNqoBOpNMuT5pVwtAu24X7//HuyKk7DBm903N6nOpLmGjFf5+PyQeoTBwV6d CIHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689848533; x=1690453333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QugPQsg0L5y+8ntcQYf6mdVmAP0TiAYI1dzpiagwB3M=; b=Wvuc22nlasMLur1CdTOEwEPctx+zxjQunvCY6AXyU7xrOwPeVMzrtb6kZsFEFweLuX 4FDpMJq6l4oHCrPiDaGUb2m6fKEjgnW2zuOMb8f+o2tZDAjv44BzqIiUC/LN2ggfQLay Vmxz+6Lpp2SKDCdNbn5QuIvfAClU0KTzoQQ9XSJbMMFBcyLiZkAy8SmKyQrOVpKxdtHU 40JQp5+k78tv/Wjkeb36XYc8xJ6xdAyOcsaf/NtYRekmpdmL92sRuvfAS23bYhm/R14W J6EmPUf92J9hrRwunYL6Du8Uq3XnA4wz2yLo/I9pfCTZaft+20bvW1jgXbiAXcOKPGgQ 5nxw== X-Gm-Message-State: ABy/qLZW/CmG6i2OFRK7q/rT6kW95PJgvAtz28Upc/dBdnc1zfyLMmBq mIKBMWREl70OmRMAh7WvE/r90ReVdfc= X-Google-Smtp-Source: APBJJlHHFl9vCqkx/eSuDliL83ppL3idYf8bVs/OxvqWOIbpWG4eApcj8uUD09uUK2Ivy7TjlQUd6Q== X-Received: by 2002:a2e:3c07:0:b0:2b6:daed:494f with SMTP id j7-20020a2e3c07000000b002b6daed494fmr1435183lja.35.1689848532563; Thu, 20 Jul 2023 03:22:12 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id f12-20020a7bcc0c000000b003fc0062f0f8sm841604wmh.9.2023.07.20.03.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 03:22:12 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH v2 2/3] rpm: Pick debugfs package db files/dirs explicitly Date: Thu, 20 Jul 2023 11:20:13 +0100 Message-Id: <20230720102014.11236-2-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230720102014.11236-1-alex.kiernan@gmail.com> References: <20230720102014.11236-1-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 20 Jul 2023 10:22:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/184630 Rather than copying the entire /etc hierarchy, specify the pieces we actually need. Signed-off-by: Alex Kiernan --- Changes in v2: - New in v2 meta/lib/oe/package_manager/rpm/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/package_manager/rpm/rootfs.py b/meta/lib/oe/package_manager/rpm/rootfs.py index d4c415f68cad..3ba539632063 100644 --- a/meta/lib/oe/package_manager/rpm/rootfs.py +++ b/meta/lib/oe/package_manager/rpm/rootfs.py @@ -110,7 +110,7 @@ class PkgRootfs(Rootfs): if self.progress_reporter: self.progress_reporter.next_stage() - self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf']) + self._setup_dbg_rootfs(['/etc/rpm', '/etc/rpmrc', '/etc/dnf', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf']) execute_pre_post_process(self.d, rpm_post_process_cmds) From patchwork Thu Jul 20 10:20:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 27742 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 26586EB64DC for ; Thu, 20 Jul 2023 10:22:25 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web10.9739.1689848536223839013 for ; Thu, 20 Jul 2023 03:22:16 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=ZcG4h9BR; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: alex.kiernan@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3fbc244d384so5025055e9.0 for ; Thu, 20 Jul 2023 03:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689848534; x=1690453334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z4M2r4JSmF9EIQtQ7nvBmevsBwlLNlV81EQYNX/Mjjw=; b=ZcG4h9BRYddrmHbbTRZGVG5+ZiJ9pTWIojFlu0QiUPYMq+Dsz0ZNB0sX2zkcVwFOTU oizeUmByb86ierx+7IhgeRQzBi2SSX7dYGrstSSjMHMKnEUqIYbDtvw/BnNzaecsgtKn BgqJNkUq7vaqwzPm61PO5pfcvQlPygjRVwMUTGyIF17eWpd5+F+FX7ECUC4D+eo7ec71 6xsn5jZROgVOpPfE51+Z1tGG5yENZzdPF/RNl2u/Nr2Ei0GSVyDb97FsMk4gqdAqyU0d tikDghq6ZijIYm4plQqmH336KUgy1B+asnFepVZ/Qje3ol927/IbcEjYjzyknbb2s8iC va1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689848534; x=1690453334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z4M2r4JSmF9EIQtQ7nvBmevsBwlLNlV81EQYNX/Mjjw=; b=BiSq118xtAIANyILd/V4kQ0MYsYfEUL1NyHUmraAR3W3V4v/SH52F8y4W5mq0iTmys d08HdqGU6uUmFx0qMFZHajZJd1zPNOxyhASNOJzu9ifCo3IK0nUy7H53EUSRQIlRM3Nc qWRa0Ta5GKIyWYkgA28tAAZ9NVfWj6p4pSZ5ANQO+wTBl5aweMCrftumw9/MUtYYSCkV JD0Rx9qeFWhF9juwpF7FBSL6cocEcHxSY1Zr7VuSITHXJBkfz6K51A6+XfJQNfO1/ODG 74YOJ0b8hCBgrT0rBmSaZZ/zilRgonW8Q9LPJHGR0CEXVyjLN5Y8sOt1+qLmzp/ZScht h5PQ== X-Gm-Message-State: ABy/qLaAfki15i5s62ue8KojnFN0uBL2gBcEZs/3cu7vOf+wfpvG9x1w 7+QItDxMEVHhhLgDVCRs+grYAinCDsE= X-Google-Smtp-Source: APBJJlGvlqsW1cwZs6tcqqTmy9PDMBvcmA8PMVgRiv5oVmUwo2mUhB/j1oyRV/9NbFPWt6R7Z9G9zA== X-Received: by 2002:a05:600c:3797:b0:3fb:40ec:9483 with SMTP id o23-20020a05600c379700b003fb40ec9483mr6229433wmr.16.1689848534098; Thu, 20 Jul 2023 03:22:14 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id f12-20020a7bcc0c000000b003fc0062f0f8sm841604wmh.9.2023.07.20.03.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 03:22:13 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH v2 3/3] eudev: Add group sgx to eudev package Date: Thu, 20 Jul 2023 11:20:14 +0100 Message-Id: <20230720102014.11236-3-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230720102014.11236-1-alex.kiernan@gmail.com> References: <20230720102014.11236-1-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 20 Jul 2023 10:22:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/184631 Fix startup warning: udevd[171]: specified group 'sgx' unknown This mirrors the change in bab455cd9b1b ("systemd: add group sgx to udev package") for systemd-udev. Signed-off-by: Alex Kiernan --- Changes in v2: - Rework rpm handling so that the debugfs doesn't include a spurious copy of /etc which caused the gdbserver selftest to fail because of a duplicate /etc/gshadow file meta/recipes-core/udev/eudev_3.2.12.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/udev/eudev_3.2.12.bb b/meta/recipes-core/udev/eudev_3.2.12.bb index 572ccecafd0c..4268bcc2c5de 100644 --- a/meta/recipes-core/udev/eudev_3.2.12.bb +++ b/meta/recipes-core/udev/eudev_3.2.12.bb @@ -18,7 +18,7 @@ SRC_URI[sha256sum] = "ccdd64ec3c381d3c3ed0e99d2e70d1f62988c7763de89ca7bdffafa5ea GITHUB_BASE_URI = "https://github.com/eudev-project/eudev/releases" -inherit autotools update-rc.d qemu pkgconfig features_check manpages github-releases +inherit autotools update-rc.d qemu pkgconfig features_check manpages github-releases useradd CONFLICT_DISTRO_FEATURES = "systemd" @@ -85,3 +85,6 @@ pkg_postinst:${PN}-hwdb () { pkg_prerm:${PN}-hwdb () { rm -f $D${sysconfdir}/udev/hwdb.bin } + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r sgx"