diff options
| author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-08-02 16:01:13 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-30 15:54:59 +0100 |
| commit | 8a11abf6a9dac76bf9739c44102a49984e3c2977 (patch) | |
| tree | e9fad45beb65d1330dad49408de14cd164820bd4 /documentation/contributor-guide | |
| parent | ddf3b3ecd4b1680dc0dedfd4eaebcf3441b14ca7 (diff) | |
| download | poky-8a11abf6a9dac76bf9739c44102a49984e3c2977.tar.gz | |
manuals: create a dedicated "Contributor Guide" document
Starting from the original contents of dev-manual/changes.rst
and from text contributed by Richard Purdie.
(From yocto-docs rev: 55587d9dd009cbc92273376e0f7665b2d574d280)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/contributor-guide')
| -rw-r--r-- | documentation/contributor-guide/identify-component.rst | 29 | ||||
| -rw-r--r-- | documentation/contributor-guide/index.rst | 25 | ||||
| -rw-r--r-- | documentation/contributor-guide/submit-change.rst | 463 | ||||
| -rw-r--r-- | documentation/contributor-guide/submit-defect.rst | 67 |
4 files changed, 584 insertions, 0 deletions
diff --git a/documentation/contributor-guide/identify-component.rst b/documentation/contributor-guide/identify-component.rst new file mode 100644 index 0000000000..ba7c998888 --- /dev/null +++ b/documentation/contributor-guide/identify-component.rst | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Identify the component | ||
| 4 | ********************** | ||
| 5 | |||
| 6 | The Yocto Project and OpenEmbedded ecosystem is built of :term:`layers <Layer>` | ||
| 7 | so the first step is to identify the component where the issue likely lies. | ||
| 8 | For example, if you have a hardware issue, it is likely related to the BSP | ||
| 9 | you are using and the best place to seek advice would be from the BSP provider | ||
| 10 | or :term:`layer`. If the issue is a build/configuration one and a distro is in | ||
| 11 | use, they would likely be the first place to ask questions. If the issue is a | ||
| 12 | generic one and/or in the core classes or metadata, the core layer or BitBake | ||
| 13 | might be the appropriate component. | ||
| 14 | |||
| 15 | Each metadata layer being used should contain a ``README`` file and that should | ||
| 16 | explain where to report issues, where to send changes and how to contact the | ||
| 17 | maintainers. | ||
| 18 | |||
| 19 | If the issue is in the core metadata layer (OpenEmbedded-Core) or in BitBake, | ||
| 20 | issues can be reported in the :yocto_bugs:`Yocto Project Bugzilla <>`. The | ||
| 21 | :yocto_lists:`yocto </g/yocto>` mailing list is a general “catch-all” location | ||
| 22 | where questions can be sent if you can’t work out where something should go. | ||
| 23 | |||
| 24 | :term:`Poky` is a commonly used “combination” repository where multiple | ||
| 25 | components have been combined (``bitbake``, ``openembedded-core``, | ||
| 26 | ``meta-yocto`` and ``yocto-docs``). Patches should be submitted against | ||
| 27 | the appropriate individual component rather than :term:`Poky` itself as | ||
| 28 | detailed in the appropriate ``README`` file. | ||
| 29 | |||
diff --git a/documentation/contributor-guide/index.rst b/documentation/contributor-guide/index.rst new file mode 100644 index 0000000000..d723854843 --- /dev/null +++ b/documentation/contributor-guide/index.rst | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | ================================================ | ||
| 4 | Yocto Project and OpenEmbedded Contributor Guide | ||
| 5 | ================================================ | ||
| 6 | |||
| 7 | The Yocto Project and OpenEmbedded are open-source, community-based projects so | ||
| 8 | contributions are very welcome, it is how the code evolves and everyone can | ||
| 9 | effect change. Contributions take different forms, if you have a fix for an | ||
| 10 | issue you’ve run into, a patch is the most appropriate way to contribute it. | ||
| 11 | If you run into an issue but don’t have a solution, opening a defect in | ||
| 12 | :yocto_bugs:`Bugzilla <>` or asking questions on the mailing lists might be | ||
| 13 | more appropriate. This guide intends to point you in the right direction to | ||
| 14 | this. | ||
| 15 | |||
| 16 | |||
| 17 | .. toctree:: | ||
| 18 | :caption: Table of Contents | ||
| 19 | :numbered: | ||
| 20 | |||
| 21 | identify-component | ||
| 22 | submit-defect | ||
| 23 | submit-change | ||
| 24 | |||
| 25 | .. include:: /boilerplate.rst | ||
diff --git a/documentation/contributor-guide/submit-change.rst b/documentation/contributor-guide/submit-change.rst new file mode 100644 index 0000000000..ba56e5986d --- /dev/null +++ b/documentation/contributor-guide/submit-change.rst | |||
| @@ -0,0 +1,463 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Contributing a Change to a Component | ||
| 4 | ************************************ | ||
| 5 | |||
| 6 | Contributions to the Yocto Project and OpenEmbedded are very welcome. | ||
| 7 | Because the system is extremely configurable and flexible, we recognize | ||
| 8 | that developers will want to extend, configure or optimize it for their | ||
| 9 | specific uses. | ||
| 10 | |||
| 11 | Finding a Suitable Mailing List | ||
| 12 | =============================== | ||
| 13 | |||
| 14 | The Yocto Project uses a mailing list and a patch-based workflow that is | ||
| 15 | similar to the Linux kernel but contains important differences. In | ||
| 16 | general, there is a mailing list through which you can submit patches. You | ||
| 17 | should send patches to the appropriate mailing list so that they can be | ||
| 18 | reviewed and merged by the appropriate maintainer. The specific mailing | ||
| 19 | list you need to use depends on the location of the code you are | ||
| 20 | changing. Each component (e.g. layer) should have a ``README`` file that | ||
| 21 | indicates where to send the changes and which process to follow. | ||
| 22 | |||
| 23 | You can send the patch to the mailing list using whichever approach you | ||
| 24 | feel comfortable with to generate the patch. Once sent, the patch is | ||
| 25 | usually reviewed by the community at large. If somebody has concerns | ||
| 26 | with the patch, they will usually voice their concern over the mailing | ||
| 27 | list. If a patch does not receive any negative reviews, the maintainer | ||
| 28 | of the affected layer typically takes the patch, tests it, and then | ||
| 29 | based on successful testing, merges the patch. | ||
| 30 | |||
| 31 | The "poky" repository, which is the Yocto Project's reference build | ||
| 32 | environment, is a hybrid repository that contains several individual | ||
| 33 | pieces (e.g. BitBake, Metadata, documentation, and so forth) built using | ||
| 34 | the combo-layer tool. The upstream location used for submitting changes | ||
| 35 | varies by component: | ||
| 36 | |||
| 37 | - *Core Metadata:* Send your patch to the | ||
| 38 | :oe_lists:`openembedded-core </g/openembedded-core>` | ||
| 39 | mailing list. For example, a change to anything under the ``meta`` or | ||
| 40 | ``scripts`` directories should be sent to this mailing list. | ||
| 41 | |||
| 42 | - *BitBake:* For changes to BitBake (i.e. anything under the | ||
| 43 | ``bitbake`` directory), send your patch to the | ||
| 44 | :oe_lists:`bitbake-devel </g/bitbake-devel>` | ||
| 45 | mailing list. | ||
| 46 | |||
| 47 | - *"meta-\*" trees:* These trees contain Metadata. Use the | ||
| 48 | :yocto_lists:`poky </g/poky>` mailing list. | ||
| 49 | |||
| 50 | - *Documentation*: For changes to the Yocto Project documentation, use the | ||
| 51 | :yocto_lists:`docs </g/docs>` mailing list. | ||
| 52 | |||
| 53 | For changes to other layers hosted in the Yocto Project source | ||
| 54 | repositories (i.e. ``yoctoproject.org``) and tools use the | ||
| 55 | :yocto_lists:`Yocto Project </g/yocto/>` general mailing list. | ||
| 56 | |||
| 57 | .. note:: | ||
| 58 | |||
| 59 | Sometimes a layer's documentation specifies to use a particular | ||
| 60 | mailing list. If so, use that list. | ||
| 61 | |||
| 62 | For additional recipes that do not fit into the core Metadata, you | ||
| 63 | should determine which layer the recipe should go into and submit the | ||
| 64 | change in the manner recommended by the documentation (e.g. the | ||
| 65 | ``README`` file) supplied with the layer. If in doubt, please ask on the | ||
| 66 | Yocto general mailing list or on the openembedded-devel mailing list. | ||
| 67 | |||
| 68 | You can also push a change upstream and request a maintainer to pull the | ||
| 69 | change into the component's upstream repository. You do this by pushing | ||
| 70 | to a contribution repository that is upstream. See the | ||
| 71 | ":ref:`overview-manual/development-environment:git workflows and the yocto project`" | ||
| 72 | section in the Yocto Project Overview and Concepts Manual for additional | ||
| 73 | concepts on working in the Yocto Project development environment. | ||
| 74 | |||
| 75 | Maintainers commonly use ``-next`` branches to test submissions prior to | ||
| 76 | merging patches. Thus, you can get an idea of the status of a patch based on | ||
| 77 | whether the patch has been merged into one of these branches. The commonly | ||
| 78 | used testing branches for OpenEmbedded-Core are as follows: | ||
| 79 | |||
| 80 | - *openembedded-core "master-next" branch:* This branch is part of the | ||
| 81 | :oe_git:`openembedded-core </openembedded-core/>` repository and contains | ||
| 82 | proposed changes to the core metadata. | ||
| 83 | |||
| 84 | - *poky "master-next" branch:* This branch is part of the | ||
| 85 | :yocto_git:`poky </poky/>` repository and combines proposed | ||
| 86 | changes to BitBake, the core metadata and the poky distro. | ||
| 87 | |||
| 88 | Similarly, stable branches maintained by the project may have corresponding | ||
| 89 | ``-next`` branches which collect proposed changes. For example, | ||
| 90 | ``&DISTRO_NAME_NO_CAP;-next`` and ``&DISTRO_NAME_NO_CAP_MINUS_ONE;-next`` | ||
| 91 | branches in both the "openembdedded-core" and "poky" repositories. | ||
| 92 | |||
| 93 | Other layers may have similar testing branches but there is no formal | ||
| 94 | requirement or standard for these so please check the documentation for the | ||
| 95 | layers you are contributing to. | ||
| 96 | |||
| 97 | The following sections provide procedures for submitting a change. | ||
| 98 | |||
| 99 | Preparing Changes for Submission | ||
| 100 | ================================ | ||
| 101 | |||
| 102 | #. *Make Your Changes Locally:* Make your changes in your local Git | ||
| 103 | repository. You should make small, controlled, isolated changes. | ||
| 104 | Keeping changes small and isolated aids review, makes | ||
| 105 | merging/rebasing easier and keeps the change history clean should | ||
| 106 | anyone need to refer to it in future. | ||
| 107 | |||
| 108 | #. *Stage Your Changes:* Stage your changes by using the ``git add`` | ||
| 109 | command on each file you changed. | ||
| 110 | |||
| 111 | #. *Commit Your Changes:* Commit the change by using the ``git commit`` | ||
| 112 | command. Make sure your commit information follows standards by | ||
| 113 | following these accepted conventions: | ||
| 114 | |||
| 115 | - Be sure to include a "Signed-off-by:" line in the same style as | ||
| 116 | required by the Linux kernel. This can be done by using the | ||
| 117 | ``git commit -s`` command. Adding this line signifies that you, | ||
| 118 | the submitter, have agreed to the Developer's Certificate of | ||
| 119 | Origin 1.1 as follows: | ||
| 120 | |||
| 121 | .. code-block:: none | ||
| 122 | |||
| 123 | Developer's Certificate of Origin 1.1 | ||
| 124 | |||
| 125 | By making a contribution to this project, I certify that: | ||
| 126 | |||
| 127 | (a) The contribution was created in whole or in part by me and I | ||
| 128 | have the right to submit it under the open source license | ||
| 129 | indicated in the file; or | ||
| 130 | |||
| 131 | (b) The contribution is based upon previous work that, to the best | ||
| 132 | of my knowledge, is covered under an appropriate open source | ||
| 133 | license and I have the right under that license to submit that | ||
| 134 | work with modifications, whether created in whole or in part | ||
| 135 | by me, under the same open source license (unless I am | ||
| 136 | permitted to submit under a different license), as indicated | ||
| 137 | in the file; or | ||
| 138 | |||
| 139 | (c) The contribution was provided directly to me by some other | ||
| 140 | person who certified (a), (b) or (c) and I have not modified | ||
| 141 | it. | ||
| 142 | |||
| 143 | (d) I understand and agree that this project and the contribution | ||
| 144 | are public and that a record of the contribution (including all | ||
| 145 | personal information I submit with it, including my sign-off) is | ||
| 146 | maintained indefinitely and may be redistributed consistent with | ||
| 147 | this project or the open source license(s) involved. | ||
| 148 | |||
| 149 | - Provide a single-line summary of the change and, if more | ||
| 150 | explanation is needed, provide more detail in the body of the | ||
| 151 | commit. This summary is typically viewable in the "shortlist" of | ||
| 152 | changes. Thus, providing something short and descriptive that | ||
| 153 | gives the reader a summary of the change is useful when viewing a | ||
| 154 | list of many commits. You should prefix this short description | ||
| 155 | with the recipe name (if changing a recipe), or else with the | ||
| 156 | short form path to the file being changed. | ||
| 157 | |||
| 158 | - For the body of the commit message, provide detailed information | ||
| 159 | that describes what you changed, why you made the change, and the | ||
| 160 | approach you used. It might also be helpful if you mention how you | ||
| 161 | tested the change. Provide as much detail as you can in the body | ||
| 162 | of the commit message. | ||
| 163 | |||
| 164 | .. note:: | ||
| 165 | |||
| 166 | You do not need to provide a more detailed explanation of a | ||
| 167 | change if the change is minor to the point of the single line | ||
| 168 | summary providing all the information. | ||
| 169 | |||
| 170 | - If the change addresses a specific bug or issue that is associated | ||
| 171 | with a bug-tracking ID, include a reference to that ID in your | ||
| 172 | detailed description. For example, the Yocto Project uses a | ||
| 173 | specific convention for bug references --- any commit that addresses | ||
| 174 | a specific bug should use the following form for the detailed | ||
| 175 | description. Be sure to use the actual bug-tracking ID from | ||
| 176 | Bugzilla for bug-id:: | ||
| 177 | |||
| 178 | Fixes [YOCTO #bug-id] | ||
| 179 | |||
| 180 | detailed description of change | ||
| 181 | |||
| 182 | Using Email to Submit a Patch | ||
| 183 | ============================= | ||
| 184 | |||
| 185 | Depending on the components changed, you need to submit the email to a | ||
| 186 | specific mailing list. For some guidance on which mailing list to use, | ||
| 187 | see the ":ref:`contributor-guide/submit-change:finding a suitable mailing list`" | ||
| 188 | section above. For a description of all the available | ||
| 189 | mailing lists, see the ":ref:`Mailing Lists <resources-mailinglist>`" section in the | ||
| 190 | Yocto Project Reference Manual. | ||
| 191 | |||
| 192 | Here is the general procedure on how to submit a patch through email | ||
| 193 | without using the scripts once the steps in | ||
| 194 | ":ref:`contributor-guide/submit-change:preparing changes for submission`" | ||
| 195 | have been followed: | ||
| 196 | |||
| 197 | #. *Format the Commit:* Format the commit into an email message. To | ||
| 198 | format commits, use the ``git format-patch`` command. When you | ||
| 199 | provide the command, you must include a revision list or a number of | ||
| 200 | patches as part of the command. For example, either of these two | ||
| 201 | commands takes your most recent single commit and formats it as an | ||
| 202 | email message in the current directory:: | ||
| 203 | |||
| 204 | $ git format-patch -1 | ||
| 205 | |||
| 206 | or :: | ||
| 207 | |||
| 208 | $ git format-patch HEAD~ | ||
| 209 | |||
| 210 | After the command is run, the current directory contains a numbered | ||
| 211 | ``.patch`` file for the commit. | ||
| 212 | |||
| 213 | If you provide several commits as part of the command, the | ||
| 214 | ``git format-patch`` command produces a series of numbered files in | ||
| 215 | the current directory – one for each commit. If you have more than | ||
| 216 | one patch, you should also use the ``--cover`` option with the | ||
| 217 | command, which generates a cover letter as the first "patch" in the | ||
| 218 | series. You can then edit the cover letter to provide a description | ||
| 219 | for the series of patches. For information on the | ||
| 220 | ``git format-patch`` command, see ``GIT_FORMAT_PATCH(1)`` displayed | ||
| 221 | using the ``man git-format-patch`` command. | ||
| 222 | |||
| 223 | .. note:: | ||
| 224 | |||
| 225 | If you are or will be a frequent contributor to the Yocto Project | ||
| 226 | or to OpenEmbedded, you might consider requesting a contrib area | ||
| 227 | and the necessary associated rights. | ||
| 228 | |||
| 229 | #. *Send the patches via email:* Send the patches to the recipients and | ||
| 230 | relevant mailing lists by using the ``git send-email`` command. | ||
| 231 | |||
| 232 | .. note:: | ||
| 233 | |||
| 234 | In order to use ``git send-email``, you must have the proper Git packages | ||
| 235 | installed on your host. | ||
| 236 | For Ubuntu, Debian, and Fedora the package is ``git-email``. | ||
| 237 | |||
| 238 | The ``git send-email`` command sends email by using a local or remote | ||
| 239 | Mail Transport Agent (MTA) such as ``msmtp``, ``sendmail``, or | ||
| 240 | through a direct ``smtp`` configuration in your Git ``~/.gitconfig`` | ||
| 241 | file. If you are submitting patches through email only, it is very | ||
| 242 | important that you submit them without any whitespace or HTML | ||
| 243 | formatting that either you or your mailer introduces. The maintainer | ||
| 244 | that receives your patches needs to be able to save and apply them | ||
| 245 | directly from your emails. A good way to verify that what you are | ||
| 246 | sending will be applicable by the maintainer is to do a dry run and | ||
| 247 | send them to yourself and then save and apply them as the maintainer | ||
| 248 | would. | ||
| 249 | |||
| 250 | The ``git send-email`` command is the preferred method for sending | ||
| 251 | your patches using email since there is no risk of compromising | ||
| 252 | whitespace in the body of the message, which can occur when you use | ||
| 253 | your own mail client. The command also has several options that let | ||
| 254 | you specify recipients and perform further editing of the email | ||
| 255 | message. For information on how to use the ``git send-email`` | ||
| 256 | command, see ``GIT-SEND-EMAIL(1)`` displayed using the | ||
| 257 | ``man git-send-email`` command. | ||
| 258 | |||
| 259 | The Yocto Project uses a `Patchwork instance <https://patchwork.yoctoproject.org/>`__ | ||
| 260 | to track the status of patches submitted to the various mailing lists and to | ||
| 261 | support automated patch testing. Each submitted patch is checked for common | ||
| 262 | mistakes and deviations from the expected patch format and submitters are | ||
| 263 | notified by patchtest if such mistakes are found. This process helps to | ||
| 264 | reduce the burden of patch review on maintainers. | ||
| 265 | |||
| 266 | .. note:: | ||
| 267 | |||
| 268 | This system is imperfect and changes can sometimes get lost in the flow. | ||
| 269 | Asking about the status of a patch or change is reasonable if the change | ||
| 270 | has been idle for a while with no feedback. | ||
| 271 | |||
| 272 | Using Scripts to Push a Change Upstream and Request a Pull | ||
| 273 | ========================================================== | ||
| 274 | |||
| 275 | For larger patch series it is preferable to send a pull request which not | ||
| 276 | only includes the patch but also a pointer to a branch that can be pulled | ||
| 277 | from. This involves making a local branch for your changes, pushing this | ||
| 278 | branch to an accessible repository and then using the ``create-pull-request`` | ||
| 279 | and ``send-pull-request`` scripts from openembedded-core to create and send a | ||
| 280 | patch series with a link to the branch for review. | ||
| 281 | |||
| 282 | Follow this procedure to push a change to an upstream "contrib" Git | ||
| 283 | repository once the steps in | ||
| 284 | ":ref:`contributor-guide/submit-change:preparing changes for submission`" | ||
| 285 | have been followed: | ||
| 286 | |||
| 287 | .. note:: | ||
| 288 | |||
| 289 | You can find general Git information on how to push a change upstream | ||
| 290 | in the | ||
| 291 | `Git Community Book <https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows>`__. | ||
| 292 | |||
| 293 | #. *Push Your Commits to a "Contrib" Upstream:* If you have arranged for | ||
| 294 | permissions to push to an upstream contrib repository, push the | ||
| 295 | change to that repository:: | ||
| 296 | |||
| 297 | $ git push upstream_remote_repo local_branch_name | ||
| 298 | |||
| 299 | For example, suppose you have permissions to push | ||
| 300 | into the upstream ``meta-intel-contrib`` repository and you are | ||
| 301 | working in a local branch named `your_name`\ ``/README``. The following | ||
| 302 | command pushes your local commits to the ``meta-intel-contrib`` | ||
| 303 | upstream repository and puts the commit in a branch named | ||
| 304 | `your_name`\ ``/README``:: | ||
| 305 | |||
| 306 | $ git push meta-intel-contrib your_name/README | ||
| 307 | |||
| 308 | #. *Determine Who to Notify:* Determine the maintainer or the mailing | ||
| 309 | list that you need to notify for the change. | ||
| 310 | |||
| 311 | Before submitting any change, you need to be sure who the maintainer | ||
| 312 | is or what mailing list that you need to notify. Use either these | ||
| 313 | methods to find out: | ||
| 314 | |||
| 315 | - *Maintenance File:* Examine the ``maintainers.inc`` file, which is | ||
| 316 | located in the :term:`Source Directory` at | ||
| 317 | ``meta/conf/distro/include``, to see who is responsible for code. | ||
| 318 | |||
| 319 | - *Search by File:* Using :ref:`overview-manual/development-environment:git`, you can | ||
| 320 | enter the following command to bring up a short list of all | ||
| 321 | commits against a specific file:: | ||
| 322 | |||
| 323 | git shortlog -- filename | ||
| 324 | |||
| 325 | Just provide the name of the file for which you are interested. The | ||
| 326 | information returned is not ordered by history but does include a | ||
| 327 | list of everyone who has committed grouped by name. From the list, | ||
| 328 | you can see who is responsible for the bulk of the changes against | ||
| 329 | the file. | ||
| 330 | |||
| 331 | - *Examine the List of Mailing Lists:* For a list of the Yocto | ||
| 332 | Project and related mailing lists, see the ":ref:`Mailing | ||
| 333 | lists <resources-mailinglist>`" section in | ||
| 334 | the Yocto Project Reference Manual. | ||
| 335 | |||
| 336 | #. *Make a Pull Request:* Notify the maintainer or the mailing list that | ||
| 337 | you have pushed a change by making a pull request. | ||
| 338 | |||
| 339 | The Yocto Project provides two scripts that conveniently let you | ||
| 340 | generate and send pull requests to the Yocto Project. These scripts | ||
| 341 | are ``create-pull-request`` and ``send-pull-request``. You can find | ||
| 342 | these scripts in the ``scripts`` directory within the | ||
| 343 | :term:`Source Directory` (e.g. | ||
| 344 | ``poky/scripts``). | ||
| 345 | |||
| 346 | Using these scripts correctly formats the requests without | ||
| 347 | introducing any whitespace or HTML formatting. The maintainer that | ||
| 348 | receives your patches either directly or through the mailing list | ||
| 349 | needs to be able to save and apply them directly from your emails. | ||
| 350 | Using these scripts is the preferred method for sending patches. | ||
| 351 | |||
| 352 | First, create the pull request. For example, the following command | ||
| 353 | runs the script, specifies the upstream repository in the contrib | ||
| 354 | directory into which you pushed the change, and provides a subject | ||
| 355 | line in the created patch files:: | ||
| 356 | |||
| 357 | $ poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README" | ||
| 358 | |||
| 359 | Running this script forms ``*.patch`` files in a folder named | ||
| 360 | ``pull-``\ `PID` in the current directory. One of the patch files is a | ||
| 361 | cover letter. | ||
| 362 | |||
| 363 | Before running the ``send-pull-request`` script, you must edit the | ||
| 364 | cover letter patch to insert information about your change. After | ||
| 365 | editing the cover letter, send the pull request. For example, the | ||
| 366 | following command runs the script and specifies the patch directory | ||
| 367 | and email address. In this example, the email address is a mailing | ||
| 368 | list:: | ||
| 369 | |||
| 370 | $ poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@lists.yoctoproject.org | ||
| 371 | |||
| 372 | You need to follow the prompts as the script is interactive. | ||
| 373 | |||
| 374 | .. note:: | ||
| 375 | |||
| 376 | For help on using these scripts, simply provide the ``-h`` | ||
| 377 | argument as follows:: | ||
| 378 | |||
| 379 | $ poky/scripts/create-pull-request -h | ||
| 380 | $ poky/scripts/send-pull-request -h | ||
| 381 | |||
| 382 | Responding to Patch Review | ||
| 383 | ========================== | ||
| 384 | |||
| 385 | You may get feedback on your submitted patches from other community members | ||
| 386 | or from the automated patchtest service. If issues are identified in your | ||
| 387 | patch then it is usually necessary to address these before the patch will be | ||
| 388 | accepted into the project. In this case you should amend the patch according | ||
| 389 | to the feedback and submit an updated version to the relevant mailing list, | ||
| 390 | copying in the reviewers who provided feedback to the previous version of the | ||
| 391 | patch. | ||
| 392 | |||
| 393 | The patch should be amended using ``git commit --amend`` or perhaps ``git | ||
| 394 | rebase`` for more expert git users. You should also modify the ``[PATCH]`` | ||
| 395 | tag in the email subject line when sending the revised patch to mark the new | ||
| 396 | iteration as ``[PATCH v2]``, ``[PATCH v3]``, etc as appropriate. This can be | ||
| 397 | done by passing the ``-v`` argument to ``git format-patch`` with a version | ||
| 398 | number. | ||
| 399 | |||
| 400 | Lastly please ensure that you also test your revised changes. In particular | ||
| 401 | please don't just edit the patch file written out by ``git format-patch`` and | ||
| 402 | resend it. | ||
| 403 | |||
| 404 | Submitting Changes to Stable Release Branches | ||
| 405 | ============================================= | ||
| 406 | |||
| 407 | The process for proposing changes to a Yocto Project stable branch differs | ||
| 408 | from the steps described above. Changes to a stable branch must address | ||
| 409 | identified bugs or CVEs and should be made carefully in order to avoid the | ||
| 410 | risk of introducing new bugs or breaking backwards compatibility. Typically | ||
| 411 | bug fixes must already be accepted into the master branch before they can be | ||
| 412 | backported to a stable branch unless the bug in question does not affect the | ||
| 413 | master branch or the fix on the master branch is unsuitable for backporting. | ||
| 414 | |||
| 415 | The list of stable branches along with the status and maintainer for each | ||
| 416 | branch can be obtained from the | ||
| 417 | :yocto_wiki:`Releases wiki page </Releases>`. | ||
| 418 | |||
| 419 | .. note:: | ||
| 420 | |||
| 421 | Changes will not typically be accepted for branches which are marked as | ||
| 422 | End-Of-Life (EOL). | ||
| 423 | |||
| 424 | With this in mind, the steps to submit a change for a stable branch are as | ||
| 425 | follows: | ||
| 426 | |||
| 427 | #. *Identify the bug or CVE to be fixed:* This information should be | ||
| 428 | collected so that it can be included in your submission. | ||
| 429 | |||
| 430 | See :ref:`dev-manual/vulnerabilities:checking for vulnerabilities` | ||
| 431 | for details about CVE tracking. | ||
| 432 | |||
| 433 | #. *Check if the fix is already present in the master branch:* This will | ||
| 434 | result in the most straightforward path into the stable branch for the | ||
| 435 | fix. | ||
| 436 | |||
| 437 | #. *If the fix is present in the master branch --- submit a backport request | ||
| 438 | by email:* You should send an email to the relevant stable branch | ||
| 439 | maintainer and the mailing list with details of the bug or CVE to be | ||
| 440 | fixed, the commit hash on the master branch that fixes the issue and | ||
| 441 | the stable branches which you would like this fix to be backported to. | ||
| 442 | |||
| 443 | #. *If the fix is not present in the master branch --- submit the fix to the | ||
| 444 | master branch first:* This will ensure that the fix passes through the | ||
| 445 | project's usual patch review and test processes before being accepted. | ||
| 446 | It will also ensure that bugs are not left unresolved in the master | ||
| 447 | branch itself. Once the fix is accepted in the master branch a backport | ||
| 448 | request can be submitted as above. | ||
| 449 | |||
| 450 | #. *If the fix is unsuitable for the master branch --- submit a patch | ||
| 451 | directly for the stable branch:* This method should be considered as a | ||
| 452 | last resort. It is typically necessary when the master branch is using | ||
| 453 | a newer version of the software which includes an upstream fix for the | ||
| 454 | issue or when the issue has been fixed on the master branch in a way | ||
| 455 | that introduces backwards incompatible changes. In this case follow the | ||
| 456 | steps in ":ref:`contributor-guide/submit-change:preparing changes for submission`" and | ||
| 457 | ":ref:`contributor-guide/submit-change:using email to submit a patch`" | ||
| 458 | but modify the subject header of your patch | ||
| 459 | email to include the name of the stable branch which you are | ||
| 460 | targetting. This can be done using the ``--subject-prefix`` argument to | ||
| 461 | ``git format-patch``, for example to submit a patch to the dunfell | ||
| 462 | branch use | ||
| 463 | ``git format-patch --subject-prefix='&DISTRO_NAME_NO_CAP_MINUS_ONE;][PATCH' ...``. | ||
diff --git a/documentation/contributor-guide/submit-defect.rst b/documentation/contributor-guide/submit-defect.rst new file mode 100644 index 0000000000..527ffb2dc0 --- /dev/null +++ b/documentation/contributor-guide/submit-defect.rst | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Submitting a Defect Against the Yocto Project and OpenEmbedded | ||
| 4 | ************************************************************** | ||
| 5 | |||
| 6 | You can use the Yocto Project instance of | ||
| 7 | `Bugzilla <https://www.bugzilla.org/about/>`__ to submit a defect (bug) | ||
| 8 | against BitBake, OpenEmbedded-Core, against any other Yocto Project component | ||
| 9 | or for tool issues. For additional information on this implementation of | ||
| 10 | Bugzilla see the ":ref:`Yocto Project Bugzilla <resources-bugtracker>`" section | ||
| 11 | in the Yocto Project Reference Manual. For more detail on any of the following | ||
| 12 | steps, see the Yocto Project | ||
| 13 | :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`. | ||
| 14 | |||
| 15 | Use the following general steps to submit a bug: | ||
| 16 | |||
| 17 | #. Open the Yocto Project implementation of :yocto_bugs:`Bugzilla <>`. | ||
| 18 | |||
| 19 | #. Click "File a Bug" to enter a new bug. | ||
| 20 | |||
| 21 | #. Choose the appropriate "Classification", "Product", and "Component" | ||
| 22 | for which the bug was found. Bugs for the Yocto Project fall into | ||
| 23 | one of several classifications, which in turn break down into | ||
| 24 | several products and components. For example, for a bug against the | ||
| 25 | ``meta-intel`` layer, you would choose "Build System, Metadata & | ||
| 26 | Runtime", "BSPs", and "bsps-meta-intel", respectively. | ||
| 27 | |||
| 28 | #. Choose the "Version" of the Yocto Project for which you found the | ||
| 29 | bug (e.g. &DISTRO;). | ||
| 30 | |||
| 31 | #. Determine and select the "Severity" of the bug. The severity | ||
| 32 | indicates how the bug impacted your work. | ||
| 33 | |||
| 34 | #. Choose the "Hardware" that the bug impacts. | ||
| 35 | |||
| 36 | #. Choose the "Architecture" that the bug impacts. | ||
| 37 | |||
| 38 | #. Choose a "Documentation change" item for the bug. Fixing a bug might | ||
| 39 | or might not affect the Yocto Project documentation. If you are | ||
| 40 | unsure of the impact to the documentation, select "Don't Know". | ||
| 41 | |||
| 42 | #. Provide a brief "Summary" of the bug. Try to limit your summary to | ||
| 43 | just a line or two and be sure to capture the essence of the bug. | ||
| 44 | |||
| 45 | #. Provide a detailed "Description" of the bug. You should provide as | ||
| 46 | much detail as you can about the context, behavior, output, and so | ||
| 47 | forth that surrounds the bug. You can even attach supporting files | ||
| 48 | for output from logs by using the "Add an attachment" button. | ||
| 49 | |||
| 50 | #. Click the "Submit Bug" button submit the bug. A new Bugzilla number | ||
| 51 | is assigned to the bug and the defect is logged in the bug tracking | ||
| 52 | system. | ||
| 53 | |||
| 54 | Once you file a bug, the bug is processed by the Yocto Project Bug | ||
| 55 | Triage Team and further details concerning the bug are assigned (e.g. | ||
| 56 | priority and owner). You are the "Submitter" of the bug and any further | ||
| 57 | categorization, progress, or comments on the bug result in Bugzilla | ||
| 58 | sending you an automated email concerning the particular change or | ||
| 59 | progress to the bug. | ||
| 60 | |||
| 61 | There are no guarantees about if or when a bug might be worked on since an | ||
| 62 | open-source project has no dedicated engineering resources. However, the | ||
| 63 | project does have a good track record of resolving common issues over the | ||
| 64 | medium and long term. We do encourage people to file bugs so issues are | ||
| 65 | at least known about. It helps other users when they find somebody having | ||
| 66 | the same issue as they do, and an issue that is unknown is much less likely | ||
| 67 | to ever be fixed! | ||
