Build system: implement REUSE with SPDX identifiers
[lttng-ust.git] / CONTRIBUTING.md
CommitLineData
e03d7c66
MJ
1<!--
2SPDX-FileCopyrightText: 2016 Philippe Proulx <pproulx@efficios.com>
3
4SPDX-License-Identifier: CC-BY-4.0
5-->
6
8f6a68ab
PP
7# LTTng-UST contributor's guide
8
9Being an open source project, the LTTng-UST project welcomes
10contributions from anyone. This guide walks you through the process
11of contributing a patch to LTTng-UST.
12
13
14## Getting the source code
15
16The LTTng-UST project uses [Git](https://git-scm.com/) for version
17control. The upstream Git repository URL is:
18
19 git://git.lttng.org/lttng-ust.git
20
21
22## Coding standard
23
24LTTng-UST uses the
eb038798 25[Linux kernel coding style](https://www.kernel.org/doc/html/latest/process/coding-style.html).
8f6a68ab
PP
26
27Although the LTTng-UST code base is primarily written in C, it does
28contain shell, Perl, and Python code as well. There is no official coding
29standard for these languages. However, using a style consistent with the
30rest of the code written in that language is strongly encouraged.
31
32
33## Creating and sending a patch
34
35LTTng-UST's development flow is primarily email-based, although we
36also accept pull requests on our
37[GitHub mirror](https://github.com/lttng/lttng-ust). If you're going
38to create GitHub pull requests, make sure you still follow the
39guidelines below.
40
41Like a lot of open source projects, patches are submitted and reviewed
42on its development mailing list,
43[`lttng-dev`](http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev)
44(`lttng-dev@lists.lttng.org`). The mailing list is also used to share
45and comment on <abbr title="Request for Comments">RFC</abbr>s and answer
46user questions.
47
48Once your changes have been committed to your local branch, you may use
49Git's [`format-patch`](https://git-scm.com/docs/git-format-patch) command
50to generate a patch file. The following command line generates a
51patch from the latest commit:
52
53 git format-patch -N1 -s --subject-prefix="PATCH lttng-ust"
54
55The custom `PATCH lttng-ust` subject prefix is mandatory when
56submitting patches that apply to the LTTng-UST project.
57
58The patch's subject (the commit message's first line) should:
59
60 * begin with an uppercase letter
61 * be written in the present tense
62 * _not_ exceed 72 characters in length
63 * _not_ end with a period
64 * be prefixed with `Fix:` if the commit fixes a bug
65
66The commit message's body should be as detailed as possible and explain
67the reasons behind the proposed change. Any related
68[bug report(s)](https://bugs.lttng.org/projects/lttng-ust/issues)
69should be mentioned at the end of the message using the `#123` format,
70where `123` is the bug number:
71
72 * Use `Refs: #123` if the patch is related to bug 123, but does not
73 fix it yet.
74 * Use `Fixes: #123` to signify that this patch fixes the bug.
75
76Make sure to **sign-off** your submitted patches (the `-s` argument to
77Git's `commit` and `format-patch` commands).
78
79Here's a complete example:
80
81~~~ text
82Fix: use this instead of that in some context
83
84Ball tip jowl beef ribs shankle, leberkas venison turducken tail pork
85chop t-bone meatball tri-tip. Tongue beef ribs corned beef ball tip
86kevin ground round sausage rump meatloaf pig meatball prosciutto
87landjaeger strip steak. Pork pork belly beef.
88
89Biltong turkey porchetta filet mignon corned beef. T-bone bresaola
90shoulder meatloaf tongue kielbasa.
91
92Fixes: #321
93Refs: #456
94Refs: #1987
95
96Signed-off-by: Jeanne Mance <jmeance@lttng.org>
97~~~
98
99Please note that patches should be **as focused as possible**. Do not,
100for instance, fix a bug and correct the indentation of an unrelated
101block of code as part of the same patch.
102
103Once you are confident your patch meets the required guidelines,
104you may use Git's [`send-email`](https://git-scm.com/docs/git-send-email)
105command to send your patch to the mailing list:
106
107 git send-email --suppress-cc=self --to lttng-dev@lists.lttng.org *.patch
108
109Make sure you are
110[subscribed](http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev)
111to the mailing list to follow and take part in discussions about your
112changes. You may join the file to an email as an attachment if you can't
113send the patch directly using <code>git&nbsp;send&#8209;email</code>.
114
115
116## Reviews
117
118Once your patch has been posted to the mailing list or as a GitHub
119pull request, other contributors may propose modifications.
120This is completely normal. This collaborative code review is an integral
121part of the open source development process in general and LTTng-UST
122makes no exception.
123
124Keep in mind that reviewing patches is a time-consuming process and,
125as such, may not be done right away. The delays may be affected by the
126current release cycle phase and the complexity of the proposed changes.
127If you think your patch might have been forgotten, please mention it on
128the [`#lttng`](irc://irc.oftc.net/lttng) IRC channel rather than
129resubmitting.
130
131
132## Release cycle
133
134The LTTng-UST project follows a release cycle that alternates between
135development and release candidate (RC) phases. The master branch is
136feature-frozen during RC phases: only bug fixes are accepted during
137this period. However, patches adding new functionality may still be
138submitted and reviewed during the RC. The upcoming features and release
139dates are posted in a monthly digest on the mailing list.
This page took 0.032004 seconds and 4 git commands to generate.