]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
move makejournal to bin/tools
authorEvan Hunt <each@isc.org>
Thu, 6 Feb 2025 01:15:09 +0000 (17:15 -0800)
committerEvan Hunt <each@isc.org>
Sat, 14 Jun 2025 01:16:56 +0000 (18:16 -0700)
move the "makejournal" tool from bin/tests/system to bin/tools
and rename it to "named-makejournal". add a man page. update
tests to use the new file location.

bin/tests/system/isctest/vars/basic.py
bin/tests/system/meson.build
bin/tools/meson.build
bin/tools/named-journalprint.rst
bin/tools/named-makejournal.c [moved from bin/tests/system/makejournal.c with 96% similarity]
bin/tools/named-makejournal.rst [new file with mode: 0644]
doc/arm/manpages.rst
doc/dev/dev.md
doc/man/conf.py
doc/man/named-makejournal.rst [new file with mode: 0644]
meson.build

index d33ecae0ecf8e2096b5b2ad67eef67e567fa1d63..4371694c6dd09a508befd7ec98b71f7074c98666 100644 (file)
@@ -32,6 +32,7 @@ BASIC_VARS = {
     "KEYFRLAB": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-keyfromlabel",
     "KEYGEN": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-keygen",
     "KSR": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-ksr",
+    "MAKEJOURNAL": f"{BUILD_VARS['TOP_BUILDDIR']}/named-makejournal",
     "MDIG": f"{BUILD_VARS['TOP_BUILDDIR']}/mdig",
     "NAMED": f"{BUILD_VARS['TOP_BUILDDIR']}/named",
     "NSEC3HASH": f"{BUILD_VARS['TOP_BUILDDIR']}/nsec3hash",
@@ -49,7 +50,6 @@ BASIC_VARS = {
     "WIRETEST": f"{BUILD_VARS['TOP_BUILDDIR']}/wire-test",
     "BIGKEY": f"{BUILD_VARS['TOP_BUILDDIR']}/bigkey",
     "GENCHECK": f"{BUILD_VARS['TOP_BUILDDIR']}/gencheck",
-    "MAKEJOURNAL": f"{BUILD_VARS['TOP_BUILDDIR']}/makejournal",
     "PIPEQUERIES": f"{BUILD_VARS['TOP_BUILDDIR']}/pipequeries",
     "TMPDIR": os.getenv("TMPDIR", "/tmp"),
     "KRB5_CONFIG": "/dev/null",  # we don't want a KRB5_CONFIG setting breaking the tests
index 1a1a44cc864610db29c1e7c660a5de9c2e752550..88dfbd1e22e7278b24a0c6325ce3aa21c1a84a6a 100644 (file)
@@ -23,7 +23,6 @@ system_test_binaries += {
     # 'bigkey': files('rsabigexponent' / 'bigkey.c'),
     'feature-test': files('feature-test.c'),
     'gencheck': files('rndc' / 'gencheck.c'),
-    'makejournal': files('makejournal.c'),
     'pipequeries': files('pipelined' / 'pipequeries.c'),
     'wire-test': files('wire-test.c'),
 }
index fffb29e59439df76f71e097c5dab00c26f0ba368..8e520850dd35f4b53d156aefb898279604307b3f 100644 (file)
@@ -12,6 +12,7 @@
 arpaname_src += files('arpaname.c')
 dnstap_read_src += files('dnstap-read.c')
 mdig_src += files('mdig.c')
+named_makejournal_src += files('named-makejournal.c')
 named_journalprint_src += files('named-journalprint.c')
 named_nzd2nzf_src += files('named-nzd2nzf.c')
 named_rrchecker_src += files('named-rrchecker.c')
@@ -25,6 +26,7 @@ manrst_srcset.add(
         'dnstap-read.rst',
         'mdig.rst',
         'named-journalprint.rst',
+        'named-makejournal.rst',
         'named-nzd2nzf.rst',
         'named-rrchecker.rst',
         'nsec3hash.rst',
index 9d56801864499f117a51d1308d544ba7a2d49b98..e3ac7732cfa01bb190cf50c104bfe002ef73ff4e 100644 (file)
@@ -63,4 +63,4 @@ bug in that release.) Note that these options *must not* be used while
 See Also
 ~~~~~~~~
 
-:iscman:`named(8) <named>`, :iscman:`nsupdate(1) <nsupdate>`, BIND 9 Administrator Reference Manual.
+:iscman:`named(8) <named>`, :iscman:`nsupdate(1) <nsupdate>`, :iscman:`named-makejournal(1) <named-makejournal>`, BIND 9 Administrator Reference Manual.
similarity index 96%
rename from bin/tests/system/makejournal.c
rename to bin/tools/named-makejournal.c
index 690c38fb4359b661a169621c85b4900d60df37a5..10642970dde9efb249b6839f71b52efb84678d17 100644 (file)
@@ -37,7 +37,7 @@ static isc_result_t
 loadzone(dns_db_t **db, const char *origin, const char *filename) {
        isc_result_t result;
        dns_fixedname_t fixed;
-       dns_name_t *name;
+       dns_name_t *name = NULL;
 
        name = dns_fixedname_initname(&fixed);
 
@@ -62,7 +62,7 @@ loadzone(dns_db_t **db, const char *origin, const char *filename) {
 int
 main(int argc, char **argv) {
        isc_result_t result;
-       char *origin, *file1, *file2, *journal;
+       char *origin = NULL, *file1 = NULL, *file2 = NULL, *journal = NULL;
        dns_db_t *olddb = NULL, *newdb = NULL;
        isc_logconfig_t *logconfig = NULL;
 
diff --git a/bin/tools/named-makejournal.rst b/bin/tools/named-makejournal.rst
new file mode 100644 (file)
index 0000000..60fe700
--- /dev/null
@@ -0,0 +1,38 @@
+.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+..
+.. SPDX-License-Identifier: MPL-2.0
+..
+.. This Source Code Form is subject to the terms of the Mozilla Public
+.. License, v. 2.0.  If a copy of the MPL was not distributed with this
+.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
+..
+.. See the COPYRIGHT file distributed with this work for additional
+.. information regarding copyright ownership.
+
+.. highlight: console
+
+.. iscman:: named-makejournal
+.. program:: named-makejournal
+.. _man_named-makejournal:
+
+named-makejournal - create a journal from zone files
+----------------------------------------------------
+
+Synopsis
+~~~~~~~~
+
+:program:`named-makejournal` {origin} {oldfile} {newfile} {journal}
+
+Description
+~~~~~~~~~~~
+
+:program:`named-makejournal` scans the contents of two zone files for
+the same domain, compares them, and writes the differences into a
+journal file. The resulting journal file could then be used by a
+:iscman:`named` server to load the zone and provide incremental
+zone transfers.
+
+See Also
+~~~~~~~~
+
+:iscman:`named(8) <named>`, :iscman:`named-journalprint(1) <named-journalprint>`, BIND 9 Administrator Reference Manual.
index 1a3847176ae310385b298ce6a1b46a7a2d6bb3a9..63a20bbe58fb98073f428404ee674d7980e4897d 100644 (file)
@@ -36,6 +36,7 @@ Manual Pages
 .. include:: ../../bin/check/named-checkzone.rst
 .. include:: ../../bin/check/named-compilezone.rst
 .. include:: ../../bin/tools/named-journalprint.rst
+.. include:: ../../bin/tools/named-makejournal.rst
 .. include:: ../../bin/tools/named-nzd2nzf.rst
 .. include:: ../../bin/tools/named-rrchecker.rst
 .. include:: ../../bin/named/named.conf.rst
index 82990665f4f0e1e4d19be63658476ee23e646ee3..4c2ff05962f5b02d587048beb1bfd2ee0effc7f0 100644 (file)
@@ -206,7 +206,7 @@ libraries.
     * `bind9/bin/confgen`: `rndc-confgen`, `ddns-confgen`, and
       `tsig-keygen` (BIND 9.9+)
     * `bind9/bin/tools`: assorted useful tools: `named-journalprint`,
-      `nsec3hash`, etc
+      `named-makejournal`, `nsec3hash`, etc
 * `bind9/lib`: libraries
     * `bind9/lib/isc`: implements basic functionality such as threads,
       tasks, timers, sockets, memory manager, buffers, and basic data types.
index 0e92bb61b7636b1a205648afed241b364e32b30d..8a716cb6225593417795a93e37844e85bcd097b4 100644 (file)
@@ -175,6 +175,13 @@ man_pages = [
         author,
         1,
     ),
+    (
+        "named-makejournal",
+        "named-makejournal",
+        "create a journal from zone files",
+        author,
+        1,
+    ),
     (
         "named-nzd2nzf",
         "named-nzd2nzf",
diff --git a/doc/man/named-makejournal.rst b/doc/man/named-makejournal.rst
new file mode 100644 (file)
index 0000000..60b0c72
--- /dev/null
@@ -0,0 +1,14 @@
+.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+..
+.. SPDX-License-Identifier: MPL-2.0
+..
+.. This Source Code Form is subject to the terms of the Mozilla Public
+.. License, v. 2.0.  If a copy of the MPL was not distributed with this
+.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
+..
+.. See the COPYRIGHT file distributed with this work for additional
+.. information regarding copyright ownership.
+
+:orphan:
+
+.. include:: ../../bin/tools/named-makejournal.rst
index ecce4682105d2aaa906c1be2050e141a1e5e4095..9ac66a1e9261a37d75d1171a9fba245191a383ae 100644 (file)
@@ -912,6 +912,7 @@ mdig_src = []
 named_checkconf_src = []
 named_checkzone_src = []
 named_journalprint_src = []
+named_makejournal_src = []
 named_nzd2nzf_src = []
 named_rrchecker_src = []
 nsec3hash_src = []
@@ -1345,6 +1346,19 @@ executable(
     ],
 )
 
+executable(
+    'named-makejournal',
+    named_makejournal_src,
+    export_dynamic: true,
+    implicit_include_directories: false,
+    install: true,
+    install_rpath: libdir,
+    dependencies: [
+        libdns_dep,
+        libisc_dep,
+    ],
+)
+
 if config.has('HAVE_LMDB')
     executable(
         'named-nzd2nzf',