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

[Xen-devel] [OSSTEST PATCH 2/2] ts-rumpuserxen-build: Cope with new layout, disabling bodges



The rumpsrc psuedo-submodule has been integrated with the nblibs
submodule and made into a proper submodule.

Also, in the intervening time, rumpuserxen/Config.mk now uses ?= when
setting XEN_HEADERS.

So if we detect that we have a new rumpuser-xen, we can disable:
 - ad-hoc arrangements for rumpsrc
 - grievous-bodge
 - patching Config.mk

We consider a rumpuserxen old iff it has nblibs as a submodule and
lacks rumpsrc as a submodule.

We have to have a different name for the rumpsrc submodule (rather
than using rumpsrc), because in the new arrangements it needs to be
fetched from the location specified in rumpuserxen's .gitmodules
rather than our own configured location for the old rumpsrc.  (And the
local name is in the runvars etc.)

The old runvars etc. for rumpsrc need to stay around to cope with old
rumpuserxen, for now, but are going to be obsolete.  Leave some
comments about this in relevant places.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ap-common            |    2 ++
 mfi-common           |    2 ++
 ts-rumpuserxen-build |   48 +++++++++++++++++++++++++++++-------------------
 3 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/ap-common b/ap-common
index ba3a180..6c7e654 100644
--- a/ap-common
+++ b/ap-common
@@ -46,6 +46,8 @@
 
 : ${TREE_RUMPUSERXEN_RUMPSRC:=$(besteffort_repo 
https://github.com/rumpkernel/rumpkernel-netbsd-src)}
 : ${TREEVCS_RUMPUSERXEN_RUMPSRC:=git}
+# rumpsrc-related runvars needed only for old rumpuser-xen
+# (ie ones which need $bodges=1 in ts-rumpuserxen-build)
 
 : ${TREE_SEABIOS_UPSTREAM:=git://git.seabios.org/seabios.git}
 : ${PUSH_TREE_SEABIOS:=$XENBITS:/home/xen/git/osstest/seabios.git}
diff --git a/mfi-common b/mfi-common
index 5dcb2ee..2055bab 100644
--- a/mfi-common
+++ b/mfi-common
@@ -206,6 +206,8 @@ create_build_jobs () {
                 revision_rumpuserxen=$REVISION_RUMPUSERXEN             \
                 tree_rumpuserxen_rumpsrc=$TREE_RUMPUSERXEN_RUMPSRC     \
                 
${TREEVCS_RUMPUSERXEN_RUMPSRC:+treevcs_rumpuserxen_rumpsrc=}${TREEVCS_RUMPUSERXEN_RUMPSRC}
+                # rumpsrc-related runvars needed only for old rumpuser-xen
+                # (ie ones which need $bodges=1 in ts-rumpuserxen-build)
                ;;
     esac
 
diff --git a/ts-rumpuserxen-build b/ts-rumpuserxen-build
index 3f72719..ee2db97 100755
--- a/ts-rumpuserxen-build
+++ b/ts-rumpuserxen-build
@@ -26,38 +26,48 @@ selectbuildhost(@ARGV);
 builddirsprops();
 
 our %submodmap = qw(nblibs nblibs
-                    buildrump.sh buildrumpsh);
+                    buildrump.sh buildrumpsh
+                    rumpsrc netbsdsrc);
 
-our ($rux);
+our ($rux, $bodges);
 
 sub checkout () {
     prepbuilddirs();
     xendist();
 
     build_clone($ho, 'rumpuserxen', $builddir, 'rumpuserxen');
-    submodulefixup($ho, 'rumpuserxen', 'rumpuserxen', \%submodmap);
+    my $submodules =
+       submodulefixup($ho, 'rumpuserxen', 'rumpuserxen', \%submodmap);
     $rux = "$builddir/rumpuserxen";
 
-    my $rumpsrcgitrevr = "$rux/buildrump.sh/.srcgitrev";
-    my $rumpsrcgitrevl = "buildrump-srcgitrev";
-    my $rev = $r{revision_rumpuserxen_rumpsrc};
-    if (length $rev) {
-       target_putfilecontents_stash($ho,30,
-                                    "$r{revision_rumpuserxen_rumpsrc}\n",
-                                    $rumpsrcgitrevr, $rumpsrcgitrevl);
-    } else {
-       target_getfile($ho,30,$rumpsrcgitrevr,"$stash/$rumpsrcgitrevl");
-       $rev = get_filecontents("$stash/$rumpsrcgitrevl");
-       chomp $rev or die;
-       $rev =~ m/^[0-9a-f]+$/ or die;
-       store_runvar('revision_rumpuserxen_rumpsrc', $rev);
-    }
+    $bodges = submodule_have($submodules,'nblibs')
+         && !submodule_have($submodules,'netbsdsrc');
+
+    if ($bodges) {
+       my $rumpsrcgitrevr = "$rux/buildrump.sh/.srcgitrev";
+       my $rumpsrcgitrevl = "buildrump-srcgitrev";
+       my $rev = $r{revision_rumpuserxen_rumpsrc};
+       if (length $rev) {
+           target_putfilecontents_stash($ho,30,
+                                        "$r{revision_rumpuserxen_rumpsrc}\n",
+                                        $rumpsrcgitrevr, $rumpsrcgitrevl);
+       } else {
+           target_getfile($ho,30,$rumpsrcgitrevr,"$stash/$rumpsrcgitrevl");
+           $rev = get_filecontents("$stash/$rumpsrcgitrevl");
+           chomp $rev or die;
+           $rev =~ m/^[0-9a-f]+$/ or die;
+           store_runvar('revision_rumpuserxen_rumpsrc', $rev);
+       }
 
-    build_clone($ho, "rumpuserxen_rumpsrc", $builddir, "rumpuserxen/rumpsrc");
-    store_vcs_revision('rumpuserxen_rumpsrc', $rev, 'git');
+       build_clone($ho, "rumpuserxen_rumpsrc", $builddir,
+                   "rumpuserxen/rumpsrc");
+       store_vcs_revision('rumpuserxen_rumpsrc', $rev, 'git');
+    }
 }
 
 sub massage() {
+    return unless $bodges;
+
     # Very poor
     target_editfile($ho, "$rux/buildxen.sh", undef,
                    "$rux/grievous-bodge-nblibs", sub {
-- 
1.7.10.4


_______________________________________________
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®.