diff --git a/.cvsignore b/.cvsignore index d9afa5d..427d2c8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,8 @@ *.rpm .build*.log xen-3.3.0.tar.gz +grub-0.97.tar.gz +newlib-1.16.0.tar.gz +lwip-1.3.0.tar.gz +pciutils-2.2.9.tar.bz2 +zlib-1.2.3.tar.gz diff --git a/sources b/sources index 2451bea..4c7405d 100644 --- a/sources +++ b/sources @@ -1 +1,6 @@ 331ca462286a6adc46e2b78696a25ada xen-3.3.0.tar.gz +cd3f3eb54446be6003156158d51f4884 grub-0.97.tar.gz +bf8f1f9e3ca83d732c00a79a6ef29bc4 newlib-1.16.0.tar.gz +36cc57650cffda9a0269493be2a169bb lwip-1.3.0.tar.gz +cec05e7785497c5e19da2f114b934ffd pciutils-2.2.9.tar.bz2 +debc62758716a169df9f62e6ab2bc634 zlib-1.2.3.tar.gz diff --git a/xen-backport-hg18782.patch b/xen-backport-hg18782.patch new file mode 100644 index 0000000..71bdd88 --- /dev/null +++ b/xen-backport-hg18782.patch @@ -0,0 +1,65 @@ +# HG changeset patch +# User Keir Fraser +# Date 1226937271 0 +# Node ID 17911073a90a09c0dd781c2f09368d2d8b4c883e +# Parent 2188ed106885586376f7eb428b9ea9f16ec6f7c7 +tools: use sysfs interface to balloon driver if present + +The pvops dom0 kernel does not expose the balloon driver via +/proc/xen, so use the sysfs interface. + +Signed-off-by: Jeremy Fitzhardinge + +diff -r 2188ed106885 -r 17911073a90a tools/python/xen/xend/osdep.py +--- a/tools/python/xen/xend/osdep.py Fri Nov 14 14:33:25 2008 +0000 ++++ b/tools/python/xen/xend/osdep.py Mon Nov 17 15:54:31 2008 +0000 +@@ -38,7 +38,10 @@ + "SunOS": "vif-vnic" + } + +-def _linux_balloon_stat(label): ++PROC_XEN_BALLOON = '/proc/xen/balloon' ++SYSFS_XEN_MEMORY = '/sys/devices/system/xen_memory/xen_memory0' ++ ++def _linux_balloon_stat_proc(label): + """Returns the value for the named label, or None if an error occurs.""" + + xend2linux_labels = { 'current' : 'Current allocation', +@@ -47,7 +50,6 @@ + 'high-balloon' : 'High-mem balloon', + 'limit' : 'Xen hard limit' } + +- PROC_XEN_BALLOON = '/proc/xen/balloon' + f = file(PROC_XEN_BALLOON, 'r') + try: + for line in f: +@@ -61,6 +63,29 @@ + return None + finally: + f.close() ++ ++def _linux_balloon_stat_sysfs(label): ++ sysfiles = { 'target' : 'target_kb', ++ 'current' : 'info/current_kb', ++ 'low-balloon' : 'info/low_kb', ++ 'high-balloon' : 'info/high_kb', ++ 'limit' : 'info/hard_limit_kb' } ++ ++ name = os.path.join(SYSFS_XEN_MEMORY, sysfiles[label]) ++ f = file(name, 'r') ++ ++ val = f.read().strip() ++ if val.isdigit(): ++ return int(val) ++ return None ++ ++def _linux_balloon_stat(label): ++ if os.access(PROC_XEN_BALLOON, os.F_OK): ++ return _linux_balloon_stat_proc(label) ++ elif os.access(SYSFS_XEN_MEMORY, os.F_OK): ++ return _linux_balloon_stat_sysfs(label) ++ ++ return None + + def _solaris_balloon_stat(label): + """Returns the value for the named label, or None if an error occurs.""" diff --git a/xen.spec b/xen.spec index d233c00..5725ef5 100644 --- a/xen.spec +++ b/xen.spec @@ -2,7 +2,7 @@ # Always set these 3 tags %define base_version 3.3.0 -%define base_release 1 +%define base_release 2 # Hypervisor ABI %define hv_abi 3.3 @@ -52,19 +52,25 @@ Summary: Xen is a virtual machine monitor Name: xen Version: %{version_tag} -Release: %{release_tag}.1 +Release: %{release_tag} Group: Development/Libraries License: GPLv2+ and LGPLv2+ and BSD URL: http://xen.org/ Source0: %{source_tag} Source1: %{name}.modules Source2: %{name}.logrotate +# used by stubdoms +Source10: lwip-1.3.0.tar.gz +Source11: newlib-1.16.0.tar.gz +Source12: zlib-1.2.3.tar.gz +Source13: pciutils-2.2.9.tar.bz2 +Source14: grub-0.97.tar.gz Patch1: xen-initscript.patch Patch8: xen-xenstore-cli.patch - Patch13: xen-dumpdir.patch Patch14: xen-net-disable-bridge-by-default.patch Patch15: xen-net-disable-iptables-on-bridge.patch +Patch20: xen-backport-hg18782.patch # Patches to modify the default config of xend Patch100: xen-config-dom0-minmem.patch @@ -76,7 +82,7 @@ BuildRequires: transfig libidn-devel zlib-devel texi2html SDL-devel curl-devel BuildRequires: libX11-devel python-devel ghostscript tetex-latex BuildRequires: ncurses-devel gtk2-devel libaio-devel # for the docs -BuildRequires: perl +BuildRequires: perl texinfo # so that the makefile knows to install udev rules BuildRequires: udev %ifnarch ia64 @@ -158,21 +164,28 @@ which manage Xen virtual machines. %patch14 -p1 %patch15 -p1 +%patch20 -p1 + # config patches %patch100 -p1 %patch102 -p1 %patch103 -p1 +# stubdom sources +cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom + %build %if %{hv_build} CFLAGS="$RPM_OPT_FLAGS" %{__make} XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} tools docs xen +%{__make} stubdom %else CFLAGS="$RPM_OPT_FLAGS" %{__make} XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} tools docs +%{__make} stubdom %endif %install rm -rf %{buildroot} -make XENFB_TOOLS=y XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} prefix=/usr install-tools install-docs +make XENFB_TOOLS=y XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} prefix=/usr install-tools install-docs install-stubdom 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 @@ -398,9 +411,13 @@ rm -rf $RPM_BUILD_ROOT %if "%{_libdir}" != "/usr/lib" %dir /usr/lib/%{name} %endif +%dir /usr/lib/%{name}/bin %dir /usr/lib/%{name}/boot # HVM loader is always in /usr/lib regardless of multilib +/usr/lib/xen/bin/stubdom-dm +/usr/lib/xen/boot/ioemu-stubdom.gz /usr/lib/xen/boot/hvmloader +/usr/lib/xen/boot/pv-grub*.gz %endif # General Xen state %dir %{_localstatedir}/lib/%{name} @@ -461,6 +478,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.a %changelog +* Wed Dec 17 2008 Gerd Hoffmann - 3.3.0-2 +- build and package stub domains (pvgrub, ioemu). +- backport unstable fixes for pv_ops dom0. + * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 3.3.0-1.1 - Rebuild for Python 2.6