xref: /netbsd-src/external/bsd/ppp/dist/Submitting-patches.md (revision fa6d9a53072feb7f37eba19369d451c74fda3fca)
1*fa6d9a53SchristosHow to contribute patches to the PPP project.
2*fa6d9a53Schristos=============================================
3*fa6d9a53Schristos
4*fa6d9a53SchristosThe PPP project source code is maintained in a Git repository, which
5*fa6d9a53Schristosis publicly available at
6*fa6d9a53Schristos
7*fa6d9a53Schristosgit://git.ozlabs.org/~paulus/ppp.git
8*fa6d9a53Schristos
9*fa6d9a53Schristosand
10*fa6d9a53Schristos
11*fa6d9a53Schristoshttps://github.com/paulusmack/ppp.git
12*fa6d9a53Schristos
13*fa6d9a53SchristosThe linux-ppp@vger.kernel.org mailing list is a suitable place to
14*fa6d9a53Schristosdiscuss issues relating to the PPP code and to post patches.
15*fa6d9a53Schristos
16*fa6d9a53SchristosAlthough there is a copy of the repository on github.com, the PPP
17*fa6d9a53Schristosproject is not a "github project", in the sense that the development
18*fa6d9a53Schristosof the code does not depend on github infrastructure.  In particular,
19*fa6d9a53Schristospatch descriptions should be understandable without reference to any
20*fa6d9a53Schristosgithub.com web page.  Thus, patches or commits whose description
21*fa6d9a53Schristosconsists only of something like "Closes #123" will be rejected.  See
22*fa6d9a53Schristosbelow for the minimum standards for patch descriptions.
23*fa6d9a53Schristos
24*fa6d9a53SchristosThere are two ways in which patches can be submitted for review:
25*fa6d9a53Schristos
26*fa6d9a53Schristos1. Post the patch on the linux-ppp@vger.kernel.org mailing list.  This
27*fa6d9a53Schristos   is my preferred way to receive patches, because it provides more
28*fa6d9a53Schristos   opportunity for other interested people to review the patches.
29*fa6d9a53Schristos
30*fa6d9a53Schristos2. Create a pull request on github.com.  However, please don't make
31*fa6d9a53Schristos   the mistake of creating a commit with a minimal commit message and
32*fa6d9a53Schristos   then explaining the rationale for the change in the pull request.
33*fa6d9a53Schristos   Put the rationale in the commit message.
34*fa6d9a53Schristos
35*fa6d9a53SchristosRequirements for patch/commit description
36*fa6d9a53Schristos-----------------------------------------
37*fa6d9a53Schristos
38*fa6d9a53SchristosThe description on a patch, which becomes the commit message in the
39*fa6d9a53Schristosresulting commit, should describe the reason why the change is being
40*fa6d9a53Schristosmade.  If it fixes a bug, it should describe the bug in enough detail
41*fa6d9a53Schristosfor the reader to understand why and how the change being made fixes
42*fa6d9a53Schristosthe bug.  If it adds a feature, it should describe the feature and how
43*fa6d9a53Schristosit might be used and why it would be desirable to have the feature.
44*fa6d9a53Schristos
45*fa6d9a53SchristosNormally the patch description should be a few paragraphs in length --
46*fa6d9a53Schristosit can be longer for a really subtle bug or complex feature, or
47*fa6d9a53Schristosshorter for obvious or trivial changes such as fixing spelling
48*fa6d9a53Schristosmistakes.
49*fa6d9a53Schristos
50*fa6d9a53SchristosThe first line of the commit message is the "headline", corresponding
51*fa6d9a53Schristosto the subject line of an emailed patch.  If the patch is concerned
52*fa6d9a53Schristoswith one particular area of the package, it is helpful to put that at
53*fa6d9a53Schristosthe beginning, followed by a colon (':'), for example, "pppd: Fix bug
54*fa6d9a53Schristosin vslprintf".  The remainder of the headline should be a sentence and
55*fa6d9a53Schristosshould start with a capital letter.
56*fa6d9a53Schristos
57*fa6d9a53SchristosNote that as maintainer I will edit the headline or the commit message
58*fa6d9a53Schristosif necessary to make it clearer or to fix spelling or grammatical
59*fa6d9a53Schristoserrors.  For a github pull request I may cherry-pick the commits and
60*fa6d9a53Schristosmodify their commit messages.
61*fa6d9a53Schristos
62*fa6d9a53SchristosReferences to information on web sites are permitted provided that the
63*fa6d9a53Schristosfull URL is given, and that reference to the web site is not essential
64*fa6d9a53Schristosfor understanding the change being made.  For example, you can refer
65*fa6d9a53Schristosto a github issue provided that you also put the essential details of
66*fa6d9a53Schristosthe issue in the commit message, and put the full URL for the issue,
67*fa6d9a53Schristosnot just the issue number.
68*fa6d9a53Schristos
69*fa6d9a53SchristosSignoff
70*fa6d9a53Schristos-------
71*fa6d9a53Schristos
72*fa6d9a53SchristosIn order to forestall possible (though unlikely) future legal
73*fa6d9a53Schristosproblems, this project requires a "Signed-off-by" line on all
74*fa6d9a53Schristosnon-trivial patches, with a real name (not just initials, and no
75*fa6d9a53Schristospseudonyms).  Signing off indicates that you certify that your patch
76*fa6d9a53Schristosmeets the 'Developer's Certificate of Origin' below (taken from the
77*fa6d9a53SchristosDCO 1.1 in the Linux kernel source tree).
78*fa6d9a53Schristos
79*fa6d9a53SchristosDeveloper's Certificate of Origin
80*fa6d9a53Schristos---------------------------------
81*fa6d9a53Schristos
82*fa6d9a53SchristosBy making a contribution to this project, I certify that:
83*fa6d9a53Schristos
84*fa6d9a53Schristos (a) The contribution was created in whole or in part by me and I
85*fa6d9a53Schristos     have the right to submit it under the open source license
86*fa6d9a53Schristos     indicated in the file; or
87*fa6d9a53Schristos
88*fa6d9a53Schristos (b) The contribution is based upon previous work that, to the best
89*fa6d9a53Schristos     of my knowledge, is covered under an appropriate open source
90*fa6d9a53Schristos     license and I have the right under that license to submit that
91*fa6d9a53Schristos     work with modifications, whether created in whole or in part
92*fa6d9a53Schristos     by me, under the same open source license (unless I am
93*fa6d9a53Schristos     permitted to submit under a different license), as indicated
94*fa6d9a53Schristos     in the file; or
95*fa6d9a53Schristos
96*fa6d9a53Schristos (c) The contribution was provided directly to me by some other
97*fa6d9a53Schristos     person who certified (a), (b) or (c) and I have not modified
98*fa6d9a53Schristos     it.
99*fa6d9a53Schristos
100*fa6d9a53Schristos (d) I understand and agree that this project and the contribution
101*fa6d9a53Schristos     are public and that a record of the contribution (including all
102*fa6d9a53Schristos     personal information I submit with it, including my sign-off) is
103*fa6d9a53Schristos     maintained indefinitely and may be redistributed consistent with
104*fa6d9a53Schristos     this project or the open source license(s) involved.
105*fa6d9a53Schristos
106