From patchwork Thu Mar 14 09:15:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40971 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 2F4DEC54E71 for ; Thu, 14 Mar 2024 09:15:25 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by mx.groups.io with SMTP id smtpd.web11.8371.1710407717158970267 for ; Thu, 14 Mar 2024 02:15:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=X+Wyc1Zd; spf=pass (domain: bootlin.com, ip: 217.70.183.200, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id A2BBA2000E; Thu, 14 Mar 2024 09:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Srbuco45aQDv6r/pp0UG++w8mqRh2iHcJoA4DGUYB74=; b=X+Wyc1ZdQGmKknQqEQLfBslhHQ9OYrZ6m4ICOJ+Mt5W3pAbc0cOHwlPppOqESV2OnJVnZb NDoNZdKivjI4dg+2gNO0xe28i3lNluYztavudDaq1SZppI3mms98os+i5kROZ1SNswPDNl dZQvCJBU77UTS5JZqoOYsXsKQTG0ro5qHJhAN+NBI8SypnC500EvjQL2lZiau9rK2qI6qo KnZ0Ty3R8xWyPM3YIBxqK2IGjUdKgVDnfxgpZVtdvjEYj1KB8C6OmvS4ZzOQd/eSApNz2o vu8k0XrdZDPoqsAANoR0jRB+HfYY7wiPHKn/1L0wg/fsqdMcT/VEgFIl312iDA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Luca Ceresoli , Quentin Schulz Subject: [nanbield][PATCH 1/7] ref-manual: tasks: do_cleanall: recommend using '-f' instead Date: Thu, 14 Mar 2024 10:15:02 +0100 Message-Id: <20240314091508.84166-2-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4969 From: Michael Opdenacker From: Luca Ceresoli do_cleanall can produce failures when used in legitimate cases, such as with recipe variants (foo and foo-native) or a shared DL_DIR. This is why it is forbidden when writing tests that will run on the autobuilders (https://docs.yoctoproject.org/test-manual/intro.html?highlight=cleanall#considerations-when-writing-tests). Reword the documentation to clearly discourage, provide a safe alternative (bitbake -f -c fetch), and the rationale with an example. Reported-by: Sam Liddicott Link: https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335 Signed-off-by: Luca Ceresoli Reviewed-by: Quentin Schulz --- documentation/ref-manual/tasks.rst | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst index 0db960b22f..16b48ca0bc 100644 --- a/documentation/ref-manual/tasks.rst +++ b/documentation/ref-manual/tasks.rst @@ -470,9 +470,29 @@ You can run this task using BitBake as follows:: $ bitbake -c cleanall recipe -Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so only -if you want to start fresh with the :ref:`ref-tasks-fetch` -task. +You should never use the :ref:`ref-tasks-cleanall` task in a normal +scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task, +use instead:: + + $ bitbake -f -c fetch recipe + +.. note:: + + The reason to prefer ``bitbake -f -c fetch`` is that the + :ref:`ref-tasks-cleanall` task would break in some cases, such as:: + + $ bitbake -c fetch recipe + $ bitbake -c cleanall recipe-native + $ bitbake -c unpack recipe + + because after step 1 there is a stamp file for the + :ref:`ref-tasks-fetch` task of ``recipe``, and it won't be removed at + step 2 because step 2 uses a different work directory. So the unpack task + at step 3 will try to extract the downloaded archive and fail as it has + been deleted in step 2. + + Note that this also applies to BitBake from concurrent processes when a + shared download directory (:term:`DL_DIR`) is setup. .. _ref-tasks-cleansstate: From patchwork Thu Mar 14 09:15:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40972 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 42C88C54E73 for ; Thu, 14 Mar 2024 09:15:25 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web10.8389.1710407718266422478 for ; Thu, 14 Mar 2024 02:15:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eBNMEMPT; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 43F8B6000A; Thu, 14 Mar 2024 09:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xxd2lJ4i+QEbnxmtmrBZeioxSA7cq++aBm3/SsfLZUw=; b=eBNMEMPTQL4YJ08GKfNc5XkTgzw5kw4TaMEbLgDIV01xTPTqavg7eVMcmjkwxnZA8M4zt5 L37UbfiYCho2AfkweTiftQpP/LmTHExmRNdfmI9iKv/G48LkaNquUzzTvLbu5uALPGywpp TSiawwimJJ8+1rabhgIbByqaEIETa0Ik8ClUI2xFXA9RJ8j22f3eASZbcVN5NMQdY15HQX hNjF28dpZ5KI9QOAIyD+2ty8vGOj+KYxsMSk0xBfPKQN0N0s7AX0JKr4xlBP2hD9g56N9U dkpAdaNJ4Y1doF2/gWVunBLwEB92Ftmfn/97uLZn3xKV6zG4TGeQucpyMyAs5A== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Quentin Schulz , Luca Ceresoli Subject: [nanbield][PATCH 2/7] ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate Date: Thu, 14 Mar 2024 10:15:03 +0100 Message-Id: <20240314091508.84166-3-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4970 From: Michael Opdenacker From: Luca Ceresoli do_cleansstat can produce build errors when using a shared sstate cache. Add a note to clearly discourage, provide a safe alternative (bitbake -f), and the rationale. Suggested-by: Quentin Schulz Link: https://lore.kernel.org/yocto-docs/20240219155513.76738-1-luca.ceresoli@bootlin.com/T/#m5529687ecb0f9ec2dacddcb6ff58e2df73af9cde Signed-off-by: Luca Ceresoli Reviewed-by: Quentin Schulz --- documentation/ref-manual/tasks.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst index 16b48ca0bc..c28cd7a94a 100644 --- a/documentation/ref-manual/tasks.rst +++ b/documentation/ref-manual/tasks.rst @@ -514,6 +514,18 @@ When you run the :ref:`ref-tasks-cleansstate` task, the OpenEmbedded build syste no longer uses any sstate. Consequently, building the recipe from scratch is guaranteed. +.. note:: + + Using :ref:`ref-tasks-cleansstate` with a shared :term:`SSTATE_DIR` is + not recommended because it could trigger an error during the build of a + separate BitBake instance. This is because the builds check sstate "up + front" but download the files later, so it if is deleted in the + meantime, it will cause an error but not a total failure as it will + rebuild it. + + The reliable and preferred way to force a new build is to use ``bitbake + -f`` instead. + .. note:: The :ref:`ref-tasks-cleansstate` task cannot remove sstate from a remote sstate From patchwork Thu Mar 14 09:15:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40970 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 EEBCBC54E69 for ; Thu, 14 Mar 2024 09:15:24 +0000 (UTC) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mx.groups.io with SMTP id smtpd.web11.8372.1710407718321142256 for ; Thu, 14 Mar 2024 02:15:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aypKiD/Q; spf=pass (domain: bootlin.com, ip: 217.70.183.194, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id BDA3440005; Thu, 14 Mar 2024 09:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i9Q24YyBHgOsb7C5144nujZV8n8i5h4jdl0UFRmMoHc=; b=aypKiD/QVEjkCJM+hOrEn5NkRPfpjD0joUZ3dUsFcE8Jy/dJXmWtn2/MMxFlX7Tc38hYnQ rdwHBXBCpSBAtdnq1fvVj1ncesxxLu+KIzxwAn30pomHuhxsXNqzuKRZKuJdfgq/s/bQP7 gCURyMOvosleebVy19Luzd9dcZOEqJABiwcCHeyMrweHoThmwClKyKQGvFAwrByxA0NH3Y 11y3MtCH0CkVg56uir+6nIUTUos0C/cMHrusIZQbo8rtmI0k3ecy4j9L1bkJWXYeAGC5Xx +6D3y/Xx0p4GRbEvEV4ZVkQ7DCyrySK1BbNleNOgRXs+zD5PCQmDnDiQXcelVg== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Johan Bezem Subject: [nanbield][PATCH 3/7] ref-manual: variables: correct sdk installation default path Date: Thu, 14 Mar 2024 10:15:04 +0100 Message-Id: <20240314091508.84166-4-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4971 From: Michael Opdenacker From: Johan Bezem The SDKPATH variable seems mistakenly identified as the default path where the SDK will be installed by the generated installation script, unless option '-d' or a manual input overrides this default. The intended variable is SDKPATHINSTALL. SDKPATH indicates where the SDK is being composed and built. The definitions have been added/updated. Signed-off-by: Johan Bezem Reviewed-by: Michael Opdenacker --- documentation/overview-manual/concepts.rst | 2 +- documentation/ref-manual/variables.rst | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst index d177ca33b7..62f2327a7e 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst @@ -1375,7 +1375,7 @@ This next list, shows the variables associated with a standard SDK: Lists packages that make up the target part of the SDK (i.e. the part built for the target hardware). -- :term:`SDKPATH`: Defines the +- :term:`SDKPATHINSTALL`: Defines the default SDK installation path offered by the installation script. - :term:`SDK_HOST_MANIFEST`: diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index f4beecf0d2..448bea9938 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -7612,6 +7612,10 @@ system and gives an overview of their function and contents. configuration will not take effect. :term:`SDKPATH` + Defines the path used to collect the SDK components and build the + installer. + + :term:`SDKPATHINSTALL` Defines the path offered to the user for installation of the SDK that is generated by the OpenEmbedded build system. The path appears as the default location for installing the SDK when you run the SDK's @@ -7621,7 +7625,7 @@ system and gives an overview of their function and contents. :term:`SDKTARGETSYSROOT` The full path to the sysroot used for cross-compilation within an SDK as it will be when installed into the default - :term:`SDKPATH`. + :term:`SDKPATHINSTALL`. :term:`SECTION` The section in which packages should be categorized. Package From patchwork Thu Mar 14 09:15:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40967 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 122F2C54E6A for ; Thu, 14 Mar 2024 09:15:25 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by mx.groups.io with SMTP id smtpd.web10.8390.1710407718763777668 for ; Thu, 14 Mar 2024 02:15:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=XS+6mFGs; spf=pass (domain: bootlin.com, ip: 217.70.183.201, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3EB1F1BF203; Thu, 14 Mar 2024 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6DpFaRjoM5AOfjt5OjvqhsZqIZplvx+Xx/r4uP6We9E=; b=XS+6mFGsR/nEDx0Q5m5uyyDp7/vXe0xAnQU8HFCi6MlWsTffUr96q4N4r1tT7pVNne21x+ SycLrth+uL7XFe+i04r7cuJRNeLM0X/pvv3vye/D7xljQZCLTV6frxmb18PlgpXWwsGxNW JgggzLfp63nXufrt8Qz5t7/RB+tprPQvNyvnVzF9wm9Q9B/dsBDnH3FuMmcZcyIWKVIeLP CUpnQsx6BL6dvACLoXRH5t70xV8w6AlMh56dtQxCOMK9trQlsEwld7x2JZPn6ZdapOpTcQ P//s8VnEbPwMm5DpfBSg/jFNUfnXI2ZiUpHVjx6OOXU4AxGEGVQ0Ii4xzI5vOA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Geoff Parker Subject: [nanbield][PATCH 4/7] ref-manual: variables: adding multiple groups in GROUPADD_PARAM Date: Thu, 14 Mar 2024 10:15:05 +0100 Message-Id: <20240314091508.84166-5-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4972 From: Michael Opdenacker From: Geoff Parker Add missing documentation on how to add multiple groups with a single GROUPADD_PARAM:${PN} Signed-off-by: Geoff Parker Reviewed-by: Michael Opdenacker --- documentation/ref-manual/variables.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 448bea9938..ec879f9f86 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -3234,6 +3234,14 @@ system and gives an overview of their function and contents. GROUPADD_PARAM:${PN} = "-r netdev" + More than one group can be added by separating each set of different + groups' parameters with a semicolon. + + Here is an example adding multiple groups from the ``useradd-example.bb`` + file in the ``meta-skeleton`` layer:: + + GROUPADD_PARAM:${PN} = "-g 880 group1; -g 890 group2" + For information on the standard Linux shell command ``groupadd``, see https://linux.die.net/man/8/groupadd. From patchwork Thu Mar 14 09:15:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40969 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 1CF15C54E6E for ; Thu, 14 Mar 2024 09:15:25 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by mx.groups.io with SMTP id smtpd.web10.8391.1710407719192975698 for ; Thu, 14 Mar 2024 02:15:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LGbvSyKm; spf=pass (domain: bootlin.com, ip: 217.70.183.193, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id B97DF24000E; Thu, 14 Mar 2024 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=89g5xuVS7heUR9Cq3BV/iDoYGePtfeN5zXumo2vTVvE=; b=LGbvSyKmSbmU6M4yRL8cyXaYA3PaajJ5LMoGOqjpsb92THiSf1RwIOaHjFGUw3F/9/QTnI M3AtRQsVF/TYr9F0t9oUWLtX74/vg/UMcvS7aPCujaEenZoAK7qtzdJzjvXRGNIJXorLWH OclpqfPZZwcITnlqBkTJ67ZddYI4oRSUIt9QC4+QHbPZ83xi2ceTwjXOdTg5CbBN4KNRQ5 bEEPi19Tuja6I7ohd0zUCDu+NylGwluwFQhX0aO2ks3k1EiIc8wT1VqyNeyUuKLhT+OJHD 8G0L036GEiftqp2a7lIPSGG6ll9BKXWmkBez6yX7oGqCMas9Iln6b/LwFpqlCg== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Quentin Schulz Subject: [nanbield][PATCH 5/7] dev-manual: packages: fix capitalization Date: Thu, 14 Mar 2024 10:15:06 +0100 Message-Id: <20240314091508.84166-6-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4973 From: Michael Opdenacker Using "PR service" instead of "PR Service", like in the other two instances in this document. Signed-off-by: Michael Opdenacker Reported-by: Quentin Schulz Reviewed-by: Quentin Schulz --- documentation/dev-manual/packages.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-manual/packages.rst b/documentation/dev-manual/packages.rst index a6e6af0de7..e5028fffdc 100644 --- a/documentation/dev-manual/packages.rst +++ b/documentation/dev-manual/packages.rst @@ -206,7 +206,7 @@ history, see the part of the shared state (sstate) packages. If you maintain an sstate feed, it's expected that either all your building systems that contribute to the sstate feed use a shared PR service, or you do not - run a PR Service on any of your building systems. + run a PR service on any of your building systems. That's because if you had multiple machines sharing a PR service but not their sstate feed, you could end up with "diverging" hashes for From patchwork Thu Mar 14 09:15:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40968 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 0106CC54E68 for ; Thu, 14 Mar 2024 09:15:25 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by mx.groups.io with SMTP id smtpd.web11.8373.1710407719646989293 for ; Thu, 14 Mar 2024 02:15:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=P2Av8Mt6; spf=pass (domain: bootlin.com, ip: 217.70.183.200, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1D28220002; Thu, 14 Mar 2024 09:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d0i+58X2Lf183VKlkly0UFB/pQFAw3+hoKPbLs8rE44=; b=P2Av8Mt6ay0QBCI/WKMEXTmTB4am24J7OxLcBc/99QU92QEcmez0OQB5UrkE90lNdZLLeb IA18i/fKCH6Xtgiufcwkjh9g1DhPeqXGe/2OMvgXEPOgQ19ZCNQlWarZpS/ervxEQQRPvl T7q2UpcI5Y0ArfB0etvl8xU1tZFDV1AiAKlmAl+Vd+wMlob87yL+588U8UbNl29D3YyEzZ 7Ek3JbgMTUqH0QoPJX/wWc/3sWih7yos6o6fa6qVIwFkNmxt2cK75kmWyY9lwv+5kfaCLV KGkOVs8vH0uvhMBYgqbMpPO0ssHBTxv1p9dpWn9Ulb+f7qhS0E7SVD7AMrR3iA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , =?utf-8?q?Simone_We?= =?utf-8?q?i=C3=9F?= Subject: [nanbield][PATCH 6/7] contributor-guide: add notes for tests Date: Thu, 14 Mar 2024 10:15:07 +0100 Message-Id: <20240314091508.84166-7-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4974 From: Michael Opdenacker From: Simone Weiß This adds some hints that and how changes should be tested when contributing. Fixes [YOCTO #15412] Signed-off-by: Simone Weiß Reviewed-by: Michael Opdenacker --- .../contributor-guide/submit-changes.rst | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst index 61f3157d60..59f3c1e406 100644 --- a/documentation/contributor-guide/submit-changes.rst +++ b/documentation/contributor-guide/submit-changes.rst @@ -221,6 +221,38 @@ to add the upgraded version. `__ in the Linux kernel documentation. +Test your changes +----------------- + +For each contributions you make, you should test your changes as well. +For this the Yocto Project offers several types of tests. Those tests cover +different areas and it depends on your changes which are feasible. For example run: + + - For changes that affect the build environment: + + - ``bitbake-selftest``: for changes within BitBake + + - ``oe-selftest``: to test combinations of BitBake runs + + - ``oe-build-perf-test``: to test the performance of common build scenarios + + - For changes in a recipe: + + - ``ptest``: run package specific tests, if they exist + + - ``testimage``: build an image, boot it and run testcases on it + + - If applicable, ensure also the ``native`` and ``nativesdk`` variants builds + + - For changes relating to the SDK: + + - ``testsdk``: to build, install and run tests against a SDK + + - ``testsdk_ext``: to build, install and run tests against an extended SDK + +Note that this list just gives suggestions and is not exhaustive. More details can +be found here: :ref:`test-manual/intro:Yocto Project Tests --- Types of Testing Overview`. + Creating Patches ================ @@ -285,8 +317,9 @@ Validating Patches with Patchtest ``patchtest`` is available in ``openembedded-core`` as a tool for making sure that your patches are well-formatted and contain important info for maintenance purposes, such as ``Signed-off-by`` and ``Upstream-Status`` -tags. Currently, it only supports testing patches for -``openembedded-core`` branches. To setup, perform the following:: +tags. Note that no functional testing of the changes will be performed by ``patchtest``. +Currently, it only supports testing patches for ``openembedded-core`` branches. +To setup, perform the following:: pip install -r meta/lib/patchtest/requirements.txt source oe-init-build-env From patchwork Thu Mar 14 09:15:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 40966 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 E59F2C54E5D for ; Thu, 14 Mar 2024 09:15:24 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by mx.groups.io with SMTP id smtpd.web10.8392.1710407719988307636 for ; Thu, 14 Mar 2024 02:15:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PVKborBo; spf=pass (domain: bootlin.com, ip: 217.70.183.201, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 87C341BF212; Thu, 14 Mar 2024 09:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710407718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pd4m2QP5wyUswoGESCOsRUpLE8IgWkKBXcXpfFlE/DY=; b=PVKborBoBCHEHMEUBz/+8GMlymQyNYFZ72gKIIHWynklji3madYGWrwdTtnEMBJmkypG9Y W3MjFXla32s0A+iK4eqoKlrDJGqBv2jV76zTNLHcwZuuGy3e16J1MGoFqXwmfBOVKvGWFl dqcCrC13Lf1r0BzTaDPXMGTlwQuqQuvwyzNCp7w5/I1keAFwgQUrt6c0neQ4ml4jwPgu8h Fz3ndbGNGaZTtYqyzkXRkOnhP7rS0asJ+4W+o+m5mG2awTauKGSJjUvkzWXg1WLyYpye8p Ik9STamqc/R2E38DfH77COblQqRSqZR6q2m/+qPKjZgdtqPskkf7tipvzlD44g== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Tim Orling Subject: [nanbield][PATCH 7/7] manuals: document VIRTUAL-RUNTIME variables Date: Thu, 14 Mar 2024 10:15:08 +0100 Message-Id: <20240314091508.84166-8-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com> References: <20240314091508.84166-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 14 Mar 2024 09:15:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4975 From: Michael Opdenacker Document the convention to use variables prefixed by VIRTUAL_RUNTIME. Add references to the new term where possible. Another reason is that such variables are recommended in a warning issued by meta/classes-global/insane.bbclass Signed-off-by: Michael Opdenacker Reported-by: Tim Orling --- documentation/dev-manual/device-manager.rst | 8 ++--- documentation/ref-manual/variables.rst | 37 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/documentation/dev-manual/device-manager.rst b/documentation/dev-manual/device-manager.rst index 0343d19b9c..49fc785fec 100644 --- a/documentation/dev-manual/device-manager.rst +++ b/documentation/dev-manual/device-manager.rst @@ -60,10 +60,10 @@ kernel. All devices created by ``devtmpfs`` will be owned by ``root`` and have permissions ``0600``. -To have more control over the device nodes, you can use a device manager -like ``udev`` or ``busybox-mdev``. You choose the device manager by -defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or -distro configuration file. Alternatively, you can set this variable in +To have more control over the device nodes, you can use a device manager like +``udev`` or ``busybox-mdev``. You choose the device manager by defining the +:term:`VIRTUAL-RUNTIME_dev_manager ` variable in your machine +or distro configuration file. Alternatively, you can set this variable in your ``local.conf`` configuration file:: VIRTUAL-RUNTIME_dev_manager = "udev" diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index ec879f9f86..52fd7d9002 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -6750,11 +6750,11 @@ system and gives an overview of their function and contents. .. note:: - A corresponding mechanism for virtual runtime dependencies - (packages) exists. However, the mechanism does not depend on any - special functionality beyond ordinary variable assignments. For - example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of - the component that manages the ``/dev`` directory. + A corresponding mechanism for virtual runtime dependencies (packages) + exists. However, the mechanism does not depend on any special + functionality beyond ordinary variable assignments. For example, + :term:`VIRTUAL-RUNTIME_dev_manager ` refers to the + package of the component that manages the ``/dev`` directory. Setting the "preferred provider" for runtime dependencies is as simple as using the following assignment in a configuration file:: @@ -9880,6 +9880,33 @@ system and gives an overview of their function and contents. Additionally, you should also set the :term:`USERADD_ERROR_DYNAMIC` variable. + :term:`VIRTUAL-RUNTIME` + :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual + packages for runtime usage, typically for use in :term:`RDEPENDS` + or in image definitions. + + An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible + to either use BusyBox based utilities:: + + VIRTUAL-RUNTIME_base-utils = "busybox" + + or their full featured implementations from GNU Coreutils + and other projects:: + + VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils" + + Here are two examples using this virtual runtime package. The + first one is in :yocto_git:`initramfs-framework_1.0.bb + `:: + + RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}" + + The second example is in the :yocto_git:`core-image-initramfs-boot + ` + image definition:: + + PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd" + :term:`VOLATILE_LOG_DIR` Specifies the persistence of the target's ``/var/log`` directory, which is used to house postinstall target log files.