From 85219c1c7443ed50fbaed11546b7e33772a71390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 2 Sep 2020 13:55:12 +0200 Subject: [PATCH] Move nss module earlier on hosts: line Before the initroduction of nss-resolve, putting mdns before dns was equivalent to putting it after files, since there wasn't anything inbetween. But when systemd is installed first we get: hosts: files resolve [!UNAVAIL=return] myhostname dns which the existing scriptlet here would modify to: hosts: files resolve [!UNAVAIL=return] myhostname mdns4_minimal [NOTFOUND=return] dns but we really want: hosts: files myhostname mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns so mdns4 has higher priority than resolve. This applies to F33 and rawhide. --- nss-mdns.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nss-mdns.spec b/nss-mdns.spec index f2f8568..88262c6 100644 --- a/nss-mdns.spec +++ b/nss-mdns.spec @@ -1,6 +1,6 @@ Name: nss-mdns Version: 0.14.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: glibc plugin for .local name resolution License: LGPLv2+ @@ -44,11 +44,11 @@ rm -rf $RPM_BUILD_ROOT function mod_nss() { if [ -f "$1" ] ; then # sed-fu to add mdns4_minimal to the hosts line of /etc/nsswitch.conf - sed -i.bak ' - /^hosts:/ !b - /\/ b - s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g - ' "$1" + sed -i.bak ' + /^hosts:/ !b + /\/ b + s/\ - 0.14.1-9 +- Place 'mdns4_minimal' in /etc/nsswitch.conf after 'files' in /etc/nsswitch.conf, + so that it ends up before 'resolve' (#1867830) + * Tue Jul 28 2020 Fedora Release Engineering - 0.14.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild