From patchwork Wed Dec 24 14:16:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77425 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 1F0D0E7545F for ; Wed, 24 Dec 2025 14:17:32 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.121251.1766585850492757365 for ; Wed, 24 Dec 2025 06:17:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZPSrREbT; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: uvv.mail@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-43260a5a096so1965580f8f.0 for ; Wed, 24 Dec 2025 06:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766585848; x=1767190648; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9f/Tx0AROa3eWwm2R5HZI9DWrnOi5C9ZSVDkIMq9+Uo=; b=ZPSrREbTv1PTeeDJZx3Y2dnMLwOUSJtgfY7XRIwjS8I1kJVu5/39Waa+o+zH0bRorn QBZFCm7RWFA+4OI/EVA0h1ShCyPKnFPZ0Fq3KFeBQPKUQSBsW9Sc7Yt2pxu/PvraC/+j kDc2qxklxq7Iy6qbK6zq2fUsrCNHmO4FDUJmgPvnz+NUs9Wgpo1T+jS/pZcrokASGte6 GJ/0dqAyf90xYOmjtQe3p183uvq+Vebv9Gpg8NmZcJ1IjDnLhmFk0zAL/CKYVI8Z/eBo y9Iv+oQYfWqjx3SVEVwUY4XPv+jShnVER0hqA5SZK9FQKId6hQEZ2XYTyHC97PT44PlT Lc4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766585848; x=1767190648; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9f/Tx0AROa3eWwm2R5HZI9DWrnOi5C9ZSVDkIMq9+Uo=; b=r8TKqDuyoA3JXBbtFIgklHj4ScMpwdk5PeSuboVGgHv8K8kOV0fuh0DcUZp00E9jCZ XUqayOn0ZJIgMNLi830mzECYYh8fvcrAwEHEonFQSnzzNowYhXsuGXTj9lVXyMApMpY5 SPPvJW+UoY3joENHtLW4XTtx5tOgmHv6VekUdUKW8xvRwsHjTrZjxFILyAtaUvc61WhY RqfBv7MPPaxWD45zMES3tYiRfS+MJYi1dl64nksOF43iyz0DzBIFuE4V1qCdr33BAyaD OCSqMHR0GA4d3SoYvbe+4ookfWvq9TNoAxKMkB1uMc1hLASc7FRqgVSEDORqHghvWFRb bjTw== X-Gm-Message-State: AOJu0Yx7xenpgGHlbTIdUuqPRO61Up+jhzHdRRoow54580FO17yBREfj SB1Jn9+gPxD9XGyNB8y6Gldeiex5hpXwRCZgSfLmQuzBs6StcQ8Mz5Mp7PrwgKbg X-Gm-Gg: AY/fxX6B5dieLbQDRe25MNPFYZrrrmw58oH4ajjT/KSLgGx4804edch2m/h4HgSrHKG Q6S+cwk8WNPtH6f4LNjgGPOcYP7gOZBKaAunYfSqy/LwlIYH7NpsmH951rXLgPNWrBVwe9UyzqK U/Olvy+tKooqe7JpDMS/UnSj0KqSMJSPR3X+ppYYRBQ0/GUo+6h9OcEXECks92qCKNgw2xmggt9 enV8nHuACqpx/vJ3uQR80diiyUMFbH6inLgha9vd/ZFgE2/j1ONTOiUb4wAqCeFp6zUOEMCLmlo zvoUEGx9pjLiNe/gZnUboII/LBy6dZ5XH8ANbuW7NTazSsBumQiO0AHD7aibwOoXNTanmO8Ulw+ ZeOvZOIfuxj5RE3Sc8jlHm+Ai1sEIM4KiD2FAFfg5Cb1koQmnUqn8Dd8wvaMnwgjn6tSgeJmVzh Fj86s8aYzb36S/ X-Google-Smtp-Source: AGHT+IGbMGo8Nd1iAj00z3yO+YGMmIfhg0LpmHObKE1kI8e/a2Tr74V4cZjcm2nzuJEeB6x80W8VAQ== X-Received: by 2002:a5d:5f54:0:b0:42f:bc61:d1bd with SMTP id ffacd0b85a97d-4324e50d78emr21928755f8f.45.1766585848026; Wed, 24 Dec 2025 06:17:28 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea2253csm34940079f8f.14.2025.12.24.06.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Dec 2025 06:17:27 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v2 1/4] overlayfs: Fix QA failure Date: Wed, 24 Dec 2025 14:16:55 +0000 Message-ID: <20251224141659.2218381-1-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 14:17:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228537 From: Vyacheslav Yurkov The QA check for skipped mounts happens twice, at parsing stage and at rootfs postprocessing. Fix the former, because it didn't happen properly. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oe/overlayfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/overlayfs.py b/meta/lib/oe/overlayfs.py index 8b88900f71..dbfed317c0 100644 --- a/meta/lib/oe/overlayfs.py +++ b/meta/lib/oe/overlayfs.py @@ -36,7 +36,8 @@ def unitFileList(d): # check that we have required mount points set first requiredMountPoints = d.getVarFlags('OVERLAYFS_WRITABLE_PATHS') for mountPoint in requiredMountPoints: - if mountPoint not in overlayMountPoints: + qaSkip = (d.getVarFlag("OVERLAYFS_QA_SKIP", mountPoint) or "").split() + if mountPoint not in overlayMountPoints and not "mount-configured" in qaSkip: bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint) for mountPoint in overlayMountPoints: From patchwork Wed Dec 24 14:16:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77426 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 1E2D9E77352 for ; Wed, 24 Dec 2025 14:17:32 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.121252.1766585850949284877 for ; Wed, 24 Dec 2025 06:17:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KZHOwepG; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso58628545e9.3 for ; Wed, 24 Dec 2025 06:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766585849; x=1767190649; darn=lists.openembedded.org; 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=tf/d5/rNSFuUPZ1RytwlE3TNP/F1A9vwqZKBTyPL8kI=; b=KZHOwepGVpFaGz2tolBwcM4HLH1li1mHLCe/HEqMnCPlylEtpF6UXbHyudrwg4MKqk 5jR0WhU/c14pbvIchyQg5nU/p8HY9p6w+mIhMcl2oRw5+S4WQv+rQj5V6TXc6QHUd1ll QSeeYwfJyvkj87qTM4aeXpSikf2r40kOKpkkVFM2XbxXn5z6kdUhE2PmcSTX1cgNnN3l iFCEFZXlR3+v1rLTs5WvUya2F9ASjTjAlELkCW3KreHx30+MNXVVhdI7f2Myt60D0zsG 3vptJU0PUGywIF5iQq6v9amxX+eRzP/QuTqZZ+nAcnRurfydv0e4vZZkyrMJB7sEfNhg xDAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766585849; x=1767190649; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tf/d5/rNSFuUPZ1RytwlE3TNP/F1A9vwqZKBTyPL8kI=; b=U9RXWH3efNKBthQdNDf0ScJEdZ5PCaicQ/GTDpcwaX70nnpcoOBXAAuH+gQLyFGvEf To1ufdySIIHdDNHoA1DndPuhTq7ivN3szp1ay0KX87vkr/g/i2PvT+8WrytTDeg554ns kNnSVU0TmJmZg5IwgOC2K5/4umBYI8OQH1MzVV/y4LLcTD9fvqrdAC+BQnuaJPJI6QI/ NYMK1m7DMhHkIIIIAu+DCIKQs3CFbEtcoPvCcQ4qENWREKk5ZjnNUX1Ad7Xzrdhn+3lc OA2deKW59nMRRLYvFpCcHk1GnS2d70zE3LZIE7QihwdB7YLJyBgr67JIp4cHB5BjaKFT 990Q== X-Gm-Message-State: AOJu0YzCwAdTvwOpxUiScuB9YhmcTbe0Ux0oDGIxj5p3BKW6ZZ9Gnp7f uGaIPj0WUibR1fB9Rjuo0ydMovQ3mhglPeNH5gDPxs12xPvDM3izwtvTqLVM2crx X-Gm-Gg: AY/fxX6SZM6M9FKK6MGUN096FVbBpMjZLAt17FZbaYZKKx8jC/UatMNyBQ5arvH38e+ 24h2DgnEcHknClCcalkdBUzZOEwWfR6ujkTzrXjHCp4/AaoKt6GmbtdlB4CWFqBMuXz5ftUHMOe K9UErFILboF/aRZoZ8FK4jNo4BvtUZmOg6eKce+lMGNANMJnYEEfAW9ymfr2qXIsw8FhUTvpHzr WpNt8qjYsp8JAZS0w7bt4P0n9OgCxQkcT90kOIaJ0+n5InY/yx8dO19JKriLgrxREKfUe2Qh4Y3 VropsKoqlmHi65gCuvr9vzhcb6PGF2K1SrXcgel2uqW52KI2zmFOswGIBc0RJEHIEP+q2vMQip1 iMJBJcU3nG7rsg77QCD0w5nAQV29QqO4L9+fgvlL+Vvjsk1063siJ8WtfAGqp/dnkdNaAM8qmTw AnXH0k74Wo5nQH X-Google-Smtp-Source: AGHT+IHrWgDGPPtG0Gkh5igOaoc3IFdXb9o32sxaXMCRzCO86AtW2Fb8NVXytVVb4g0gXA+aiVOKbQ== X-Received: by 2002:a05:600c:468b:b0:47a:975b:e3e6 with SMTP id 5b1f17b1804b1-47d195a72a8mr180362135e9.18.1766585848751; Wed, 24 Dec 2025 06:17:28 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea2253csm34940079f8f.14.2025.12.24.06.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Dec 2025 06:17:28 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v2 2/4] overlayfs: oe-selftest: Make the test more deterministic Date: Wed, 24 Dec 2025 14:16:56 +0000 Message-ID: <20251224141659.2218381-2-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224141659.2218381-1-uvv.mail@gmail.com> References: <20251224141659.2218381-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 14:17:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228538 From: Vyacheslav Yurkov The test orignally was written under assumption that poky distro is used. When poky-altcft is used for example, then systemd is already set in DISTRO_FETURES, which the test did not expect. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oeqa/selftest/cases/overlayfs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py index 580fbdcb9c..3e55e97927 100644 --- a/meta/lib/oeqa/selftest/cases/overlayfs.py +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py @@ -5,7 +5,7 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import bitbake, runqemu, get_bb_vars +from oeqa.utils.commands import bitbake, runqemu, get_bb_vars, get_bb_var from oeqa.core.decorator import OETestTag from oeqa.core.decorator.data import skipIfNotMachine @@ -46,7 +46,8 @@ inherit overlayfs res = bitbake('core-image-minimal', ignore_status=True) line = getline(res, "overlayfs-user was skipped: missing required distro features") self.assertTrue("overlayfs" in res.output, msg=res.output) - self.assertTrue("systemd" in res.output, msg=res.output) + if not "systemd" in get_bb_var('DISTRO_FEATURES'): + self.assertTrue("systemd" in res.output, msg=res.output) self.assertTrue("ERROR: Required build target 'core-image-minimal' has no buildable providers." in res.output, msg=res.output) def test_not_all_units_installed(self): From patchwork Wed Dec 24 14:16:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77428 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 F2D91E77361 for ; Wed, 24 Dec 2025 14:17:41 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.120768.1766585851669061051 for ; Wed, 24 Dec 2025 06:17:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PxavvaIh; spf=pass (domain: gmail.com, ip: 209.85.221.49, mailfrom: uvv.mail@gmail.com) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-430f9ffd4e8so3303316f8f.0 for ; Wed, 24 Dec 2025 06:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766585850; x=1767190650; darn=lists.openembedded.org; 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=ymMP62CuLvBUz6vCcg7/j0SYp/wC4i8oNW/qqg6JAAw=; b=PxavvaIhLbfrJRuetbcjh/4ckVGD0leoLlc0p8poyulNyWkwK1r21uc0/8RaZrCXRF ipLogTOcQBj1sH1rYVhERhvHxJBte9Tz7bmuh9qBFovH2/xq/UHUzyPxaDKg8sagVSrJ ZA3z5qDmxiMH3v+/1yyxos7LuCL7pRma7egszebG8PIFhoir/h2rNPi8pobO/0B2cav8 TkIA+RWIR+b53O+jaELb03z1VPS5qJUeIz1Jz2AvijaCeHJZn8AOTJYnSBALaPqDtDZs LDS8TDuQEs7oFcaBog1qMOJWRROQDKSylfb0fOmtXeHcxB58NjyZnPgAD+ZumAruHyzr Psuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766585850; x=1767190650; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ymMP62CuLvBUz6vCcg7/j0SYp/wC4i8oNW/qqg6JAAw=; b=C+GUyAVK/5XlnczdMDCOctMAdllyraIN9GGNCmmeBfgkpTF+k8kSFykLRTE89xockX 71t1qEVarMMULpWL/6zbZ8DV9gTufL2ar5YuXwGkTcfiKwKvc5dJaqlAoV9vaWJlo+1a okmIB1REibkLLBWVL9HdJH+GcZR5Gr7J/AwMGDar6M7/sJALpnOo8kGO0qd7QyDboLGr zkd5RlfdxrOri6T67ZFm8dLPuCDSZ6GPW62M9X6Kz8VpBtACGuiwggsOfVSqLptEiduK 2e73W1tjV2A/+fIHNCRxDRxwK+RpMcg5+MmYLBXSPWV4qfw8PPEAE9VRocNHY4Li+7bN nxSg== X-Gm-Message-State: AOJu0Yw5tXyZXOfzIopPtQew9dQtxf24YicE3a1p/OnEqUnuJBVX96lG 87D2bujAqVJaJLOBLBIw7DU35rFsXNLhtv5Z3uHJKCtmqZEXmqIdCD9TeCa+Hj+s X-Gm-Gg: AY/fxX6pckoHEYF/O9tqGqyNdXtBO96t4Txvm4KWwQmpKHocQESCHSFzzDhD8AaYu0U JMp6NG05w/DXptG3rSrloLndmZev+T7xE/rXjfZUN7E6khPJ/bLoTDrRkRe59GopgIUFLmWLkXi XwrfVtd9Qsd9lPasJLR28hpG5RdmG6o7hUIei8u341uo9desYAn/hV4zC/DEu1hoYSw+TnPww+z L35lfDVYq/cBFI94zPHCflGW0kzuZx9nU/3aLVxdgKfeJ3jzXxafYZRqhtu+IaqgkgmCGQhGAbx dV3Y91reKNqoyInPiu9hk6zkTe5H2NbdJHeQd+DKPpfwPGh4cT+KVMF9oQL8E2R29d1H9CbQPeK xlMKL4gw6PNaKWiwoR+ype+Bw4g8uRj1ijoOSJuH3R5aizfkdbyCDVdfHrhTd7FFCnGicYlTSKL mok86jEiv3yNH5 X-Google-Smtp-Source: AGHT+IFMsB7kk4rnS6ERQbiHTbGvZ9fWvkZu/siaKyC43S2BKGzwAtkI894hvU2Sl7uZGmi4lHSz/A== X-Received: by 2002:a05:6000:428a:b0:429:ca7f:8d6f with SMTP id ffacd0b85a97d-4324e4172d5mr22180491f8f.15.1766585849520; Wed, 24 Dec 2025 06:17:29 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea2253csm34940079f8f.14.2025.12.24.06.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Dec 2025 06:17:28 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v2 3/4] overlayfs: Remove helper unit Date: Wed, 24 Dec 2025 14:16:57 +0000 Message-ID: <20251224141659.2218381-3-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224141659.2218381-1-uvv.mail@gmail.com> References: <20251224141659.2218381-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 14:17:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228539 From: Vyacheslav Yurkov Since systemd v256 workdir and upperdir are automatically created if they don't exist, so we don't need an additional helper unit anymore. Ref: https://github.com/systemd/systemd/commit/6c75eff6afd90596d09a33a9275be292db4e3380 Signed-off-by: Vyacheslav Yurkov --- meta/classes-recipe/overlayfs.bbclass | 10 ---------- meta/classes-recipe/rootfs-postcommands.bbclass | 13 +------------ meta/files/overlayfs-create-dirs.service.in | 13 ------------- meta/files/overlayfs-create-dirs.sh | 11 ----------- meta/files/overlayfs-unit.mount.in | 3 +-- meta/lib/oe/overlayfs.py | 4 ---- 6 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 meta/files/overlayfs-create-dirs.service.in delete mode 100644 meta/files/overlayfs-create-dirs.sh diff --git a/meta/classes-recipe/overlayfs.bbclass b/meta/classes-recipe/overlayfs.bbclass index a82763ec10..07cc68ad7b 100644 --- a/meta/classes-recipe/overlayfs.bbclass +++ b/meta/classes-recipe/overlayfs.bbclass @@ -55,27 +55,21 @@ REQUIRED_DISTRO_FEATURES += "systemd overlayfs" inherit systemd features_check -OVERLAYFS_CREATE_DIRS_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-create-dirs.service.in" OVERLAYFS_MOUNT_UNIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-unit.mount.in" OVERLAYFS_ALL_OVERLAYS_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-all-overlays.service.in" python do_create_overlayfs_units() { from oe.overlayfs import mountUnitName - with open(d.getVar("OVERLAYFS_CREATE_DIRS_TEMPLATE"), "r") as f: - CreateDirsUnitTemplate = f.read() with open(d.getVar("OVERLAYFS_MOUNT_UNIT_TEMPLATE"), "r") as f: MountUnitTemplate = f.read() with open(d.getVar("OVERLAYFS_ALL_OVERLAYS_TEMPLATE"), "r") as f: AllOverlaysTemplate = f.read() def prepareUnits(data, lower): - from oe.overlayfs import helperUnitName - args = { 'DATA_MOUNT_POINT': data, 'DATA_MOUNT_UNIT': mountUnitName(data), - 'CREATE_DIRS_SERVICE': helperUnitName(lower), 'LOWERDIR': lower, } @@ -83,10 +77,6 @@ python do_create_overlayfs_units() { with open(os.path.join(d.getVar('WORKDIR'), mountUnitName(lower)), 'w') as f: f.write(MountUnitTemplate.format(**args)) - bb.debug(1, "Generate helper systemd unit %s" % helperUnitName(lower)) - with open(os.path.join(d.getVar('WORKDIR'), helperUnitName(lower)), 'w') as f: - f.write(CreateDirsUnitTemplate.format(**args)) - def prepareGlobalUnit(dependentUnits): from oe.overlayfs import allOverlaysUnitName args = { diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 2a36840f29..f0c7ee658d 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -47,7 +47,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd" ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile' -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check overlayfs_postprocess", "", d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check", "", d)}' inherit image-artifact-names @@ -570,14 +570,3 @@ python overlayfs_qa_check() { if not allUnitExist: bb.fatal('Not all mount paths and units are installed in the image') } - -python overlayfs_postprocess() { - import shutil - - # install helper script - helperScriptName = "overlayfs-create-dirs.sh" - helperScriptSource = oe.path.join(d.getVar("COREBASE"), "meta/files", helperScriptName) - helperScriptDest = oe.path.join(d.getVar("IMAGE_ROOTFS"), "/usr/sbin/", helperScriptName) - shutil.copyfile(helperScriptSource, helperScriptDest) - os.chmod(helperScriptDest, 0o755) -} diff --git a/meta/files/overlayfs-create-dirs.service.in b/meta/files/overlayfs-create-dirs.service.in deleted file mode 100644 index c8431548d7..0000000000 --- a/meta/files/overlayfs-create-dirs.service.in +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Overlayfs directories setup {LOWERDIR} -RequiresMountsFor={DATA_MOUNT_POINT} -DefaultDependencies=no - -[Service] -Type=oneshot -ExecStart=/usr/sbin/overlayfs-create-dirs.sh {LOWERDIR} {DATA_MOUNT_POINT} -RemainAfterExit=true -StandardOutput=journal - -[Install] -WantedBy=multi-user.target diff --git a/meta/files/overlayfs-create-dirs.sh b/meta/files/overlayfs-create-dirs.sh deleted file mode 100644 index 9954c34352..0000000000 --- a/meta/files/overlayfs-create-dirs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# This script is intended to be used sorely by overlayfs-create-dirs.service -# Usage: overlayfs-create-dirs.sh - -lowerdir=$1 -datamountpoint=$2 -mkdir -p ${datamountpoint}/upper${lowerdir} -mkdir -p ${datamountpoint}/workdir${lowerdir} -if [ -d "$lowerdir" ]; then - chown $(stat -c "%U:%G" ${lowerdir}) ${datamountpoint}/upper${lowerdir} -fi diff --git a/meta/files/overlayfs-unit.mount.in b/meta/files/overlayfs-unit.mount.in index 9c117f2c52..eb78d2cb4f 100644 --- a/meta/files/overlayfs-unit.mount.in +++ b/meta/files/overlayfs-unit.mount.in @@ -1,7 +1,6 @@ [Unit] Description=Overlayfs mount unit {LOWERDIR} -Requires={CREATE_DIRS_SERVICE} -After={CREATE_DIRS_SERVICE} +RequiresMountsFor={DATA_MOUNT_POINT} [Mount] What=overlay diff --git a/meta/lib/oe/overlayfs.py b/meta/lib/oe/overlayfs.py index dbfed317c0..3805746d90 100644 --- a/meta/lib/oe/overlayfs.py +++ b/meta/lib/oe/overlayfs.py @@ -23,9 +23,6 @@ def allOverlaysUnitName(d): def mountUnitName(unit): return escapeSystemdUnitName(unit) + '.mount' -def helperUnitName(unit): - return escapeSystemdUnitName(unit) + '-create-upper-dir.service' - def unitFileList(d): fileList = [] overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") @@ -47,7 +44,6 @@ def unitFileList(d): continue for path in mountPointList.split(): fileList.append(mountUnitName(path)) - fileList.append(helperUnitName(path)) fileList.append(allOverlaysUnitName(d)) From patchwork Wed Dec 24 14:16:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77427 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 F2DDBE77364 for ; Wed, 24 Dec 2025 14:17:41 +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.msgproc01-g2.120769.1766585852490828071 for ; Wed, 24 Dec 2025 06:17:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z4upecNl; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-477563e28a3so37719545e9.1 for ; Wed, 24 Dec 2025 06:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766585850; x=1767190650; darn=lists.openembedded.org; 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=L5kR8OSwbwbyvU1F65LcDbCo12d4ev5DGQDKNw20SI0=; b=Z4upecNlW3BXepKbkhUdSLvHeaPsTxXVaHHjQYHtCBUK+F2ElYjynPx9KXZG2UjLa5 9bpyOdJxRPdmI26OhiSp7sa2VKIi8irDD5OwYZ6e0s3a5Z89lbYecT/LUGBxD5t6eVtd Q7mcrn7xlmGrBU+qUvHZB7hdQyb3G5ud/AqJJPDEeO8euec4BQ6F6wtHkYbde/fW92iR VAFdqQbT31RuK66ESpWlgq7xcKolOL4+ApNOQc0/TE43jCwa1szrJ9ffcZ7gfjKXn//2 J1M5fnCKTLwGHtRGh9/5kMbLViXliGACeZLrn+TJehfYivDY0maEWBC9ETQRXNmEueI6 vDVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766585850; x=1767190650; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=L5kR8OSwbwbyvU1F65LcDbCo12d4ev5DGQDKNw20SI0=; b=aIJ4VS38A79nextKI+AkWoilGJ9okN9ty81iid+F0ipVeWwUOkEAX89rxSxlmcUxSK VgHWEW0DQo+LsSnvHUhd68YbyHUXQZwBxXjDNvu8EBcRyG1CBkXMZkiAcyNBlBVGWNRG G+zcemD2H/3LQt7hilNzDTIeV6egKw4cQpw/YlMcPVfdlSsdWK4vzzarup757FTd2f2t ioenJdaddZc7UK8fWQPQiX8yLd3Yc+Qn8sH8M5IczXZZ/c0sq/GFl6g3Q3Rlc/nVZXfN lzwGuhLCSE1JQsLZGNpiaE6f7yk9wLyp7YUfGamW58Z+aatkHmn5VHiCC/UlvXqjJPyW adfA== X-Gm-Message-State: AOJu0YyoYbxDpT+UnyLTbjeqAbv3KKPI3/iO0d7lXSnjmdchZiYuUtcY PczMoWO0Yg4zVmoCedH/dP9/Dm94X+zR8sWQoQgc2Rn18EZXE8RmpfG7dsHm6Cn7 X-Gm-Gg: AY/fxX5P+lfLNOHIiTLgoznCqqKyxZDy18pqTNk1LduHwoWxtjpBxeen6z8lBTEPyfz sdM7hlB0pUNtkUHuX6tQzVRksmdGlnz9t077LzdzxN+h13Me2aEL4eM9o2grTw/qetskq+I+t/B NvOndHncfAn1jzIwMcJcNVMZyWDFHy9Ueu8ItIKGuSSn7TbpU+DUp/beJ4J3DKRJAz1ernc4SVM C+sgthIoONBxm2wypgb4M30qrf3eLZbVJ96R+A+C33+tfeNYiGHf11zvDAupiS2wK3/jopMk1Da SecRM6U83V698qXLGBNrre+dBMYQiKbkSEBYhbhRLfMoiWyvM9kdnGr+5v5g16k4i+g395muYgN mvLGHFz9nKS50rORYGx2/hD/hYOSqWDFkZYGGqpVcngL0MhT+TaEBYPlnE8TJP2l7g70wrLI0jS VyYHRBFFXwMQDU X-Google-Smtp-Source: AGHT+IFpWFEw+SbyR8qy5+g67o5ZTb75o07oMvJW8Y4nSXJAHOqjsn/9MoomaZvdaKs9Bg9BgHK7ng== X-Received: by 2002:a05:600c:5795:b0:477:991c:a17c with SMTP id 5b1f17b1804b1-47be29ad8demr162285575e9.6.1766585850200; Wed, 24 Dec 2025 06:17:30 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea2253csm34940079f8f.14.2025.12.24.06.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Dec 2025 06:17:29 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v2 4/4] oe-selftest: overlayfs: Add a demo case for /etc Date: Wed, 24 Dec 2025 14:16:58 +0000 Message-ID: <20251224141659.2218381-4-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224141659.2218381-1-uvv.mail@gmail.com> References: <20251224141659.2218381-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 14:17:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228540 From: Vyacheslav Yurkov /etc is a special directory. It's possible to create a mount unit for it, but many system services that start early at boot time will not rescan its content when you mount overlay on top. The added test case demonstrates this by adding a sample systemd service and enabling it in overlay. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oeqa/selftest/cases/overlayfs.py | 98 +++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py index 3e55e97927..426b4ccee3 100644 --- a/meta/lib/oeqa/selftest/cases/overlayfs.py +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py @@ -263,6 +263,104 @@ EOT self._test_correct_image('systemd-machine-units', systemd_machine_unit_append) + @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently") + def test_etc_mount(self): + """ + Summary: /etc is not supposed to be used with overlayfs.bbclass + Expected: Observe inconsistencies after using etc overlay with a mount unit + Author: Vyacheslav Yurkov + """ + systemd_machine_unit_append = """ +SYSTEMD_SERVICE:${PN} += " \ + data.mount \ + etc.mount \ +" + +do_install:append() { + install -d ${D}${systemd_system_unitdir} + install -d ${D}${ROOT_HOME} + cat < ${D}${systemd_system_unitdir}/etc.mount +[Unit] +Description=OverlayFS mount for /etc directory +DefaultDependencies=no +RequiresMountsFor=/data + +[Mount] +What=overlay +Where=/etc +Type=overlay +Options=lowerdir=/etc,upperdir=/data/overlay/etc,workdir=/data/overlay-workdir/etc +[Install] +WantedBy=local-fs.target +EOT + + cat <${D}${systemd_system_unitdir}/data.mount +[Unit] +Description=Persistent storage partition + +[Mount] +What=/dev/sda3 +Where=/data +Type=ext4 +Options=defaults + +[Install] +WantedBy=local-fs.target +EOT + cat < ${D}${ROOT_HOME}/test-daemon.service +[Unit] +Description=My one-shot task +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/echo test +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +EOT +} + +FILES:${PN} += "${ROOT_HOME}" +""" + + config = """ +IMAGE_INSTALL:append = " systemd-machine-units" +DISTRO_FEATURES:append = " overlayfs" + +# Use systemd as init manager +INIT_MANAGER = "systemd" + +# enable overlayfs in the kernel +KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" + +IMAGE_FSTYPES += "wic" +WKS_FILE = "overlayfs_etc.wks.in" +OVERLAYFS_ROOTFS_TYPE = "ext4" +""" + + self.write_config(config) + + machine_inc = """ +OVERLAYFS_MOUNT_POINT[etc] = "/etc" +OVERLAYFS_QA_SKIP[mnt-overlay] = "mount-configured" +""" + self.set_machine_config(machine_inc) + self.write_recipeinc('systemd-machine-units', systemd_machine_unit_append) + bitbake('core-image-minimal') + with runqemu('core-image-minimal', image_fstype='wic', discard_writes=False) as qemu: + test_daemon_path = get_bb_var('ROOT_HOME') + '/test-daemon.service' + status, output = qemu.run_serial('cp -f ' + test_daemon_path + ' /etc/systemd/system/') + status, output = qemu.run_serial("systemctl enable test-daemon") + status, output = qemu.run_serial("sync") + with runqemu('core-image-minimal', image_fstype='wic') as qemu: + # Check the test service status. It's enabled and supposed to start, but it didn't + status, output = qemu.run_serial("systemctl is-enabled test-daemon") + self.assertTrue("enabled" in output, msg=output) + status, output = qemu.run_serial("systemctl is-active test-daemon") + self.assertTrue("inactive" in output, msg=output) + @OETestTag("runqemu") class OverlayFSEtcRunTimeTests(OESelftestTestCase): """overlayfs-etc class tests"""