Accepting request 500338 from home:jengelh:branches:GNOME:Factory

- Do not suppress errors from avahi-autoipd user creation, but do
  suppress getent output.
- Replace $RPM_* shell vars by macros.

OBS-URL: https://build.opensuse.org/request/show/500338
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=137
This commit is contained in:
Dominique Leuenberger 2017-06-01 09:06:25 +00:00 committed by Git OBS Bridge
parent 5a55749fa9
commit 261a85bc54
5 changed files with 235 additions and 216 deletions

View File

@ -879,80 +879,80 @@ cd ../avahi-ui-sharp
rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core
cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}"
%endif
%if %build_core
# do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already
#rm $RPM_BUILD_ROOT%{_libdir}/libavahi-common.la
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
#rm "%{buildroot}/%{_libdir}/libavahi-common.la"
install -d %{buildroot}/%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,$RPM_BUILD_DIR,/," $RPM_BUILD_ROOT%{_libdir}/libavahi-qt4.la
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}/var/adm/fillup-templates
install -m 644 sysconfig.avahi* %{buildroot}/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
%endif
%find_lang %{name} %{?no_lang_C}
%else
# There is no simple way to not install core files. Remove them here.
# The rest is enabled/disabled in configure as needed.
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-client.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-core.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2
rm $RPM_BUILD_ROOT%{_bindir}/avahi-bookmarks
rm -r $RPM_BUILD_ROOT%{python_sitelib}/avahi
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-bookmarks.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-service.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-set-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi-daemon.conf.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.hosts.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.service.5*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.action.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-daemon.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.action.8*
rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse-domains.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-service.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-host-name.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve.1*
rm %{buildroot}/%{_mandir}/man1/avahi-set-host-name.1*
rm %{buildroot}/%{_mandir}/man5/avahi-daemon.conf.5*
rm %{buildroot}/%{_mandir}/man5/avahi.hosts.5*
rm %{buildroot}/%{_mandir}/man5/avahi.service.5*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.action.8*
rm %{buildroot}/%{_mandir}/man8/avahi-daemon.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.action.8*
# Note: This file was intentionally moved to avahi. It is needed for avahi-utils-gtk and python-avahi-gtk:
rm $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi
rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi
%else
%if %build_mono
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330
strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif
%endif
%endif
@ -962,13 +962,13 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
%fdupes $RPM_BUILD_ROOT%{_libdir}
%fdupes %{buildroot}/%{_libdir}
%if %build_core
%pre
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
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_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
@ -994,8 +994,11 @@ fi
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
getent group avahi-autoipd >/dev/null || %{_sbindir}/groupadd -r avahi-autoipd
getent passwd avahi-autoipd >/dev/null || \
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" \
-d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd \
avahi-autoipd
%post autoipd
%{fillup_only -ns avahi autoipd}

View File

@ -879,80 +879,80 @@ cd ../avahi-ui-sharp
rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core
cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}"
%endif
%if %build_core
# do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already
#rm $RPM_BUILD_ROOT%{_libdir}/libavahi-common.la
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
#rm "%{buildroot}/%{_libdir}/libavahi-common.la"
install -d %{buildroot}/%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,$RPM_BUILD_DIR,/," $RPM_BUILD_ROOT%{_libdir}/libavahi-qt4.la
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}/var/adm/fillup-templates
install -m 644 sysconfig.avahi* %{buildroot}/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
%endif
%find_lang %{name} %{?no_lang_C}
%else
# There is no simple way to not install core files. Remove them here.
# The rest is enabled/disabled in configure as needed.
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-client.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-core.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2
rm $RPM_BUILD_ROOT%{_bindir}/avahi-bookmarks
rm -r $RPM_BUILD_ROOT%{python_sitelib}/avahi
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-bookmarks.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-service.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-set-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi-daemon.conf.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.hosts.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.service.5*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.action.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-daemon.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.action.8*
rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse-domains.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-service.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-host-name.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve.1*
rm %{buildroot}/%{_mandir}/man1/avahi-set-host-name.1*
rm %{buildroot}/%{_mandir}/man5/avahi-daemon.conf.5*
rm %{buildroot}/%{_mandir}/man5/avahi.hosts.5*
rm %{buildroot}/%{_mandir}/man5/avahi.service.5*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.action.8*
rm %{buildroot}/%{_mandir}/man8/avahi-daemon.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.action.8*
# Note: This file was intentionally moved to avahi. It is needed for avahi-utils-gtk and python-avahi-gtk:
rm $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi
rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi
%else
%if %build_mono
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330
strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif
%endif
%endif
@ -962,13 +962,13 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
%fdupes $RPM_BUILD_ROOT%{_libdir}
%fdupes %{buildroot}/%{_libdir}
%if %build_core
%pre
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
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_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
@ -994,8 +994,11 @@ fi
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
getent group avahi-autoipd >/dev/null || %{_sbindir}/groupadd -r avahi-autoipd
getent passwd avahi-autoipd >/dev/null || \
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" \
-d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd \
avahi-autoipd
%post autoipd
%{fillup_only -ns avahi autoipd}

View File

@ -881,80 +881,80 @@ cd ../avahi-ui-sharp
rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core
cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}"
%endif
%if %build_core
# do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already
#rm $RPM_BUILD_ROOT%{_libdir}/libavahi-common.la
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
#rm "%{buildroot}/%{_libdir}/libavahi-common.la"
install -d %{buildroot}/%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,$RPM_BUILD_DIR,/," $RPM_BUILD_ROOT%{_libdir}/libavahi-qt4.la
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}/var/adm/fillup-templates
install -m 644 sysconfig.avahi* %{buildroot}/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
%endif
%find_lang %{name} %{?no_lang_C}
%else
# There is no simple way to not install core files. Remove them here.
# The rest is enabled/disabled in configure as needed.
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-client.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-core.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2
rm $RPM_BUILD_ROOT%{_bindir}/avahi-bookmarks
rm -r $RPM_BUILD_ROOT%{python_sitelib}/avahi
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-bookmarks.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-service.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-set-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi-daemon.conf.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.hosts.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.service.5*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.action.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-daemon.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.action.8*
rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse-domains.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-service.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-host-name.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve.1*
rm %{buildroot}/%{_mandir}/man1/avahi-set-host-name.1*
rm %{buildroot}/%{_mandir}/man5/avahi-daemon.conf.5*
rm %{buildroot}/%{_mandir}/man5/avahi.hosts.5*
rm %{buildroot}/%{_mandir}/man5/avahi.service.5*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.action.8*
rm %{buildroot}/%{_mandir}/man8/avahi-daemon.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.action.8*
# Note: This file was intentionally moved to avahi. It is needed for avahi-utils-gtk and python-avahi-gtk:
rm $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi
rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi
%else
%if %build_mono
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330
strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif
%endif
%endif
@ -964,13 +964,13 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
%fdupes $RPM_BUILD_ROOT%{_libdir}
%fdupes %{buildroot}/%{_libdir}
%if %build_core
%pre
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
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_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
@ -996,8 +996,11 @@ fi
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
getent group avahi-autoipd >/dev/null || %{_sbindir}/groupadd -r avahi-autoipd
getent passwd avahi-autoipd >/dev/null || \
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" \
-d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd \
avahi-autoipd
%post autoipd
%{fillup_only -ns avahi autoipd}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jun 1 08:37:54 UTC 2017 - jengelh@inai.de
- Do not suppress errors from avahi-autoipd user creation, but do
suppress getent output.
- Replace $RPM_* shell vars by macros.
-------------------------------------------------------------------
Tue May 30 13:22:45 UTC 2017 - dimstar@opensuse.org

View File

@ -881,80 +881,80 @@ cd ../avahi-ui-sharp
rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core
cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}"
%endif
%if %build_core
# do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already
#rm $RPM_BUILD_ROOT%{_libdir}/libavahi-common.la
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
#rm "%{buildroot}/%{_libdir}/libavahi-common.la"
install -d %{buildroot}/%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,$RPM_BUILD_DIR,/," $RPM_BUILD_ROOT%{_libdir}/libavahi-qt4.la
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}/var/adm/fillup-templates
install -m 644 sysconfig.avahi* %{buildroot}/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
%endif
%find_lang %{name} %{?no_lang_C}
%else
# There is no simple way to not install core files. Remove them here.
# The rest is enabled/disabled in configure as needed.
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-client.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-core.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2
rm $RPM_BUILD_ROOT%{_bindir}/avahi-bookmarks
rm -r $RPM_BUILD_ROOT%{python_sitelib}/avahi
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-bookmarks.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-service.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-address.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-resolve.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/avahi-set-host-name.1*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi-daemon.conf.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.hosts.5*
rm $RPM_BUILD_ROOT%{_mandir}/man5/avahi.service.5*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-autoipd.action.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-daemon.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.8*
rm $RPM_BUILD_ROOT%{_mandir}/man8/avahi-dnsconfd.action.8*
rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse-domains.1*
rm %{buildroot}/%{_mandir}/man1/avahi-browse.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish-service.1*
rm %{buildroot}/%{_mandir}/man1/avahi-publish.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-address.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve-host-name.1*
rm %{buildroot}/%{_mandir}/man1/avahi-resolve.1*
rm %{buildroot}/%{_mandir}/man1/avahi-set-host-name.1*
rm %{buildroot}/%{_mandir}/man5/avahi-daemon.conf.5*
rm %{buildroot}/%{_mandir}/man5/avahi.hosts.5*
rm %{buildroot}/%{_mandir}/man5/avahi.service.5*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.action.8*
rm %{buildroot}/%{_mandir}/man8/avahi-daemon.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.8*
rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.action.8*
# Note: This file was intentionally moved to avahi. It is needed for avahi-utils-gtk and python-avahi-gtk:
rm $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
rmdir $RPM_BUILD_ROOT%{_datadir}/avahi
rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi
%else
%if %build_mono
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330
strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif
%endif
%endif
@ -964,13 +964,13 @@ strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
%fdupes $RPM_BUILD_ROOT%{_libdir}
%fdupes %{buildroot}/%{_libdir}
%if %build_core
%pre
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
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_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
@ -996,8 +996,11 @@ fi
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
getent group avahi-autoipd >/dev/null || %{_sbindir}/groupadd -r avahi-autoipd
getent passwd avahi-autoipd >/dev/null || \
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" \
-d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd \
avahi-autoipd
%post autoipd
%{fillup_only -ns avahi autoipd}