File xen.spec of Package xen

#
# spec file for package xen (Version 3.3.1_18546_24)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           xen
ExclusiveArch:  %ix86 x86_64
%define xvers 3.3
%define xvermaj 3
%define changeset 18546
%define xen_build_dir xen-3.3.1-testing
%define with_kmp 1
BuildRequires:  LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texlive texlive-latex transfig
%ifarch x86_64
BuildRequires:  glibc-32bit glibc-devel-32bit
%endif
%if %{?with_kmp}0
BuildRequires:  kernel-source kernel-syms module-init-tools xorg-x11
%endif
Version:        3.3.1_18546_24
Release:        0.<RELEASE4>
License:        GPL v2 only
Group:          System/Kernel
AutoReqProv:    on
PreReq:         %insserv_prereq %fillup_prereq
Summary:        Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
Source0:        xen-3.3.1-testing-src.tar.bz2
Source2:        README.SuSE
Source3:        boot.xen
Source4:        boot.local.xenU
Source5:        init.xend
Source6:        init.xendomains
Source7:        logrotate.conf
Source8:        domUloader.py
Source9:        xmexample.domUloader
Source10:       xmexample.disks
Source11:       block-nbd
Source12:       block-iscsi
Source13:       block-npiv-common.sh
Source14:       block-npiv
Source15:       block-npiv-vport
Source16:       xmclone.sh
Source17:       xend-relocation.sh
Source18:       init.xen_loop
%if %{?with_kmp}0
Source19:       xen_pvdrivers
Source20:       kmp_filelist
%endif
# Xen API remote authentication sources
Source23:       etc_pam.d_xen-api
Source24:       xenapiusers
# sysconfig hook script for Xen
Source25:       xen-updown.sh
Source26:       block-dmmd
# Upstream patches
Patch0:         18406-constify-microcode.patch
Patch1:         18412-x86-page-type-preemptible.patch
Patch2:         18420-x86-page-type-preemptible-fix.patch
Patch3:         18428-poll-single-port.patch
Patch4:         18446-vtd-dom0-passthrough.patch
Patch5:         18456-vtd-dom0-passthrough-cmdline.patch
Patch6:         18464-cpu-hotplug.patch
Patch7:         18468-therm-control-msr.patch
Patch8:         18471-cpu-hotplug.patch
Patch9:         18475-amd-microcode-update.patch
Patch10:        18481-amd-microcode-update-fix.patch
Patch11:        18483-intel-microcode-update.patch
Patch12:        18484-stubdom-ioemu-makefile.patch
Patch13:        18487-microcode-update-irq-context.patch
Patch14:        18488-microcode-free-fix.patch
Patch15:        18509-continue-hypercall-on-cpu.patch
Patch16:        18519-microcode-retval.patch
Patch17:        18520-per-CPU-GDT.patch
Patch18:        18521-per-CPU-TSS.patch
Patch19:        18523-per-CPU-misc.patch
Patch20:        18528-dump-evtchn.patch
Patch21:        18539-pirq-vector-mapping.patch
Patch22:        18545-hvm-gpxe-rom.patch
Patch23:        18547-pirq-vector-mapping-fix.patch
Patch24:        18548-hvm-gpxe-rom.patch
Patch25:        18573-move-pirq-logic.patch
Patch26:        18574-msi-free-vector.patch
Patch27:        18577-bad-assertion.patch
Patch28:        18583-passthrough-locking.patch
Patch29:        18584-evtchn-lock-rename.patch
Patch30:        18620-x86-page-type-preemptible-fix.patch
Patch31:        18637-vmx-set-dr7.patch
Patch32:        18654-xend-vcpus.patch
Patch33:        18656-vtd-alloc-checks.patch
Patch34:        18661-recursive-spinlocks.patch
Patch35:        18720-x86-dom-cleanup.patch
Patch36:        18722-x86-fixmap-reserved.patch
Patch37:        18723-unmap-dom-page-const.patch
Patch38:        18724-i386-highmem-assist.patch
Patch39:        18731-x86-dom-cleanup.patch
Patch40:        18735-x86-dom-cleanup.patch
Patch41:        18741-x86-dom-cleanup-no-hack.patch
Patch42:        18742-x86-partial-page-ref.patch
Patch43:        18745-xend-ioport-irq.patch
Patch44:        18747-x86-partial-page-ref.patch
Patch45:        18762-vtd-intremap-SMI-RTEs.patch
Patch46:        18771-reduce-GDT-switching.patch
Patch47:        18778-msi-irq-fix.patch
Patch48:        18764-cpu-affinity.patch
Patch49:        18780-cpu-affinity.patch
Patch50:        18785-vlapic-lowest-prio.patch
Patch51:        18788-vlapic-accel-dom-restore.patch
Patch52:        18795-x86-ioapic-guest-write.patch
Patch53:        18799-cpu-affinity.patch
Patch54:        18805-pv-driver-build.patch
Patch55:        18810-shadow-PAT.patch
Patch56:        18844-shared-page-EOI.patch
Patch57:        18852-shared-page-EOI-gmfn.patch
Patch58:        18870-vtd-flush-per-device.patch
Patch59:        18878-x86-cpufreq-less-verbose.patch
Patch60:        18879-cpufreq-params.patch
Patch61:        18880-x86-pirq-guest-bind-msg.patch
Patch62:        18885-bootable-flag.patch
Patch63:        18887-vtd-error-handling.patch
Patch64:        18904-x86-local-irq.patch
Patch65:        18905-x86-ioapic-boot-panic.patch
Patch66:        18929-shadow-no-duplicates.patch
Patch67:        18930-xenoprof-dunnington.patch
Patch68:        18934-vtd-PCI-X-dev-assign.patch
Patch69:        18937-S3-MSI.patch
Patch70:        18943-amd-32bit-paging-limit.patch
Patch71:        18962-xc_translate_foreign_address.patch
Patch72:        18963-xenctx.patch
Patch73:        18970-vmx-print-features.patch
Patch74:        19009-x86_64-note-init-p2m.patch
Patch75:        19027-hvmloader-SMBIOS-dev-mem-boundary.patch
Patch76:        19032-amd-iommu-pointer-reset.patch
Patch77:        19035-MSI-X-proper-enable.patch
Patch78:        19038-x86-no-apic.patch
Patch79:        19039-x86-propagate-nolapic.patch
Patch80:        19046-cross-bit-coredumping.patch
Patch81:        19048-cross-bit-coredumping.patch
Patch82:        19051-cross-bit-coredumping.patch
Patch83:        19072-vmx-pat.patch
Patch84:        19079-snp_ctl-1.patch
Patch85:        19083-memory-is-conventional-fix.patch
Patch86:        19088-x86-page-non-atomic-owner.patch
Patch87:        19089-x86_64-widen-page-refcounts.patch
Patch88:        19097-M2P-table-1G-page-mappings.patch
Patch89:        19103-x86_64-fold-page-lock.patch
Patch90:        19132-page-list-mfn-links.patch
Patch91:        19134-fold-shadow-page-info.patch
Patch92:        19135-next-shadow-mfn.patch
Patch93:        19136-page-info-rearrange.patch
Patch94:        19137-lock-domain-page-list.patch
Patch95:        19140-init-heap-pages-max-order.patch
Patch96:        19151-xend-class-dereg.patch
Patch97:        19152-xm-man-page.patch
Patch98:        19153-xm-noxen-error.patch
Patch99:        19154-snoop-control.patch
Patch100:       19156-page-list-simplify.patch
Patch101:       19161-pv-ldt-handling.patch
Patch102:       19162-page-info-no-cpumask.patch
Patch103:       19167-recover-pat-value-s3-resume.patch
Patch104:       19168-hvm-domctl.patch
Patch105:       19169-remove-declare-bitmap.patch
Patch106:       19170-libxc.patch
Patch107:       19171-xenctx.patch
Patch108:       19172-irq-to-vector.patch
Patch109:       19173-pci-passthrough-fix.patch
Patch110:       19176-free-irq-shutdown-fix.patch
Patch111:       19190-pciif-typo-fix.patch
Patch112:       19198-fix-snoop.patch
Patch113:       19204-allow-old-images-restore.patch
Patch114:       19216-msix-fixmap.patch
Patch115:       19230-vtd-mobile-series4-chipset.patch
Patch116:       19232-xend-exception-fix.patch
Patch117:       19234_pygrub.patch
Patch118:       19239-ioapic-s3-suspend-fix.patch
Patch119:       19240-ioapic-s3-suspend-fix.patch
Patch120:       19242-xenstored-use-after-free-fix.patch
Patch121:       19259-ignore-shutdown-deferrals.patch
Patch122:       19266-19365-event-channel-access-fix.patch
Patch123:       19268-page-get-owner.patch
Patch124:       19275-19296-schedular-deadlock-fixes.patch
Patch125:       19276-cpu-selection-allocation-fix.patch
Patch126:       19291-pygrub.patch
Patch127:       19293-vcpu-migration-delay.patch
Patch128:       19302-passthrough-pt-irq-time-out.patch
Patch129:       19313-hvmemul-read-msr-fix.patch
Patch130:       19317-vram-tracking-fix.patch
Patch131:       19335-apic-s3-resume-error-fix.patch
Patch132:       19353-amd-migration-fix.patch
Patch133:       19354-amd-migration-fix.patch
Patch134:       19371-in-sync-L1s-writable.patch
Patch135:       19372-2-on-3-shadow-mode-fix.patch
Patch136:       19377-xend-vnclisten.patch
Patch137:       19380-vtd-feature-check.patch
Patch138:       19391-vpmu-double-free.patch
Patch139:       19400-ensure-ltr-execute.patch
Patch140:       19410-virt-to-maddr-fix.patch
Patch141:       19415-vtd-dom0-s3.patch
Patch142:       19450-xc_translate_foreign_address.patch
Patch143:       19474-32on64-S3.patch
Patch144:       19490-log-dirty.patch
Patch145:       19492-sched-timer-non-idle.patch
Patch146:       19493-hvm-io-intercept-count.patch
Patch147:       19505-x86_64-clear-cr1.patch
Patch148:       19519-domctl-deadlock.patch
Patch149:       19523-32on64-restore-p2m.patch
Patch150:       19543-conring-size-param.patch
Patch151:       19555-ept-live-migration.patch
Patch152:       19557-amd-iommu-ioapic-remap.patch
Patch153:       19560-x86-flush-tlb-empty-mask.patch
Patch154:       19571-x86-numa-shift.patch
Patch155:       19578-hvm-load-ldt-first.patch
Patch156:       19580-xend-pincpu.patch
Patch157:       19592-vmx-exit-reason-perfc-size.patch
Patch158:       19595-hvm-set-callback-irq-level.patch
Patch159:       19597-x86-ioport-quirks-BL2xx.patch
Patch160:       19602-vtd-multi-ioapic-remap.patch
Patch161:       19606-hvm-x2apic-cpuid.patch
Patch162:       19614-x86-emul-lldt-ltr.patch
Patch163:       19631-x86-frametable-map.patch
Patch164:       19653-hvm-vcpuid-range-checks.patch
Patch165:       19734-vtd-gcmd-submit.patch
Patch166:       19752-vtd-srtp-sirtp-flush.patch
Patch167:       19753-vtd-reg-write-lock.patch
Patch168:       19764-hvm-domain-lock-leak.patch
Patch169:       19765-hvm-post-restore-vcpu-state.patch
Patch170:       19767-hvm-port80-inhibit.patch
Patch171:       19768-x86-dom0-stack-dump.patch
Patch172:       19770-x86-amd-s3-resume.patch
Patch173:       19801-x86-p2m-2mb-hap-only.patch
Patch174:       19815-vtd-kill-correct-timer.patch
Patch175:       19885-kexec-gdt-switch.patch
Patch176:       19894-shadow-resync-fastpath-race.patch
Patch177:       19896-32on64-arg-xlat.patch
Patch178:       19931-gnttblop-preempt.patch
Patch179:       19945-pae-xen-l2-entries.patch
Patch180:       19953-x86-fsgs-base.patch
Patch181:       19960-show-page-walk.patch
Patch182:       20013-xend-memleak.patch
Patch183:       20026-ept-rwx-default.patch
Patch184:       20031-x86-pmode-load-seg-retry.patch
Patch185:       20035-x86-load-sreg-adjust.patch
Patch186:       20059-vmx-nmi-handling.patch
Patch187:       20077-x86-runstate-cswitch-out.patch
Patch188:       20078-x86_64-branch-emulation.patch
Patch189:       20081-acs-filter.patch
Patch190:       20091-acs-filter.patch
Patch191:       20099-pygrub-security.patch
Patch192:       20101-hvm-no-compat-virt-start.patch
Patch193:       20107-pygrub-security.patch
Patch194:       20112-x86-dom0-boot-run-timers.patch
Patch195:       20120-x86-srat-check-discontig.patch
Patch196:       20122-credit-accounting.patch
Patch197:       20125-xc-parse-tuple-fix.patch
Patch198:       20146-pygrub-security.patch
Patch199:       20174-pygrub-security.patch
Patch200:       20201-pygrub-security.patch
Patch201:       20204-x86-mce-panic.patch
Patch202:       20225-amd-iommu-polling-loop.patch
Patch203:       20241-x86-noapic-handling.patch
Patch204:       20263-libxc-memleak.patch
Patch205:       20274-hvm-suspend-insn-retire.patch
Patch206:       20289-shadow-shutdown-fault-inject.patch
Patch207:       20290-numa-unpopulated-nodes.patch
Patch208:       20322-vtd-ept-coexistance.patch
Patch209:       20323-vtd-acpi-off-panic.patch
Patch210:       20329-vifname.patch
Patch211:       20337-shadow-pae-inconsistent-walks.patch
Patch212:       20339-register-vcpu-time-info.patch
Patch213:       20350-vbd-bootable-flag.patch
Patch214:       20368-ept-npt-nested-fault.patch
Patch215:       20379-sxp.patch
Patch216:       20396-x86-reserve-mem.patch
Patch217:       20418-x86-parse-edd.patch
Patch218:       20508-shadow-teardown-p2m.patch
Patch219:       20557-vtd-flush-proper-size.patch
Patch220:       20567-xentop-show-full-name.patch
Patch221:       20576-add-to-physmap-error-code.patch
Patch222:       20593-keymap.patch
Patch223:       20628-x86-WP=0-emulation.patch
Patch224:       20714-process-pending-softirqs.patch
Patch225:       20716-pygrub-reiser.patch

# Our patches
Patch300:       xen-config.diff
Patch301:       xend-config.diff
Patch302:       xen-destdir.diff
Patch303:       xen-rpmoptflags.diff
Patch304:       xen-warnings.diff
Patch305:       xen-changeset.diff
Patch306:       xen-paths.diff
Patch307:       xen-xmexample.diff
Patch308:       xen-xmexample-vti.diff
Patch309:       xen-fixme-doc.diff
Patch310:       xen-domUloader.diff
Patch311:       xen-no-dummy-nfs-ip.diff
Patch312:       serial-split.patch
Patch313:       xen-xm-top-needs-root.diff
Patch314:       xen-tightvnc-args.diff
Patch315:       xen-max-free-mem.diff
Patch316:       xen-ioapic-ack-default.diff
Patch317:       block-losetup-retry.diff
Patch318:       block-flags.diff
Patch319:       xen-hvm-default-bridge.diff
Patch320:       xen-hvm-default-pae.diff
Patch321:       xm-test-cleanup.diff
Patch322:       tools-xc_kexec.diff
Patch323:       tools-kboot.diff
Patch324:       libxen_permissive.patch
Patch325:       xenapi-console-protocol.patch
Patch326:       xen-disable-qemu-monitor.diff
Patch327:       supported_module.diff
Patch328:       qemu-security-etch1.diff
Patch329:       rpmlint.diff
Patch330:       cdrom-removable.patch
Patch331:       bridge-opensuse.patch
Patch332:       bridge-vlan.diff
Patch333:       bridge-bonding.diff
Patch334:       bridge-hostonly.diff
Patch335:       bridge-record-creation.patch
Patch336:       xend-core-dump-loc.diff
Patch337:       blktap.patch
Patch338:       xen-api-auth.patch
Patch339:       xen-qemu-iscsi-fix.patch
Patch340:       tools-gdbserver-build.diff
Patch341:       network-route.patch
Patch342:       xend-timeoffset.patch
Patch343:       xm-save-check-file.patch 
Patch344:       xm-create-xflag.patch
# Needs to go upstream sometime, when python 2.6 is widespread
Patch362:       python2.6-fixes.patch
Patch363:       udev-rules.patch
Patch364:       ioemu-vnc-resize.patch
# Needs to go upstream
Patch365:       checkpoint-rename.patch
Patch366:       reenable-block-protocols.patch
Patch367:       network-nat.patch
Patch368:       ioemu-debuginfo.patch
Patch369:       ioemu-tapdisk-compat-QEMU_IMG.patch
# Patches for snapshot support
Patch370:       qemu-img-snapshot.patch
Patch371:       ioemu-blktap-fix-open.patch
Patch372:       snapshot-ioemu-save.patch
Patch373:       snapshot-ioemu-restore.patch
Patch374:       snapshot-ioemu-delete.patch
Patch375:       snapshot-xend.patch
# Various other fixes and enhancements
Patch380:       ioemu-qcow2-multiblock-aio.patch
Patch381:       ioemu-blktap-image-format.patch
Patch382:       build-tapdisk-ioemu.patch
Patch383:       blktapctrl-default-to-ioemu.patch
Patch384:       ioemu-blktap-barriers.patch
Patch385:       tapdisk-ioemu-logfile.patch
Patch386:       blktap-ioemu-close-fix.patch
Patch387:       ioemu-blktap-zero-size.patch
Patch388:       blktap-error-handling.patch
Patch389:       ioemu-blktap-fv-init.patch
Patch390:       ioemu-vpc-4gb-fix.patch
Patch391:       qemu-dm-segfault.patch
Patch392:       int13_hardisk-64bit-lba.patch
Patch393:       usb-save-restore.patch
Patch394:       mouse-wheel-roll.patch
Patch395:       ioemu-qcow2-memory-leak-fix.patch
Patch396:       cross-migrate.patch
Patch397:       enable_more_nic_pxe.patch
Patch398:       capslock_enable.patch
Patch399:       bdrv_open2_fix_flags.patch
Patch400:       bdrv_open2_flags_2.patch
Patch401:       ioemu-dvd-structure-overflow.patch
# Jim's domain lock patch
Patch420:       xend-domain-lock.patch
# Patches from Jan
Patch440:       dump-exec-state.patch
Patch441:       x86-show-page-walk-early.patch
Patch442:       x86-extra-trap-info.patch
Patch443:       x86-alloc-cpu-structs.patch
Patch444:       32on64-extra-mem.patch
Patch445:       msi-enable.patch
# PV Driver Patches
Patch450:       pv-driver-build.patch
Patch451:       xen-ioemu-hvm-pv-support.diff
Patch452:       pvdrv_emulation_control.patch
Patch453:       blktap-pv-cdrom.patch
Patch454:       x86-cpufreq-report.patch
Patch455:       dom-print.patch
Patch456:       disable_emulated_device.diff
# novell_shim patches
Patch500:       hv_tools.patch
Patch501:       hv_xen_base.patch
Patch502:       hv_xen_extension.patch
#Disable s3/s4 sleep states for svvp tests.
Patch503:       hibernate.patch 
Patch504:       hv_win7_eoi_bug.patch
Patch999:       tmp_build.patch
Url:            http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
%if %{?with_kmp}0
%suse_kernel_module_package -n xen um xen ec2 -f kmp_filelist
%endif

%description
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 Xen Hypervisor. (tm)

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 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.

[Hypervisor is a trademark of IBM]



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>
    Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
    Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
    Mark Williamson <mark.williamson@cl.cam.ac.uk>
    Ewan Mellor <ewan@xensource.com>
    ...

%package libs
License:        GPL v2 or later
Summary:        Xen Virtualization: Libraries
Group:          System/Kernel
#Requires:       xen = %{version}
AutoReqProv:    on

%description libs
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 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.



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%package tools
License:        GPL v2 or later
Summary:        Xen Virtualization: Control tools for domain 0
Group:          System/Kernel
Requires:       xen-libs = %{version}
Requires:       bridge-utils multipath-tools python python-curses python-openssl python-pam python-xml pyxml
#Requires:      ipcalc
# subpackage existed in 10.3
Provides:       xen-tools-ioemu = 3.2
Obsoletes:      xen-tools-ioemu <= 3.2.2_18000
AutoReqProv:    on

%description tools
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 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.

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:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%package tools-domU
License:        GPL v2 or later
Summary:        Xen Virtualization: Control tools for domain U
Group:          System/Kernel
Conflicts:      xen-tools
AutoReqProv:    on

%description tools-domU
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 tools that allow unprivileged domains to query
the virtualized environment.



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%package devel
License:        GPL v2 or later
Summary:        Xen Virtualization: Headers and libraries for development
Group:          System/Kernel
Requires:       xen-libs = %{version}

%description devel
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.



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%if %{?with_kmp}0

%package KMP
License:        GPL v2 or later
Group:          System/Kernel
Summary:        Xen para-virtual device drivers for fully virtualized guests
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.



%endif

%package doc-html
License:        GPL v2 or later
Summary:        Xen Virtualization: HTML documentation
Group:          Documentation/HTML

%description doc-html
Xen is a virtual machine monitor for x86 that supports execution of
multiple guest operating systems with unprecedented levels of
performance and resource isolation.

xen-doc-html contains the online documentation in HTML format. Point
your browser at file:/usr/share/doc/packages/xen/html/



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%package doc-pdf
License:        GPL v2 or later
Summary:        Xen Virtualization: PDF documentation
Group:          Documentation/Other

%description doc-pdf
Xen is a virtual machine monitor for x86 that supports execution of
multiple guest operating systems with unprecedented levels of
performance and resource isolation.

xen-doc-pdf contains the online documentation in PDF format. Use
xpdf/kpdf/gpdf/gv/... to read the files in
/usr/share/doc/packages/xen/pdf/



Authors:
--------
    Ian Pratt <ian.pratt@cl.cam.ac.uk>

%prep
%setup -q -n %xen_build_dir
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch79 -p1
%patch80 -p1
%patch81 -p1
%patch82 -p1
%patch83 -p1
%patch84 -p1
%patch85 -p1
%patch86 -p1
%patch87 -p1
%patch88 -p1
%patch89 -p1
%patch90 -p1
%patch91 -p1
%patch92 -p1
%patch93 -p1
%patch94 -p1
%patch95 -p1
%patch96 -p1
%patch97 -p1
%patch98 -p1
%patch99 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
%patch128 -p1
%patch129 -p1
%patch130 -p1
%patch131 -p1
%patch132 -p1
%patch133 -p1
%patch134 -p1
%patch135 -p1
%patch136 -p1
%patch137 -p1
%patch138 -p1
%patch139 -p1
%patch140 -p1
%patch141 -p1
%patch142 -p1
%patch143 -p1
%patch144 -p1
%patch145 -p1
%patch146 -p1
%patch147 -p1
%patch148 -p1
%patch149 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
%patch153 -p1
%patch154 -p1
%patch155 -p1
%patch156 -p1
%patch157 -p1
%patch158 -p1
%patch159 -p1
%patch160 -p1
%patch161 -p1
%patch162 -p1
%patch163 -p1
%patch164 -p1
%patch165 -p1
%patch166 -p1
%patch167 -p1
%patch168 -p1
%patch169 -p1
%patch170 -p1
%patch171 -p1
%patch172 -p1
%patch173 -p1
%patch174 -p1
%patch175 -p1
%patch176 -p1
%patch177 -p1
%patch178 -p1
%patch179 -p1
%patch180 -p1
%patch181 -p1
%patch182 -p1
%patch183 -p1
%patch184 -p1
%patch185 -p1
%patch186 -p1
%patch187 -p1
%patch188 -p1
%patch189 -p1
%patch190 -p1
%patch191 -p1
%patch192 -p1
%patch193 -p1
%patch194 -p1
%patch195 -p1
%patch196 -p1
%patch197 -p1
%patch198 -p1
%patch199 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
%patch203 -p1
%patch204 -p1
%patch205 -p1
%patch206 -p1
%patch207 -p1
%patch208 -p1
%patch209 -p1
%patch210 -p1
%patch211 -p1
%patch212 -p1
%patch213 -p1
%patch214 -p1
%patch215 -p1
%patch216 -p1
%patch217 -p1
%patch218 -p1
%patch219 -p1
%patch220 -p1
%patch221 -p1
%patch222 -p1
%patch223 -p1
%patch224 -p1
%patch225 -p1
%patch300 -p1
%patch301 -p1
%patch302 -p1
%patch303 -p1
%patch304 -p1
%patch305 -p1
%patch306 -p1
%patch307 -p1
%patch308 -p1
%patch309 -p1
%patch310 -p1
%patch311 -p1
%patch312 -p1
%patch313 -p1
%patch314 -p1
%patch315 -p1
%patch316 -p1
%patch317 -p1
%patch318 -p1
%patch319 -p1
%patch320 -p1
%patch321 -p1
%patch322 -p1
%patch323 -p1
%patch324 -p1
%patch325 -p1
%patch326 -p1
%patch327 -p1
%patch328 -p1
%patch329 -p1
%patch330 -p1
%patch331 -p1
%patch332 -p1
%patch333 -p1
#%patch334 -p1 - hostonly
%patch335 -p1
%patch336 -p1
%patch337 -p1
%patch338 -p1
%patch339 -p1
%patch340 -p1
%patch341 -p1
%patch342 -p1
%patch343 -p1
%patch344 -p1
%patch362 -p1
%patch363 -p1
%patch364 -p1
%patch365 -p1
%patch366 -p1
%patch367 -p1
%patch368 -p1
%patch369 -p1
%patch370 -p1
%patch371 -p1
%patch372 -p1
%patch373 -p1
%patch374 -p1
%patch375 -p1
%patch380 -p1
%patch381 -p1
%patch382 -p1
%patch383 -p1
%patch384 -p1
%patch385 -p1
%patch386 -p1
%patch387 -p1
%patch388 -p1
%patch389 -p1
%patch390 -p1
%patch391 -p1
%patch392 -p1
%patch393 -p1
%patch394 -p1
%patch395 -p1
%patch396 -p1
%patch397 -p1
%patch398 -p1
%patch399 -p1
%patch400 -p1
%patch401 -p1
%patch420 -p1
%patch440 -p1
%patch441 -p1
%patch442 -p1
%patch443 -p1
%patch444 -p1
%patch445 -p1
%patch450 -p1
%patch451 -p1
%patch452 -p1
%patch453 -p1
%patch454 -p1
%patch455 -p1
%patch456 -p1
%patch500 -p1
%patch501 -p1
%patch502 -p1
%patch503 -p1
%patch504 -p1
%patch999 -p1

%build
XEN_EXTRAVERSION=%version-%release
XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}}
sed -i "s/XEN_EXTRAVERSION[\t ]*.=.*\$/XEN_EXTRAVERSION  = $XEN_EXTRAVERSION/" xen/Makefile
sed -i "s/XEN_CHANGESET[\t ]*=.*\$/XEN_CHANGESET     = %{changeset}/" xen/Makefile
RPM_OPT_FLAGS=${RPM_OPT_FLAGS//-fstack-protector/}
export CFLAGS="${RPM_OPT_FLAGS}"
export RPM_OPT_FLAGS
make -C tools/include/xen-foreign
make tools docs
cd tools/debugger/gdb
# there are code problems that don't pass the 02-check-gcc-output, hence bitbucket
./gdbbuild 1>/dev/null 2>/dev/null
cd ../../..
%if %{?with_kmp}0
# pv driver modules
export XL=/usr/src/linux
export XEN=/usr/src/linux/include/xen
mkdir -p obj
for flavor in %flavors_to_build; do
        rm -rf obj/$flavor
        cp -r unmodified_drivers/linux-2.6 obj/$flavor
        cd obj/$flavor
        ./mkbuildtree
        make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
            M=$PWD
        cd ../..
done
%endif

%install
test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
export CFLAGS="$RPM_OPT_FLAGS" 
export RPM_OPT_FLAGS
install_xen()
{
    local ext=""
    if [ -n "$1" ]; then
        ext="-$1"
        mv $RPM_BUILD_ROOT/boot/xen-%{version}-%{release}.gz \
           $RPM_BUILD_ROOT/boot/xen${ext}-%{version}-%{release}.gz
        mv $RPM_BUILD_ROOT/boot/xen-syms-%{version}-%{release} \
           $RPM_BUILD_ROOT/boot/xen-syms${ext}-%{version}-%{release}
    fi
    rm $RPM_BUILD_ROOT/boot/xen-%{xvers}.gz
    rm $RPM_BUILD_ROOT/boot/xen-%{xvermaj}.gz
    rm $RPM_BUILD_ROOT/boot/xen.gz
    # Do not link to links; grub cannot follow.
    ln -s xen${ext}-%{version}-%{release}.gz $RPM_BUILD_ROOT/boot/xen${ext}-%{xvers}.gz
    ln -s xen${ext}-%{version}-%{release}.gz $RPM_BUILD_ROOT/boot/xen${ext}-%{xvermaj}.gz
    ln -s xen${ext}-%{version}-%{release}.gz $RPM_BUILD_ROOT/boot/xen${ext}.gz
    ln -sf xen-syms${ext}-%{version}-%{release} $RPM_BUILD_ROOT/boot/xen-syms${ext}
}
%ifarch %ix86
make -C xen install pae=y debug=y crash_debug=y DESTDIR=$RPM_BUILD_ROOT
install_xen dbg
make -C xen clean
make -C xen install pae=y debug=n crash_debug=n DESTDIR=$RPM_BUILD_ROOT
install_xen
make -C xen clean
%else
make -C xen install max_phys_cpus=255 pae=n debug=y crash_debug=y DESTDIR=$RPM_BUILD_ROOT
install_xen dbg
make -C xen clean
make -C xen install max_phys_cpus=255 pae=n debug=n crash_debug=n DESTDIR=$RPM_BUILD_ROOT
install_xen
make -C xen clean
%endif
export CFLAGS="$RPM_OPT_FLAGS"
export RPM_OPT_FLAGS
make -C tools/include/xen-foreign
# tools
export XEN_PYTHON_NATIVE_INSTALL=1
make -C tools install \
    DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
cp tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver-xen $RPM_BUILD_ROOT/usr/bin/gdbserver-xen
rm -f $RPM_BUILD_ROOT/usr/sbin/{qcow-create,img2qcow,qcow2raw}
make -C tools/misc/serial-split install \
    DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
%ifarch x86_64
mkdir -p $RPM_BUILD_ROOT/usr/lib/xen/bin/
ln -s %{_libdir}/xen/bin/qemu-dm $RPM_BUILD_ROOT/usr/lib/xen/bin/qemu-dm
%endif
%if %{?with_kmp}0
# pv driver modules
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
        M=$PWD/obj/$flavor
done
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE19 $RPM_BUILD_ROOT/etc/modprobe.d/xen_pvdrivers
%endif
# docs
make -C docs install \
    DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} \
    DOCDIR=%{_defaultdocdir}/xen
for name in COPYING %SOURCE2 %SOURCE3 %SOURCE4; do 
    install -m 644 $name $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/
done
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/misc
for name in vtpm.txt crashdb.txt sedf_scheduler_mini-HOWTO.txt; do
    install -m 644 docs/misc/$name $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/misc/
done
# init scripts
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install %SOURCE5 $RPM_BUILD_ROOT/etc/init.d/xend
ln -s /etc/init.d/xend $RPM_BUILD_ROOT/usr/sbin/rcxend
install %SOURCE6 $RPM_BUILD_ROOT/etc/init.d/xendomains
ln -s /etc/init.d/xendomains $RPM_BUILD_ROOT/usr/sbin/rcxendomains
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE18 $RPM_BUILD_ROOT/etc/modprobe.d/xen_loop
# 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
rm -f $RPM_BUILD_ROOT/etc/xen/examples/*nbd
install -m644 %SOURCE9 %SOURCE10 $RPM_BUILD_ROOT/etc/xen/examples/
# scripts
rm -f $RPM_BUILD_ROOT/etc/xen/scripts/block-*nbd
install -m755 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 %SOURCE15 %SOURCE16 %SOURCE17 $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 %SOURCE23 $RPM_BUILD_ROOT/etc/pam.d/xen-api
install -m644 %SOURCE24 $RPM_BUILD_ROOT/etc/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 %SOURCE25 $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
install -m644 -D %SOURCE7 $RPM_BUILD_ROOT/etc/logrotate.d/xen
# 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
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/save
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/dump
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/xend-db/domain
mkdir -p $RPM_BUILD_ROOT/var/lib/xen/xend-db/migrate
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/run/xenstored
ln -s /var/lib/xen/images $RPM_BUILD_ROOT/etc/xen/images
# Bootloader
install -m755 %SOURCE8 $RPM_BUILD_ROOT/usr/lib/xen/boot/
# 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
#%find_lang xen-vm  # po files are misnamed upstream
# Clean up unpackaged files
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xen/qemu/
rm -f  $RPM_BUILD_ROOT/%{_datadir}/doc/qemu/qemu-*
rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir}/xen/ps
rm -rf $RPM_BUILD_ROOT/usr/share/xen/man/man1/qemu/qemu*
rm -f  $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc32
rm -f  $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc64
rm -f  $RPM_BUILD_ROOT/usr/sbin/netfix
rm -f  $RPM_BUILD_ROOT/%pysite/*.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

%files
%defattr(-,root,root)
/boot/xen-%{version}-%{release}.gz
/boot/xen-%{xvermaj}.gz
/boot/xen-%{xvers}.gz
/boot/xen-dbg-%{version}-%{release}.gz
/boot/xen-dbg-%{xvermaj}.gz
/boot/xen-dbg-%{xvers}.gz
/boot/xen-dbg.gz
/boot/xen-syms
/boot/xen-syms-%{version}-%{release}
/boot/xen-syms-dbg
/boot/xen-syms-dbg-%{version}-%{release}
/boot/xen.gz

%files libs
%defattr(-,root,root)
%{_libdir}/fs/
%{_libdir}/libblktap.so.*
%{_libdir}/libflask.so.*
%{_libdir}/libfsimage.so.*
%{_libdir}/libxen*.so.*

%files tools
%defattr(-,root,root)
#/usr/bin/lomount
/usr/bin/xencons
/usr/bin/xenstore*
/usr/bin/xentrace*
/usr/bin/pygrub
/usr/bin/qemu-img-xen
/usr/bin/tapdisk-ioemu
/usr/bin/gdbserver-xen
/usr/sbin/blktapctrl
/usr/sbin/flask-loadpolicy
/usr/sbin/rcxend
/usr/sbin/rcxendomains
/usr/sbin/tapdisk
/usr/sbin/xen*
/usr/sbin/xm
/usr/sbin/xsview
/usr/sbin/fs-backend
%dir %{_libdir}/xen
%dir %{_libdir}/xen/bin
%ifarch x86_64
%dir /usr/lib/xen
%dir /usr/lib/xen/bin
%endif
%dir /usr/lib/xen/boot
%{_datadir}/xen/*.dtd
%{_libdir}/xen/bin/readnotes
%{_libdir}/xen/bin/xc_restore
%{_libdir}/xen/bin/xc_save
%{_libdir}/xen/bin/xenconsole
%{_libdir}/xen/bin/xenctx
%{_libdir}/xen/bin/lsevtchn
%{_mandir}/man1/*.1.gz
%{_mandir}/man5/*.5.gz
%{_mandir}/man8/*.8.gz
/var/adm/fillup-templates/*
%dir /var/lib/xen
%dir %attr(700,root,root) /var/lib/xen/images
%dir %attr(700,root,root) /var/lib/xen/save
%dir %attr(700,root,root) /var/lib/xen/dump
%dir /var/lib/xen/xend-db
%dir /var/lib/xen/xend-db/domain
%dir /var/lib/xen/xend-db/migrate
%dir /var/lib/xen/xend-db/vnet
%dir /var/lib/xenstored
%dir /var/log/xen
%dir /var/run/xenstored
/etc/init.d/xend
/etc/init.d/xendomains
%config /etc/logrotate.d/xen
%dir %attr(700,root,root) /etc/xen
/etc/xen/auto
%config /etc/xen/examples
/etc/xen/images
/etc/xen/qemu-ifup
/etc/xen/scripts
/etc/xen/README*
%config /etc/xen/vm
%config /etc/xen/*.sxp
%config /etc/xen/*.xml
%config(noreplace) /etc/xen/xenapiusers
%config /etc/pam.d/xen-api
%config /etc/modprobe.d/xen_loop
%dir /etc/modprobe.d
%dir /etc/udev
%dir /etc/udev/rules.d
/etc/udev/rules.d/40-xen.rules
/etc/sysconfig/network/scripts/xen-updown.sh
/etc/sysconfig/network/if-up.d/xen
/etc/sysconfig/network/if-down.d/xen
%dir %{_defaultdocdir}/xen
%{_defaultdocdir}/xen/COPYING
%{_defaultdocdir}/xen/README.SuSE
%{_defaultdocdir}/xen/boot.local.xenU
%{_defaultdocdir}/xen/boot.xen
%{_defaultdocdir}/xen/misc
%dir %pysite/xen
%dir %pysite/grub
# formerly tools-ioemu
%dir %{_datadir}/xen
%dir %{_datadir}/xen/man
%dir %{_datadir}/xen/man/man1
%dir %{_datadir}/xen/qemu
%dir %{_datadir}/xen/qemu/keymaps
%{_datadir}/xen/qemu/*
%{_datadir}/xen/man/man1/*
%{_libdir}/xen/bin/qemu-dm
%ifarch x86_64
/usr/lib/xen/bin/qemu-dm
/usr/lib64/xen/bin/xc_kexec
%else
/usr/lib/xen/bin/xc_kexec
%endif
/usr/lib/xen/boot/hvmloader
%pysite/xen/*
/usr/lib/xen/boot/domUloader.py
%pysite/grub/*
%pysite/fsimage.so

%files tools-domU
%defattr(-,root,root)
/usr/bin/xen-detect
/bin/domu-xenstore
/bin/xenstore-*

%files devel
%defattr(-,root,root)
%{_libdir}/libblktap.a
%{_libdir}/libblktap.so
%{_libdir}/libflask.a
%{_libdir}/libflask.so
%{_libdir}/libfsimage.so
%{_libdir}/libxen*.a
%{_libdir}/libxen*.so
/usr/bin/serial-split
/usr/include/blktaplib.h
/usr/include/flask.h
/usr/include/fsimage*
/usr/include/xen*.h
/usr/include/xen/
/usr/include/xs.h
/usr/include/xs_lib.h

%files doc-html
%defattr(-,root,root)
%{_defaultdocdir}/xen/html

%files doc-pdf
%defattr(-,root,root)
%{_defaultdocdir}/xen/pdf

%clean
#test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
#rm -rf $RPM_BUILD_DIR/%xen_build_dir

%post tools
%{fillup_and_insserv -y -n xend xend}
%{fillup_and_insserv -y -n xendomains xendomains}

%preun tools
%{stop_on_removal xendomains xend}

%postun tools
%{restart_on_update xend}
%{insserv_cleanup}

%post libs
/sbin/ldconfig

%postun libs
/sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by