README 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. This is the source for a pre-alpha version of BIND 10.
  2. BUILDING
  3. Simple build instructions:
  4. autoreconf --install
  5. ./configure
  6. make
  7. Requires autoconf 2.59 or newer.
  8. Use automake-1.11 or better for working Python 3.1 tests.
  9. Alternatively, you could manually specify an absolute path to python
  10. executable by the --with-pythonpath option of the configure script,
  11. e.g.,
  12. % ./configure --with-pythonpath=/usr/local/bin/python3.1
  13. Operating-System specific tips:
  14. - FreeBSD
  15. You may need to install a python binding for sqlite3 by hand. A
  16. sample procedure is as follows:
  17. - add the following to /etc/make.conf
  18. PYTHON_VERSION=3.1
  19. - build and install the python binding from ports, assuming the top
  20. directory of the ports system is /usr/ports
  21. % cd /usr/ports/databases/py-sqlite3/
  22. % make
  23. % sudo make install
  24. INSTALLATION
  25. Install with:
  26. make install
  27. Testing samples of a RSA key, certificate, and user account
  28. are installed under the $PREFIX/share/bind10/ directory.
  29. cmdctl-accounts.csv
  30. cmdctl-keyfile.pem
  31. cmdctl-certfile.pem
  32. Copy them to your $sysconfdir/bind10/ directory for testing.
  33. Or create your own.
  34. TODO: show how
  35. TEST COVERAGE
  36. Doing code coverage tests:
  37. make coverage
  38. Does the following:
  39. make clean-coverage
  40. Zeroes the lcov code coverage counters and removes the coverage HTML.
  41. make perform-coverage
  42. Runs the C++ tests (using googletests framework).
  43. make report-coverage
  44. Generates the coverage HTML, excluding some unrelated headers.
  45. The HTML reports are placed in a directory called coverage/.
  46. DEVELOPERS
  47. The generated run_*.sh scripts available in the src/bin directories
  48. are for running the code using the source tree.
  49. RUNNING
  50. You can start the BIND 10 processes by running bind10 which is
  51. installed to the sbin directory under the installation prefix.
  52. The default location is:
  53. /usr/local/sbin/bind10
  54. For development work, you can also run the bind10 services from the
  55. source tree:
  56. ./src/bin/bind10/run_bind10.sh
  57. (Which will use the modules and configurations also from the source
  58. tree.)
  59. The server will listen on port 5300 for DNS requests.
  60. CONFIGURATION
  61. Commands can be given through the bindctl tool.
  62. The server must be running for bindctl to work.
  63. The following configuration commands are available
  64. help: show the different command modules
  65. <module> help: show the commands for module
  66. <module> <command> help: show info for the command
  67. config show [identifier]: Show the currently set values. If no identifier is
  68. given, the current location is used. If a config
  69. option is a list or a map, the value is not
  70. shown directly, but must be requested separately.
  71. config go [identifier]: Go to the given location within the configuration.
  72. config set [identifier] <value>: Set a configuration value.
  73. config unset [identifier]: Remove a value (reverts to default if the option
  74. is mandatory).
  75. config add [identifier] <value>: add a value to a list
  76. config remove [identifier] <value>: remove a value from a list
  77. config revert: Revert all changes that have not been committed
  78. config commit: Commit all changes
  79. config diff: Show the changes that have not been committed yet
  80. EXAMPLE SESSION
  81. ~> bindctl
  82. ["login success "] login as root
  83. > help
  84. BindCtl, verstion 0.1
  85. usage: <module name> <command name> [param1 = value1 [, param2 = value2]]
  86. Type Tab character to get the hint of module/command/paramters.
  87. Type "help(? h)" for help on bindctl.
  88. Type "<module_name> help" for help on the specific module.
  89. Type "<module_name> <command_name> help" for help on the specific command.
  90. Available module names:
  91. help Get help for bindctl
  92. config Configuration commands
  93. Xfrin same here
  94. Auth same here
  95. Boss same here
  96. > config help
  97. Module config Configuration commands
  98. Available commands:
  99. help (Get help for module)
  100. show (Show configuration)
  101. add (Add entry to configuration list)
  102. remove (Remove entry from configuration list)
  103. set (Set a configuration value)
  104. unset (Unset a configuration value)
  105. diff (Show all local changes)
  106. revert (Revert all local changes)
  107. commit (Commit all local changes)
  108. go (Go to a specific configuration part)
  109. > config show
  110. Xfrin/ module
  111. Auth/ module
  112. Boss/ module
  113. > config show Xfrin
  114. transfers_in: 10 integer
  115. > config go Auth
  116. /Auth> config show
  117. database_file: None string
  118. /Auth> config set database_file /tmp/bind10_zones.db
  119. /Auth> config commit
  120. /Auth> config go /
  121. > config show Auth/
  122. database_file: /tmp/bind10_zones.db string
  123. > config diff
  124. {}
  125. > config set Auth/foobar
  126. Error: missing identifier or value
  127. > config set Auth/database_file foobar
  128. > config diff
  129. {'Auth': {'database_file': 'foobar'}}
  130. > config revert
  131. > config diff
  132. {}
  133. > quit