From patchwork Thu Oct 2 10:09:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71503 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 E16A5CAC5B0 for ; Thu, 2 Oct 2025 10:09:35 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.web11.5225.1759399773651791819 for ; Thu, 02 Oct 2025 03:09:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ocx6a9qO; spf=pass (domain: gmail.com, ip: 209.85.128.45, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-46e34bd8eb2so8658175e9.3 for ; Thu, 02 Oct 2025 03:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399772; x=1760004572; 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=gEG2LiB+W82jgjqncB4nLpIn8hSl+MlvmbhEnGyNSds=; b=Ocx6a9qOY0RN/3wsGmngaURNQ/QVnbKwkbJBLPD2oHVac3ZWFR4rctUXFvvO6UH2Bq 7tmtKP3mBXcEpzzALhnqU+uvmFSzwUSv1JGb1bbCg2aP4HArqhpP8kE46bpMdptAkHr3 xvcGwkAxMShbTDKyBhXOF/uugiAIMwf9AnuNYs2EFJDYCEVTbK3v9aQuhF0+VRFW60XI u/rTAKekc6m2KkiT3R05ErMMseRoTxDvOPx2ijzX4OW4bYSX70T6sKn9fIqRKloSHRaF m3gGcSIta6gW7/Ke1zpPOMXWCqKiXVZE5nrO/qJzny9ychfhD/aJ3uFSFLJMi5QzYVU9 cDyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399772; x=1760004572; 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=gEG2LiB+W82jgjqncB4nLpIn8hSl+MlvmbhEnGyNSds=; b=GwXye+vRt+p2NjIJGTLj2SZJ0e8FqkK05EhrZYxHkCD6THvPZYgia4sOmsWnu5Bv4n nCmM4YV9N3kQg4fLgymkZjp5plMpwh3svG+z86p6OZN7/f35oSnl0uYwFgwCz7AShzNs ZpqudAtwK0mRPp99Dpa8HoKBqb2RF6ehmNfm6O5qXslyTZtBvZA7J3LmrPG9+mAhn77K mvgayj6JosXLo6/wh7E3cLVwopZzNFXIONxthjdUuH/3J2tmu7l8JBbjDR0bBPED7cUL fMszYkhqlI+ZCjwVyltOKY97u+x95txMzEU1I4u5gzi93itquC09WhEjDEFBkOZLVNjb sxwg== X-Gm-Message-State: AOJu0YwEhfzbM45KzQqwPutoYNrcO5PWcE0tx6b3D+2KL1y33kwmq+jJ IPqNVm9OWMOReboX9wph8NIZ6f7j5VlJRLr11oEmcp8OyetAyH9kkwv+3gG4gQ== X-Gm-Gg: ASbGnctc/j3ap1hEiFelr2F4qJJGjqt+CzBChM6NVkOq7OJ2M12JgwYzUlmixI5dPux INzFKQW+ebJI85e5w1jd75ovJdJM7YLjpKNMtGCV1Z2sBBBeycfWQO/8rtTL5M5Oyg0rXqko65R FZaVSC6HLYhraYdWNZuVb0dqhkyn6+BIi4Wcq/FsvpMcbPc8YhtDpdsjDoiGQldcoIo1KK7BC7j nVjuBkNOPGzq0pZl6Z8b8HnaGKvPM7KsbmDEkSGET9gKCI52oKstQ1aMZ1Lqc/02ar99tsAvvj1 TT9sFXr1utHLD+RjzsDD+4cKAUbtknv0BflY1L7DT88LnuZCZdX52MCzv6MEAfErrNu74WG481P FoWp1zR5cKct36mrELcjC9U/hSR+7oO33jnUtYTZC6BZuGrD2aV0ILNnWVfQAeUNPsLsfnUXUp9 asnHS8R4niI4M3InkMfC6MKftcgWMoW8SyhfO7Aaz62rxTUZELAOh7YxXJnWyzv8x7XVdF+sqeN Rnj3BhjAA== X-Google-Smtp-Source: AGHT+IGI3Exh1JOvwThxg4AqlN0e6xMZYgca5CpJcJi8xCm4kUlQgCUIQML1w2MmZkI+UoiM/t7S5w== X-Received: by 2002:a05:6000:2dc3:b0:401:70eb:eec7 with SMTP id ffacd0b85a97d-42557808ad0mr4707205f8f.43.1759399771681; Thu, 02 Oct 2025 03:09:31 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:31 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH 1/7] bitbake-setup: suggest "." instead of "source" Date: Thu, 2 Oct 2025 12:09:23 +0200 Message-Id: <20251002100929.1054540-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, 02 Oct 2025 10:09:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18115 From: Yoann Congal "." is in POSIX standard[0], whereas "source" is only supported in more feature-full shells (bash, zsh, ...) [0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#dot Signed-off-by: Yoann Congal --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 1fbb65494..51d9503c4 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -219,7 +219,7 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun f.write(readme) print("Usage instructions and additional information are in\n {}\n".format(readme_file)) print("The bitbake configuration files (local.conf, bblayers.conf and more) can be found in\n {}/conf\n".format(bitbake_builddir)) - print("To run builds, source the environment using\n source {}".format(init_script)) + print("To run builds, source the environment using\n . {}".format(init_script)) def get_registry_config(registry_path, id): for root, dirs, files in os.walk(registry_path): From patchwork Thu Oct 2 10:09:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71504 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 E0152CAC5B8 for ; Thu, 2 Oct 2025 10:09:35 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web10.4859.1759399774083172230 for ; Thu, 02 Oct 2025 03:09:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OADDQ2yJ; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3ece1102998so472606f8f.2 for ; Thu, 02 Oct 2025 03:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399772; x=1760004572; 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=XA3jt0SERmtUjdQ/gu6d+4GoSJiB2FUCCLRBUF0MYU8=; b=OADDQ2yJg6KENMSYYm/kH0OGxj+xIsI8Yflp7AVJuHcVBpv9oQfVebU7ZUEfJ8FYNf ACr0sbJM+B8muNMSu15qsFUQX+Ws3Ea72nFiiVuwnQsYIMMvxTOW9UGghTif8foUyD+O WFl3h/rJCD9xcDy0oyJ+LQ9a5JKzD+32RvxYctkDAxmrDDXLmlQ4fB52iyquxW+1VtCO 76iYz7iyPa+QjNToNqgyBl8zhSGwQvI3lEvGWSInOZ85890q0tnAjUea4G3D4aSBPiQY syWWf12dd7rvKKHcUXsqcwKIOdIutg1+lHzOjVQvAQ436gM5bhICq/a+cnCt8tAvnreT 3Gdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399772; x=1760004572; 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=XA3jt0SERmtUjdQ/gu6d+4GoSJiB2FUCCLRBUF0MYU8=; b=rXlR8BcSy9s4EEQYGR74A0kORDKl8UelBdwJbNP5Me4CxRXOGokXxTLeGT1JqWPz1v s1bsTKbGAo/6DWqlfiPTRD3pZoHFEijjYBXIdpqSh70V9vuHN2b9RvT8x6YZCvXc6Qh/ vVreNXPftmatvk2+CPAD8vW85nKqY5l+Dd/qnKj9kUSwCxUeuTMcVZ4kYPT7udm2mIKv xk6nzOcbDfXXmBFDWmXnudESf+aLi9DSPZE2ob8JQHCTvel2JoSPFmi//4eCMwpiEpsz IylJuAYj1Jl2u5NwnYfmoYToFkpqt2QGvXScgfCS+Jx1QIfpy3bq09cG/ob4YaZbeY5p 847Q== X-Gm-Message-State: AOJu0YyZ3+tuWbI2N8yd6hr+oGBg4MdTlE3pJwdw0g7louM2/wxA2kMm k5s2rpoNU42ynqJdhOryFuhWXp14jdYqX6uu6khK3TESiZIIP0kQOe115w/j3w== X-Gm-Gg: ASbGncuOpSDeMGhqk0yiyYJoK20buOhAmXGo1JsNzpMvnSf4u+Awff43ZdWXaYjL747 g4XsviUzNpHAB/Qj3bB/fj5euqUEgQWr2zqB6whMH75V6wIhyi5mC+Z7xuG++hnVHIjjH3GHqZD 1RooaFEOX2cblK0yk4prwirlE9RGZRIGc1JjG3DgXI0X9bzTumHPjEPUffXSS0mzfXiQ9iZtjje aoxJK81jJzD/CMPQ5j0rbfUljiPnKYEavjYGvIrdez7VbWf7rgKgBgZ8e2kkh7luSp807LUhlZD oqhZe0MJJe95jQR58nRSoiqVvpHjpkAUdPmb+88CXyxPXxExeUS3GXAf2euQfy51I9McdqydoKu wjJrvgt13WgmEBDBXg7VTAq6x6y9b/IVQ0AOZm4qzJ5m1N0Eu5X2/1fVgx0E9Noacnd3KaL+bdN saaqwxUb0q/UB+AO6vtAcS98QguVZo32iSWlGDwp65OE8eWEBOAFa3bUPxz3ww+ePK+/igM2+Tx 4m7r8ZS6A== X-Google-Smtp-Source: AGHT+IFxxtDOSgq7dhzyktQhtTEwxeFhL8td756NmXGHBmiXPGSV0tJz8jvlMf3jqGcGpHtUim088w== X-Received: by 2002:a05:6000:420a:b0:3ee:15d5:614f with SMTP id ffacd0b85a97d-4255781b050mr4763266f8f.46.1759399772379; Thu, 02 Oct 2025 03:09:32 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:32 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH 2/7] bitbake-setup: dash support for init-build-env script Date: Thu, 2 Oct 2025 12:09:24 +0200 Message-Id: <20251002100929.1054540-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18116 From: Yoann Congal Being minimalist, dash does not support the (non-POSIX) feature of passing an argument while sourcing a script. Like in . /oe-init-build-env With dash, one must use: set # puts in $1 cd . ./oe-init-build-env # can only be called from its directory in dash To do this: * Instead of a symlink to oe-init-build-env, keep a symlink to the directory containing it (called "oe-init-build-env-dir") * Generate a init-build-env script that dash can source using the above snippet. Signed-off-by: Yoann Congal --- bin/bitbake-setup | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 51d9503c4..36a1bbd91 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -101,13 +101,13 @@ def checkout_layers(layers, layerdir, d): if os.path.exists(os.path.join(layerdir, repodir, 'scripts/oe-setup-build')): oesetupbuild = os.path.join(layerdir, repodir, 'scripts/oe-setup-build') - oeinitbuildenv = os.path.join(layerdir, repodir, 'oe-init-build-env') + oeinitbuildenvdir = os.path.join(layerdir, repodir) print(" ") _write_layer_list(layerdir, repodirs) if oesetupbuild: - links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'init-build-env': oeinitbuildenv} + links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'oe-init-build-env-dir': oeinitbuildenvdir} for l,t in links.items(): symlink = os.path.join(layerdir, l) if os.path.lexists(symlink): @@ -145,8 +145,9 @@ def setup_bitbake_build(bitbake_config, layerdir, builddir): with open(os.path.join(build_conf_dir, "conf-notes.txt"), 'w') as f: f.write("") - def _make_init_build_env(builddir, initbuildenv): - cmd = ". {} {}".format(initbuildenv, builddir) + def _make_init_build_env(builddir, oeinitbuildenvdir): + builddir = os.path.realpath(builddir) + cmd = "cd {}\nset {}\n. ./oe-init-build-env\n".format(oeinitbuildenvdir, builddir) initbuild_in_builddir = os.path.join(builddir, 'init-build-env') with open(initbuild_in_builddir, 'w') as f: f.write(cmd) @@ -174,11 +175,11 @@ def setup_bitbake_build(bitbake_config, layerdir, builddir): if template: bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) else: - initbuildenv = os.path.join(layerdir, 'init-build-env') - if not os.path.exists(initbuildenv): + oeinitbuildenvdir = os.path.join(layerdir, 'oe-init-build-env-dir') + if not os.path.exists(os.path.join(oeinitbuildenvdir, "oe-init-build-env")): print("Could not find oe-init-build-env in any of the layers; please use another mechanism to initialize the bitbake environment") return - _make_init_build_env(bitbake_builddir, os.path.realpath(initbuildenv)) + _make_init_build_env(bitbake_builddir, os.path.realpath(oeinitbuildenvdir)) siteconf_symlink = os.path.join(bitbake_confdir, "site.conf") siteconf = os.path.normpath(os.path.join(builddir, '..', "site.conf")) From patchwork Thu Oct 2 10:09:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71505 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 E74A7CCD183 for ; Thu, 2 Oct 2025 10:09:35 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web10.4860.1759399775010093423 for ; Thu, 02 Oct 2025 03:09:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BYBYd52f; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3ecde0be34eso1101247f8f.1 for ; Thu, 02 Oct 2025 03:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399773; x=1760004573; 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=KkdaVN+no/cqOoBJpd6yvO/VRwXYD6/y37hX6rz6YK0=; b=BYBYd52fSLSQHCHc+6SoWbZylSD2/DZtgk6eEH/jxpTxADdUp8jPJcdjK8AegYMKE+ 5B5PUpJND1lu1xXk13VehgaEamadzveW0z5JpR86rNW3Vi0mdQ8t9r6VGJ04M8aDNMvq 6/aD27d4KQF71E6MrYZVzaSNjeiYT4pVaVEQZ7y0KM0vGy6JVRNUtETjPzLUNYtsE188 ra0PC5DW9Vl4Fg/8ytsf6y4kSAy7zzj15rlVxD/txSBuR1cmXEVqjx9cS7JS9v4Z7Jg6 QtwC045pjCA17yCq3jzqDRPzKaZXcj+C2HfdfHvFLTID7PO7jqObIv9cpdkFz8jaRxJ0 V2xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399773; x=1760004573; 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=KkdaVN+no/cqOoBJpd6yvO/VRwXYD6/y37hX6rz6YK0=; b=PCh5riW/XreRoywYtupQjPE9KDrdebI+8g9wvYT5v7hPwnYvdVKsddnvi3HcX17nbA tno7bszkKEMw36kqbjQPeR+8+klOsCSu7xySqfqqwCl8kUgXOC7E95vNQ0VF3fTrOzfD yJ+WLkN1e/YzuMMwogBaT6b0b1iUFuocMVE8XhQZt4yaaqDo55xaSDxqaACp9PHEF1Ik 5ligMEpsUQB7rxWLZzlYGtnqgpPaTsNbGzzxsDZhxovCLm94YZUUolMdv2B/pLO8lMrA 5naX2DuDq+3TXyTHHfK0dW6eOGaghqjsltCQeDtZ4R7aPJ/P4BeyDeepEJvpy215DLz9 gUjQ== X-Gm-Message-State: AOJu0YwFU0t+o+N+X0o2JelYgshe+7DgEPy+y8Z/Z5r5hWTAo2+SeCuE PBhIXWpZOWYgucEtMfFuJsA3tjq9S2Oh9FLcblI/n6Wz0NX9wNp/ljSTXAFluw== X-Gm-Gg: ASbGncu26q24CYMdVCeKhijmu6wwgpWjG3n49IPHPMdSpyfmt0rTICJy864jf4gmTxY Im/KdgfgwsVVfdtrwLCDqJXjapbJxWW7T3Q0HFZFQFpCNas84lQtTjRQY9bR1CFxiSA83njabC/ sfUg2bIUF6TykdrHiyoIdCzSSL6Y4DXbeaPH9oPeA7XXtjz9yXg22cMXtCb85lcNKC8w+iyyD+w bZ1oMDpJR82lyrNukVcG3QOI/nNvRev2iOMcPk+UB4R6eFqlE9V6BnudJ46/XMW4tOn4aF8R8hz kH3LJmNDgjcThwlbsBs2x3hGW5Mwfw9uxA2dl/iFcH3xaboFp1ppVYVz4D74PqWs8a1zRMASPpN k3GvSMVQ3QJHAEstP5fZlULG7yMcsJGAaJcvX2PdEv0iNtleqy97YCO3xyKnS10EkFgD+T7vq9Z tj8/JLhcZabt9J8ScEy7xQMjN5rkliOVzBe0QiF+hBfgkDZZHPImpGNrVVDTlczM3Myx7jrU9T2 mtrhE03oA== X-Google-Smtp-Source: AGHT+IFLgurK1BFnPKjwSMx12MXmni3akUv1T6NnFE1Pp+1n/8uqCMJgUJPi+2VTb7T+o8p3WT0zww== X-Received: by 2002:a5d:5d10:0:b0:3ee:1494:27f5 with SMTP id ffacd0b85a97d-4255d2ad184mr1985564f8f.13.1759399773172; Thu, 02 Oct 2025 03:09:33 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:32 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/7] lib/bb/tests/setup.py: define test parameters in a single dictionary Date: Thu, 2 Oct 2025 12:09:25 +0200 Message-Id: <20251002100929.1054540-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18117 From: Alexander Kanavin This makes maintaining and extending them easier. Signed-off-by: Alexander Kanavin --- lib/bb/tests/setup.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py index 329a0c525..c77e750db 100644 --- a/lib/bb/tests/setup.py +++ b/lib/bb/tests/setup.py @@ -227,9 +227,13 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) # (the latter two should do nothing and say that config hasn't changed) test_file_content = 'initial\n' self.add_file_to_testrepo('test-file', test_file_content) - for cf in ('test-config-1', 'test-config-2'): - for c in ('gadget','gizmo','gadget-notemplate','gizmo-notemplate'): - out = self.runbbsetup("init --non-interactive {} {}".format(os.path.join(self.registrypath,'config-2/test-config-2.conf.json') if cf == 'test-config-2' else cf, c)) + + # test-config-1 is tested as a registry config, test-config-2 as a local file + test_configurations = {'test-config-1': {'cmdline': 'test-config-1', 'buildconfigs':('gadget','gizmo','gadget-notemplate','gizmo-notemplate')}, + 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo','gadget-notemplate','gizmo-notemplate') } } + for cf, v in test_configurations.items(): + for c in v['buildconfigs']: + out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) buildpath = os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, c)) with open(os.path.join(buildpath, 'config', "config-upstream.json")) as f: config_upstream = json.load(f) From patchwork Thu Oct 2 10:09:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71507 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 C456ECAC5B8 for ; Thu, 2 Oct 2025 10:09:45 +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.web11.5227.1759399775720419928 for ; Thu, 02 Oct 2025 03:09:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YPeW0hrZ; 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-3f0ae439bc3so401097f8f.1 for ; Thu, 02 Oct 2025 03:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399774; x=1760004574; 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=ZNGKXd6PwNbtTT39BOvqkxWCy/1a/V7YkySB8+JPg5E=; b=YPeW0hrZN0xvKZTo+UK8oEn/kr1WK74200sbEAXEY4nNqm8e7OECCTGWICr3qBzG/N Zo6/pJ7SonvuO2K/x25LhUeMF4GnQ2Kqs88h14Owa3R8M6Y6m8PnNmoj/SYpJSk5GaqE GPwb8ZyMtcmL/R+p4/MsPwoGvEyxdKwndo+2qcXTa59iKnrV1RGo9uHTgaLVjsRRSTlM ODXQxAt3MjMLBbfL5lIffmylQrduE3GAqIeO9hK7So0M3FvSNltEVsINkBLpYBlQhthM WBWRp/1NYCP4XMcwTtWbgM3R70sWsTRv5Mv+w6XP8/L6LwRwUJJxypfKVIEbUfQQk5YL eS7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399774; x=1760004574; 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=ZNGKXd6PwNbtTT39BOvqkxWCy/1a/V7YkySB8+JPg5E=; b=BO4U0lfvF4AIyynUqPQJWgcabI2CEOuERpKasmyR5E/cUAqXCtlCMxkyoQfVVvNR/r ecn7Zf7bkh5xXS+GViV7E+lngiel7hOqHnO0m74nYWm80NNw5QrqCm1VIrQseAhHv51q S7zLb9fkVP4HMzkHW7FLvuVRzY/l4JO682pzLW0UnTXA5UTl8aD+vm0GWNdYHKeXhS+9 6P70Iy45YZ6H3VfRbGHmKv5fdwerfEx8ejXi4n3RjogL6KTGLftRlTNkXHkBgZkdHOZ0 l+3SmcGsCb7YFsl6/po+g3nH8mKD6+QtA7osYKzvTFcW/Xzg4vUSMbgNbseLDOp2cGqI bhWQ== X-Gm-Message-State: AOJu0Yy0HAJgspOrV0euzLdlH9YjngajJu5wCUTA1fO8rZQeFlLDIxdr maIQBtYltwkfb3sF8tNPFQTzcekeyXxnqowEAHqjBh+a0DzoNg5aOfFpiJb0Rw== X-Gm-Gg: ASbGncv93xwOoexgcemHJNUX/3C5d3Y3a0D4K5Iz/OzIjtWinJI+Bvdrd11mpAiMzmZ 1ZpRlLNn888YMTkybu/Z6iu0cWKrtATVSFuuA/MRlyTxec3Up8dYba1P0+4opPHKzJ1oUymxfMy Pz2D+5zkgeI29B827SSYV+a07Gr7s6PmOxR7bIHeSoWZe1VdjoXauCNg6KMD8mg4r8XgV0Y76Cz Rdc8EzD9n4i6bYgQywT9IYHgAzGYh3tjoCN9sz/tvIiVxnl0spNZGAxeERJStbhiY+fa70BJfo9 rEo6b5Ylzct8smF5oI8ze8azdW27RtDKbU0Zb2ZMleQhkiWDo5esWL6fSOYYIv6kFBX70IsXnnH SnAOK9f2cMqpBk1HHwqCquMtepF9oLBE6D98i9gkQq2h92XzLWHrYH8dlED5lypP6K2wjIA/b1q EcFtHCi5XdEDSGb5EEsVEAXvFoLB7ky2dN6/TwxyOb6iQm4i7ibGyUw7NNZhaFQF7fRatZ1K9En jj29hRP1w== X-Google-Smtp-Source: AGHT+IHmcFhOT7gRahw1YRS6Ta3XG5VwFk8UvZju/bbtSYmmYGXqPlusrnS/OjH1Td33MpbIJ694Zg== X-Received: by 2002:a5d:64c5:0:b0:3ea:3b7b:80bb with SMTP id ffacd0b85a97d-4255781e589mr4633715f8f.58.1759399773937; Thu, 02 Oct 2025 03:09:33 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:33 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 4/7] lib/bb/tests/setup.py: unset BBPATH to ensure isolation from the existing bitbake environment Date: Thu, 2 Oct 2025 12:09:26 +0200 Message-Id: <20251002100929.1054540-4-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18118 From: Alexander Kanavin bitbake-setup deduces top directory from BBPATH, which, if set, interferes with the tests' own setup. Signed-off-by: Alexander Kanavin --- lib/bb/tests/setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py index c77e750db..2076613d9 100644 --- a/lib/bb/tests/setup.py +++ b/lib/bb/tests/setup.py @@ -181,6 +181,11 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) def test_setup(self): + # unset BBPATH to ensure tests run in isolation from the existing bitbake environment + import os + if 'BBPATH' in os.environ: + del os.environ['BBPATH'] + # check that no arguments works self.runbbsetup("") From patchwork Thu Oct 2 10:09:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71509 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 CDC98CAC5B0 for ; Thu, 2 Oct 2025 10:09:45 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.5229.1759399776343645930 for ; Thu, 02 Oct 2025 03:09:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jJfNXMOW; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3ee15b5435bso537983f8f.0 for ; Thu, 02 Oct 2025 03:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399775; x=1760004575; 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=69vIkpICLyJT/PNf/Frl2PjjuaYh1jjwVBprDsDn+fU=; b=jJfNXMOWBnXUwtbLFgYvLjtw5SfmimBSvJKJzPr6kWvouIJwNgPCD4D1nrbG8Kx2Uw UQVx6jDgYKwZexvQD/Ulb8C11p83IcA9qIrlUjx4mTb4cB5mqRXdbRIAupFCYpsRT7nP QZWwIHaKNKy3190yxJuEn/k9fbUNZ24sZ7anZZ0M+SazlA+0Oj6WRizDbr5ggZ5YSDy8 idv/UJB5TOnAzhT1dJNG+utfC8v9FXAvZdilAcBb3kilJ2d2iX7w4Sx8+xXBR0zgyTDa 32yrhRP1dsdiKKG6T10BA1J9xgB82Idp5JWSRvbx67gg5DLjYoihlNxPDJEK3IvSzj41 ubRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399775; x=1760004575; 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=69vIkpICLyJT/PNf/Frl2PjjuaYh1jjwVBprDsDn+fU=; b=OUeFQXDBqjGwDb4MZ9Nle4OqzsFZn2Xi5mS2MO9cl5L2k8/C4s3eqvgLpwVgQM2Arb SRvGOUlR2PF0jrZNlH3mRMSj5Ski4QPrKeuzI9aX6/HR611HtX6pmANGYw3mx6XJY6ZZ dSapP0Tk1hHIBf/pheyqByQjwCQDe/Aj0MxwiRBItWxWWtBnxYOl3o2yn5/h4qTM3Exs 4q2k1ERpI5CrHbmiNpY9WQkuzV2XhLZWm54CJDHMEmZSBhwu7yCTdKRZT/pKIIxErTVg ruqtRvLuGS7tOq6IGGYf+7zXUAss8bW4VAtLgva7b4Q0MqpJNY51ae2JAdoWFEAB6Crc nNKg== X-Gm-Message-State: AOJu0YwHW6ehwSexHKGOZr0CBO8lPN9KN9IvHNkomKzyIzks5hZqiCqv NfJW3CNnQaxrzG5HfjY2wN3EL9JnWc2jcZo1eXWAckPAEukvemecpQSvq/2DEg== X-Gm-Gg: ASbGncvrVy8/r7fapPg9e3Vs3CE9Ljw5ASmKC5XroP/ASCn3zsHIx0RVYrrFzkeVkck Ib/D4pe3ftwEfjETzakRZ8Ggl0blyWYGrbKADpVDloL778bd7ePi13S6uWVzNTKPv8fYSDCv6Sh FvP9eaxy1wvBvyjUdXM3lcacBedWTUZ3PAZau1nIESW9t8dfPuNXjBpDQUbjSFtiXdYdarGo0yX 7iD4J1hxSOCiSR7gbJwqQLja7Yv3y3ZQQN1ozZyWXBOS8ludnug2HOR1YOvLm2uODFtFVPvDpFR qNLK2ANs0axeLff7KI+384qORsIWWsR2tK5app2z01QyRL7BkRlIMKDAoEvHGbcVUXCUojdE/yz nc/eCEMs6xYuAZycWgf/jqs42PllvSzg0bjkik5VyVoH+GMZoGzJWaq6pMRLjKTuyHwLL5xNZN4 rd45rKrQ9p/G7yaj40UssxHcFzQfFDhIbBQiHEto9xpJlATXAU+1Cnd5HZ2VSMBuLFFIEpDO5ww rlySbChV42GVTpSQlUC X-Google-Smtp-Source: AGHT+IH449xS+FSlripcaiB1+ZONvjDSOmYM/w41aq1AAsMbPfNhJfxZqo1PgDH5h1zuokRvdgNT7g== X-Received: by 2002:a5d:64c6:0:b0:3ee:158c:8bc3 with SMTP id ffacd0b85a97d-42557814828mr5741262f8f.36.1759399774642; Thu, 02 Oct 2025 03:09:34 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:34 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH 5/7] bitbake-setup: allow using {THISDIR}/my-layer Date: Thu, 2 Oct 2025 12:09:27 +0200 Message-Id: <20251002100929.1054540-5-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18119 From: Yoann Congal This implement the ability to use "{THISDIR}/my-layer" in the "bb-layers" list. "{THISDIR}" is remplaced by the directory containing the configuration file. In small projects, we try to keep the setup a simple as possible: a single git repo containing both the build confguration (e.g. a bitbake-setup configuration file) and the meta layer with project recipes/machine/distro. This change allows this kind of setup: ├── meta-my-project/ # the project layer └── my-project.conf.json # the bb-setup configuration file by writing, in my-project.conf.json: "bitbake-setup": { "configurations": [{ "bb-layers": [ "{THISDIR}/meta-my-project" Note: in this case meta-my-project is not present as a "source", so, not handled by bb-setup update/status. It is expected of the user to handle this on their own (is our case, a simple git workflow). Signed-off-by: Yoann Congal --- bin/bitbake-setup | 20 +++++++++++++++++--- lib/bb/tests/setup.py | 17 +++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 36a1bbd91..de83d780b 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -114,10 +114,23 @@ def checkout_layers(layers, layerdir, d): os.remove(symlink) os.symlink(os.path.relpath(t,layerdir),symlink) -def setup_bitbake_build(bitbake_config, layerdir, builddir): +def setup_bitbake_build(bitbake_config, layerdir, builddir, thisdir): def _setup_build_conf(layers, build_conf_dir): os.makedirs(build_conf_dir) - layers_s = "\n".join([" {} \\".format(os.path.join(layerdir,l)) for l in layers]) + layers_s = [] + for l in layers: + if l.startswith("{THISDIR}/"): + if thisdir: + l = l.format(THISDIR=thisdir) + else: + raise Exception("Configuration is using {THISDIR} to specify " \ + "a layer path relative to itself. This can be done only " \ + "when the configuration is specified by its path on local " \ + "disk, not when it's in a registry or is fetched over http.") + if not os.path.isabs(l): + l = os.path.join(layerdir, l) + layers_s.append(" {} \\".format(l)) + layers_s = "\n".join(layers_s) bblayers_conf = """BBLAYERS ?= " \\ {} " @@ -237,7 +250,8 @@ def update_build(config, confdir, builddir, layerdir, d): layer_config[k]["git-remote"] = v["git-remote"] checkout_layers(layer_config, layerdir, d) bitbake_config = config["bitbake-config"] - setup_bitbake_build(bitbake_config, layerdir, builddir) + thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None + setup_bitbake_build(bitbake_config, layerdir, builddir, thisdir) def int_input(allowed_values): n = None diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py index 2076613d9..747a9b733 100644 --- a/lib/bb/tests/setup.py +++ b/lib/bb/tests/setup.py @@ -130,6 +130,12 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) "description": "Gizmo notemplate build configuration", "bb-layers": ["layerC","layerD/meta-layer"], "oe-fragments": ["test-fragment-2"] + }, + { + "name": "gizmo-notemplate-with-thisdir", + "description": "Gizmo notemplate build configuration using THISDIR", + "bb-layers": ["layerC","layerD/meta-layer","{THISDIR}/layerE/meta-layer"], + "oe-fragments": ["test-fragment-2"] } ] }, @@ -174,7 +180,14 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) with open(os.path.join(bb_conf_path, 'bblayers.conf')) as f: bblayers = f.read() for l in bitbake_config["bb-layers"]: - self.assertIn(os.path.join(buildpath, 'layers', l), bblayers) + if l.startswith('{THISDIR}/'): + thisdir_layer = os.path.join( + os.path.dirname(json_config["path"]), + l.removeprefix("{THISDIR}/"), + ) + self.assertIn(thisdir_layer, bblayers) + else: + self.assertIn(os.path.join(buildpath, "layers", l), bblayers) for f in bitbake_config["oe-fragments"]: self.assertTrue(os.path.exists(os.path.join(bb_conf_path, f))) @@ -235,7 +248,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) # test-config-1 is tested as a registry config, test-config-2 as a local file test_configurations = {'test-config-1': {'cmdline': 'test-config-1', 'buildconfigs':('gadget','gizmo','gadget-notemplate','gizmo-notemplate')}, - 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo','gadget-notemplate','gizmo-notemplate') } } + 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo','gadget-notemplate','gizmo-notemplate', 'gizmo-notemplate-with-thisdir') } } for cf, v in test_configurations.items(): for c in v['buildconfigs']: out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) From patchwork Thu Oct 2 10:09:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71508 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 D3A49CCD183 for ; Thu, 2 Oct 2025 10:09:45 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web10.4861.1759399777076443389 for ; Thu, 02 Oct 2025 03:09:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PbGXPx/Z; spf=pass (domain: gmail.com, ip: 209.85.221.41, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3f0308469a4so419230f8f.0 for ; Thu, 02 Oct 2025 03:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399775; x=1760004575; 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=o/RyxCrvr2O92jjo//uHD7mUneky5UT1SYmXL79yb4E=; b=PbGXPx/Z7xOQopZ4tenfr+cBgqWdvqaJNW1Fp2SLowZ+eq5tHGTSDlh+kjy1dOXJGa h6l95eH3wODQJ+pSO5Pr3vedLPfiYYbBzX498H03WcbQUDlkmeHiq9KCMjkQ55Q7avJB PeB3ktI0XU2x3dHnZizN44CWURWSxYiNam9Y0q8y5NTvJARLh9xI4DF1MS1FEl/UX0+b YYgkfrqClYBvtBvw9GFtW46d/LBIepku6FouKKyeCrEIDbY+QIVTwyrXIs5rv59/h33r 5gxhDE6NzXKbOeQFMHfmRjyzbzRfHMMkyZ0U0VI8mMln+OCXMXMndlVQ6a8XkZQ95tSx U29Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399775; x=1760004575; 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=o/RyxCrvr2O92jjo//uHD7mUneky5UT1SYmXL79yb4E=; b=cvoPXS/e3Oa+FdUzI9PdD+RIC4pAdMxGrBgjhnTKw9nmhCCVO2U0RuTuGqUGLqznES q69d4dfD6S9oRql4tBJg5fxI26+djk6LtPmuJ0Igy3CU/2DGA+CEpBfGxXgkJo5d8hgO +yQClNSAMl2wItL01YA5LMgyluKXinBz2JqCTFjW2fhSHJ3r7p/EWM6PCxgcxnpl/4QU NXm70pg+JEAkdrH8YXsMK7N0fITylEDMXM6f5HCFqNmJbfk9nkkoOPQpgMoZTzJekiH6 1fCg8/lmEdxOukEtztpbZ7EPddGUeTgET+GtNVuvtAgy3QdDAI2f48kJPqBPs9pwItxf 9bYQ== X-Gm-Message-State: AOJu0Yyy2sLNVyWU6aLRu3dZrM5XmWLEx6C/4FjlhIPWXf7T4HVsLVJm 4pS8sdGTmsNbBWjc5HIHc475tnq0mzpiqM68U3zcesJ4o0c9X531oL1k/h+Qqw== X-Gm-Gg: ASbGncsi+AmVmvToLnMIKWFeYGtl3JlKkW0GJNqK8Rzgv9uWIku3ECeDX6R7IOwcyNu XV8UA6w1kvOg2HX26HKXLqTWDv7JzE/XjsLBPu3svHAFuuiZKOHj1mc6QmrFR+JDovQlY0MF7PK 6ilaYLex8ebImDET3liX2FyeGU3+AP0vEwhZcAmPw1eMRO8BCaOAAN5upD43RtZraZvpVeCaYnI T8ZFxflZnzlc8m7xzJ7JIoYqIUBRdQt7zA+PyyqKnKRW/WmF5RwHkkTrYjnbvzdqz8GJHJ/uaFY ha6y1KiUkDU6chu7clgoXO+3LX4CwR7cejIzgWZelhCohrACL8E9M7DMaiGThDVeOExd5fzPpes YQ4pgULzW49Druzr/fhHFfLohRy7LLDYOrxE41yd5u4WJEbirL8XGug0QnHFxn/cDvkQWc9CzS1 +dlU15DroOahUmV8O4yn11dqFIJNFUIiQrkztpLps2OWvzzHriSgPSHUXiBsGsrhz5Ncl5PChta 4dkvQbpzg== X-Google-Smtp-Source: AGHT+IGDVmSTtldgMOu9q799JiuC23EtaSfajwaaTTQOFIl8FE+pUkTOWASO3+mEEnSoq2I0NYMVqw== X-Received: by 2002:a05:6000:2510:b0:3f8:e016:41b5 with SMTP id ffacd0b85a97d-425577f0ab9mr4720169f8f.14.1759399775404; Thu, 02 Oct 2025 03:09:35 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:35 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Paul Gortmaker Subject: [PATCH 6/7] bitbake-setup: clarify that default answer to prompts is no Date: Thu, 2 Oct 2025 12:09:28 +0200 Message-Id: <20251002100929.1054540-6-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18120 From: Paul Gortmaker It is common practice to put the default choice in upper case for yes/no interactive prompts, so that when people just hit enter, they know what they are getting. An example that linux users are probably familiar with is "sensors-detect" from the "lm-sensors" package. Unify all the prompts to be the same and indicate that the default answer from hitting enter is a no with an upper case N. No functional changes. Signed-off-by: Paul Gortmaker --- bin/bitbake-setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index de83d780b..bb466d85b 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -418,7 +418,7 @@ def init_config(settings, args, d): print("Initializing a build in\n {}".format(builddir)) if not args.non_interactive: - y_or_n = input('Continue? y/n: ') + y_or_n = input('Continue? (y/N): ') if y_or_n != 'y': exit() print() @@ -623,7 +623,7 @@ def write_settings(top_dir, force_replace, non_interactive=True): print('A new settings file will be created in\n {}\n'.format(settings_path)) print('A common site.conf file will be created, please edit or replace before running builds\n {}\n'.format(siteconfpath)) if not non_interactive: - y_or_n = input('Bitbake-setup will be configured with the above settings in {}, y/n: '.format(top_dir)) + y_or_n = input('Bitbake-setup will be configured with the above settings in {}, (y/N): '.format(top_dir)) if y_or_n != 'y': print("\nYou can run 'bitbake-setup install-settings' to edit them before setting up builds") exit() @@ -669,7 +669,7 @@ def write_global_settings(settings_path, force_replace, non_interactive=True): print('Top directory prefix (where all top level directories are created) set to\n {}\n'.format(settings['default']['top-dir-prefix'])) print('Top directory name (this is added to the top directory prefix to form a top directory where builds are set up) set to\n {}\n'.format(settings['default']['top-dir-name'])) if not non_interactive: - y_or_n = input('Write out the global settings as specified above (y/n)? ') + y_or_n = input('Write out the global settings as specified above (y/N)? ') if y_or_n != 'y': print("\nYou can run 'bitbake-setup install-global-settings' to edit them before setting up builds") exit() From patchwork Thu Oct 2 10:09:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71506 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 C5528CCD182 for ; Thu, 2 Oct 2025 10:09:45 +0000 (UTC) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web11.5231.1759399777849993283 for ; Thu, 02 Oct 2025 03:09:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IMfsBFdc; spf=pass (domain: gmail.com, ip: 209.85.221.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3ee130237a8so577727f8f.0 for ; Thu, 02 Oct 2025 03:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759399776; x=1760004576; 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=i8qqT3sN+iuVfNxkatQt7RoqzzONzAC1cNfVfZc6Y7I=; b=IMfsBFdcZgjlQiBwMzYgq7ruwYHhZRCy1TnMRU/ikbyrKPVGoNraq4mey9CAv9x29g GXGsGmCvTUzDgxBFY0UV5NgVlb75yDUv17fvC18ko/PTCDXhCB4LTO0O2Eve/0HG2Zgg fSkx3MceC1V4EBe5KCsfqK+drW4iSLWozPPLpaYnWl9igVnzem96KOIqRH6u760/BccI lx6/yLuXpa1iTmIfLBmF8JKGCsl8H0fY4VYyqDo1iJNhkPByokY3pJ4Re/fZuIjoJ0BQ XS+CcoCw6WIve7TMbXG8dHn0MCDEr4X5nmhUgG0wE6aDBbzRN0jTDPvlId//M9y7zJ2f Fdkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759399776; x=1760004576; 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=i8qqT3sN+iuVfNxkatQt7RoqzzONzAC1cNfVfZc6Y7I=; b=k7Sehd6gPthTdTQJStxP9M9lVvHcnS92Y+24RwoHF10WG4IPV2qqBJ9hsdOJ7A+/I+ 3uwUSXxKLhUfKakXVuRQg0hx6WNgM+XGqRnRyfKPsShYeEfYKvNnktqUzWCPr3/kmyfz 9I8QKyxs57aEIx8f2CS773K28mifdA5PkoLRlAwG5EuooNt25TUruZiAePs7joYD0Znt Doz2Wl5dK5DjNbCNtCZQBa2a8FhpTm5AqBXzKwmL2Qh6kNKCosk5i41KhGRPkOsWoaVG 6gzdl6Dw980gSRqofE9GyiKz0Ry4+9Js19zQKt+/GS9moExE5XzluQg5ZodfHcEQDRv2 kYPg== X-Gm-Message-State: AOJu0YwnKJCVlK73B5eOJs/y896PKeXNmlgpXKl4z+lvH09hpAB4I/XF bfLxKcXy0wHKyK4LtQpIJdQgSUIuBuhMloPYxi6mNNbPAK0pPG+s0oaFb1gFKA== X-Gm-Gg: ASbGncueoHl8SLLI4pArfkAuYE9W9wEWjG1Uy94DmXNHUlFFCNhglu+04HVaetBlTrE lcqWOgn2Ju4o4I967nKGlbEGWT1WQCNH3Pv6x19XLO37ec26ytOSRiYHjGnhs00cEbNHUmp6Www uT0ZudgnhqJ1t9z5AF0BaNfZwIoLgc5FXuW2CoPzQXSSy2pDbEEKE6QB5v5Dij5C3jP+5GVx1KE VDYlLYjXSjWZ9Z0T0XwJz6c4WicG27zIYHa6AwCJsRFYQrvewgQ1q9zpYMSUr90Bj5E2+S7+LEA ESjtNuLJ/lD2My53Y1t5cI3WOqkyLsM8zaoBJuy2XKDjeoUo4qHXtarVB57MD7+N6YcbTPP8WFO nqYa43aXBsaMcklcykm/ur70f6ilBLV7v96Dxbm5SLMdUFd4+GSdCF1htOka9Pj8Jlr/8oRk/1e 2FChIQTAp3jH1PpWGlMbB0rhG40FQc5xN5uCzAw3rvxnAIFzAIoOvuESVrzp3m2y3XO8KqpttM7 tD2UI9ohQ== X-Google-Smtp-Source: AGHT+IE8USIC/ZgOmQAWfQ0KGSSPxz047WC7T+BSn+l9hdBaFKIB48kMCYwVcckCQLc34kfYvkhkMg== X-Received: by 2002:a05:6000:2012:b0:3ea:e0fd:290a with SMTP id ffacd0b85a97d-425577ecb00mr4621119f8f.12.1759399776092; Thu, 02 Oct 2025 03:09:36 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6bbesm2953894f8f.12.2025.10.02.03.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 03:09:35 -0700 (PDT) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 7/7] bitbake: registry: make a separate configuration for poky with sstate mirror Date: Thu, 2 Oct 2025 12:09:29 +0200 Message-Id: <20251002100929.1054540-7-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002100929.1054540-1-alex.kanavin@gmail.com> References: <20251002100929.1054540-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, 02 Oct 2025 10:09:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18121 From: Alexander Kanavin Using sstate mirror places much higher requirements on both network robustness and network bandwidth than just fetching source code. When the network doesn't meet those, the user experience can be very frustrating as errors can be cryptic and intermittent, or bitbake would just seemingly do nothing for a long time. Let's make sstate an opt-in, and provide a caution for using it. When it does work, it works wonderfully and does accelerate builds significantly. Signed-off-by: Alexander Kanavin --- .../configurations/poky-master.conf.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/default-registry/configurations/poky-master.conf.json b/default-registry/configurations/poky-master.conf.json index 3f1299179..60531ba02 100644 --- a/default-registry/configurations/poky-master.conf.json +++ b/default-registry/configurations/poky-master.conf.json @@ -53,10 +53,7 @@ "bitbake-setup": { "configurations": [ { - "name": "poky", - "description": "Poky - The Yocto Project testing distribution", "bb-layers": ["openembedded-core/meta","meta-yocto/meta-yocto-bsp","meta-yocto/meta-poky"], - "oe-fragments": ["core/yocto/sstate-mirror-cdn"], "oe-fragments-one-of": { "machine": { "description": "Target machines", @@ -66,7 +63,18 @@ "description": "Distribution configuration variants", "options" : ["distro/poky", "distro/poky-altcfg", "distro/poky-tiny"] } + }, + "configurations": [ + { + "name": "poky", + "description": "Poky - The Yocto Project testing distribution" + }, + { + "name": "poky-with-sstate", + "description": "Poky - The Yocto Project testing distribution with internet sstate acceleration. Use with caution as it requires a completely robust local network with sufficient bandwidth.", + "oe-fragments": ["core/yocto/sstate-mirror-cdn"] } + ] } ] },