]>
Commit | Line | Data |
---|---|---|
d9fd04c2 | 1 | -*- mode: text; -*- |
2 | ||
b7a97f82 | 3 | $Id: HACKING,v 1.7 2004/07/23 16:23:56 gdt Exp $ |
d9fd04c2 | 4 | |
5 | GUIDELINES FOR HACKING ON QUAGGA | |
6 | ||
d9fd04c2 | 7 | [this is a draft in progress] |
8 | ||
9 | Generally, GNU coding standards apply. The indentation style is a bit | |
10 | different from standard GNU style, and the existing style should be | |
11 | maintained and used for new code. | |
12 | ||
2934f28e | 13 | Be particularly careful not to break platforms/protocols that you |
14 | cannot test. | |
15 | ||
16 | New code should have good comments, and changes to existing code | |
17 | should in many cases upgrade the comments when necessary for a | |
18 | reviewer to conclude that the change has no unintended consequences. | |
19 | ||
20 | CHANGELOG | |
21 | ||
22 | Add a ChangeLog entry whenever changing code, except for minor fixes | |
23 | to a commit (with a ChangeLog entry) within the last few days. | |
24 | ||
25 | There is at present a mixed style for ChangeLog, with some changes | |
26 | being described in per-directory ChangeLog files, and some at top | |
27 | level. | |
28 | ||
29 | [TBD: resolve per-dir vs top-level, perhaps by reading GNU coding | |
30 | standards] | |
31 | ||
b7a97f82 | 32 | SHARED LIBRARY VERSIONING |
33 | ||
34 | [this section is at the moment just gdt's opinion] | |
35 | ||
36 | Quagga builds several shared libaries (lib/libzebra, ospfd/libospf, | |
37 | ospfclient/libsopfapiclient). These may be used by external programs, | |
38 | e.g. a new routing protocol that works with the zebra daemon, or | |
39 | ospfapi clients. The libtool info pages (node Versioning) explain | |
40 | when major and minor version numbers should be changed. These values | |
41 | are set in Makefile.am near the definition of the library. If you | |
42 | make a change that requires changing the shared library version, | |
43 | please update Makefile.am. | |
44 | ||
45 | libospf exports far more than it should, and is needed by ospfapi | |
46 | clients. Only bump libospf for changes to functions for which it is | |
47 | reasonable for a user of ospfapi to call, and please err on the side | |
48 | of not bumping. | |
49 | ||
50 | There is no support intended for installing part of zebra. The core | |
51 | library libzebra and the included daemons should always be built and | |
52 | installed together. | |
53 | ||
d9fd04c2 | 54 | PATCH SUBMISSION |
55 | ||
85cf0a0d | 56 | * Send a clean diff against the head of CVS in unified diff format, eg by: |
57 | cvs <cvs opts> diff -uwb .... | |
d9fd04c2 | 58 | |
59 | * Include ChangeLog and NEWS entries as appropriate before the patch | |
60 | (or in it if you are 100% up to date). | |
61 | ||
62 | * Inclue only one semantic change or group of changes per patch.p | |
63 | ||
85cf0a0d | 64 | * Do not make gratuitous changes to whitespace. See the w and b arguments |
65 | to diff. | |
d9fd04c2 | 66 | |
67 | * State on which platforms and with what daemons the patch has been | |
68 | tested. Understand that if the set of testing locations is small, | |
69 | and the patch might have unforeseen or hard to fix consequences that | |
70 | there may be a call for testers on quagga-dev, and that the patch | |
71 | may be blocked until test results appear. | |
72 | ||
73 | If there are no users for a platform on quagga-dev who are able and | |
74 | willing to verify -current occasionally, that platform may be | |
75 | dropped from the "should be checked" list. | |
76 | ||
77 | PATCH APPLICATION TO CVS | |
78 | ||
79 | * Only apply patches that meet the submission guidelines. | |
80 | ||
81 | * If a patch is large (perhaps more than 100 new/changed lines), tag | |
82 | the repository before and after the change with e.g. before-foo-fix | |
83 | and after-foo-fix. | |
84 | ||
85 | * If the patch might break something, issue a call for testing on the | |
86 | mailinglist. | |
87 | ||
4134ceb7 | 88 | * Give an appropriate commit message, eg the ChangeLog entry should suffice, |
89 | if it does not, then the ChangeLog entry itself needs to be corrected. | |
90 | ||
d9fd04c2 | 91 | * By committing a patch, you are responsible for fixing problems |
92 | resulting from it (or backing it out). | |
93 | ||
94 | STABLE PLATFORMS AND DAEMONS | |
95 | ||
96 | The list of platforms that should be tested follow. This is a list | |
97 | derived from what quagga is thought to run on and for which | |
98 | maintainers can test or there are people on quagga-dev who are able | |
99 | and willing to verify that -current does or does not work correctly. | |
100 | ||
101 | BSD (Free, Net or Open, any platform) # without capabilities | |
102 | GNU/Linux (any distribution, i386) | |
103 | [future: some 64-bit machine, e.g. NetBSD/sparc64] | |
104 | [Solaris? (could address 64-bit issue)] | |
105 | ||
106 | The list of daemons that are thought to be stable and that should be | |
107 | tested are: | |
108 | ||
109 | zebra | |
110 | bgpd | |
111 | ripd | |
112 | ospfd | |
113 | ripngd | |
1f431d2d | 114 | |
9e867fe6 | 115 | IMPORT OR UPDATE VENDOR SPECIFIC ROUTING PROTOCOLS |
116 | ||
117 | The source code of Quagga is based on two vendors: | |
118 | ||
119 | zebra_org (http://www.zebra.org/) | |
120 | isisd_sf (http://isisd.sf.net/) | |
121 | ||
122 | In order to import source code, the following procedure should be used: | |
123 | ||
124 | * Tag the Current Quagga CVS repository: | |
125 | ||
126 | cvs tag import_isisd_sf_20031223 | |
127 | ||
128 | * Import the source code into the Quagga's framework. You must not modified | |
129 | this source code. It will be merged later. | |
130 | ||
131 | cd dir_isisd | |
132 | export CVSROOT=:pserver:LOGIN@anoncvs.quagga.net:/var/cvsroot | |
133 | cvs import quagga/isisd isisd_sf isisd_sf_20031223 | |
134 | ---COMMENTS--- | |
135 | Vendor: [isisd_sf] Sampo's ISISd from Sourceforge | |
136 | Tag: [isisd_sf_20031217] Current CVS release | |
137 | --- | |
138 | ||
139 | * Update your Quagga's directory: | |
140 | ||
141 | cd dir_quagga | |
142 | cvs update -dP | |
143 | ||
144 | or | |
145 | ||
146 | cvs co -d quagga_isisd quagga | |
147 | ||
148 | * Merge the code, then commit: | |
149 | ||
150 | cvs commit | |
151 |