Fix SLE11 build dependency with systemd
OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=261
This commit is contained in:
parent
1afde18e6c
commit
e50de91dbe
17
xen.spec
17
xen.spec
@ -76,7 +76,9 @@ BuildRequires: pciutils-devel
|
|||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: texinfo
|
BuildRequires: texinfo
|
||||||
BuildRequires: transfig
|
BuildRequires: transfig
|
||||||
|
%if %suse_version >= 1230
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
%endif
|
||||||
%if %suse_version >= 1120
|
%if %suse_version >= 1120
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
%endif
|
%endif
|
||||||
@ -760,7 +762,7 @@ mv $RPM_BUILD_ROOT/etc/udev/rules.d/xen-backend.rules $RPM_BUILD_ROOT/etc/udev/r
|
|||||||
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xend.rules
|
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xend.rules
|
||||||
|
|
||||||
# Systemd
|
# Systemd
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 644 %{SOURCE40} %{buildroot}%{_unitdir}/xenstored.service
|
install -m 644 %{SOURCE40} %{buildroot}%{_unitdir}/xenstored.service
|
||||||
install -m 644 %{SOURCE41} %{buildroot}%{_unitdir}/blktapctrl.service
|
install -m 644 %{SOURCE41} %{buildroot}%{_unitdir}/blktapctrl.service
|
||||||
@ -982,7 +984,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
|
|||||||
%ifnarch %arm aarch64
|
%ifnarch %arm aarch64
|
||||||
%config /etc/init.d/pciback
|
%config /etc/init.d/pciback
|
||||||
%endif
|
%endif
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
%{_unitdir}/xendomains.service
|
%{_unitdir}/xendomains.service
|
||||||
%{_unitdir}/xencommons.service
|
%{_unitdir}/xencommons.service
|
||||||
%{_unitdir}/xenstored.service
|
%{_unitdir}/xenstored.service
|
||||||
@ -1055,7 +1057,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
|
|||||||
%dir %{_libdir}/python%{pyver}/site-packages/xen/xm
|
%dir %{_libdir}/python%{pyver}/site-packages/xen/xm
|
||||||
%dir %{_libdir}/python%{pyver}/site-packages/xen/web
|
%dir %{_libdir}/python%{pyver}/site-packages/xen/web
|
||||||
%config /etc/init.d/xend
|
%config /etc/init.d/xend
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
%{_unitdir}/xend.service
|
%{_unitdir}/xend.service
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -1102,8 +1104,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
|
|||||||
|
|
||||||
%post tools
|
%post tools
|
||||||
%if %{?with_xend}0
|
%if %{?with_xend}0
|
||||||
# with_xend
|
%if %{?with_systemd}0
|
||||||
%if %with_systemd
|
|
||||||
%{fillup_and_insserv -i -y -n xencommons xencommons}
|
%{fillup_and_insserv -i -y -n xencommons xencommons}
|
||||||
%{fillup_and_insserv -i -y -n xend xend}
|
%{fillup_and_insserv -i -y -n xend xend}
|
||||||
/bin/systemctl enable xend.service
|
/bin/systemctl enable xend.service
|
||||||
@ -1123,7 +1124,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
# without_xend
|
# without_xend
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
%{fillup_and_insserv -i -y -n xencommons xencommons}
|
%{fillup_and_insserv -i -y -n xencommons xencommons}
|
||||||
/bin/systemctl enable xencommons.service
|
/bin/systemctl enable xencommons.service
|
||||||
%else
|
%else
|
||||||
@ -1143,7 +1144,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
#
|
#
|
||||||
%ifnarch %arm aarch64
|
%ifnarch %arm aarch64
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
%{fillup_and_insserv -i -y -n xendomains xendomains}
|
%{fillup_and_insserv -i -y -n xendomains xendomains}
|
||||||
/bin/systemctl enable xendomains.service
|
/bin/systemctl enable xendomains.service
|
||||||
%else
|
%else
|
||||||
@ -1165,7 +1166,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun tools
|
%preun tools
|
||||||
%if %with_systemd
|
%if %{?with_systemd}0
|
||||||
/bin/systemctl disable xend.service
|
/bin/systemctl disable xend.service
|
||||||
/bin/systemctl disable xencommons.service
|
/bin/systemctl disable xencommons.service
|
||||||
/bin/systemctl disable xendomains.service
|
/bin/systemctl disable xendomains.service
|
||||||
|
Loading…
Reference in New Issue
Block a user