[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v4 11/25] distros: Support pvgrub for Wheezy too.
This requires us to install pv-grub-menu from backports, which we do using a late_command. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- 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 | 44 +++++++++++++++++++++++++++++++++++++++++++- make-distros-flight | 4 ++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index cbc7172..b37540e 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -689,6 +689,17 @@ END d-i clock-setup/ntp-server string $ntpserver END + # deb http://ftp.debian.org/debian/ wheezy-backports main + $preseed .= <<END if $extra_packages =~ m#\b/$suite-backports\b#; +d-i apt-setup/local0/repository string \\ + http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main +d-i apt-setup/local0/comment string $suite backports +END +# Jessie onwards... +# $preseed .= <<END if $extra_packages =~ m#\b/$suite-backports\b#; +#d-i apt-setup/services-select multiselect security, updates, backports +#END + $preseed .= <<"END"; ### END OF DEBIAN PRESEED BASE @@ -702,7 +713,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, <<END); +#!/bin/sh +set -ex + +( + echo + echo \\\# $suite backports + echo deb http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main +) >> /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, $extra_packages, %xopts); $preseed_file.= (<<END); diff --git a/make-distros-flight b/make-distros-flight index 80df21b..97df89a 100755 --- a/make-distros-flight +++ b/make-distros-flight @@ -65,9 +65,9 @@ test_do_one_netboot () { arm*_arm*_*) bootloader="pygrub";; # no pvgrub for arm # Needs a menu.lst, not present in Squeeze+ due to switch to grub2, - # workedaround in Jessie+ with pv-grub-menu package. + # workedaround in Wheezy+ with pv-grub-menu package (backports in Wheezy, + # in Jessie+ main). *_squeeze) bootloader="pygrub";; - *_wheezy) bootloader="pygrub";; # pv-grub-x86_64.gz is not built by 32-bit dom0 userspace build. i386_amd64_*) bootloader="pygrub";; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |