]> git.proxmox.com Git - mirror_frr.git/blame - HACKING
(somewhat unrelated cleanups, but all are very minor)
[mirror_frr.git] / HACKING
CommitLineData
d9fd04c2 1-*- mode: text; -*-
2
b7a97f82 3$Id: HACKING,v 1.7 2004/07/23 16:23:56 gdt Exp $
d9fd04c2 4
5GUIDELINES FOR HACKING ON QUAGGA
6
d9fd04c2 7[this is a draft in progress]
8
9Generally, GNU coding standards apply. The indentation style is a bit
10different from standard GNU style, and the existing style should be
11maintained and used for new code.
12
2934f28e 13Be particularly careful not to break platforms/protocols that you
14cannot test.
15
16New code should have good comments, and changes to existing code
17should in many cases upgrade the comments when necessary for a
18reviewer to conclude that the change has no unintended consequences.
19
20CHANGELOG
21
22Add a ChangeLog entry whenever changing code, except for minor fixes
23to a commit (with a ChangeLog entry) within the last few days.
24
25There is at present a mixed style for ChangeLog, with some changes
26being described in per-directory ChangeLog files, and some at top
27level.
28
29[TBD: resolve per-dir vs top-level, perhaps by reading GNU coding
30standards]
31
b7a97f82 32SHARED LIBRARY VERSIONING
33
34[this section is at the moment just gdt's opinion]
35
36Quagga builds several shared libaries (lib/libzebra, ospfd/libospf,
37ospfclient/libsopfapiclient). These may be used by external programs,
38e.g. a new routing protocol that works with the zebra daemon, or
39ospfapi clients. The libtool info pages (node Versioning) explain
40when major and minor version numbers should be changed. These values
41are set in Makefile.am near the definition of the library. If you
42make a change that requires changing the shared library version,
43please update Makefile.am.
44
45libospf exports far more than it should, and is needed by ospfapi
46clients. Only bump libospf for changes to functions for which it is
47reasonable for a user of ospfapi to call, and please err on the side
48of not bumping.
49
50There is no support intended for installing part of zebra. The core
51library libzebra and the included daemons should always be built and
52installed together.
53
d9fd04c2 54PATCH 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
77PATCH 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
94STABLE PLATFORMS AND DAEMONS
95
96The list of platforms that should be tested follow. This is a list
97derived from what quagga is thought to run on and for which
98maintainers can test or there are people on quagga-dev who are able
99and 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
106The list of daemons that are thought to be stable and that should be
107tested are:
108
109 zebra
110 bgpd
111 ripd
112 ospfd
113 ripngd
1f431d2d 114
9e867fe6 115IMPORT OR UPDATE VENDOR SPECIFIC ROUTING PROTOCOLS
116
117The 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
122In 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