Accepting request 345200 from home:tampakrap:branches:Virtualization
- Add systemd unit file and udev rules for qemu guest agent - taken from the SLE12 / Leap package, see boo#955707 - Add systemd unit file and udev rules for qemu guest agent - taken from the SLE12 / Leap package, see boo#955707 OBS-URL: https://build.opensuse.org/request/show/345200 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=277
This commit is contained in:
parent
e93e3df04b
commit
d61811545e
1
80-qemu-ga.rules
Normal file
1
80-qemu-ga.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-ga.service"
|
11
qemu-ga.service
Normal file
11
qemu-ga.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=QEMU Guest Agent
|
||||||
|
Documentation=http://wiki.qemu.org/Features/QAPI/GuestAgent
|
||||||
|
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
||||||
|
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=-/usr/bin/qemu-ga
|
||||||
|
Restart=always
|
||||||
|
RestartSec=0
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 19 11:23:26 UTC 2015 - tampakrap@opensuse.org
|
||||||
|
|
||||||
|
- Add systemd unit file and udev rules for qemu guest agent
|
||||||
|
- taken from the SLE12 / Leap package, see boo#955707
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 28 18:53:37 UTC 2015 - afaerber@suse.de
|
Wed Oct 28 18:53:37 UTC 2015 - afaerber@suse.de
|
||||||
|
|
||||||
|
@ -62,6 +62,8 @@ Source4: qemu-kvm.1.gz
|
|||||||
Source5: 60-kvm.rules
|
Source5: 60-kvm.rules
|
||||||
Source6: ksm.service
|
Source6: ksm.service
|
||||||
Source7: 60-kvm.x86.rules
|
Source7: 60-kvm.x86.rules
|
||||||
|
Source8: 80-qemu-ga.rules
|
||||||
|
Source9: qemu-ga.service
|
||||||
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
||||||
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
||||||
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
|
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
|
||||||
@ -497,6 +499,9 @@ This sub-package contains various tools, including a bridge helper.
|
|||||||
Summary: Universal CPU emulator -- Guest agent
|
Summary: Universal CPU emulator -- Guest agent
|
||||||
Group: System/Emulators/PC
|
Group: System/Emulators/PC
|
||||||
Provides: qemu:%_bindir/qemu-ga
|
Provides: qemu:%_bindir/qemu-ga
|
||||||
|
%if 0%{?with_systemd}
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description guest-agent
|
%description guest-agent
|
||||||
QEMU is an extremely well-performing CPU emulator that allows you to
|
QEMU is an extremely well-performing CPU emulator that allows you to
|
||||||
@ -890,6 +895,8 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||||
|
install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rule
|
||||||
|
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||||
%fdupes -s $RPM_BUILD_ROOT
|
%fdupes -s $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%else # qemu-testsuite
|
%else # qemu-testsuite
|
||||||
@ -910,9 +917,6 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
|
|||||||
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
||||||
-c "qemu user" qemu
|
-c "qemu user" qemu
|
||||||
|
|
||||||
%pre guest-agent
|
|
||||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
|
||||||
|
|
||||||
%if %{kvm_available}
|
%if %{kvm_available}
|
||||||
%post
|
%post
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
@ -933,7 +937,24 @@ fi
|
|||||||
%verify_permissions %_libexecdir/qemu-bridge-helper
|
%verify_permissions %_libexecdir/qemu-bridge-helper
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre guest-agent
|
||||||
|
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%service_add_pre qemu-ga.service
|
||||||
|
|
||||||
|
%preun guest-agent
|
||||||
|
%service_del_preun qemu-ga.service
|
||||||
|
|
||||||
|
%post guest-agent
|
||||||
|
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
|
||||||
|
/sbin/udevadm control --reload-rules || :
|
||||||
|
/sbin/udevadm trigger || :
|
||||||
|
fi
|
||||||
|
%service_add_post qemu-ga.service
|
||||||
|
|
||||||
|
%postun guest-agent
|
||||||
|
%service_del_postun qemu-ga.service
|
||||||
|
|
||||||
%pre ksm
|
%pre ksm
|
||||||
%service_add_pre ksm.service
|
%service_add_pre ksm.service
|
||||||
|
|
||||||
@ -1117,8 +1138,10 @@ fi
|
|||||||
%files guest-agent
|
%files guest-agent
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%attr(755,root,kvm) %_bindir/qemu-ga
|
%attr(755,root,kvm) %_bindir/qemu-ga
|
||||||
|
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%{_unitdir}/qemu-ga.service
|
||||||
|
%{_udevrulesdir}/80-qemu-ga.rules
|
||||||
|
|
||||||
%files ksm
|
%files ksm
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_unitdir}/ksm.service
|
%{_unitdir}/ksm.service
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 19 11:23:26 UTC 2015 - tampakrap@opensuse.org
|
||||||
|
|
||||||
|
- Add systemd unit file and udev rules for qemu guest agent
|
||||||
|
- taken from the SLE12 / Leap package, see boo#955707
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 28 18:53:37 UTC 2015 - afaerber@suse.de
|
Wed Oct 28 18:53:37 UTC 2015 - afaerber@suse.de
|
||||||
|
|
||||||
|
31
qemu.spec
31
qemu.spec
@ -62,6 +62,8 @@ Source4: qemu-kvm.1.gz
|
|||||||
Source5: 60-kvm.rules
|
Source5: 60-kvm.rules
|
||||||
Source6: ksm.service
|
Source6: ksm.service
|
||||||
Source7: 60-kvm.x86.rules
|
Source7: 60-kvm.x86.rules
|
||||||
|
Source8: 80-qemu-ga.rules
|
||||||
|
Source9: qemu-ga.service
|
||||||
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
||||||
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
||||||
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
|
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
|
||||||
@ -497,6 +499,9 @@ This sub-package contains various tools, including a bridge helper.
|
|||||||
Summary: Universal CPU emulator -- Guest agent
|
Summary: Universal CPU emulator -- Guest agent
|
||||||
Group: System/Emulators/PC
|
Group: System/Emulators/PC
|
||||||
Provides: qemu:%_bindir/qemu-ga
|
Provides: qemu:%_bindir/qemu-ga
|
||||||
|
%if 0%{?with_systemd}
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description guest-agent
|
%description guest-agent
|
||||||
QEMU is an extremely well-performing CPU emulator that allows you to
|
QEMU is an extremely well-performing CPU emulator that allows you to
|
||||||
@ -890,6 +895,8 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||||
|
install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rule
|
||||||
|
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||||
%fdupes -s $RPM_BUILD_ROOT
|
%fdupes -s $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%else # qemu-testsuite
|
%else # qemu-testsuite
|
||||||
@ -910,9 +917,6 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
|
|||||||
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
||||||
-c "qemu user" qemu
|
-c "qemu user" qemu
|
||||||
|
|
||||||
%pre guest-agent
|
|
||||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
|
||||||
|
|
||||||
%if %{kvm_available}
|
%if %{kvm_available}
|
||||||
%post
|
%post
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
@ -933,7 +937,24 @@ fi
|
|||||||
%verify_permissions %_libexecdir/qemu-bridge-helper
|
%verify_permissions %_libexecdir/qemu-bridge-helper
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre guest-agent
|
||||||
|
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%service_add_pre qemu-ga.service
|
||||||
|
|
||||||
|
%preun guest-agent
|
||||||
|
%service_del_preun qemu-ga.service
|
||||||
|
|
||||||
|
%post guest-agent
|
||||||
|
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
|
||||||
|
/sbin/udevadm control --reload-rules || :
|
||||||
|
/sbin/udevadm trigger || :
|
||||||
|
fi
|
||||||
|
%service_add_post qemu-ga.service
|
||||||
|
|
||||||
|
%postun guest-agent
|
||||||
|
%service_del_postun qemu-ga.service
|
||||||
|
|
||||||
%pre ksm
|
%pre ksm
|
||||||
%service_add_pre ksm.service
|
%service_add_pre ksm.service
|
||||||
|
|
||||||
@ -1117,8 +1138,10 @@ fi
|
|||||||
%files guest-agent
|
%files guest-agent
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%attr(755,root,kvm) %_bindir/qemu-ga
|
%attr(755,root,kvm) %_bindir/qemu-ga
|
||||||
|
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%{_unitdir}/qemu-ga.service
|
||||||
|
%{_udevrulesdir}/80-qemu-ga.rules
|
||||||
|
|
||||||
%files ksm
|
%files ksm
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_unitdir}/ksm.service
|
%{_unitdir}/ksm.service
|
||||||
|
30
qemu.spec.in
30
qemu.spec.in
@ -62,6 +62,8 @@ Source4: qemu-kvm.1.gz
|
|||||||
Source5: 60-kvm.rules
|
Source5: 60-kvm.rules
|
||||||
Source6: ksm.service
|
Source6: ksm.service
|
||||||
Source7: 60-kvm.x86.rules
|
Source7: 60-kvm.x86.rules
|
||||||
|
Source8: 80-qemu-ga.rules
|
||||||
|
Source9: qemu-ga.service
|
||||||
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
# Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch
|
||||||
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
||||||
PATCH_FILES
|
PATCH_FILES
|
||||||
@ -458,6 +460,9 @@ This sub-package contains various tools, including a bridge helper.
|
|||||||
Summary: Universal CPU emulator -- Guest agent
|
Summary: Universal CPU emulator -- Guest agent
|
||||||
Group: System/Emulators/PC
|
Group: System/Emulators/PC
|
||||||
Provides: qemu:%_bindir/qemu-ga
|
Provides: qemu:%_bindir/qemu-ga
|
||||||
|
%if 0%{?with_systemd}
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description guest-agent
|
%description guest-agent
|
||||||
QEMU is an extremely well-performing CPU emulator that allows you to
|
QEMU is an extremely well-performing CPU emulator that allows you to
|
||||||
@ -812,6 +817,8 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||||
|
install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rule
|
||||||
|
install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||||
%fdupes -s $RPM_BUILD_ROOT
|
%fdupes -s $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%else # qemu-testsuite
|
%else # qemu-testsuite
|
||||||
@ -832,8 +839,6 @@ install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
|
|||||||
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
%{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
||||||
-c "qemu user" qemu
|
-c "qemu user" qemu
|
||||||
|
|
||||||
%pre guest-agent
|
|
||||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
|
||||||
|
|
||||||
%if %{kvm_available}
|
%if %{kvm_available}
|
||||||
%post
|
%post
|
||||||
@ -855,7 +860,24 @@ fi
|
|||||||
%verify_permissions %_libexecdir/qemu-bridge-helper
|
%verify_permissions %_libexecdir/qemu-bridge-helper
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre guest-agent
|
||||||
|
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%service_add_pre qemu-ga.service
|
||||||
|
|
||||||
|
%preun guest-agent
|
||||||
|
%service_del_preun qemu-ga.service
|
||||||
|
|
||||||
|
%post guest-agent
|
||||||
|
if [ "$(readlink -f /proc/1/root)" = "/" ]; then
|
||||||
|
/sbin/udevadm control --reload-rules || :
|
||||||
|
/sbin/udevadm trigger || :
|
||||||
|
fi
|
||||||
|
%service_add_post qemu-ga.service
|
||||||
|
|
||||||
|
%postun guest-agent
|
||||||
|
%service_del_postun qemu-ga.service
|
||||||
|
|
||||||
%pre ksm
|
%pre ksm
|
||||||
%service_add_pre ksm.service
|
%service_add_pre ksm.service
|
||||||
|
|
||||||
@ -1039,8 +1061,10 @@ fi
|
|||||||
%files guest-agent
|
%files guest-agent
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%attr(755,root,kvm) %_bindir/qemu-ga
|
%attr(755,root,kvm) %_bindir/qemu-ga
|
||||||
|
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
|
%{_unitdir}/qemu-ga.service
|
||||||
|
%{_udevrulesdir}/80-qemu-ga.rules
|
||||||
|
|
||||||
%files ksm
|
%files ksm
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_unitdir}/ksm.service
|
%{_unitdir}/ksm.service
|
||||||
|
Loading…
Reference in New Issue
Block a user