Skip to contentSkip to conversation

Upgrade to Debian Jessie

PATCH Superseded Wei Liu 3 participants 28 messages Jun 15, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
author
#1 lore raw

PATCH v2 1/11 More flexible handling of need-kernel-deb-$flavour host flag

In reply to Wei Liu

From: 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
index f09cad6..9b733d7 100644
@@ -818,7 +818,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
index 4ff346f..f21f216 100755
@@ -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
index b73c7ff..2fea451 100755
@@ -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
author
#3 lore raw

PATCH v2 2/11 mg-debian-installer-update: updates to better handle Jessie onwards.

In reply to Wei Liu

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     | 59 ++++++++++++++++++++++++++----------------
 mg-debian-installer-update-all |  2 +-
 ts-host-install                |  4 +--
 4 files changed, 41 insertions(+), 26 deletions(-)
Osstest/Debian.pm +1 -1
index 9b733d7..c26f88e 100644
@@ -820,7 +820,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 +37 -22

96 lines not on this page · raw message

mg-debian-installer-update-all +1 -1
index eca4a5f..241e2e3 100755
@@ -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
index 2fea451..242bfb0 100755
@@ -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
author
#21 lore raw

PATCH v2 9/11 ts-xen-build-prep: install libc6-dev-i386 for jessie

In reply to Wei Liu
---
 ts-xen-build-prep | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-xen-build-prep +1 -1
index 4fdc37e..c348dad 100755
@@ -232,7 +232,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/wheezy|jessie/) {
         target_install_packages($ho, 'libc6-dev-i386');
     }
 }
Signature · 1 line
1.9.1
author
#7 lore raw

PATCH v2 4/11 Force sysvinit with Jessie

In reply to Wei Liu

From: Ian Campbell <[email protected]>

Systemd has some issues:

1. It doesn't honor osstest-confirm-booted service, which breaks ts-leak-check.
2. It kills the ssh connection before 'init 6' has a chance return, which breaks ts-host-reboot.

Fall back to SysV init for now.

[wei: rewrite commit message and code comment]
---
 Osstest/Debian.pm | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Osstest/Debian.pm +12 -0
index c26f88e..fa94210 100644
@@ -903,6 +903,18 @@ in-target update-initramfs -u -k all
 END
     }
 
+    # Systemd has some issues:
+    #  1. it doesn't honor osstest-confirm-booted service,
+    #     which breaks ts-leak-check.
+    #  2. it kills the ssh connection before 'init 6' has a chance
+    #     return, which breaks ts-host-reboot.
+    # 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
author
#19 lore raw

PATCH v2 8/11 ts-xen-build-prep: install libnl-route-3-dev on Jessie

In reply to Wei Liu

There is no package called libnl-dev on Jessie. To build remus, use libnl-route-3-dev instead.

---
 ts-xen-build-prep | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)
ts-xen-build-prep +18 -12
index befb7d4..4fdc37e 100755
@@ -200,19 +200,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

Wei Liu

author
#0 lore raw

v2 cover Upgrade to Debian Jessie

This is a collection of patches from Ian and me to upgrade osstest to Debian Jessie.

I've run

build-amd64
build-amd64-pvops
test-amd64-amd64-xl
test-amd64-amd64-xl-qemuu-debianhvm-amd64

all worked fine.

I can't test the arm patches though.

Wei.

Ian Campbell (5):
More flexible handling of need-kernel-deb-$flavour host flag mg-debian-installer-update: updates to better handle Jessie onwards. mg-debian-installer-update: Also collect DTBs for standard kernels Force sysvinit with Jessie
Debian: grub2: Allow submenu and menuentry items to be indented.

Wei Liu (6):
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: install libc6-dev-i386 for jessie
ts-xen-install: install libnl-route-3-200 for jessie
ts-kernel-build: enable CONFIG_FHANDLE

 Osstest/Debian.pm              | 22 ++++++++++--
 mg-debian-installer-update     | 82 +++++++++++++++++++++++++++---------------
 mg-debian-installer-update-all |  2 +-
 ts-host-install                | 21 ++++++++---
 ts-kernel-build                |  2 ++
 ts-xen-build-prep              | 40 ++++++++++++---------
 ts-xen-install                 |  3 ++
 7 files changed, 119 insertions(+), 53 deletions(-)
Signature · 1 line
1.9.1
author
#15 lore raw

PATCH v2 6/11 Cope with Jessie's d-i vg name

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 v2:
1. Make Jessie case default.

---
 ts-host-install   | 7 +++++--
 ts-xen-build-prep | 8 +++++---
 2 files changed, 10 insertions(+), 5 deletions(-)
ts-host-install +5 -2
index 242bfb0..50b39a0 100755
@@ -87,10 +87,13 @@ END
 
     await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);
 
-    our $vgname= $ho->{Name};
+    our $vgname= $ho->{Suite} =~ m/wheezy|squeeze/
+                 ? $ho->{Name}
+                 : $ho->{Suite} =~ m/lenny/
+		     ? "$ho->{Name}.$c{TestHostDomain}"
+		     : "$ho->{Name}-vg";
 
     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 +5 -3
index 4dece65..befb7d4 100755
@@ -53,9 +53,11 @@ sub overall_limit_pe ($) {
 
 sub determine_vg_lv () {
     $vg=
-        $ho->{Suite} =~ m/lenny/
-        ? "$ho->{Name}.$c{TestHostDomain}"
-        : $ho->{Name};
+        $ho->{Suite} =~ m/wheezy|squeeze/
+        ? $ho->{Name}
+        : $ho->{Suite} =~ m/lenny/
+	    ? "$ho->{Name}.$c{TestHostDomain}"
+	    : "$ho->{Name}-vg";
     $lv = "/dev/$vg/$lvleaf";
 }
 
Signature · 1 line
1.9.1
author
#17 lore raw

PATCH v2 7/11 Debian: grub2: Allow submenu and menuentry items to be indented.

In reply to Wei Liu

From: Ian Campbell <[email protected]>

---
 Osstest/Debian.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Osstest/Debian.pm +2 -2
index 5463fd0..50730f5 100644
@@ -444,12 +444,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
author
#13 lore raw

PATCH v2 5/11 Debian.pm: install grub to default device

In reply to Wei Liu

Debian 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.

Quoted 1 line

From Weis v1 Jessie series

---
 Osstest/Debian.pm | 2 ++
 1 file changed, 2 insertions(+)
Osstest/Debian.pm +2 -0
index fa94210..5463fd0 100644
@@ -685,6 +685,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
author
#5 lore raw

PATCH v2 3/11 mg-debian-installer-update: Also collect DTBs for standard kernels

In reply to Wei Liu

From: Ian Campbell <[email protected]>

For 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
index f6bf962..3dd036a 100755
@@ -49,6 +49,7 @@ case ${suite}_${arch} in
     *_arm64)
         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
@@ -59,7 +60,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
@@ -79,6 +81,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
author
#26 lore raw

PATCH v2 11/11 ts-kernel-build: enable CONFIG_FHANDLE

In reply to Wei Liu

According 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
index e7cbdc1..438be6d 100755
@@ -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
author
#24 lore raw

PATCH v2 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
index b2f667f..6dfab1b 100755
@@ -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
#8 lore raw

Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie

In reply to Wei Liu
Quoted 9 lines · Wei Liu

From: Ian Campbell <[email protected]>

Systemd has some issues:

1. It doesn't honor osstest-confirm-booted service, which breaks ts-leak-check.
2. It kills the ssh connection before 'init 6' has a chance return, which breaks ts-host-reboot.

Quoted 4 lines

Fall back to SysV init for now.

[wei: rewrite commit message and code comment]

Those are fine by me, thanks.

Quoted 28 lines
---
 Osstest/Debian.pm | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Osstest/Debian.pm +12 -0
index c26f88e..fa94210 100644
@@ -903,6 +903,18 @@ in-target update-initramfs -u -k all
 END
     }
 
+    # Systemd has some issues:
+    #  1. it doesn't honor osstest-confirm-booted service,
+    #     which breaks ts-leak-check.
+    #  2. it kills the ssh connection before 'init 6' has a chance
+    #     return, which breaks ts-host-reboot.
+    # 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'};
 
#9 lore raw

Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie

Ian Campbell writes ("Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie"):

Quoted 1 line · Wei Liu

...

Quoted 2 lines
Quoted 2 lines

2. It kills the ssh connection before 'init 6' has a chance return, which breaks ts-host-reboot.

Arguably this isn't a bug in systemd, since sshd is racing with the system teardown. Perhaps we should simply ignore errors from this command.

Ian.

author
#10 lore raw

Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie

Quoted 10 lines · Ian Jackson

Ian Campbell writes ("Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie"):

Quoted 1 line · Wei Liu

...

Quoted 2 lines
Quoted 2 lines

2. It kills the ssh connection before 'init 6' has a chance return, which breaks ts-host-reboot.

Arguably this isn't a bug in systemd, since sshd is racing with the system teardown. Perhaps we should simply ignore errors from this command.

That would do. But this point is moot since we're not using systemd now. I can rewrite the commit message and comment in next version.

For the record I also had a patch to use "shutdown -r +1" to workaround this problem, but since you're fine with ignoring error I think that's better.

Wei.

Quoted 1 line

Ian.

Acked-by on v2 1/11
#2 lore raw

Re: [PATCH OSSTEST v2 01/11] More flexible handling of need-kernel-deb-$flavour host flag

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 01/11] More flexible handling of need-kernel-deb-$flavour host flag"):

Quoted 14 lines

From: 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.

Quoted 6 lines

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.

But AFAICT this needs the update to be run on the production instance, and to accompanied by a di version change ?

Ian.

#11 lore raw

Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie

In reply to Wei Liu

Wei Liu writes ("Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie"):

Quoted 2 lines

That would do. But this point is moot since we're not using systemd now. I can rewrite the commit message and comment in next version.

Right.

Quoted 3 lines

For the record I also had a patch to use "shutdown -r +1" to workaround this problem, but since you're fine with ignoring error I think that's better.

`shutdown -r +1' waits 1 minute, which is rather too long.

Thanks,
Ian.

Acked-by on v2 4/11
#12 lore raw

Re: [PATCH OSSTEST v2 04/11] Force sysvinit with Jessie

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 04/11] Force sysvinit with Jessie"):

Quoted 6 lines

From: Ian Campbell <[email protected]>

Systemd has some issues:

1. It doesn't honor osstest-confirm-booted service, which breaks ts-leak-check.

...

Quoted 1 line

Fall back to SysV init for now.

#4 lore raw

Re: [PATCH OSSTEST v2 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 02/11] mg-debian-installer-update: updates to better handle Jessie onwards."):

Quoted 1 line

From: Ian Campbell <[email protected]>

I'm afraid I have got fed up of reading the wrap damage in this file.

Can you please rewrap at least all the new or changed lines to ~70, and respin ?

Thanks,
Ian.

Acked-by on v2 3/11
#6 lore raw

Re: [PATCH OSSTEST v2 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels"):

Quoted 4 lines

From: Ian Campbell <[email protected]>

For armhf and arm64 for Jessie we will need these in the normal case as well as in the backports case. Arrange to download.

Ian.

#16 lore raw

Re: [PATCH OSSTEST v2 06/11] Cope with Jessie's d-i vg name

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 06/11] Cope with Jessie's d-i vg name"):

Quoted 3 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.

...

ts-host-install END · line 94

Quoted 6 lines
ts-host-install +5 -1
-    our $vgname= $ho->{Name};
+    our $vgname= $ho->{Suite} =~ m/wheezy|squeeze/
+                 ? $ho->{Name}
+                 : $ho->{Suite} =~ m/lenny/
+		     ? "$ho->{Name}.$c{TestHostDomain}"
+		     : "$ho->{Name}-vg";

This nested indentation is not conventional (in any language, AFAICT) for sequences of ? :.

There are various acceptable indentations but I don't think this is one of them. (I normally prefer versions which put the condition and the result on the same line, but that may be too tedious here.)

ts-xen-build-prep sub overall_limit_pe ($) { · line 60

Quoted 10 lines
 sub determine_vg_lv () {
     $vg=
ts-xen-build-prep +5 -3
-        $ho->{Suite} =~ m/lenny/
-        ? "$ho->{Name}.$c{TestHostDomain}"
-        : $ho->{Name};
+        $ho->{Suite} =~ m/wheezy|squeeze/
+        ? $ho->{Name}
+        : $ho->{Suite} =~ m/lenny/
+	    ? "$ho->{Name}.$c{TestHostDomain}"
+	    : "$ho->{Name}-vg";

Now, admittedly, this logic was duplicated before you started. But really I think you should abolish the duplication before extending it.

Thanks,
Ian.

Acked-by on v2 8/11
#20 lore raw

Re: [PATCH OSSTEST v2 08/11] ts-xen-build-prep: install libnl-route-3-dev on Jessie

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 08/11] ts-xen-build-prep: install libnl-route-3-dev on Jessie"):

Quoted 2 lines

There is no package called libnl-dev on Jessie. To build remus, use libnl-route-3-dev instead.

#22 lore raw

Re: [PATCH OSSTEST v2 09/11] ts-xen-build-prep: install libc6-dev-i386 for jessie

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 09/11] ts-xen-build-prep: install libc6-dev-i386 for jessie"):

Quoted 1 line

...

ts-xen-build-prep END · line 236

Quoted 11 lines
ts-xen-build-prep +1 -1
index 4fdc37e..c348dad 100755
@@ -232,7 +232,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/wheezy|jessie/) {
         target_install_packages($ho, 'libc6-dev-i386');

If we are expecting this to be permanent, rather than it being a bug in wheezy, I think the sense of the test here is wrong, and we should be listing the older suites which don't need it.

Thanks,
Ian.

Acked-by on v2 10/11
#25 lore raw

Re: [PATCH OSSTEST v2 10/11] ts-xen-install: install libnl-route-3-200 for jessie

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 10/11] ts-xen-install: install libnl-route-3-200 for jessie"):

Quoted 1 line

...

ts-xen-install sub packages () { · line 58

Quoted 5 lines

target_install_packages($ho,
qw(bridge-utils vncsnapshot libaio1 libpixman-1-0
libsdl1.2debian libglib2.0-0 liblzma5));

ts-xen-install +2 -0
+    if ($ho->{Suite} =~ m/jessie/) {
+        target_install_packages($ho, 'libnl-route-3-200');

.oO{

I wonder if we should make target_install_packages have some kind of magic metasyntax for this kind of thing.

target_install_packages($ho,
qw(bridge-utils vncsnapshot libaio1 libpixman-1-0

-                       libsdl1.2debian libglib2.0-0 liblzma5));
+                       libsdl1.2debian libglib2.0-0 liblzma5
+                       {>=jessie}libnl-route-3-200));

}

Ian.

Acked-by on v2 11/11
#27 lore raw

Re: [PATCH OSSTEST v2 11/11] ts-kernel-build: enable CONFIG_FHANDLE

In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 11/11] ts-kernel-build: enable CONFIG_FHANDLE"):

Quoted 3 lines

According 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.

Uh, and it's not the default. Brilliant. I don't suppose any of the systemd people felt like trying to fix upstream kernels.

ts-kernel-build setopt CONFIG_FUSION_LOGGING n · line 529

Quoted 2 lines
ts-kernel-build +2 -0
+setopt CONFIG_FHANDLE y
+

Fine, whatever :-).

Thanks,
Ian.

author
#23 lore raw

Re: [PATCH OSSTEST v2 09/11] ts-xen-build-prep: install libc6-dev-i386 for jessie

In reply to Ian Jackson
Quoted 19 lines · Ian Jackson

Wei Liu writes ("[PATCH OSSTEST v2 09/11] ts-xen-build-prep: install libc6-dev-i386 for jessie"):

Quoted 1 line

...

ts-xen-build-prep END · line 236

Quoted 11 lines
ts-xen-build-prep +1 -1
index 4fdc37e..c348dad 100755
@@ -232,7 +232,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/wheezy|jessie/) {
         target_install_packages($ho, 'libc6-dev-i386');

If we are expecting this to be permanent, rather than it being a bug in wheezy, I think the sense of the test here is wrong, and we should be listing the older suites which don't need it.

Yes, this is going to be permanent. The root cause is wheezy onwards introduces multi-arch that separates amd64 and i386.

I will reverse logic: add that package in the initial set and remove it for older suites.

Wei.

Quoted 2 lines

Thanks,
Ian.