From: Evan Hunt Date: Thu, 6 Feb 2025 01:15:09 +0000 (-0800) Subject: move makejournal to bin/tools X-Git-Tag: v9.21.10~51^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20fb3d0524ca3b9e3fe4108c92cd3919b871721b;p=thirdparty%2Fbind9.git move makejournal to bin/tools 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. --- diff --git a/bin/tests/system/isctest/vars/basic.py b/bin/tests/system/isctest/vars/basic.py index d33ecae0ecf..4371694c6dd 100644 --- a/bin/tests/system/isctest/vars/basic.py +++ b/bin/tests/system/isctest/vars/basic.py @@ -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 diff --git a/bin/tests/system/meson.build b/bin/tests/system/meson.build index 1a1a44cc864..88dfbd1e22e 100644 --- a/bin/tests/system/meson.build +++ b/bin/tests/system/meson.build @@ -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'), } diff --git a/bin/tools/meson.build b/bin/tools/meson.build index fffb29e5943..8e520850dd3 100644 --- a/bin/tools/meson.build +++ b/bin/tools/meson.build @@ -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', diff --git a/bin/tools/named-journalprint.rst b/bin/tools/named-journalprint.rst index 9d568018644..e3ac7732cfa 100644 --- a/bin/tools/named-journalprint.rst +++ b/bin/tools/named-journalprint.rst @@ -63,4 +63,4 @@ bug in that release.) Note that these options *must not* be used while See Also ~~~~~~~~ -:iscman:`named(8) `, :iscman:`nsupdate(1) `, BIND 9 Administrator Reference Manual. +:iscman:`named(8) `, :iscman:`nsupdate(1) `, :iscman:`named-makejournal(1) `, BIND 9 Administrator Reference Manual. diff --git a/bin/tests/system/makejournal.c b/bin/tools/named-makejournal.c similarity index 96% rename from bin/tests/system/makejournal.c rename to bin/tools/named-makejournal.c index 690c38fb435..10642970dde 100644 --- a/bin/tests/system/makejournal.c +++ b/bin/tools/named-makejournal.c @@ -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 index 00000000000..60fe70062b7 --- /dev/null +++ b/bin/tools/named-makejournal.rst @@ -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) `, :iscman:`named-journalprint(1) `, BIND 9 Administrator Reference Manual. diff --git a/doc/arm/manpages.rst b/doc/arm/manpages.rst index 1a3847176ae..63a20bbe58f 100644 --- a/doc/arm/manpages.rst +++ b/doc/arm/manpages.rst @@ -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 diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 82990665f4f..4c2ff05962f 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -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. diff --git a/doc/man/conf.py b/doc/man/conf.py index 0e92bb61b76..8a716cb6225 100644 --- a/doc/man/conf.py +++ b/doc/man/conf.py @@ -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 index 00000000000..60b0c7295fa --- /dev/null +++ b/doc/man/named-makejournal.rst @@ -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 diff --git a/meson.build b/meson.build index ecce4682105..9ac66a1e926 100644 --- a/meson.build +++ b/meson.build @@ -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',