]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Include controls.conf as jinja2 template
authorNicki Křížek <nicki@isc.org>
Wed, 1 Apr 2026 16:25:28 +0000 (18:25 +0200)
committerNicki Křížek <nicki@isc.org>
Thu, 28 May 2026 14:52:24 +0000 (16:52 +0200)
Rather than using named.conf include, render the controls directly into
the config using jinja2 template include.

(cherry picked from commit f4ca352bc88ab1c766fb4862de118e494fddfb5b)

bin/tests/system/_common/controls.conf.j2 [new file with mode: 0644]
bin/tests/system/optout/ns2/named.conf.j2
bin/tests/system/optout/setup.sh [deleted file]
bin/tests/system/optout/tests_optout.py

diff --git a/bin/tests/system/_common/controls.conf.j2 b/bin/tests/system/_common/controls.conf.j2
new file mode 100644 (file)
index 0000000..975299f
--- /dev/null
@@ -0,0 +1,4 @@
+{% include "_common/rndc.key" %}
+controls {
+       inet @ns.ip@ port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
index 6bfe881451e4a90a48eeb57e58f301bd1ede8fa5..ee069605f2e4df2b5392129587e0f6517eeb9531 100644 (file)
@@ -27,7 +27,7 @@ options {
        sig-signing-signatures 900;
 };
 
-include "controls.conf";
+{% include "_common/controls.conf.j2" %}
 
 dnssec-policy "optout" {
        keys {
diff --git a/bin/tests/system/optout/setup.sh b/bin/tests/system/optout/setup.sh
deleted file mode 100644 (file)
index ad40898..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh -e
-
-# 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.
-
-. ../conf.sh
-
-copy_setports ../_common/controls.conf.in ns2/controls.conf
index 4652a35e32334f5446b6c0c5ef8c40ff26ca5edb..911929f2f794fa8a2bce1700ec6540927f69c704 100755 (executable)
@@ -39,7 +39,6 @@ pytestmark = [
             "ns2/*.signed",
             "ns2/*.jnl",
             "ns2/*.jbk",
-            "ns2/controls.conf",
             "ns2/dsset-*",
             "ns2/K*",
         ]