All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST v3 00/11] Upgrade to Jessie
@ 2015-06-17 13:06 Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag Wei Liu
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
@ 2015-06-17 13:06 ` Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards Wei Liu
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Ian Campbell

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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag Wei Liu
@ 2015-06-17 13:06 ` Wei Liu
  2015-06-19 12:33   ` Ian Jackson
  2015-06-19 13:50   ` Ian Campbell
  2015-06-17 13:06 ` [PATCH OSSTEST v3 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels Wei Liu
                   ` (9 subsequent siblings)
  11 siblings, 2 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: Wei Liu, ian.jackson, Ian Campbell

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

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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[wei: wrap lines]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 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(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 7c652f7..26363af 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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 {
diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index f21f216..750258d 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -38,20 +38,29 @@ fetch () {
 }
 
 case ${suite}_${arch} in
+    lenny_armhf|squeeze_armhf|lenny_arm64|squeeze_arm64|wheezy_arm64)
+        # No such thing.
+        exit 0
+        ;;
     *_i386|*_amd64)
         src=$sbase/main/installer-$arch/current/images/netboot/
         files="debian-installer/$arch/initrd.gz:initrd.gz debian-installer/$arch/linux:linux xen/vmlinuz:vmlinuz-xen xen/initrd.gz:initrd.gz-xen"
         ;;
-    lenny_armhf|squeeze_armhf)
-        # No such thing.
-        exit 0
+    *_arm64)
+        src=$sbase/main/installer-$arch/current/images/netboot/
+        files="debian-installer/$arch/initrd.gz:initrd.gz \
+               debian-installer/$arch/linux:linux"
         ;;
-    *_armhf)
+    wheezy_armhf)
         # Use the vexpress image, we are going to bash in our own
         # kernel+modules anyway.
         src=$sbase/main/installer-$arch/current/images/vexpress/netboot
         files='initrd.gz' # no kernel -- needs a newer kernel
         ;;
+    *_armhf)
+        src=$sbase/main/installer-$arch/current/images/netboot
+        files='vmlinuz initrd.gz'
+	;;
 esac
 
 pfile=$sbase/non-free/binary-$arch/Packages.gz
@@ -89,28 +98,40 @@ for p in $packages; do
         rm -rf x
 done
 
-# armhf requires a newer kernel than was in Wheezy for most
-# platforms. Construct something suitable from the latest kernel in
-# wheezy-backports.
-if [ $arch = armhf ]; then
+# 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
+    wheezy_armhf) bpok=armmp; need_initramfs=y;;
+esac
+if [ x$bpok != x ]; then
     bp="$sbase-backports"
-    pfile=$bp/main/binary-armhf/Packages.gz
+    pfile=$bp/main/binary-$arch/Packages.gz
 
     fetch $pfile >Packages.gz
 
-    # 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=$?
-    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`
+        rc=$?
+        set -e
+        if [ $rc -ne 0 ] || [ x$pkgfile = x ]; then
+	    fail "initramfs-tools package not found";
+	fi
+        fetch "$site/$pkgfile" >initramfs-tools.deb
+    fi
 
     set +e
     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`
+    pkgfile=`zcat Packages.gz | grep-dctrl -S linux \
+             | grep-dctrl -Pe ^linux-image-.*-${bpok}$ -nsFilename \
+             | sort -n -r | head -n1`
     rc=$?
     set -e
     if [ $rc != 0 ]; then fail "backports kernel package not found"; fi
@@ -143,11 +164,13 @@ if [ $arch = armhf ]; then
           |pax -x sv4cpio -s '%lib%/lib%' -d -w -M norm >../cpio; cd ..
     gzip -9nf cpio
     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
+    if [ -d x/usr/lib/linux-image-*-${bpok}/ ] ; then
+        rm -rf backports-dtbs/
+        mkdir backports-dtbs/
+        mv x/usr/lib/linux-image-*-${bpok}/*.dtb backports-dtbs/
+        tar --mtime=./x/usr/lib -cf backports-dtbs.tar backports-dtbs
+        gzip -9nf backports-dtbs.tar
+    fi
     rm -rf x
 fi
 
diff --git a/mg-debian-installer-update-all b/mg-debian-installer-update-all
index eca4a5f..241e2e3 100755
--- a/mg-debian-installer-update-all
+++ b/mg-debian-installer-update-all
@@ -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
diff --git a/ts-host-install b/ts-host-install
index 2fea451..242bfb0 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -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";
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards Wei Liu
@ 2015-06-17 13:06 ` Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 04/11] Force sysvinit with Jessie Wei Liu
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[wei: fix rebase conflict]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 mg-debian-installer-update | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 750258d..e8f5f12 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 04/11] Force sysvinit with Jessie
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (2 preceding siblings ...)
  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 ` Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 05/11] Debian.pm: install grub to default device Wei Liu
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: Wei Liu, ian.jackson, Ian Campbell

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

Systemd  doesn't honor osstest-confirm-booted service, which breaks
ts-leak-check.  Fall back to SysV init for now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[wei: rewrite commit message and code comment]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 26363af..905758f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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'};
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 05/11] Debian.pm: install grub to default device
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (3 preceding siblings ...)
  2015-06-17 13:06 ` [PATCH OSSTEST v3 04/11] Force sysvinit with Jessie Wei Liu
@ 2015-06-17 13:06 ` Wei Liu
  2015-06-17 13:06 ` [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name Wei Liu
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 905758f..8ad673e 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (4 preceding siblings ...)
  2015-06-17 13:06 ` [PATCH OSSTEST v3 05/11] Debian.pm: install grub to default device Wei Liu
@ 2015-06-17 13:06 ` Wei Liu
  2015-06-17 14:22   ` Ian Campbell
  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
                   ` (5 subsequent siblings)
  11 siblings, 2 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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 <wei.liu2@citrix.com>
---
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(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 8ad673e..b1a5396 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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) = @_;
 
diff --git a/ts-host-install b/ts-host-install
index 242bfb0..04d5487 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -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/;
diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index 4dece65..deee24c 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -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";
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 07/11] Debian: grub2: Allow submenu and menuentry items to be indented.
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (5 preceding siblings ...)
  2015-06-17 13:06 ` [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name Wei Liu
@ 2015-06-17 13:06 ` 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
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Ian Campbell

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

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index b1a5396..929d22e 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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);
             }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 08/11] ts-xen-build-prep: install libnl-route-3-dev on Jessie
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (6 preceding siblings ...)
  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 ` 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
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-build-prep | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index deee24c..c4fdeac 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -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
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (7 preceding siblings ...)
  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 ` 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
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ts-xen-build-prep | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index c4fdeac..d97e350 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -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');
     }
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 10/11] ts-xen-install: install libnl-route-3-200 for jessie
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (8 preceding siblings ...)
  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-17 13:06 ` 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
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-xen-install b/ts-xen-install
index d55401c..69478ce 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -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/) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 11/11] ts-kernel-build: enable CONFIG_FHANDLE
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (9 preceding siblings ...)
  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 ` Wei Liu
  2015-06-18 16:27 ` [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie Wei Liu
  11 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 13:06 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-kernel-build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ts-kernel-build b/ts-kernel-build
index e7cbdc1..438be6d 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
  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-19 12:21   ` Ian Jackson
  1 sibling, 1 reply; 23+ messages in thread
From: Ian Campbell @ 2015-06-17 14:22 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Wed, 2015-06-17 at 14:06 +0100, Wei Liu wrote:
> 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 <wei.liu2@citrix.com>
> ---
> 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...


> 
> 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(-)
> 
> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> index 8ad673e..b1a5396 100644
> --- a/Osstest/Debian.pm
> +++ b/Osstest/Debian.pm
> @@ -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) = @_;
>  
> diff --git a/ts-host-install b/ts-host-install
> index 242bfb0..04d5487 100755
> --- a/ts-host-install
> +++ b/ts-host-install
> @@ -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/;
> diff --git a/ts-xen-build-prep b/ts-xen-build-prep
> index 4dece65..deee24c 100755
> --- a/ts-xen-build-prep
> +++ b/ts-xen-build-prep
> @@ -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";
>  }
>  

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
  2015-06-17 14:22   ` Ian Campbell
@ 2015-06-17 14:42     ` Wei Liu
  2015-06-17 15:05       ` Wei Liu
  0 siblings, 1 reply; 23+ messages in thread
From: Wei Liu @ 2015-06-17 14:42 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Wed, Jun 17, 2015 at 03:22:09PM +0100, Ian Campbell wrote:
> On Wed, 2015-06-17 at 14:06 +0100, Wei Liu wrote:
> > 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 <wei.liu2@citrix.com>
> > ---
> > 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...
> 

Yes, use Osstest::Debian; should fix that.

I'm running a build job at the moment. I will report back when it
finishes.

Wei.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
  2015-06-17 14:42     ` Wei Liu
@ 2015-06-17 15:05       ` Wei Liu
  0 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-17 15:05 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Wed, Jun 17, 2015 at 03:42:57PM +0100, Wei Liu wrote:
> On Wed, Jun 17, 2015 at 03:22:09PM +0100, Ian Campbell wrote:
> > On Wed, 2015-06-17 at 14:06 +0100, Wei Liu wrote:
> > > 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 <wei.liu2@citrix.com>
> > > ---
> > > 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...
> > 
> 
> Yes, use Osstest::Debian; should fix that.
> 

The following patch contains the fix.

---8<---
>From 65b37ee4ecbe117969ac3df28122c934c3088dcf Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@citrix.com>
Date: Mon, 15 Jun 2015 12:07:38 +0100
Subject: [PATCH OSSTEST] Cope with Jessie's d-i vg name
Cc: ian.campbell@citrix.com, ian.jackson@eu.citrix.com

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 <wei.liu2@citrix.com>
---
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(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 8ad673e..b1a5396 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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) = @_;
 
diff --git a/ts-host-install b/ts-host-install
index 242bfb0..04d5487 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -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/;
diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index 4dece65..b5d7ed0 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -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";
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
  2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
                   ` (10 preceding siblings ...)
  2015-06-17 13:06 ` [PATCH OSSTEST v3 11/11] ts-kernel-build: enable CONFIG_FHANDLE Wei Liu
@ 2015-06-18 16:27 ` Wei Liu
  2015-06-19 12:05   ` Ian Jackson
  11 siblings, 1 reply; 23+ messages in thread
From: Wei Liu @ 2015-06-18 16:27 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
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(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index e7f4860..c71f88a 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -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;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
  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
  0 siblings, 1 reply; 23+ messages in thread
From: Ian Jackson @ 2015-06-19 12:05 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson, ian.campbell

Wei Liu writes ("[PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
...
> diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> index e7f4860..c71f88a 100644
> --- a/Osstest/Toolstack/libvirt.pm
> +++ b/Osstest/Toolstack/libvirt.pm
> @@ -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],

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.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name
  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-19 12:21   ` Ian Jackson
  1 sibling, 0 replies; 23+ messages in thread
From: Ian Jackson @ 2015-06-19 12:21 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.campbell

Wei Liu writes ("[PATCH OSSTEST v3 06/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.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386
  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
  0 siblings, 0 replies; 23+ messages in thread
From: Ian Jackson @ 2015-06-19 12:22 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.campbell

Wei Liu writes ("[PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386"):
> 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).

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
  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
  1 sibling, 0 replies; 23+ messages in thread
From: Ian Jackson @ 2015-06-19 12:33 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Campbell

Wei Liu writes ("[PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards."):
> From: Ian Campbell <ian.campbell@citrix.com>
> 
> In mg-debian-installer-update:
> 
>   - Expand the list of (suite,arch) combinations which don't exist and
>     move it to the top.
...
> -    # 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=$?
> -    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:

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

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
  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
  1 sibling, 1 reply; 23+ messages in thread
From: Ian Campbell @ 2015-06-19 13:50 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Wed, 2015-06-17 at 14:06 +0100, Wei Liu wrote:
> +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:

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index b9b1146..6a26675 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -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.

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
  2015-06-19 13:50   ` Ian Campbell
@ 2015-06-19 14:53     ` Wei Liu
  0 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-19 14:53 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Fri, Jun 19, 2015 at 02:50:34PM +0100, Ian Campbell wrote:
> On Wed, 2015-06-17 at 14:06 +0100, Wei Liu wrote:
> > +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:
> 
> diff --git a/mg-debian-installer-update b/mg-debian-installer-update
> index b9b1146..6a26675 100755
> --- a/mg-debian-installer-update
> +++ b/mg-debian-installer-update
> @@ -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.

> Ian.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie
  2015-06-19 12:05   ` Ian Jackson
@ 2015-06-19 16:13     ` Wei Liu
  0 siblings, 0 replies; 23+ messages in thread
From: Wei Liu @ 2015-06-19 16:13 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, ian.campbell

On Fri, Jun 19, 2015 at 01:05:55PM +0100, Ian Jackson wrote:
> Wei Liu writes ("[PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie"):
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ...
> > diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> > index e7f4860..c71f88a 100644
> > --- a/Osstest/Toolstack/libvirt.pm
> > +++ b/Osstest/Toolstack/libvirt.pm
> > @@ -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],
> 
> 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.
> 

For the record, Ian acked the following updated patch on IRC.

---8<---
>From b422cb2c6c1ecdc62a5a46212f2cf648c2141509 Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@citrix.com>
Date: Thu, 18 Jun 2015 15:46:07 +0100
Subject: [PATCH OSSTEST] toolstack/libvirt: install libnl-3-200 on Jessie
Cc: ian.campbell@citrix.com, ian.jackson@eu.citrix.com

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Toolstack/libvirt.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index e7f4860..51a10de 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -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;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-06-19 16:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag Wei Liu
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

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.