@@ -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
@@ -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 ""
@@ -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 "<firstname> <lastname>"
$ git config --global user.email "<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 <ref-branch>
$ 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 <paths>
@@ -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 <ref-branch>
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 <ref-branch>
@@ -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 <patch_name>
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 <directory_name>
@@ -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 <patch_name> --repodir <path/to/repo> --testdir <path/to/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 <smtp server>
$ 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 <mailing-list-address> *.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 </meta-openembedded/>`
or any layer other than :oe_git:`openembedded-core </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 <mailing-list-address> -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 <mailing-list-address> -M <ref-branch>
@@ -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 <linus.torvalds=kernel.org@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 "<email>"
@@ -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 <bill@yoctoproject.org>
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 <ref-branch>
@@ -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 <ref-branch>
@@ -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
<patch title>
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 <twoerner@gmail.com> --- .../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(-)