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