[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST] ts-libvirt-build: use Osstest::BuildSupport::submodulefixup



Instead of cloning gnulib manually which can break if upstream gnulib
gets ahead of libvirt.git (which applies patches on the fly etc). By
using submodulefixup we automatically DTRT and use the version of
gnulib specified by the libvirt.git submodule metadata, but with a
runvar override if necessary.

This also removes a whole bunch of faffing in ap-*, cr-daily-branch
and mfi-common to get the version of gnulib to use, which was always a
bit of a wart (ungated for one thing...).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 ap-common            |  3 ---
 ap-fetch-version     |  4 ----
 ap-fetch-version-old |  4 ----
 ap-print-url         |  3 ---
 ap-push              |  5 -----
 cr-daily-branch      |  4 ----
 mfi-common           |  1 -
 ts-libvirt-build     | 15 ++++-----------
 8 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/ap-common b/ap-common
index ff50754..96cbd14 100644
--- a/ap-common
+++ b/ap-common
@@ -37,8 +37,6 @@
 : ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git}
 : ${BASE_TREE_LIBVIRT:=git://xenbits.xen.org/libvirt.git}
 
-: ${TREE_GNULIB_LIBVIRT:=$(besteffort_repo git://git.sv.gnu.org/gnulib.git)}
-
 : ${TREE_RUMPUSERXEN:=https://github.com/rumpkernel/rumprun-xen}
 : ${TREEVCS_RUMPUSERXEN:=git}
 : ${BASE_TREE_RUMPUSERXEN:=git://xenbits.xen.org/rumpuser-xen.git}
@@ -77,7 +75,6 @@ fi
 : ${LOCALREV_XEN:=daily-cron.$branch}
 : ${LOCALREV_LINUX:=daily-cron.$branch}
 : ${LOCALREV_LIBVIRT:=daily-cron.$branch}
-: ${LOCALREV_GNULIB_LIBVIRT:=daily-cron.$branch}
 : ${LOCALREV_RUMPUSERXEN:=daily-cron.$branch}
 : ${LOCALREV_SEABIOS:=daily-cron.$branch}
 
diff --git a/ap-fetch-version b/ap-fetch-version
index 9c189b4..f6c65d8 100755
--- a/ap-fetch-version
+++ b/ap-fetch-version
@@ -77,10 +77,6 @@ libvirt)
        repo_tree_rev_fetch_git libvirt \
                $TREE_LIBVIRT master $LOCALREV_LIBVIRT
        ;;
-gnulib-libvirt)
-       repo_tree_rev_fetch_git gnulib-libvirt \
-               $TREE_GNULIB_LIBVIRT master $LOCALREV_GNULIB_LIBVIRT
-       ;;
 rumpuserxen)
        repo_tree_rev_fetch_git rumpuserxen \
                $TREE_RUMPUSERXEN master $LOCALREV_RUMPUSERXEN
diff --git a/ap-fetch-version-old b/ap-fetch-version-old
index f3cf339..43c997c 100755
--- a/ap-fetch-version-old
+++ b/ap-fetch-version-old
@@ -88,10 +88,6 @@ rumpuserxen)
        repo_tree_rev_fetch_git rumpuserxen \
                $BASE_TREE_RUMPUSERXEN xen-tested-master 
$BASE_LOCALREV_RUMPUSERXEN
        ;;
-gnulib-libvirt)
-       # No push gate, same as ap-fetch-version
-       ./ap-fetch-version $branch
-       ;;
 seabios)
        repo_tree_rev_fetch_git seabios \
                $BASE_TREE_SEABIOS xen-tested-master $BASE_LOCALREV_SEABIOS
diff --git a/ap-print-url b/ap-print-url
index a14d2a6..7b27e1e 100755
--- a/ap-print-url
+++ b/ap-print-url
@@ -52,9 +52,6 @@ linuxfirmware)
 libvirt)
        echo $TREE_LIBVIRT
        ;;
-gnulib-libvirt)
-       echo $TREE_GNULIB_LIBVIRT
-       ;;
 rumpuserxen)
        echo $TREE_RUMPUSERXEN
        ;;
diff --git a/ap-push b/ap-push
index 9df900a..a2aa747 100755
--- a/ap-push
+++ b/ap-push
@@ -88,11 +88,6 @@ rumpuserxen)
        cd $repos/rumpuserxen
        git push $TREE_RUMPUSERXEN $revision:xen-tested-master
        ;;
-gnulib-libvirt)
-       # No gate
-       echo "gnulib-libvirt has not push gate, refusing to push" >&2
-       exit 1
-       ;;
 seabios)
        cd $repos/seabios
        git push $TREE_SEABIOS $revision:refs/heads/xen-tested-master
diff --git a/cr-daily-branch b/cr-daily-branch
index 17bb2c9..fc663ce 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -150,10 +150,6 @@ if [ "x$REVISION_LIBVIRT" = x ]; then
        determine_version REVISION_LIBVIRT libvirt LIBVIRT
        export REVISION_LIBVIRT
 fi
-if [ "x$REVISION_GNULIB_LIBVIRT" = x ]; then
-       determine_version REVISION_GNULIB_LIBVIRT gnulib-libvirt GNULIB_LIBVIRT
-       export REVISION_GNULIB_LIBVIRT
-fi
 if [ "x$REVISION_RUMPUSERXEN" = x ]; then
        determine_version REVISION_RUMPUSERXEN rumpuserxen RUMPUSERXEN
        export REVISION_RUMPUSERXEN
diff --git a/mfi-common b/mfi-common
index 5c4f5d5..e167606 100644
--- a/mfi-common
+++ b/mfi-common
@@ -187,7 +187,6 @@ create_build_jobs () {
                 host_hostflags=$build_hostflags                              \
                 buildjob=${bfi}build-$arch                                   \
                 tree_libvirt=$TREE_LIBVIRT revision_libvirt=$REVISION_LIBVIRT\
-                tree_gnulib_libvirt=$TREE_GNULIB_LIBVIRT 
revision_gnulib_libvirt=$REVISION_GNULIB_LIBVIRT\
 
     fi
 
diff --git a/ts-libvirt-build b/ts-libvirt-build
index 940c034..1e7d0ad 100755
--- a/ts-libvirt-build
+++ b/ts-libvirt-build
@@ -25,6 +25,8 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 builddirsprops();
 
+our %submodmap = qw(gnulib gnulib);
+
 sub libvirtd_init ();
 
 sub checkout () {
@@ -32,7 +34,7 @@ sub checkout () {
     xendist();
 
     build_clone($ho, 'libvirt', $builddir, 'libvirt');
-    build_clone($ho, 'gnulib_libvirt', $builddir, 'gnulib-libvirt');
+    my $submodules = submodulefixup($ho, 'libvirt', 'libvirt', \%submodmap);
 }
 
 sub config() {
@@ -45,15 +47,11 @@ sub config() {
     }
     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$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 \\
+            ./autogen.sh --with-libxl --without-xen --without-xenapi 
--without-selinux \\
                          --without-lxc --without-vbox --without-uml \\
                          --sysconfdir=/etc --localstatedir=/var #/
 END
@@ -83,15 +81,10 @@ END
 END
 }
 
-sub collectversion_gnulib () {
-    store_revision($ho, 'gnulib_libvirt', "$builddir/gnulib-libvirt", 1);
-}
-
 checkout();
 config();
 build();
 install();
-collectversion_gnulib();
 built_stash($ho, $builddir, 'dist', 'libvirtdist');
 
 sub libvirtd_init () {
-- 
2.1.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.