From fc89e6a3801f530aa46935f907685355c90bd7d3 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 24 Jun 2024 09:12:58 +0200 Subject: [PATCH 1/2] rec: tweak debian install, as suggested by @zeha --- .../recursor/debian-buster/pdns-recursor.maintscript | 3 +++ .../debian/recursor/debian-buster/recursor.lua | 7 ------- builder-support/debian/recursor/debian-buster/rules | 11 ++++------- 3 files changed, 7 insertions(+), 14 deletions(-) create mode 100644 builder-support/debian/recursor/debian-buster/pdns-recursor.maintscript delete mode 100644 builder-support/debian/recursor/debian-buster/recursor.lua diff --git a/builder-support/debian/recursor/debian-buster/pdns-recursor.maintscript b/builder-support/debian/recursor/debian-buster/pdns-recursor.maintscript new file mode 100644 index 000000000000..da8d7e4e696e --- /dev/null +++ b/builder-support/debian/recursor/debian-buster/pdns-recursor.maintscript @@ -0,0 +1,3 @@ +# must support Ubuntu focal, with dpkg 1.19.7 +rm_conffile /etc/powerdns/recursor.lua 5.1~ + diff --git a/builder-support/debian/recursor/debian-buster/recursor.lua b/builder-support/debian/recursor/debian-buster/recursor.lua deleted file mode 100644 index 1d670a572e49..000000000000 --- a/builder-support/debian/recursor/debian-buster/recursor.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Debian default Lua configuration file for PowerDNS Recursor - --- Load DNSSEC root keys from dns-root-data package. --- Note: If you provide your own Lua configuration file, consider --- running rootkeys.lua too. -dofile("/usr/share/pdns-recursor/lua-config/rootkeys.lua") - diff --git a/builder-support/debian/recursor/debian-buster/rules b/builder-support/debian/recursor/debian-buster/rules index 2806c456a8ad..519d9ef6d9cd 100755 --- a/builder-support/debian/recursor/debian-buster/rules +++ b/builder-support/debian/recursor/debian-buster/rules @@ -34,26 +34,23 @@ override_dh_auto_configure: override_dh_auto_install: dh_auto_install - install -d debian/pdns-recursor/usr/share/pdns-recursor/lua-config - install -m 644 -t debian/pdns-recursor/usr/share/pdns-recursor/lua-config debian/lua-config/rootkeys.lua - install -m 644 -t debian/pdns-recursor/etc/powerdns debian/recursor.lua install -d debian/pdns-recursor/usr/share/pdns-recursor/snmp install -m 644 -t debian/pdns-recursor/usr/share/pdns-recursor/snmp RECURSOR-MIB.txt rm -f debian/pdns-recursor/etc/powerdns/recursor.conf-dist rm -f debian/pdns-recursor/etc/powerdns/recursor.yml-dist @echo "\ dnssec:\n\ - # validation: process\n\ + # validation: process # default\n\ + trustanchorfile: /usr/share/dns/root.key\n\ recursor:\n\ hint_file: /usr/share/dns/root.hints\n\ include_dir: /etc/powerdns/recursor.d\n\ - lua_config_file: /etc/powerdns/recursor.lua\n\ incoming:\n\ # listen:\n\ - # - 127.0.0.1\n\ + # - 127.0.0.1 # default\n\ outgoing:\n\ # source_address:\n\ - # - 0.0.0.0\n\ + # - 0.0.0.0 # default\n\ " > debian/pdns-recursor/etc/powerdns/recursor.conf override_dh_auto_test: From 2d0b3685674912458312254313d0dc63eff4ce34 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 24 Jun 2024 11:32:00 +0200 Subject: [PATCH 2/2] Also use variable suffix for file when reloading YAML-Lua config --- pdns/recursordist/rec_channel_rec.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/recursordist/rec_channel_rec.cc b/pdns/recursordist/rec_channel_rec.cc index 6637bd93eec4..a2b040cb339b 100644 --- a/pdns/recursordist/rec_channel_rec.cc +++ b/pdns/recursordist/rec_channel_rec.cc @@ -2207,7 +2207,7 @@ RecursorControlChannel::Answer luaconfig(bool broadcast) bool dummy1{}; bool dummy2{}; pdns::rust::settings::rec::Recursorsettings settings; - auto yamlstat = pdns::settings::rec::tryReadYAML(configname + ".yml", false, dummy1, dummy2, settings, g_slog); + auto yamlstat = pdns::settings::rec::tryReadYAML(configname + g_yamlSettingsSuffix, false, dummy1, dummy2, settings, g_slog); if (yamlstat != pdns::settings::rec::YamlSettingsStatus::OK) { return {1, "Not reloading dynamic part of YAML configuration\n"}; }