]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
More flexible handling of need-kernel-deb-$flavour host flag
authorIan Campbell <ian.campbell@citrix.com>
Mon, 26 Jan 2015 16:08:43 +0000 (16:08 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 23 Jun 2015 15:43:41 +0000 (16:43 +0100)
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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Also update TftpDiVersion, after having run
mg-debian-installer-update-all on the colo controller VM.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm
mg-debian-installer-update
production-config
ts-host-install

index c6ca159e3cbb3d10cf19e3be55fedef89d645ca0..7c652f7610d7f90827089b7f88da4445639a466d 100644 (file)
@@ -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 {
index 4ff346f2128e8bf47fc1cada7a5523995775819d..f21f2166128ccd0d345d1edd7d84749fb3714cdd 100755 (executable)
@@ -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
 
index bcb351ec8e7bb4cc99483d0a72de3ce2a067e9a4..50466ceda09659993c4f04d4de564823f4f89ed1 100644 (file)
@@ -82,7 +82,7 @@ TftpPxeTemplates %name%/pxelinux.cfg
 TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex%
 
 TftpPxeGroup osstest
-TftpDiVersion 2015-01-10
+TftpDiVersion 2015-06-23
 
 # These should normally be the same.
 MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
index b73c7ffaacecbfd75b5c5d8da248939e0fb399dc..2fea451f2ab3bce7eb749d608cb7ca27a9d79c9b 100755 (executable)
@@ -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");