From patchwork Thu Oct 5 20:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31731 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 13621E92739 for ; Thu, 5 Oct 2023 20:03:43 +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.web10.25881.1696536212363139729 for ; Thu, 05 Oct 2023 13:03:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aF/AhFsr; spf=pass (domain: bootlin.com, ip: 217.70.183.194, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E25B40008; Thu, 5 Oct 2023 20:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536210; 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; bh=oJqlVD2xctWRWK/WOPTZVNcLW8APwlw2NfNewjNPswU=; b=aF/AhFsr28HIpWJpdUMqwvsI13VYNeXVcQ2p6XmURZGiqi1PcAIVfC7A5VWMKb8d/2RxyX QTAbSUqHi7IdSqt7C0+AnN1obDWszdKkZ9APIAJzZvepW9f7Cb9gTQsMXJsh17A1cUcwao LlrIR4xlnWsq7ydrmkqS8i+lLUHcHg9cDhA5K4QdudjFHSHWfUD8CZrPgoGa/V5j8/MeKQ HA3qJQ5yRqvQTT2P/np9TkCPsuS4P51f2Aa/qdgJ8eZyu+NlwhEi/2pUjsXLEjfMwAJr5W cA18oUpP1ianJd7wOH6gcX8UOdSpgU++2ikC09UrBqb6JhqBjJX4+pFgr7EANg== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Richard Purdie Subject: [kirstone][PATCH 1/9] contributor-guide/style-guide: Refer to recipes, not packages Date: Thu, 5 Oct 2023 22:03:10 +0200 Message-Id: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4310 From: Michael Opdenacker From: Richard Purdie Whilst often referred to as packages by people we should use the more accurate term in documentation, 'recipe' instead of 'packages'. Signed-off-by: Richard Purdie Reviewed-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 99105179a6..1a1c1c6ee2 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -7,17 +7,18 @@ Recipe Naming Conventions ========================= In general, most recipes should follow the naming convention -``recipes-category/package/packagename_version.bb``. Recipes for related -projects may share the same package directory. ``packagename``, ``category``, -and ``package`` may contain hyphens, but hyphens are not allowed in ``version``. +``recipes-category/recipename/recipename_version.bb``. Recipes for related +projects may share the same recipe directory. ``recipename`` and ``category`` +may contain hyphens, but hyphens are not allowed in ``version``. If the recipe is tracking a Git revision that does not correspond to a released -version of the software, ``version`` may be ``git`` (e.g. ``packagename_git.bb``) +version of the software, ``version`` may be ``git`` (e.g. ``recipename_git.bb``) +and the recipe would set :term:`PV`. Version Policy ============== -Our versions follow the form ``:-`` +Our versions follow the form ``:-`` or in BitBake variable terms ${:term:`PE`}:${:term:`PV`}-${:term:`PR`}. We generally follow the `Debian `__ version policy which defines these terms. @@ -26,7 +27,7 @@ In most cases the version :term:`PV` will be set automatically from the recipe file name. It is recommended to use released versions of software as these are revisions that upstream are expecting people to use. -Package versions should always compare and sort correctly so that upgrades work +Recipe versions should always compare and sort correctly so that upgrades work as expected. With conventional versions such as ``1.4`` upgrading ``to 1.5`` this happens naturally, but some versions don't sort. For example, ``1.5 Release Candidate 2`` could be written as ``1.5rc2`` but this sorts after @@ -62,7 +63,7 @@ Version Number Changes The :term:`PR` variable is used to indicate different revisions of a recipe that reference the same upstream source version. It can be used to force a -new version of a package to be installed onto a device from a package feed. +new version of a recipe to be installed onto a device from a package feed. These once had to be set manually but in most cases these can now be set and incremented automatically by a PR Server connected with a package feed. From patchwork Thu Oct 5 20:03:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31727 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 0FD91E92734 for ; Thu, 5 Oct 2023 20:03:43 +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.25883.1696536214129140577 for ; Thu, 05 Oct 2023 13:03:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EwbNacSA; spf=pass (domain: bootlin.com, ip: 217.70.183.193, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id CF7ED240004; Thu, 5 Oct 2023 20:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536212; 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=fF1gg/GHRmXQh0W4kMMQtQO9oaY5mGZRPenMq3z1vVo=; b=EwbNacSAtnSqJ2GNlCig5UMbX+J+6Mi7Z0soFSAn9KKdDhByZKsLrPQfkOYnjsfudgIpAm nmXjqxSEx+CY7YSmgj5ZAi2GG611hh9Zy47tqOZw2kpv12k+/vEwcWmafdpJKi5bbmCQeJ lXLf8IJM7s5DC1gDbH+xMgwe9x8G+zz5gbwoMLHiBl1349yMoc1lJf3jNP4T4a0rsDLyvY ns1AdRaFdgVnMGZ+toxDrTdnzOj+r21fKbNWE+40J+TNcrsHo5D+AuT8q6TM36nZkcTyAE eur/knFUrRSLCyJXJbvvky4rK3yJkMwHfkb6Y+CAibUxC8FoIxU+h10llP4cHA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Richard Purdie , Yoann Congal Subject: [kirstone][PATCH 2/9] contributor-guide/style-guide: Add a note about task idempotence Date: Thu, 5 Oct 2023 22:03:11 +0200 Message-Id: <20231005200318.2873125-2-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4311 From: Michael Opdenacker From: Richard Purdie Signed-off-by: Richard Purdie CC: Yoann Congal --- Changes in V2: - Use a bulleted list to clarify the order of steps (Suggested by Yoann Congal) - Recall that we are talking about idempotence in tasks. Useful for people overlooking the previous paragraph. --- .../contributor-guide/recipe-style-guide.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 1a1c1c6ee2..b63172bd77 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -257,6 +257,20 @@ Tips and Guidelines for Writing Recipes and ``-nativesdk`` ones, whenever possible. This avoids having to maintain multiple recipe files at the same time. +- Recipes should have tasks which are idempotent, i.e. that executing a given task + multiple times shouldn't change the end result. The build environment is built upon + this assumption and breaking it can cause obscure build failures. + +- For idempotence when modifying files in tasks, it is usually best to: + + - copy a file ``X`` to ``X.orig`` (only if it doesn't exist already) + - then, copy ``X.orig`` back to ``X``, + - and, finally, modify ``X``. + + This ensures if rerun the task always has the same end result and the + original file can be preserved to reuse. It also guards against an + interrupted build corrupting the file. + Patch Upstream Status ===================== From patchwork Thu Oct 5 20:03:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31730 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 1221BE92738 for ; Thu, 5 Oct 2023 20:03:43 +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.25884.1696536215837408024 for ; Thu, 05 Oct 2023 13:03:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=OVYpj+nV; spf=pass (domain: bootlin.com, ip: 217.70.183.193, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 535BC240005; Thu, 5 Oct 2023 20:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536214; 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=J0bzY39eZ8E+rBpv4dnGyOKRu649hGL3lTBISEi6fOA=; b=OVYpj+nVMUVtFBX2ZhVsmD8sUJq+47LfpPWICXRhzMNr68EOWaqHmkgGCNRhzp0SAUmFZF EST4QzP0nfzJW027N93gEvXBLYLtM3F7BJluaRVO+DhErRpiXVeBsIF0KaL3MYFCv67tHj LMXX6g4Q1c9s3goNQpuGVGXzf07Lb3rViGjs0p95NpRlflBwnYWhrCysED9mG7D3g6YY7Y EXvCV73026S8S8exUFn6lUwwihdMzOvzVRBrJ+9MkSvy11M8dhokkscjHXDZfpjZ8MtudO 7T6dHcaBQ36AwT8IW8uawXEDpTnSj1itS52eeuWLH3h8j0KPKZU6Mj/P7n+U9A== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirstone][PATCH 3/9] bsp-guide: bsp.rst: replace reference to wiki Date: Thu, 5 Oct 2023 22:03:12 +0200 Message-Id: <20231005200318.2873125-3-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4312 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- documentation/bsp-guide/bsp.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/bsp-guide/bsp.rst b/documentation/bsp-guide/bsp.rst index 109811a0c4..8b29290b59 100644 --- a/documentation/bsp-guide/bsp.rst +++ b/documentation/bsp-guide/bsp.rst @@ -893,8 +893,8 @@ Yocto Project: ``recipes-*`` subdirectories specific to the recipe's function, or within a subdirectory containing a set of closely-related recipes. The recipes themselves should follow the general guidelines for - recipes used in the Yocto Project found in the ":oe_wiki:`OpenEmbedded - Style Guide `". + recipes found in the ":doc:`../contributor-guide/recipe-style-guide`" + in the Yocto Project and OpenEmbedded Contributor Guide. - *License File:* You must include a license file in the ``meta-bsp_root_name`` directory. This license covers the BSP From patchwork Thu Oct 5 20:03:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31728 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 211B4E9273B for ; Thu, 5 Oct 2023 20:03:43 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web10.25886.1696536217582290376 for ; Thu, 05 Oct 2023 13:03:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AQ1j3lkd; spf=pass (domain: bootlin.com, ip: 217.70.183.196, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id A57DBE0003; Thu, 5 Oct 2023 20:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536215; 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=BAjCSaJanhCagfr1lT9CyVq5q2qw1dheNJOPd/U0Yno=; b=AQ1j3lkdRyHQIqj5+7NKuLVaDn7h3ECUcBSt9f00FKnImdgj5NeXUnO5la9MzEUcfxA64P Ne7vSsxsPd23zBoo6uuwOBf1agkgQKLBxXC1o8h8mGcOPydVjW/Xp3p9UMJtxglEyig40W m6IkXM/aYaEPAGphRR6RX+X9OugnGOj3SphUmvTyfUH3JC0pAouQHsG2cSP4Cb6meiuQEt BSn9UKpPkBLt4iOJi+uThFApr1vuEP5d4SnbxDk81Rx2XJDUD7otoFiGyVxXn5Cdph5x6y tn4mR4O2UySeZmLau8j57/wCeY9QAoxKjCWrHH/X5I7M4dhASt/9IDLqIRlOVA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirstone][PATCH 4/9] dev-manual: new-recipe.rst: replace reference to wiki Date: Thu, 5 Oct 2023 22:03:13 +0200 Message-Id: <20231005200318.2873125-4-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4313 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- documentation/dev-manual/new-recipe.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst index 8c471699a7..855ef8eb06 100644 --- a/documentation/dev-manual/new-recipe.rst +++ b/documentation/dev-manual/new-recipe.rst @@ -1396,9 +1396,9 @@ doing the following: Following Recipe Style Guidelines ================================= -When writing recipes, it is good to conform to existing style -guidelines. The :oe_wiki:`OpenEmbedded Styleguide ` wiki page -provides rough guidelines for preferred recipe style. +When writing recipes, it is good to conform to existing style guidelines. +See the ":doc:`../contributor-guide/recipe-style-guide`" in the Yocto Project +and OpenEmbedded Contributor Guide for reference. It is common for existing recipes to deviate a bit from this style. However, aiming for at least a consistent style is a good idea. Some From patchwork Thu Oct 5 20:03:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31729 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 265DBE9273A for ; Thu, 5 Oct 2023 20:03:43 +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.25887.1696536217937036530 for ; Thu, 05 Oct 2023 13:03:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YulL52R2; spf=pass (domain: bootlin.com, ip: 217.70.183.193, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 48E02240004; Thu, 5 Oct 2023 20:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536216; 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=BV8unj2mtAKrhg0bNHxTMXIJFZqg4GZs3Ulv9x1Ag4c=; b=YulL52R2uGl2QESW26a1HdDxlb/Uyj4S1ArgGjwVvKvrO0RNA4jCETpD1izE2nm7caGy1i 3G3jzmEj4SBTYlFSPTqfwgFaD3YXTTqPwg1L5AdlKf1htR9f495Yc8VNljrsM7+rRdzyiW TTAuhwK8MTvJdUy+gE9oIcyvUo6Qjb0mCZ5/utAqz1W/uAdzwzV2kzPuMUIgVL99ChAWcV QKgDMwiOniTQvKAZd4wlncr0NfSHHMjL+KiEPdd0/6/JvhtPset92LSdtwrryzcaDwDuqW h4KBiC+0oe1pPSViV95QwX179vM7LFlUEugz+4KCZ7KQAjyDQwwbLitUu2PXbQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Roland Hieber Subject: [kirstone][PATCH 5/9] contributor-guide: recipe-style-guide: add more patch tagging examples Date: Thu, 5 Oct 2023 22:03:14 +0200 Message-Id: <20231005200318.2873125-5-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4314 From: Michael Opdenacker From: Roland Hieber Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index b63172bd77..7906e5e5d9 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -336,7 +336,10 @@ the status should be changed to ``Submitted [where]``, and an additional ``Signed-off-by:`` line should be added to the patch by the person claiming responsibility for upstreaming. -For example, if the patch has been submitted upstream:: +Examples +-------- + +Here's an example of a patch that has been submitted upstream:: rpm: Adjusted the foo setting in bar @@ -351,3 +354,19 @@ For example, if the patch has been submitted upstream:: A future update can change the value to ``Accepted`` or ``Denied`` as appropriate. + +Another example of a patch that is specific to OpenEmbedded:: + + Do not treat warnings as errors + + There are additional warnings found with musl which are + treated as errors and fails the build, we have more combinations + than upstream supports to handle. + + Upstream-Status: Inappropriate [oe specific] + +Here's a patch that has been backported from an upstream commit:: + + include missing sys/file.h for LOCK_EX + + Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ac8db36cbc26694ee94beecc8dca208ec4b5fd45] From patchwork Thu Oct 5 20:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31732 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 2F42BE9273F for ; Thu, 5 Oct 2023 20:03:43 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web11.25965.1696536220160605363 for ; Thu, 05 Oct 2023 13:03:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=XNORAoZz; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id C45B81C0003; Thu, 5 Oct 2023 20:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536218; 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=OCJcfS/QQUUN3tBPM13p7JE+bNQuQ70K7+63p1dk6TU=; b=XNORAoZzyYcHstBhXDrumrejeWUYWJqxqZI7tmPoZU2hiuFNKcGLOFhAoIUA9N06fC6SO0 qhghIKHQpJOcaG44KTBfzk+WF518jU1/X0hnQ5nX1SPAYDt1NLTfsLSkRuhD7bSHo4lFLC Ywl6qcAv/PWZmSaFCZecBRSgh2HEU2mqEWAqAxFv4CebzCvFsTYpuPE0f0yUYs2DaGOP+k XKRODoIC9LpfDPF9tbIEbTAV9HWIzkADb3PmMgYMQni+d6gv7FPJBDXMuMLBqkNsnNom8w tEGBp6L0NqH85Fu0Byr+CtYh6ebTD2RLn70j6EdQA/3VJNWpFronWjbB4glzSg== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Roland Hieber Subject: [kirstone][PATCH 6/9] contributor-guide: recipe-style-guide: add section about CVE patches Date: Thu, 5 Oct 2023 22:03:15 +0200 Message-Id: <20231005200318.2873125-6-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:43 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4315 From: Michael Opdenacker From: Roland Hieber This was previously included in the OpenEmbedded wiki page [1], but was not ported along with the rest in commit 95c9a1e1e78bbfb82ade (2023-09-12, Michael Opdenacker: "contributor-guide: recipe-style-guide: add Upstream-Status"). [1]: https://www.openembedded.org/index.php?title=Commit_Patch_Message_Guidelines&oldid=10935 Group the examples in their own sections (but name it differently from any other section in this document so that sphinx doesn't generate a warning about duplicate labels). Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 7906e5e5d9..5cbcb23b3a 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -370,3 +370,28 @@ Here's a patch that has been backported from an upstream commit:: include missing sys/file.h for LOCK_EX Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ac8db36cbc26694ee94beecc8dca208ec4b5fd45] + +CVE patches +=========== + +In order to have a better control of vulnerabilities, patches that fix CVEs must +contain a ``CVE:`` tag. This tag list all CVEs fixed by the patch. If more than +one CVE is fixed, separate them using spaces. + +CVE Examples +------------ + +This should be the header of patch that fixes :cve:`2015-8370` in GRUB2:: + + grub2: Fix CVE-2015-8370 + + [No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1286966 + + Back to 28; Grub2 Authentication + + Two functions suffer from integer underflow fault; the grub_username_get() and grub_password_get()located in + grub-core/normal/auth.c and lib/crypto.c respectively. This can be exploited to obtain a Grub rescue shell. + + Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2] + CVE: CVE-2015-8370 + Signed-off-by: Joe Developer From patchwork Thu Oct 5 20:03:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31733 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 2D728E92738 for ; Thu, 5 Oct 2023 20:03:53 +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.25890.1696536223364973630 for ; Thu, 05 Oct 2023 13:03:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mX8acQw5; spf=pass (domain: bootlin.com, ip: 217.70.183.201, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 760751BF20C; Thu, 5 Oct 2023 20:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536220; 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=qQWkpX1hLHnF39Qu2UJAgqFh5fW2f+4kbXVmBQwVHcM=; b=mX8acQw5kFPdxYB5uY8kjRcdBvvRPiCPfBAZt6MdRxv6N34Smfi8Vdw7GLTZI0QlqWZYY0 YwPzW416aAa3eDPNfYg/MLEzN3KaJWCbJkW+qA1W5fjOAPvwSisp2/htQnRiVqmy6x7r5L JoDUL4U0mFZY6+vkgoXH+oVl8VxZOJPIqIdUhogASpIxMt+Ei5y05J+wXy6LeIDE0a0Vn2 9MWFKRKVkMPATvjaNuPCPLlkU19jpEpy3xYd2h/8RPJelwqeedQO7KKzBnzPTqH9RzDJ7G BUfoSptnBJvRs0kJ308TqSSWU7LGQ57ybEpEQQe7WMnhxwlrvgmVWHlSB+HSZw== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Alexander Kanavin , Roland Hieber Subject: [kirstone][PATCH 7/9] contributor-guide: discourage marking patches as Inappropriate Date: Thu, 5 Oct 2023 22:03:16 +0200 Message-Id: <20231005200318.2873125-7-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:53 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4316 From: Michael Opdenacker From: Roland Hieber It was never really clear what all those reasons really meant, and every patch submitted upstream liftens the maintenance on the Yocto side. So remove the current list, and replace it with two reasons in which an upstream submission likely won't benefit the upstream project. Suggested-by: Alexander Kanavin Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 5cbcb23b3a..7e336a0424 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -314,22 +314,20 @@ following status strings: ``Inappropriate [reason]`` The patch is not appropriate for upstream, include a brief reason on the - same line enclosed with ``[]``. The reason can be: - - - ``not author`` (you are not the author and do not intend to upstream this, - the source must be listed in the comments) - - ``native`` - - ``licensing`` - - ``configuration`` - - ``enable feature`` - - ``disable feature`` - - ``bugfix`` (add bug URL here) - - ``embedded specific`` - - ``other`` (give details in comments) - -The various ``Inappropriate [reason]`` status items are meant to indicate that -the person responsible for adding this patch to the system does not intend to -upstream the patch for a specific reason. + same line enclosed with ``[]``. In the past, there were several different + reasons not to submit patches upstream, but we have to consider that every + non-upstreamed patch means a maintainance burden for recipe maintainers. + Currently, the only reasons to mark patches as inappropriate for upstream + submission are: + + - ``oe specific``: the issue is specific to how OpenEmbedded performs builds + or sets things up at runtime, and can be resolved only with a patch that + is not however relevant or appropriate for general upstream submission. + - ``upstream ticket ``: the issue is not specific to Open-Embedded + and should be fixed upstream, but the patch in its current form is not + suitable for merging upstream, and the author lacks sufficient expertise + to develop a proper patch. Instead the issue is handled via a bug report + (include link). Of course, if another person later takes care of submitting this patch upstream, the status should be changed to ``Submitted [where]``, and an additional From patchwork Thu Oct 5 20:03:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31734 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 28D74E92739 for ; Thu, 5 Oct 2023 20:03:53 +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.25968.1696536225202291353 for ; Thu, 05 Oct 2023 13:03:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Pr7gh5Gr; spf=pass (domain: bootlin.com, ip: 217.70.183.200, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 634862000B; Thu, 5 Oct 2023 20:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536222; 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=X/pF+3FbmgRAhHX5/6ZglyOj6qnU3kX5YLilRmR9a5c=; b=Pr7gh5GrwVhmc/X5trVoda1aEpjR4I8GLqsIPeslo4iFzjHOBkeI5Lld35Y4uPs1UwEbyx Ph/8snQW28072PegI7aKyj9y1LvCNdSUtN3gv145UNXTz+OY9wyBRTLbOB2BarEVg8Fv1A KUwEc6ePBkcpB4pwEnSujWIg08xFaooH2kiSyhs9gO/dikOJZOwrx9AM5e+Bjlzv5NOxgi gkoV5ve2Ew54KuvWWIYmhnpe9dMTRLsrqGN76p0wlRo9Xd6Uu9YScuM2y5JSxrGwLR2PT5 njtZxZ34ZXNx5Xw8qUXfE6ogP7rfja1TXgNN7082ZRSLs43eWe1Rkg2sIBo9yQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Roland Hieber Subject: [kirstone][PATCH 8/9] contributor-guide: deprecate "Accepted" patch status Date: Thu, 5 Oct 2023 22:03:17 +0200 Message-Id: <20231005200318.2873125-8-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:03:53 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4317 From: Michael Opdenacker From: Roland Hieber This is in accordance with the gatesgarth Release Notes: > In the ``Upstream-Status`` header convention for patches, > ``Accepted`` has | been replaced with ``Backport`` as these almost > always mean the same thing i.e. the patch is already upstream and > may need to be removed in a future recipe upgrade. If you are adding > these headers to your own patches then use Backport to indicate that > the patch has been sent upstream. Suggested-by: Michael Opdenacker Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 7e336a0424..e03b8ff2ba 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -292,13 +292,10 @@ following status strings: Submitted to upstream, waiting for approval. Optionally include where it was submitted, such as the author, mailing list, etc. -``Accepted`` - Accepted in upstream, expect it to be removed at next update, include - expected version info. - -``Backport`` - Backported from new upstream version, because we are at a fixed version, - include upstream version info. +``Backport [version]`` + Accepted upstream and included in the next release, or backported from newer + upstream version, because we are at a fixed version. + Include upstream version info (e.g. commit ID or next expected version). ``Denied`` Not accepted by upstream, include reason in patch. @@ -350,7 +347,7 @@ Here's an example of a patch that has been submitted upstream:: Signed-off-by: Joe Developer -A future update can change the value to ``Accepted`` or ``Denied`` as +A future update can change the value to ``Backport`` or ``Denied`` as appropriate. Another example of a patch that is specific to OpenEmbedded:: From patchwork Thu Oct 5 20:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 31735 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 4CB78E9273B for ; Thu, 5 Oct 2023 20:04:03 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by mx.groups.io with SMTP id smtpd.web11.25970.1696536234905218625 for ; Thu, 05 Oct 2023 13:03:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DH5G6YVo; spf=pass (domain: bootlin.com, ip: 217.70.183.199, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id C08E2FF806; Thu, 5 Oct 2023 20:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696536233; 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=CLmesjVkNE0LwzvSiL9Xt5Jfae9mIWCRGPj45cQTtug=; b=DH5G6YVoQOPBzCUdgan9zaA87T5NEqKLrNjlZA0C9tmI4+Hw64/wxNsX4aLJdq2Jxu/p5+ miO9FJfNn3AND370F2IBtEVUYbpv8VHT1kqvxVHKMKZisj7M7BQBasuFWlNyhwCGm3csix 6jODotNqK+F457+rW6sNlvsv92L2NSNvzuN+nFSPCxMs5FOW8/Fx3xovUeVoUAPpzdSiJO X1nEJ3mhz8MtUPF4818hVFl0+ZE6/q5oz6qZdThoeypk2LjqnFwlHw8FVkCS7q3ZmrvpX1 Q4zckA82UIOWszVZIK+eJP3/LSNBQCPiwIDMJ2roaCVUy17VjZgAqfFPagcehw== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Alexander Kanavin , Roland Hieber Subject: [kirstone][PATCH 9/9] contributor-guide: style-guide: discourage using Pending patch status Date: Thu, 5 Oct 2023 22:03:18 +0200 Message-Id: <20231005200318.2873125-9-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005200318.2873125-1-michael.opdenacker@bootlin.com> References: <20231005200318.2873125-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, 05 Oct 2023 20:04:03 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4318 From: Michael Opdenacker From: Roland Hieber Suggested-by: Michael Opdenacker Suggested-by: Alexander Kanavin Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- documentation/contributor-guide/recipe-style-guide.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index e03b8ff2ba..a005aa3247 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -286,7 +286,14 @@ Then, you should also add an ``Upstream-Status:`` tag containing one of the following status strings: ``Pending`` - No determination has been made yet or not yet submitted to upstream. + No determination has been made yet, or patch has not yet been submitted to + upstream. + + Keep in mind that every patch submitted upstream reduces the maintainance + burden in OpenEmbedded and Yocto Project in the long run, so this patch + status should only be used in exceptional cases if there are genuine + obstacles to submitting a patch upstream; the reason for that should be + included in the patch. ``Submitted [where]`` Submitted to upstream, waiting for approval. Optionally include where