From patchwork Wed Oct 29 12:08:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73278 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 5E903CCF9EE for ; Wed, 29 Oct 2025 12:08:47 +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.web01.4692.1761739722591081226 for ; Wed, 29 Oct 2025 05:08:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PQqNFhnK; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3f99ac9acc4so6792680f8f.3 for ; Wed, 29 Oct 2025 05:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739721; x=1762344521; 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=YFW2Qo8Rd5Mlmq46SBmrGDgobhiW+dt6D7ZuKkgVJcQ=; b=PQqNFhnKaQuMEF9b4Cs8CbomgWFXmPj8L7HNmytPonVA1wmpX5aQ/J4kK5MatAoS+7 mZUpsmV9yIy/4siJ8csd4hP8aon0MOSA0as4y+inyfV4FOMJSgJiKCUqnSYoDishLcAA DUikLIviK6vw5pPCEcIfnaLC8yaVhMcymc/xZFCIMzknAY/sbGYMIEQqZo1C4j9d+sNE KFvYzYjmvyXFk2Vrd0Q9xDAMwWZd2KD3jg7zJYoFTbZweqPHpe+S+9GHag+tbtmzr5bg U3xwnQbwtS67tn2uCUBFzMJwlcq7THSFyMkOaUyixpFpVreXHqBT/j2rWX2MdWv21Ki4 Riyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739721; x=1762344521; 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=YFW2Qo8Rd5Mlmq46SBmrGDgobhiW+dt6D7ZuKkgVJcQ=; b=oegF5DHXRPDmRLrd7G/sCkbFEOHWOS92NylMzxwlNHFUSQbM3HErFmRXjPPxot6xnt KGKbaa5PnZvJIysuJUvrBbUaYAP4jrVUh6YSPj8INAaVbdgaH8TK1eK2hNBvBer6yBwF LhM5i274D0W9f3b/J8mTq0QAJZFUWZ0nFx6vaxqyvFZv235oY/+AXHvOgaELXuIJiGTV +OKgTuzEb51MTmO0RnnlJq4/yHstry2zlXoGMC8bgt8uWC7Rynr/lEo8XnK7FDUTwGYW zh84sakHw5PWTDWRk+X38bK9HyNugPXs25v0uToqLQKv5JhESWO/GnTU24iQnB3KsDXt s+qA== X-Gm-Message-State: AOJu0Yy4aHGUkHPtTFpDTaNDfPc12zUw1QAyDev7cwWzhABN2v/7jaLF u/jUdq8KFlSQiyzJQsq0YyRd4P8cUekEhZ6pJf9N1fbz/I4j+pFX/OXZ5xEdBA== X-Gm-Gg: ASbGnctKuEPkP5+3zxHXNtbcd/fuXKeHcfnPNsuu3hIqJEDouTGKSJHf6D9kT4j4VAF 6WyH+oo6eMm5aPmjwVOPSOCzctO+xaD/XRraRcm66WVg1lepccLhDmmBcJ9KzlPeu9wCLcP29Na dHjkkgl+5yVmy3drEJuYETtP2Dk9eGmwL5ka6JquAKI9/+X0uf2b0s/+6V4vjoWspbZUztS9Bi9 vkejdfsS7UnI0fb2QiJdjaGfQAli2c3IBJY4cbCsT2T0xKEyNkESRkmEx7iH10WraYs3KklM4JV caA7WS2EILttB+ugEKKIbvsdsieRJT2qCMQnB0K+7gc4gqmRXDC3WGcfs6U7JKJ2ZRQiyW/L7Up sxqxtNIMdvVGxQKPkdPmtmycbhA6UYN4mK35jfQdt/Q0EK1NY5DT78hEPTOl3RN8HnIPODY5q3I Q9bY3BJt6Qrgb/wAeGi1w5kL/+WfWxtdtD6orKFau+DOxu40R3SJ9/HL/pmEDENvHDRlK0rSmT3 LYBYZcZy2+cgYQY6/N446w/FD7kUJyXzo9reeufLoab7xNsKg== X-Google-Smtp-Source: AGHT+IE6mD2InEL04J9k5GD6JBpfCLcJhdT7JDdfuJ1wZ9lHdMzZdJrEDN9ChCWzsyIXZ17hS6Gugw== X-Received: by 2002:a05:6000:2f85:b0:3ff:17ac:a34b with SMTP id ffacd0b85a97d-429aefc03f0mr2203450f8f.42.1761739720762; Wed, 29 Oct 2025 05:08:40 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:40 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 1/6] bbconfigbuild/configfragments.py: run discover_fragments() only once when enabling them Date: Wed, 29 Oct 2025 13:08:30 +0100 Message-Id: <20251029120835.4075555-1-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 29 Oct 2025 12:08:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225449 From: Alexander Kanavin Signed-off-by: Alexander Kanavin --- meta/lib/bbconfigbuild/configfragments.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index 21baedc9a42..60cdced555c 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py @@ -97,8 +97,8 @@ class ConfigFragmentsPlugin(LayerPlugin): print_fragment(f, args.verbose, is_enabled=False) print('') - def fragment_exists(self, fragmentname): - for layername, layerdata in self.discover_fragments().items(): + def fragment_exists(self, fragmentname, fragments): + for layername, layerdata in fragments.items(): for f in layerdata['fragments']: if f['name'] == fragmentname: return True @@ -136,8 +136,9 @@ class ConfigFragmentsPlugin(LayerPlugin): enabled_fragments.append(f) return " ".join(enabled_fragments), None, 0, True + fragments = self.discover_fragments() for f in args.fragmentname: - if not self.fragment_exists(f) and not self.builtin_fragment_exists(f): + if not self.fragment_exists(f, fragments) and not self.builtin_fragment_exists(f): raise Exception("Fragment {} does not exist; use 'list-fragments' to see the full list.".format(f)) self.create_conf(args.confpath) From patchwork Wed Oct 29 12:08:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73280 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 5CF72CCF9EB for ; Wed, 29 Oct 2025 12:08:47 +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.web01.4693.1761739723121308876 for ; Wed, 29 Oct 2025 05:08:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L2Ons2mF; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-4298bada5bdso6570012f8f.2 for ; Wed, 29 Oct 2025 05:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739721; x=1762344521; 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=H5geehZB+fuuwVs1YevvA3XfvsCc2V3I+PnOtS5bFBE=; b=L2Ons2mFZjsAkjsjFeH43ubzYwwCXzjhBbFLuaPS/Fl1Ll8am7V46fNZ5AmLtHobbb 0Yh/Q6iErj2N/we/9QpILJR5bd/qP+kP8Fs4uJm8OmfkfMPY5PoEFiEFhBekv+0x6mQV KBww8/CmdTr3UUGVjnaD4K8VXF4+qmzEAzhBuUGk/XaMcMkuw0aHZCnU09qELuFrD4kw P4Ge7NbuK+PxAzqpfByP875fZDxMV/83EO4AVHG7tGV0t+LO5FQRHTBcSOLSb8gixI3c m6CC97zgGg62/MuiikASCislVj+Od7RWkVrZn8bzvNJYdxY67D1HmnEPwGj7rV8e4Hn/ QTGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739721; x=1762344521; 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=H5geehZB+fuuwVs1YevvA3XfvsCc2V3I+PnOtS5bFBE=; b=NUjb9FDRyXf7vLGtGoDnbXxDedX4zBRF8bceiyQMeMAXDJdhfsWB3HqZxiYRfF+Hx6 6h7flr4ALwNkstclqO/guJOBLtG7yTiBXbP/zCnEnkfz+Jn9z4lmpaDLmHtyxFfn5jvG 81iyWZTuF0e1LcgJugOMIz+D3wt+xdkEmsi8l+OTBEAi085+uKrHC0ZREFl2ZAWCGHdV Z2rfTgS5tVpKKzNUx/XprhL80H/a32DPeAMFuEM4X6lDbgJoz0KZqbfj/UZ4kj88VE1s taNqcsGrjvWboJu7z/rUZ+V00IKUOst0KQPb1QlPxmP3iZsPu7mHF03bmw7pkCuNMVQO SkPw== X-Gm-Message-State: AOJu0YzfWBeZBrv5HtrY20FqDCs0IyTzUaV3fxTIS59fw82L2yXEqtol nGkTISVnOZTQfBaai8nWkwGOCPV2k78kcmxhm4iZwXbi7Karbigrgn1V8HNE6w== X-Gm-Gg: ASbGnctd/ysRLmg1ETVZlaLY24Nk8KHd+KBgnyJjaZ/fhsp3CSJBJsI9Lbux64TJapr l5hhfJe5F49ju2MOswFezQDBBKQ83o4i3iBZUE030rAREXXVY2gdEW4Kny7Ik6fnlVjMrKZxTC+ dDwO65gngPtyvcoIZF+qlq1yI69t82ZT4bWv5Z/RvqZlBsrq12RZjtMfgATjkUmbcPABTaRbbqB azeff3lLBfAFrLblFCBqqQKu95ckYI6YfxeeitM7N271grJCLZjR0mDl30O1LGDXVLeFni6RX7e YymOHEQmiINwil0x2qtaZgt2EbEAATPvQXfnNCQ3Kh9CKXyl64ECoT+yedrE5uxRUnRUjvPe8VI fBFbluKR1WrJXHJzdMXtCV1IxiWdb20Yfxh8DSQRljh9ETd+xSBEQYRjcCPhRY/DW8OQEojpVMr JCnQlUhY/EEZEK1zXiSixp6lk5Ryfo/iPEUePYoi4eG7T2SqaXTdgK47yo35FtD4a7g4ceh4NjW ww1haR+YYn9uhbAiHv/JunpPd8jOulL90zMETYNPnVKtnFkzg== X-Google-Smtp-Source: AGHT+IHi+J1jgOHoRJgFtJeo3iCXuohdMDGDH/BEFWDOWfNZnXU/KTwiol7wZy4Iu7JsbDnt4ko7Rw== X-Received: by 2002:a5d:5d05:0:b0:3eb:2428:4a05 with SMTP id ffacd0b85a97d-429aef73574mr2235747f8f.3.1761739721460; Wed, 29 Oct 2025 05:08:41 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:41 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/6] bbconfigbuild/configfragments.py: replace fragment_exists() with a more generic get_fragment() Date: Wed, 29 Oct 2025 13:08:31 +0100 Message-Id: <20251029120835.4075555-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251029120835.4075555-1-alex.kanavin@gmail.com> References: <20251029120835.4075555-1-alex.kanavin@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 ; Wed, 29 Oct 2025 12:08:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225450 From: Alexander Kanavin This can be used to get fragment information by its name (or None, if there's no fragment), rather than just check for its existence. Signed-off-by: Alexander Kanavin --- meta/lib/bbconfigbuild/configfragments.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index 60cdced555c..59e760f2909 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py @@ -97,12 +97,12 @@ class ConfigFragmentsPlugin(LayerPlugin): print_fragment(f, args.verbose, is_enabled=False) print('') - def fragment_exists(self, fragmentname, fragments): + def get_fragment(self, fragmentname, fragments): for layername, layerdata in fragments.items(): for f in layerdata['fragments']: if f['name'] == fragmentname: - return True - return False + return f + return None def fragment_prefix(self, fragmentname): return fragmentname.split("/",1)[0] @@ -138,7 +138,7 @@ class ConfigFragmentsPlugin(LayerPlugin): fragments = self.discover_fragments() for f in args.fragmentname: - if not self.fragment_exists(f, fragments) and not self.builtin_fragment_exists(f): + if not self.get_fragment(f, fragments) and not self.builtin_fragment_exists(f): raise Exception("Fragment {} does not exist; use 'list-fragments' to see the full list.".format(f)) self.create_conf(args.confpath) From patchwork Wed Oct 29 12:08:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73282 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 75839CCF9E9 for ; Wed, 29 Oct 2025 12:08:57 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web11.4738.1761739724314155196 for ; Wed, 29 Oct 2025 05:08:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gZX9OGCf; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4770c34ca8eso32759055e9.0 for ; Wed, 29 Oct 2025 05:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739722; x=1762344522; 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=vEg3PE6jtDl+n4qNEhWQ6xWSocu/sn4xk3ALrdqXs6M=; b=gZX9OGCfc1mJ46qgx78OB7sG6S64S6DV4hKRaiPiwrlT/X1dP6nLmbgRHUHv6osXDr 1vi3kbpNCiknDizSAtw4TspLrQU8eORIANeFJ4gCOSb9EVArEkXaK/z8hsi6lrilfkla toSbF5Sta/QI93S//7wHUlE2uol3f9SMCwBcvwye8xqo9Rgh9CoLTry1Z8AE9mEUfDr3 LwFSg1NiPG45p2VgjO9m5RlWj3L47YuspzU4lmnSnlhri3zDncuxYMr3tDSX4kqJ1tV9 7AQhi9n47KQKwnAkrk3USzvlmO3YcjEiYqxSdGZcesT5sBpCt74vnoBFNuLyLPEaeYdm Oq7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739722; x=1762344522; 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=vEg3PE6jtDl+n4qNEhWQ6xWSocu/sn4xk3ALrdqXs6M=; b=iL6frVFwTI76z63BKyHXOaDtXdkItY/BseFq/dD4Ve4FObIzeRciqpobWnVydRUaJw BS2b1ta4PTcNnX9bXtKKfBPI5EV1wSGO3qwLnq0KAe27VW9l3YI36Au+V5AdxE7koJJn p3Z4ISiZuvcigPrvrwncqso+6ndSA/PoK9lGxzPOv+zuSgs1BiXv+6zC1d6h8m23jR1N Ps516D0jImK5JDXtZrPN9wtSQcBQFTfLp8usiCEdsZ6djt3/1T3j3JVEa47Ogim5Hz9I N2sn31Jn8CV8KGi3QGCB9AEMDwMKrBBCDNe5YHskndN+a8m04TPdpbNVBj4mOBmXzDbI 9VuQ== X-Gm-Message-State: AOJu0Ywc5AvAHYMeHwKnkrwNX2axU84QKi6nSxSntDVPQsrq7zRgVbeR IZ6m1fB+V3XKlsAYphRCwSjrw0QD+36a3nn7o0xzianPBIcEip/o9ed1Nniuww== X-Gm-Gg: ASbGncsjEa+VOK8Ju/IxmwZCpcIWfTRsfz3aK1YycSnkBaI7USoEYxjIqAHggbUb4rB 8DnvWb/VYpeAXjv4ycjBvHSzYJo72xJFySwi0nmZhr37XfBAieZse20OkGSLx92hhQh8uEHi0rk j8pdAOo643pQ6RyqUkHh/shIezziOvaBlBfKAsdArd5h1o6YI1t3RcoVx1JC9cvvvsphefgEfHh AhaL4BUYK6MonygdrdGmB7Lk+R/c+dXt45I/sWCkYLUAomUSlIoRE8/nOR2sFqRXQniszunKoI9 7Dt30aLd1s0btFcFji6NT9/pOlVBgy72iXVRbEwSKaAk1q6FlSoEXG3F65k0jhdS7IwiegfGUgp fEMvc/NVPX7JQkg4cGoyyxRDB0HoFmsCTXNViQ8BMooCaRUjCT51kbb5u9dh56XRqU2mhI1Rsq0 19mH19y9/DhT6qb4Lj66ZpldhSsDzd7FVPPneLJJrfOWaPIKQtqgOpspOm9xnzTQhniBQgMVdGn WM+T5cgstjydjmwThFsB/4TjSXYzImvWZTiOP4kTcOV4Um8RKDFCDNKyulz X-Google-Smtp-Source: AGHT+IEtu5T6RD/QE99mYxLkNKCvGsJ5GcRHyHacv5JuCYNqZCdVJ+N8rFVa0qLTR1rUW9iZbdttiA== X-Received: by 2002:a05:6000:3101:b0:427:cca6:5f41 with SMTP id ffacd0b85a97d-429aefd1f02mr1951964f8f.55.1761739722197; Wed, 29 Oct 2025 05:08:42 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:41 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/6] bbconfigbuild/configfragments.py: print fragment descriptions when enabling them Date: Wed, 29 Oct 2025 13:08:32 +0100 Message-Id: <20251029120835.4075555-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251029120835.4075555-1-alex.kanavin@gmail.com> References: <20251029120835.4075555-1-alex.kanavin@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 ; Wed, 29 Oct 2025 12:08:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225451 From: Alexander Kanavin Such descriptions can contain useful or important information, and users may not see that otherwise at all. To reduce clutter in CI outputs or similar scenarios, -q option suppresses that printing. Signed-off-by: Alexander Kanavin --- meta/lib/bbconfigbuild/configfragments.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index 59e760f2909..6fdac33a5da 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py @@ -144,7 +144,11 @@ class ConfigFragmentsPlugin(LayerPlugin): self.create_conf(args.confpath) modified = bb.utils.edit_metadata_file(args.confpath, ["OE_FRAGMENTS"], enable_helper) if modified: - print("Fragment {} added to {}.".format(", ".join(args.fragmentname), args.confpath)) + for f in args.fragmentname: + print("Fragment {} added to {}.".format(f, args.confpath)) + f_info = self.get_fragment(f, fragments) + if f_info and not args.quiet: + print('\nFragment summary: {}\n\nFragment description:\n{}\n'.format(f_info['summary'],f_info['description'])) def do_disable_fragment(self, args): """ Disable a fragment in the local build configuration """ @@ -193,6 +197,7 @@ class ConfigFragmentsPlugin(LayerPlugin): parser_enable_fragment = self.add_command(sp, 'enable-fragment', self.do_enable_fragment, parserecipes=False) parser_enable_fragment.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath)) + parser_list_fragments.add_argument('--quiet', '-q', action='store_true', help='Do not print descriptions of the newly enabled fragments') parser_enable_fragment.add_argument('fragmentname', help='The name of the fragment (use list-fragments to see them)', nargs='+') parser_disable_fragment = self.add_command(sp, 'disable-fragment', self.do_disable_fragment, parserecipes=False) From patchwork Wed Oct 29 12:08:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73281 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 6EFC4CCF9F6 for ; Wed, 29 Oct 2025 12:08:47 +0000 (UTC) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.web10.4583.1761739724718570799 for ; Wed, 29 Oct 2025 05:08:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hb0GvlMo; spf=pass (domain: gmail.com, ip: 209.85.128.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-471b80b994bso98230115e9.3 for ; Wed, 29 Oct 2025 05:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739723; x=1762344523; 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=QuWJNRCxAU77n1jtds1E5srChcs1ir/3seUK1u3XTWw=; b=hb0GvlMoDWnJZG5XTOwYzmAldz1zbyzQctR5yxxZqzmGqtleOB3Ty6LResy7qw/BGq eWB7DXRcSek7zGAGggQNWKsTVFlpdu+jssYiyttue2oBNAiKol/VnQW6TV5KHks+z01c G4qbYeP9q8n+5csI97qBbuSjZyWjFD58kII5/hZGsfH0i99bx/QSIBNfur3QN4WwBHzR sr0Vl7oNMwwBriXGxOst25ZihcXglSDFGeNpxij5Fae5MtbSTEYplu7sGZe8ENd/8dLz BNmdQbwXeSdE+E5nWNi8GdiYseRKpoxfYmwpVaxET0Cm2pGhiLqDkBzJRwwuQPZ9zjlG WOkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739723; x=1762344523; 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=QuWJNRCxAU77n1jtds1E5srChcs1ir/3seUK1u3XTWw=; b=xEQ1UTtU++kkIBfXxwDbOA9DbgAzla2mHFvpU40chWmnDPsIH3KjzcLiL5+bzCebwx wrg7vTHIslP5f1teebL6KP/bXaXI2ld+ZMsKtlqTiONnElW0FGQc7v6udX0+tbAcSIzw xRMkTvpDMuIV2uPMC7rlFmj6+ivnLwF0WjFb7oQAm/hf+1uONirisujO+pT7AMMKZ8w2 TNl2Be/2j1Az10QHcNaEr99DJ4inKxql0odwsy016cLgjPL3EKnIb0tC0YiycWJ9WCW6 /Wtq7EZWHUHPYQsvPn4SgsIWP+GDWuSZUVInu9lgYySQQYsq+vVafFXSvhAwitPHmDH7 A0Mw== X-Gm-Message-State: AOJu0YyosY8p6/Ug1vla48d79i2LRMdcnoXLm5C/alO348iDfxSETAsQ KiEg3084z/6tJmewS4XtAmBf0AeHwn2SO7JKj7BlRdzeBKdA/hzHR/2qMIDfkQ== X-Gm-Gg: ASbGncsS6tBKBZn4mak4/sfpRw19jRl2ZN1C/xdrU2baXdRrqprwcl3NVHGYqFFHQCJ vRGtujQ6/yc29Uz5M3wPYcZXynXBGXVY5fuA4g9urcCpOAWEkI7IyIM175XDxUgL6my+E/XLzdv q0+Ar9ccCVRfXy09y4SKCf1xJ8RyN4ZnlMkiE0Tu9Xemnr63T30Wh3+0JPtFA4bmXuKkjxvQlNc MWxiqB1qg/Tei4Dd35AWsrnRseKvrspla5tXJVXBI9k7Z0W8kEKoy/JLk5SeFbfjTxt92sP/p9h izJTcVFhSt2LwE20tFSEm0+kWp/D7a8BCVZiUajfvHjzHaqrqf9Z2hqKB1dLJgblo80A91dL1M1 0mTFQI73B/C/o/Q2Bk5SVhnQ0JlPbtW2/qfMcY0/jjeGz1SlZxxRp3s/DJYdGy+CNCwAJAOS5ST pmhzxaKhfNZ8yXG2If8XT22hxhAViIMTzFUfHxZXmMuoKzOVy84Rpu9eLJvbxCiRWdA+PWUwC9o Yuv+2pWU2Hjh0UNTm+FbAOlu9ZEt+PX4UV8IS4= X-Google-Smtp-Source: AGHT+IGQWxGPSojg0Z7zFWGWNlwR4zsKr8IEtaIOriOZTpZCER6qFhQK0RGhZVRWvQVwa2inHxuIiw== X-Received: by 2002:a05:6000:40ca:b0:3e7:45c7:828e with SMTP id ffacd0b85a97d-429aefaf7dfmr2030904f8f.33.1761739722928; Wed, 29 Oct 2025 05:08:42 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:42 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 4/6] fragments: add a 'root-login-without-password' fragment Date: Wed, 29 Oct 2025 13:08:33 +0100 Message-Id: <20251029120835.4075555-4-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251029120835.4075555-1-alex.kanavin@gmail.com> References: <20251029120835.4075555-1-alex.kanavin@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 ; Wed, 29 Oct 2025 12:08:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225452 From: Alexander Kanavin Please see this for background/some discussion: https://lists.openembedded.org/g/openembedded-architecture/topic/115913545 Care should be taken to not enable this by default, and especially not for production images. Poky and oe-core default templates did it, and it was not a good starting point. Hopefully the fragment name, and the description that users will see when enabling the fragment will provide enough warning. Signed-off-by: Alexander Kanavin --- .../fragments/yocto/root-login-without-password.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 meta/conf/fragments/yocto/root-login-without-password.conf diff --git a/meta/conf/fragments/yocto/root-login-without-password.conf b/meta/conf/fragments/yocto/root-login-without-password.conf new file mode 100644 index 00000000000..e3857fc44b4 --- /dev/null +++ b/meta/conf/fragments/yocto/root-login-without-password.conf @@ -0,0 +1,10 @@ +BB_CONF_FRAGMENT_SUMMARY = "Log in as root without password on serial console and over ssh (use with caution)." +BB_CONF_FRAGMENT_DESCRIPTION = "By default images are built such that root login is disabled \ +(which is the preferred, secure default). However, for testing and development purposes it can \ +be beneficial to be able to log in as root, both on serial console and over ssh connections, \ +which is what this fragment enables. Use with great cauion, and ideally only in tightly \ +controlled local builds and CI testing environments, and never in artefacts that are deployed \ +into products. \ +" + +EXTRA_IMAGE_FEATURES += "allow-empty-password empty-root-password allow-root-login" From patchwork Wed Oct 29 12:08:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73279 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 5FFFCCCF9E9 for ; Wed, 29 Oct 2025 12:08:47 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web10.4584.1761739725515950440 for ; Wed, 29 Oct 2025 05:08:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jDr1lDmf; spf=pass (domain: gmail.com, ip: 209.85.128.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-470ffbf2150so5511675e9.1 for ; Wed, 29 Oct 2025 05:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739724; x=1762344524; 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=albq9zzPtUeAIOl16ybvlWUWcyvrmeczOQDj3SR9Cfo=; b=jDr1lDmforGTGsNYgXvlDmO8b2d2EYf8c7PG62lRqhUI55eKkYzodKwLeABwXk5DEf drWX3lMcndXgpQkKb4UhqHB8L8J2W8DGnTQ+cAazNshsYCiBajhww3uEFVMV/HS3LyCn M70VIFfqxbfl5Le4DYgRLKR53IGYsmWDJ+YzACS/kKn98MOzoSNqqtclGcw4H18AxLt3 aHyFHJVP0LNPf0OT/QqwODZmphSeCtk1IVRd2pGJ0c0x1qgmuL9BzKHmBtVg5mFHwOog zWvCAJxeeayqjsa3sq6JDT5WKI7UgoyDu1gNEqvt56VlRR0pUt4CrLIqHM/Ti+s86v69 +1hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739724; x=1762344524; 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=albq9zzPtUeAIOl16ybvlWUWcyvrmeczOQDj3SR9Cfo=; b=k+xAKZ4OrLDmAbxnMjmeg6Zl+mjUSbMMJsGIiOSwcYA3uTeiKcO05T6XfVB0jEvH2b rLDCqi4l39iXP8BetrUNbWRUiqPmd8gcjRfW9S0+qm1zRHyve36RN8v+ckaC8y7/shm3 15VzE3y3lS7l+7APpFGQ0P7AwHNITGt0sLO7RM/werFNBlk2GUZsvtZLJqEwTcIjUzdO gt1Z1NzXHzWJ06F2d93Dvni3yL2gpJ58Vu24Y26xsBHFSabnr26DBNQYcEhJHQWU3mkb V01DmKB5mQ1AZsoRHd+NN+4OGVuK7g2xlWPFXKf+7PbrrqXji6GxwEq5FVmMda4AtW4i ydLA== X-Gm-Message-State: AOJu0YyYtioH/WhodmsO16jWPhgnvCwKocH8M/wBYe1gFMbB6D5sA0Rj k3hGUaZaNSvS7IaBpR7bwuu2m9ONo9LJ7n14vjAgXZOjx6Ps43Q3tmz7WCSCRw== X-Gm-Gg: ASbGncu8qQVaQL/Vp2xq0raa3zmJyH7jaGLpbLbIIng3CPOcM14fZeUk6gRKUIgWdDv z1RUQ0UkoYy4vTAG3nCH4E7U9oFX135cvL5grABYGlwzB7x2AjEeKT0WEhBb3WcaXL9JLfJayLH brvffi170THminxcwWslXip6r+oI8hv26Dx9huP0Tri1w2kctxI6iiyQA0BcTsSbdSo3dnOaeSK 4tb1/cNFDnmi6D2X62RmgS2+RhADg/Q9FvPjtUXvknwNc6XxOz9AWYgEn6kQF6by5UlOs/gCyn6 0sW6XMiiHW4Bx9OCXCHjkFzEVpK/tYMLUi/bB8Ldq+2x5gFMrdpe88PVC0xXBs7CIpEMfr5t+7F 6mb4UhLQ7cmFDGfSPKZyAX+Hhh6NVtxugq+y+DzZ3v44HctfxpjsIaAwNyYLUxd0zhOVtflBk/d ep3H4jTlE1Or84fBXXWmRHm29q9F0N5utBVmGllMW8CBAjoYCjTOoPDqQSUns6lBAdi5/bA6Gj4 5jLT9SpYQ7CS95CUCNn+I+e9nAxsKk7LQW4W+Q= X-Google-Smtp-Source: AGHT+IHYMRsQLtfIWw6efs9t475ZfBLbrDSyYeAUN2zBsm+5dUQ1dCql47HxVav1XFgmu2VDEvNF9w== X-Received: by 2002:a05:6000:2406:b0:426:fff3:5d04 with SMTP id ffacd0b85a97d-429aeb096c7mr2428605f8f.25.1761739723711; Wed, 29 Oct 2025 05:08:43 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:43 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 5/6] testimage.bbclass: check that root-login-without-password image features are present Date: Wed, 29 Oct 2025 13:08:34 +0100 Message-Id: <20251029120835.4075555-5-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251029120835.4075555-1-alex.kanavin@gmail.com> References: <20251029120835.4075555-1-alex.kanavin@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 ; Wed, 29 Oct 2025 12:08:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225453 From: Alexander Kanavin More or less all of testimage relies on logging in as root, without password, both on console and over ssh. Previously this was enabled by default in poky and core, but now that it isn't, testimage will error out on timeouts in both console and ssh login attempts. This commit adds an earlier check and provides a hint to the users about what they should do. Signed-off-by: Alexander Kanavin --- meta/classes-recipe/testimage.bbclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index 847a6f18a81..83b750bd7d0 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass @@ -131,12 +131,22 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}" do_testimage[lockfiles] += "${TESTIMAGELOCK}" def testimage_sanity(d): - if (d.getVar('TEST_TARGET') == 'simpleremote' + test_target = d.getVar('TEST_TARGET') + if (test_target == 'simpleremote' and (not d.getVar('TEST_TARGET_IP') or not d.getVar('TEST_SERVER_IP'))): bb.fatal('When TEST_TARGET is set to "simpleremote" ' 'TEST_TARGET_IP and TEST_SERVER_IP are needed too.') + image_features = d.getVar('IMAGE_FEATURES') + needed_features = "allow-empty-password empty-root-password allow-root-login" + present_features = set(image_features.split()) & set(needed_features.split()) + if (test_target in ('simpleremote', 'qemu') + and (len(present_features) < len(needed_features.split()))): + bb.fatal("When TEST_TARGET is '{}', IMAGE_FEATURES need to include '{}', and they are currently set to '{}'. This can be done for all images in a local build by running\n\nbitbake-config-build enable-fragment core/yocto/root-login-without-password\n\nand rebuilding the image-under-test." + .format(test_target, needed_features, image_features)) + + def get_testimage_configuration(d, test_type, machine): import platform from oeqa.utils.metadata import get_layers From patchwork Wed Oct 29 12:08:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73283 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 6FF56CCF9EB for ; Wed, 29 Oct 2025 12:08:57 +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.web01.4696.1761739726186723058 for ; Wed, 29 Oct 2025 05:08:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VGEDkKl8; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-47109187c32so39471875e9.2 for ; Wed, 29 Oct 2025 05:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739724; x=1762344524; 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=aoX+KwnhGoKwE7lczmTZPlN5nyRDEuLFySNSAm5Io0U=; b=VGEDkKl87tkZTHHD8Lv5bGFFyuMqBdgX9fRBERgTIGg6Ehey3g9NErDP/dpElmlWmA YdZ17fGn/qyIK2MIgsCVFpFftCxTlLXpXUQ3cAlur0Q1QvVqnuBdvm25580om8J3A9SR BNNvZu/79q7QJZm1CP5WSHwCc8r3JTlTch7uH8ekH6Mxn1nlPj1gFn9U7zwKtezRvt7m /296n8BsHeKAkUNU4QLZqTB5C8lRAJ/s4QunEudi+D88IDnyT/MLiq22nVNSL5Y5rYZ6 tyYFGfjiCWm7pFmR8l9Cso+D6kIELYF1Mq01IdwtrElFZlwX3vDfwdp6bJxxCzAVuRSy nrrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739724; x=1762344524; 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=aoX+KwnhGoKwE7lczmTZPlN5nyRDEuLFySNSAm5Io0U=; b=Nd0A+6lnK4ruA83zcpy9EsTXOesFoCGnT0X9t1DoFp/HRNwR/SYDoHSz2MKO8KKHCC rpp6eLLjCzdlbroIrdr7mKooZnX6+TxkP14zmXkplAYORuPwXUv7zedwRoyMUeNg0TE+ 3BxMTb4WHeEvQf84EKyd3fao+NXcr2HFrPJeN3/krgn+qeiFoi1QntIzCD7h/tb+FAX2 IzPH56QVRU1StF8jGjLLLRMigMiA9yI8NFgmSzaiIZZRHEuuVVOEXznhnlhWbiml+4D7 R0ASRlb922GPN/3HLroA+UFvKdqVKcpq0ZheW8FkVgr0pckUPT2/iAnh8P5uqiTLwCho /VbQ== X-Gm-Message-State: AOJu0YxypbHU93EGwaowti8KbfR0dBAr15sx0fooSM4h16lsLra7mNy2 K/9rIrmOEW1Tq8NCH2WRJZW5xgmHRlyWL6MXiVxkSlEIwzdfCnMJmzUbwxeOMg== X-Gm-Gg: ASbGncttFfWZUwU3ibsX4KHmfHREdpGBaOtTdfTF7QIpA01F6ztzUfYrCB/hE19uYCQ rEm7IHAdrrzfltysFV+b5HnDqjTiiQ1bMeVsau6tLQ6idhgWjhaXiu2axjw2U2oHHpu0hbQ6YGd 3HaotxzPYeIE0RPK58kCtV1EvAeenUHdzWUqdDitFAbf7wJ+os3VcQQX4TKe7yOfNI7W0WADC5h rr2mlSczPD1LTdwR6A6Xo1/u6BmEUOskb4j4mIZ0ruBGmd2/7Ijku50Pm6l/MdrHK5B8mEUG1L9 LwhBe5WZphb56EQJpSkJL3bn7nX8Pp1wzVKvUDYxk7bzCkBhK84llg2AIuNQw6yx1Cjd1rQRjit lVsXkLrBMe1EluKHbDrXvjOYrQTwR5aBys0OmzHcehtwMAg+ByARSG5XbaCB3+usTksh665SCSf xAqdvdFX2/0IfcD+4iRGwS+YZ78rvaIk2yENSnBzTlhMiBayx7D+5wu6/+SWq2tZkzMKnLNwrB7 zNAx5Z6dA5mwWiM/16Gm3ISYyySuZzYJioGVhoE7comW/cpig== X-Google-Smtp-Source: AGHT+IFI1Jz5+4HiFX287SNO94LfYt69O5JYB47C+TpK4zkXyaRAW9YEj1Cqw6RmpxiiCuBiy7+RBg== X-Received: by 2002:a05:6000:2209:b0:3ed:a43d:8eba with SMTP id ffacd0b85a97d-429aefca8b5mr2476699f8f.52.1761739724414; Wed, 29 Oct 2025 05:08:44 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7b2dsm25685793f8f.2.2025.10.29.05.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 05:08:44 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 6/6] rootfs-postcommands.bbclass: add a note to the login banner when root-without-password logins are enabled Date: Wed, 29 Oct 2025 13:08:35 +0100 Message-Id: <20251029120835.4075555-6-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251029120835.4075555-1-alex.kanavin@gmail.com> References: <20251029120835.4075555-1-alex.kanavin@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 ; Wed, 29 Oct 2025 12:08:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225454 From: Alexander Kanavin When enabled, users will see: === Poky (Yocto Project Reference Distro) 5.2.99+snapshot-1dac0d15f2d979128cb449b59bf5fd69b4ba5084 qemux86-64 ttyS0 Type 'root' to login with superuser privileges (no password will be asked). qemux86-64 login: === Signed-off-by: Alexander Kanavin --- meta/classes-recipe/rootfs-postcommands.bbclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 8b5822a0b5c..d3a569ba3ed 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -5,7 +5,7 @@ # # Zap the root password if empty-root-password feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "empty-root-password", "", "zap_empty_root_password ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "empty-root-password", "add_empty_root_password_note", "zap_empty_root_password ",d)}' # Allow dropbear/openssh to accept logins from accounts with an empty password string if allow-empty-password is enabled ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "allow-empty-password", "ssh_allow_empty_password ", "",d)}' @@ -255,6 +255,13 @@ zap_empty_root_password () { fi } +# +# This function adds a note to the login banner that the system is configured for root logins without password +# +add_empty_root_password_note () { + echo "Type 'root' to login with superuser privileges (no password will be asked).\n" >> ${IMAGE_ROOTFS}/etc/issue +} + # # allow dropbear/openssh to accept logins from accounts with an empty password string #