All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: ian.jackson@eu.citrix.com, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag
Date: Wed, 17 Jun 2015 14:06:34 +0100	[thread overview]
Message-ID: <1434546404-2036-2-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1434546404-2036-1-git-send-email-wei.liu2@citrix.com>

From: Ian Campbell <ian.campbell@citrix.com>

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>
---
 Osstest/Debian.pm          |  4 +++-
 mg-debian-installer-update | 22 +++++++++++-----------
 ts-host-install            | 14 +++++++++++---
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index c6ca159..7c652f7 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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 {
diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 4ff346f..f21f216 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -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
 
diff --git a/ts-host-install b/ts-host-install
index b73c7ff..2fea451 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -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");
-- 
1.9.1

  reply	other threads:[~2015-06-17 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
2015-06-17 13:06 ` Wei Liu [this message]
2015-06-17 13:06 ` [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards Wei Liu
2015-06-19 12:33   ` Ian Jackson
2015-06-19 13:50   ` Ian Campbell
2015-06-19 14:53     ` Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 04/11] Force sysvinit with Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 05/11] Debian.pm: install grub to default device Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name Wei Liu
2015-06-17 14:22   ` Ian Campbell
2015-06-17 14:42     ` Wei Liu
2015-06-17 15:05       ` Wei Liu
2015-06-19 12:21   ` Ian Jackson
2015-06-17 13:06 ` [PATCH OSSTEST v3 07/11] Debian: grub2: Allow submenu and menuentry items to be indented Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 08/11] ts-xen-build-prep: install libnl-route-3-dev on Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386 Wei Liu
2015-06-19 12:22   ` Ian Jackson
2015-06-17 13:06 ` [PATCH OSSTEST v3 10/11] ts-xen-install: install libnl-route-3-200 for jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 11/11] ts-kernel-build: enable CONFIG_FHANDLE Wei Liu
2015-06-18 16:27 ` [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie Wei Liu
2015-06-19 12:05   ` Ian Jackson
2015-06-19 16:13     ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434546404-2036-2-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.