From patchwork Thu Oct 30 09:22:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73341 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 7DE8ECCF9F5 for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mx.groups.io with SMTP id smtpd.web01.19199.1761816177587050154 for ; Thu, 30 Oct 2025 02:22:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=U6cym2C8; spf=pass (domain: gmail.com, ip: 209.85.218.48, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-b3c2c748bc8so107819666b.2 for ; Thu, 30 Oct 2025 02:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816176; x=1762420976; 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=U6cym2C8oL9kNpqHLCZEtGcotqr0tGW4Shv2rhz961cdPlgaRw4ANc0qzuMLRttf/A ryadHVXSLxYRAIfNa6DdBs6EIe7rEuKHkQUeJzVnf/7nHqOYkAfuw8oP6D8jj9YHbdIh NLmYi3Od+tRVlJSZ3xoDUGpVCqJwZQ7nu2AiO5aO17THwd1z2qRabQUiPMCwy3zXjb3v Uo9nuwGGmb/kJXHt4Wb95KjrDNKiKduCtDn+pDs8wyUzA3ZW93LJ7uejCd0+RNhquZ02 oK4sZgHFKBkBKA8YcJLibv6Qz+18AjiC2MhuEZ02QzjQGzyOWVCYitvo7JTZbpydDvmA 3Qfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816176; x=1762420976; 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=h0xDay/aQaJUtRJX8JWSQ5cy5KsPMgKp+P0Pny8iVrPl44JYfVHOGJYQxC4pWgqGft Z1fvgf0I98HTA5blKCmmA4Z7LPWxkJMx8OudF+n0T6LdWLNuhOErhzwcjC33L3gOM6jx Rz/x/Tg7SysmfNMQ3hlzihvlbE4ElaxxaJqogciXLM9P23X1LawPSB3eJZMoIbky14Z5 sPa37P1YUJEFz94/tGqKkOGmNTSdvFVdIgcaYieDq46FqyyAPvqVGw2EvqQZhUiAm9fA phDawOZoAJdXiQDMRDVw3l/SBBwXAi78xOdN0LLld3y9Q52+Z1ak/aCeTP9HiK4d5xsO w/XQ== X-Gm-Message-State: AOJu0YyEyy2uiBR4RaVRuVdIE8cI6LPNvBI7fwWIPCvcK/9cgbTbJfJd UIzyuyOHcO52GZcMJb2pe8JpDM+b57Ebpv9besQyGE5L6LA7YcQhg25AyTG1lg== X-Gm-Gg: ASbGncs1Bxnw+JyM9z+/wHPD+Ihwi7SvcGWGFVxyHuxsgtZQbYZkmY6mIPNJYKkxGTu WojK29uVWOUMvDey72PGkpgNsORT4Jum1pnHfPDtMvB1uJeumiiPmv9JSM9pLNE1vVUtbCt0uXY yQQvKYtQFxKbB0ixUoft3x7zgVj47NUME8sfzb8w1/tpvm0Z2cr8enGXaEndGYwjYW3vUxbc2io D5hfzZyt3AKBARqmm6vR7AxG5Rao8JZ0NnjncZIUn2qMQdugBFPImwV/+r1RPUsMehOPwK0x9wU jzygkrn4M/MCq+IYG72bvazq5Ai/O1Dkf2WfzHPUg9aceXgKaPuE4c+7xR8Ybdtfs+y6QWOvnbt D6nORESpshqsisvcZU0l1KQ2q+8OHifiSr+algbjP/jayArneSCIDuOAtwl0XLaE1WF4BtNpc6x IOQiqGZeB5Xsg2B1ejtlgpleD4sb8UMey1s7sQoRhT+TJ5pZDoNuLmwf/HgiDXCmqrmMVFST4/b iBPTWfZ2ClyCCGoi1ZYTsuSPhc8XM1y8q0ZP5aztoC9FteHGg== X-Google-Smtp-Source: AGHT+IGMAdBk0jWXop2ery9w8MlCZzWOpw7HR/djI+k9ydk8NPYBK8KJJGzVjh8UTsSLZcBjnHKWyg== X-Received: by 2002:a17:907:7253:b0:b6d:2c70:4542 with SMTP id a640c23a62f3a-b703d4f7dfemr593083666b.30.1761816175649; Thu, 30 Oct 2025 02:22:55 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:55 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 1/6] bbconfigbuild/configfragments.py: run discover_fragments() only once when enabling them Date: Thu, 30 Oct 2025 10:22:43 +0100 Message-Id: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225479 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 Thu Oct 30 09:22:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73346 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 A2A98CCFA00 for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mx.groups.io with SMTP id smtpd.web11.22492.1761816178203546526 for ; Thu, 30 Oct 2025 02:22:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=V++2ZrCu; spf=pass (domain: gmail.com, ip: 209.85.218.49, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-b6d70df0851so171731466b.1 for ; Thu, 30 Oct 2025 02:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816176; x=1762420976; 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=V++2ZrCuQuXzOOEMHX30snvYbt4khAANZrIgbCFiijtVVK1z/UFsrF4Cot47UMx7ZD yDPofrc78uDkt+hoNZUI78ACkjTU78a98kaj1Hax3DlXy+na8dlyVjlEoDhQo7lJUVKj iKDl54PMsIwM5gjplFdlTLM1lf7zvgYXBBOfXMHXmp2gHgTuayiSLnxWdCPc/qZsn7qO BsiGVWSWBAmQhheT5cKvLX0Y+KqbxHl3oD04X4U8ox0oSWdipvss8gzFF3hqDtcCKiIu ygAx/qDvIQbBPpwdbEOuuXYdoocWh6644WLH3t2gblpcA/zuydFeiBHnSmmqyjAtn9yH dIGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816176; x=1762420976; 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=nHf5iTlVOpf5AJLlYTLjOQhQHEZ3s/6lbEq++24ouMf3iattbtzY0AFrWUT5Ghl/KQ XXOjZ40kWDAb8vtdPHk2XWNBN7n04kTTeSDEO3hr9zqnC5tMUc3C3/oPUkWBih74gkQ5 QEAXHgzE9vqovmiJHFUtTh8ysP/nIRCQM0u9d7wJRfTSS14ggjwIex7hvB0mqzk5qRbo CBf2BGMc22WRbJoo28FHs2BHUtjry+5cns10niZShxpBKSZrm/Ej3JC3j/FRouuTr6pQ qZhrj++8AaDZxEzn0d317dD+vq4QCZmAPmPDQ9aGQaCFZL4j5yQF8rVaVmLo8w0fGdEZ d0uQ== X-Gm-Message-State: AOJu0YzsOoAmx4xSApAYqYlWakamlGVOoVMv24dJphwJbsgU7hESkB6f AYthjjsa4D6aUCqmHv6GTCK3UBgRHRKgW0nELa8Xt+LUDR1XzFPfwjdTMfvxVQ== X-Gm-Gg: ASbGncuyPmMq3Hmtp2tvnynM+QpdfJ+3pnbIX4t7Wt4//8NTUF8gBl21/7quwwuk3Ni h97wwCbIgKsPR5QKRDsoN5E8qRqqMzRxi6w278L8MUcJMBj7OuRJ+dSqRbHYvOx8t3XkGO0TDud pJjolNZYbCr1DXHpfMC14y1p+AL+h1fovEBRykDI66OlDosR57eGZ7hHvVCoe0RYQRbokOSXKi0 LFchn/7MTkmxq9KYflTmWF6VAInDyM+0sw5Iyj+KVZShtseGgtrb4YmvBk9vmlNveb6D2QE5vAO 5/l9aEySxtYdOPiJBzW+3xah3S4Qvs/abDrypRx45zt39oFksc4TazEkqhwYPpzAnkmYXLnt4Kd 8wDk1FWuob0G/Rg/BuxwBZp+n1zPsMzZpMdYIHkAODvNkFI4/e41Wx6SkYaybpeG+mIpGnIF9oB ottyftGlt84VRoKSTVBgkSdICt1fnpeBZW/030oOhr+ui+R4fJXJocXRONAQpc5sjnUo9RItwK2 1xT8a+qq5lKgfKWycs1Q2QbQ0WHhF11D4ZGFzI= X-Google-Smtp-Source: AGHT+IEahqW9W9bWIRuRjQ0Ow6puUuBhLUJPx5J7CCRL8diglpobXuqua4fs486SzBLJcNzYBTr78Q== X-Received: by 2002:a17:907:6d25:b0:b6d:5363:88a9 with SMTP id a640c23a62f3a-b7053b11a19mr223013066b.9.1761816176391; Thu, 30 Oct 2025 02:22:56 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:56 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 2/6] bbconfigbuild/configfragments.py: replace fragment_exists() with a more generic get_fragment() Date: Thu, 30 Oct 2025 10:22:44 +0100 Message-Id: <20251030092248.723968-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251030092248.723968-1-alex.kanavin@gmail.com> References: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225480 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 Thu Oct 30 09:22:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73345 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 7EDC0CCF9F0 for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mx.groups.io with SMTP id smtpd.web11.22493.1761816178777502208 for ; Thu, 30 Oct 2025 02:22:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XUOxicOK; spf=pass (domain: gmail.com, ip: 209.85.218.44, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b3b3a6f4dd4so154065966b.0 for ; Thu, 30 Oct 2025 02:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816177; x=1762420977; 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=XUOxicOK9/gkrnF5enX+1PWefCNRO8XDXahZFTaQZFsW1v5G1JAJHKiQ0ABvWWrZ3Q tSd8yyWlQsMiOGLv4YhZP/FdwZTIo3WBxfF1aNuOdTlpbH3uVk0rGLLs2um5yXN+hlF9 G85tMQMFsnqGW9iYfZ6VlSqcTQAmgcnNl2MPxvOuZZ5cwdzw+qZV4lp0FM80H+OtZqTU NXcNZcVDg9xAXt6HM2a/pOAQM5LV5THHwhfMwAzFsGZFrPXjUaaiG13ZD/P2fEK/A0Vs 2Xrlbh21YKnz/x/VfjK9XH+lWzPzamfWOdGqcDi9EpLl9PZbiMNfNnOgBG5aWqgZzzMI g3Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816177; x=1762420977; 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=pEru969ZIyC1KYBjjicYMr+w47ENPKWWjJUQ4fIkVfbheB/YBVmwUEs88sH+OPwKdt NanSwx9D5HcV3Qrf2NOcrDc9WQZ/9sgA3uK7rFPXNManb1vVjZTPXlQbgrfQELmeN/B+ RY5vcaZhzyMknuoLc7jZ+xE2bAmeMpQPQ7cymOgpJid09Hd5BL6xIzqpM1J+zUiglgAq Zv+eqJGEI6Ynm33qoycrD8ddEUaZaxViXxlmH2kD9mhzST/pko4ruNu20sqHsqdgXifu pX1su6rQJ7/WFsJ3fFGbBZbamYFnZD/iLV/juGU/GhA8Xbk6s04oWC2XLB3I0tC0xKJv 8G4A== X-Gm-Message-State: AOJu0YzlTTgqVe/EdyvlIv8GPFY6mKmP8N8TGKsAIYDw32Wx1bbK+Hb0 NHQi+RVaSiDD10I2BFHBPm8GDLq42oAncH3Zn/va6o6dnFHht53lBi19wGccjw== X-Gm-Gg: ASbGncvObe56WecMrkhYP3G/V9b166BlOpt+EVWcSfyAEtmWvtVn6UYJJex9nA4TrRc I2DCaIpFbBSk93NldVlNkifCtA0svkJBhzCtkZS7Ah3t57W0Ned40Cp1ySgEwYu3r5EDoRhC7jh lfPByFfhA0Ufw3a+nEB7I5MPSwJmv2BMury9Wwj8fgtVrRZFvpN3p1mqJa8VQMp79knu2Z7OqoG QowP4ZqMPlgWWMkqTN+l1OEHiFfBeW1kPxmplnJV1R3DR9uxCkl6k1BBOBqkALa8LI+QfWo8I6Z trWSZrd3b6m6Fp5ehSakROQrAbJwHxO6pJJb5PHqMtBqLkuBhN7IDKo6YTv62ZSV6dztsn1w/eZ KoWk5c1rAvkmlya/81iyQ7eHj4W35HArCFQCUN/Rm4sOZXxA5AzxjbBBDipJ3KguNkC485TU1Cq lc0dfS5ynMd6BB7LUWxJjVgft34ka7a2JgO2n1RB9lhOE5VIlrteSr4c+r505J2xGZ6NTK5tjG3 ITJZzZfB7ImsAwG9/cnFm731yCiTwRLRc4pC5OLSLPdIvQt9A== X-Google-Smtp-Source: AGHT+IEMhTCW5UVjjoUaBu0bK9uefJ4C25Or1QrFq2o+KyLPGNbDlJMJMEHVnGuDJcWFzbyxcLeCsQ== X-Received: by 2002:a17:907:702:b0:b5f:d46c:4b7 with SMTP id a640c23a62f3a-b703d5dff64mr602612866b.55.1761816177038; Thu, 30 Oct 2025 02:22:57 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:56 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 3/6] bbconfigbuild/configfragments.py: print fragment descriptions when enabling them Date: Thu, 30 Oct 2025 10:22:45 +0100 Message-Id: <20251030092248.723968-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251030092248.723968-1-alex.kanavin@gmail.com> References: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225481 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 Thu Oct 30 09:22:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73342 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 80C8BCCF9FC for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by mx.groups.io with SMTP id smtpd.web11.22494.1761816179507921779 for ; Thu, 30 Oct 2025 02:22:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H6Yv4LQ4; spf=pass (domain: gmail.com, ip: 209.85.218.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-afcb7ae6ed0so188882066b.3 for ; Thu, 30 Oct 2025 02:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816178; x=1762420978; 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=H4DCSc7wx3ABkgyouxtUsX+J54Tnf7ioI74SZVPxYrY=; b=H6Yv4LQ4HxoKG5fJQMu9FYwRpnHzrHp3FhyXhTaTJ+0mS27HJqndfzErNFU/gJkbcS aNMKBqw6Xo+wXYplKz1r6BfYPdK6G0XNabtxE9b2oNj7b+UL04WJZcom5qGIfDi5m8Px Np13N3utd5BUg+YJRBPSrbS06XkOUqTze/2pOC+RlQ24yM/1nK0+pTSBY1f6FDA8po9E cy5dVTe8gv/0KTDFLBR9nbBn6yexwkT94vWHhbMStAU71JmKJR5qJ+EPEwJJNyF0MXUN EttA54I/vMhTjO+aRl6I/kgWdpBqVcBh2FqqH45W5aV7oem26mZZN4m6OYVw8Jp74oQF 4wcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816178; x=1762420978; 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=H4DCSc7wx3ABkgyouxtUsX+J54Tnf7ioI74SZVPxYrY=; b=rUc3sF+dEwDRvlqb9MSvNZSPu+NLdEYrJo8TY7OkvtZYSo+hZxbQWGBfeRz3YkPAC3 s3DBM/IwoRNGSkp8zGEkzCG/f2JDT/TqJJwI6ovpg16GN87Tjn7lZdQzgCtLZTtaAzT1 EyUch9c2SjNUQW1MPHeyPas9nElHgM/io47XIOvfmCfn4j5lm2+Jr9wxcuYf6F7PSBPB F6I5rWpsGdmTVRZsjLtGaoYA7z+Io4LG8Iz6M0fgudHFng4X9fgp0XuNKJRXks86LbWb Ypcw1CyHReLiWAcEHdvbhY+ytc77ecHvSVLPcJJwg0QERwGzqs6XWdAwYKbbFJvXAzmr pBZQ== X-Gm-Message-State: AOJu0YxibW87j9NAUwvXpOf0rRTQigHdmRjZQJdMmAdC2Izp8G3Pac6N KXcdtHpA7eQVyZlgFrCDYmK+G/RATPU2o7wXiHoRLpqmNCvQQawxkYlie6vdrg== X-Gm-Gg: ASbGncv5DwudceVCTSfLpbCXyl+rt8KPsd6WkjxvQqxeSw7t4UJ5DlyvUggTqfxVOmA vw09+xBHWYKPlmDMXP04oStUlISO0I8FZ7+O9qLVLuSaqmqr2VN1ECypslKnEWpH7Uba5DO+3QM zOhF/xfW3P3ILTdKPY/TwEwBnE/n2GfIO320NOuhRix38uxFu/fvvf7LGB6qsExUZt/eMIe3vsX SfUdVxleGqyuGtYNovSe3MbADQa7FtOAUbS8Oa7eQesmJ0G/e4cmtXF+TyxIBetJFAeTeqrlX6W ruu4QD/JpNoA2apncKGzf0uHlXDG8BJWPN86b+9cBptXeNlq04pcbEz2uEhA8kMxADTjuKnmTw9 Ga0vR2pE//pwX9rDjmShqRNwvhYwLOHYaQ+ZCNbClP3R/+PNyjTnFN6ZLo77/2f9XXesZUFnBCw 3XD0oQWiG0xcruhWHxo4qfPtnzCuhSHq6eYOJAsk/i/ipCDriqj3Wqfnr7Ebz6bDHxL0Htt5jJT TvkgBus31JW6xrOTyk0xxy1SjhZ8QZfyqIgdcg= X-Google-Smtp-Source: AGHT+IHyYbDOZpzYQqb2C8xL+ILnMCBw6y+P1kKFEM5NxiwTbh9rkI+rldtMajDjeXhkTIPLNHvuGQ== X-Received: by 2002:a17:907:971f:b0:b5b:2c82:7dc6 with SMTP id a640c23a62f3a-b703d4f7df3mr617343166b.40.1761816177792; Thu, 30 Oct 2025 02:22:57 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:57 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 4/6] fragments: add a 'root-login-with-empty-password' fragment Date: Thu, 30 Oct 2025 10:22:46 +0100 Message-Id: <20251030092248.723968-4-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251030092248.723968-1-alex.kanavin@gmail.com> References: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225482 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 --- v2: renamed the fragment: root-login-without-password -> root-login-with-empty-password fixed typo in description --- .../yocto/root-login-with-empty-password.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 meta/conf/fragments/yocto/root-login-with-empty-password.conf diff --git a/meta/conf/fragments/yocto/root-login-with-empty-password.conf b/meta/conf/fragments/yocto/root-login-with-empty-password.conf new file mode 100644 index 00000000000..86aec0e152b --- /dev/null +++ b/meta/conf/fragments/yocto/root-login-with-empty-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 caution, 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 Thu Oct 30 09:22:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73344 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 8CAD2CCF9F8 for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by mx.groups.io with SMTP id smtpd.web10.22104.1761816180232899859 for ; Thu, 30 Oct 2025 02:23:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fXlRacpn; spf=pass (domain: gmail.com, ip: 209.85.218.54, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b7042e50899so204795666b.0 for ; Thu, 30 Oct 2025 02:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816178; x=1762420978; 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=FuBse5COHmNm9x1v8tvRfWeQr5mAkSNYC3g1j5uN59s=; b=fXlRacpnAUPl8peejDvpGeu5XbaW4Hjxr4EGYtAgQ65a3pAvfi0kkpPxwn2DtNa/86 wRbbuTBSwUsP5ARrFre62n/lV6d9xAeT6DNWuJOQfSPPiJreV3PI/mDYB1oSXbmYNgT1 IO06PSQgmDu+pOLoJkYRXKPonQrD6UutOSGtVPH9p4WUQyDvR7XBHKISvSSJVS+/VYYS 8/a+HDjrgZepEoYf0I074O7AusW8/vHv0/LL/2PlQJ4c/cXjeHT8Qwqpj1ztLk2U3+39 ucA1/Q66wF55GKOwE+fFGge/v/yfG5VLbyNda9U8V2gjJ3SZYBgpaydF/SSbTyHruQRN 8dhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816178; x=1762420978; 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=FuBse5COHmNm9x1v8tvRfWeQr5mAkSNYC3g1j5uN59s=; b=eyQcAq4vQcJBcT8A9P76cgZdF2rRUgIJrZiC1Ops3YcJ4OYLiK8X81ta6aF9+5+7Dn 5Nai7p74TmQrK+s5kIVbPWEwue5cpkZhqSg/sh3e2evI5M6DEmQ+bjzxLaEXPSGlqcPl Y+mXVQsFoTT4BaP8yf7GaKF24/QQ/a94RjD6nEvOfIWUjAfGeY57t2uR++PczqB1vrfQ 0uLtniGBO0aF0Oq8K70Nq1vNnTDXtxzcQnajaMZdR8eZtSB7jXfEQZ4e3PKvC0ti5K3C feuhXXqPLQrUzRl70A08o+JkzGHKv7nLw3ZA7n+dVVyDw/FWTtyEMi8QgE6RMAeCaqB8 /ozw== X-Gm-Message-State: AOJu0YxWDiUora8OAmdA2QS3V53y46VOtFCZ8ttNgoizBKEp0tBoWLJu qlPgLZhMA5kIYKQSfbs18kvlLWihe8iFcCPsm44y526yd7ka5zxscn6vWY0nUg== X-Gm-Gg: ASbGncuaDwRBIVqWnb4+wszE7DuRHhJumJEhbS2Q9PJcy2mT3380M9CqMjCqzmVpQ78 WJHfswC2u5+xyXeQ6q8ihV6xy0GcvCnLDCKrBbwoxdEynryhY4pnCWsYSSxJ0GgF6qYZ6Vu8AHU kVyLd/eO7oN6olEOVaZvkimtFLJvvNjqGy4Jx4piZukFqjF1V0NV9+bRAm44MeGSOy5stV0x4xR xfUPaZTViV1hFsR8FK7SasuZbJewk+810lzhcxFgflBfqVceM3LPp7gTkfSu0y9G/7d5NzLNaOE 6533G2rHcko6+GnlHY5ZHMObKdH/aEb+IbnLoWjhjADpilK6/4XgcQYKNDLt9I2E6iWwl5Nu5r+ jxEWd8D/7ELzg9nlgMkmhP+WtKkjS4wbr7MVg3UIKshvobTKy8HjNmjDKQjrplTVt3We9sDDJWU ZPstJnO6hwBVkQvNmEbVWoz20JEZxfZKhsvKiI7xdcn9RstRGsOInKEIxl2zCc6o3Y2URp7UVA+ dsVlduRdMDBIo/uYwh0jfrpZTKxj2JgXBw+Nic= X-Google-Smtp-Source: AGHT+IEQmL+1PiL0ZOwdQjQjE9iWPvU114ZiDN/WOETElUEa3Nso+rVpM7OfBftCjdVf+/hXWKzQPg== X-Received: by 2002:a17:907:3e94:b0:b04:3bfe:5b20 with SMTP id a640c23a62f3a-b703d492ffamr659712266b.30.1761816178506; Thu, 30 Oct 2025 02:22:58 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:58 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 5/6] testimage.bbclass: check that root-login-with-empty-password image features are present Date: Thu, 30 Oct 2025 10:22:47 +0100 Message-Id: <20251030092248.723968-5-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251030092248.723968-1-alex.kanavin@gmail.com> References: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225483 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..844c0f19ad0 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-with-empty-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 Thu Oct 30 09:22:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 73343 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 96802CCF9FF for ; Thu, 30 Oct 2025 09:23:05 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web11.22496.1761816180830724829 for ; Thu, 30 Oct 2025 02:23:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GzaBuT+p; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-b403bb7843eso177646066b.3 for ; Thu, 30 Oct 2025 02:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761816179; x=1762420979; 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=GzaBuT+pFnI3uXzeHnga544OX+14AFe7CRFRE4C4A4WEXI+BBWh52vvjbEkbRHo3ZB jRl1w3q2LTuQY0MO7ufxQhaJH0B+xunW1AdZKABh7cRp1UlGa1+bqoINGhevQwQoqRni WRsGLfNj/pSQ+xxuQ8JwAC55DMOCwUFOYHzyvdzw3TnRXrMBpfwgIChH3ihIVpYwn4bp 8DWiJDxtKof+oL8w9oogQoFAT5nHtUzj0btFQQzZKLVXmiW72/USjVKsPJEglp4V/y4Q 4U5W4IcEnvz92aEqqHGdBVJOsI/eVnxzMdBaGQo2cyNFaUla1WyomTUPT7ejIv2BqwuL rahg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761816179; x=1762420979; 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=tK9I0hFeaXWJuXSKII7CA7yAgYBiW5C4wVrAiI8JMzJm3lZ/awZuTm/jkJysGUr+XH W+6kUpYebs442hwv9uQbQqiaMfiwRhiBdTvaU0yWZeK6xPPaxT7NCmKR34JEDAfSaQ7U 7csDVzExw2n4RKFeqCtUQYL95QFdjXkjV3J1IH29ZnRSjXfi37GFzcibji50yjuv9ZkH fZ2ICNEkvAC54N3Za2zS6Pvslv+NZQpoSPvZeLk6OSK0/fRfqCl+Qc0xc2Sw5ARllkaM d6ZezjVRBIWJmI8iLuwrhVpil2oS6TtaaECzNyq8HNRKD9Z7B8CxytYl5mbPAmDXJRNh vDBQ== X-Gm-Message-State: AOJu0YyCR8mfpJvB7WDWgGNmwiCcVFctOXaEJobgduKLb8TM5fGMs/rw Serv4vNoZIuwyGvKDn7yZLGCcamatetGymAbRRPQ85a4F70OjZYnoU/dLMwkew== X-Gm-Gg: ASbGncuGgcGiK7jmLDwobnJwtRImhfhe27ELjSbAcnA9XmAWpqzs4+jidCD8oEuGQQz gpvyvEgEgC806FCZTtAsHxCTmDq6wNFVrGBoMxmYUbIBE4e+rxFrRHwCkxgwJRu3MAZQSABe0kY +kqjfP70vIVWZU/GU477LZQZQS5WMCZNINniiw9bwRf7i7vJC86s9YkakxElmmPgXASxhzXSNUt r5H8vAeLv80tKr1vsIex04eZ10DkpSpg7OIIAqAp9PTqVUkLGnmF5yl4xn32xIQ+tD9I41chQxu Q92jv2J5ik6IFBYxJs+kGWS+VmRQK85YDrSBziyPO9mAM60gY+Sc2NmRE/8lzQKyPaf1fcqSWTy wp3HNW1uvXduF3JLg5GOLrSnUx+sv9hiPeg1xp69X9k5bciRLgZv4KtPWNyNqY72ODxCVM/VT3T 49rcY4evIB57+JaXQPCNEB0z/NHrP7FgKOR6MPrxKGkB13E7Btpk7RWnXyQTP/7UZwAHqkGrvAh Zn330AcsRZBRIQwDCa5jquEJVFmhQ7Wa1nkuE7nXb+u40Hp+Q== X-Google-Smtp-Source: AGHT+IHqot9vX2WibS+7e/QpHnIw3cZSaW0f3gkHTfdDck3m2LSefSn56ckk2lvdfM40yYMig1ObCA== X-Received: by 2002:a17:907:94c3:b0:b3c:82d5:211c with SMTP id a640c23a62f3a-b7053bf500dmr243520866b.27.1761816179138; Thu, 30 Oct 2025 02:22:59 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d85308c6csm1742469566b.1.2025.10.30.02.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 02:22:58 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v2 6/6] rootfs-postcommands.bbclass: add a note to the login banner when root-with-empty-password logins are enabled Date: Thu, 30 Oct 2025 10:22:48 +0100 Message-Id: <20251030092248.723968-6-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251030092248.723968-1-alex.kanavin@gmail.com> References: <20251030092248.723968-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 ; Thu, 30 Oct 2025 09:23:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225484 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 #