From 79367643afabdebcff3e59c8f7e0e04ada6ccde6 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 31 Oct 2019 13:44:48 -0700 Subject: [PATCH] Update to latest upstream git, resync spec --- .gitignore | 1 + ...lue-once-for-PXEBOOT-to-PXE-boot.onc.patch | 48 ----- ...-functionality-from-assert_and_click.patch | 107 ----------- ...key-order-when-sending-key-up-events.patch | 61 ------- 1199-edited.patch | 166 ------------------ os-autoinst.spec | 124 +++++-------- sources | 2 +- 7 files changed, 45 insertions(+), 464 deletions(-) delete mode 100644 0001-Allow-special-value-once-for-PXEBOOT-to-PXE-boot.onc.patch delete mode 100644 0001-Factor-out-click-functionality-from-assert_and_click.patch delete mode 100644 0001-VNC-reverse-key-order-when-sending-key-up-events.patch delete mode 100644 1199-edited.patch diff --git a/.gitignore b/.gitignore index 05e1241..ab5502f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /os-autoinst-c3d5e8ac168f5976ca488559d489bbcfa737422a.tar.gz /os-autoinst-c597122986fb779fe5985a96c2d73aa03e2d4b15.tar.gz /os-autoinst-3391d604ae36c0db0cda1d38f170137aef486a0c.tar.gz +/os-autoinst-447dab862096c5fb871fe06f61c3e5249ec0d5c1.tar.gz diff --git a/0001-Allow-special-value-once-for-PXEBOOT-to-PXE-boot.onc.patch b/0001-Allow-special-value-once-for-PXEBOOT-to-PXE-boot.onc.patch deleted file mode 100644 index d3bf6bf..0000000 --- a/0001-Allow-special-value-once-for-PXEBOOT-to-PXE-boot.onc.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 2d6e71e8d2d6f61f109566ff3148d3b1aa50c68c Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 20 Aug 2019 15:39:04 -0700 -Subject: [PATCH] Allow special value 'once' for PXEBOOT, to PXE boot...once - -For a PXE install test, we want to boot PXE just the *first* -time, then revert to default boot order (much like we boot -once=d by default for optical media installs). This allows the -special value 'once' for the PXEBOOT var to request this. - -Signed-off-by: Adam Williamson ---- - backend/qemu.pm | 5 ++++- - doc/backend_vars.asciidoc | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/backend/qemu.pm b/backend/qemu.pm -index ca576dd2..024e7a9a 100644 ---- a/backend/qemu.pm -+++ b/backend/qemu.pm -@@ -792,7 +792,10 @@ sub start_qemu { - } - - if ($arch_supports_boot_order) { -- if ($vars->{PXEBOOT}) { -+ if ($vars->{PXEBOOT} eq 'once') { -+ sp("boot", "once=n"); -+ } -+ elsif ($vars->{PXEBOOT}) { - sp("boot", "n"); - } - elsif ($vars->{BOOTFROM}) { -diff --git a/doc/backend_vars.asciidoc b/doc/backend_vars.asciidoc -index cd8b9345..746e74e0 100644 ---- a/doc/backend_vars.asciidoc -+++ b/doc/backend_vars.asciidoc -@@ -78,7 +78,7 @@ OFW;boolean;0;QEMU Open Firmware is in use - QEMU_OVERRIDE_VIDEO_DEVICE_AARCH64;boolean;undef;If set, for aarch64 systems use VGA as video adapter - QEMU_DISABLE_SNAPSHOTS;boolean;undef;If set, disable snapshots in case the worker has slow disks to avoid save_vm calls failing due to timeouts (See https://bugzilla.suse.com/show_bug.cgi?id=1035453[bsc#1035453]) - PATHCNT;integer;2;Number of paths in MULTIPATH scenario --PXEBOOT;boolean;0;Boot VM from network -+PXEBOOT;boolean or 'once';0;Boot VM from network, on every boot or only once if set to 'once' - QEMU;QEMU binary filename;undef;Filename of QEMU binary to use - QEMUCPU;see qemu -cpu ?;undef;CPU to emulate - QEMUCPUS;integer;1;Number of CPUs to assign to VM --- -2.23.0.rc2 - diff --git a/0001-Factor-out-click-functionality-from-assert_and_click.patch b/0001-Factor-out-click-functionality-from-assert_and_click.patch deleted file mode 100644 index 840d2f3..0000000 --- a/0001-Factor-out-click-functionality-from-assert_and_click.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 0ab60ea381f3aeea5426e4a6aed5db7453216045 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Sat, 31 Aug 2019 13:01:49 +0200 -Subject: [PATCH] Factor out click functionality from assert_and_click - -There are two cases where the fixed combination of assert_screen with -the click functionality is problematic: - -1. Multiple needles, where only some need/support clicking. This is - typically solved with a combination of assert_screen + match_has_tag + - assert_and_click. This is wasteful, as it checks twice for the same - needle. - -2. Repeated assert_and_click due to lost events. As it is impossible to - know if an event was lost or just handled late, the repeated - assert_and_click may encounter the just changed screen contents. - -Splitting the click allows to do it conditionally, i.e. for (1.), just -replacing the assert_and_click by click_lastmatch, and for (2.), by using -something like: -``` -assert_and_click(needle); -while(1) { - assert_screen([needle, after]); - last if match_has_tag(after); - click_lastmatch; -} -``` -For a sequence of clicks, the "after" can specify the coordinates for -the next click. ---- - OpenQA/Isotovideo/Interface.pm | 2 +- - testapi.pm | 33 +++++++++++++++++++++++++++++---- - 2 files changed, 30 insertions(+), 5 deletions(-) - -diff --git a/OpenQA/Isotovideo/Interface.pm b/OpenQA/Isotovideo/Interface.pm -index 2bed4988..8ec5e37c 100644 ---- a/OpenQA/Isotovideo/Interface.pm -+++ b/OpenQA/Isotovideo/Interface.pm -@@ -22,7 +22,7 @@ use warnings; - # -> increment on every change of such APIs - # -> never move that variable to another place (when refactoring) - # because it may be accessed by the tests itself --our $version = 16; -+our $version = 17; - - # major version of the (web socket) API relevant to the developer mode - # -> increment when making non-backward compatible changes to that API -diff --git a/testapi.pm b/testapi.pm -index b6b60e98..a7c0da5b 100755 ---- a/testapi.pm -+++ b/testapi.pm -@@ -47,7 +47,7 @@ our @EXPORT = qw($realname $username $password $serialdev %cmd %vars - - assert_screen check_screen assert_and_dclick save_screenshot - assert_and_click mouse_hide mouse_set mouse_click -- mouse_dclick mouse_tclick match_has_tag -+ mouse_dclick mouse_tclick match_has_tag click_lastmatch - - assert_script_run script_run assert_script_sudo script_sudo - script_output validate_script_output -@@ -482,14 +482,39 @@ Throws C exception if C<$timeout> timeout is hit. Default timeout - - sub assert_and_click { - my ($mustmatch, %args) = @_; -- $args{timeout} //= $bmwqemu::default_timeout; -+ $args{timeout} //= $bmwqemu::default_timeout; -+ -+ $last_matched_needle = assert_screen($mustmatch, $args{timeout}); -+ bmwqemu::log_call(mustmatch => $mustmatch, %args); -+ -+ my %click_args = map { $_ => $args{$_} } qw(button dclick mousehide); -+ return click_lastmatch(%click_args); -+} -+ -+=head2 click_lastmatch -+ -+ click_lastmatch([, button => $button] [, clicktime => $clicktime ] [, dclick => 1 ] [, mousehide => 1 ]); -+ -+Click C<$button> at the "click_point" position as defined in the needle JSON file -+of the last matched needle, or - if the JSON has not explicit "click_point" - -+in the middle of the last match area. If C<$dclick> is set, do double click -+instead. Supported values for C<$button> are C<'left'> and C<'right'>, C<'left'> -+is the default. If C<$mousehide> is true then always move mouse to the 'hidden' -+position after clicking to prevent to disturb the area where user wants to -+assert/click in second step, otherwise move the mouse back to its previous -+position. -+ -+=cut -+ -+sub click_lastmatch { -+ my %args = @_; - $args{button} //= 'left'; - $args{dclick} //= 0; - $args{mousehide} //= 0; - -- $last_matched_needle = assert_screen($mustmatch, $args{timeout}); -+ return unless $last_matched_needle; -+ - my $old_mouse_coords = query_isotovideo('backend_get_last_mouse_set'); -- bmwqemu::log_call(mustmatch => $mustmatch, %args); - - # determine click coordinates from the last area which has those explicitly specified - my $relevant_area; --- -2.23.0 - diff --git a/0001-VNC-reverse-key-order-when-sending-key-up-events.patch b/0001-VNC-reverse-key-order-when-sending-key-up-events.patch deleted file mode 100644 index 8e032a3..0000000 --- a/0001-VNC-reverse-key-order-when-sending-key-up-events.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 66138b4e5f308cb0a9e93faa8aebf893a30f35ec Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Fri, 5 Jul 2019 15:06:55 -0700 -Subject: [PATCH] VNC: reverse key order when sending key up events - -When map_and_send_key maps an input to multiple key presses - -e.g. a ':' requires a press of shift and a press of ';', or -when dealing with any input like "ctrl-t" - it gets an array, -sends a 'down' event for each key in the array, then sends an -'up' event for each key in the array. So for our ctrl-t example -it does this: - -ctrl down -t down -ctrl up -t up - -This is a bit odd and not how humans normally type. Humans -would normally hold the modifier key, press and release any -modified keys they want to press, then release the modifier. -I've run into one issue previously where this caused a problem, -which was ultimately fixed in qemu so that os-autoinst's unusual -key event order worked OK. Now I've run into another: - -https://bugzilla.redhat.com/show_bug.cgi?id=1727388 - -All the details of that bug are still not worked out, but today -I *did* work out that changing this key press order avoids that -bug. By simply reversing the array for the key up events, so we -do this instead: - -ctrl down -t down -t up -ctrl up - -The bug stops happening. Since it's triggered two bugs now, and -as I said it does not map to how humans type, I think we should -really go ahead and change this. - -Signed-off-by: Adam Williamson ---- - consoles/VNC.pm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/consoles/VNC.pm b/consoles/VNC.pm -index 8eaefe0a..2dfc7a38 100644 ---- a/consoles/VNC.pm -+++ b/consoles/VNC.pm -@@ -759,7 +759,7 @@ sub map_and_send_key { - } - usleep(2_000); - if (!defined $down_flag || $down_flag == 0) { -- for my $key (@events) { -+ for my $key (reverse @events) { - $self->send_key_event_up($key); - } - } --- -2.22.0 - diff --git a/1199-edited.patch b/1199-edited.patch deleted file mode 100644 index 5ecf2f2..0000000 --- a/1199-edited.patch +++ /dev/null @@ -1,166 +0,0 @@ -From f4be85471d4b9a555233f3cfc6ddaa9eb4b49a13 Mon Sep 17 00:00:00 2001 -From: Tina Mueller -Date: Wed, 14 Aug 2019 18:58:22 +0200 -Subject: [PATCH] Improve result display of validate_script_output - -See also https://progress.opensuse.org/issues/54548 - -Before the output showed: - - # wait_serial expected: (whatever the output was) - - # Result: - (whatever the output was) - -"wait_serial" is wrong here, and it showed the actual output twice. - -Now it shows: - - validate_script_output got: - (whatever the output was) - - Check function (deparsed code): - { - package your::test::package; - /some.*regex/; - } - -* Also validate_script_output() can now take a simple regular expression qr/foo/ - instead of a coderef. - -* Add explicit return statement to make current behaviour transparent ---- - cpanfile | 1 + - dist/rpm/os-autoinst.spec | 2 +- - t/03-testapi.t | 7 +++++ - testapi.pm | 55 ++++++++++++++++++++++++++++++--------- - 4 files changed, 52 insertions(+), 13 deletions(-) - -diff --git a/cpanfile b/cpanfile -index 4b8e68592..da23f89d4 100644 ---- a/cpanfile -+++ b/cpanfile -@@ -1,3 +1,4 @@ -+requires 'B::Deparse'; - requires 'Carp'; - requires 'Carp::Always'; - requires 'Class::Accessor::Fast'; -diff --git a/t/03-testapi.t b/t/03-testapi.t -index e893c1ddc..63aab9aca 100755 ---- a/t/03-testapi.t -+++ b/t/03-testapi.t -@@ -489,6 +489,7 @@ subtest 'validate_script_output' => sub { - my $mock_testapi = Test::MockModule->new('testapi'); - $mock_testapi->mock(script_output => sub { return 'output'; }); - ok(!validate_script_output('script', sub { m/output/ }), 'validating output with default timeout'); -+ ok(!validate_script_output('script', qr/output/), 'validating output with regex and default timeout'); - ok(!validate_script_output('script', sub { m/output/ }, 30), 'specifying timeout'); - like( - exception { -@@ -496,6 +497,12 @@ subtest 'validate_script_output' => sub { - }, - qr/output not validating/ - ); -+ like( -+ exception { -+ validate_script_output('script', ['Invalid parameter']); -+ }, -+ qr/coderef or regexp/ -+ ); - }; - - subtest 'wait_still_screen' => sub { -diff --git a/testapi.pm b/testapi.pm -index 1b36c73cc..b5bdb4abc 100755 ---- a/testapi.pm -+++ b/testapi.pm -@@ -33,7 +33,8 @@ use OpenQA::Isotovideo::NeedleDownloader; - use Digest::MD5 'md5_base64'; - use Carp qw(cluck croak); - use MIME::Base64 'decode_base64'; --use Scalar::Util 'looks_like_number'; -+use Scalar::Util qw(looks_like_number reftype); -+use B::Deparse; - - require bmwqemu; - use constant OPENQA_LIBPATH => '/usr/share/openqa/lib'; -@@ -1117,20 +1118,23 @@ sub get_test_data { - - =head2 validate_script_output - -- validate_script_output($script, $code [, timeout => $timeout] [,quiet => $quiet]) -+ validate_script_output($script, $code | $regexp [, timeout => $timeout] [,quiet => $quiet]) - - Deprecated mode - - validate_script_output($script, $code, [$wait]) - --Wrapper around script_output, that runs a callback on the output. Use it as -+Wrapper around script_output, that runs a callback on the output, or -+alternatively matches a regular expression. Use it as - -- validate_script_output "cat /etc/hosts", sub { m/127.*localhost/ } -+ validate_script_output "cat /etc/hosts", sub { m/127.*localhost/ }; -+ validate_script_output "cat /etc/hosts", qr/127.*localhost/; -+ validate_script_output "cat /etc/hosts", sub { $_ !~ m/987.*somehost/ }; - - =cut - - sub validate_script_output { -- my ($script, $code) = splice(@_, 0, 2); -+ my ($script, $check) = splice(@_, 0, 2); - my %args = compat_args( - { - timeout => 30, -@@ -1140,17 +1144,44 @@ sub validate_script_output { - my $output = script_output($script, %args); - my $res = 'ok'; - -- # set $_ so the callbacks can be simpler code -- $_ = $output; -- if (!$code->()) { -- $res = 'fail'; -- bmwqemu::diag("output does not pass the code block:\n$output"); -+ my $message = ''; -+ if (reftype $check eq 'CODE') { -+ # set $_ so the callbacks can be simpler code -+ $_ = $output; -+ if (!$check->()) { -+ $res = 'fail'; -+ bmwqemu::diag("output does not pass the code block:\n$output"); -+ } -+ my $deparse = B::Deparse->new("-p"); -+ # avoid "use strict; use warnings" in the output to make it shorter -+ $deparse->ambient_pragmas(warnings => [], strict => "all"); -+ -+ my $body = $deparse->coderef2text($check); -+ -+ $message = sprintf -+ "validate_script_output got:\n%s\n\nCheck function (deparsed code):\n%s", -+ $output, $body; -+ } -+ elsif (reftype $check eq 'REGEXP') { -+ if ($output !~ $check) { -+ $res = 'fail'; -+ bmwqemu::diag("output does not match the regex:\n$output"); -+ } -+ $message = sprintf -+ "validate_script_output got:\n%s\n\nRegular expression:\n%s", -+ $output, $check; -+ } -+ else { -+ croak "Invalid use of validate_script_output(), second arg must be a coderef or regexp"; - } -- # abusing the function -- $autotest::current_test->record_serialresult($output, $res, $output) unless ($args{quiet}); -+ $autotest::current_test->record_resultfile( -+ 'validate_script_output', $message, -+ result => $res, -+ ); - if ($res eq 'fail') { - croak "output not validating"; - } -+ return 0; - } - - =head2 become_root diff --git a/os-autoinst.spec b/os-autoinst.spec index 073ff5f..e327750 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -27,98 +27,50 @@ %global github_owner os-autoinst %global github_name os-autoinst -%global github_version 4.5 -%global github_commit 3391d604ae36c0db0cda1d38f170137aef486a0c +%global github_version 4.6 +%global github_commit 447dab862096c5fb871fe06f61c3e5249ec0d5c1 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20190807 +%global github_date 20191029 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 26%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 1%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ URL: https://os-autoinst.github.io/openQA/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz +# diff from SUSE: added perl(ExtUtils::MakeMaker) and perl(ExtUtils::Embed) +# which I've found necessary before +%define build_requires autoconf automake gcc-c++ libtool pkgconfig(opencv) pkg-config perl(ExtUtils::MakeMaker) perl(ExtUtils::Embed) perl(Module::CPANfile) pkgconfig(fftw3) pkgconfig(libpng) pkgconfig(sndfile) pkgconfig(theoraenc) make +# diff from SUSE: dropped perl-base which does not exist in Fedora, we have +# the perl(:MODULE_COMPAT) require below +%define requires perl(B::Deparse) perl(Mojolicious) >= 7.92, perl(Mojo::IOLoop::ReadWriteProcess) >= 0.23, perl(Carp::Always) perl(Data::Dump) perl(Data::Dumper) perl(Crypt::DES) perl(JSON) perl(autodie) perl(Class::Accessor::Fast) perl(Exception::Class) perl(File::Touch) perl(File::Which) perl(IPC::Run::Debug) perl(Net::DBus) perl(Net::SNMP) perl(Net::IP) perl(IPC::System::Simple) perl(Net::SSH2) perl(XML::LibXML) perl(XML::SemanticDiff) perl(JSON::XS) perl(List::MoreUtils) perl(Mojo::IOLoop::ReadWriteProcess) perl(Socket::MsgHdr) perl(Cpanel::JSON::XS) perl(IO::Scalar) perl(Try::Tiny) +%define requires_not_needed_in_tests git-core +# all requirements needed by the tests, do not require on this in the package +# itself or any sub-packages +# diff from SUSE: added perl(Test::Mojo) and perl(Test::More), replaced +# qemu-tools with qemu-img, added /usr/bin/qemu-system-i386 which +# 'fullstack' and 'qemu-options' tests use on all arches (SUSE has +# these disabled as qemu can't run in OBS apparently) +%define test_requires %build_requires %requires perl(Perl::Tidy) perl(Test::Compile) >= 1.1.0, perl(Test::Exception) perl(Test::Mojo) perl(Test::More) perl(Test::Output) perl(Test::Fatal) perl(Test::Warnings) perl(Pod::Coverage) perl(Test::Pod) perl(Test::MockModule) perl(Test::MockObject) perl(Devel::Cover) perl(Test::Mock::Time) /usr/bin/qemu-img /usr/bin/qemu-system-i386 +%define devel_requires %test_requires %requires_not_needed_in_tests -# https://github.com/os-autoinst/os-autoinst/pull/1202 -# Handle PXE boot only once with 'PXEBOOT=once' -Patch0: 0001-Allow-special-value-once-for-PXEBOOT-to-PXE-boot.onc.patch -# https://github.com/os-autoinst/os-autoinst/pull/1199 -# Improve validate_script_output result display -# spec file block dropped as it doesn't apply and doesn't matter -Patch1: 1199-edited.patch -# Useful new feature from upstream we want to use in a test -# drop next time we bump git snapshot -Patch2: 0001-Factor-out-click-functionality-from-assert_and_click.patch - -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gcc-c++ -BuildRequires: libtool -BuildRequires: opencv-devel BuildRequires: perl-devel BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::MakeMaker) -BuildRequires: perl(ExtUtils::Embed) -BuildRequires: perl(Module::CPANfile) -BuildRequires: perl(Perl::Critic) -BuildRequires: perl(Perl::Tidy) -BuildRequires: perl(Pod::Html) -BuildRequires: pkgconfig -BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(fftw3) -BuildRequires: pkgconfig(sndfile) -BuildRequires: pkgconfig(theoraenc) BuildRequires: systemd -BuildRequires: perl(Devel::Cover) -BuildRequires: perl(Pod::Coverage) -# The OO interface to Test::Compile only appeared in 1.1.0 -BuildRequires: perl(Test::Compile) >= 1.1.0 -BuildRequires: perl(Test::Exception) -BuildRequires: perl(Test::Fatal) -BuildRequires: perl(Test::MockModule) -BuildRequires: perl(Test::Mock::Time) -BuildRequires: perl(Test::Mojo) -BuildRequires: perl(Test::More) -BuildRequires: perl(Test::Output) -BuildRequires: perl(Test::Pod) -BuildRequires: perl(Test::Warnings) -BuildRequires: perl(Try::Tiny) -BuildRequires: /usr/bin/qemu-img -# 'fullstack' and 'qemu-options' tests use this (even on other arches) -BuildRequires: /usr/bin/qemu-system-i386 %if 0%{?no_fullstack} %else BuildRequires: perl(Mojo::File) %endif # no_fullstack -Requires: /usr/bin/qemu-img -Requires: optipng # tinycv is a compiled public module, so we should have this Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: qemu >= 2.0.0 -Requires: qemu-kvm Recommends: tesseract -# Not really needed, but you get non-fatal error messages in test -# logs without it: https://bugzilla.redhat.com/show_bug.cgi?id=1467086 -Recommends: git -# these are both runtime and test requires. For Fedora, we get auto -# Requires: for most of them, but we'd still have to add BuildRequires, -# so we may as well follow the SUSE spec's approach here to make it -# easier to resync with SUSE's spec... -%define t_requires perl(B::Deparse) perl(Carp::Always) perl(Data::Dump) perl(Data::Dumper) perl(Crypt::DES) perl(JSON) perl(autodie) perl(Class::Accessor::Fast) perl(Exception::Class) perl(File::Touch) perl(File::Which) perl(IPC::Run::Debug) perl(Net::DBus) perl(Net::SNMP) perl(Net::IP) perl(IPC::System::Simple) perl(Net::SSH2) perl(XML::LibXML) perl(XML::SemanticDiff) perl(JSON::XS) perl(List::MoreUtils) perl(Socket::MsgHdr) perl(Cpanel::JSON::XS) perl(IO::Scalar) -# [note from openSUSE spec regarding JSON::XS dependency]: -# we shuffle around a lot of JSON, so make sure this is fast -# and the JSON modules have subtle differences and we only test against XS in production -# [adamw note]: fullstack test fails with JSON:PP -BuildRequires: %{t_requires} -Requires: %{t_requires} -# specifically versioned things that would otherwise be in t_requires -BuildRequires: perl(Mojolicious) >= 7.92 -Requires: perl(Mojolicious) >= 7.92 -BuildRequires: perl(Mojo::IOLoop::ReadWriteProcess) >= 0.23 -Requires: perl(Mojo::IOLoop::ReadWriteProcess) >= 0.23 -#Recommends: eatmydata /usr/bin/multimon +Recommends: qemu >= 2.0.0 +Recommends: qemu-kvm +Recommends: /usr/bin/qemu-img +BuildRequires: %test_requires +Requires: %requires %requires_not_needed_in_tests Requires(pre): %{_bindir}/getent Requires(pre): %{_sbindir}/useradd @@ -130,6 +82,13 @@ upgrade, which can not easily and safely be tested with other automated testing frameworks. However, it can just as well be used to test applications on top of a newly installed OS. +%package devel +Summary: Development package pulling in all build+test dependencies +Requires: %devel_requires + +%description devel +Development package pulling in all build+test dependencies. + %package openvswitch Summary: Open vSwitch support for os-autoinst Requires: openvswitch @@ -144,6 +103,8 @@ This package contains Open vSwitch support for os-autoinst. %prep %autosetup -n %{github_name}-%{github_commit} -p1 +# Replace version number from git to what's reported by the package +sed -i 's/ my $thisversion = qx{git.*rev-parse HEAD}.*;/ my $thisversion = "%{version}";/' isotovideo %if 0%{?no_fullstack} rm -f t/99-full-stack.t sed -i -e 's, 99-full-stack.t,,g' t/Makefile.am @@ -168,13 +129,9 @@ make INSTALLDIRS=vendor %{?_smp_mflags} %install %make_install INSTALLDIRS=vendor -# Replace version number from git to what's reported by the package -sed -i 's/ my $thisversion = qx{git rev-parse HEAD};/ my $thisversion = "%{version}-%{release}";/' %{buildroot}%{_bindir}/isotovideo # only internal stuff -rm %{buildroot}%{_libexecdir}/os-autoinst/tools/tidy +rm %{buildroot}%{_libexecdir}/os-autoinst/tools/{tidy,check_coverage,absolutize} rm -r %{buildroot}%{_libexecdir}/os-autoinst/tools/lib/perlcritic -rm %{buildroot}%{_libexecdir}/os-autoinst/tools/absolutize -rm %{buildroot}%{_libexecdir}/os-autoinst/tools/check_coverage # we don't really need to ship this in the package, usually the web UI # is much better for needle editing rm %{buildroot}%{_libexecdir}/os-autoinst/crop.py* @@ -190,10 +147,11 @@ find %{buildroot} -depth -type d -and -not -name distri -exec rmdir {} \; export NO_BRP_STALE_LINK_ERROR=yes %check -# there's no point in checking code style at package build time, -# and different versions of 'tidy' have different opinions so the -# same code can pass for one Fedora release but fail for another -sed -i -e '/tidy --check/d' Makefile +# disable code quality checks - not worth the time for package builds +sed '/perlcritic/d' -i Makefile +sed '/Perl::Critic/d' -i cpanfile +sed '/tidy/d' -i Makefile +rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm make check VERBOSE=1 %post openvswitch @@ -243,6 +201,10 @@ make check VERBOSE=1 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %changelog +* Wed Oct 30 2019 Adam Williamson - 4.6-1.20191029git447dab86 +- Bump to latest upstream git snapshot (new version 4.6 declared) +- Resync spec with upstream + * Sat Oct 19 2019 Adam Williamson - 4.5-26.20190806git3391d60 - Backport 'click_lastmatch' feature from upstream git master diff --git a/sources b/sources index b97a2be..83fabfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-3391d604ae36c0db0cda1d38f170137aef486a0c.tar.gz) = 934667774fbdb06b89e760ae907a9000e00d5ecfe67346c9c6a6510d8fad8cd911e92b839a6b83e6eaa23c8fe8a736765243d339edc693cb08804501d61fb962 +SHA512 (os-autoinst-447dab862096c5fb871fe06f61c3e5249ec0d5c1.tar.gz) = d4031440eaa56aa3b820b75e22228c5ddf332f4be290f5cbc3f02ea4396ad7666f07f9c3342e4d662331a847979eb2f4d00ea024ea919b8ee23f66a7973322a1