From 769c19d519f7b4e5a886d79ed0acb4b86f1d97812bdbd28557eeb6d99b3b2e0e Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 14 Sep 2011 18:13:45 +0000 Subject: [PATCH] remove qemu user:group creation OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=148 --- libvirt.changes | 10 ++++++++++ libvirt.spec | 17 +++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index 437a796..62d54d0 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Sep 14 12:06:36 MDT 2011 - jfehlig@suse.com + +- Add 'Conflicts: kvm < 0.14.1' to ensure libvirt is using a + kvm package that creates qemu user:group. Remove user:group + creation from libvirt + bnc#694883 +- Add libvirt group at package installation + bnc#694885 + ------------------------------------------------------------------- Thu Sep 8 11:11:07 MDT 2011 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index ad11952..498e621 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -295,6 +295,7 @@ AutoReqProv: yes Version: 0.9.4 Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux +Conflicts: kvm < 0.14.1 # The client side, i.e. shared libs and virsh are in a subpackage Requires: %{name}-client = %{version}-%{release} @@ -456,7 +457,6 @@ Authors: Karel Zak %if %{with_python} - %package python License: LGPLv2.1+ Summary: A C toolkit to interract with the virtualization capabilities of Linux @@ -708,6 +708,10 @@ install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_fwdefdir}/libvirtd-relocation-server %clean rm -rf $RPM_BUILD_ROOT +%pre +%{_bindir}/getent group libvirt >/dev/null || \ + %{_sbindir}/groupadd -r libvirt 2>/dev/null + %post /sbin/ldconfig %if %{with_libvirtd} @@ -721,15 +725,6 @@ then > %{_sysconfdir}/libvirt/qemu/networks/default.xml fi %endif -# Create qemu user:group if necessary -if test "%{qemu_user}" = "qemu"; then - %{_bindir}/getent group qemu >/dev/null || \ - %{_sbindir}/groupadd -r qemu 2>/dev/null - %{_bindir}/getent group kvm >/dev/null && group_opts="-G kvm" - %{_bindir}/getent passwd qemu >/dev/null || \ - %{_sbindir}/useradd -r -g qemu $group_opts -d / -s /sbin/nologin \ - -c "qemu user" qemu -fi %if 0%{?sles_version} %{fillup_and_insserv -y libvirtd} %else @@ -755,7 +750,6 @@ fi %postun client -p /sbin/ldconfig %if %{with_libvirtd} - %files %defattr(-, root, root) %{_sbindir}/libvirtd @@ -885,7 +879,6 @@ fi %doc %{_docdir}/%{name}/html %if %{with_python} - %files python %defattr(-, root, root) %doc %{_docdir}/%{name}-python