From 9283b45508901ac8a07ab479258278018bde3ef859e1cfbdb97f12c441418b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 22 Feb 2015 16:08:09 +0000 Subject: [PATCH] Accepting request 287224 from home:pluskalm:branches:Virtualization - Add user kvm when installing guest-agent. - Use macro to update udev_rules when available OBS-URL: https://build.opensuse.org/request/show/287224 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=235 --- libcacard.spec | 2 +- qemu-linux-user.spec | 2 +- qemu.changes | 6 ++++++ qemu.spec | 9 ++++++++- qemu.spec.in | 7 +++++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/libcacard.spec b/libcacard.spec index 554cfaf..a688d33 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -1,7 +1,7 @@ # # spec file for package libcacard # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index b9a7e53..e8c2591 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -1,7 +1,7 @@ # # spec file for package qemu-linux-user # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/qemu.changes b/qemu.changes index 7c43f85..95adeee 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 22 15:59:23 UTC 2015 - mpluskal@suse.com + +- Add user kvm when installing guest-agent. +- Use macro to update udev_rules when available + ------------------------------------------------------------------- Wed Feb 11 17:56:26 UTC 2015 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 782fbed..cf1cfbf 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -634,13 +634,20 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \ -c "qemu user" qemu +%pre guest-agent +%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null + %if %{kvm_available} %post +%if 0%{?with_systemd} +%udev_rules_update +%else if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm control --reload-rules || : /sbin/udevadm trigger || : fi %endif +%endif %if 0%{?suse_version} >= 1130 %post tools diff --git a/qemu.spec.in b/qemu.spec.in index adc9828..416d331 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -562,13 +562,20 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \ -c "qemu user" qemu +%pre guest-agent +%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null + %if %{kvm_available} %post +%if 0%{?with_systemd} +%udev_rules_update +%else if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm control --reload-rules || : /sbin/udevadm trigger || : fi %endif +%endif %if 0%{?suse_version} >= 1130 %post tools