From patchwork Mon Dec 22 11:38:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77121 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 A3D43E6749A for ; Mon, 22 Dec 2025 11:39:01 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.78510.1766403537406595680 for ; Mon, 22 Dec 2025 03:38:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S9CoSI3f; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: uvv.mail@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-42fb2314f52so2211396f8f.0 for ; Mon, 22 Dec 2025 03:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766403535; x=1767008335; 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=S9CoSI3fWY2mkmmusxDP3C8cQRfn1NYokwDlhSca19ZsohJ9US/zVCNoYQQ9xZvSAB xRrPXJI82iHtwuxTy6f8kisEzbYwvIKUrBHTSZ9e43AGoLIs8tcNI8UL0jjHVgYLJWM6 DlRUUGeh0tJutQvJRGPpawLahkZgTQxJyyrBjWfRwqYNij/RK2BgYNJubRv8+FJ5hd1D 1b/EwDf6Zvu6K/IRvlQWQrLOX0OddkAD7eTDnbGiT8VuLOid2qWKji92U8mm4ucHFPrj ZyNjW1r442s2R8/pM6nkHkA/nVn+/uQTS+bAfL8jJbdxo9wQb1FraM3ykb9Mnwx+5bMS LzdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766403535; x=1767008335; 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=v9TawiHk/NTUtvXLq3NRqRaA7Z/aLjfeLOfPwW1VgjMZJb7UePCoSfax2qFVNxgrMA IEoogTV1PpiOZb9pwZ3gDsQdtXDzfpgjhdV4hX2qor5n1g8Zr0SzxKEztQr3YUfOBPJr LCIwtJyMn/3psTT9ZPRZdujSm8LU9b9tNI+B5dB5MxMhs30WU5rlUWctOqtgd/GBiOCo HEoDVUDuUZPYK9ai18GpNl7qfYornFSQAlD4gGFhFuI22QUetKGwddkQMuzUJfoL8fpF rYqkY69l10oiAX1wjriEZ3iVI70Cuz58OcdagZgd5sC6bEdgtXS8jr/vX+ZRU2NxLfI3 oWyg== X-Gm-Message-State: AOJu0YyM+1s6OHdEUPm2vkVL2JowfhfAdG4QnrYvmqL1HLT6Xbvcv97b yZ1Ke9KGEmfVg99pI731ybEbDO0Zz7O0+/QZMjg95ctuErKWtAFbNrzTgCkAjEzGw/4= X-Gm-Gg: AY/fxX69Kxe90Ii7QTrvalXA1cpJT1RIzENpqmxpmOF4bbMBpbr29vTORT9wM6TqeBS YF2jRLSXLffM/Dft1/ZAYnWardcNY4P4fgEDRXWmb+709vCl7B/MsTyV2tcXj3icatmCwBPJ5Da RdoJQdbS05xpKp+r5g5elUW57M6nRr0cJ5RHK/6yUb6YSObz69ITbWz8sri9iRR0MU742lDFMt0 N2/5ychRPWoSRrx7T7fuJjeyi3rPkupowRuu0As2unJz08gvCKM+BumT0kPo8NY5cA+NY8yGPf0 Gb+fTlqUQrrOcQ+x7hpsaDo/52QY/paTJQd4LwJsj52dNG0G5QyGgWNO5b5WS9vDMIWlnEuZTwf C72tWFcTmOCSnrptfZ6gALijt/m5qZhEvD4pmZnV7ojKbERjXBnKNbTFgjrjd7f6ECiC5Jfgnlg LI5GC63lPIrml0Grnbk5S6d+c= X-Google-Smtp-Source: AGHT+IG+7dy98FYZjYbZksZ++uuHRyEg0UF86EfhKay/96wmIP6MK1On/Vm3r/KFeDhkHlBHTzUCYg== X-Received: by 2002:a05:6000:604:b0:431:8f8:7f1e with SMTP id ffacd0b85a97d-4324e50e0eamr12129854f8f.48.1766403535102; Mon, 22 Dec 2025 03:38:55 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa08efsm21720373f8f.29.2025.12.22.03.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 03:38:54 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH 1/4] overlayfs: Fix QA failure Date: Mon, 22 Dec 2025 11:38:37 +0000 Message-ID: <20251222113840.2163929-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 ; Mon, 22 Dec 2025 11:39:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228297 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 Mon Dec 22 11:38:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77123 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 B11C9E6749D for ; Mon, 22 Dec 2025 11:39:01 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.78511.1766403538290483868 for ; Mon, 22 Dec 2025 03:38:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K4i3GNKI; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-477a1c28778so44190235e9.3 for ; Mon, 22 Dec 2025 03:38:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766403536; x=1767008336; 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=K4i3GNKID8gyi7F908nG6DinDZYJM3XUvcLkktRx5mXNnzUNiduUauayWnqzxGNsmK vkSSsQNEgNAkeVGpMquDc1lFgWXrIedQV+kpvI4DTo38NNoLlqtmixDWKRm31K9S2ib4 X8PJAtuLlYC6oCUOSFka8vntD+0zn6nBVK+FcMeTK50VWJQw0D6zLO1Jw1SUin+paiyT B/KNoPc32xcjhuEpKUB09Ff3Zeg6fOy20x1vrFvrw/AWdKa6Gplcziz6Ivul/B+aP6f7 6LvyQyUg3Tdgem3ciI8KoH7Jo94KYJn286eV5Zt6Dj51e4GfZasiBpzybfw1P+jRig/H UeaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766403536; x=1767008336; 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=tksTCukBeEI2ayJ/NUvUphSkJmzdWts9fFWQANvTXdvSqXHA074gjqnQOVTAlFnniu OrsuJaTXH8RID5PP80vzsXnrKKXeMy6GMvzgJSQJ9x9RHMyuRzV+8CTriMD+HGvVqGxD lEj3U8Nuy5lSs6cB2AuRGO9/daeGl30lL/4kkLdIR7xo3zKhUKIzKnIfaViFbILR01cf qRaX7yCNM9aSN6IQ/YA7bmDtOnSw0NkWiLMxF+kg5PtVlQlKfcgJllGiJZivxid4HoTA TPb5qPq7kaUI90ppA5k6VVklHBqwhDynfmq5b6mLKm0R3LuEU0FbPF+uiKhKykjg2Xcy KEBw== X-Gm-Message-State: AOJu0YwzLUDTAJ23WjQCw5DlZQdYETvCOL2P/y30K13wzq6m8gQtqDmQ cXL0c9r6kJu+Lylq2som+mnvykmitRz39E9zRVk94SHUXeGbS82fqjGLhYjEskvn0jk= X-Gm-Gg: AY/fxX4ImJ1shxT1PdlHo6QBttRaQUZLdvycgeKEendupYeK1b5vsDtjTVbx0w0i+oN ZJY3gkBJ7baycL6kycTk1dSmcpX+eVDH3174Y9QJ2xN+ZHRg2uN40VE++Xa3rFfj9NSl1SClXqy 5dptCtXAMO6mBxjGSK4HHED7b0oO0QZ0IEkb1gIVVTUh0PCw/1MUbPI3POzuflpIdlrWs6go59j 7Jd8E7VoqggSod5hOp+S21fC8ftlp967cGAoPVeNh8ghEKNouYUms7Fmec4TKNFIkTU9nlnH8jK 9E6EHJbRWSUgg0oDnDUj/FpVsgbaSEs4TGoUI7TSvaLgS4DlzYP2H5ZUwDRJJ9MmfRUYXJzE7nC loVQrvyZ9Hzc2rbkdD5sjbKgdINfM5QSCNjntmUW2Idaq/g9WcX2Qy4aCGeN2A3nkrofheApKqE DG3mxTrIz9eugj X-Google-Smtp-Source: AGHT+IF57BfHU9H33SaazjIMrlDYIJ4vVP4XKdFe9wr9/4WyqpAJuKMF8r+cst/PNL7gT0NeP5aPuQ== X-Received: by 2002:a05:600c:4e90:b0:471:989:9d7b with SMTP id 5b1f17b1804b1-47d19594b70mr122289255e9.21.1766403535924; Mon, 22 Dec 2025 03:38:55 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa08efsm21720373f8f.29.2025.12.22.03.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 03:38:55 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH 2/4] overlayfs: oe-selftest: Make the test more deterministic Date: Mon, 22 Dec 2025 11:38:38 +0000 Message-ID: <20251222113840.2163929-2-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251222113840.2163929-1-uvv.mail@gmail.com> References: <20251222113840.2163929-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 ; Mon, 22 Dec 2025 11:39:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228298 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 Mon Dec 22 11:38:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77122 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 A27C8E6748D for ; Mon, 22 Dec 2025 11:39:01 +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.78452.1766403539117388166 for ; Mon, 22 Dec 2025 03:38:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dKX5DS1W; 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-42fbc305914so2951773f8f.0 for ; Mon, 22 Dec 2025 03:38:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766403537; x=1767008337; 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=dKX5DS1WrQ0+RNokYD5JOHq92B71JsM6erMunhOe4D6H6xRPArwtKCh+mNbMjIIYPy OZyAdbE8UOx3PzylSXB1C+hcF9a7ELYNthlYaGyVz/dDnixCBSGbjjXggp7P3LFxJCLW YyH9X1c37uSXZE0+ihQVlK5R6Ci4No5t1eGf4CnEFpBI3ei6GvIVQ0H6oovZAh9PsNRV OavcA0S62NGCzNTuIRxhEOjDlOcEdTtk/VvKsmxyyaz/V+P9XYpF5EkPGnJC0KUR/Zdf JHgsIXoSBngPi0Tl6iqY9qDU2qdLX02NCz8WTQayPAUQJfyY5g2t8PgMF2gjKSPEhazv H19w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766403537; x=1767008337; 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=K/O1EbqLpqVN7xjP8Ni1tt0TnRuXYhP2jv2+zh/S52WvefhqDgBj+WOy+KCJ7NXvoT i/wu194OO0Va1KSEFNvr6eE4VIFvcv3xSq9QSiIUESCfHOtEd9bqve37Phccoo6Zl80i lAX0vMUYkHZPg+YIE4JvOxYeCChY9ZrmZ689DoMbUf9HfafrR/VpYan9RHbWdFH8HgyJ 7f0EnFfzQxMfz+NlXFP0r+6+6ROVMxBXBdHYzRyo5CPbo4w/iVtSSwD3mVgBP9B3i+om LesLohjOwb3biLvQC+1tTlyv55iOOK7oM13ai2ZB3/pCsOfUq0t3Verq+8J7aDMgxzZS aYcw== X-Gm-Message-State: AOJu0YzCClCxhRad49y+cJVlAJfNdMMoT+hzK2sa0+CGkDod+/Mt86Kf diDxk/Jx1Uz4BpVKbKi0Efu7MsVClbwBlkGZt9EiDFkmCt9oAkusrYD4cUfVJeXNrI0= X-Gm-Gg: AY/fxX6+4N53bLB71S3lSIJv04a5o5kST5VTXHiO5NHKi4lG6CX0kQFuczjSz1nbwzs jjJP4VFeyetTHOvpJSbMCBvkL37/+DKsVPiE0crzTNuy7nhh4pv6PvMYi28QuSJKd9lrz7SSENx zTPMZGRpocg3m/8JFgimk53RMNPSE8nZ1QbAbbcWgwNrXjTd6ToAx7V5gLDaggJeiiwxgxI6mzE d34CxUmr30dsbNHrdvptSNDH5n5wS99bfIdSOkjSXnMree6BkoxUcgjkvBAezNokAzjAtEY2rGN +AU1fHmx/oSJD58/4lQWZYymELMzCFm1ksKPvOFpAxHwQHI2aM7AcAnTMrhFq2m3oCs92+WVwjO yLlhetGD/knUQINxBD4OcGPRWUH2FUk/QVjYOduL6e3Deh9wLFEa13ShGl7CldJju+wvZWFPKr9 fayqCvcXqkuy7c X-Google-Smtp-Source: AGHT+IEjZJku39oQyA6bxdSKeJmM3/jg5XLZ7gY/Tp+2biQxUw/TTG7760PZgrodj+CxwsqOBRtapg== X-Received: by 2002:a5d:5d0d:0:b0:431:3a5:d9b8 with SMTP id ffacd0b85a97d-4324e510810mr12072744f8f.52.1766403536808; Mon, 22 Dec 2025 03:38:56 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa08efsm21720373f8f.29.2025.12.22.03.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 03:38:56 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH 3/4] overlayfs: Remove helper unit Date: Mon, 22 Dec 2025 11:38:39 +0000 Message-ID: <20251222113840.2163929-3-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251222113840.2163929-1-uvv.mail@gmail.com> References: <20251222113840.2163929-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 ; Mon, 22 Dec 2025 11:39:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228299 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 Mon Dec 22 11:38:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 77124 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 AA3E3E6749B for ; Mon, 22 Dec 2025 11:39:01 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.78512.1766403539786653773 for ; Mon, 22 Dec 2025 03:39:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PliGtafP; spf=pass (domain: gmail.com, ip: 209.85.128.52, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso38278265e9.3 for ; Mon, 22 Dec 2025 03:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766403538; x=1767008338; 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=oToKjaL9pfg18oimfCQOZ/WHY18gs2mEq9bx8uN6eq8=; b=PliGtafPuYJvuesNsR0eOEOlkCI4c7hFLowWNjOfTx0JmvFVVuoLwQx2Yqo4W631EL zBi8Zyq2fcpHtJKqAzZr+xEFXxQ/BoTbSQDgVO+LliArdIaRbZomEkF9PBCvW3NfTELu awdlS+sYg7tAD7thZchC6quVyZ2eg22gX5ZPVaAUrzt/tG2DlLOkeseZ11dAUffyG2Hc boz+Cu5+pmHcubdbcSPEgQvbjh4Be9hDD2L5lKUR4WkTH4jf1Q4Seg9Zp/0FjjkUb376 WTuSvhXbFlfz9WOzZbSr792TQHh0a1y9p1k0i9lxHUiqalyPIfGPbOhq557C8pPWF85f u1aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766403538; x=1767008338; 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=oToKjaL9pfg18oimfCQOZ/WHY18gs2mEq9bx8uN6eq8=; b=DnMtesPjGXjFp2yog0Rc7/vnvKTPMNYvaSocC6vqym69P4CkIu1xl38jGbDfwCxaPG Zy5DY2ZFrT98NDHnnOKyCMIfmy9oo7mMDF2qYUIcvr31vLDOU9GQw0iPXzY32AFM0FYz euhELLIqoMtCddISj/dNrQDAmMygpldjNvJ/JLkyw5kPAaBXJKu3kXZAWeqIsyBho1zi g2pn50gciKyMYXP18Wd4cJyVnGC9W1ZGHqspeMjNCbgeAMwhboRjH5FSPk674hUUdeoe EZ0ZABev7/82RSnDir3dRM3DzeWB9+4V7AO/qJSJusePyjCLrOFdoTqWh7+mG0ikJXCR C0Gw== X-Gm-Message-State: AOJu0Yw/gvhY1UD+gMC4H/lSGZJefuaKrpB/4lPjmacZ1khSKpqj0mks LKGMNlzB2Jl6ioq5vO2bPWTYP33XXU7eVQp9t0+BTunn3g6Rb0xj9L2oJ+I89aviNJQ= X-Gm-Gg: AY/fxX6D1shON62OC8j0LmA93iYdskoo4inBYHKyvA7rgdPVHvzCOzN+7EhH+dUlmx3 mc/Wu7mClPejNyvLByl6tcldhbhJJm2KP3cFjZO+8HiUnpX6jX5YB+1DMD1F1lz7qEUq+d31g5y ThphUtovuJYdtmZVDvPhOa2hh9D1fW9rcaNVmqLUW95VaiaTzEOdPileMaw61RHfbzc6A+gwHoJ bt6exVPb9R4laiZceonFB6NIMdOs6Emi79wj3Ag6yueSP8j81PfRRAAcmIaRO3g3glxt9wbpAcC Qn1lUUV2DnWKmEo9sfq8UfdHmtrkPgpHFL/HMmoaLvwBUVVJo5dSac0BbeM8BLHOu9byurCfMw1 J62Sc4OTXhRu0fzJ7up61Jmq/dMi8bwIlietfMD9V3ri1F59DVbyxNwKuXEGz4GoDReRMVVQpG2 Qx14H0HnZyZnL5 X-Google-Smtp-Source: AGHT+IEdCRbhz4I5iPgUJ7RNcP49HGdYcZ8IOoe8A/VQjR/GQOceQJStrEpSY7wy0ldLaJE14dpuew== X-Received: by 2002:a05:600c:3588:b0:477:fcb:2267 with SMTP id 5b1f17b1804b1-47d1956eb88mr129125985e9.8.1766403537684; Mon, 22 Dec 2025 03:38:57 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa08efsm21720373f8f.29.2025.12.22.03.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 03:38:57 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH 4/4] oe-selftest: overlayfs: Add a demo case for /etc Date: Mon, 22 Dec 2025 11:38:40 +0000 Message-ID: <20251222113840.2163929-4-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251222113840.2163929-1-uvv.mail@gmail.com> References: <20251222113840.2163929-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 ; Mon, 22 Dec 2025 11:39:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228300 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 but 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..288d889f03 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) + @OETestTag("runqemu") + 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"""