From: Ian Campbell Subject: [PATCH OSSTEST v7 04/15] distros: Support pvgrub for Wheezy too. Date: Wed, 27 May 2015 14:45:12 +0100 Message-ID: <1432734323-14128-4-git-send-email-ian.campbell@citrix.com> References: <1432734277.14664.229.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432734277.14664.229.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This requires us to install pv-grub-menu from backports, which we do using a late_command. Signed-off-by: Ian Campbell --- v7: - Remove vestigial attempts to enable -backports via d-i preseeding. v3: - Remove spurious () from <<(END) (and the prexisting "" too) - Remove $xopts{EnableBackports} and automatically handle the need to add backports in preseed_base. - Install via late_command not apt-setup, since the former has issues, hence subject drops "attempt to..." --- Osstest/Debian.pm | 33 ++++++++++++++++++++++++++++++++- make-distros-flight | 4 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index a3c5244..0975e73 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -709,7 +709,38 @@ sub preseed_create_guest ($$;@) { my $suite= $xopts{Suite} || $c{DebianSuite}; - my $extra_packages = "pv-grub-menu" if $xopts{PvMenuLst}; + my $extra_packages = ""; + if ($xopts{PvMenuLst}) { + if ($suite =~ m/wheezy/) { + # pv-grub-menu/wheezy-backports + using apt-setup to add + # backports results in iproute, ifupdown and + # isc-dhcp-client getting removed because tasksel's + # invocation of apt-get install somehow decides the + # iproute2 from wheezy-backports is a thing it wants to + # install. So instead lets fake it with a late command... + # + # This also has the bonus of working round an issue with + # 1.2.1~bpo70+1 which created an invalid menu.lst using + # "root(/dev/xvda,0)" which pvgrub cannot parse because + # the Grub device.map isn't present at pkgsel/include time + # but it is by late_command time. This was fixed by + # version 1.3 which is in Jessie onwards. + preseed_hook_command($ho, 'late_command', $sfx, <> /target/etc/apt/sources.list +in-target apt-get update +in-target apt-get install -y -t wheezy-backports pv-grub-menu +END + } else { + $extra_packages = "pv-grub-menu"; + } + } my $preseed_file= preseed_base($ho, $suite, $sfx, $extra_packages, %xopts); $preseed_file.= (<