contribute.txt 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. Contributing to Buildroot
  4. ========================
  5. If you want to contribute to Buildroot, you will need a git view of
  6. the project. Refer to xref:getting-buildroot[] to get it.
  7. Currently, the mailing list is the central place for contribution.
  8. If you have not already subscribed to it, then refer to
  9. xref:mailing-list-subscribe[].
  10. Recently, a web interface is also used to manage patches sent to the
  11. mailing list, see xref:patchwork[].
  12. [NOTE]
  13. _Please, do not attach patches to bugs, send them to the mailing list
  14. instead_ (see xref:submitting-patches[]).
  15. [[submitting-patches]]
  16. Submitting patches
  17. ------------------
  18. When your changes are done, and committed in your local git view,
  19. _rebase_ your development branch on top of the upstream tree before
  20. generating the patch set. To do so, run:
  21. ---------------------
  22. $ git fetch --all --tags
  23. $ git rebase origin/master
  24. ---------------------
  25. Here, you are ready to generate then submit your patch set.
  26. To generate it, run:
  27. ---------------------
  28. $ git format-patch -M -n -s -o outgoing origin/master
  29. ---------------------
  30. This will generate patch files in the +outgoing+ subdirectory,
  31. automatically adding the +Signed-off-by+ line.
  32. Once patch files are generated, you can review/edit the commit message
  33. before submitting them using your favorite text editor.
  34. Lastly, send/submit your patch set to the Buildroot mailing list:
  35. ---------------------
  36. $ git send-email --to buildroot@busybox.net outgoing/*
  37. ---------------------
  38. Note that +git+ should be configured to use your mail account.
  39. To configure +git+, see +man git-send-email+ or google it.
  40. Make sure posted *patches are not line-wrapped*, otherwise they cannot
  41. easily be applied. In such a case, fix your e-mail client, or better,
  42. use +git send-email+ to send your patches.
  43. Cover letter
  44. ~~~~~~~~~~~~
  45. If you want to present the whole patch set in a separate mail, add
  46. +--cover-letter+ to the +git format-patch+ command (see +man
  47. git-format-patch+ for further information). This will generate a
  48. template for an introduction e-mail to your patch series.
  49. A 'cover letter' may be useful to introduce the changes you propose
  50. in the following cases:
  51. * large number of commits in the series;
  52. * deep impact of the changes in the rest of the project;
  53. * RFC footnote:[RFC: (Request for comments) change proposal];
  54. * whenever you feel it will help presenting your work, your choices,
  55. the review process, etc.
  56. Patch revision changelog
  57. ~~~~~~~~~~~~~~~~~~~~~~~~
  58. When improvements are requested, the new revision of each commit
  59. should include a changelog of the modifications between each
  60. submission. Note that when your patch series is introduced by a cover
  61. letter, the changelog may be added in the cover letter rather than in
  62. the individual commits.
  63. When added to the individual commits, this changelog is added when
  64. editing the commit message. Below the +Signed-off-by+ section, add
  65. +---+ and your changelog.
  66. Although the changelog will be visible for the reviewers in the mail
  67. thread, as well as in http://patchwork.buildroot.org[patchwork], +git+
  68. will automatically ignores lines below +---+ when the patch will be
  69. merged. This is the intended behavior: the changelog is not meant to
  70. be preserved forever in the +git+ history of the project.
  71. Hereafter the recommended layout:
  72. ---------------
  73. Patch title less than 80-character length
  74. Some more paragraph giving some more details.
  75. And yet another paragraph giving more details.
  76. Signed-off-by: John Doe <john.doe@noname.org>
  77. ---
  78. Changes v2 -> v3:
  79. - foo bar (suggested by Jane)
  80. - bar buz
  81. Changes v1 -> v2:
  82. - alpha bravo (suggested by John)
  83. - charly delta
  84. ---------------
  85. Any patch revision should include the version number. The version number
  86. is simply composed of the letter +v+ followed by an +integer+ greater or
  87. equal to two (i.e. "PATCH v2", "PATCH v3" ...).
  88. This can be easily handled with +git format-patch+ by using the option
  89. +--subject-prefix+:
  90. ---------------------
  91. $ git format-patch --subject-prefix "PATCH v4" \
  92. -M -o outgoing origin/master
  93. ---------------------
  94. Reviewing/Testing patches
  95. -------------------------
  96. The review process for new patches is done over the mailing list. Once
  97. a patch is submitted to the mailing list, other developers will provide
  98. feedback to the patch via emails sent through the mailing list.
  99. In the review process, do not hesitate to respond to patch submissions
  100. for remarks, suggestions or anything that will help everyone to
  101. understand the patches and make them better. Please use internet
  102. style replies in plain text emails when responding to patch
  103. submissions.
  104. Some tags are used to help following the state of any patch posted on
  105. the mailing-list:
  106. Acked-by:: Indicates that the patch can be committed.
  107. Tested-by:: Indicates that the patch has been tested. It is useful
  108. but not necessary to add a comment about what has been tested.
  109. Buildroot's Patchwork website can be used to pull in patches for testing
  110. purposes. Please see xref:apply-patches-patchwork[] for more
  111. information on using Buildroot's Patchwork website to apply patches.
  112. Autobuild
  113. ---------
  114. The Buildroot community is currently setting up automatic builds in
  115. order to test more and more configurations. All build results are
  116. available at http://autobuild.buildroot.org[]
  117. A good way to contribute is by fixing broken builds.
  118. In the commit message of a patch fixing an _autobuild_, add a
  119. reference to the _build result directory_ (the +dir+ link in the _data
  120. column_):
  121. ---------------------
  122. Fixes http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069
  123. ---------------------
  124. [[reporting-bugs]]
  125. Reporting issues/bugs, get help
  126. -------------------------------
  127. Before reporting any issue, please check
  128. xref:mailing-list-subscribe[the mailing list archive] in case someone has
  129. already reported and fixed a similar problem.
  130. However you choose to report bugs or get help,
  131. xref:bugtracker[opening a bug] or
  132. xref:mailing-list-subscribe[send a mail to the mailing list], there are
  133. a number of details to provide in order to help people reproduce and
  134. find a solution to the issue.
  135. Try to think as if you were trying to help someone else; in
  136. that case, what would you need?
  137. Here is a short list of details to provide in such case:
  138. * host machine (OS/release)
  139. * version of Buildroot
  140. * target for which the build fails
  141. * package(s) which the build fails
  142. * the command that fails and its output
  143. * any information you think that may be relevant
  144. Additionnally, your can add the +.config+ file.
  145. If some of these details are too large, do not hesitate to use a
  146. pastebin service (see http://www.similarsitesearch.com/alternatives-to/pastebin.com[]).