Your message dated Mon, 2 Jul 2018 19:59:54 +0200
with message-id <[email protected]>
and subject line Closing bug missing bug number in changelog
has caused the Debian Bug report #898340,
regarding virt-qemu: Add a shortcut for booting EFI disk images
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
898340: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898340
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: autopkgtest
Version: 5.3.1
Severity: wishlist
Tags: patch

Some Debian derivatives strongly prefer EFI bootloaders (SteamOS and
Apertis are examples), some "legacy-free" disk image preparation tools
like mkosi can only use EFI boot, and in distributions that support
both BIOS and EFI it is useful to be able to exercise both code paths.

qemu can be provided with EFI boot capabilities by plugging in OVMF
(x86) or AAVMF (arm/aarch64) firmware, both from src:edk2, as an emulated
parallel flash device. The syntax isn't completely obvious, so I think
it would be useful for autopkgtest-virt-qemu to have a shortcut for
this. The attached patch adds an --efi option which tries to guess from
the qemu_command which EFI firmware we want.

I'll send a merge request when I have a bug number.

Regards,
    smcv

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'buildd-unstable'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental-debug'), (1, 
'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autopkgtest depends on:
ii  apt-utils       1.6.1
ii  libdpkg-perl    1.19.0.5
ii  procps          2:3.3.14-1+b1
ii  python3         3.6.5-3
ii  python3-debian  0.1.32

Versions of packages autopkgtest recommends:
ii  autodep8  0.12

Versions of packages autopkgtest suggests:
pn  lxc          <none>
pn  lxd-client   <none>
ii  qemu-system  1:2.12+dfsg-1
ii  qemu-utils   1:2.12+dfsg-1
ii  schroot      1.6.10-4

-- no debconf information
>From f42b6dea2a384101e56cc706d2dee041acca5cd7 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 9 May 2018 19:04:28 +0100
Subject: [PATCH] qemu: Add a shortcut for running tests on an EFI-booted image

Some Debian derivatives, notably SteamOS, and some image-preparation
tools, notably mkosi, prefer EFI.

Signed-off-by: Simon McVittie <[email protected]>
---
 debian/control               | 10 +++++++++-
 virt/autopkgtest-virt-qemu   | 26 ++++++++++++++++++++++++++
 virt/autopkgtest-virt-qemu.1 |  8 ++++++++
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index eed730e..74fda0e 100644
--- a/debian/control
+++ b/debian/control
@@ -25,7 +25,15 @@ Depends: python3,
  procps,
  ${misc:Depends}
 Recommends: autodep8
-Suggests: schroot, lxc, lxd-client, qemu-system, qemu-utils
+Suggests:
+ lxc,
+ lxd-client,
+ ovmf,
+ qemu-efi-aarch64,
+ qemu-efi-arm,
+ qemu-system,
+ qemu-utils,
+ schroot,
 Breaks: debci (<< 1.7~)
 Description: automatic as-installed testing for Debian packages
  autopkgtest runs tests on binary packages.  The tests are run on the
diff --git a/virt/autopkgtest-virt-qemu b/virt/autopkgtest-virt-qemu
index ae5bfc2..416c4c8 100755
--- a/virt/autopkgtest-virt-qemu
+++ b/virt/autopkgtest-virt-qemu
@@ -90,6 +90,8 @@ def parse_args():
                         help='Pass through arguments to QEMU command.')
     parser.add_argument('--baseimage', action='store_true', default=False,
                         help='Provide a read-only copy of the base image at /dev/baseimage')
+    parser.add_argument('--efi', action='store_true', default=False,
+                        help='Use OVMF or AAVMF to boot virtual machine using EFI (default: BIOS)')
     parser.add_argument('image', nargs='+',
                         help='disk image to add to the VM (in order)')
 
@@ -545,6 +547,30 @@ def hook_open():
             '-virtfs',
             'local,id=autopkgtest,path=%s,security_model=none,mount_tag=autopkgtest' % shareddir,
             '-drive', 'file=%s,cache=unsafe,if=virtio,index=0' % overlay]
+
+    if args.efi:
+        code = None
+        data = None
+
+        if 'qemu-system-x86_64' in args.qemu_command or \
+                'qemu-system-i386' in args.qemu_command:
+            code = '/usr/share/OVMF/OVMF_CODE.fd'
+            data = '/usr/share/OVMF/OVMF_VARS.fd'
+        elif 'qemu-system-aarch64' in args.qemu_command:
+            code = '/usr/share/AAVMF/AAVMF_CODE.fd'
+            data = '/usr/share/AAVMF/AAVMF_VARS.fd'
+        elif 'qemu-system-arm' in args.qemu_command:
+            code = '/usr/share/AAVMF/AAVMF32_CODE.fd'
+            data = '/usr/share/AAVMF/AAVMF32_VARS.fd'
+        else:
+            VirtSubproc.bomb('Unknown architecture for EFI boot')
+
+        shutil.copy(data, '%s/efivars.fd' % workdir)
+        argv.append('-drive')
+        argv.append('if=pflash,format=raw,read-only,file=' + code)
+        argv.append('-drive')
+        argv.append('if=pflash,format=raw,file=%s/efivars.fd' % workdir)
+
     for i, image in enumerate(args.image[1:]):
         argv.append('-drive')
         argv.append('file=%s,if=virtio,index=%i,readonly' % (image, i + 1))
diff --git a/virt/autopkgtest-virt-qemu.1 b/virt/autopkgtest-virt-qemu.1
index cdfe190..2137725 100644
--- a/virt/autopkgtest-virt-qemu.1
+++ b/virt/autopkgtest-virt-qemu.1
@@ -109,6 +109,14 @@ will not be accessible between calling
 .B autopkgtest-reboot-prepare
 and the next boot, thus make sure to stop accessing it before.
 
+.TP
+.B  \-\-efi
+Configure QEMU with OVMF or AAVMF firmware images suitable for booting
+an x86, ARM or ARM64 virtual machine using EFI. This requires the
+ovmf, qemu-efi-arm or qemu-efi-aarch64 package. The correct firmware
+image is guessed from the
+.BR --qemu-command .
+
 .TP
 .BI "--qemu-options=" arguments
 Pass through arguments to QEMU command; e. g. --qemu-options='-readconfig qemu.cfg'
-- 
2.17.0


--- End Message ---
--- Begin Message ---
Version: 5.4

-------- Forwarded Message --------
Subject: autopkgtest_5.4_source.changes ACCEPTED into unstable
Date: Mon, 02 Jul 2018 11:19:01 +0000
From: Debian FTP Masters <[email protected]>
To: Debian CI team <[email protected]>, Paul Gevers
<[email protected]>



Accepted:

Format: 1.8
Date: Mon, 02 Jul 2018 11:50:21 +0200
Source: autopkgtest
Binary: autopkgtest
Architecture: source
Version: 5.4
Distribution: unstable
Urgency: medium
Maintainer: Debian CI team <[email protected]>
Changed-By: Paul Gevers <[email protected]>
Description:
 autopkgtest - automatic as-installed testing for Debian packages
Closes: 832751 851558 867081 897170 901643
Changes:
 autopkgtest (5.4) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * README.package-tests.rst: Document AUTOPKGTEST_NORMAL_USER
   * d/tests/lxd: Don't assume all test-runners set AUTOPKGTEST_NORMAL_USER
   * qemu: Only set up base image device if requested
   * qemu: Document --baseimage
   * qemu: Update test for --baseimage no longer being the default
   * qemu, lxc, lxd: Look for a user account in the 1000-59999 range
     (Closes: #897170)
   * qemu: Add a shortcut for running tests on an EFI-booted image
   * doc: Describe how to parse Features, Restrictions, Classes
   * Add support for flaky tests (Closes: #851558)
   * Add support for tests declaring themselves to have been skipped
   * autopkgtest(1): Document FLAKY as a possible summary status
 .
   [ Balint Reczey ]
   * Fix bashism in retrying apt update
 .
   [ Paul Gevers ]
   * Enable testing to continue after badpkg (Closes: #832751)
   * adt_testbed.py fix missed piece of regular expression in commit a7e1dad
   * d/tests/autopkgtest Update SchrootRunner
   * runner/autopkgtest: Drop Ubuntu 12.04 fallback
   * manpage: make ordering consistent with --help (Closes: #901643)
 .
   [ Julian Andres Klode ]
   * ssh-setup/nova: Add support for keystone v3 auth (LP: #1767433)
 .
   [ Rafael Laboissiere ]
   * Set Maintainer email address to [email protected]
 .
   [ Niko Tyni ]
   * Add a couple of testcases for versioned provides support
   * Ensure synthesized test dependencies are not satisfied by versioned
Provides
     (Closes: #867081)
   * Remove the old '(>= 0)' hack for ensuring '@' pulls in real packages
Checksums-Sha1:
 1720155af7c18ae32212b2e6a0bde1a73b79e98b 1582 autopkgtest_5.4.dsc
 f9b0c5ab38b22484d0176eec1f115bb0b369116b 173636 autopkgtest_5.4.tar.xz
Checksums-Sha256:
 5ccc59ec2985b5557763764309867a6068f7139de3e9d06f1e43e240894b4aa4 1582
autopkgtest_5.4.dsc
 c8c5c14298105d1798ce9a20a4f7d2b837279939a94da5fdc761111517575030 173636
autopkgtest_5.4.tar.xz
Files:
 b12bae17fc3461b1d46d93bf4863c768 1582 devel optional autopkgtest_5.4.dsc
 7abe82af7806ef1c477f0fb1be65b7c7 173636 devel optional
autopkgtest_5.4.tar.xz



Thank you for your contribution to Debian.



Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to