From a735dfdea5f3c004659540cd91579b0ed1927d41 Mon Sep 17 00:00:00 2001 From: creme Date: Tue, 2 Jan 2024 07:40:48 +0100 Subject: [PATCH] update wireguard for deb12 --- salt/freifunk/base/clear_old_env.sls | 3 +++ salt/freifunk/base/wireguard/init.sls | 28 ++++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/salt/freifunk/base/clear_old_env.sls b/salt/freifunk/base/clear_old_env.sls index 6ffda46a..3be2b373 100644 --- a/salt/freifunk/base/clear_old_env.sls +++ b/salt/freifunk/base/clear_old_env.sls @@ -20,6 +20,9 @@ clean_old_vnstat: /root/freifunk/vserver-base: file.absent +/etc/apt/sources.list.d/wireguard.list + file.absent + /etc/apache2/sites-enabled/001-freifunk.conf: file.absent: diff --git a/salt/freifunk/base/wireguard/init.sls b/salt/freifunk/base/wireguard/init.sls index 83431b9e..c1f087d6 100644 --- a/salt/freifunk/base/wireguard/init.sls +++ b/salt/freifunk/base/wireguard/init.sls @@ -8,8 +8,23 @@ file.absent {% endif %} -{# Debian Pin-Prio for unstable Repo #} -{% if grains['os'] == 'Debian' %} +{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %} +/etc/apt/sources.list.d/debian_unstable.list: + file.absent + +/etc/apt/preferences.d/limit-unstable + file.absent + +wireguard_dkms: + pkg.removed: + - names: + - wireguard-dkms + - dkms +{% endif %} + + +{# Debian <12 Pin-Prio for unstable Repo #} +{% if grains['os'] == 'Debian' and not grains['oscodename'] == 'bookworm' %} unstable_pkg_prio: cmd.run: - name: "printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable" @@ -17,13 +32,13 @@ unstable_pkg_prio: {% endif %} wireguard: - {% if grains['os'] == 'Debian' %} + {% if grains['os'] == 'Debian' and not grains['oscodename'] == 'bookworm' %} pkgrepo.managed: - - humanname: Wireguard + - humanname: debian-unstable - name: deb http://deb.debian.org/debian/ unstable main - dist: unstable - - file: /etc/apt/sources.list.d/wireguard.list - - unless: "[ -f /etc/apt/sources.list.d/wireguard.list ]" + - file: /etc/apt/sources.list.d/debian_unstable.list + - unless: "[ -f /etc/apt/sources.list.d/debian_unstable.list ]" {% endif %} pkg.installed: @@ -127,4 +142,3 @@ wgvpn1_service_dead: - require: - pkg: wireguard - file: /etc/config/ffdd - - file: /etc/config/ffdd_sample