blob: c94cceecddc0b8e7463b44632c8632052110ab40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 7. Contributing code</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"><link rel="next" href="modules.html" title="Chapter 8. Modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Contributing code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CodingSuggestions.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="modules.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 7. Contributing code"><div class="titlepage"><div><div><h2 class="title"><a name="contributing"></a>Chapter 7. Contributing code</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div></div></div><p>Here are a few tips and notes that might be useful if you are
interested in modifying samba source code and getting it into
samba's main branch.</p><div class="variablelist"><dl><dt><span class="term">Retrieving the source</span></dt><dd><p>In order to contribute code to samba, make sure you have the
latest source. Retrieving the samba source code from CVS is
documented in the appendix of the Samba HOWTO Collection.
</p></dd><dt><span class="term">Discuss large modifications with team members</span></dt><dd><p>Please discuss large modifications you are going to make
with members of the samba team. Some parts of the samba code
have one or more 'owners' - samba developers who wrote most
of the code and maintain it.
</p><p>This way you can avoid spending your time and effort on
something that is not going to make it into the main samba branch
because someone else was working on the same thing or because your
implementation is not the correct one.
</p></dd><dt><span class="term">Patch format</span></dt><dd><p>Patches to the samba tree should be in unified diff format,
e.g. files generated by <strong class="userinput"><code>diff -u</code></strong>.
</p><p>If you are modifying a copy of samba you retrieved from CVS,
you can easily generate a diff file of these changes by running
<strong class="userinput"><code>cvs diff -u</code></strong>.</p></dd><dt><span class="term">Points of attention when modifying samba source code</span></dt><dd><p>
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Don't simply copy code from other places and modify it until it
works. Code needs to be clean and logical. Duplicate
code is to be avoided.</p></li><li class="listitem"><p>Test your patch. It might take a while before one of us looks
at your patch so it will take longer before your patch when your patch
needs to go thru the review cycle again.</p></li><li class="listitem"><p>Don't put separate patches in one large diff file. This makes
it harder to read, understand and test the patch. You might
also risk not getting a good patch committed because you mixed it
with one that had issues. </p></li><li class="listitem"><p>Make sure your patch complies to the samba coding style as
suggested in the coding-suggestions chapter. </p></li></ul></div><p>
</p></dd><dt><span class="term">Sending in bugfixes</span></dt><dd><p>Bugfixes to bugs in samba should be submitted to samba's
<a class="ulink" href="https://bugzilla.samba.org/" target="_top">bugzilla system</a>,
along with a description of the bug.
</p></dd><dt><span class="term">Sending in feature patches</span></dt><dd><p>Send feature patches along with a description of what the
patch is supposed to do to the
<a class="ulink" href="mailto:samba-technical@samba.org" target="_top">Samba-technical mailinglist</a> and possibly to a samba team member who is (one of the) 'owners'
of the code you made modifications to. We are all busy people
so everybody tends to 'let one of the others handle it'. If nobody
responded to your patch for a week, try to send it again until you
get a response from one of us.
</p></dd><dt><span class="term">Feedback on your patch</span></dt><dd><p>One of the team members will look at your patch and either
commit your patch or give comments why he won't apply it. In the
latter case you can fix your patch and re-send it until
your patch is approved.</p></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="CodingSuggestions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="modules.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Coding Suggestions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Modules</td></tr></table></div></body></html>
|