From 75a3df75336b9c73635b7fa8cdff506aeeecce9d Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Jul 21 2006 20:04:37 +0000 Subject: - include /var/xen/dump in file list - load blkbk, netbk and netloop when xend starts - update to cs 10712 --- diff --git a/.cvsignore b/.cvsignore index dbffffd..60343d9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xen-unstable-10675.tar.bz2 +xen-unstable-10712.tar.bz2 diff --git a/sources b/sources index eed6646..ce07a8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7522262f0712687cb52c337553cab183 xen-unstable-10675.tar.bz2 +4cd2e914ab01ddcbeac89c53fcec09e3 xen-unstable-10712.tar.bz2 diff --git a/xen-compile-fixes.patch b/xen-compile-fixes.patch index 3c58eed..3eaea66 100644 --- a/xen-compile-fixes.patch +++ b/xen-compile-fixes.patch @@ -8,3 +8,32 @@ #include #include #include +--- xen-unstable-10712/tools/blktap/drivers/block-vmdk.c.return 2006-07-21 13:45:14.000000000 -0400 ++++ xen-unstable-10712/tools/blktap/drivers/block-vmdk.c 2006-07-21 13:45:34.000000000 -0400 +@@ -226,6 +226,7 @@ + int min_index, i, j; + uint32_t min_count, *l2_table, tmp; + uint64_t cluster_offset; ++ int dummy; + + l1_index = (offset >> 9) / prv->l1_entry_sectors; + if (l1_index >= prv->l1_size) +@@ -268,7 +269,7 @@ + if (!allocate) + return 0; + cluster_offset = lseek(prv->fd, 0, SEEK_END); +- ftruncate(prv->fd, cluster_offset + ++ dummy = ftruncate(prv->fd, cluster_offset + + (prv->cluster_sectors << 9)); + cluster_offset >>= 9; + /* update L2 table */ +--- xen-unstable-10712/tools/blktap/drivers/Makefile.error 2006-07-21 13:47:55.000000000 -0400 ++++ xen-unstable-10712/tools/blktap/drivers/Makefile 2006-07-21 13:47:58.000000000 -0400 +@@ -13,7 +13,6 @@ + CFLAGS += -fPIC + CFLAGS += -Wall +-CFLAGS += -Werror + CFLAGS += -Wno-unused + CFLAGS += -g3 + CFLAGS += -fno-strict-aliasing + CFLAGS += -I $(XEN_LIBXC) -I $(LIBAIO_DIR) diff --git a/xen-initscript.patch b/xen-initscript.patch index 335fdaa..e4e74aa 100644 --- a/xen-initscript.patch +++ b/xen-initscript.patch @@ -1,120 +1,84 @@ -*** xen-unstable/tools/examples/init.d/xend.orig 2006-06-12 17:10:53.000000000 +0200 ---- xen-unstable/tools/examples/init.d/xend 2006-06-12 17:11:22.000000000 +0200 -*************** -*** 7,43 **** - # chkconfig: 2345 98 01 - # description: Starts and stops the Xen control daemon. - - if ! grep -q "control_d" /proc/xen/capabilities ; then - exit 0 - fi - - # Wait for Xend to be up - function await_daemons_up - { - i=1 - rets=10 -! xend status - while [ $? -ne 0 -a $i -lt $rets ]; do - sleep 1 - echo -n . - i=$(($i + 1)) -! xend status - done - } - - case "$1" in - start) -! xend start - await_daemons_up - ;; - stop) -! xend stop - ;; - status) -! xend status - ;; - restart|reload|force-reload) -! xend restart - await_daemons_up - ;; - *) ---- 7,64 ---- - # chkconfig: 2345 98 01 - # description: Starts and stops the Xen control daemon. - -+ # Source function library. -+ . /etc/rc.d/init.d/functions -+ -+ RETVAL=0 - if ! grep -q "control_d" /proc/xen/capabilities ; then -+ RETVAL=-1 - exit 0 - fi -+ prog=xend - - # Wait for Xend to be up - function await_daemons_up - { - i=1 - rets=10 -! /usr/sbin/xend status - while [ $? -ne 0 -a $i -lt $rets ]; do - sleep 1 - echo -n . - i=$(($i + 1)) -! /usr/sbin/xend status - done -+ if [ $i -ge $rets ]; then -+ RETVAL=-1 -+ return 1 -+ fi -+ return 0 - } - - case "$1" in - start) -! echo -n $"Starting $prog: " -! /usr/sbin/xend start - await_daemons_up - ;; - stop) -! echo -n $"Stopping $prog: " -! /usr/sbin/xend stop -! RETVAL=$? - ;; - status) -! /usr/sbin/xend status -! if [ $? = 0 ] ; then -! echo xend is running -! else -! echo xend is stopped -! fi -! exit 0 - ;; - restart|reload|force-reload) -! echo -n $"$1 $prog: " -! /usr/sbin/xend restart - await_daemons_up - ;; - *) -*************** case "$1" in -*** 47,51 **** - exit 1 - esac - -! exit $? - ---- 68,79 ---- - exit 1 - esac - -! if [ $RETVAL = 0 ] ; then -! echo_success -! echo -! else -! echo_failure -! echo -! fi -! exit $RETVAL - +--- xen-unstable-10712/tools/examples/init.d/xend.init 2006-07-21 13:31:22.000000000 -0400 ++++ xen-unstable-10712/tools/examples/init.d/xend 2006-07-21 15:42:23.000000000 -0400 +@@ -7,37 +7,61 @@ + # chkconfig: 2345 98 01 + # description: Starts and stops the Xen control daemon. + ++# Source function library. ++. /etc/rc.d/init.d/functions ++ ++RETVAL=0 + if ! grep -q "control_d" /proc/xen/capabilities ; then ++ RETVAL=-1 + exit 0 + fi ++prog=xend + + # Wait for Xend to be up + function await_daemons_up + { + i=1 + rets=10 +- xend status ++ /usr/sbin/xend status + while [ $? -ne 0 -a $i -lt $rets ]; do + sleep 1 + echo -n . + i=$(($i + 1)) +- xend status ++ /usr/sbin/xend status + done ++ if [ $i -ge $rets ]; then ++ RETVAL=-1 ++ return 1 ++ fi ++ return 0 + } + + case "$1" in + start) +- xend start ++ echo -n $"Starting $prog: " ++ modprobe blkbk ++ modprobe netbk ++ modprobe netloop ++ /usr/sbin/xend start + await_daemons_up + ;; + stop) +- xend stop ++ echo -n $"Stopping $prog: " ++ /usr/sbin/xend stop ++ RETVAL=$? + ;; + status) +- xend status ++ /usr/sbin/xend status ++ if [ $? = 0 ] ; then ++ echo xend is running ++ else ++ echo xend is stopped ++ fi ++ exit 0 + ;; + restart|reload|force-reload) +- xend restart ++ echo -n $"$1 $prog: " ++ /usr/sbin/xend restart + await_daemons_up + ;; + *) +@@ -47,5 +71,12 @@ + exit 1 + esac + +-exit $? ++if [ $RETVAL = 0 ] ; then ++ echo_success ++ echo ++else ++ echo_failure ++ echo ++fi ++exit $RETVAL + diff --git a/xen.spec b/xen.spec index 6c673d7..e6e4108 100644 --- a/xen.spec +++ b/xen.spec @@ -3,11 +3,11 @@ Summary: Xen is a virtual machine monitor Name: xen Version: 3.0.2 -Release: 17 +Release: 17.2 Group: Development/Libraries License: GPL URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html -Source0: xen-unstable-10675.tar.bz2 +Source0: xen-unstable-10712.tar.bz2 Source2: xenguest-install.py Source3: xen-udev.rules Patch1: xen-initscript.patch @@ -77,7 +77,7 @@ This package contains what's needed to develop applications to manage Xen virtual machines. %prep -%setup -q -n xen-unstable.hg +%setup -q -n xen-unstable-10712 %patch1 -p1 -b .init %patch2 -p1 -b .nic %patch3 -p1 -b .compile @@ -138,7 +138,7 @@ install -m 755 xenguest-install.py %{buildroot}%{_sbindir} rm -fr %{buildroot}/%{_datadir}/doc/xen/ # create dirs in /var/run so that selinux contexts are right (#195952) -mkdir -p %{buildroot}/var/run/xend +mkdir -p %{buildroot}/var/run/xend %{buildroot}/var/xen/dump %post /sbin/chkconfig --add xend @@ -179,11 +179,14 @@ rm -rf $RPM_BUILD_ROOT %dir %{_localstatedir}/lib/xenstored %dir %{_localstatedir}/run/xenstored %dir %{_localstatedir}/run/xend +%dir %{_localstatedir}/xen +%dir %{_localstatedir}/xen/dump %files libs %defattr(-,root,root) %{_libdir}/*.so.* %{_libdir}/libxenstore.so +%{_libdir}/libblktap.so %files devel %defattr(-,root,root) @@ -195,8 +198,15 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libxenctrl.a %{_libdir}/libxenguest.so %{_libdir}/libxenguest.a +%{_libdir}/libxenstore.a +%{_libdir}/libblktap.a %changelog +* Fri Jul 21 2006 Jeremy Katz - 3.0.2-18 +- include /var/xen/dump in file list +- load blkbk, netbk and netloop when xend starts +- update to cs 10712 + * Wed Jul 19 2006 Mark McLoughlin - 3.0.2-17 - libxenstore is unversioned, so make xen-libs own it rather than xen-devel