Skip to content

Commit 6022284

Browse files
committed
[#3732] Address review
1 parent 80fc384 commit 6022284

38 files changed

+119
-350
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ such long periods, code tends to be refactored several times. The change you mad
191191
some other change or by the code that hasn't been written yet.
192192

193193
See Building Kea with Unit Tests for instructions on how to run unit-tests. If you happen to touch
194-
any database related code, make sure you compile your code with `Dmysql` and/or `Dpostgresql` as
194+
any database related code, make sure you compile your code with `D mysql=enabled` and/or `D postgresql=enabled` as
195195
needed. For example, if you change something substantial, make sure the other compilation options
196196
still work.
197197

@@ -200,7 +200,7 @@ various additional consistency checks that reduce performance but help during de
200200

201201
If you are modifying DHCP code, you are likely to be interested in enabling a non-default database backends for DHCP.
202202
Note that if the backend is not enabled, the database-specific unit-tests are skipped. To
203-
enable the MySQL backend, use the switch `-Dmysql`; for PostgreSQL, use `Dpostgresql`.
203+
enable the MySQL backend, use the switch `-D mysql=enabled`; for PostgreSQL, use `D postgresql=enabled`.
204204
A complete list of all switches can be obtained with the command:
205205

206206
```bash

INSTALL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ PostgreSQL), you will need to specify these as options to the command (run
77

88
$ meson setup build
99

10-
If your environment is missing dependencies, the configure script will exit
10+
If your environment is missing dependencies, the command will exit
1111
with error and should emit sufficient information to guide you on how to
12-
proceed. A detailed account of the configure process is captured in
12+
proceed. A detailed account of the setup process is captured in
1313
build/meson-logs/meson-log.txt.
1414

1515
2. Build it. Once you've successfully set up the build, run "meson compile" to

doc/devel/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ EXTRA_DIST += changelog.dox
55
EXTRA_DIST += config-backend.dox
66
EXTRA_DIST += congestion-handling.dox
77
EXTRA_DIST += contribute.dox
8-
EXTRA_DIST += cross-compile.dox
98
EXTRA_DIST += debug.dox
109
EXTRA_DIST += doc.dox
1110
EXTRA_DIST += fuzz.dox

doc/devel/cross-compile.dox

Lines changed: 0 additions & 228 deletions
This file was deleted.

doc/devel/doc.dox

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
There are several types of documentation for Kea. The primary one, intended to
1212
be read by users, is User's Guide. It comes in HTML, PDF and txt format. All
13-
of them generated from the same sources. To generate this doc, you need to
14-
run configure script with --enable-generate-docs option. sphinx and
13+
of them generated from the same sources. To generate the documentation, sphinx and
1514
sphinx_rtd_theme have to be available on the system. texlive is also required
1615
if you want to create documentation in HTML format.
1716
You can generate this by doing:

doc/devel/fuzz.dox

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Combining the binaries and the fuzzer types results in eight fuzzing binaries:
4646

4747
@subsection HowToBuild How to Build the LLVM Fuzzer
4848

49-
Use the "--enable-fuzzing" during the configure step. Then just compile as usual.
49+
Use the "-D fuzz=enabled" during the meson setup step. Then just compile as usual.
5050

5151
@code
5252
meson setup build -D fuzz=enabled
@@ -171,7 +171,7 @@ for this are:
171171
compiler.
172172
- Specify a value of "--prefix" on the command line to set the directory
173173
into which Kea is installed.
174-
- Add the "-Dfuzz=enabled" switch to the "meson setup" command line.
174+
- Add the "-D fuzz=enabled" switch to the "meson setup" command line.
175175
.
176176
For example:
177177
@code
@@ -327,7 +327,7 @@ while (not shutting down) {
327327
Read and process one packet
328328
}
329329
@endcode
330-
When -Dfuzz=enabled is specified, this is conceptually modified to:
330+
When -D fuzz=enabled is specified, this is conceptually modified to:
331331
@code{.unparsed}
332332
while (not shutting down) {
333333
Read stdin and copy data to address/port on which Kea is listening
@@ -374,7 +374,7 @@ leaks).
374374
No changes were required to Kea source code to fuzz configuration files. In
375375
fact, other than compiling with afl-clang++ and installing the resultant
376376
executable, no other steps are required. In particular, there is no need to
377-
use the "-Dfuzz=enabled" switch in the configuration command line (although
377+
use the "-D fuzz=enabled" switch in the configuration command line (although
378378
doing so will not cause any problems).
379379

380380
@subsection fuzzThreads Changes Required for Multi-Threaded Kea
@@ -390,7 +390,7 @@ the AFL input in the background.
390390

391391
@subsection fuzzNotesUnitTests Unit Test Failures
392392

393-
If unit tests are built when -Dfuzz=enabled is specified and with the AFL
393+
If unit tests are built when -D fuzz=enabled is specified and with the AFL
394394
compiler, note that tests which check or use the DHCP servers (i.e. the unit
395395
tests in src/bin/dhcp4, src/bin/dhcp6 and src/bin/kea-admin) will fail.
396396
With no AFL-related environment variables defined, a C++ exception will be

doc/devel/unit-tests.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ anything e.g. `DEBUG=true`. `unset DEBUG` to remove this behavior.
116116
different versions of Tsan).
117117

118118
The simplest way to enable a sanitizer is to specify the flag on the setup
119-
step with `meson setup build -Db_sanitize=thread`.
119+
step with `meson setup build -D b_sanitize=thread`.
120120

121121
When enabling lcov (code coverage), some gtest functions are detected as
122122
not being thread safe. It is recommended to disable lcov when enabling

doc/sphinx/arm/ddns.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,21 @@ directly. It accepts the following command-line switches:
166166
Upon startup, the module loads its configuration and begins listening
167167
for NCRs based on that configuration.
168168

169-
During startup, the server attempts to create a PID file of the form:
170-
``[runstatedir]/[conf name].kea-dhcp-ddns.pid`` where:
169+
During startup, the server attempts to create a PID file of the
170+
form: ``[pidfile_dir]/[conf name].kea-dhcp-ddns.pid`` where:
171171

172-
- ``runstatedir`` - is the value as passed into the build configure
173-
script; it defaults to "/usr/local/var/run". Note that this value may be
174-
overridden at runtime by setting the environment variable
175-
``KEA_PIDFILE_DIR``. This is intended primarily for testing purposes.
172+
- ``pidfile_dir`` - is ``[prefix]/[localstatedir]/run/kea`` where
173+
``prefix`` and ``localstatedir`` are the values passed into meson setup using
174+
``--prefix`` and ``--localstatedir`` which default to ``/usr/local`` and
175+
``var`` respectively. So the whole ``pidfile_dir`` defaults to
176+
``/usr/local/var``. Note that this value may be overridden at runtime by
177+
setting the environment variable ``KEA_PIDFILE_DIR`` intended primarily for
178+
testing purposes.
176179

177180
- ``conf name`` - is the configuration file name used to start the server,
178181
minus all preceding paths and the file extension. For example, given
179-
a pathname of "/usr/local/etc/kea/myconf.txt", the portion used would
180-
be "myconf".
182+
a pathname of ``/usr/local/etc/kea/myconf.txt``, the portion used would
183+
be ``myconf``.
181184

182185
If the file already exists and contains the PID of a live process, the
183186
server issues a ``DHCP_DDNS_ALREADY_RUNNING`` log message and exits. It

doc/sphinx/arm/dhcp4-srv.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,20 @@ configuration file. Since the DHCPv4 server opens privileged ports, it
8484
requires root access; this daemon must be run as root.
8585

8686
During startup, the server attempts to create a PID file of the
87-
form: ``[runstatedir]/kea/[conf name].kea-dhcp4.pid``, where:
88-
89-
- ``runstatedir``: The value as passed into the build configure
90-
script; it defaults to ``/usr/local/var/run``. Note that this value may be
91-
overridden at runtime by setting the environment variable
92-
``KEA_PIDFILE_DIR``, although this is intended primarily for testing
93-
purposes.
94-
95-
- ``conf name``: The configuration file name used to start the server,
96-
minus all preceding paths and the file extension. For example, given
97-
a pathname of ``/usr/local/etc/kea/myconf.txt``, the portion used would
98-
be ``myconf``.
87+
form: ``[pidfile_dir]/[conf name].kea-dhcp4.pid`` where:
88+
89+
- ``pidfile_dir`` - is ``[prefix]/[localstatedir]/run/kea`` where
90+
``prefix`` and ``localstatedir`` are the values passed into meson setup using
91+
``--prefix`` and ``--localstatedir`` which default to ``/usr/local`` and
92+
``var`` respectively. So the whole ``pidfile_dir`` defaults to
93+
``/usr/local/var``. Note that this value may be overridden at runtime by
94+
setting the environment variable ``KEA_PIDFILE_DIR`` intended primarily for
95+
testing purposes.
96+
97+
- ``conf name``: The configuration file name used to start the server,
98+
minus all preceding paths and the file extension. For example, given
99+
a pathname of ``/usr/local/etc/kea/myconf.txt``, the portion used would
100+
be ``myconf``.
99101

100102
If the file already exists and contains the PID of a live process, the
101103
server issues a ``DHCP4_ALREADY_RUNNING`` log message and exits. It is

0 commit comments

Comments
 (0)