From patchwork Tue Dec 1 15:22:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 106815 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.13563.1796138586529830470 for ; Tue, 01 Dec 2026 07:23:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=Pq1VYjgx; spf=pass (domain: gmail.com, ip: 209.85.167.181, mailfrom: twoerner@gmail.com) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-53dda625f63so7572206b6e.1 for ; Tue, 01 Dec 2026 07:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796138586; x=1796743386; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=C60sz4pSm+HalI6zF3FvnvfmIz9BjlKZmQOLqKWf8gQ=; b=Pq1VYjgxRg4QSm5PznsH1c3b2Qlir1U+QMd1Vw/UBPFNkPZqQJgDrPN3K903dKoVV9 /a7tokypK6nE2CnxHDPkSFlOJcduvnOqHWuKSmpIJ2M04tqPFrXkO7EkKB7uGy/ttGYk qRHwdZhTkg6UlRWQi1tF+ouKw5I394JBM6ez3VveBMzhtvH+onFPMhw6jAUTtaPjI9yQ 2iN72LXMBv2eBWT9xMTCbnB23aT1oZDTe8SN8LGOaLTfx/i9JXOiB1sgAhwXQmbASzSe 9GetQGfTHWz49P2kgrDCtIED8lN4hcNAnKTMAws8jouGYfjJRhkBadBcRkSw/Jpu4H8q nIMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796138586; x=1796743386; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=C60sz4pSm+HalI6zF3FvnvfmIz9BjlKZmQOLqKWf8gQ=; b=AcLgRoWFK/0MMjzsavfDf4DUi16oozVKl2rH/SHvcNLg+ucZD+vJTqbE0+GDn6W5tD kSupwS3dS9DjMNtUzcFHhTOhBDh5N5Z5dPmVezBCwPU+JjplYcqahE8U3i6/BAH8hHcb E/LeWxahWdgA5fTRwmw+o5+A4nNA4fXuCCq4d6gOot4WUADnxx61LoiyfLNgDXnw3hC4 6g7jXQZt2dkIC0fr7aGzbqlmOVmFbcl++1j28d/cSsa7dMJFn5s4QjwQem+EjM7vC109 wdMXkuiP8+Vxgw0oMSy4ZiW7YN++goHxGgcdbSk6NR4AvY9/ba3fHLruKjrp5GxkryAk 0geg== X-Gm-Message-State: APuU4Z/4YNuIvIQxElcPKQq/zDlvuYeZkHfsX2blUWCRudNFT3MnBmLM 7abhKk2dZ+X04cEnuz9Q9AkUYm21C5rgZtjqQQ5a8C+oOwOU1flBjU4kVXDVXw== X-Gm-Gg: AZFdTZeH5fufnsfRXVgwqM3b/KrzRgyuZ04R71vxLjZy8TJliOEQjBtcwKlW0ZQeiJY XL1bfbeD0GtOVyPUsvZe85UyQcHAHAbMaQGN387HSW7qfXsP0DvmAosgeE3TYkfupenJIp7aYjY p2tm4lC5WhFbyJTos0uA1MrRhv4CEnobA8TBjrw1pVrB7BiSVi5q3yoJQMAHajQmGO0m2xlY6uE 5C9FZ/3XeALi9n/ZdzkZfSp/IGA8+swJtFRGQh2WQoXUXKJzoWf1/85kiWMN3GjdfgjY8zn16y0 sgvweZNpukV/fY6Wxx2T/WZrpuRcX3eWGJwIl+oO+CyH5dja5VjtKVB6/MxO4PkAPntkltr52tv j2i9k/jBl+1Qt9KdgTtgQZJHrDcgGFsQ6IVsn/ndeJyi7AMiIr+pK+kXeXa4m8C4287dnQFhgNa Fwy4TrcqwpLG5GcB43k6yvAC4UP68NVmjXFvmPbprtMSKNflSSAQlWDwS7aSMGnEfFIi2aXh05g e1cf/sippGdJo/bRMSZPJmr5Ht86eAnT7Dn8Bc+OSoyOslJsWIlrnG7vPXhYrUE2U9/02vTGQSB ulN4rj/W7GGONJoQyGB+rVVufEYatD17pk7+7xYiVtnn+S9NgBDNpWFbYT+vYq3EyBQPCkL8z8F s9XFClqJg6228+UZL9Ty9//sjsSpcJ+c= X-Received: by 2002:a05:6808:244e:b0:574:6f37:671d with SMTP id 5614622812f47-57a056c81c5mr39140859b6e.5.1796138585198; Tue, 01 Dec 2026 07:23:05 -0800 (PST) Return-Path: Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 5614622812f47-57a31929223sm27818249b6e.1.2026.12.01.07.23.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:23:03 -0800 (PST) From: Trevor Woerner To: docs@lists.yoctoproject.org Subject: [PATCH 03/16] contributor-guide: state the language of the blocks that are not BitBake Date: Tue, 1 Dec 2026 10:22:36 -0500 Message-ID: <20261201152251.2742634-4-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20261201152251.2742634-1-twoerner@gmail.com> References: <20261201152251.2742634-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 15:23:10 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10862 The manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language. AI-Generated: codex/claude-opus 5.5 (xhigh) Signed-off-by: Trevor Woerner --- .../ai-assisted-contribution-policy.rst | 8 +- .../contributor-guide/recipe-style-guide.rst | 24 ++- .../contributor-guide/submit-changes.rst | 144 +++++++++++++----- 3 files changed, 132 insertions(+), 44 deletions(-) diff --git a/documentation/contributor-guide/ai-assisted-contribution-policy.rst b/documentation/contributor-guide/ai-assisted-contribution-policy.rst index f35b58fdff95..f9bf075356a3 100644 --- a/documentation/contributor-guide/ai-assisted-contribution-policy.rst +++ b/documentation/contributor-guide/ai-assisted-contribution-policy.rst @@ -141,11 +141,15 @@ In patches and commits **Where AI-generated code is contributed to the project, commit messages must include the** ``AI-Generated`` **tag identifying the AI tool or framework and the specific AI model used**. We encourage contributors to -be as specific as they can be. For example:: +be as specific as they can be. For example: + +.. code-block:: text AI-Generated: Claude Code, Opus 5.0 -Or:: +Or: + +.. code-block:: text AI-Generated: Copilot, GPT-5.5 diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index fe12a8e6d826..76671e7f8502 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -270,7 +270,9 @@ License Updates When you change the :term:`LICENSE` or :term:`LIC_FILES_CHKSUM` in the recipe due to upstream making modifications to the license files, you need to briefly explain the reason for the change via a ``License-Update:`` tag. Often it's -quite trivial, such as:: +quite trivial, such as: + +.. code-block:: text License-Update: copyright years refreshed @@ -372,7 +374,9 @@ responsibility for upstreaming. Examples -------- -Here's an example of a patch that has been submitted upstream:: +Here's an example of a patch that has been submitted upstream: + +.. code-block:: text rpm: Adjusted the foo setting in bar @@ -388,7 +392,9 @@ Here's an example of a patch that has been submitted upstream:: A future update can change the value to ``Backport`` or ``Denied`` as appropriate. -Another example of a patch that is specific to OpenEmbedded:: +Another example of a patch that is specific to OpenEmbedded: + +.. code-block:: text Do not treat warnings as errors @@ -398,7 +404,9 @@ Another example of a patch that is specific to OpenEmbedded:: Upstream-Status: Inappropriate [oe specific] -Here's a patch that has been backported from an upstream commit:: +Here's a patch that has been backported from an upstream commit: + +.. code-block:: text include missing sys/file.h for LOCK_EX @@ -414,7 +422,9 @@ one CVE is fixed, separate them using spaces. CVE Examples ------------ -This should be the header of patch that fixes :cve_nist:`2015-8370` in GRUB2:: +This should be the header of patch that fixes :cve_nist:`2015-8370` in GRUB2: + +.. code-block:: text grub2: Fix CVE-2015-8370 @@ -434,7 +444,9 @@ Patch format By default, patches created with ``git format-patch`` have a `Git` version signature at the end. To avoid having a `Git` signature at the end of generated or updated patches, -you can use `Git` configuration settings:: +you can use `Git` configuration settings: + +.. code-block:: console $ git config --global format.signature "" diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst index 56e4250430fe..02db00dd9653 100644 --- a/documentation/contributor-guide/submit-changes.rst +++ b/documentation/contributor-guide/submit-changes.rst @@ -55,12 +55,16 @@ Set up Git ---------- The first thing to do is to install Git packages. Here is an example -on Debian and Ubuntu:: +on Debian and Ubuntu: + +.. code-block:: console $ sudo apt install git-core git-email Then, you need to set a name and e-mail address that Git will -use to identify your commits:: +use to identify your commits: + +.. code-block:: console $ git config --global user.name " " $ git config --global user.email "" @@ -68,7 +72,9 @@ use to identify your commits:: By default, Git adds a signature line at the end of patches containing the Git version. We suggest to remove it as it doesn't add useful information. -Remove it with the following command:: +Remove it with the following command: + +.. code-block:: console $ git config --global format.signature "" @@ -77,7 +83,9 @@ Clone the Git repository for the component to modify After identifying the component to modify as described in the ":doc:`/contributor-guide/identify-component`" section, clone the -corresponding Git repository. Here is an example for OpenEmbedded-Core:: +corresponding Git repository. Here is an example for OpenEmbedded-Core: + +.. code-block:: console $ git clone https://git.openembedded.org/openembedded-core $ cd openembedded-core @@ -87,7 +95,9 @@ Create a new branch Then, create a new branch in your local Git repository for your changes, starting from the reference branch in the upstream -repository (often called ``master``):: +repository (often called ``master``): + +.. code-block:: console $ git checkout $ git checkout -b my-changes @@ -119,11 +129,15 @@ to add the upgraded version. #. *Commit Your Changes:* This is when you can create separate commits. For each commit to create, use the ``git commit -s`` command with the files - or directories you want to include in the commit:: + or directories you want to include in the commit: + + .. code-block:: console $ git commit -s file1 file2 dir1 dir2 ... - To include all staged files:: + To include all staged files: + + .. code-block:: console $ git commit -sa @@ -175,7 +189,9 @@ to add the upgraded version. To find a suitable prefix for the commit summary, a good idea is to look for prefixes used in previous commits touching the - same files or directories:: + same files or directories: + + .. code-block:: console $ git log --oneline @@ -196,7 +212,9 @@ to add the upgraded version. specific convention for bug references --- any commit that addresses a specific bug should use the following form for the body of the commit message. Be sure to use the actual bug-tracking ID from - Bugzilla for bug-id:: + Bugzilla for bug-id: + + .. code-block:: text single-line summary of change @@ -276,7 +294,9 @@ Here is the general procedure on how to create patches to be sent through email: the series of patches you are about to send. For this purpose, a good solution is to store the cover letter contents - in the branch itself:: + in the branch itself: + + .. code-block:: console $ git branch --edit-description @@ -291,12 +311,16 @@ Here is the general procedure on how to create patches to be sent through email: generate patch files for each of the commits in your branch. You need to pass the reference branch your branch starts from. - If you branch didn't need a description in the previous step:: + If you branch didn't need a description in the previous step: + + .. code-block:: console $ git format-patch If you filled a description for your branch, you will want to generate - a cover letter too:: + a cover letter too: + + .. code-block:: console $ git format-patch --cover-letter --cover-from-description=auto @@ -332,19 +356,25 @@ sure that your patches are well-formatted and contain important info for maintenance purposes, such as the ``Signed-off-by`` presence. 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:: +perform the following: + +.. code-block:: console $ pip install -r meta/lib/patchtest/requirements.txt $ source oe-init-build-env $ bitbake-layers add-layer ../meta-selftest Once these steps are complete and you have generated your patch files, -you can run ``patchtest`` like so:: +you can run ``patchtest`` like so: + +.. code-block:: console $ patchtest --patch Alternatively, if you want ``patchtest`` to iterate over and test -multiple patches stored in a directory, you can use:: +multiple patches stored in a directory, you can use: + +.. code-block:: console $ patchtest --directory @@ -352,7 +382,9 @@ By default, ``patchtest`` uses its own modules' file paths to determine what repository and test suite to check patches against. If you wish to test patches against a repository other than ``openembedded-core`` and/or use a different set of tests, you can use the ``--repodir`` and ``--testdir`` -flags:: +flags: + +.. code-block:: console $ patchtest --patch --repodir --testdir @@ -395,7 +427,9 @@ through a direct SMTP configuration in your Git ``~/.gitconfig`` file. Here are the settings for letting ``git send-email`` send e-mail through your regular STMP server, such as ``smtp.gmail.com`` for a Google Mail -account:: +account: + +.. code-block:: console $ git config --global sendemail.smtpserver $ git config --global sendemail.smtpserverport 587 @@ -462,7 +496,9 @@ Sending Patches via Email ------------------------- At this stage, you are ready to send your patches via email. Here's the -typical usage of ``git send-email``:: +typical usage of ``git send-email``: + +.. code-block:: console $ git send-email --to *.patch @@ -475,7 +511,9 @@ in any commit tags such as ``Signed-off-by`` or ``Reported-by``. In case you are sending patches for :oe_git:`meta-openembedded ` or any layer other than :oe_git:`openembedded-core `, please add the appropriate prefix so that it is clear which layer the patch is intended -to be applied to:: +to be applied to: + +.. code-block:: console $ git format-patch --subject-prefix="meta-oe][PATCH" ... @@ -487,13 +525,17 @@ to be applied to:: each patch. Here's a command you can use if you just have one patch in your - branch:: + branch: + + .. code-block:: console $ git send-email --to -1 If you have multiple patches and a cover letter, you can send patches for all the commits between the reference branch - and the tip of your branch:: + and the tip of your branch: + + .. code-block:: console $ git send-email --cover-letter --cover-from-description=auto --to -M @@ -508,7 +550,9 @@ Fixing your From identity We have a frequent issue with contributors whose patches are received through a ``From`` field which doesn't match the ``Signed-off-by`` information. Here is -a typical example for people sending from a domain name with :wikipedia:`DMARC`:: +a typical example for people sending from a domain name with :wikipedia:`DMARC`: + +.. code-block:: text From: "Linus Torvalds via lists.openembedded.org " @@ -516,7 +560,9 @@ This ``From`` field is used by ``git am`` to recreate commits with the right author name. The following will ensure that your e-mails have an additional ``From`` field at the beginning of the Email body, and therefore that maintainers accepting your patches don't have to fix commit author information -manually:: +manually: + +.. code-block:: console $ git config --global sendemail.from "" @@ -529,12 +575,16 @@ Streamlining git send-email usage If you want to save time and not be forced to remember the right options to use with ``git send-email``, you can use Git configuration settings. -- To set the right mailing list address for a given repository:: +- To set the right mailing list address for a given repository: + + .. code-block:: console $ git config --local sendemail.to openembedded-devel@lists.openembedded.org - If the mailing list requires a subject prefix for the layer - (this only works when the repository only contains one layer):: + (this only works when the repository only contains one layer): + + .. code-block:: console $ git config --local format.subjectprefix "meta-something][PATCH" @@ -570,7 +620,9 @@ have been followed: - Include your preferred branch prefix for ``-contrib`` repositories. #. *Push Your Commits to the "Contrib" Upstream:* Push your - changes to that repository:: + changes to that repository: + + .. code-block:: console $ git push upstream_remote_repo local_branch_name @@ -579,7 +631,9 @@ have been followed: working in a local branch named `your_name`\ ``/README``. The following command pushes your local commits to the ``meta-intel-contrib`` upstream repository and puts the commit in a branch named - `your_name`\ ``/README``:: + `your_name`\ ``/README``: + + .. code-block:: console $ git push meta-intel-contrib your_name/README @@ -596,7 +650,9 @@ have been followed: - *Search by File:* Using :ref:`overview-manual/development-environment:git`, you can enter the following command to bring up a short list of all - commits against a specific file:: + commits against a specific file: + + .. code-block:: console $ git shortlog -- filename @@ -628,7 +684,9 @@ have been followed: First, create the pull request. For example, the following command runs the script, specifies the upstream repository in the contrib directory into which you pushed the change, and provides a subject - line in the created patch files:: + line in the created patch files: + + .. code-block:: console $ ./scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README" @@ -641,7 +699,9 @@ have been followed: editing the cover letter, send the pull request. For example, the following command runs the script and specifies the patch directory and email address. In this example, the email address is a mailing - list:: + list: + + .. code-block:: console $ ./scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@lists.yoctoproject.org @@ -650,7 +710,9 @@ have been followed: .. note:: For help on using these scripts, simply provide the ``-h`` - argument as follows:: + argument as follows: + + .. code-block:: console $ ./scripts/create-pull-request -h $ ./scripts/send-pull-request -h @@ -718,7 +780,9 @@ follows: email to include the name of the stable branch which you are targetting. This can be done using the ``--subject-prefix`` argument to ``git format-patch``, for example to submit a patch to the - "&DISTRO_NAME_NO_CAP_MINUS_ONE;" branch use:: + "&DISTRO_NAME_NO_CAP_MINUS_ONE;" branch use: + + .. code-block:: console $ git format-patch --subject-prefix='&DISTRO_NAME_NO_CAP_MINUS_ONE;][PATCH' ... @@ -739,12 +803,16 @@ without the reported issues. It is a good idea to send a copy to the reviewers who provided feedback to the previous version of the patch. You can make sure this happens - by adding a ``CC`` tag to the commit description:: + by adding a ``CC`` tag to the commit description: + + .. code-block:: text CC: William Shakespeare A single patch can be amended using ``git commit --amend``, and multiple -patches can be easily reworked and reordered through an interactive Git rebase:: +patches can be easily reworked and reordered through an interactive Git rebase: + +.. code-block:: console $ git rebase -i @@ -754,7 +822,9 @@ for practical guidance about using Git interactive rebasing. You should also modify the ``[PATCH]`` tag in the email subject line when sending the revised patch to mark the new iteration as ``[PATCH v2]``, ``[PATCH v3]``, etc as appropriate. This can be done by passing the ``-v`` -argument to ``git format-patch`` with a version number:: +argument to ``git format-patch`` with a version number: + +.. code-block:: console $ git format-patch -v2 @@ -768,7 +838,9 @@ suitable for inclusion in the commit message (i.e. the git history) itself. Providing a patch version changelog makes it easier for maintainers and reviewers to succinctly understand what changed in all versions of the patch, without having to consult alternate sources of information, such as -searching through messages on a mailing list. For example:: +searching through messages on a mailing list. For example: + +.. code-block:: text