Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wireguard-tools for openSUSE:Factory checked in at 2022-02-18 23:03:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wireguard-tools (Old) and /work/SRC/openSUSE:Factory/.wireguard-tools.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wireguard-tools" Fri Feb 18 23:03:04 2022 rev:14 rq:955853 version:1.0.20210914 Changes: -------- --- /work/SRC/openSUSE:Factory/wireguard-tools/wireguard-tools.changes 2022-01-10 23:53:07.708779364 +0100 +++ /work/SRC/openSUSE:Factory/.wireguard-tools.new.1958/wireguard-tools.changes 2022-02-18 23:03:43.877409148 +0100 @@ -1,0 +2,6 @@ +Thu Feb 17 15:17:15 UTC 2022 - Dominik Heidler <dheid...@suse.de> + +- Support systemd-resolved split-dns setup + * Support-systemd-resolved-split-dns-setup.patch + +------------------------------------------------------------------- New: ---- Support-systemd-resolved-split-dns-setup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wireguard-tools.spec ++++++ --- /var/tmp/diff_new_pack.J2Ds4U/_old 2022-02-18 23:03:44.553409095 +0100 +++ /var/tmp/diff_new_pack.J2Ds4U/_new 2022-02-18 23:03:44.561409095 +0100 @@ -1,7 +1,7 @@ # # spec file for package wireguard-tools # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2020-2021, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties @@ -28,6 +28,7 @@ Source1: https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-%{version}.tar.asc Source99: https://www.zx2c4.com/keys/AB9942E6D4A4CFC3412620A749FC7012A5DE03AE.asc#/WireGuard.keyring Patch0: harden_wg-quick@.service.patch +Patch1: Support-systemd-resolved-split-dns-setup.patch BuildRequires: bash-completion BuildRequires: pkgconfig %systemd_requires @@ -48,9 +49,10 @@ %prep %setup -q -n wireguard-tools-%{version} +%patch0 -p1 +%patch1 -p1 ## HACK: Fixing wg-quick's DNS= directive with a hatchet contrib/dns-hatchet/apply.sh -%patch0 -p1 %build export CFLAGS="%{optflags}" ++++++ Support-systemd-resolved-split-dns-setup.patch ++++++ >From 7fb4d491fab1e8e8b64c652f5e762b8025452c3a Mon Sep 17 00:00:00 2001 From: Dominik Heidler <dheid...@suse.de> Date: Thu, 17 Feb 2022 15:31:20 +0100 Subject: [PATCH] Support systemd-resolved split-dns setup --- contrib/dns-hatchet/hatchet.bash | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/dns-hatchet/hatchet.bash b/contrib/dns-hatchet/hatchet.bash index bc4d090..db44842 100644 --- a/contrib/dns-hatchet/hatchet.bash +++ b/contrib/dns-hatchet/hatchet.bash @@ -5,7 +5,8 @@ set_dns() { { printf 'nameserver %s\n' "${DNS[@]}" [[ ${#DNS_SEARCH[@]} -eq 0 ]] || printf 'search %s\n' "${DNS_SEARCH[*]}" } | cmd resolvconf -a "$INTERFACE" -m 0 -x - else + # Don't ruin a proper split dns setup + elif [[ "$(readlink /etc/resolv.conf)" != "/run/systemd/resolve/stub-resolv.conf" ]] ; then echo "[#] mount \`${DNS[*]}' /etc/resolv.conf" >&2 [[ -e /etc/resolv.conf ]] || touch /etc/resolv.conf { cat <<-_EOF @@ -30,6 +31,15 @@ set_dns() { _EOF )" fi + # If systemd-resolved is installed, set the dns configuration there (as well). + # It might be used additionally (eg for containers) or even for the whole system. + # A teardown is not really needed as resolvectl detects the interface disappearing. + if resolvectl status >/dev/null 2>&1 ; then + cmd resolvectl dns "$INTERFACE" "${DNS[@]}" + # Prefix each domain with '~' which will tell resolvectl to use that domain + # for dns routing but not as a search domain + cmd resolvectl domain "$INTERFACE" "${DNS_SEARCH[*]/#/\~}" + fi HAVE_SET_DNS=1 } -- 2.35.1