Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
submitting-patches [2023/03/19 10:00] – rephrase to use gender neutral language ryancsubmitting-patches [2024/06/17 08:59] – old revision restored (2024/01/03 07:44) svanheule
Line 8: Line 8:
   * **Patches to core packages and patches that add support for new devices** (i.e. code that is in [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary|the main OpenWrt repository]] ) can be submitted as a pull request on [[https://github.com/openwrt/openwrt|the GitHub mirror]] or via the mailing list.   * **Patches to core packages and patches that add support for new devices** (i.e. code that is in [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary|the main OpenWrt repository]] ) can be submitted as a pull request on [[https://github.com/openwrt/openwrt|the GitHub mirror]] or via the mailing list.
  
-  * **Patches for Luci web interface and related packages** can be submitted to mailing list or to the [[https://github.com/openwrt/luci/| Github mirror]] of the Luci git repository.+  * **Patches for LuCI web interface and related packages** can be submitted to mailing list or to the [[https://github.com/openwrt/luci/| Github mirror]] of the LuCI git repository.  Specific guidelines and hints for contributing to the //LuCI// repo may be found at [[https://github.com/openwrt/luci/blob/master/CONTRIBUTING.md| Contributing Guidelines]].
  
-  * **Patches for community packages about routing** should go as a Github PR in the [[https://github.com/openwrt-routing/packages| OpenWrt community routing packages repo]]+  * **Patches for community packages about routing** should go as a Github PR in the [[https://github.com/openwrt-routing/packages| OpenWrt community routing packages repo]].  Use the //packages// contributing guidelines below when contributing to the //routing// repo.
  
-  * **Patches for community packages about telephony and SIP/VOIP** should go as a Github PR in the  [[https://github.com/openwrt/telephony| OpenWrt community telephony packages repo]]+  * **Patches for community packages about telephony and SIP/VOIP** should go as a Github PR in the  [[https://github.com/openwrt/telephony| OpenWrt community telephony packages repo]].  Use the //packages// contributing guidelines below when contributing to the //telephony// repo.
  
-  * **Patches for miscellaneous community packages** should go as a Github PR in the [[https://github.com/openwrt/packages|OpenWrt community package repo]] +  * **Patches for miscellaneous community packages** should go as a Github PR in the [[https://github.com/openwrt/packages|OpenWrt community package repo]].  Specific guidelines and hints for contributing to the //packages// repo may be found at [[https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md| Contributing Guidelines]].
  
 <WRAP round info 60%> <WRAP round info 60%>
Line 48: Line 48:
  
   * **all commits must contain ''%%Signed-off-by: My Name <my@email.address>%%'' where you write your real name and real email address**, in accordance with [[http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD#n416|Section 11 of the Linux Kernel patches guide]]   * **all commits must contain ''%%Signed-off-by: My Name <my@email.address>%%'' where you write your real name and real email address**, in accordance with [[http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD#n416|Section 11 of the Linux Kernel patches guide]]
-    * GitHub web interface or GUI application for git: you must append the the ''Signed-off-by:'' line manually in the commit description+    * GitHub web interface or GUI application for git: you must append the ''Signed-off-by:'' line manually in the commit description
     * 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, private servers, GitHub ...   - Staging trees can be hosted as part of the projects git infrastructure, private servers, GitHub ...
 +===== 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 ''git cherry-pick'' command with the ''-x'' argument and thus append a line that says ''(cherry picked from commit <commit>)'' to the original commit message ([[https://github.com/openwrt/openwrt/commit/59fd8f08cf544a7f0fcaf700ca9af9292de3adcc.patch|example]]) in order to indicate which commit this change was cherry-picked from. This is needed for traceability. It is also required that you add the ''--signoff'' to the commits, if you did not create the original commits. 
 +<code bash> 
 +$ git cherry-pick --signoff -x <commit> 
 +</code>
 ===== Patch checklist ===== ===== Patch checklist =====
   - Single commit ( multiple commits must first be squashed, as described [[docs:guide-developer:working-with-github-pr#squashing_commits|here]]  )   - Single commit ( multiple commits must first be squashed, as described [[docs:guide-developer:working-with-github-pr#squashing_commits|here]]  )
Line 190: Line 197:
 Large changes are not appropriate for mailing lists, and some maintainers. If your patch, uncompressed, exceeds 300 kB in size, it is preferred that you store your patch on an Internet-accessible server, and provide instead a URL (link) pointing to your patch. Large changes are not appropriate for mailing lists, and some maintainers. If your patch, uncompressed, exceeds 300 kB in size, it is preferred that you store your patch on an Internet-accessible server, and provide instead a URL (link) pointing to your patch.
  
-==== 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, so finding problems early is a good thing.  
 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.
  
  • Last modified: 2024/12/06 16:55
  • by wertwert4pda