xref: /aosp_15_r20/external/boringssl/src/CONTRIBUTING.md (revision 8fb009dc861624b67b6cdb62ea21f0f22d0c584b)
1*8fb009dcSAndroid Build Coastguard WorkerWant to contribute? Great! First, read this page (including the small print at the end).
2*8fb009dcSAndroid Build Coastguard Worker
3*8fb009dcSAndroid Build Coastguard Worker### Before you contribute
4*8fb009dcSAndroid Build Coastguard WorkerBefore we can use your code, you must sign the
5*8fb009dcSAndroid Build Coastguard Worker[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual)
6*8fb009dcSAndroid Build Coastguard Worker(CLA), which you can do online. The CLA is necessary mainly because you own the
7*8fb009dcSAndroid Build Coastguard Workercopyright to your changes, even after your contribution becomes part of our
8*8fb009dcSAndroid Build Coastguard Workercodebase, so we need your permission to use and distribute your code. We also
9*8fb009dcSAndroid Build Coastguard Workerneed to be sure of various other things—for instance that you'll tell us if you
10*8fb009dcSAndroid Build Coastguard Workerknow that your code infringes on other people's patents. You don't have to sign
11*8fb009dcSAndroid Build Coastguard Workerthe CLA until after you've submitted your code for review and a member has
12*8fb009dcSAndroid Build Coastguard Workerapproved it, but you must do it before we can put your code into our codebase.
13*8fb009dcSAndroid Build Coastguard WorkerBefore you start working on a larger contribution, you should get in touch with
14*8fb009dcSAndroid Build Coastguard Workerus first via email with your idea so that we can help out and possibly guide
15*8fb009dcSAndroid Build Coastguard Workeryou. Coordinating up front makes it much easier to avoid frustration later on.
16*8fb009dcSAndroid Build Coastguard Worker
17*8fb009dcSAndroid Build Coastguard Worker### Code reviews
18*8fb009dcSAndroid Build Coastguard WorkerAll submissions, including submissions by project members, require review. We
19*8fb009dcSAndroid Build Coastguard Workeruse [Gerrit](https://boringssl-review.googlesource.com) for this purpose.
20*8fb009dcSAndroid Build Coastguard Worker
21*8fb009dcSAndroid Build Coastguard Worker#### Setup
22*8fb009dcSAndroid Build Coastguard WorkerIf you have not done so on this machine, you will need to set up a password for
23*8fb009dcSAndroid Build Coastguard WorkerGerrit. Sign in with a Google account, visit
24*8fb009dcSAndroid Build Coastguard Worker[this link](https://boringssl.googlesource.com/), and click the "Generate
25*8fb009dcSAndroid Build Coastguard WorkerPassword" link in the top right. You must also have a Gerrit account associated with
26*8fb009dcSAndroid Build Coastguard Workeryour Google account.  To do this visit the [Gerrit review server](https://boringssl-review.googlesource.com)
27*8fb009dcSAndroid Build Coastguard Workerand click "Sign in" (top right).
28*8fb009dcSAndroid Build Coastguard WorkerYou will also need to prepare your checkout to
29*8fb009dcSAndroid Build Coastguard Worker[add Change-Ids](https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html)
30*8fb009dcSAndroid Build Coastguard Workeron commit. Run:
31*8fb009dcSAndroid Build Coastguard Worker
32*8fb009dcSAndroid Build Coastguard Worker    curl -Lo .git/hooks/commit-msg https://boringssl-review.googlesource.com/tools/hooks/commit-msg
33*8fb009dcSAndroid Build Coastguard Worker    chmod u+x .git/hooks/commit-msg
34*8fb009dcSAndroid Build Coastguard Worker
35*8fb009dcSAndroid Build Coastguard Worker#### Uploading changes
36*8fb009dcSAndroid Build Coastguard WorkerTo upload a change, push it to the special `refs/for/master` target:
37*8fb009dcSAndroid Build Coastguard Worker
38*8fb009dcSAndroid Build Coastguard Worker    git push origin HEAD:refs/for/master
39*8fb009dcSAndroid Build Coastguard Worker
40*8fb009dcSAndroid Build Coastguard WorkerThe output will then give you a link to the change. Add `[email protected]`,
41*8fb009dcSAndroid Build Coastguard Worker`[email protected]`, and `[email protected]` as reviewers.
42*8fb009dcSAndroid Build Coastguard Worker
43*8fb009dcSAndroid Build Coastguard WorkerPushing a commit with the same Change-Id as an existing change will upload a new
44*8fb009dcSAndroid Build Coastguard Workerversion of it. (Use the `git rebase` or `git commit --amend` commands.)
45*8fb009dcSAndroid Build Coastguard Worker
46*8fb009dcSAndroid Build Coastguard WorkerFor more detailed instructions, see the
47*8fb009dcSAndroid Build Coastguard Worker[Gerrit User Guide](https://gerrit-review.googlesource.com/Documentation/intro-user.html).
48*8fb009dcSAndroid Build Coastguard Worker
49*8fb009dcSAndroid Build Coastguard Worker### The small print
50*8fb009dcSAndroid Build Coastguard WorkerContributions made by corporations are covered by a different agreement than
51*8fb009dcSAndroid Build Coastguard Workerthe one above, the
52*8fb009dcSAndroid Build Coastguard Worker[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate).
53