This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[sfrench/samba-autobuild/.git] / docs / docbook / devdoc / contributing.xml
1 <chapter id="contributing">
2 <chapterinfo>
3         &author.jelmer;
4 </chapterinfo>
5
6 <title>Contributing code</title>
7
8 <para>Here are a few tips and notes that might be useful if you are 
9         interested in modifying samba source code and getting it into 
10         samba's main branch.</para>
11
12 <variablelist>
13         <varlistentry>
14                 <term>Retrieving the source</term>
15
16                 <listitem>
17                 <para>In order to contribute code to samba, make sure you have the 
18                         latest source. Retrieving the samba source code from CVS is 
19                         documented in the appendix of the Samba HOWTO Collection.
20                 </para>
21                 </listitem>
22         </varlistentry>
23
24         <varlistentry>
25                 <term>Discuss large modifications with team members</term>
26                 <listitem>
27                 <para>Please discuss large modifications you are going to make 
28                 with members of the samba team. Some parts of the samba code 
29                 have one or more 'owners' - samba developers who wrote most 
30                 of the code and maintain it. 
31                 </para>
32
33                 <para>This way you can avoid spending your time and effort on 
34                 something that is not going to make it into the main samba branch 
35                 because someone else was working on the same thing or because your 
36                 implementation is not the correct one.
37                 </para>
38         </varlistentry>
39
40         <varlistentry>
41                 <term>Patch format</term>
42                 <listitem>
43                 <para>Patches to the samba tree should be in unified diff format, 
44                         e.g. files generated by <userinput>diff -u</userinput>. 
45                 </para>
46
47                 <para>If you are modifying a copy of samba you retrieved from CVS, 
48                 you can easily generate a diff file of these changes by running 
49                 <userinput>cvs diff -u</userinput>.</para>                      
50                 </listitem>
51         </varlistentry>
52
53         <varlistentry>
54                 <term>Points of attention when modifying samba source code</term>
55                 <listitem><para>
56                 <simplelist>
57                 <member>Don't simply copy code from other places and modify it until it
58                 works. Code needs to be clean and logical. Duplicate 
59                 code is to be avoided.</member>
60                 <member>Test your patch. It might take a while before one of us looks 
61                 at your patch so it will take longer before your patch when your patch 
62                 needs to go thru the review cycle again.</member>
63                 <member>Don't put seperate patches in one large diff file. This makes 
64                 it harder to read, understand and test the patch. You might 
65                 also risk not getting a good patch committed because you mixed it 
66                 with one that had issues. </member>
67                 <member>Make sure your patch complies to the samba coding style as 
68                 suggested in the coding-suggestions chapter. </member>
69                 </simplelist>
70         </varlistentry>
71
72         <varlistentry>
73                 <term>Sending in bugfixes</term>
74                 <listitem>
75                 <para>Bugfixes to bugs in samba should be submitted to samba's
76                 <ulink url="https://bugzilla.samba.org/">bugzilla system</ulink>, 
77                 along with a description of the bug.
78                 </para>
79                 </listitem>
80         </varlistentry>
81
82         <varlistentry>
83                 <term>Sending in feature patches</term>
84                 <listitem>
85                 <para>Send feature patches along with a description of what the 
86                 patch is supposed to do to the 
87                 <ulink url="mailto:samba-technical@samba.org">Samba-technical mailinglist</ulink> and possibly to a samba team member who is (one of the) 'owners'
88                 of the code you made modifications to. We are all busy people 
89                 so everybody tends to 'let one of the others handle it'. If nobody 
90                 responded to your patch for a week, try to send it again until you 
91                 get a response from one of us.
92                 </para></listitem>
93         </varlistentry>
94
95         <varlistentry>
96                 <term>Feedback on your patch</term>
97                 <listitem>
98                 <para>One of the team members will look at your patch and either 
99                 commit your patch or give comments why he won't apply it. In the 
100                 latter case you can fix your patch and re-send it until 
101                 your patch is approved.</para>
102                 </listitem>
103         </varlistentry>
104 </variablelist>
105
106 </chapter>