From 5a55749fa9114c050767b4fd6ee53ccbe2584d3e745d182132450ea4e3efd533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 31 May 2017 10:33:36 +0000 Subject: [PATCH] Accepting request 499768 from GNOME:Next Modify user generation scripts OBS-URL: https://build.opensuse.org/request/show/499768 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=136 --- avahi-glib2.spec | 5 ++--- avahi-mono.spec | 4 ++-- avahi-qt4.spec | 5 ++--- avahi.changes | 10 ++++++++++ avahi.spec | 5 ++--- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/avahi-glib2.spec b/avahi-glib2.spec index f568489..19de9e7 100644 --- a/avahi-glib2.spec +++ b/avahi-glib2.spec @@ -724,7 +724,6 @@ correct mDNS reflection across LAN segments. %package -n avahi-mono Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour -License: LGPL-2.1+ Group: Development/Languages/Mono Requires: gtk-sharp2 Requires: libavahi-client3 >= %{version} @@ -968,8 +967,8 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip %if %build_core %pre -%{_sbindir}/groupadd -r avahi 2> /dev/null || : -%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi 2> /dev/null || : +getent group avahi || %{_sbindir}/groupadd -r avahi +getent passwd avahi || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi %service_add_pre avahi-dnsconfd.service avahi-daemon.service # bnc#853845,bnc#851953: do not start by default under # sysconfig as this breaks vlan,bridge,bonding setups diff --git a/avahi-mono.spec b/avahi-mono.spec index 901a00a..eed058a 100644 --- a/avahi-mono.spec +++ b/avahi-mono.spec @@ -967,8 +967,8 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip %if %build_core %pre -%{_sbindir}/groupadd -r avahi 2> /dev/null || : -%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi 2> /dev/null || : +getent group avahi || %{_sbindir}/groupadd -r avahi +getent passwd avahi || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi %service_add_pre avahi-dnsconfd.service avahi-daemon.service # bnc#853845,bnc#851953: do not start by default under # sysconfig as this breaks vlan,bridge,bonding setups diff --git a/avahi-qt4.spec b/avahi-qt4.spec index 7206296..dc6d354 100644 --- a/avahi-qt4.spec +++ b/avahi-qt4.spec @@ -726,7 +726,6 @@ correct mDNS reflection across LAN segments. %package -n avahi-mono Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour -License: LGPL-2.1+ Group: Development/Languages/Mono Requires: gtk-sharp2 Requires: libavahi-client3 >= %{version} @@ -970,8 +969,8 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip %if %build_core %pre -%{_sbindir}/groupadd -r avahi 2> /dev/null || : -%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi 2> /dev/null || : +getent group avahi || %{_sbindir}/groupadd -r avahi +getent passwd avahi || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi %service_add_pre avahi-dnsconfd.service avahi-daemon.service # bnc#853845,bnc#851953: do not start by default under # sysconfig as this breaks vlan,bridge,bonding setups diff --git a/avahi.changes b/avahi.changes index 70a606c..eabc3ba 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue May 30 13:22:45 UTC 2017 - dimstar@opensuse.org + +- Modify user generation (boo#1010384): + + Use getent to check for existing users/groups, only creating + them if not found. + + Do not hide output of groupadd/useradd. + + Do not mask failures: if a user can't be added, we have a + problem. + ------------------------------------------------------------------- Wed Feb 15 17:58:46 UTC 2017 - dimstar@opensuse.org diff --git a/avahi.spec b/avahi.spec index 6c728f4..18bf4b1 100644 --- a/avahi.spec +++ b/avahi.spec @@ -726,7 +726,6 @@ correct mDNS reflection across LAN segments. %package -n avahi-mono Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour -License: LGPL-2.1+ Group: Development/Languages/Mono Requires: gtk-sharp2 Requires: libavahi-client3 >= %{version} @@ -970,8 +969,8 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip %if %build_core %pre -%{_sbindir}/groupadd -r avahi 2> /dev/null || : -%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi 2> /dev/null || : +getent group avahi || %{_sbindir}/groupadd -r avahi +getent passwd avahi || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi %service_add_pre avahi-dnsconfd.service avahi-daemon.service # bnc#853845,bnc#851953: do not start by default under # sysconfig as this breaks vlan,bridge,bonding setups