1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7 <chapter id="contributing">
12 <title>Contributing code</title>
14 <para>Here are a few tips and notes that might be useful if you are
15 interested in modifying samba source code and getting it into
16 samba's main branch.</para>
20 <term>Retrieving the source</term>
23 <para>In order to contribute code to samba, make sure you have the
24 latest source. Retrieving the samba source code from CVS is
25 documented in the appendix of the Samba HOWTO Collection.
31 <term>Discuss large modifications with team members</term>
33 <para>Please discuss large modifications you are going to make
34 with members of the samba team. Some parts of the samba code
35 have one or more 'owners' - samba developers who wrote most
36 of the code and maintain it.
39 <para>This way you can avoid spending your time and effort on
40 something that is not going to make it into the main samba branch
41 because someone else was working on the same thing or because your
42 implementation is not the correct one.
48 <term>Patch format</term>
50 <para>Patches to the samba tree should be in unified diff format,
51 e.g. files generated by <userinput>diff -u</userinput>.
54 <para>If you are modifying a copy of samba you retrieved from CVS,
55 you can easily generate a diff file of these changes by running
56 <userinput>cvs diff -u</userinput>.</para>
61 <term>Points of attention when modifying samba source code</term>
64 <listitem><para>Don't simply copy code from other places and modify it until it
65 works. Code needs to be clean and logical. Duplicate
66 code is to be avoided.</para></listitem>
67 <listitem><para>Test your patch. It might take a while before one of us looks
68 at your patch so it will take longer before your patch when your patch
69 needs to go thru the review cycle again.</para></listitem>
70 <listitem><para>Don't put seperate patches in one large diff file. This makes
71 it harder to read, understand and test the patch. You might
72 also risk not getting a good patch committed because you mixed it
73 with one that had issues. </para></listitem>
74 <listitem><para>Make sure your patch complies to the samba coding style as
75 suggested in the coding-suggestions chapter. </para></listitem>
82 <term>Sending in bugfixes</term>
84 <para>Bugfixes to bugs in samba should be submitted to samba's
85 <ulink url="https://bugzilla.samba.org/">bugzilla system</ulink>,
86 along with a description of the bug.
92 <term>Sending in feature patches</term>
94 <para>Send feature patches along with a description of what the
95 patch is supposed to do to the
96 <ulink url="mailto:samba-technical@samba.org">Samba-technical mailinglist</ulink> and possibly to a samba team member who is (one of the) 'owners'
97 of the code you made modifications to. We are all busy people
98 so everybody tends to 'let one of the others handle it'. If nobody
99 responded to your patch for a week, try to send it again until you
100 get a response from one of us.
105 <term>Feedback on your patch</term>
107 <para>One of the team members will look at your patch and either
108 commit your patch or give comments why he won't apply it. In the
109 latter case you can fix your patch and re-send it until
110 your patch is approved.</para>