Hello community,

here is the log from the commit of package xen for openSUSE:Factory
checked in at Tue Apr 19 12:52:13 CEST 2011.



--------
--- xen/xen.changes     2011-03-31 14:42:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/xen/xen.changes        2011-04-12 
00:31:35.000000000 +0200
@@ -1,0 +2,34 @@
+Mon Apr 11 15:55:04 MDT 2011 - [email protected]
+
+- bnc#685338: Fix porting of xend-domain-lock.patch
+
+-------------------------------------------------------------------
+Mon Apr 11 19:33:34 CEST 2011 - [email protected]
+
+- update scripts to use xl instead of xm:
+  xen-updown.sh, init.xendomains, xmclone.sh
+
+-------------------------------------------------------------------
+Mon Apr 11 17:34:46 CEST 2011 - [email protected]
+
+- disable xend in openSuSE > 11.4
+  the xl command is the replacement for the xm command
+
+-------------------------------------------------------------------
+Thu Apr  7 18:16:45 CEST 2011 - [email protected]
+
+- mark runlevel scripts as config to preserve local changes by
+  admin or dev during package update
+
+-------------------------------------------------------------------
+Thu Apr  7 18:11:14 CEST 2011 - [email protected]
+
+- enable xencommons runlevel script during upgrade if xend was
+  already enabled
+
+-------------------------------------------------------------------
+Thu Apr  7 17:50:23 CEST 2011 - [email protected]
+
+- call /sbin/ldconfig directly in xen-libs post install scripts
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.qkwtFZ/_old  2011-04-19 12:22:08.000000000 +0200
+++ /var/tmp/diff_new_pack.qkwtFZ/_new  2011-04-19 12:22:08.000000000 +0200
@@ -26,6 +26,11 @@
 %define xen_build_dir xen-4.1.0-testing
 %define with_kmp 1
 %define with_stubdom 0
+%if %suse_version > 1140
+%define with_xend 0
+%else
+%define with_xend 1
+%endif
 BuildRequires:  LibVNCServer-devel
 BuildRequires:  SDL-devel
 BuildRequires:  automake
@@ -75,7 +80,7 @@
 BuildRequires:  kernel-source kernel-syms module-init-tools xorg-x11
 %endif
 Version:        4.1.0_01
-Release:        5
+Release:        7
 License:        GPLv2+
 Group:          System/Kernel
 AutoReqProv:    on
@@ -255,7 +260,6 @@
 Patch99999:     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()")
 %define pyver %(python -c "import sys; print sys.version[:3]")
 %if %{?with_kmp}0
 %suse_kernel_module_package -n xen um xen -f kmp_filelist
@@ -726,9 +730,6 @@
 make -C tools/include/xen-foreign %{?_smp_mflags}
 make tools docs %{?_smp_mflags}
 make -C tools/debugger/gdbsx
-#### there are code problems that don't pass the 02-check-gcc-output, hence 
bitbucket
-###env MAKE="make %{?_smp_mflags}" ./gdbbuild 1>/dev/null 2>/dev/null
-###cd ../../..
 %if %{?with_kmp}0
 # pv driver modules
 export XL=/usr/src/linux
@@ -748,9 +749,7 @@
 make -C tools/xen-utils-0.1 XEN_INTREE_BUILD=yes
 
 %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=""
@@ -776,8 +775,6 @@
 make -C xen install max_phys_cpus=%{max_cpus} pae=%{pae_enabled} debug=n 
crash_debug=n DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags}
 install_xen
 make -C xen clean
-export CFLAGS="$RPM_OPT_FLAGS"
-export RPM_OPT_FLAGS
 make -C tools/include/xen-foreign %{?_smp_mflags}
 # tools
 export XEN_PYTHON_NATIVE_INSTALL=1
@@ -812,7 +809,6 @@
     DOCDIR=%{_defaultdocdir}/xen INCDIR=%{_includedir}
 mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/xen
 %ifarch x86_64
-ln -s /usr/lib/xen/boot/pv-grub-x86_32.gz 
$RPM_BUILD_ROOT/usr/lib/xen/boot/pv-grub-x86_32.gz
 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
@@ -868,7 +864,6 @@
 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/lib/xen/xenpaging
 mkdir -p $RPM_BUILD_ROOT/var/log/xen
 ln -s /var/lib/xen/images $RPM_BUILD_ROOT/etc/xen/images
 # Bootloader
@@ -889,7 +884,6 @@
 rm -f  $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc64
 rm -f  $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-ppc
 rm -f  $RPM_BUILD_ROOT/usr/sbin/netfix
-#rm -f  $RPM_BUILD_ROOT/%pysite/*.egg-info
 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.*
@@ -919,13 +913,7 @@
 %files libs
 %defattr(-,root,root)
 %{_libdir}/fs/
-%{_libdir}/libblktap.so.*
-%{_libdir}/libflask.so.*
-%{_libdir}/libfsimage.so.*
-%{_libdir}/libxen*.so.*
-%{_libdir}/libvhd.so.*
-%{_libdir}/libxlutil.so.*
-%{_libdir}/libblktapctl.so.*
+%{_libdir}/*.so.*
 
 %files tools
 %defattr(-,root,root)
@@ -990,18 +978,14 @@
 %dir /var/lib/xen/xend-db/vnet
 %dir /var/lib/xenstored
 %dir /var/log/xen
-/etc/init.d/xend
-/etc/init.d/xendomains
-/etc/init.d/xencommons
-/etc/init.d/xen-watchdog                                                       
                                                                                
      
+%config /etc/init.d/*
 %config /etc/logrotate.d/xen
 %dir %attr(700,root,root) /etc/xen
 /etc/xen/auto
 %config /etc/xen/examples
 /etc/xen/images
 /etc/xen/scripts
-/etc/xen/cpupool
-#/etc/xen/scripts/qemu-ifup
+%config /etc/xen/cpupool
 /etc/xen/README*
 %config /etc/xen/vm
 %config(noreplace) /etc/xen/*.sxp
@@ -1032,7 +1016,6 @@
 %dir %{_datadir}/xen/man/man1
 %dir %{_datadir}/xen/man/man8
 %dir %{_datadir}/xen/qemu
-#%dir %{_datadir}/xen/qemu/keymaps
 %{_datadir}/xen/*.dtd
 %{_datadir}/xen/qemu/*
 %{_datadir}/xen/man/man1/*
@@ -1055,12 +1038,9 @@
 #/usr/lib/xen/bin/xc_kexec
 %endif
 /usr/lib/xen/boot/hvmloader
-#%pysite/xen/*
 %{_libdir}/python%{pyver}/site-packages/xen/*
 /usr/lib/xen/boot/domUloader.py
-#%pysite/grub/*
 %{_libdir}/python%{pyver}/site-packages/grub/*
-#%pysite/fsimage.so
 %{_libdir}/python%{pyver}/site-packages/fsimage.so
 %if %{?with_stubdom}0
 /usr/lib/xen/boot/ioemu-stubdom.gz
@@ -1078,29 +1058,10 @@
 
 %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
-%{_libdir}/libvhd.a
-%{_libdir}/libvhd.so
-%{_libdir}/libxlutil.a
-%{_libdir}/libxlutil.so
-%{_libdir}/libblktapctl.a
-%{_libdir}/libblktapctl.so
+%{_libdir}/*.a
+%{_libdir}/*.so
+/usr/include/*
 /usr/bin/serial-split
-/usr/include/blktaplib.h
-/usr/include/fsimage*
-/usr/include/xen*.h
-/usr/include/xen/
-/usr/include/xs.h
-/usr/include/xs_lib.h
-/usr/include/libxl.h
-/usr/include/_libxl_types.h                                                    
                                                                                
      
-/usr/include/libxl_uuid.h
 
 %files doc-html
 %defattr(-,root,root)
@@ -1110,12 +1071,36 @@
 %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
+%if %{?with_xend}0
+# with_xend
+# 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."
+        echo "postin %{name}-tools: with xend"
+    fi
+    %{fillup_and_insserv -Y -n xencommons xencommons}
+else
+    %{fillup_and_insserv -y -n xencommons xencommons}
+fi
 %{fillup_and_insserv -y -n xend xend}
+%else
+# without_xend
+# 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."
+    fi
+    echo "postin %{name}-tools: disabling xend in favor of xencommons. xm 
command replaced by xl."
+    %{stop_on_removal xend}
+    rm -fv /etc/init.d/rc?.d/???xend || :
+    %{fillup_and_insserv -Y -n xencommons xencommons}
+else
+    %{fillup_and_insserv -y -n xencommons xencommons}
+fi
+%endif
+#
 %{fillup_and_insserv -y -n xendomains xendomains}
 if [ -f /usr/bin/qemu-img ]; then
     if [ -f /usr/bin/qemu-img-xen ]; then
@@ -1131,10 +1116,13 @@
 fi
 
 %preun tools
-%{stop_on_removal xendomains xend}
+%{stop_on_removal xendomains xend xencommons}
 
 %postun tools
+%if %{?with_xend}0
+# with_xend
 %{restart_on_update xend}
+%endif
 %{insserv_cleanup}
 if [ -f /usr/bin/qemu-img-xen ]; then
     rm /usr/bin/qemu-img-xen
@@ -1143,10 +1131,8 @@
     rm /usr/bin/qemu-nbd-xen
 fi
 
-%post libs
-/sbin/ldconfig
+%post libs -p /sbin/ldconfig
 
-%postun libs
-/sbin/ldconfig
+%postun libs -p /sbin/ldconfig
 
 %changelog

++++++ init.xendomains ++++++
--- /var/tmp/diff_new_pack.qkwtFZ/_old  2011-04-19 12:22:08.000000000 +0200
+++ /var/tmp/diff_new_pack.qkwtFZ/_new  2011-04-19 12:22:08.000000000 +0200
@@ -24,6 +24,7 @@
 LOCKFILE=/var/lock/subsys/xendomains
 XENDOM_CONFIG=/etc/sysconfig/xendomains
 RETCODE_FILE=/tmp/xendomains.rc.$$
+xm_cmd=xl
 
 . "$XENDOM_CONFIG"
 
@@ -127,7 +128,7 @@
 
 xm_list()
 {
-       TERM=vt100 xm list | grep -v '^Name *ID'
+       TERM=vt100 ${xm_cmd} list | grep -v '^Name *ID'
 }
 
 is_cfg_running()
@@ -163,7 +164,7 @@
                printed=1
                for dom in "$XENDOMAINS_SAVE"/*; do
                        echo -n "       ${dom##*/}: "
-                       xm restore "$dom" >/dev/null 2>&1
+                       ${xm_cmd} restore "$dom" >/dev/null 2>&1
                        if [ $? -ne 0 ]; then
                                rc_failed
                        else
@@ -184,9 +185,9 @@
                                rc_status -s
                        else
                                if grep -q "^name" "$dom";then
-                                       xm create --quiet --defconfig "$dom"
+                                       ${xm_cmd} create --quiet --defconfig 
"$dom"
                                elif grep -q "(name .*" "$dom";then
-                                       xm create --quiet --config "$dom"
+                                       ${xm_cmd} create --quiet --config "$dom"
                                fi
                                if [ $? -ne 0 ]; then
                                    rc_failed
@@ -224,19 +225,19 @@
 
 migrate_with_watchdog()
 {
-       (xm migrate "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
+       (${xm_cmd} migrate "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
        watchdog_xm $!
 }
 
 save_with_watchdog()
 {
-       (xm save "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
+       (${xm_cmd} save "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
        watchdog_xm $!
 }
 
 shutdown_with_watchdog()
 {
-       (xm shutdown -w "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
+       (${xm_cmd} shutdown -w "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 
2>&1 &
        watchdog_xm $!
 }
 
@@ -309,7 +310,7 @@
                        for sysrq in $XENDOMAINS_SYSRQ; do
                                echo -n "       $name: "
                                echo -n "sending sysrq '$sysrq'... "
-                               xm sysrq $id $sysrq
+                               ${xm_cmd} sysrq $id $sysrq
                                if [ $? -ne 0 ]; then
                                        rc_failed
                                else
@@ -323,7 +324,7 @@
                if is_zombie_state "$state"; then
                        echo -n "       $name: "
                        echo -n "destroying zombie... "
-                       xm destroy $id
+                       ${xm_cmd} destroy $id
                        rc_reset
                        rc_status -v
                        continue

++++++ xen-updown.sh ++++++
--- /var/tmp/diff_new_pack.qkwtFZ/_old  2011-04-19 12:22:09.000000000 +0200
+++ /var/tmp/diff_new_pack.qkwtFZ/_new  2011-04-19 12:22:09.000000000 +0200
@@ -12,6 +12,7 @@
        exit $R_USAGE
 }
 
+xm_cmd=xl
 ######################################################################
 # change the working direcory and source some common files
 #
@@ -94,7 +95,7 @@
 
 xm_list()
 {
-       TERM=vt100 xm list | grep -v '^Name *ID'
+       TERM=vt100 ${xm_cmd} list | grep -v '^Name *ID'
 }
 
 # For the specified vm, return a list of vifs that are connected to $INTERFACE


++++++ xend-domain-lock.patch ++++++
--- /var/tmp/diff_new_pack.qkwtFZ/_old  2011-04-19 12:22:09.000000000 +0200
+++ /var/tmp/diff_new_pack.qkwtFZ/_new  2011-04-19 12:22:09.000000000 +0200
@@ -282,3 +282,102 @@
 +elif [ $0 = "$basedir/vm-monitor" ]; then
 +      monitor $*
 +fi
+Index: xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
+===================================================================
+--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -470,6 +470,7 @@ class XendDomainInfo:
+ 
+         if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, 
XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED):
+             try:
++                self.acquire_running_lock();
+                 XendTask.log_progress(0, 30, self._constructDomain)
+                 XendTask.log_progress(31, 60, self._initDomain)
+                 
+@@ -2984,6 +2985,11 @@ class XendDomainInfo:
+ 
+             self._stateSet(DOM_STATE_HALTED)
+             self.domid = None  # Do not push into _stateSet()!
++
++             try:
++                 self.release_running_lock()
++             except:
++                 log.exception("Failed to release domain lock.")
+         finally:
+             self.refresh_shutdown_lock.release()
+ 
+@@ -4491,6 +4497,74 @@ class XendDomainInfo:
+     def has_device(self, dev_class, dev_uuid):
+         return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
+ 
++     # Return name of host contained in lock file.
++     def get_lock_host(self, path):
++         fin = os.popen(xoptions.get_xend_domain_lock_utility() + \
++                        ' -s ' + path, 'r')
++         hostname = "unknown"
++
++         try:
++             tokens = fin.readline().split()
++             for token in tokens:
++                 item = token.split('=')
++                 if item[0] == 'host':
++                     hostname = item[1]
++             return hostname
++         finally:
++             fin.close()
++
++     # Acquire a lock for the domain.  No-op if domain locking is turned off.
++     def acquire_running_lock(self):
++         if not xoptions.get_xend_domain_lock():
++             return
++
++         log.debug("Acquiring lock for domain %s" % self.info['name_label'])
++         path = xoptions.get_xend_domain_lock_path()
++         path = os.path.join(path, self.get_uuid())
++
++         try:
++             if not os.path.exists(path):
++                 mkdir.parents(path, stat.S_IRWXU)
++         except:
++             log.exception("%s could not be created." % path)
++             raise XendError("%s could not be created." % path)
++
++         status = os.system('%s -l -p %s -n %s -i %s %s' % \
++                            (xoptions.get_xend_domain_lock_utility(), \
++                             XendNode.instance().get_name(), \
++                             self.info['name_label'], \
++                             self.info['uuid'], \
++                             path))
++         if status != 0:
++             log.debug("Failed to aqcuire lock: status = %d" % status)
++             raise XendError("The VM is locked and appears to be running on 
host %s." % self.get_lock_host(path))
++
++     # Release lock for domain.  No-op if domain locking is turned off.
++     def release_running_lock(self, name = None):
++         if not xoptions.get_xend_domain_lock():
++             return
++
++         dom_name = self.info['name_label']
++         if name:
++             dom_name = name
++         log.debug("Releasing lock for domain %s" % dom_name)
++
++         path = xoptions.get_xend_domain_lock_path()
++         path = os.path.join(path, self.get_uuid())
++         status = os.system('%s -u -p %s -n %s -i %s %s' % \
++                            (xoptions.get_xend_domain_lock_utility(), \
++                             XendNode.instance().get_name(), \
++                             dom_name, \
++                             self.info['uuid'], \
++                             path))
++         if status != 0:
++             log.exception("Failed to release lock: status = %s" % status)
++         try:
++             if len(os.listdir(path)) == 0:
++                 shutil.rmtree(path)
++         except:
++             log.exception("Failed to remove unmanaged directory %s." % path)
++
+     def __str__(self):
+         return '<domain id=%s name=%s memory=%s state=%s>' % \
+                (str(self.domid), self.info['name_label'],

++++++ xmclone.sh ++++++
--- /var/tmp/diff_new_pack.qkwtFZ/_old  2011-04-19 12:22:09.000000000 +0200
+++ /var/tmp/diff_new_pack.qkwtFZ/_new  2011-04-19 12:22:09.000000000 +0200
@@ -36,6 +36,7 @@
 DOMU_IS_FILE_BASED=
 DOMU_ROOTDEV=
 FORCE=no
+xm_cmd=xl
 
 
 #
@@ -481,11 +482,11 @@
 #
 # Make sure that the source VM is not running
 #
-xmid=`xm domid "$SOURCE" 2>/dev/null`
+xmid=`${xm_cmd} domid "$SOURCE" 2>/dev/null`
 if [ $? -eq 0 ] && [ -n "$xmid" ] && [ -z "${xmid//[[:digit:]]/}" ]
 then
        echo "domU $SOURCE is currently running on Xen, please shutdown before 
cloning." >&2
-       echo "The command \"xm shutdown $xmid -w\" will shutdown the domU" >&2
+       echo "The command \"${xm_cmd} shutdown $xmid -w\" will shutdown the 
domU" >&2
        exit 1
 fi
 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to