Upgrade to Jessie
PATCH v3 3/11 mg-debian-installer-update: Also collect DTBs for standard kernels
In reply to Wei LiuFor armhf and arm64 for Jessie we will need these in the normal case as well as in the backports case. Arrange to download.
--- mg-debian-installer-update | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
mg-debian-installer-update +12 -1
@@ -50,6 +50,7 @@ case ${suite}_${arch} in src=$sbase/main/installer-$arch/current/images/netboot/ files="debian-installer/$arch/initrd.gz:initrd.gz \ debian-installer/$arch/linux:linux" + dtbs=$sbase/main/installer-$arch/current/images/device-tree/ ;; wheezy_armhf) # Use the vexpress image, we are going to bash in our own
@@ -60,7 +61,8 @@ case ${suite}_${arch} in *_armhf) src=$sbase/main/installer-$arch/current/images/netboot files='vmlinuz initrd.gz' - ;; + dtbs=$sbase/main/installer-$arch/current/images/device-tree/ + ;; esac pfile=$sbase/non-free/binary-$arch/Packages.gz
@@ -80,6 +82,15 @@ for f in $files; do fetch $src/$s >$d.new done +if [ "x$dtbs" != "x" ] ; then + # Can't seem to get curl to globs. + rm -rf dtbs + mkdir dtbs + ( cd dtbs && wget -nv -A README,\*.dtb -nd -nH -np -m $dtbs ) + tar --mtime=./dtbs/README -cf dtbs.tar dtbs + gzip -9nf dtbs.tar +fi + fetch $pfile >Packages.gz for p in $packages; do
Signature · 1 line
1.9.1
v3 cover Upgrade to Jessie
Rebased on top of master.
Please note that ARM patches are not tested.
Ian, feel free to incorporate this series into your ARM series if you think that's better.
Ian Campbell (4):
More flexible handling of need-kernel-deb-$flavour host flag mg-debian-installer-update: updates to better handle Jessie onwards. Force sysvinit with Jessie
Debian: grub2: Allow submenu and menuentry items to be indented.
Wei Liu (7):
mg-debian-installer-update: Also collect DTBs for standard kernels Debian.pm: install grub to default device
Cope with Jessie's d-i vg name
ts-xen-build-prep: install libnl-route-3-dev on Jessie
ts-xen-build-prep: reverse the test for installing libc6-dev-i386
ts-xen-install: install libnl-route-3-200 for jessie
ts-kernel-build: enable CONFIG_FHANDLE
Osstest/Debian.pm | 31 +++++++++++++-- mg-debian-installer-update | 90 +++++++++++++++++++++++++++++------------- mg-debian-installer-update-all | 2 +- ts-host-install | 17 +++++--- ts-kernel-build | 2 + ts-xen-build-prep | 39 +++++++++--------- ts-xen-install | 3 ++ 7 files changed, 129 insertions(+), 55 deletions(-)
Signature · 1 line
1.9.1
PATCH v3 2/11 mg-debian-installer-update: updates to better handle Jessie onwards.
From: Ian Campbell <[email protected]>
In mg-debian-installer-update:
- Expand the list of (suite,arch) combinations which don't exist and move it to the top.
- Tweak the backports.org handling to allow it to be specified on a per (suite,arch) basis, and specify it only for (wheezy,armhf) since it is not currently needed for jessie. Make the initramfs-tools fetching conditional too.
- Only extract backports-dtbs if they are present in the package.
- Handle arm64.
- Collect the correct armhf kernel for Jessie onwards (vexpress removed from path).
Have mg-debian-installer-update-all fetch arm64 too.
--- Osstest/Debian.pm | 2 +- mg-debian-installer-update | 67 ++++++++++++++++++++++++++++-------------- mg-debian-installer-update-all | 2 +- ts-host-install | 4 +-- 4 files changed, 49 insertions(+), 26 deletions(-)
Osstest/Debian.pm +1 -1
@@ -862,7 +862,7 @@ END foreach my $kp (keys %{ $ho->{Flags} }) { # Backwards compatibility $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; - $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; + $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next; my $kern = "$d_i/$kp.deb"; my $kurl = create_webfile($ho, "kernel", sub {
mg-debian-installer-update +45 -22
104 lines not on this page · raw message
mg-debian-installer-update-all +1 -1
@@ -24,7 +24,7 @@ set -e suite=`getconfig DebianSuite` fws=`getconfig DebianNonfreeFirmware` -arches="armhf amd64 i386" +arches="arm64 armhf amd64 i386" for arch in $arches ; do ./mg-debian-installer-update $suite $arch $fws
ts-host-install +2 -2
@@ -200,7 +200,7 @@ sub setup_pxeboot_firstboot($) { foreach my $kp (keys %{ $ho->{Flags} }) { # Backwards compatibility $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; - $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; + $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next; my $kern= "$ho->{Tftp}{Path}/$d_i/linux.$kp"; if (stat $kern) { logm("using kernel from: $kern");
@@ -249,7 +249,7 @@ END foreach my $kp (keys %{ $ho->{Flags} }) { # Backwards compatibility $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; - $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; + $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next; $dtbs = "fdtdir /$d_i/$kp-dtbs" if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs";
Signature · 1 line
1.9.1
PATCH v3 1/11 More flexible handling of need-kernel-deb-$flavour host flag
In reply to Wei LiuFrom: Ian Campbell <[email protected]>
The current behaviour does not account for the need to apply this workaround only for particular Debian releases, i.e. Midway will be supported just fine in Jessie.
It also does not allow for kernels from alternative sources other than backports (e.g. experimental, although that is hypothetical right now).
The flavour name is actually irrelevant in practice (none of our supported arch's need multiple kernel flavours at install time, which is all we care about). So omit it from the new scheme.
The new scheme is "need-kernel-deb-$suite-$altsource", i.e. need-kernel-deb-wheezy-backports. Possibly in the future e.g. need-kernel-deb-jessie-experimental indicating that the experimental kernel is needed on jessie.
mg-debian-installer-update is modified to download to the new name.
--- Osstest/Debian.pm | 4 +++- mg-debian-installer-update | 22 +++++++++++----------- ts-host-install | 14 +++++++++++--- 3 files changed, 25 insertions(+), 15 deletions(-)
Osstest/Debian.pm +3 -1
@@ -860,7 +860,9 @@ END } foreach my $kp (keys %{ $ho->{Flags} }) { - $kp =~ s/need-kernel-deb-// or next; + # Backwards compatibility + $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; + $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; my $kern = "$d_i/$kp.deb"; my $kurl = create_webfile($ho, "kernel", sub {
mg-debian-installer-update +11 -11
@@ -107,16 +107,16 @@ if [ $arch = armhf ]; then fetch "$site/$pkgfile" >initramfs-tools.deb set +e - echo >&2 "collecting armmp kernel" + echo >&2 "collecting backports kernel" # Be careful to pickup the actual kernel package from the 'linux' # source and not a meta package from 'linux-latest' pkgfile=`zcat Packages.gz | grep-dctrl -S linux | grep-dctrl -Pe ^linux-image-.*-armmp$ -nsFilename | sort -n -r | head -n1` rc=$? set -e - if [ $rc != 0 ]; then fail "armmp kernel package not found"; fi - fetch "$site/$pkgfile" >armmp.deb - dpkg-deb -x armmp.deb x - cp x/boot/vmlinuz-* linux.armmp + if [ $rc != 0 ]; then fail "backports kernel package not found"; fi + fetch "$site/$pkgfile" >backports.deb + dpkg-deb -x backports.deb x + cp x/boot/vmlinuz-* linux.backports # The full set of modules is pretty large and not that # useful. Just pull in the ones we need for our particular # preseed, which is basically disk, net, filesystems and LVM.
@@ -142,12 +142,12 @@ if [ $arch = armhf ]; then -path \*/kernel/drivers/usb/host/\* \) \ |pax -x sv4cpio -s '%lib%/lib%' -d -w -M norm >../cpio; cd .. gzip -9nf cpio - mv cpio.gz armmp.cpio.gz - rm -rf dtbs/ - mkdir dtbs/ - mv x/usr/lib/linux-image-*-armmp/*.dtb dtbs/ - tar --mtime=./x/usr/lib -cf dtbs.tar dtbs - gzip -9nf dtbs.tar + mv cpio.gz backports.cpio.gz + rm -rf backports-dtbs/ + mkdir backports-dtbs/ + mv x/usr/lib/linux-image-*-armmp/*.dtb backports-dtbs/ + tar --mtime=./x/usr/lib -cf backports-dtbs.tar backports-dtbs + gzip -9nf backports-dtbs.tar rm -rf x fi
ts-host-install +11 -3
@@ -198,7 +198,9 @@ sub setup_pxeboot_firstboot($) { } foreach my $kp (keys %{ $ho->{Flags} }) { - $kp =~ s/need-kernel-deb-// or next; + # Backwards compatibility + $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; + $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; my $kern= "$ho->{Tftp}{Path}/$d_i/linux.$kp"; if (stat $kern) { logm("using kernel from: $kern");
@@ -244,8 +246,14 @@ END } my $dtbs = ""; - $dtbs = "fdtdir /$d_i/dtbs" - if -e "$ho->{Tftp}{Path}/$d_i/dtbs"; + foreach my $kp (keys %{ $ho->{Flags} }) { + # Backwards compatibility + $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; + $kp =~ s/need-kernel-deb-$ho->{Suite}// or next; + + $dtbs = "fdtdir /$d_i/$kp-dtbs" + if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs"; + } file_simple_write_contents("$initrd_overlay.cpio", sub { contents_make_cpio($_[0], 'newc', "$initrd_overlay.d");
Signature · 1 line
1.9.1
PATCH v3 6/11 Cope with Jessie's d-i vg name
In reply to Wei LiuIn Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
---
Changes in v3:
1. Introduce a function to return vg name and use it.
Changes in v2:
1. Make Jessie case default.
--- Osstest/Debian.pm | 13 +++++++++++++ ts-host-install | 3 +-- ts-xen-build-prep | 5 +---- 3 files changed, 15 insertions(+), 6 deletions(-)
Osstest/Debian.pm +13 -0
@@ -43,6 +43,7 @@ BEGIN { preseed_hook_overlay preseed_hook_cmds di_installcmdline_core + di_vg_name ); %EXPORT_TAGS = ( );
@@ -566,6 +567,18 @@ sub di_installcmdline_core ($$;@) { return @cl; } +sub di_vg_name($) { + my ($ho) = @_; + + if ($ho->{Suite} =~ m/wheezy|squeeze/) { + return $ho->{Name}; + } + if ($ho->{Suite} =~ m/lenny/){ + return "$ho->{Name}.$c{TestHostDomain}"; + } + return "$ho->{Name}-vg"; +} + sub preseed_ssh ($$) { my ($ho,$sfx) = @_;
ts-host-install +1 -2
@@ -87,10 +87,9 @@ END await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho); - our $vgname= $ho->{Name}; + our $vgname = di_vg_name($ho); if ($ho->{Suite} =~ m/lenny/) { - $vgname .= ".$c{TestHostDomain}"; target_editfile_root($ho, '/boot/grub/menu.lst', sub { while (<EI>) { s/^terminal.*/terminal --timeout=10 serial console/;
ts-xen-build-prep +1 -4
@@ -52,10 +52,7 @@ sub overall_limit_pe ($) { } sub determine_vg_lv () { - $vg= - $ho->{Suite} =~ m/lenny/ - ? "$ho->{Name}.$c{TestHostDomain}" - : $ho->{Name}; + $vg = di_vg_name($ho); $lv = "/dev/$vg/$lvleaf"; }
Signature · 1 line
1.9.1
PATCH v3 7/11 Debian: grub2: Allow submenu and menuentry items to be indented.
In reply to Wei LiuFrom: Ian Campbell <[email protected]>
--- Osstest/Debian.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Osstest/Debian.pm +2 -2
@@ -445,12 +445,12 @@ sub setupboot_grub2 ($$$$) { if (m/^function.*\{/) { $entry= { StartLine => $. }; } - if (m/^menuentry\s+[\'\"](.*)[\'\"].*\{\s*$/) { + if (m/^\s*menuentry\s+[\'\"](.*)[\'\"].*\{\s*$/) { die $entry->{StartLine} if $entry; $entry= { Title => $1, StartLine => $., MenuEntryPath => join ">", @offsets }; $offsets[$#offsets]++; } - if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) { + if (m/^\s*submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) { $submenu={ StartLine =>$., MenuEntryPath => join ">", @offsets }; push @offsets,(0); }
Signature · 1 line
1.9.1
PATCH v3 4/11 Force sysvinit with Jessie
In reply to Wei LiuFrom: Ian Campbell <[email protected]>
Systemd doesn't honor osstest-confirm-booted service, which breaks ts-leak-check. Fall back to SysV init for now.
--- Osstest/Debian.pm | 8 ++++++++ 1 file changed, 8 insertions(+)
Osstest/Debian.pm +8 -0
@@ -945,6 +945,14 @@ in-target update-initramfs -u -k all END } + # Systemd doesn't honor osstest-confirm-booted service, which + # breaks ts-leak-check. Fall back to SysV init for now. + if ( $ho->{Suite} =~ /jessie/ ) { + preseed_hook_command($ho, 'late_command', $sfx, <<END) +in-target apt-get install -y sysvinit-core +END + } + my @extra_packages = (); push(@extra_packages, "u-boot-tools") if $ho->{Flags}{'need-uboot-bootscr'};
Signature · 1 line
1.9.1
PATCH v3 5/11 Debian.pm: install grub to default device
In reply to Wei LiuDebian installer used to have the behaviour to install grub on the default device. But it's changed in Jessie.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737.
--- Osstest/Debian.pm | 2 ++ 1 file changed, 2 insertions(+)
Osstest/Debian.pm +2 -0
@@ -727,6 +727,8 @@ popularity-contest popularity-contest/participate boolean false tasksel tasksel/first multiselect standard, web-server d-i grub-installer/only_debian boolean true +# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737 +d-i grub-installer/bootdev string default d-i finish-install/keep-consoles boolean true d-i finish-install/reboot_in_progress note
Signature · 1 line
1.9.1
PATCH v3 8/11 ts-xen-build-prep: install libnl-route-3-dev on Jessie
In reply to Wei LiuThere is no package called libnl-dev on Jessie. To build remus, use libnl-route-3-dev instead.
--- ts-xen-build-prep | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-)
ts-xen-build-prep +19 -13
@@ -195,19 +195,25 @@ END } sub prep () { - target_install_packages($ho, - qw(mercurial - build-essential bin86 bcc iasl bc - flex bison cmake - libpci-dev libncurses5-dev libssl-dev python-dev - libx11-dev git-core uuid-dev gettext gawk - libsdl-dev libyajl-dev libaio-dev libpixman-1-dev - libglib2.0-dev liblzma-dev pkg-config - autoconf automake libtool xsltproc - libxml2-utils libxml2-dev libnl-dev - libdevmapper-dev w3c-dtd-xhtml libxml-xpath-perl - ccache nasm checkpolicy)); - + my @packages = qw(mercurial + build-essential bin86 bcc iasl bc + flex bison cmake + libpci-dev libncurses5-dev libssl-dev python-dev + libx11-dev git-core uuid-dev gettext gawk + libsdl-dev libyajl-dev libaio-dev libpixman-1-dev + libglib2.0-dev liblzma-dev pkg-config + autoconf automake libtool xsltproc + libxml2-utils libxml2-dev + libdevmapper-dev w3c-dtd-xhtml libxml-xpath-perl + ccache nasm checkpolicy); + + if ($ho->{Suite} =~ m/wheezy|squeeze|lenny/) { + push(@packages, "libnl-dev"); + } else { + # jessie (>jessie?) + push(@packages, "libnl-route-3-dev"); + } + target_install_packages($ho, @packages); target_cmd_root($ho, "chmod -R a+r /usr/share/git-core/templates"); # workaround for Debian #595728
Signature · 1 line
1.9.1
PATCH v3 9/11 ts-xen-build-prep: reverse the test for installing libc6-dev-i386
In reply to Wei LiuStarting from wheezy, Debian introduced multiarch support, so we need to install libc6-dev-i386 to build tools.
Since multiarch will be permanent, we reverse the test to not install libc6-dev-i386 on releases older than wheezy i.e. wheezy and jessie will have that package).
--- ts-xen-build-prep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-xen-build-prep +1 -1
@@ -227,7 +227,7 @@ END if ($ho->{Suite} !~ m/lenny|squeeze/) { target_install_packages($ho, 'libfdt-dev'); } - if ($r{arch} eq 'amd64' && $ho->{Suite} =~ m/wheezy/) { + if ($r{arch} eq 'amd64' && $ho->{Suite} !~ m/squeeze|lenny/) { target_install_packages($ho, 'libc6-dev-i386'); } }
Signature · 1 line
1.9.1
PATCH v3 10/11 ts-xen-install: install libnl-route-3-200 for jessie
In reply to Wei Liu--- ts-xen-install | 3 +++ 1 file changed, 3 insertions(+)
ts-xen-install +3 -0
@@ -54,6 +54,9 @@ sub packages () { target_install_packages($ho, qw(bridge-utils vncsnapshot libaio1 libpixman-1-0 libsdl1.2debian libglib2.0-0 liblzma5)); + if ($ho->{Suite} =~ m/jessie/) { + target_install_packages($ho, 'libnl-route-3-200'); + } target_install_packages($ho, $ho->{Suite} =~ /squeeze/ ? "libyajl1" : "libyajl2"); if ($ho->{Suite} !~ m/lenny|squeeze/) {
Signature · 1 line
1.9.1
PATCH v3 11/11 ts-kernel-build: enable CONFIG_FHANDLE
In reply to Wei LiuAccording to Debian bug #764539, systemd needs this kernel feature to be able to mount disks. Complete list of required kernel features can be found in /usr/share/doc/systemd/README.gz.
--- ts-kernel-build | 2 ++ 1 file changed, 2 insertions(+)
ts-kernel-build +2 -0
@@ -525,6 +525,8 @@ setopt CONFIG_FUSION_LOGGING n setopt CONFIG_BLK_CPQ_CISS_DA m +setopt CONFIG_FHANDLE y + case ${XEN_TARGET_ARCH} in x86_32) setopt CONFIG_64BIT n ;; x86_64)
Signature · 1 line
1.9.1
Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
In reply to Wei LiuQuoted 8 lines · Wei Liu
In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
Signed-off-by Wei Liu <[email protected]>---
Changes in v3:
1. Introduce a function to return vg name and use it.
Testing on ARM64 I get:
Undefined subroutine &main::di_vg_name called at ./ts-xen-build-prep line 55.
I'm pretty certain this isn't to do with my arm4 patches.
I suspect adding "use Debian" to ts-xen-build-prep will fix it, I'm not sure if there is a reason it doesn't do so already. Given that it has a bunch of Debian-ish stuff in it I see no reason to avoid it...
Quoted 72 lines
Changes in v2:
1. Make Jessie case default.--- Osstest/Debian.pm | 13 +++++++++++++ ts-host-install | 3 +-- ts-xen-build-prep | 5 +---- 3 files changed, 15 insertions(+), 6 deletions(-)Osstest/Debian.pm +13
-0@@ -43,6 +43,7 @@ BEGIN { preseed_hook_overlay preseed_hook_cmds di_installcmdline_core + di_vg_name ); %EXPORT_TAGS = ( );@@ -566,6 +567,18 @@ sub di_installcmdline_core ($$;@) { return @cl; } +sub di_vg_name($) { + my ($ho) = @_; + + if ($ho->{Suite} =~ m/wheezy|squeeze/) { + return $ho->{Name}; + } + if ($ho->{Suite} =~ m/lenny/){ + return "$ho->{Name}.$c{TestHostDomain}"; + } + return "$ho->{Name}-vg"; +} + sub preseed_ssh ($$) { my ($ho,$sfx) = @_;ts-host-install +1
-2@@ -87,10 +87,9 @@ END await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho); - our $vgname= $ho->{Name}; + our $vgname = di_vg_name($ho); if ($ho->{Suite} =~ m/lenny/) { - $vgname .= ".$c{TestHostDomain}"; target_editfile_root($ho, '/boot/grub/menu.lst', sub { while (<EI>) { s/^terminal.*/terminal --timeout=10 serial console/;ts-xen-build-prep +1
-4@@ -52,10 +52,7 @@ sub overall_limit_pe ($) { } sub determine_vg_lv () { - $vg= - $ho->{Suite} =~ m/lenny/ - ? "$ho->{Name}.$c{TestHostDomain}" - : $ho->{Name}; + $vg = di_vg_name($ho); $lv = "/dev/$vg/$lvleaf"; }
Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Wei Liu
In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
Signed-off-by Wei Liu <[email protected]>---
Changes in v3:
1. Introduce a function to return vg name and use it.
Quoted 9 lines
Testing on ARM64 I get:
Undefined subroutine&main::di_vg_namecalled at ./ts-xen-build-prep line 55.I'm pretty certain this isn't to do with my arm4 patches.
I suspect adding "use Debian" to ts-xen-build-prep will fix it, I'm not sure if there is a reason it doesn't do so already. Given that it has a bunch of Debian-ish stuff in it I see no reason to avoid it...
Yes, use Osstest::Debian; should fix that.
I'm running a build job at the moment. I will report back when it finishes.
Wei.
Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
Quoted 14 lines · Wei Liu
Quoted 13 lines · Ian Campbell
Quoted 8 lines · Wei Liu
In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
Signed-off-by Wei Liu <[email protected]>---
Changes in v3:
1. Introduce a function to return vg name and use it.Testing on ARM64 I get:
Undefined subroutine&main::di_vg_namecalled at ./ts-xen-build-prep line 55.
Quoted 9 lines
Quoted 6 lines
I'm pretty certain this isn't to do with my arm4 patches.
I suspect adding "use Debian" to ts-xen-build-prep will fix it, I'm not sure if there is a reason it doesn't do so already. Given that it has a bunch of Debian-ish stuff in it I see no reason to avoid it...
Yes, use
Osstest::Debian; should fix that.
The following patch contains the fix.
---8<---
Quoted 1 line
From
65b37ee4ecbe117969ac3df28122c934c3088dcfMon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Mon, 15 Jun 2015 12:07:38 +0100
Subject: [PATCH OSSTEST] Cope with Jessie's d-i vg name
Cc: [email protected], [email protected]
In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
---
Changes in v4:
1. Add missing "use Osstest::Debian;".
Changes in v3:
1. Introduce a function to return vg name and use it.
Changes in v2:
1. Make Jessie case default.
--- Osstest/Debian.pm | 13 +++++++++++++ ts-host-install | 3 +-- ts-xen-build-prep | 6 ++---- 3 files changed, 16 insertions(+), 6 deletions(-)
Osstest/Debian.pm +13 -0
@@ -43,6 +43,7 @@ BEGIN { preseed_hook_overlay preseed_hook_cmds di_installcmdline_core + di_vg_name ); %EXPORT_TAGS = ( );
@@ -566,6 +567,18 @@ sub di_installcmdline_core ($$;@) { return @cl; } +sub di_vg_name($) { + my ($ho) = @_; + + if ($ho->{Suite} =~ m/wheezy|squeeze/) { + return $ho->{Name}; + } + if ($ho->{Suite} =~ m/lenny/){ + return "$ho->{Name}.$c{TestHostDomain}"; + } + return "$ho->{Name}-vg"; +} + sub preseed_ssh ($$) { my ($ho,$sfx) = @_;
ts-host-install +1 -2
@@ -87,10 +87,9 @@ END await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho); - our $vgname= $ho->{Name}; + our $vgname = di_vg_name($ho); if ($ho->{Suite} =~ m/lenny/) { - $vgname .= ".$c{TestHostDomain}"; target_editfile_root($ho, '/boot/grub/menu.lst', sub { while (<EI>) { s/^terminal.*/terminal --timeout=10 serial console/;
ts-xen-build-prep +2 -4
@@ -20,6 +20,7 @@ use DBI; use Osstest; use POSIX; use Osstest::TestSupport; +use Osstest::Debian; tsreadconfig();
@@ -52,10 +53,7 @@ sub overall_limit_pe ($) { } sub determine_vg_lv () { - $vg= - $ho->{Suite} =~ m/lenny/ - ? "$ho->{Name}.$c{TestHostDomain}" - : $ho->{Name}; + $vg = di_vg_name($ho); $lv = "/dev/$vg/$lvleaf"; }
Signature · 1 line
1.9.1
[PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
In reply to Wei Liu---
An additional patch to deal with new package name in libvirt toolstack code.
--- Osstest/Toolstack/libvirt.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Osstest/Toolstack/libvirt.pm +5 -1
@@ -24,11 +24,15 @@ use Osstest::TestSupport; sub new { my ($class, $ho, $methname,$asset) = @_; + my @extra_packages = qw(libavahi-client3); + my $nl_lib = "libnl-3-200"; + $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/); + push(@extra_packages, $nl_lib); return bless { Name => "libvirt", Host => $ho, NewDaemons => [qw(libvirtd)], Dom0MemFixed => 1, - ExtraPackages => [qw(libnl1 libavahi-client3)], + ExtraPackages => [@extra_packages], }, $class; }
Signature · 1 line
1.9.1
Re: [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
Wei Liu writes ("[PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
...
Quoted 8 lines
Osstest/Toolstack/libvirt.pm +0
-0@@ -24,11 +24,15 @@ use Osstest::TestSupport; sub new { my ($class, $ho, $methname,$asset) = @_;
Osstest/Toolstack/libvirt.pm use Osstest::TestSupport; · line 35
Quoted 10 lines
Osstest/Toolstack/libvirt.pm +5
-1+ my @extra_packages = qw(libavahi-client3); + my $nl_lib = "libnl-3-200"; + $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/); + push(@extra_packages, $nl_lib); return bless { Name => "libvirt", Host => $ho, NewDaemons => [qw(libvirtd)], Dom0MemFixed => 1, - ExtraPackages => [qw(libnl1 libavahi-client3)], + ExtraPackages => [@extra_packages],
It would be more normal to write
\@extra_packages
rather than
[@extra_packages]
unless you actually need to make a copy of the array.
(I don't care about this for efficiency, but rather for readability:
writing [@extra_packages] carries an implication that something might edit either @extra_packages or ExtraPackages afterwards.
Ian.
Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
In reply to Wei LiuWei Liu writes ("[PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name"):
Quoted 5 lines
In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility.
Signed-off-by Wei Liu <[email protected]>
Re: [PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386
In reply to Wei LiuWei Liu writes ("[PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386"):
Quoted 6 lines
Starting from wheezy, Debian introduced multiarch support, so we need to install libc6-dev-i386 to build tools.
Since multiarch will be permanent, we reverse the test to not install libc6-dev-i386 on releases older than wheezy i.e. wheezy and jessie will have that package).
Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
In reply to Wei LiuWei Liu writes ("[PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards."):
Quoted 6 lines
From: Ian Campbell <[email protected]>
In mg-debian-installer-update:
- Expand the list of (suite,arch) combinations which don't exist and move it to the top.
...
Quoted 4 lines
mg-debian-installer-update +0
-4- # Newer kernel often needs a newer initramfs-tools. Make that available - echo >&2 "collecting backports initramfs-tools" - pkgfile=`zcat Packages.gz | grep-dctrl -PX initramfs-tools -nsFilename | sort -n -r | head -n1` - rc=$?
mg-debian-installer-update for p in $packages; do · line 119
Quoted 10 lines
mg-debian-installer-update +7
-3- set -e - if [ $rc != 0 ]; then fail "initramfs-tools package not found"; fi - fetch "$site/$pkgfile" >initramfs-tools.deb + if [ x$need_initramfs = xy ]; then + # Newer kernel often needs a newer initramfs-tools. Make that + # available + echo >&2 "collecting backports initramfs-tools" + pkgfile=`zcat Packages.gz \ + | grep-dctrl -PX initramfs-tools -nsFilename \ + | sort -n -r | head -n1`
That looks much like this:
mg-debian-installer-update for p in $packages; do · line 134
Quoted 4 lines
mg-debian-installer-update +3
-1- pkgfile=`zcat Packages.gz | grep-dctrl -S linux | grep-dctrl -Pe ^linux-image-.*-armmp$ -nsFilename | sort -n -r | head -n1` + pkgfile=`zcat Packages.gz | grep-dctrl -S linux \ + | grep-dctrl -Pe ^linux-image-.*-${bpok}$ -nsFilename \ + | sort -n -r | head -n1`
But since it was duplicated before I won't ask you to break it out.
Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
In reply to Wei LiuQuoted 1 line · Wei Liu
+case $suite_$arch in
Sorry, this is buggy, it looks for a variable named "suite_" which doesn't exist and so nothing matches. It needs this:
mg-debian-installer-update +1 -1
@@ -102,7 +102,7 @@ done # Some platforms require a newer kernel than is in Debian. Construct # something suitable from the latest kernel ($bpok=flavour) in # backports. -case $suite_$arch in +case ${suite}_${arch} in wheezy_armhf) bpok=armmp; need_initramfs=y;; esac if [ x$bpok != x ]; then
Ian.
Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
Quoted 12 lines · Ian Campbell
Quoted 1 line · Wei Liu
+case $suite_$arch in
Sorry, this is buggy, it looks for a variable named "
suite_" which doesn't exist and so nothing matches. It needs this:mg-debian-installer-update +0
-0
mg-debian-installer-update done · line 108
Quoted 8 lines
mg-debian-installer-update +1
-1@@ -102,7 +102,7 @@ done # Some platforms require a newer kernel than is in Debian. Construct # something suitable from the latest kernel ($bpok=flavour) in # backports. -case $suite_$arch in +case ${suite}_${arch} in wheezy_armhf) bpok=armmp; need_initramfs=y;; esac if [ x$bpok != x ]; then
I folded this in.
Wei.
Quoted 1 line
Ian.
Wei Liu
Acked-by Ian JacksonRe: [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
In reply to Ian JacksonQuoted 28 lines · Ian Jackson
Wei Liu writes ("[PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>...
Quoted 8 lines
Osstest/Toolstack/libvirt.pm +0
-0@@ -24,11 +24,15 @@ use Osstest::TestSupport; sub new { my ($class, $ho, $methname,$asset) = @_;Osstest/Toolstack/libvirt.pm use Osstest::TestSupport; · line 35
Quoted 10 lines
Osstest/Toolstack/libvirt.pm +5
-1+ my @extra_packages = qw(libavahi-client3); + my $nl_lib = "libnl-3-200"; + $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/); + push(@extra_packages, $nl_lib); return bless { Name => "libvirt", Host => $ho, NewDaemons => [qw(libvirtd)], Dom0MemFixed => 1, - ExtraPackages => [qw(libnl1 libavahi-client3)], + ExtraPackages => [@extra_packages],It would be more normal to write
\@extra_packages
rather than
[@extra_packages]
unless you actually need to make a copy of the array.
Quoted 4 lines
(I don't care about this for efficiency, but rather for readability:
writing [@extra_packages] carries an implication that something might edit either @extra_packages or ExtraPackages afterwards.
For the record, Ian acked the following updated patch on IRC.
---8<---
Quoted 1 line
From
b422cb2c6c1ecdc62a5a46212f2cf648c2141509Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Thu, 18 Jun 2015 15:46:07 +0100
Subject: [PATCH OSSTEST] toolstack/libvirt: install libnl-3-200 on Jessie
Cc: [email protected], [email protected]
--- Osstest/Toolstack/libvirt.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Osstest/Toolstack/libvirt.pm +5 -1
@@ -24,11 +24,15 @@ use Osstest::TestSupport; sub new { my ($class, $ho, $methname,$asset) = @_; + my @extra_packages = qw(libavahi-client3); + my $nl_lib = "libnl-3-200"; + $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/); + push(@extra_packages, $nl_lib); return bless { Name => "libvirt", Host => $ho, NewDaemons => [qw(libvirtd)], Dom0MemFixed => 1, - ExtraPackages => [qw(libnl1 libavahi-client3)], + ExtraPackages => \@extra_packages, }, $class; }
Signature · 1 line
1.9.1