SHA256
1
0
forked from pool/xen

- Convert with_stubdom into build_conditional to allow adjusting

via prjconf
- Convert with_debug into build_conditional to allow adjusting
  via prjconf

- bsc#979002 - add 60-persistent-xvd.rules and helper script to
  xen-tools-domU to simplify transition to pvops based kernels
  

- Convert with_oxenstored into build_conditional to allow
  adjusting via prjconf (fate#320836)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=436
This commit is contained in:
Olaf Hering 2016-06-13 15:52:20 +00:00 committed by Git OBS Bridge
parent 28ce061413
commit 14bcab8770
2 changed files with 93 additions and 12 deletions

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Jun 10 14:23:51 UTC 2016 - ohering@suse.de
- Convert with_stubdom into build_conditional to allow adjusting
via prjconf
- Convert with_debug into build_conditional to allow adjusting
via prjconf
-------------------------------------------------------------------
Fri Jun 10 13:36:32 UTC 2016 - ohering@suse.de
- bsc#979002 - add 60-persistent-xvd.rules and helper script to
xen-tools-domU to simplify transition to pvops based kernels
-------------------------------------------------------------------
Fri Jun 10 13:18:13 UTC 2016 - ohering@suse.de
- Convert with_oxenstored into build_conditional to allow
adjusting via prjconf (fate#320836)
-------------------------------------------------------------------
Thu Jun 9 11:10:33 MDT 2016 - carnold@suse.com

View File

@ -24,17 +24,20 @@ ExclusiveArch: %ix86 x86_64 %arm aarch64
%define xen_build_dir xen-4.7.0-testing
#
%define with_kmp 0
%define with_debug 0
%define with_stubdom 0
%define with_gdbsx 0
%define with_dom0_support 0
%define with_qemu_traditional 0
%define with_oxenstored 0
%bcond_with xen_oxenstored
%ifarch x86_64
%bcond_without xen_debug
%bcond_without xen_stubdom
%else
%bcond_with xen_debug
%bcond_with xen_stubdom
%endif
#
%ifarch x86_64
%define with_kmp 0
%define with_debug 1
%define with_stubdom 1
%define with_gdbsx 1
%define with_dom0_support 1
%define with_qemu_traditional 1
@ -108,7 +111,7 @@ BuildRequires: libyajl-devel
BuildRequires: SDL-devel
BuildRequires: pciutils-devel
%endif
%if %{?with_stubdom}0
%if %{with xen_stubdom}
%if 0%{?suse_version} < 1230
BuildRequires: texinfo
%else
@ -116,13 +119,15 @@ BuildRequires: makeinfo
%endif
%endif
BuildRequires: ncurses-devel
%if %{?with_oxenstored}0
%if %{?with_dom0_support}0
%if %{with xen_oxenstored}
BuildRequires: ocaml
BuildRequires: ocaml-compiler-libs
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-runtime
%endif
%endif
BuildRequires: openssl-devel
BuildRequires: python-devel
%if %{?with_systemd}0
@ -687,7 +692,7 @@ then
: no changes?
fi
configure_flags=
%if %{?with_stubdom}0
%if %{with xen_stubdom}
configure_flags=--enable-stubdom
%else
configure_flags=--disable-stubdom
@ -713,9 +718,11 @@ configure_flags="${configure_flags} --disable-qemu-traditional"
--includedir=%{_includedir} \
--docdir=%{_defaultdocdir}/xen \
--with-initddir=%{_initddir} \
%if %{?with_oxenstored}0
%if %{?with_dom0_support}0
%if %{with xen_oxenstored}
--with-xenstored=oxenstored \
%endif
%endif
%if %{?with_systemd}0
--enable-systemd \
--with-systemd=%{_unitdir} \
@ -763,6 +770,54 @@ for i in $RPM_BUILD_ROOT/var/adm/fillup-templates/*
do
mv -v $i ${i%/*}/sysconfig.${i##*/}
done
%if %{?with_systemd}0
udev_rulesdir=$RPM_BUILD_ROOT%{_udevrulesdir}
mkdir -p ${udev_rulesdir}
tee ${udev_rulesdir}/60-persistent-xvd.rules <<'_EOR_'
ACTION=="remove", GOTO="xvd_aliases_end"
SUBSYSTEM!="block", GOTO="xvd_aliases_end"
KERNEL=="xvd*[!0-9]", IMPORT{program}=="%{name}-tools-domU.sh --devpath %%p --devtype $env{DEVTYPE}"
KERNEL=="xvd*[0-9]", IMPORT{program}=="%{name}-tools-domU.sh --devpath %%p --devtype $env{DEVTYPE}"
KERNEL=="xvd*[!0-9]", ENV{VBD_HD_SYMLINK}=="hd[a-d]", SYMLINK+="$env{VBD_HD_SYMLINK}"
KERNEL=="xvd*[0-9]", ENV{VBD_HD_SYMLINK}=="hd[a-d]", SYMLINK+="$env{VBD_HD_SYMLINK}%%n"
LABEL="xvd_aliases_end"
_EOR_
#
udev_programdir=$RPM_BUILD_ROOT/usr/lib/udev
mkdir -p ${udev_programdir}
tee ${udev_programdir}/%{name}-tools-domU.sh <<'_EOS_'
#!/bin/bash
set -e
devpath=
devtype=
dev=
while test "$#" -gt 0
do
: "$1"
case "$1" in
--devpath) devpath=$2 ; shift ;;
--devtype) devtype=$2 ; shift ;;
*) echo "$0: Unknown option $1" >&2 ; exit 1 ;;
esac
shift
done
test -n "${devpath}" || exit 1
test -n "${devtype}" || exit 1
cd "/sys/${devpath}"
case "${devtype}" in
partition) cd .. ;;
esac
cd -P device
d="${PWD##*/}"
d="${d/-/\/}"
backend="`xenstore-read device/${d}/backend`"
dev="`xenstore-read \"${backend}\"/dev`"
test -n "${dev}" && echo "VBD_HD_SYMLINK=${dev}"
_EOS_
chmod 755 ${udev_programdir}/*.sh
%endif
# EFI
%if %{?with_dom0_support}0
export BRP_PESIGN_FILES="*.ko *.efi /lib/firmware"
@ -794,7 +849,7 @@ install_xen()
ln -sf xen-syms${ext}-${XEN_FULLVERSION} $RPM_BUILD_ROOT/boot/xen-syms${ext}
find $RPM_BUILD_ROOT/boot -ls
}
%if %{?with_debug}0
%if %{with xen_debug}
make -C xen install max_phys_cpus=%{max_cpus} debug=y crash_debug=y DEBUG_DIR=/boot DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags}
install_xen dbg
make -C xen clean
@ -958,6 +1013,7 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc
rm -rf $RPM_BUILD_ROOT/%{_datadir}/man
rm -rf $RPM_BUILD_ROOT/%{_libdir}/xen
rm -rf $RPM_BUILD_ROOT/%{_libdir}/python*
rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml*
rm -rf $RPM_BUILD_ROOT%{_unitdir}
rm -rf $RPM_BUILD_ROOT%{with_systemd_modules_load}
rm -rf $RPM_BUILD_ROOT/usr/sbin
@ -1142,7 +1198,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%{_mandir}/man8/*.8.gz
%{_mandir}/man1/xen-list.1.gz
%if %{?with_oxenstored}0
%if %{with xen_oxenstored}
/usr/sbin/oxenstored
/etc/xen/oxenstored.conf
%dir %{_libdir}/ocaml
@ -1194,12 +1250,16 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%endif
/bin/domu-xenstore
/bin/xenstore-*
%if %{?with_systemd}0
/usr/lib/udev
%endif
%files devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%if %{?with_oxenstored}0
%if %{?with_dom0_support}0
%if %{with xen_oxenstored}
%{_libdir}/ocaml/xenbus/*.a
%{_libdir}/ocaml/xenbus/*.cmx*
%{_libdir}/ocaml/xenctrl/*.a
@ -1215,6 +1275,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%{_libdir}/ocaml/xentoollog/*.a
%{_libdir}/ocaml/xentoollog/*.cmx*
%endif
%endif
/usr/include/*
%{_datadir}/pkgconfig/xenlight.pc
%{_datadir}/pkgconfig/xlutil.pc