[xen/f19] systemd changes to allow oxenstored to be used instead of xenstored

myoung myoung at fedoraproject.org
Fri Oct 25 17:57:59 UTC 2013


commit c8c747c4d3a79a2170d2f9ea636cabd68ee82bcb
Author: Michael Young <m.a.young at durham.ac.uk>
Date:   Fri Oct 25 18:55:38 2013 +0100

    systemd changes to allow oxenstored to be used instead of xenstored

 oxenstored.service  |   20 ++++++++++++++++++++
 xen.spec            |   10 +++++++++-
 xenconsoled.service |    2 +-
 xendomains.service  |    4 ++--
 4 files changed, 32 insertions(+), 4 deletions(-)
---
diff --git a/oxenstored.service b/oxenstored.service
new file mode 100644
index 0000000..915c0aa
--- /dev/null
+++ b/oxenstored.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Oxenstored - ocaml version of daemon managing xenstore file system
+Requires=proc-xen.mount var-lib-xenstored.mount
+After=proc-xen.mount var-lib-xenstored.mount
+Before=libvirtd.service libvirt-guests.service
+Conflicts=xenstored.service
+RefuseManualStop=true
+ConditionPathExists=/proc/xen
+
+[Service]
+Type=forking
+Environment=XENSTORED_ARGS=
+EnvironmentFile=-/etc/sysconfig/xenstored
+PIDFile=/var/run/xenstored.pid
+ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
+ExecStart=/usr/sbin/oxenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
+ExecStartPost=-/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
+
+[Install]
+WantedBy=multi-user.target
diff --git a/xen.spec b/xen.spec
index f2301a4..79e654f 100644
--- a/xen.spec
+++ b/xen.spec
@@ -27,7 +27,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 4.2.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 Group:   Development/Libraries
 License: GPLv2+ and LGPLv2+ and BSD
 URL:     http://xen.org/
@@ -60,6 +60,7 @@ Source46: xen-watchdog.service
 Source47: xendomains.service
 Source48: libexec.xendomains
 Source49: tmpfiles.d.xen.conf
+Source50: oxenstored.service
 
 Patch1: xen-initscript.patch
 Patch4: xen-dumpdir.patch
@@ -406,6 +407,9 @@ install -m 755 %{SOURCE48} %{buildroot}%{_libexecdir}/xendomains
 mkdir -p %{buildroot}/usr/lib/tmpfiles.d
 install -m 644 %{SOURCE49} %{buildroot}/usr/lib/tmpfiles.d/xen.conf
 %endif
+%if %build_ocaml
+install -m 644 %{SOURCE50} %{buildroot}%{_unitdir}/oxenstored.service
+%endif
 
 # config file only used for hotplug, Fedora uses udev instead
 rm -f %{buildroot}/%{_sysconfdir}/sysconfig/xend
@@ -747,6 +751,7 @@ rm -rf %{buildroot}
 %{_libdir}/ocaml/stublibs/*.so.owner
 %{_sbindir}/oxenstored
 %config(noreplace) %{_sysconfdir}/xen/oxenstored.conf
+%{_unitdir}/oxenstored.service
 
 %files ocaml-devel
 %defattr(-,root,root)
@@ -756,6 +761,9 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
+* Fri Oct 25 2013 Michael Young <m.a.young at durham.ac.uk> - 4.2.3-5
+- systemd changes to allow oxenstored to be used instead of xenstored (#1022640)
+
 * Thu Oct 10 2013 Michael Young <m.a.young at durham.ac.uk> - 4.2.3-4
 - security fixes (#1017843)
   Information leak through outs instruction emulation in 64-bit PV guests
diff --git a/xenconsoled.service b/xenconsoled.service
index 4c5429f..daee72d 100644
--- a/xenconsoled.service
+++ b/xenconsoled.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Xenconsoled - handles logging from guest consoles and hypervisor
 Requires=proc-xen.mount
-After=proc-xen.mount xenstored.service
+After=proc-xen.mount xenstored.service oxenstored.service
 ConditionPathExists=/proc/xen
 
 [Service]
diff --git a/xendomains.service b/xendomains.service
index 0bd72d7..2062ae6 100644
--- a/xendomains.service
+++ b/xendomains.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Xendomains - start and stop guests on boot and shutdown
-Requires=proc-xen.mount xenstored.service
-After=proc-xen.mount xenstored.service xenconsoled.service
+Requires=proc-xen.mount
+After=proc-xen.mount xenstored.service xenconsoled.service oxenstored.service
 ConditionPathExists=/proc/xen
 
 [Service]


More information about the scm-commits mailing list