- Spec file cleanups

xen.spec 
- Renamed xend-sysconfig.patch to xencommons-sysconfig.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=260
This commit is contained in:
Charles Arnold 2013-07-31 20:29:13 +00:00 committed by Git OBS Bridge
parent 9069ef8fe4
commit 1afde18e6c
3 changed files with 63 additions and 185 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jul 31 11:34:14 MDT 2013 - carnold@suse.com
- Spec file cleanups
xen.spec
- Renamed xend-sysconfig.patch to xencommons-sysconfig.patch
-------------------------------------------------------------------
Mon Jul 29 16:46:33 MDT 2013 - carnold@suse.com

241
xen.spec
View File

@ -174,15 +174,15 @@ Source29: block-dmmd
# Xen API remote authentication sources
Source30: etc_pam.d_xen-api
Source31: xenapiusers
# sysconfig hook script for Xen
# Sysconfig hook script for Xen
Source32: xen-updown.sh
# Firewall service file for xend relocation server
Source33: xend-relocation-server.fw
# init script and sysconf file for pciback
# Init script and sysconf file for pciback
Source34: init.pciback
Source35: sysconfig.pciback
Source36: xnloader.py
# systemd service files
# Systemd service files
Source40: xenstored.service
Source41: blktapctrl.service
Source42: xend.service
@ -215,7 +215,7 @@ Patch321: udev-rules.patch
Patch322: libxen_permissive.patch
Patch323: xenconsole-no-multiple-connections.patch
# Needs to go upstream
Patch330: xend-sysconfig.patch
Patch330: xencommons-sysconfig.patch
Patch331: suspend_evtchn_lock.patch
Patch332: xenpaging.doc.patch
# Other bug fixes or features
@ -280,15 +280,10 @@ Xen starts up. Other domains have no access to the hardware; instead
they use virtual interfaces that are provided by Xen (with the help of
the domain 0 kernel).
Xen does support booting other Operating Systems; ports of NetBSD
(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
exist. A port of Windows XP was developed for an earlier version of
Xen, but is not available for release due to license restrictions.
In addition to this package you need to install the kernel-xen and
xen-tools to use Xen. Xen 3 also supports running unmodified guests
using full virtualization, if appropriate hardware is present. Install
xen-tools-ioemu if you want to use this.
In addition to this package you need to install the kernel-xen, xen-libs
and xen-tools packages to use Xen. Xen version 3 and newer also supports
running unmodified guests using full virtualization, if appropriate hardware
is present.
[Hypervisor is a trademark of IBM]
@ -315,34 +310,8 @@ performance and resource isolation.
This package contains the libraries used to interact with the Xen
virtual machine monitor.
Modern computers are sufficiently powerful to use virtualization to
present the illusion of many smaller virtual machines (VMs), each
running a separate operating system instance. Successful partitioning
of a machine to support the concurrent execution of multiple operating
systems poses several challenges. Firstly, virtual machines must be
isolated from one another: It is not acceptable for the execution of
one to adversely affect the performance of another. This is
particularly true when virtual machines are owned by mutually
untrusting users. Secondly, it is necessary to support a variety of
different operating systems to accommodate the heterogeneity of popular
applications. Thirdly, the performance overhead introduced by
virtualization should be small.
Xen uses a technique called paravirtualization: The guest OS is
modified, mainly to enhance performance.
The Xen hypervisor (microkernel) does not provide device drivers for
your hardware (except for CPU and memory). This job is left to the
kernel that's running in domain 0. Thus the domain 0 kernel is
privileged; it has full hardware access. It's started immediately after
Xen starts up. Other domains have no access to the hardware; instead
they use virtual interfaces that are provided by Xen (with the help of
the domain 0 kernel).
Xen does support booting other Operating Systems; ports of NetBSD
(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
exist. A port of Windows XP was developed for an earlier version of
Xen, but is not available for release due to license restrictions.
In addition to this package you need to install kernel-xen, xen and
xen-tools to use Xen.
@ -377,37 +346,9 @@ performance and resource isolation.
This package contains the control tools that allow you to start, stop,
migrate, and manage virtual machines.
Modern computers are sufficiently powerful to use virtualization to
present the illusion of many smaller virtual machines (VMs), each
running a separate operating system instance. Successful partitioning
of a machine to support the concurrent execution of multiple operating
systems poses several challenges. Firstly, virtual machines must be
isolated from one another: It is not acceptable for the execution of
one to adversely affect the performance of another. This is
particularly true when virtual machines are owned by mutually
untrusting users. Secondly, it is necessary to support a variety of
different operating systems to accommodate the heterogeneity of popular
applications. Thirdly, the performance overhead introduced by
virtualization should be small.
In addition to this package you need to install kernel-xen, xen and
xen-libs to use Xen.
Xen uses a technique called paravirtualization: The guest OS is
modified, mainly to enhance performance.
The Xen hypervisor (microkernel) does not provide device drivers for
your hardware (except for CPU and memory). This job is left to the
kernel that's running in domain 0. Thus the domain 0 kernel is
privileged; it has full hardware access. It's started immediately after
Xen starts up. Other domains have no access to the hardware; instead
they use virtual interfaces that are provided by Xen (with the help of
the domain 0 kernel).
Xen does support booting other Operating Systems; ports of NetBSD
(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
exist. A port of Windows XP was developed for an earlier version of
Xen, but is not available for release due to license restrictions.
In addition to this package you need to install kernel-xen and xen to
use Xen.
Authors:
@ -432,12 +373,12 @@ Xen is a virtual machine monitor for x86 that supports execution of
multiple guest operating systems with unprecedented levels of
performance and resource isolation.
This sub-package contains the control tools that allow you to start,
stop, migrate, and manage virtual machines using the legacy xend
toolstack.
This package contains the control tools that allow you to start, stop
migrate, and manage virtual machines using the legacy xend/xm toolstack.
In addition to this package you need to install kernel-xen, xen and
xen-libs to use Xen.
In addition to this package you need to install kernel-xen and xen to
use Xen.
Authors:
@ -477,35 +418,6 @@ performance and resource isolation.
This package contains the libraries and header files needed to create
tools to control virtual machines.
Modern computers are sufficiently powerful to use virtualization to
present the illusion of many smaller virtual machines (VMs), each
running a separate operating system instance. Successful partitioning
of a machine to support the concurrent execution of multiple operating
systems poses several challenges. Firstly, virtual machines must be
isolated from one another: It is not acceptable for the execution of
one to adversely affect the performance of another. This is
particularly true when virtual machines are owned by mutually
untrusting users. Secondly, it is necessary to support a variety of
different operating systems to accommodate the heterogeneity of popular
applications. Thirdly, the performance overhead introduced by
virtualization should be small.
Xen uses a technique called paravirtualization: The guest OS is
modified, mainly to enhance performance.
The Xen hypervisor (microkernel) does not provide device drivers for
your hardware (except for CPU and memory). This job is left to the
kernel that's running in domain 0. Thus the domain 0 kernel is
privileged; it has full hardware access. It's started immediately after
Xen starts up. Other domains have no access to the hardware; instead
they use virtual interfaces that are provided by Xen (with the help of
the domain 0 kernel).
Xen does support booting other Operating Systems; ports of NetBSD
(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
exist. A port of Windows XP was developed for an earlier version of
Xen, but is not available for release due to license restrictions.
Authors:
@ -520,45 +432,12 @@ Group: System/Kernel
Conflicts: xen
%description KMP
Xen para-virtual device drivers for fully virtualized guests
Xen is a virtual machine monitor for x86 that supports execution of
multiple guest operating systems with unprecedented levels of
performance and resource isolation.
This package contains the libraries and header files needed to create
tools to control virtual machines.
Modern computers are sufficiently powerful to use virtualization to
present the illusion of many smaller virtual machines (VMs), each
running a separate operating system instance. Successful partitioning
of a machine to support the concurrent execution of multiple operating
systems poses several challenges. Firstly, virtual machines must be
isolated from one another: It is not acceptable for the execution of
one to adversely affect the performance of another. This is
particularly true when virtual machines are owned by mutually
untrusting users. Secondly, it is necessary to support a variety of
different operating systems to accommodate the heterogeneity of popular
applications. Thirdly, the performance overhead introduced by
virtualization should be small.
Xen uses a technique called paravirtualization: The guest OS is
modified, mainly to enhance performance.
The Xen hypervisor (microkernel) does not provide device drivers for
your hardware (except for CPU and memory). This job is left to the
kernel that's running in domain 0. Thus the domain 0 kernel is
privileged; it has full hardware access. It's started immediately after
Xen starts up. Other domains have no access to the hardware; instead
they use virtual interfaces that are provided by Xen (with the help of
the domain 0 kernel).
Xen does support booting other Operating Systems; ports of NetBSD
(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
exist. A port of Windows XP was developed for an earlier version of
Xen, but is not available for release due to license restrictions.
This package contains the Xen para-virtual device drivers for fully
virtualized guests.
%endif
@ -684,7 +563,7 @@ make -C tools/include/xen-foreign %{?_smp_mflags}
make tools docs %{?_smp_mflags}
%endif
%if %{?with_kmp}0
# pv driver modules
# PV driver modules
export XL=/usr/src/linux
export XEN=/usr/src/linux/include/xen
mkdir -p obj
@ -752,7 +631,7 @@ echo > xen.files.txt
mkdir -p $RPM_BUILD_ROOT/${_libdir}/xen/bin/
ln -s /usr/lib/xen/bin/qemu-dm $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm
# efi depends on gcc46
# EFI depends on gcc46
if test -d $RPM_BUILD_ROOT%{_libdir}/efi
then
echo %{_libdir}/efi >> xen.files.txt
@ -763,6 +642,7 @@ cp -avL xenalyze.hg/xenalyze $RPM_BUILD_ROOT/%{_bindir}
%else
make -C tools install DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} %{?_smp_mflags}
%endif
# PV driver modules
%if %{?with_kmp}0
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
@ -775,9 +655,10 @@ for flavor in %flavors_to_build; do
done
%endif
%if %{?with_dom0_support}0
# Stubdom
%if %{?with_stubdom}0
#remove -fstack-protector flag for stubdom build section
# remove -fstack-protector flag for stubdom build section
export EXTRA_CFLAGS_XEN_TOOLS=$(echo $RPM_OPT_FLAGS |sed -e 's/-fstack-protector//g')
export EXTRA_CFLAGS_QEMU_TRADITIONAL=$(echo $RPM_OPT_FLAGS |sed -e 's/-fstack-protector//g')
export EXTRA_CFLAGS_QEMU_XEN=$(echo $RPM_OPT_FLAGS |sed -e 's/-fstack-protector//g')
@ -790,11 +671,12 @@ mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/xen
ln -s /usr/lib/xen/bin/stubdom-dm $RPM_BUILD_ROOT/usr/lib64/xen/bin/stubdom-dm
ln -s /usr/lib/xen/bin/stubdompath.sh $RPM_BUILD_ROOT/usr/lib64/xen/bin/stubdompath.sh
%endif
#restore -fstack-protector flag
# restore -fstack-protector flag
export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS"
export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS"
export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS"
%endif
# Docs
make -C docs install \
DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} \
@ -807,7 +689,8 @@ for name in vtpm.txt crashdb.txt sedf_scheduler_mini-HOWTO.txt xenpaging.txt; do
install -m 644 docs/misc/$name $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/misc/
done
%endif
# init scripts
# Init scripts
%if %{?with_dom0_support}0
mkdir -p $RPM_BUILD_ROOT/etc/init.d
%ifnarch %arm aarch64
@ -823,31 +706,37 @@ install %SOURCE35 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pciback
%endif
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE26 $RPM_BUILD_ROOT/etc/modprobe.d/xen_loop.conf
# example config
# Example config
mkdir -p $RPM_BUILD_ROOT/etc/xen/{vm,examples,scripts}
mv $RPM_BUILD_ROOT/etc/xen/xmexample* $RPM_BUILD_ROOT/etc/xen/examples
mv $RPM_BUILD_ROOT/etc/xen/xlexample* $RPM_BUILD_ROOT/etc/xen/examples
rm -f $RPM_BUILD_ROOT/etc/xen/examples/*nbd
install -m644 %SOURCE17 %SOURCE18 $RPM_BUILD_ROOT/etc/xen/examples/
install -m644 tools/xentrace/formats $RPM_BUILD_ROOT/etc/xen/examples/xentrace_formats.txt
# scripts
# Scripts
rm -f $RPM_BUILD_ROOT/etc/xen/scripts/block-*nbd
install -m755 %SOURCE19 %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 %SOURCE25 %SOURCE29 $RPM_BUILD_ROOT/etc/xen/scripts/
ln -s /etc/xen/scripts/vm-monitor $RPM_BUILD_ROOT/etc/xen/scripts/set-lock
# Xen API remote authentication files
install -d $RPM_BUILD_ROOT/etc/pam.d
install -m644 %SOURCE30 $RPM_BUILD_ROOT/etc/pam.d/xen-api
install -m644 %SOURCE31 $RPM_BUILD_ROOT/etc/xen/
# sysconfig hook for Xen
# Sysconfig hook for Xen
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/network/scripts
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d
install -m755 %SOURCE32 $RPM_BUILD_ROOT/etc/sysconfig/network/scripts
ln -s /etc/sysconfig/network/scripts/xen-updown.sh $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/xen
ln -s /etc/sysconfig/network/scripts/xen-updown.sh $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/xen
# logrotate
# Logrotate
install -m644 -D %SOURCE15 $RPM_BUILD_ROOT/etc/logrotate.d/xen
# directories
# Directories
mkdir -p $RPM_BUILD_ROOT/var/lib/xenstored
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/images
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/jobs
@ -859,15 +748,18 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/xen/xend-db/vnet
mkdir -p $RPM_BUILD_ROOT/var/log/xen
mkdir -p $RPM_BUILD_ROOT/var/log/xen/console
ln -s /var/lib/xen/images $RPM_BUILD_ROOT/etc/xen/images
# Bootloader
mkdir -p $RPM_BUILD_ROOT/usr/lib/xen/boot/
install -m755 %SOURCE16 $RPM_BUILD_ROOT/usr/lib/xen/boot/
install -m755 %SOURCE36 $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages
# udev support
# Udev support
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xen-backend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xen.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
mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE40} %{buildroot}%{_unitdir}/xenstored.service
@ -878,53 +770,33 @@ install -m 644 %{SOURCE44} %{buildroot}%{_unitdir}/xen-watchdog.service
install -m 644 %{SOURCE45} %{buildroot}%{_unitdir}/xendomains.service
install -m 644 %{SOURCE46} %{buildroot}%{_unitdir}/xencommons.service
%endif
# xen utils
# Xen utils
make -C tools/xen-utils-0.1 install DESTDIR=$RPM_BUILD_ROOT XEN_INTREE_BUILD=yes XEN_ROOT=$PWD
# Clean up unpackaged files
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xen/qemu/
rm -f $RPM_BUILD_ROOT/%{_datadir}/doc/qemu/qemu-*
rm -f $RPM_BUILD_ROOT/%{_datadir}/doc/packages/xen/html/hypercall/.deps
rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/ps
rm -rf $RPM_BUILD_ROOT/usr/share/xen/man/man1/qemu*
rm -rf $RPM_BUILD_ROOT/usr/share/xen/man/man8/qemu*
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-ppc
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/openbios-ppc
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/qemu/openbios-ppc
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc32
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/openbios-sparc32
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/qemu/openbios-sparc32
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc64
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/openbios-sparc64
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/qemu/openbios-sparc64
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/palcode-clipper
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-*
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/qemu/openbios-*
rm -f $RPM_BUILD_ROOT/usr/share/qemu-xen/qemu/palcode-clipper
rm -f $RPM_BUILD_ROOT/usr/sbin/netfix
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/*.egg-info
rm -rf $RPM_BUILD_ROOT/html
rm -rf $RPM_BUILD_ROOT/usr/share/doc/xen/README.*
rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
rm -f $RPM_BUILD_ROOT/%{_bindir}/qemu-img-xen
rm -f $RPM_BUILD_ROOT/%{_bindir}/qemu-nbd-xen
rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
rm -rf $RPM_BUILD_ROOT/usr/lib/debug
# Upstream Qemu
rm -rf $RPM_BUILD_ROOT/usr/local/share/qemu
rm -rf $RPM_BUILD_ROOT/usr/local/share/doc/qemu
rm -f $RPM_BUILD_ROOT/usr/local/etc/qemu/target-x86_64.conf
rm -f $RPM_BUILD_ROOT/usr/local/share/man/man1/qemu.1
rm -f $RPM_BUILD_ROOT/usr/local/share/man/man1/qemu-img.1
rm -f $RPM_BUILD_ROOT/usr/local/share/man/man8/qemu-nbd.8
rm -f $RPM_BUILD_ROOT/usr/local/share/doc/qemu/qemu-doc.html
rm -f $RPM_BUILD_ROOT/usr/local/share/doc/qemu/qemu-tech.html
rm -f $RPM_BUILD_ROOT/usr/etc/qemu/target-x86_64.conf
rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
#install firewall definitions format is described here:
#/usr/share/SuSEfirewall2/services/TEMPLATE
# Install firewall definitions format is described here:
# /usr/share/SuSEfirewall2/services/TEMPLATE
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %{S:26} $RPM_BUILD_ROOT/%{_fwdefdir}/xend-relocation-server
# create symlinks for keymaps
%fdupes -s $RPM_BUILD_ROOT/%{_datadir}
%else
# 32 bit hypervisor no longer supported. Remove dom0 tools.
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc
rm -rf $RPM_BUILD_ROOT/usr/local/share/doc
@ -1224,7 +1096,6 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%files doc-html
%defattr(-,root,root)
%{_defaultdocdir}/xen/html
#%{_datadir}/doc/qemu
%endif
%if %{?with_dom0_support}0
@ -1238,7 +1109,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
/bin/systemctl enable xend.service
/bin/systemctl enable xencommons.service
%else
# enable both xm (xend based) and xl (libxl based)
# Enable both xm (xend based) and xl (libxl based)
if /bin/ls /etc/init.d/rc3.d/S??xend > /dev/null 2>&1 ; then
if ! /bin/ls /etc/init.d/rc3.d/S??xencommons > /dev/null 2>&1 ; then
echo "postin %{name}-tools: Forcing insserv xencommons during package upgrade because xend was enabled."
@ -1256,7 +1127,7 @@ fi
%{fillup_and_insserv -i -y -n xencommons xencommons}
/bin/systemctl enable xencommons.service
%else
# disable xm (xend based) and enable only xl (libxl based)
# Disable xm (xend based) and enable only xl (libxl based)
if /bin/ls /etc/init.d/rc3.d/S??xend > /dev/null 2>&1 ; then
if ! /bin/ls /etc/init.d/rc3.d/S??xencommons > /dev/null 2>&1 ; then
echo "postin %{name}-tools: Forcing insserv xencommons during package upgrade because xend was enabled."