Accepting request 533776 from home:jengelh:branches:Virtualization

- Do not ignore errors from useradd/groupadd.
- Invoke/expand %service_* just once per scriptlet.
- Replace some old macros.

OBS-URL: https://build.opensuse.org/request/show/533776
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=630
This commit is contained in:
James Fehlig 2017-10-16 15:41:46 +00:00 committed by Git OBS Bridge
parent 3045be0fa6
commit 30e519f2ad
2 changed files with 16 additions and 18 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Oct 12 23:25:48 UTC 2017 - jengelh@inai.de
- Do not ignore errors from useradd/groupadd.
- Invoke/expand %service_* just once per scriptlet.
- Replace some old macros.
-------------------------------------------------------------------
Tue Oct 10 19:50:22 UTC 2017 - jfehlig@suse.com

View File

@ -1105,8 +1105,8 @@ make V=1 %{?_smp_mflags} HTML_DIR=%{_docdir}/%{name}
gzip -9 ChangeLog
%install
%makeinstall SYSTEMD_UNIT_DIR=%{_unitdir} HTML_DIR=%{_docdir}/%{name}
make %{?jobs:-j%jobs} -C examples distclean
%make_install SYSTEMD_UNIT_DIR=%{_unitdir} HTML_DIR=%{_docdir}/%{name}
make %{?_smp_mflags} -C examples distclean
cp examples/lxcconvert/virt-lxc-convert %{buildroot}/%{_bindir}
rm -f %{buildroot}/%{_libdir}/*.la
%if %{with_wireshark}
@ -1245,37 +1245,30 @@ do
rm -f $i
printf 'int main(void) { return 0; }' > $i.c
done
make %{?jobs:-j%jobs}
make %{?_smp_mflags}
if ! make %{?jobs:-j%jobs} check VIR_TEST_DEBUG=1
if ! make %{?_smp_mflags} check VIR_TEST_DEBUG=1
then
cat test-suite.log || true
exit 1
fi
%pre daemon
%service_add_pre libvirtd.service
%service_add_pre virtlockd.service virtlockd.socket
%service_add_pre virtlogd.service virtlogd.socket
%{_bindir}/getent group libvirt >/dev/null || \
%{_sbindir}/groupadd -r libvirt || :
%{_bindir}/getent group libvirt >/dev/null || %{_sbindir}/groupadd -r libvirt
%service_add_pre libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%post daemon
/sbin/ldconfig
%if %{with_apparmor}
%apparmor_reload /etc/apparmor.d/usr.sbin.libvirtd
%endif
%service_add_post libvirtd.service
%service_add_post virtlockd.service virtlockd.socket
%service_add_post virtlogd.service virtlogd.socket
%service_add_post libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%{fillup_only -n libvirtd}
%{fillup_only -n virtlockd}
%{fillup_only -n virtlogd}
%preun daemon
%service_del_preun libvirtd.service
%service_del_preun virtlockd.service virtlockd.socket
%service_del_preun virtlogd.service virtlogd.socket
%service_del_preun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%postun daemon
/sbin/ldconfig
@ -1286,9 +1279,7 @@ if test $1 -eq 0 ; then
done
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%service_del_postun libvirtd.service
%service_del_postun virtlockd.service virtlockd.socket
%service_del_postun virtlogd.service virtlogd.socket
%service_del_postun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%posttrans daemon
# All connection drivers should be installed post transaction.