From patchwork Mon Apr 28 10:41:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 29202 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F4F8202FE for ; Mon, 28 Apr 2014 10:42:50 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id vb8sf40127985obc.3 for ; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=ir7qvWn6vrBuFvupWK26WKbK4hRrGxFa0kqSHX5hkt0=; b=NsmzdlMQcdKpDjf47FeyoUKhl5o2ikNr6lyk0h7aGpqZZC2QcDwMwA//q9AkTCfhMl DYL5m0/RnOitcAW3xdv0HbtNEWLRBQZv+SOvVZ9NE+W6QSXbT3KPBPA4+D07czZsjZvI UzFAaKajOEa4Y/7qXqWjOFEtpID3Mxvc96S97x5xW5uHbj80z4EcjDRw1Ljr7xl/HT2L bt1uAKP+zGuNIPeGrtjVAS13VoshnwEWFThafmfVVJ+zWDYFckXlR/7hpO7vFdkCyTKG f3WIr8cUrrKtrMAhKCCRnLkhSPZITT2reJaGOHGe3CxpIUE6mh86CUL9fFopoqTM2uNk pfMg== X-Gm-Message-State: ALoCoQmjy36Q1A3Q6Ydup5EQd18/gK1/W9/e8rBbcbpzfwSKU0CcYsojHm0WPpiQmjDdCXfsGk+d X-Received: by 10.50.50.2 with SMTP id y2mr10836204ign.1.1398681769845; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.74 with SMTP id w68ls2581584qgw.53.gmail; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-Received: by 10.58.230.103 with SMTP id sx7mr1158175vec.28.1398681769638; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id q1si3523799ves.171.2014.04.28.03.42.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 03:42:49 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id db12so7720573veb.38 for ; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-Received: by 10.221.62.131 with SMTP id xa3mr23164496vcb.13.1398681769551; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp107050vcb; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) X-Received: by 10.52.255.99 with SMTP id ap3mr17969964vdd.19.1398681769125; Mon, 28 Apr 2014 03:42:49 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id sc7si3515826vdc.103.2014.04.28.03.42.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 03:42:49 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wej0W-00082H-9q; Mon, 28 Apr 2014 10:41:56 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wej0R-0007wS-HC for xen-devel@lists.xen.org; Mon, 28 Apr 2014 10:41:51 +0000 Received: from [193.109.254.147:21428] by server-11.bemta-14.messagelabs.com id 40/A9-09902-E603E535; Mon, 28 Apr 2014 10:41:50 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1398681701!1303545!6 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24112 invoked from network); 28 Apr 2014 10:41:49 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 28 Apr 2014 10:41:49 -0000 X-IronPort-AV: E=Sophos;i="4.97,943,1389744000"; d="scan'208";a="124285773" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 28 Apr 2014 10:41:49 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Mon, 28 Apr 2014 06:41:49 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=zakaz.uk.xensource.com) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1Wej0N-0007Zz-QE; Mon, 28 Apr 2014 11:41:48 +0100 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Mon, 28 Apr 2014 11:41:47 +0100 From: Ian Campbell To: Date: Mon, 28 Apr 2014 11:41:33 +0100 Message-ID: <1398681696-2773-12-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398681672.29700.55.camel@kazak.uk.xensource.com> References: <1398681672.29700.55.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST v2 12/15] distros: support PV guest install from Debian netinst media. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The netinst media are iso images containing a base Debian install and some (image size dependent) additional tasks. On x86 the "multiarch" iso flavour contains a Xen capable kernel for both i386 and amd64 so use that. This adds support for two classes of ISO, the CD sized ones which are built nightly and the DVD sized ones which are built weekly. The images are downloaded using jigdo which sources the majority of the data from a local Debian mirror, for this reason I have not worried about the fact that the i386 and amd64 tests are downloading the same thing (adding a specific download job would require finding up to 4GB of scratch space for each flight). The ISOs booted using pygrub which can extract the kernel and initrd from a ISO image. The resulting guests are also booted with pygrub since the pv-grub-menu package is not available on the ISO images and we have pvgrub coverage from the netboot tests. Signed-off-by: Ian Campbell --- Osstest/Debian.pm | 7 +++++-- make-distros-flight | 22 ++++++++++++++++++++ ts-debian-di-install | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index ad478ab..b149e8d 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -433,8 +433,6 @@ sub preseed_base ($$;@) { $extra_packages ||= ''; my $preseed= (<{Lvdev} ||:"); } +sub setup_netinst($$$) +{ + my ($didir, $arch, $cd) = @_; + my %arch_props = ( + amd64 => { PathArch => "multi-arch", FileArch => "amd64-i386", IsoPath => "/install.amd/xen" }, + i386 => { PathArch => "multi-arch", FileArch => "amd64-i386", IsoPath => "/install.386/xen" }, + armhf => { PathArch => "armhf", FileArch => "armhf", IsoPath => "/install.armhf" } + ); + my $props = $arch_props{$arch} or die "Unknown arch $arch"; + + target_install_packages($ho, qw(jigdo-file)); + + my $baseurl = $cd eq "current" ? + "http://cdimage.debian.org/debian-cd/current/$props->{PathArch}/jigdo-cd" : + "http://cdimage.debian.org/cdimage/weekly-builds/$props->{PathArch}/jigdo-cd"; + + my $filebase; + + # Use the MD5SUMs file as an index + logm("Fetch index from $baseurl/MD5SUMS"); + open C, "curl $baseurl/MD5SUMS|" or die "curl: $!"; + while() { + m/^[0-9a-f]{32} (debian-.*-$props->{FileArch}-netinst)\.iso$/ or next; + $filebase = $1; + last; + } + close(C); + + die unless $filebase; + + logm("Downloading $baseurl/$filebase.jigdo"); + # Jigdo seems to use /etc/apt/sources.list or something, so this + # just works using the already configured mirror without + # additional configuration, which is good because there doesn't + # seem to be any support for such things, at least in Squeeze. + my $netinst_jigdo = "$baseurl/$filebase.jigdo"; + target_cmd_root($ho, <{Guest}_netinst_jigdo", $netinst_jigdo); + + return (<{IsoPath}/vmlinuz", "--ramdisk=$props->{IsoPath}/initrd.gz"] +END +} + sub setup_netboot($$$) { my ($didir, $arch, $suite) = @_; @@ -111,6 +158,16 @@ END $extra_disk = ""; } + elsif ($method eq "netinst" ) + { + my $cd = $r{"$gho->{Guest}_cd"}; + + logm("$method $cd/$arch"); + + ($method_cfg,$extra_disk) = setup_netinst("/root/di", $arch, $cd); + + $ps_url = preseed_create_guest($gho, '', CDROM=>1); + } else { die "$method";