[packages/xe-guest-utilities] - fix systemd support
adamg
adamg at pld-linux.org
Mon Feb 20 09:18:02 CET 2023
commit af7f8a79859137e4d5cd1d982da068d171f9f92b
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Mon Feb 20 09:07:12 2023 +0100
- fix systemd support
xe-guest-utilities-systemd.patch | 15 +++++++++++++++
xe-guest-utilities.spec | 13 +++++++------
2 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/xe-guest-utilities.spec b/xe-guest-utilities.spec
index b3b1b3e..2659b97 100644
--- a/xe-guest-utilities.spec
+++ b/xe-guest-utilities.spec
@@ -8,6 +8,7 @@ Source0: https://github.com/xenserver/xe-guest-utilities/archive/refs/heads/mast
Source1: %{name}.init
Source2: %{name}.sysconfig
Patch0: %{name}-recognize-pld.patch
+Patch1: %{name}-systemd.patch
URL: https://github.com/xenserver/xe-guest-utilities/
BuildRequires: golang
BuildRequires: rpmbuild(macros) >= 2.009
@@ -24,6 +25,7 @@ XenStore.
%prep
%setup -q -n %{name}-master
%patch0 -p1
+%patch1 -p1
ln -sf %{_libdir}/golang/src/cmd/vendor/golang.org vendor
%build
@@ -39,7 +41,7 @@ install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libexecdir}/%{name}} \
install -p build/stage%{_sbindir}/* $RPM_BUILD_ROOT%{_sbindir}
install -p build/stage%{_bindir}/* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
-install -p mk/xe-linux-distribution.service $RPM_BUILD_ROOT%{systemdunitdir}
+install -p mk/xe-linux-distribution.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
install -p mk/xen-vcpu-hotplug.rules $RPM_BUILD_ROOT%{_udevrulesdir}/z10-xen-vcpu-hotplug.rules
cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
@@ -54,15 +56,14 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/cache/xe-linux-distribution
%preun
if [ "$1" = "0" ]; then
- %service xe-guest-utilitites stop
- /sbin/chkconfig --del xe-guest-utilitites
+ %service xe-guest-utilities stop
+ /sbin/chkconfig --del xe-guest-utilities
fi
-%systemd_preun xe-guest-utilitites.service
+%systemd_preun xe-guest-utilities.service
%postun
%systemd_reload
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -72,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_sbindir}/xe-daemon
%attr(755,root,root) %{_sbindir}/xe-linux-distribution
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xe-guest-utilities
-%{systemdunitdir}/xe-linux-distribution.service
+%{systemdunitdir}/%{name}.service
%{_udevrulesdir}/z10-xen-vcpu-hotplug.rules
%{_libexecdir}/xe-guest-utilities
%attr(754,root,root) /etc/rc.d/init.d/xe-guest-utilities
diff --git a/xe-guest-utilities-systemd.patch b/xe-guest-utilities-systemd.patch
new file mode 100644
index 0000000..3e6a2d8
--- /dev/null
+++ b/xe-guest-utilities-systemd.patch
@@ -0,0 +1,15 @@
+--- xe-guest-utilities-master/mk/xe-linux-distribution.service~ 2022-02-23 13:00:31.000000000 +0100
++++ xe-guest-utilities-master/mk/xe-linux-distribution.service 2023-02-20 09:01:40.369998707 +0100
+@@ -3,8 +3,8 @@
+ ConditionVirtualization=xen
+
+ [Service]
+-ExecStartPre=/usr/share/oem/xs/xe-linux-distribution /var/cache/xe-linux-distribution
+-ExecStart=/usr/share/oem/xs/xe-daemon
++ExecStartPre=/usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution
++ExecStart=/usr/sbin/xe-daemon
+
+ [Install]
+-WantedBy=multi-user.target
+\ No newline at end of file
++WantedBy=multi-user.target
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xe-guest-utilities.git/commitdiff/263ed683afd64a14f808ff22199ab74c538f8484
More information about the pld-cvs-commit
mailing list