From bbaab5d3ce8a871aaae6055faea6a5eb5e8369d7 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 25 Oct 2016 17:53:08 -0700 Subject: [PATCH] latest git, backport fixes inc. updated OVMF locations --- .gitignore | 1 + 625.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 632.patch | 22 +++++++++++++++++ 634.patch | 22 +++++++++++++++++ os-autoinst.spec | 18 +++++++++++--- sources | 2 +- 6 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 625.patch create mode 100644 632.patch create mode 100644 634.patch diff --git a/.gitignore b/.gitignore index 44f52b5..febe9f1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /os-autoinst-0b5d885b30e84a229809d1e9e89b8b42533b8643.tar.gz /os-autoinst-1962d68ec8b432b8cef665b5b35bce54694a4d98.tar.gz /os-autoinst-ba7ea2290f4ac5a70ad335eb56124ba49c518837.tar.gz +/os-autoinst-96720315c0f7d6ac1539955f386243ad42dc493e.tar.gz diff --git a/625.patch b/625.patch new file mode 100644 index 0000000..a6de605 --- /dev/null +++ b/625.patch @@ -0,0 +1,62 @@ +From 7261632228be96aeeaf1068f01639d506368f692 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Tue, 18 Oct 2016 11:23:52 -0700 +Subject: [PATCH] Factor out and update known UEFI firmware locations + +We had two files defining the same list of known locations +for the OVMF (UEFI) firmware file, so factor them into a +shared array provided by bmwqemu. Also Fedora now has a +distro edk2-ovmf package, so add the pure EFI firmware from +that to the list. +--- + backend/qemu.pm | 5 +---- + bmwqemu.pm | 4 ++++ + consoles/sshVirtsh.pm | 4 +--- + 3 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/backend/qemu.pm b/backend/qemu.pm +index 6022c0e..6b94177 100644 +--- a/backend/qemu.pm ++++ b/backend/qemu.pm +@@ -255,10 +255,7 @@ sub start_qemu { + } + + if ($vars->{UEFI} && $vars->{ARCH} eq 'x86_64' && !$vars->{BIOS}) { +- # We have to try and find a firmware for UEFI. These are known +- # locations for openSUSE and Fedora (respectively). +- my @known = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd'); +- foreach my $firmware (@known) { ++ foreach my $firmware (@bmwqemu::ovmf_locations) { + if (-e $firmware) { + $vars->{BIOS} = $firmware; + last; +diff --git a/bmwqemu.pm b/bmwqemu.pm +index 75109b5..af774b8 100755 +--- a/bmwqemu.pm ++++ b/bmwqemu.pm +@@ -59,6 +59,10 @@ our $istty; + our $direct_output; + our $standstillthreshold = scale_timeout(600); + ++# Known locations of OVMF (UEFI) firmware: first is openSUSE, second is ++# the kraxel.org nightly packages, third is Fedora's edk2-ovmf package. ++our @ovmf_locations = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd', '/usr/share/edk2/ovmf/OVMF_CODE.fd'); ++ + our %vars; + + sub load_vars() { +diff --git a/consoles/sshVirtsh.pm b/consoles/sshVirtsh.pm +index 309e898..7012712 100644 +--- a/consoles/sshVirtsh.pm ++++ b/consoles/sshVirtsh.pm +@@ -136,9 +136,7 @@ sub _init_xml { + } + + if (get_var('UEFI') and check_var('ARCH', 'x86_64') and !get_var('BIOS')) { +- # These are known locations for openSUSE and Fedora (respectively). +- my @known = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd'); +- foreach my $firmware (@known) { ++ foreach my $firmware (@bmwqemu::ovmf_locations) { + if (!$self->run_cmd("test -e $firmware")) { + set_var('BIOS', $firmware); + $elem = $doc->createElement('loader'); diff --git a/632.patch b/632.patch new file mode 100644 index 0000000..57434d1 --- /dev/null +++ b/632.patch @@ -0,0 +1,22 @@ +From a392e12038e5f1603177bbe1f61cf2335c58f211 Mon Sep 17 00:00:00 2001 +From: Oliver Kurz +Date: Tue, 25 Oct 2016 09:33:12 +0200 +Subject: [PATCH] baseclass: Fix missing qualifier in warn + +--- + backend/baseclass.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backend/baseclass.pm b/backend/baseclass.pm +index b9f3f07..26f02af 100644 +--- a/backend/baseclass.pm ++++ b/backend/baseclass.pm +@@ -725,7 +725,7 @@ sub set_tags_to_assert { + next; + } + unless (ref($n) eq 'needle' && $n->{name}) { +- warn "invalid needle passed <" . ref($n) . "> " . pp($n); ++ warn "invalid needle passed <" . ref($n) . "> " . bmwqemu::pp($n); + next; + } + push @$needles, $n; diff --git a/634.patch b/634.patch new file mode 100644 index 0000000..ac68f79 --- /dev/null +++ b/634.patch @@ -0,0 +1,22 @@ +From 7ce434476407f967888cb7439b412d86a6ace70d Mon Sep 17 00:00:00 2001 +From: Oliver Kurz +Date: Tue, 25 Oct 2016 21:50:18 +0200 +Subject: [PATCH] vnc_base: Prevent 'uninitialized' warning in mouse_move + +--- + consoles/vnc_base.pm | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/consoles/vnc_base.pm b/consoles/vnc_base.pm +index 6d15610..7396d83 100644 +--- a/consoles/vnc_base.pm ++++ b/consoles/vnc_base.pm +@@ -183,6 +183,8 @@ sub release_key { + + sub _mouse_move { + my ($self, $x, $y) = @_; ++ $x //= 0; ++ $y //= 0; + + if ($self->{mouse}->{x} == $x && $self->{mouse}->{y} == $y) { + # in case the mouse is moved twice to the same position diff --git a/os-autoinst.spec b/os-autoinst.spec index 94f2bba..36b0cdd 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -24,20 +24,27 @@ %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.4 -%global github_commit ba7ea2290f4ac5a70ad335eb56124ba49c518837 +%global github_commit 96720315c0f7d6ac1539955f386243ad42dc493e # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20160915 +%global github_date 20161021 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 5%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 6%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ Group: Development/System URL: https://os-autoinst.github.io/openQA/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz +# Fix missing qualifier in warn +Patch0: https://github.com/os-autoinst/os-autoinst/pull/632.patch +# Prevent 'uninitialized' warning in mouse_move +Patch1: https://github.com/os-autoinst/os-autoinst/pull/634.patch +# Update OVMF file locations to include our packaged one +Patch2: https://github.com/os-autoinst/os-autoinst/pull/625.patch + BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -202,6 +209,11 @@ make check VERBOSE=1 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %changelog +* Tue Oct 25 2016 Adam Williamson - 4.4-6.20161021git9672031 +- bump to latest git +- backport a couple of small fixes for perl errors +- backport #625 so we can use the distro-packaged EDK2 + * Mon Sep 19 2016 Adam Williamson - 4.4-5.20160915gitba7ea22 - disable a failing test on 32-bit x86 diff --git a/sources b/sources index 2ae845b..f5d7220 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b2a6cb31e253c671b84d75c921dc4d5 os-autoinst-ba7ea2290f4ac5a70ad335eb56124ba49c518837.tar.gz +60cb10704f0ed39abc22fa1b1b72b36b os-autoinst-96720315c0f7d6ac1539955f386243ad42dc493e.tar.gz