]> xenbits.xensource.com Git - osstest.git/commitdiff
libvirt: Fixes for older versions of Xen
authorIan Campbell <ian.campbell@citrix.com>
Fri, 2 May 2014 13:08:04 +0000 (14:08 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2014 13:40:11 +0000 (14:40 +0100)
libvirt supports Xen 4.2 onwards. However:
  - We were not correctly setting the libvirtbuildjob runvar on 4.3 and
    earlier.
  - Xen 4.2 installs to /usr not /usr/local so the CFLAGS/LDFLAGS used to build
    libvirt were wrong.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
mfi-common
ts-libvirt-build

index ae4d547e1ddc80e2ccd779ff2183ff83d5e2209d..464001a7e6a0afcb2e1ecb3ab3ca686a768de66e 100644 (file)
@@ -209,13 +209,13 @@ job_create_test () {
     xen-3.*-testing:*) ;;
     xen-4.0-testing:*) ;;
     xen-4.1-testing:*) ;;
+    *:libvirt) tsbuildjob="libvirtbuildjob=$buildjob-libvirt"
+            ;;
     xen-4.2-testing:*) ;;
     xen-4.3-testing:*) ;;
     *:xend) xenbuildjob="$xenbuildjob-xend"
             buildjob="${bfi}build-$dom0arch-xend"
             ;;
-    *:libvirt) tsbuildjob="libvirtbuildjob=$buildjob-libvirt"
-            ;;
   esac
 
   ./cs-job-create $flight $job $recipe toolstack=$toolstack       \
index 9c731cea11e2ffbedbe34bf7176bd11594885cd9..40e0692a898d6160dd99a463ef57f904805c10af 100755 (executable)
@@ -48,12 +48,21 @@ sub checkout () {
 }
 
 sub config() {
+    my $xenprefix;
+    foreach (qw(/usr/local /usr)) {
+       if (target_file_exists($ho, "$xendist$_/lib/libxenctrl.so")) {
+           $xenprefix="$xendist$_";
+           last;
+       }
+    }
+    die "no xen prefix" unless $xenprefix;
+
     # Uses $GNULIB_SRCDIR because ./autogen.sh doesn't propagate
     # --gnulib-srcdir to ./bootstap.
     target_cmd_build($ho, 3600, $builddir, <<END);
         cd libvirt
-        CFLAGS="-I$xendist/usr/local/include/" \\
-        LDFLAGS="-L$xendist/usr/local/lib/ -Wl,-rpath-link=$xendist/usr/local/lib/" \\
+        CFLAGS="-I$xenprefix/include/" \\
+        LDFLAGS="-L$xenprefix/lib/ -Wl,-rpath-link=$xenprefix/lib/" \\
        GNULIB_SRCDIR=$builddir/gnulib-libvirt \\
             ./autogen.sh --no-git \\
                          --with-libxl --without-xen --without-xenapi --without-selinux \\