contribute.dox 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. /**
  15. @page contributorGuide BIND10 Contributor's Guide
  16. So you found a bug in BIND10 or developed an extension and want to
  17. send a patch? Great! This page will explain how to contribute your
  18. changes and not get disappointed in the process.
  19. Before you start working on a patch or new feature, it is a good idea
  20. to discuss it first with BIND10 developers. You can post your
  21. questions to bind10-dev
  22. (https://lists.isc.org/mailman/listinfo/bind10-dev) for general BIND10
  23. stuff or to bind10-dhcp
  24. (https://lists.isc.org/mailman/listinfo/bind10-dhcp) for DHCP specific
  25. topics. If you prefer to get faster feedback, most BIND10 developers
  26. hang out at bind10 jabber room
  27. (xmpp:bind10@conference.jabber.isc.org). Those involved in DHCP also
  28. use dhcp chatroom (xmpp:dhcp@conference.jabber.isc.org). Feel free to
  29. drop a note. It is possible that someone else is working on your
  30. specific issue or perhaps the solution you plan to implement is not
  31. the best one. Often having 10 minutes talk could save many hours of
  32. engineering work.
  33. Ok, so you have a patch? Great! Before you submit it, make sure that
  34. your code compiles. This may seem obvious, but it there's more to
  35. it. I'm sure you have checked that it compiles on your system, but
  36. BIND10 is a portable software. Besides Linux, it is being compiled on
  37. relatively uncommon systems, like OpenBSD or Solaris 11. Will your
  38. code compile there? Will it work? What about endianess? It is likely
  39. that you used regular x86, but the software is expected to run on many
  40. other architectures.
  41. Have your patch conforms to BIND10
  42. http://bind10.isc.org/wiki/CodingGuidelines? You still can submit
  43. a patch that does not adhere to it, but it will decrease your
  44. chances of being accepted. If the deviations are minor, ISC engineer
  45. that will do the review, will likely fix the issues. However,
  46. if there are lots of them, reviewer may simply reject the patch
  47. and ask you to fix it, before resubmitting.
  48. One of the ground rules in BIND10 development is that every piece of
  49. code has to be tested. We now have an extensive set of unit-tests for
  50. almost every line of code. Even if you are fixing something small,
  51. like a single line fix, it is encouraged to write unit-test for that
  52. change. That is even more true for new code. If you write a new
  53. function, method or a class, you definitely should write unit-tests
  54. for it.
  55. BIND10 uses google test (gtest) framework as a base for our
  56. unit-tests. See http://code.google.com/p/googletest/ for details.
  57. You must have gtest installed or at least compiled before compiling
  58. BIND10 unit-tests. To enable unit-tests in BIND10
  59. ./configure --with-gtest=/path/to/your/gtest/dir
  60. or
  61. ./configure --with-gtest-source=/path/to/your/gtest/dir
  62. Depending on how you compiled or installed (e.g. from sources or using
  63. some package management system) one of those two switches will find
  64. gtest. After that you make run unit-tests:
  65. make check
  66. If you happen to add new files or modified Makefiles, it is also a
  67. good idea to check if you haven't broken distribution process:
  68. make distcheck
  69. Once all those are checked and working, feel free to create a ticket
  70. for your patch (http://bind10.isc.org) or attach your patch to the
  71. existing ticket if there is one. You may drop a note to bind10 or dhcp
  72. chatroom saying that you have submitted a patch. Alternatively, you
  73. may send a note to bind10-dev or bind10-dhcp lists.
  74. Here's the tricky part. One of BIND10 developers will review your
  75. patch, but it may not happen immediately. Unfortunately, developers
  76. are usually working under tight schedule, so any extra unplanned
  77. review work sometimes make take a while. Having said that, we value
  78. external contributions very much and will do whatever we can to
  79. review patches in a timely manner. Don't get discouraged if your
  80. patch is not accepted after first review. To keep the code quality
  81. high, we use the same review processes for internal code and for
  82. external patches. It may take several cycles of review/updated patch
  83. submissions before the code is finally accepted.
  84. Once the process is almost completed, the developer will likely ask
  85. you how you would like to be credited. The typical answers are by
  86. first,last name, by nickname, by company or anonymously. Typically we
  87. will add a note to ChangeLog. If the contributted feature is big or
  88. critical for whatever reason, it may be also mentioned in release
  89. notes.
  90. */