Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 1 | Contributing |
| 2 | ============ |
| 3 | |
| 4 | |
| 5 | Getting Started |
| 6 | --------------- |
| 7 | |
| 8 | - Make sure you have a GitHub account and you are logged on `developer.trustedfirmware.org`_. |
| 9 | - Send an email to the |TS_MAIL_LIST| about your work. This gives everyone |
| 10 | visibility of whether others are working on something similar. |
| 11 | - Clone the |TS_REPO| on your own machine. |
| 12 | - Create a local topic branch based on ``main`` branch of the |TS_REPO|. |
| 13 | |
| 14 | Making Changes |
| 15 | -------------- |
| 16 | |
| 17 | - Make commits of logical units. See these general `Git guidelines`_ for contributing to a project. |
| 18 | - Follow the :ref:`Coding Style & Guidelines`. |
| 19 | - Keep the commits on topic. If you need to fix another bug or make another enhancement, please create a separate |
| 20 | change. |
| 21 | - Avoid long commit series. If you do have a long series, consider whether some |
| 22 | commits should be squashed together or addressed in a separate topic. |
| 23 | - Make sure your commit messages are in the proper format. Please keel the 50/72 rule (for details see `Tim Popes blog entry`_.) |
| 24 | - Where appropriate, please update the documentation. |
| 25 | |
Julian Hall | eed5b9c | 2022-04-05 15:33:50 +0100 | [diff] [blame^] | 26 | - Consider which documents or other in-source documentation needs updating. |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 27 | - Ensure that each changed file has the correct copyright and license information. Files that entirely consist of |
| 28 | contributions to this project should have a copyright notice and BSD-3-Clause SPDX license identifier of the form |
Julian Hall | eed5b9c | 2022-04-05 15:33:50 +0100 | [diff] [blame^] | 29 | as shown in :ref:`license`. Example copyright and license comment blocks are shown in :ref:`Coding Style & Guidelines`. |
| 30 | Files that contain changes to imported Third Party IP files should retain their original copyright and license |
| 31 | notices. For significant contributions you may add your own copyright notice in following format:: |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 32 | |
| 33 | Portions copyright (c) [XXXX-]YYYY, <OWNER>. All rights reserved. |
| 34 | |
| 35 | where XXXX is the year of first contribution (if different to YYYY) and YYYY is the year of most recent |
| 36 | contribution. *<OWNER>* is your name or your company name. |
Julian Hall | eed5b9c | 2022-04-05 15:33:50 +0100 | [diff] [blame^] | 37 | - For any change, ensure that YYYY is updated if a contribution is made in a year more recent than the previous YYYY. |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 38 | - If you are submitting new files that you intend to be the technical sub-maintainer for (for example, a new platform |
| 39 | port), then also update the :ref:`maintainers` file. |
| 40 | - For topics with multiple commits, you should make all documentation changes (and nothing else) in the last commit |
| 41 | of the series. Otherwise, include the documentation changes within the single commit. |
| 42 | |
| 43 | - Please test your changes. |
| 44 | |
| 45 | Submitting Changes |
| 46 | ------------------ |
| 47 | |
| 48 | - Ensure that each commit in the series has at least one ``Signed-off-by:`` line, using your real name and email |
| 49 | address. The names in the ``Signed-off-by:`` and ``Author:`` lines must match. If anyone else contributes to the |
| 50 | commit, they must also add their own ``Signed-off-by:`` line. By adding this line the contributor certifies the |
| 51 | contribution is made under the terms of the :download:`Developer Certificate of Origin <../../dco.txt>`. |
| 52 | |
| 53 | More details may be found in the `Gerrit Signed-off-by Lines guidelines`_. |
| 54 | |
| 55 | - Ensure that each commit also has a unique ``Change-Id:`` line. If you have cloned the repository with the "`Clone with |
| 56 | commit-msg hook`" clone method, this should already be the case. |
| 57 | |
| 58 | More details may be found in the `Gerrit Change-Ids documentation`_. |
| 59 | |
| 60 | - Submit your changes for review at https://review.trustedfirmware.org targeting the ``integration`` branch. |
| 61 | |
| 62 | - The changes will then undergo further review and testing by the :ref:`maintainers`. Any review comments will be made |
| 63 | directly on your patch. This may require you to do some rework. |
| 64 | |
| 65 | Refer to the `Gerrit Uploading Changes documentation`_ for more details. |
| 66 | |
| 67 | - When the changes are accepted, the :ref:`maintainers` will integrate them. |
| 68 | |
| 69 | - Typically, the :ref:`maintainers` will merge the changes into the ``integration`` branch. |
| 70 | - If the changes are not based on a sufficiently-recent commit, or if they cannot be automatically rebased, then the |
| 71 | :ref:`maintainers` may rebase it on the ``main`` branch or ask you to do so. |
| 72 | - After final integration testing, the changes will make their way into the ``main`` branch. If a problem is found |
| 73 | during integration, the merge commit will be removed from the ``integration`` branch and the :ref:`maintainers` will |
| 74 | ask you to create a new patch set to resolve the problem. |
| 75 | |
| 76 | -------------- |
| 77 | |
| 78 | .. _developer.trustedfirmware.org: https://developer.trustedfirmware.org |
| 79 | .. _Git guidelines: http://git-scm.com/book/ch5-2.html |
| 80 | .. _Gerrit Uploading Changes documentation: https://review.trustedfirmware.org/Documentation/user-upload.html |
| 81 | .. _Gerrit Signed-off-by Lines guidelines: https://review.trustedfirmware.org/Documentation/user-signedoffby.html |
| 82 | .. _Gerrit Change-Ids documentation: https://review.trustedfirmware.org/Documentation/user-changeid.html |
| 83 | .. _`Tim Popes blog entry`: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html |
| 84 | |
| 85 | |
Julian Hall | eed5b9c | 2022-04-05 15:33:50 +0100 | [diff] [blame^] | 86 | *Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.* |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 87 | |
| 88 | SPDX-License-Identifier: BSD-3-Clause |