From e7c2e0e8599f8f34e99d3a3ad32cdb77faf1f3ef94340d47ce234e06f2c72e7e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 15 Nov 2023 12:55:57 +0000 Subject: [PATCH] Accepting request 1125434 from GNOME:Next - avahi-autoipd: only migrate files owned by avahi user if said user exists: if the user does not exist (fresh installs), then there is no chance any file is owned by the user (boo#1216730). OBS-URL: https://build.opensuse.org/request/show/1125434 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=228 --- avahi.changes | 7 +++++++ avahi.spec | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/avahi.changes b/avahi.changes index 60636c9..302e2bb 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 13 10:15:01 UTC 2023 - Dominique Leuenberger + +- avahi-autoipd: only migrate files owned by avahi user if said + user exists: if the user does not exist (fresh installs), then + there is no chance any file is owned by the user (boo#1216730). + ------------------------------------------------------------------- Wed Nov 1 06:19:44 UTC 2023 - Alynx Zhou diff --git a/avahi.spec b/avahi.spec index 1501558..bb2d7b7 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,5 +1,5 @@ # -# spec file for package avahi +# spec file # # Copyright (c) 2023 SUSE LLC # @@ -413,8 +413,8 @@ Obsoletes: avahi-glib2-utils-gtk < %{version} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -# This is the avahi-discover command, only provided for the primary python3 flavor +# This is the avahi-discover command, only provided for the primary python3 flavor %package -n python3-avahi-gtk Summary: A set of Avahi utilities written in Python Using python-gtk Group: Development/Languages/Python @@ -713,8 +713,10 @@ fi %post autoipd %{fillup_only -ns avahi autoipd} -# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. -find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + +if getent passwd avahi > /dev/null; then + # Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. + find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + +fi %ldconfig_scriptlets -n libavahi-client%{avahi_client_sover} %ldconfig_scriptlets -n libavahi-common%{avahi_common_sover}