Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| submitting-patches [2021/05/14 21:08] – Try to fix wrapping zorun | submitting-patches [2024/04/08 11:10] – [13. The canonical patch format] fix third example subject kanjimonster | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| * **Patches to core packages and patches that add support for new devices** (i.e. code that is in [[https:// | * **Patches to core packages and patches that add support for new devices** (i.e. code that is in [[https:// | ||
| - | * **Patches for Luci web interface and related packages** can be submitted to mailing list or to the [[https:// | + | * **Patches for LuCI web interface and related packages** can be submitted to mailing list or to the [[https:// |
| - | * **Patches for community packages about routing** should go as a Github PR in the [[https:// | + | * **Patches for community packages about routing** should go as a Github PR in the [[https:// |
| - | * **Patches for community packages about telephony and SIP/VOIP** should go as a Github PR in the [[https:// | + | * **Patches for community packages about telephony and SIP/VOIP** should go as a Github PR in the [[https:// |
| - | * **Patches for miscellaneous community packages** should go as a Github PR in the [[https:// | + | * **Patches for miscellaneous community packages** should go as a Github PR in the [[https:// |
| - | < | + | <WRAP round info 60%> |
| **If you want to add a new package that is not specific for a device** nor crucial to compile or use OpenWrt on a device, (i.e. tools, compilers, runtimes libraries, VPNs, media servers, backup servers and more), **open a PR in the appropriate community packages repository mentioned above.** Note that if you add a package you usually must assign yourself as " | **If you want to add a new package that is not specific for a device** nor crucial to compile or use OpenWrt on a device, (i.e. tools, compilers, runtimes libraries, VPNs, media servers, backup servers and more), **open a PR in the appropriate community packages repository mentioned above.** Note that if you add a package you usually must assign yourself as " | ||
| </ | </ | ||
| Line 47: | Line 47: | ||
| * If you add support for new hardware: Include in your commit message a short description of the hardware and how to install OpenWrt on it. Have a look at the [[https:// | * If you add support for new hardware: Include in your commit message a short description of the hardware and how to install OpenWrt on it. Have a look at the [[https:// | ||
| - | * **all commits must contain '' | + | * **all commits must contain '' |
| - | * GitHub web interface or GUI application for git: you must append | + | * GitHub web interface or GUI application for git: you must append the '' |
| * git command-line interface: | * git command-line interface: | ||
| Line 56: | Line 56: | ||
| * **the '' | * **the '' | ||
| - | * GitHub web interface: you must specify your real name in the '' | + | * GitHub web interface: you must specify your real name or known identity |
| * git command-line interface: | * git command-line interface: | ||
| Line 70: | Line 70: | ||
| - PRs can be sent to the patches mailing list from any source and will always be considered for inclusion if the quality of the tree is good and format of submission is correct | - PRs can be sent to the patches mailing list from any source and will always be considered for inclusion if the quality of the tree is good and format of submission is correct | ||
| - Staging trees can be hosted as part of the projects git infrastructure, | - Staging trees can be hosted as part of the projects git infrastructure, | ||
| + | ===== Patch backports ===== | ||
| + | Backporting refers to applying changes to a stable (release) branch like for example **openwrt-23.05** from the **main** branch. Since new features are not added to stable branches, backported changes are generally bug fixes and security fixes only. The process is roughly following: | ||
| + | - Changes needs to be first applied into the **main** branch | ||
| + | - Afterwards those changes can be proposed to be applied into the stable (release) branch | ||
| + | When pulling the commits from the **main** branch, you need to use '' | ||
| + | <code bash> | ||
| + | $ git cherry-pick --signoff -x < | ||
| + | </ | ||
| ===== Patch checklist ===== | ===== Patch checklist ===== | ||
| - Single commit ( multiple commits must first be squashed, as described [[docs: | - Single commit ( multiple commits must first be squashed, as described [[docs: | ||
| Line 79: | Line 86: | ||
| - Description explains **why** it was changed | - Description explains **why** it was changed | ||
| - Description makes sense | - Description makes sense | ||
| - | - Signoff line includes real name | + | - Signoff line includes real name or known identity |
| - Signoff line includes real email address | - Signoff line includes real email address | ||
| - If it's a third-party patch, then preserve Signoff line from the original author | - If it's a third-party patch, then preserve Signoff line from the original author | ||
| - | - Sender/ | + | - Sender/ |
| ===== DTS checklist ===== | ===== DTS checklist ===== | ||
| Line 96: | Line 103: | ||
| Based on [[https:// | Based on [[https:// | ||
| - | OpenWrt is constantly being improved. We'd like as many people to contribute to this as we can get. If you find a change useful, by all means try to get it incorporated into the project. This should improve OpenWrt and it should help carry your changes forward into future versions | + | OpenWrt is constantly being improved. We'd like as many people to contribute to this as we can get. If you find a change useful, by all means try to get it incorporated into the project. This should improve OpenWrt and it should help carry your changes forward into future versions. |
| For a person or company who wishes to submit a change to OpenWrt, the process can sometimes be daunting if you're not familiar with "the system." | For a person or company who wishes to submit a change to OpenWrt, the process can sometimes be daunting if you're not familiar with "the system." | ||
| - | |||
| - | This document tries to lay out a procedure to enable people to submit patches in a way that is most effective for all concerned. | ||
| It is important to do all these steps repeatedly: | It is important to do all these steps repeatedly: | ||
| * Listen to what other people think. | * Listen to what other people think. | ||
| - | * Talk explaining | + | * Explain |
| - | * Do write useful patches including documentation. | + | * Write useful patches including documentation. |
| * Test, test, test. | * Test, test, test. | ||
| Where to listen and talk: | Where to listen and talk: | ||
| * Google to find things related to your problem | * Google to find things related to your problem | ||
| - | * Wiki: check this [[: | + | * [[: |
| - | * Mailing Lists | + | * [[: |
| - | * Forums like [[https:// | + | * [[: |
| - | * IRC irc.freenode.net, | + | * [[https:// |
| - | * TRAC https:// | + | * GitHub - https:// |
| - | * GitHub - http:// | + | * (archived) |
| ===== Documentation ===== | ===== Documentation ===== | ||
| Line 123: | Line 128: | ||
| Read [[: | Read [[: | ||
| - | For patches against external package sources, refer to the quilt howto at [[docs: | + | For patches against external package sources, refer to the quilt howto at [[docs: |
| Please read [[https:// | Please read [[https:// | ||
| Line 132: | Line 137: | ||
| Patches should be based in the root trunk, not in any lower subdirectory. | Patches should be based in the root trunk, not in any lower subdirectory. | ||
| - | Make sure your patch does not include any extra files which do not belong in a patch submission. | + | Make sure your patch does not include any extra files which do not belong in a patch submission. |
| + | Be sure to review your patch **after** you have generated it, to ensure accuracy. | ||
| - | If your changes produce a lot of deltas, you may want to look into splitting them into individual patches which modify things in logical stages. This will facilitate easier reviewing by other OpenWrt developers, which is very important if you want your patch to be accepted. | + | If your changes produce a lot of deltas, you may want to look into splitting them into individual patches which modify things in logical stages. |
| + | This will facilitate easier reviewing by other OpenWrt developers, which is very important if you want your patch to be accepted. | ||
| The tools you can use to create a patch, in order of preference, are: | The tools you can use to create a patch, in order of preference, are: | ||
| Line 141: | Line 148: | ||
| * diff | * diff | ||
| - | To ease integration of smaller patches into trunk, developers can also make pull-requests into the GitHub trunk tree - this is an addition over the earlier patchwork workflow. Larger patches, or patches that require further discussion, should still be sent to the openwrt-devel list, where they' | + | To ease integration of smaller patches into trunk, developers can also make pull-requests into the GitHub trunk tree - this is an addition over the earlier patchwork workflow. |
| + | Larger patches, or patches that require further discussion, should still be sent to the **openwrt-devel** list, where they' | ||
| ==== 2. Describe your changes ===== | ==== 2. Describe your changes ===== | ||
| Line 189: | Line 197: | ||
| Large changes are not appropriate for mailing lists, and some maintainers. If your patch, uncompressed, | Large changes are not appropriate for mailing lists, and some maintainers. If your patch, uncompressed, | ||
| - | ==== 8. Don't get discouraged, re-submit ===== | + | ==== 8. Remain objective, re-submit ===== |
| + | |||
| + | It's nothing personal. Code should work well for its intended purpose and results should adhere to many standards and requirements, | ||
| After you have submitted your change, be patient and wait. If developers like your change and apply it, it will appear as new revision in the source code management system. | After you have submitted your change, be patient and wait. If developers like your change and apply it, it will appear as new revision in the source code management system. | ||
| Line 247: | Line 258: | ||
| </ | </ | ||
| - | using your real name (no pseudonyms or anonymous contributions.) | + | using a known identity |
| - | If you are a package or target maintainer, sometimes you need to slightly modify patches you receive in order to merge them, because the code is not exactly the same in your tree and the submitters' | + | If you are a package or target maintainer, sometimes you need to slightly modify patches you receive in order to merge them, because the code is not exactly the same in your tree and the submitters' |
| <code bash> | <code bash> | ||
| Line 276: | Line 287: | ||
| ==== 11. When to use " | ==== 11. When to use " | ||
| - | The Signed-off-by: | + | The Signed-off-by: |
| If a person was not directly involved in the preparation or handling of a patch but wishes to signify and record their approval of it then they can arrange to have an Acked-by: line added to the patch' | If a person was not directly involved in the preparation or handling of a patch but wishes to signify and record their approval of it then they can arrange to have an Acked-by: line added to the patch' | ||
| Line 358: | Line 369: | ||
| Subject: [PATCH] x86 generic: switch to 3.3 | Subject: [PATCH] x86 generic: switch to 3.3 | ||
| - | Subject: [PATCHv2 | + | Subject: [PATCH v2 001/207] ar71xx: enable sysupgrade on the WRT160Nl |
| </ | </ | ||