]> Git Repo - buildroot-mgba.git/blame - docs/manual/contribute.txt
manual: contributing: don't recommend leaving out changelog from patches
[buildroot-mgba.git] / docs / manual / contribute.txt
CommitLineData
a79a54a0 1// -*- mode:doc; -*-
3edb0271 2// vim: set syntax=asciidoc:
a79a54a0 3
6b9bdfbb 4Contributing to Buildroot
37b22be9
TDS
5=========================
6
7There are many ways in which you can contribute to Buildroot: analyzing
8and fixing bugs, analyzing and fixing package build failures detected by
9the autobuilders, testing and reviewing patches sent by other
10developers, working on the items in our TODO list and sending your own
11improvements to Buildroot or its manual. The following sections give a
12little more detail on each of these items.
13
14If you are interested in contributing to Buildroot, the first thing you
15should do is to subscribe to the Buildroot mailing list. This list is
16the main way of interacting with other Buildroot developers and to send
17contributions to. If you aren't subscribed yet, then refer to
a79a54a0
SM
18xref:mailing-list-subscribe[].
19
37b22be9
TDS
20If you are going to touch the code, it is highly recommended to use a
21git repository of Buildroot, rather than starting from an extracted
22source code tarball. Git is the easiest way to develop from and directly
23send your patches to the mailing list. Refer to xref:getting-buildroot[]
24for more information on obtaining a Buildroot git tree.
a79a54a0 25
e640872e
TDS
26Reproducing, analyzing and fixing bugs
27--------------------------------------
28
29A first way of contributing is to have a look at the open bug reports in
30the https://bugs.busybox.net/buglist.cgi?product=buildroot[Buildroot bug
31tracker]. As we strive to keep the bug count as small as possible, all
32help in reproducing, analyzing and fixing reported bugs is more than
33welcome. Don't hesitate to add a comment to bug reports reporting your
34findings, even if you don't yet see the full picture.
35
f7d5d971
TDS
36Analyzing and fixing autobuild failures
37---------------------------------------
38
39The Buildroot autobuilders are a set of build machines that continuously
40run Buildroot builds based on random configurations. This is done for
41all architectures supported by Buildroot, with various toolchains, and
42with a random selection of packages. With the large commit activity on
43Buildroot, these autobuilders are a great help in detecting problems
44very early after commit.
45
46All build results are available at http://autobuild.buildroot.org[],
47statistics are at http://autobuild.buildroot.org/stats.php[]. Every day,
48an overview of all failed packages is sent to the mailing list.
49
50Detecting problems is great, but obviously these problems have to be
51fixed as well. Your contribution is very welcome here! There are
52basically two things that can be done:
53
54- Analyzing the problems. The daily summary mails do not contain details
55 about the actual failures: in order to see what's going on you have to
56 open the build log and check the last output. Having someone doing
57 this for all packages in the mail is very useful for other developers,
58 as they can make a quick initial analysis based on this output alone.
59
60- Fixing a problem. When fixing autobuild failures, you should follow
61 these steps:
62 . Check if you can reproduce the problem by building with the same
63 configuration. You can do this manually, or use the
64 http://git.buildroot.org/buildroot-test/tree/utils/br-reproduce-build[br-reproduce-build]
65 script that will automatically clone a Buildroot git repository,
66 checkout the correct revision, download and set the right
67 configuration, and start the build.
68 . Analyze the problem and create a fix.
69 . Verify that the problem is really fixed by starting from a clean
70 Buildroot tree and only applying your fix.
71 . Send the fix to the Buildroot mailing list (see
72 xref:submitting-patches[]). In case you created a patch against the
73 package sources, you should also send the patch upstream so that the
74 problem will be fixed in a later release, and the patch in Buildroot
75 can be removed.
76 In the commit message of a patch fixing an autobuild failure, add a
77 reference to the build result directory, as follows:
78---------------------
79Fixes http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069
80---------------------
81
aeae2356
TDS
82Reviewing and testing patches
83-----------------------------
84
85With the amount of patches sent to the mailing list each day, the
86maintainer has a very hard job to judge which patches are ready to apply
87and which ones aren't. Contributors can greatly help here by reviewing
88and testing these patches.
89
90In the review process, do not hesitate to respond to patch submissions
91for remarks, suggestions or anything that will help everyone to
92understand the patches and make them better. Please use internet
93style replies in plain text emails when responding to patch
94submissions.
95
96To indicate approval of a patch, there are three formal tags that keep
97track of this approval. To add your tag to a patch, reply to it with the
98approval tag below the original author's Signed-off-by line. These tags
99will be picked up automatically by patchwork (see
100ref:apply-patches-patchwork[]) and will be part of the commit log when
101the patch is accepted.
102
103Tested-by:: Indicates that the patch has been tested successfully.
104 You are encouraged to specify what kind of testing you performed
105 (compile-test on architecture X and Y, runtime test on target A,
106 ...). This additional information helps other testers and the
107 maintainer.
108
109Reviewed-by:: Indicates that you code-reviewed the patch and did your
110 best in spotting problems, but you are not sufficiently familiar with
111 the area touched to provide an Acked-by tag. This means that there
112 may be remaining problems in the patch that would be spotted by
113 someone with more experience in that area. Should such problems be
114 detected, your Reviewed-by tag remains appropriate and you cannot
115 be blamed.
116
117Acked-by:: Indicates that you code-reviewed the patch and you are
118 familiar enough with the area touched to feel that the patch can be
119 committed as-is (no additional changes required). In case it later
120 turns out that something is wrong with the patch, your Acked-by could
121 be considered inappropriate. The difference between Acked-by and
122 Reviewed-by is thus mainly that you are prepared to take the blame on
123 Acked patches, but not on Reviewed ones.
124
125If you reviewed a patch and have comments on it, you should simply reply
126to the patch stating these comments, without providing a Reviewed-by or
127Acked-by tag. These tags should only be provided if you judge the patch
128to be good as it is.
129
130It is important to note that neither Reviewed-by nor Acked-by imply
131that testing has been performed. To indicate that you both reviewed and
132tested the patch, provide two separate tags (Reviewed/Acked-by and
133Tested-by).
134
135Note also that _any developer_ can provide Tested/Reviewed/Acked-by
136tags, without exception, and we encourage everyone to do this. Buildroot
137does not have a defined group of _core_ developers, it just so happens
138that some developers are more active than others. The maintainer will
139value tags according to the track record of their submitter. Tags
140provided by a regular contributor will naturally be trusted more than
141tags provided by a newcomer. As you provide tags more regularly, your
142'trustworthiness' (in the eyes of the maintainer) will go up, but _any_
143tag provided is valuable.
144
145Buildroot's Patchwork website can be used to pull in patches for testing
146purposes. Please see xref:apply-patches-patchwork[] for more
147information on using Buildroot's Patchwork website to apply patches.
148
b77143a7
TDS
149Work on items from the TODO list
150--------------------------------
151
152If you want to contribute to Buildroot but don't know where to start,
153and you don't like any of the above topics, you can always work on items
154from the http://elinux.org/Buildroot#Todo_list[Buildroot TODO list].
155Don't hesitate to discuss an item first on the mailing list or on IRC.
156Do edit the wiki to indicate when you start working on an item, so we
157avoid duplicate efforts.
aeae2356 158
a79a54a0
SM
159[[submitting-patches]]
160Submitting patches
161------------------
162
37b22be9
TDS
163[NOTE]
164_Please, do not attach patches to bugs, send them to the mailing list
165instead_.
166
1133097c
TDS
167If you made some changes to Buildroot and you would like to contribute
168them to the Buildroot project, proceed as follows. Starting from the
169changes committed in your local git view, _rebase_ your development
170branch on top of the upstream tree before generating a patch set. To do
171so, run:
a79a54a0
SM
172
173---------------------
5664c4af
SM
174$ git fetch --all --tags
175$ git rebase origin/master
a79a54a0
SM
176---------------------
177
1133097c 178Now, you are ready to generate then submit your patch set.
a79a54a0
SM
179
180To generate it, run:
181
182---------------------
5664c4af 183$ git format-patch -M -n -s -o outgoing origin/master
a79a54a0
SM
184---------------------
185
186This will generate patch files in the +outgoing+ subdirectory,
f7da9ee5 187automatically adding the +Signed-off-by+ line.
a79a54a0 188
a79a54a0 189Once patch files are generated, you can review/edit the commit message
1133097c 190before submitting them, using your favorite text editor.
a79a54a0
SM
191
192Lastly, send/submit your patch set to the Buildroot mailing list:
193
194---------------------
2f78767b 195$ git send-email --to [email protected] outgoing/*
a79a54a0
SM
196---------------------
197
198Note that +git+ should be configured to use your mail account.
199To configure +git+, see +man git-send-email+ or google it.
200
1133097c
TDS
201If you do not use +git send-email+, make sure posted *patches are not
202line-wrapped*, otherwise they cannot easily be applied. In such a case,
203fix your e-mail client, or better yet, learn to use +git send-email+.
a79a54a0 204
9cbeb341
VT
205Cover letter
206~~~~~~~~~~~~
207
208If you want to present the whole patch set in a separate mail, add
209+--cover-letter+ to the +git format-patch+ command (see +man
210git-format-patch+ for further information). This will generate a
211template for an introduction e-mail to your patch series.
212
213A 'cover letter' may be useful to introduce the changes you propose
214in the following cases:
215
216* large number of commits in the series;
217
218* deep impact of the changes in the rest of the project;
219
220* RFC footnote:[RFC: (Request for comments) change proposal];
221
222* whenever you feel it will help presenting your work, your choices,
223 the review process, etc.
224
225Patch revision changelog
226~~~~~~~~~~~~~~~~~~~~~~~~
227
228When improvements are requested, the new revision of each commit
229should include a changelog of the modifications between each
230submission. Note that when your patch series is introduced by a cover
9b556772
TDS
231letter, an overall changelog may be added to the cover letter in
232addition to the changelog in the individual commits.
9cbeb341
VT
233
234When added to the individual commits, this changelog is added when
235editing the commit message. Below the +Signed-off-by+ section, add
236+---+ and your changelog.
237
238Although the changelog will be visible for the reviewers in the mail
239thread, as well as in http://patchwork.buildroot.org[patchwork], +git+
240will automatically ignores lines below +---+ when the patch will be
241merged. This is the intended behavior: the changelog is not meant to
242be preserved forever in the +git+ history of the project.
243
244Hereafter the recommended layout:
245
246---------------
247Patch title less than 80-character length
248
1133097c 249A paragraph giving more details.
9cbeb341
VT
250
251And yet another paragraph giving more details.
252
f7da9ee5 253Signed-off-by: John Doe <[email protected]>
9cbeb341
VT
254---
255Changes v2 -> v3:
256 - foo bar (suggested by Jane)
257 - bar buz
258
259Changes v1 -> v2:
260 - alpha bravo (suggested by John)
261 - charly delta
262---------------
263
264Any patch revision should include the version number. The version number
265is simply composed of the letter +v+ followed by an +integer+ greater or
266equal to two (i.e. "PATCH v2", "PATCH v3" ...).
267
268This can be easily handled with +git format-patch+ by using the option
269+--subject-prefix+:
270
271---------------------
272$ git format-patch --subject-prefix "PATCH v4" \
273 -M -o outgoing origin/master
274---------------------
275
a79a54a0
SM
276[[reporting-bugs]]
277Reporting issues/bugs, get help
278-------------------------------
279
ecd23535
SD
280Before reporting any issue, please check
281xref:mailing-list-subscribe[the mailing list archive] in case someone has
a79a54a0
SM
282already reported and fixed a similar problem.
283
ecd23535 284However you choose to report bugs or get help,
a79a54a0 285xref:bugtracker[opening a bug] or
ecd23535
SD
286xref:mailing-list-subscribe[send a mail to the mailing list], there are
287a number of details to provide in order to help people reproduce and
a79a54a0
SM
288find a solution to the issue.
289
ecd23535 290Try to think as if you were trying to help someone else; in
a79a54a0
SM
291that case, what would you need?
292
293Here is a short list of details to provide in such case:
294
295* host machine (OS/release)
296* version of Buildroot
297* target for which the build fails
298* package(s) which the build fails
299* the command that fails and its output
300* any information you think that may be relevant
301
302Additionnally, your can add the +.config+ file.
303
ecd23535
SD
304If some of these details are too large, do not hesitate to use a
305pastebin service (see http://www.similarsitesearch.com/alternatives-to/pastebin.com[]).
This page took 0.174647 seconds and 4 git commands to generate.