gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 1 | -*- mode: text; -*- |
| 2 | |
paul | 85cf0a0 | 2004-01-09 16:34:54 +0000 | [diff] [blame] | 3 | $Id: HACKING,v 1.5 2004/01/09 16:34:54 paul Exp $ |
gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 4 | |
| 5 | GUIDELINES FOR HACKING ON QUAGGA |
| 6 | |
gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 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 | |
gdt | 2934f28 | 2004-01-05 20:09:00 +0000 | [diff] [blame] | 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 | |
gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 32 | PATCH SUBMISSION |
| 33 | |
paul | 85cf0a0 | 2004-01-09 16:34:54 +0000 | [diff] [blame] | 34 | * Send a clean diff against the head of CVS in unified diff format, eg by: |
| 35 | cvs <cvs opts> diff -uwb .... |
gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 36 | |
| 37 | * Include ChangeLog and NEWS entries as appropriate before the patch |
| 38 | (or in it if you are 100% up to date). |
| 39 | |
| 40 | * Inclue only one semantic change or group of changes per patch.p |
| 41 | |
paul | 85cf0a0 | 2004-01-09 16:34:54 +0000 | [diff] [blame] | 42 | * Do not make gratuitous changes to whitespace. See the w and b arguments |
| 43 | to diff. |
gdt | d9fd04c | 2003-12-19 19:20:25 +0000 | [diff] [blame] | 44 | |
| 45 | * State on which platforms and with what daemons the patch has been |
| 46 | tested. Understand that if the set of testing locations is small, |
| 47 | and the patch might have unforeseen or hard to fix consequences that |
| 48 | there may be a call for testers on quagga-dev, and that the patch |
| 49 | may be blocked until test results appear. |
| 50 | |
| 51 | If there are no users for a platform on quagga-dev who are able and |
| 52 | willing to verify -current occasionally, that platform may be |
| 53 | dropped from the "should be checked" list. |
| 54 | |
| 55 | PATCH APPLICATION TO CVS |
| 56 | |
| 57 | * Only apply patches that meet the submission guidelines. |
| 58 | |
| 59 | * If a patch is large (perhaps more than 100 new/changed lines), tag |
| 60 | the repository before and after the change with e.g. before-foo-fix |
| 61 | and after-foo-fix. |
| 62 | |
| 63 | * If the patch might break something, issue a call for testing on the |
| 64 | mailinglist. |
| 65 | |
| 66 | * By committing a patch, you are responsible for fixing problems |
| 67 | resulting from it (or backing it out). |
| 68 | |
| 69 | STABLE PLATFORMS AND DAEMONS |
| 70 | |
| 71 | The list of platforms that should be tested follow. This is a list |
| 72 | derived from what quagga is thought to run on and for which |
| 73 | maintainers can test or there are people on quagga-dev who are able |
| 74 | and willing to verify that -current does or does not work correctly. |
| 75 | |
| 76 | BSD (Free, Net or Open, any platform) # without capabilities |
| 77 | GNU/Linux (any distribution, i386) |
| 78 | [future: some 64-bit machine, e.g. NetBSD/sparc64] |
| 79 | [Solaris? (could address 64-bit issue)] |
| 80 | |
| 81 | The list of daemons that are thought to be stable and that should be |
| 82 | tested are: |
| 83 | |
| 84 | zebra |
| 85 | bgpd |
| 86 | ripd |
| 87 | ospfd |
| 88 | ripngd |
gdt | 1f431d2 | 2003-12-22 15:45:01 +0000 | [diff] [blame] | 89 | |
jardin | 9e867fe | 2003-12-23 08:56:18 +0000 | [diff] [blame] | 90 | IMPORT OR UPDATE VENDOR SPECIFIC ROUTING PROTOCOLS |
| 91 | |
| 92 | The source code of Quagga is based on two vendors: |
| 93 | |
| 94 | zebra_org (http://www.zebra.org/) |
| 95 | isisd_sf (http://isisd.sf.net/) |
| 96 | |
| 97 | In order to import source code, the following procedure should be used: |
| 98 | |
| 99 | * Tag the Current Quagga CVS repository: |
| 100 | |
| 101 | cvs tag import_isisd_sf_20031223 |
| 102 | |
| 103 | * Import the source code into the Quagga's framework. You must not modified |
| 104 | this source code. It will be merged later. |
| 105 | |
| 106 | cd dir_isisd |
| 107 | export CVSROOT=:pserver:LOGIN@anoncvs.quagga.net:/var/cvsroot |
| 108 | cvs import quagga/isisd isisd_sf isisd_sf_20031223 |
| 109 | ---COMMENTS--- |
| 110 | Vendor: [isisd_sf] Sampo's ISISd from Sourceforge |
| 111 | Tag: [isisd_sf_20031217] Current CVS release |
| 112 | --- |
| 113 | |
| 114 | * Update your Quagga's directory: |
| 115 | |
| 116 | cd dir_quagga |
| 117 | cvs update -dP |
| 118 | |
| 119 | or |
| 120 | |
| 121 | cvs co -d quagga_isisd quagga |
| 122 | |
| 123 | * Merge the code, then commit: |
| 124 | |
| 125 | cvs commit |
| 126 | |