[732] | 1 | How to contribute a patch to Samba
|
---|
| 2 | ----------------------------------
|
---|
| 3 |
|
---|
| 4 | Simple, just make the code change, and email it as either a "diff -u"
|
---|
| 5 | change, or as a "git format-patch" change against the original source
|
---|
| 6 | code to samba-technical@samba.org, or attach it to a bug report at
|
---|
| 7 | http://bugzilla.samba.org
|
---|
| 8 |
|
---|
| 9 | For larger code changes, breaking the changes up into a set of simple
|
---|
| 10 | patches, each of which does a single thing, are much easier to review.
|
---|
| 11 | Patch sets like that will most likely have an easier time being merged
|
---|
| 12 | into the Samba code than large single patches that make lots of
|
---|
| 13 | changes in one large diff.
|
---|
| 14 |
|
---|
| 15 | Ownership of the contributed code
|
---|
| 16 | ---------------------------------
|
---|
| 17 |
|
---|
| 18 | Samba is a project with distributed copyright ownership, which means
|
---|
| 19 | we prefer the copyright on parts of Samba to be held by individuals
|
---|
| 20 | rather than corporations if possible. There are historical legal
|
---|
| 21 | reasons for this, but one of the best ways to explain it is that it's
|
---|
| 22 | much easier to work with individuals who have ownership than corporate
|
---|
| 23 | legal departments if we ever need to make reasonable compromises with
|
---|
| 24 | people using and working with Samba.
|
---|
| 25 |
|
---|
| 26 | We track the ownership of every part of Samba via git, our source code
|
---|
| 27 | control system, so we know the provenance of every piece of code that
|
---|
| 28 | is committed to Samba.
|
---|
| 29 |
|
---|
| 30 | So if possible, if you're doing Samba changes on behalf of a company
|
---|
| 31 | who normally owns all the work you do please get them to assign
|
---|
| 32 | personal copyright ownership of your changes to you as an individual,
|
---|
| 33 | that makes things very easy for us to work with and avoids bringing
|
---|
| 34 | corporate legal departments into the picture.
|
---|
| 35 |
|
---|
| 36 | If you can't do this we can still accept patches from you owned by
|
---|
| 37 | your employer under a standard employment contract with corporate
|
---|
| 38 | copyright ownership. It just requires a simple set-up process first.
|
---|
| 39 |
|
---|
| 40 | We use a process very similar to the way things are done in the Linux
|
---|
| 41 | kernel community, so it should be very easy to get a sign off from
|
---|
| 42 | your corporate legal department. The only changes we've made are to
|
---|
| 43 | accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)
|
---|
| 44 | whereas the Linux kernel uses GPLv2.
|
---|
| 45 |
|
---|
| 46 | The process is called signing.
|
---|
| 47 |
|
---|
| 48 | How to sign your work
|
---|
| 49 | ---------------------
|
---|
| 50 |
|
---|
| 51 | Once you have permission to contribute to Samba from
|
---|
| 52 | your employer, simply email a copy of the following text
|
---|
| 53 | from your corporate email address to contributing@samba.org
|
---|
| 54 |
|
---|
| 55 | ------------------------------------------------------------
|
---|
| 56 | Samba Developer's Certificate of Origin. Version 1.0
|
---|
| 57 |
|
---|
| 58 | By making a contribution to this project, I certify that:
|
---|
| 59 |
|
---|
| 60 | (a) The contribution was created in whole or in part by me and I
|
---|
| 61 | have the right to submit it under the appropriate
|
---|
| 62 | version of the GNU General Public License; or
|
---|
| 63 |
|
---|
| 64 | (b) The contribution is based upon previous work that, to the best
|
---|
| 65 | of my knowledge, is covered under an appropriate open source
|
---|
| 66 | license and I have the right under that license to submit that
|
---|
| 67 | work with modifications, whether created in whole or in part
|
---|
| 68 | by me, under the GNU General Public License, in the
|
---|
| 69 | appropriate version; or
|
---|
| 70 |
|
---|
| 71 | (c) The contribution was provided directly to me by some other
|
---|
| 72 | person who certified (a) or (b) and I have not modified
|
---|
| 73 | it.
|
---|
| 74 |
|
---|
| 75 | (d) I understand and agree that this project and the
|
---|
| 76 | contribution are public and that a record of the
|
---|
| 77 | contribution (including all metadata and personal
|
---|
| 78 | information I submit with it, including my sign-off) is
|
---|
| 79 | maintained indefinitely and may be redistributed
|
---|
| 80 | consistent with the Samba Team's policies and the
|
---|
| 81 | requirements of the GNU GPL where they are relevant.
|
---|
| 82 |
|
---|
| 83 | (e) I am granting this work to this project under the terms of both
|
---|
| 84 | the GNU General Public License and the GNU Lesser General Public
|
---|
| 85 | License as published by the Free Software Foundation; either version
|
---|
| 86 | 3 of these Licenses, or (at the option of the project) any later
|
---|
| 87 | version.
|
---|
| 88 |
|
---|
| 89 | http://www.gnu.org/licenses/gpl-3.0.html
|
---|
| 90 | http://www.gnu.org/licenses/lgpl-3.0.html
|
---|
| 91 | ------------------------------------------------------------
|
---|
| 92 |
|
---|
| 93 | We will maintain a copy of that email as a record that you have the
|
---|
| 94 | rights to contribute code to Samba under the required licenses whilst
|
---|
| 95 | working for the company where the email came from.
|
---|
| 96 |
|
---|
| 97 | Then when sending in a patch via the normal mechanisms described
|
---|
| 98 | above, add a line that states:
|
---|
| 99 |
|
---|
| 100 | Signed-off-by: Random J Developer <random@developer.example.org>
|
---|
| 101 |
|
---|
| 102 | using your real name and the email address you sent the original email
|
---|
| 103 | you used to send the Samba Developer's Certificate of Origin to us
|
---|
| 104 | (sorry, no pseudonyms or anonymous contributions.)
|
---|
| 105 |
|
---|
| 106 | That's it ! Such code can then quite happily contain changes that have
|
---|
| 107 | copyright messages such as :
|
---|
| 108 |
|
---|
| 109 | (C) Example Corporation.
|
---|
| 110 |
|
---|
| 111 | and can be merged into the Samba codebase in the same way as patches
|
---|
| 112 | from any other individual. You don't need to send in a copy of the
|
---|
| 113 | Samba Developer's Certificate of Origin for each patch, or inside each
|
---|
| 114 | patch. Just the sign-off message is all that is required once we've
|
---|
| 115 | received the initial email.
|
---|
| 116 |
|
---|
| 117 | Have fun and happy Samba hacking !
|
---|
| 118 |
|
---|
| 119 | The Samba Team.
|
---|
| 120 |
|
---|