From dd016efad21e7257d43be3568ce25b0f7848c868e455ee62f348001e01bb943b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 10 May 2017 15:29:24 +0000 Subject: [PATCH 1/3] Accepting request 489978 from home:bmwiedemann:branches:GNOME:Factory use strip-nondeterminism to make build fully reproducible now with fixed suse_version to not get unresolvables on Leap and SLE12 OBS-URL: https://build.opensuse.org/request/show/489978 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=135 --- avahi-glib2.spec | 7 +++++++ avahi-mono.changes | 5 +++++ avahi-mono.spec | 6 ++++++ avahi-qt4.spec | 7 +++++++ avahi.spec | 7 +++++++ 5 files changed, 32 insertions(+) diff --git a/avahi-glib2.spec b/avahi-glib2.spec index b00870f..f568489 100644 --- a/avahi-glib2.spec +++ b/avahi-glib2.spec @@ -102,6 +102,9 @@ BuildRequires: python-devel BuildRequires: python-gdbm # libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: libtool +%if 0%{?suse_version} >= 1330 +BuildRequires: strip-nondeterminism +%endif %if %suse_version <= 1110 %define python_sitelib %{py_sitedir} %endif @@ -721,6 +724,7 @@ 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} @@ -948,6 +952,9 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/avahi %else %if %build_mono rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc +%if 0%{?suse_version} >= 1330 +strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip +%endif %endif %endif %endif diff --git a/avahi-mono.changes b/avahi-mono.changes index cce2ad4..2ae494b 100644 --- a/avahi-mono.changes +++ b/avahi-mono.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 21 13:49:59 UTC 2017 - bwiedemann@suse.com + +- use strip-nondeterminism to make build fully reproducible + ------------------------------------------------------------------- Sat Sep 17 13:52:32 UTC 2011 - jengelh@medozas.de diff --git a/avahi-mono.spec b/avahi-mono.spec index b940efb..901a00a 100644 --- a/avahi-mono.spec +++ b/avahi-mono.spec @@ -102,6 +102,9 @@ BuildRequires: python-devel BuildRequires: python-gdbm # libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: libtool +%if 0%{?suse_version} >= 1330 +BuildRequires: strip-nondeterminism +%endif %if %suse_version <= 1110 %define python_sitelib %{py_sitedir} %endif @@ -948,6 +951,9 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/avahi %else %if %build_mono rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc +%if 0%{?suse_version} >= 1330 +strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip +%endif %endif %endif %endif diff --git a/avahi-qt4.spec b/avahi-qt4.spec index 6fbf151..7206296 100644 --- a/avahi-qt4.spec +++ b/avahi-qt4.spec @@ -102,6 +102,9 @@ BuildRequires: python-devel BuildRequires: python-gdbm # libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: libtool +%if 0%{?suse_version} >= 1330 +BuildRequires: strip-nondeterminism +%endif %if %suse_version <= 1110 %define python_sitelib %{py_sitedir} %endif @@ -723,6 +726,7 @@ 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} @@ -950,6 +954,9 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/avahi %else %if %build_mono rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc +%if 0%{?suse_version} >= 1330 +strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip +%endif %endif %endif %endif diff --git a/avahi.spec b/avahi.spec index 473186e..6c728f4 100644 --- a/avahi.spec +++ b/avahi.spec @@ -104,6 +104,9 @@ BuildRequires: python-devel BuildRequires: python-gdbm # libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: libtool +%if 0%{?suse_version} >= 1330 +BuildRequires: strip-nondeterminism +%endif %if %suse_version <= 1110 %define python_sitelib %{py_sitedir} %endif @@ -723,6 +726,7 @@ 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} @@ -950,6 +954,9 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/avahi %else %if %build_mono rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc +%if 0%{?suse_version} >= 1330 +strip-nondeterminism $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/*.zip +%endif %endif %endif %endif 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 2/3] 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 From 261a85bc54575253b16f855ff55768f8b3dfa92b31a350908ba8a9b485346f94 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 1 Jun 2017 09:06:25 +0000 Subject: [PATCH 3/3] 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 --- avahi-glib2.spec | 111 ++++++++++++++++++++++++----------------------- avahi-mono.spec | 111 ++++++++++++++++++++++++----------------------- avahi-qt4.spec | 111 ++++++++++++++++++++++++----------------------- avahi.changes | 7 +++ avahi.spec | 111 ++++++++++++++++++++++++----------------------- 5 files changed, 235 insertions(+), 216 deletions(-) diff --git a/avahi-glib2.spec b/avahi-glib2.spec index 19de9e7..ff5b77b 100644 --- a/avahi-glib2.spec +++ b/avahi-glib2.spec @@ -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} diff --git a/avahi-mono.spec b/avahi-mono.spec index eed058a..b5ddb99 100644 --- a/avahi-mono.spec +++ b/avahi-mono.spec @@ -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} diff --git a/avahi-qt4.spec b/avahi-qt4.spec index dc6d354..988b2ab 100644 --- a/avahi-qt4.spec +++ b/avahi-qt4.spec @@ -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} diff --git a/avahi.changes b/avahi.changes index eabc3ba..3beb809 100644 --- a/avahi.changes +++ b/avahi.changes @@ -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 diff --git a/avahi.spec b/avahi.spec index 18bf4b1..c49e3c0 100644 --- a/avahi.spec +++ b/avahi.spec @@ -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}