Blob Blame History Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define libvncver 0.7.1

Summary: Xen is a virtual machine monitor
Name:    xen
Version: 3.0
Release: 0.20060110.fc5.5
Group:   Development/Libraries
License: GPL
URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
Source0: xen-3.0.0-20060110.tar.bz2
Source1: http://download.sf.net/libvncserver/LibVNCServer-%{libvncver}.tar.gz
Patch0: xen-misc-fixes.patch
Patch1: xen-initscript.patch
Patch3: xen-dom0-minmem.patch
Patch4: xen-compile-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: transfig libidn-devel zlib-devel texi2html SDL-devel curl-devel
BuildRequires: libX11-devel python-devel ghostscript tetex-latex 
BuildRequires: ncurses-devel
BuildRequires: dev86
Requires: bridge-utils
Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
Requires: udev >= 059
Prereq: chkconfig
ExclusiveArch: i386 x86_64

%description
This package contains the Xen hypervisor and Xen tools, needed to
run virtual machines on x86 systems, together with the kernel-xen*
packages.  Information on how to use Xen can be found at the Xen
project pages.

Virtualisation can be used to run multiple versions or multiple
Linux distributions on one system, or to test untrusted applications
in a sandboxed environment.  Note that the Xen technology is still
in development, and this RPM has received extremely little testing.
Don't be surprised if this RPM eats your data, drinks your coffee
or makes fun of you in front of your friends.

%prep
%setup -q -n xen-3.0.0 -a 1
%patch0 -p1 -b .misc
%patch1 -p1 -b .init
%patch3 -p1 -b .mem-min
%patch4 -p1 -b .compile

%build
pushd LibVNCServer-%{libvncver}
%configure
make
vncdir=`pwd`
popd

sed -i -e "s;libvncserver-config;${vncdir}/libvncserver-config;" tools/ioemu/configure
CFLAGS="$RPM_OPT_FLAGS" %{__make} XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} tools docs 

%install
rm -rf %{buildroot}
make XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} prefix=/usr install-tools
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/xend-db/domain
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/xend-db/vnet
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/xend-db/migrate
mkdir -p %{buildroot}%{_localstatedir}/lib/xenstored
mkdir -p %{buildroot}%{_localstatedir}/run/xenstored
rm -rf %{buildroot}%{_datadir}/doc/qemu

rm -rf %{buildroot}%{_sysconfdir}/hotplug

# xs.h and xs_lib.h requires xen/io/xs_wire.h
mkdir -p %{buildroot}%{_includedir}/xen/io
install -m 644 tools/libxc/xen/xen.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/dom0_ops.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/version.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/event_channel.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/sched.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/sched_ctl.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/memory.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/acm.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/arch-x86_32.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/arch-x86_64.h %{buildroot}%{_includedir}/xen
install -m 644 tools/libxc/xen/arch-ia64.h %{buildroot}%{_includedir}/xen
install -m 644 xen/include/public/io/xs_wire.h %{buildroot}%{_includedir}/xen/io

### fixing start-script dir
mkdir -p %{buildroot}/etc/rc.d
mv -f %{buildroot}/etc/init.d %{buildroot}/etc/rc.d/

# move xsls -> xenstore-ls.  committed upstream already (#171863)
mv %{buildroot}%{_bindir}/xsls %{buildroot}%{_bindir}/xenstore-ls

mv -f %{buildroot}/etc/udev/xen-backend.rules %{buildroot}/etc/udev/rules.d/

%post
/sbin/chkconfig --add xend
/sbin/chkconfig --add xendomains

%preun
if [ $1 = 0 ]; then
  /sbin/chkconfig --del xend
  /sbin/chkconfig --del xendomains
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING README
%doc docs/pdf/
%doc docs/misc/
%{_sbindir}/*
%{_bindir}/*
%{_includedir}/*.h
%{_includedir}/xen/*.h
%{_includedir}/xen/io/*.h
%{_includedir}/xen/linux/*.h
%{python_sitearch}/%{name}
%{python_sitearch}/grub
%{_libdir}/%{name}
%{_libdir}/lib*
%{_mandir}/man?/*.?.gz
%dir /usr/lib/xen
%dir /usr/lib/xen/boot
/usr/lib/xen/boot/vmxloader
%dir %{_datadir}/%{name}/qemu
%{_datadir}/%{name}/qemu/keymaps/*
%dir %{_localstatedir}/lib/%{name}
%{_localstatedir}/lib/%{name}/*
%{_sysconfdir}/rc.d/init.d/*
%{_sysconfdir}/udev/rules.d/xen-backend.rules
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/sysconfig/xendomains
%dir %{_localstatedir}/lib/xenstored
%dir %{_localstatedir}/run/xenstored

%changelog
* Wed Jan 25 2006 Jeremy Katz <katzj@redhat.com> - 3.0-0.20060110.fc5.5
- buildrequire dev86 so that vmx firmware gets built
- include a copy of libvncserver and build vmx device models against it 

* Tue Jan 24 2006 Bill Nottingham <notting@redhat.com> - 3.0-0.20060110.fc5.4
- only put the udev rules in one place

* Fri Jan 20 2006 Jeremy Katz <katzj@redhat.com> - 3.0-0.20060110.fc5.3
- move xsls to xenstore-ls to not conflict (#171863)

* Tue Jan 10 2006  <sct@redhat.com> - 3.0-0.20060110.fc5.1
- Update to xen-unstable from 20060110 (cset 8526)

* Thu Dec 22 2005 Jesse Keating <jkeating@redhat.com> - 3.0-0.20051206.fc5.2
- rebuilt

* Tue Dec  6 2005 Juan Quintela <quintela@trasno.org> - 3.0-0.20051206.fc5.1
- 20051206 version (should be 3.0.0).
- Remove xen-bootloader fixes (integrated upstream).

* Wed Nov 30 2005 Daniel Veillard <veillard@redhat.com> - 3.0-0.20051109.fc5.4
- adding missing headers for libxenctrl and libxenstore
- use libX11-devel build require instead of xorg-x11-devel

* Mon Nov 14 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051109.fc5.3
- change default dom0 min-mem to 256M so that dom0 will try to balloon down

* Sat Nov 12 2005 Jeremy Katz <katzj@redhat.com>
- buildrequire ncurses-devel (reported by Justin Dearing)

* Thu Nov 10 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051109.fc5.2
- actually enable the initscripts

* Wed Nov  9 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051109.fc5.1
- udev rules moved

* Wed Nov  9 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051109.fc5
- update to current -unstable
- add patches to fix pygrub 

* Wed Nov  9 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051108.fc5
- update to current -unstable

* Fri Oct 21 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20051021.fc5
- update to current -unstable

* Thu Sep 15 2005 Jeremy Katz <katzj@redhat.com> - 3.0-0.20050912.fc5.1
- doesn't require twisted anymore

* Mon Sep 12 2005 Rik van Riel <riel@redhat.com> 3.0-0.20050912.fc5
- add /var/{lib,run}/xenstored to the %files section (#167496, #167121)
- upgrade to today's Xen snapshot
- some small build fixes for x86_64
- enable x86_64 builds

* Thu Sep  8 2005 Rik van Riel <riel@redhat.com> 3.0-0.20050908
- explicitly call /usr/sbin/xend from initscript (#167407)
- add xenstored directories to spec file (#167496, #167121)
- misc gcc4 fixes 
- spec file cleanups (#161191)
- upgrade to today's Xen snapshot
- change the version to 3.0-0.<date> (real 3.0 release will be 3.0-1)

* Mon Aug 23 2005 Rik van Riel <riel@redhat.com> 2-20050823
- upgrade to today's Xen snapshot

* Mon Aug 15 2005 Rik van Riel <riel@redhat.com> 2-20050726
- upgrade to a known-working newer Xen, now that execshield works again

* Mon May 30 2005 Rik van Riel <riel@redhat.com> 2-20050530
- create /var/lib/xen/xen-db/migrate directory so "xm save" works (#158895)

* Mon May 23 2005 Rik van Riel <riel@redhat.com> 2-20050522
- change default display method for VMX domains to SDL

* Fri May 20 2005 Rik van Riel <riel@redhat.com> 2-20050520
- qemu device model for VMX

* Thu May 19 2005 Rik van Riel <riel@redhat.com> 2-20050519
- apply some VMX related bugfixes

* Mon Apr 25 2005 Rik van Riel <riel@redhat.com> 2-20050424
- upgrade to last night's snapshot

* Fri Apr 15 2005 Jeremy Katz <katzj@redhat.com>
- patch manpath instead of moving in specfile.  patch sent upstream
- install to native python path instead of /usr/lib/python
- other misc specfile duplication cleanup

* Sun Apr  3 2005 Rik van Riel <riel@redhat.com> 2-20050403
- fix context switch between vcpus in same domain, vcpus > cpus works again

* Sat Apr  2 2005 Rik van Riel <riel@redhat.com> 2-20050402
- move initscripts to /etc/rc.d/init.d (Florian La Roche) (#153188)
- ship only PDF documentation, not the PS or tex duplicates

* Thu Mar 31 2005 Rik van Riel <riel@redhat.com> 2-20050331
- upgrade to new xen hypervisor
- minor gcc4 compile fix

* Mon Mar 28 2005 Rik van Riel <riel@redhat.com> 2-20050328
- do not yet upgrade to new hypervisor ;)
- add barrier to fix SMP boot bug
- add tags target
- add zlib-devel build requires (#150952)

* Wed Mar  9 2005 Rik van Riel <riel@redhat.com> 2-20050308
- upgrade to last night's snapshot
- new compile fix patch

* Sun Mar  6 2005 Rik van Riel <riel@redhat.com> 2-20050305
- the gcc4 compile patches are now upstream
- upgrade to last night's snapshot, drop patches locally

* Fri Mar  4 2005 Rik van Riel <riel@redhat.com> 2-20050303
- finally got everything to compile with gcc4 -Wall -Werror

* Thu Mar  3 2005 Rik van Riel <riel@redhat.com> 2-20050303
- upgrade to last night's Xen-unstable snapshot
- drop printf warnings patch, which is upstream now

* Wed Feb 23 2005 Rik van Riel <riel@redhat.com> 2-20050222
- upgraded to last night's Xen snapshot
- compile warning fixes are now upstream, drop patch

* Sat Feb 19 2005 Rik van Riel <riel@redhat.com> 2-20050219
- fix more compile warnings
- fix the fwrite return check

* Fri Feb 18 2005 Rik van Riel <riel@redhat.com> 2-20050218
- upgrade to last night's Xen snapshot
- a kernel upgrade is needed to run this Xen, the hypervisor
  interface changed slightly
- comment out unused debugging function in plan9 domain builder
  that was giving compile errors with -Werror

* Tue Feb  8 2005 Rik van Riel <riel@redhat.com> 2-20050207
- upgrade to last night's Xen snapshot

* Tue Feb  1 2005 Rik van Riel <riel@redhat.com> 2-20050201.1
- move everything to /var/lib/xen

* Tue Feb  1 2005 Rik van Riel <riel@redhat.com> 2-20050201
- upgrade to new upstream Xen snapshot

* Tue Jan 25 2005 Jeremy Katz <katzj@redhat.com>
- add buildreqs on python-devel and xorg-x11-devel (strange AT nsk.no-ip.org)

* Mon Jan 24 2005 Rik van Riel <riel@redhat.com> - 2-20050124
- fix /etc/xen/scripts/network to not break with ipv6 (also sent upstream)

* Fri Jan 14 2005 Jeremy Katz <katzj@redhat.com> - 2-20050114
- update to new snap
- python-twisted is its own package now
- files are in /usr/lib/python now as well, ugh.

* Tue Jan 11 2005 Rik van Riel <riel@redhat.com>
- add segment fixup patch from xen tree
- fix %files list for python-twisted

* Mon Jan 10 2005 Rik van Riel <riel@redhat.com>
- grab newer snapshot, that does start up
- add /var/xen/xend-db/{domain,vnet} to %files section

* Thu Jan  6 2005 Rik van Riel <riel@redhat.com>
- upgrade to new snapshot of xen-unstable

* Mon Dec 13 2004 Rik van Riel <riel@redhat.com>
- build python-twisted as a subpackage
- update to latest upstream Xen snapshot

* Sun Dec  5 2004 Rik van Riel <riel@redhat.com>
- grab new Xen tarball (with wednesday's patch already included)
- transfig is a buildrequire, add it to the spec file

* Wed Dec  1 2004 Rik van Riel <riel@redhat.com>
- fix up Che's spec file a little bit
- create patch to build just Xen, not the kernels

* Wed Dec 01 2004 Che
- initial rpm release