diff --git a/0001-Fix-return-value-of-_dbus_do_call.patch b/0001-Fix-return-value-of-_dbus_do_call.patch new file mode 100644 index 0000000..fa4635e --- /dev/null +++ b/0001-Fix-return-value-of-_dbus_do_call.patch @@ -0,0 +1,36 @@ +From 442f79e8b018ef4fed91c1256d5f4796cc42a36e Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 14 Apr 2021 21:43:27 -0700 +Subject: [PATCH] Fix return value of _dbus_do_call + +This was relying on perl's default return behaviour before +(return the result of the final line of the function, if it's an +expression). But now that's wrong, as the last line is something +else. We need to be explicit about what we're returning (which +would generally be a good thing to do anyway). + +Related progress issue: https://progress.opensuse.org/issues/91163 + +Signed-off-by: Adam Williamson +--- + backend/qemu.pm | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/backend/qemu.pm b/backend/qemu.pm +index 735e349c..04bb05fb 100644 +--- a/backend/qemu.pm ++++ b/backend/qemu.pm +@@ -141,8 +141,9 @@ sub _dbus_do_call { + my $bus = Net::DBus->system(private => 1); + my $bus_service = $bus->get_service("org.opensuse.os_autoinst.switch"); + my $bus_object = $bus_service->get_object("/switch", "org.opensuse.os_autoinst.switch"); +- $bus_object->$fn(@args); ++ my @result = $bus_object->$fn(@args); + $bus->get_connection->disconnect; ++ return @result; + } + + sub _dbus_call { +-- +2.31.1 + diff --git a/0001-Re-connect-to-dbus-for-each-call-POO-90872.patch b/0001-Re-connect-to-dbus-for-each-call.patch similarity index 72% rename from 0001-Re-connect-to-dbus-for-each-call-POO-90872.patch rename to 0001-Re-connect-to-dbus-for-each-call.patch index 28d2814..421be17 100644 --- a/0001-Re-connect-to-dbus-for-each-call-POO-90872.patch +++ b/0001-Re-connect-to-dbus-for-each-call.patch @@ -1,7 +1,7 @@ -From 3d16b5fb23c4a41ba15a1e8dfdcd2b302557c377 Mon Sep 17 00:00:00 2001 +From 8776da7055d572fc6223eb6ce9ad4c3a5b2f925b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 13 Apr 2021 09:02:55 -0700 -Subject: [PATCH] Re-connect to dbus for each call (POO #90872) +Subject: [PATCH] Re-connect to dbus for each call By using the system bus and leaving our connection to it open for the entire lifetime of the isotovideo process, we're setting @@ -16,16 +16,16 @@ one signal per network at end). Thanks to @dvdhrm and @berrange for their help with this. -Signed-off-by: Adam Williamson +Related progress issue: https://progress.opensuse.org/issues/90872 --- - backend/qemu.pm | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) + backend/qemu.pm | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/qemu.pm b/backend/qemu.pm -index 6c64f497..b847ddd1 100644 +index 6c64f497..735e349c 100644 --- a/backend/qemu.pm +++ b/backend/qemu.pm -@@ -135,10 +135,11 @@ sub stop_qemu { +@@ -135,10 +135,14 @@ sub stop_qemu { sub _dbus_do_call { my ($self, $fn, @args) = @_; @@ -33,7 +33,10 @@ index 6c64f497..b847ddd1 100644 - $self->{dbus_service} ||= $self->{dbus}->get_service("org.opensuse.os_autoinst.switch"); - $self->{dbus_object} ||= $self->{dbus_service}->get_object("/switch", "org.opensuse.os_autoinst.switch"); - $self->{dbus_object}->$fn(@args); -+ my $bus = Net::DBus->system(private => "true"); ++ # we intentionally do not persist the dbus connection to avoid ++ # queueing up signals we are not interested in handling: ++ # https://progress.opensuse.org/issues/90872 ++ my $bus = Net::DBus->system(private => 1); + my $bus_service = $bus->get_service("org.opensuse.os_autoinst.switch"); + my $bus_object = $bus_service->get_object("/switch", "org.opensuse.os_autoinst.switch"); + $bus_object->$fn(@args); diff --git a/0001-Update-qemu-argument-used-to-disable-floppy-drive-fo.patch b/0001-Update-qemu-argument-used-to-disable-floppy-drive-fo.patch new file mode 100644 index 0000000..771df17 --- /dev/null +++ b/0001-Update-qemu-argument-used-to-disable-floppy-drive-fo.patch @@ -0,0 +1,34 @@ +From b1ea2d3376d8d337bb84230eead0759a57905f8c Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 15 Apr 2021 16:43:24 -0700 +Subject: [PATCH] Update qemu argument used to disable floppy drive for qemu + 6.0 + +The way we were doing this before no longer works with qemu 6.0. +Markus Armbruster suggests using -nodefaults, but that's a bigger +gun and we'd have to check we aren't relying on the default +devices in any way before using it. This was his second choice +suggestion "If you'd prefer not to". It does seem to work (with +both older and newer qemu). See: + +https://bugs.launchpad.net/bugs/1923663 +--- + backend/qemu.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backend/qemu.pm b/backend/qemu.pm +index 04bb05fb..28a6f88a 100644 +--- a/backend/qemu.pm ++++ b/backend/qemu.pm +@@ -857,7 +857,7 @@ sub start_qemu { + { + # Remove floppy drive device on architectures + unless ($arch eq 'aarch64' || $arch eq 'arm' || $vars->{QEMU_NO_FDC_SET}) { +- sp('global', 'isa-fdc.driveA='); ++ sp('global', 'isa-fdc.fdtypeA=none'); + } + + sp('m', $vars->{QEMURAM}) if $vars->{QEMURAM}; +-- +2.31.1 + diff --git a/os-autoinst.spec b/os-autoinst.spec index 85aa4cb..ade0786 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -38,7 +38,7 @@ Name: os-autoinst Version: %{github_version} -Release: 35%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 36%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ URL: https://os-autoinst.github.io/openQA/ @@ -50,7 +50,15 @@ Patch0: 0001-signalblocker-Also-block-SIGCHLD.patch # https://github.com/os-autoinst/os-autoinst/pull/1641 # Try and fix dbus limit overflows: # https://progress.opensuse.org/issues/90872 -Patch1: 0001-Re-connect-to-dbus-for-each-call-POO-90872.patch +Patch1: 0001-Re-connect-to-dbus-for-each-call.patch +# Fix a bug in Patch1 which broke things when OVS_DEBUG is set: +# https://github.com/os-autoinst/os-autoinst/pull/1644 +# https://progress.opensuse.org/issues/91163 +Patch2: 0001-Fix-return-value-of-_dbus_do_call.patch +# Update qemu arg used to disable floppy drive for qemu 6.0: +# https://github.com/os-autoinst/os-autoinst/pull/1646 +# https://bugs.launchpad.net/bugs/1923663 +Patch3: 0001-Update-qemu-argument-used-to-disable-floppy-drive-fo.patch # on SUSE this is conditional, for us it doesn't have to be but we # still use a macro just to keep build_requires similar for ease of @@ -232,6 +240,11 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm %files devel %changelog +* Thu Apr 15 2021 Adam Williamson - 4.6-36.20210326git24ec8f9 +- Backport fix for a bug in the dbus change from -35 (POO #91163) +- Update dbus change patch to final version so fix applies +- Backport PR #1646 to fix floppy disablement arg with qemu 6.0 + * Tue Apr 13 2021 Adam Williamson - 4.6-35.20210326git24ec8f9 - Backport upstream patch to hopefully fix crashes on isotovideo exit (#1667163) - Try and fix dbus limit overflows due to persistent dbus connection (POO #90872)