summaryrefslogtreecommitdiffstats
path: root/distro
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2023-06-22 16:02:40 +0200
committerJakub Ružička <jakub.ruzicka@nic.cz>2023-06-22 16:06:26 +0200
commit1059970320b483f2f1701f8fa9cb7c6be470f69e (patch)
treeba02715e1fdca83da22de7a8aa1d53c233de2a55 /distro
parentdistro/tests: improve systemd service tests debug (diff)
downloadknot-resolver-1059970320b483f2f1701f8fa9cb7c6be470f69e.tar.xz
knot-resolver-1059970320b483f2f1701f8fa9cb7c6be470f69e.zip
upgrade-4-to-5: remove the rest of occurrences
Diffstat (limited to 'distro')
-rw-r--r--distro/pkg/nix/default.nix1
-rw-r--r--distro/pkg/rpm/knot-resolver.spec37
2 files changed, 0 insertions, 38 deletions
diff --git a/distro/pkg/nix/default.nix b/distro/pkg/nix/default.nix
index 16c66d05..6d975bf8 100644
--- a/distro/pkg/nix/default.nix
+++ b/distro/pkg/nix/default.nix
@@ -75,7 +75,6 @@ unwrapped = stdenv.mkDerivation rec {
postInstall = ''
rm "$out"/lib/libkres.a
- rm "$out"/lib/knot-resolver/upgrade-4-to-5.lua # not meaningful on NixOS
'' + optionalString stdenv.targetPlatform.isLinux ''
rm -r "$out"/lib/sysusers.d/ # ATM more likely to harm than help
'';
diff --git a/distro/pkg/rpm/knot-resolver.spec b/distro/pkg/rpm/knot-resolver.spec
index 55c0a199..dd55123e 100644
--- a/distro/pkg/rpm/knot-resolver.spec
+++ b/distro/pkg/rpm/knot-resolver.spec
@@ -243,44 +243,7 @@ popd
getent group knot-resolver >/dev/null || groupadd -r knot-resolver
getent passwd knot-resolver >/dev/null || useradd -r -g knot-resolver -d %{_sysconfdir}/knot-resolver -s /sbin/nologin -c "Knot Resolver" knot-resolver
-%if "x%{?rhel}" == "x"
-# upgrade-4-to-5
-if [ -f %{_unitdir}/kresd.socket ] ; then
- export UPG_DIR=%{_sharedstatedir}/knot-resolver/.upgrade-4-to-5
- mkdir -p ${UPG_DIR}
- touch ${UPG_DIR}/.unfinished
-
- for sock in kresd.socket kresd-tls.socket kresd-webmgmt.socket kresd-doh.socket ; do
- if systemctl is-enabled ${sock} 2>/dev/null | grep -qv masked ; then
- systemctl show ${sock} -p Listen > ${UPG_DIR}/${sock}
- case "$(systemctl show ${sock} -p BindIPv6Only)" in
- *ipv6-only)
- touch ${UPG_DIR}/${sock}.v6only
- ;;
- *default)
- if cat /proc/sys/net/ipv6/bindv6only | grep -q 1 ; then
- touch ${UPG_DIR}/${sock}.v6only
- fi
- ;;
- esac
- fi
- done
-fi
-%endif
-
%post core
-# upgrade-4-to-5
-%if "x%{?rhel}" == "x"
-export UPG_DIR=%{_sharedstatedir}/knot-resolver/.upgrade-4-to-5
-if [ -f ${UPG_DIR}/.unfinished ] ; then
- rm -f ${UPG_DIR}/.unfinished
- kresd -c %{_libdir}/knot-resolver/upgrade-4-to-5.lua &>/dev/null
- echo -e "\n !!! WARNING !!!"
- echo -e "Knot Resolver configuration file requires manual upgrade.\n"
- cat ${UPG_DIR}/kresd.conf.net 2>/dev/null
-fi
-%endif
-
# 5.0.1 fix to force restart of kres-cache-gc.service, which was missing in systemd_postun_with_restart
# TODO: remove once most users upgrade to 5.0.1+
systemctl daemon-reload >/dev/null 2>&1 || :