From 7f196d4dd626a1567159839f8f43c4191d64db87 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 13 Apr 2016 23:43:30 -0700 Subject: [PATCH] bump to recent git snapshot to go with openQA bump --- .gitignore | 1 + ...-than-fprintf-to-avoid-format-not-a-.patch | 53 ------------------- needles-in-dirs.patch | 43 --------------- os-autoinst.spec | 38 ++++++------- sources | 2 +- 5 files changed, 19 insertions(+), 118 deletions(-) delete mode 100644 0001-use-fputs-rather-than-fprintf-to-avoid-format-not-a-.patch delete mode 100644 needles-in-dirs.patch diff --git a/.gitignore b/.gitignore index ebf5907..397bb79 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz +/os-autoinst-ff760a31dbdd8a96bd92683bd5ff45633ee149cd.tar.gz diff --git a/0001-use-fputs-rather-than-fprintf-to-avoid-format-not-a-.patch b/0001-use-fputs-rather-than-fprintf-to-avoid-format-not-a-.patch deleted file mode 100644 index 0eae7c3..0000000 --- a/0001-use-fputs-rather-than-fprintf-to-avoid-format-not-a-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 97546a9336a1de2f9e6bd6c20dd6f54756ede02e Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 14 Jan 2016 18:28:36 -0800 -Subject: [PATCH] use fputs rather than fprintf to avoid 'format not a literal' - -These three identical lines cause the infamous 'format not a -string literal and no format arguments' warning in GCC. On -many distros (including Fedora) the default compile flags for -packages turn this warning into an error. - -I don't think there's a real problem here, because ERR_NOT_ -ENOUGH_MEMORY is a constant defined in the code. But we should -avoid triggering the warning/error in any case. - -https://fedoraproject.org/wiki/Format-Security-FAQ ---- - snd2png/snd2png.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/snd2png/snd2png.cpp b/snd2png/snd2png.cpp -index 0ca7142..d95857e 100644 ---- a/snd2png/snd2png.cpp -+++ b/snd2png/snd2png.cpp -@@ -89,7 +89,7 @@ main (int argc, char *argv[]) - info_in.channels); - if (!infile_data) - { -- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY); -+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr); - sf_close (fIn); - return 2; - } -@@ -118,7 +118,7 @@ main (int argc, char *argv[]) - double *fftw_in = (double *) fftw_malloc (sizeof (double) * nDftSamples); - if (!fftw_in) - { -- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY); -+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr); - return 2; - } - -@@ -127,7 +127,7 @@ main (int argc, char *argv[]) - (fftw_complex *) fftw_malloc (sizeof (fftw_complex) * nDftSamples); - if (!fftw_out) - { -- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY); -+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr); - sf_close (fIn); - return 2; - } --- -2.7.0 - diff --git a/needles-in-dirs.patch b/needles-in-dirs.patch deleted file mode 100644 index 927f96c..0000000 --- a/needles-in-dirs.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/basetest.pm b/basetest.pm -index 8a05ceb..dac0ef1 100755 ---- a/basetest.pm -+++ b/basetest.pm -@@ -106,6 +106,7 @@ sub record_screenmatch { - screenshot => sprintf("%s-%d.png", $testname, $count), - result => 'ok', - properties => [@$properties], -+ json => $h->{json}, - }; - - # When the needle has the workaround property, -@@ -155,9 +156,10 @@ sub _serialize_match { - my $candidates; - my $diffcount = 0; - -- my $name = $cand->{needle}->{name}; -+ my $name = $cand->{needle}->{name}; -+ my $jsonfile = $cand->{needle}->{file}; - -- my $h = {name => $name, error => $cand->{error}, area => []}; -+ my $h = {name => $name, error => $cand->{error}, area => [], json => $jsonfile}; - for my $a (@{$cand->{area}}) { - my $na = {}; - for my $i (qw/x y w h result/) { -diff --git a/needle.pm b/needle.pm -index e9da38b..fdb8e85 100755 ---- a/needle.pm -+++ b/needle.pm -@@ -37,7 +37,7 @@ sub new { - my $json; - if (ref $jsonfile eq 'HASH') { - $json = $jsonfile; -- $jsonfile = join('/', $needledir, $json->{name} . '.json'); -+ $jsonfile = $json->{file} || join('/', $needledir, $json->{name} . '.json'); - } - else { - local $/; -@@ -238,4 +238,3 @@ sub all { - 1; - - # vim: set sw=4 et: -- diff --git a/os-autoinst.spec b/os-autoinst.spec index 3a6ee9a..81d3845 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -18,34 +18,25 @@ # them to the perl vendor dir, but they wouldn't bite. # https://github.com/os-autoinst/os-autoinst/issues/387 %global __provides_exclude_from %{_libexecdir}/os-autoinst -%global __requires_exclude perl\\((autotest|backend|basetest|bmwqemu|commands|consoles|cv|distribution|lockapi|mmapi|needle|ocr|testapi) +%global __requires_exclude perl\\((autotest|backend|basetest|bmwqemu|commands|consoles|cv|distribution|lockapi|mmapi|needle|ocr|testapi|OpenQA::Exceptions) %{?perl_default_filter} %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.3 -%global github_commit 8b5f22e8a84cc12b3ab8b24992fbb601048adc1b +%global github_commit ff760a31dbdd8a96bd92683bd5ff45633ee149cd # if set, will be a post-release snapshot build, otherwise a 'normal' build -#global github_date 20150423 +%global github_date 20160408 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 6%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 7%{?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 'format not a literal' warnings in snd2png -# https://github.com/os-autoinst/os-autoinst/pull/386 -Patch0: 0001-use-fputs-rather-than-fprintf-to-avoid-format-not-a-.patch -# Backport: allow needles to be in nested directories -# NOTE: rebased to 4.3 (by jskladan) -# https://github.com/os-autoinst/os-autoinst/commit/e703c755c80a244949f3dcb213d7646b28b25992 -# https://github.com/os-autoinst/os-autoinst/commit/1e4296de4c9d96ec65bbc30bb2677df7803470fe -# https://github.com/os-autoinst/os-autoinst/commit/3b8e9fe7dbcb4bdf15d9c5d291875393db190067 -Patch1: needles-in-dirs.patch BuildRequires: autoconf BuildRequires: automake @@ -66,7 +57,11 @@ BuildRequires: pkgconfig(theoraenc) BuildRequires: systemd %if 0%{?with_tests} # The OO interface to Test::Compile only appeared in 1.1.0 +BuildRequires: perl(Pod::Coverage) BuildRequires: perl(Test::Compile) >= 1.1.0 +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::Output) +BuildRequires: perl(Test::Pod) %endif # with_tests Requires: /usr/bin/qemu-img Requires: optipng @@ -80,11 +75,15 @@ Requires: withlock # 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(Carp::Always) perl(Data::Dump) perl(Crypt::DES) perl(JSON) perl(Class::Accessor::Fast) 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(autodie) +%define t_requires perl(Carp::Always) perl(Data::Dump) perl(Crypt::DES) perl(JSON) perl(autodie) perl(Class::Accessor::Fast) perl(Exception::Class) 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) BuildRequires: %{t_requires} Requires: %{t_requires} BuildRequires: perl(Mojolicious) Requires: perl(Mojolicious) >= 5.60 +# [note from openSUSE spec]: +# 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 +Requires: perl(JSON::XS) #Recommends: eatmydata /usr/bin/multimon Requires(pre): %{_bindir}/getent Requires(pre): %{_sbindir}/useradd @@ -130,8 +129,6 @@ rm %{buildroot}%{_libexecdir}/os-autoinst/crop.py* rm %{buildroot}%{_pkgdocdir}/COPYING # This is no use for package users rm %{buildroot}%{_pkgdocdir}/INSTALL.asciidoc -# Pretty sure we don't need this, rpmlint complains -rm %{buildroot}%{_libexecdir}/os-autoinst/distri/.gitignore ls -lR %buildroot find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -depth -type d -and -not -name distri -exec rmdir {} \; @@ -154,7 +151,6 @@ make check VERBOSE=1 %systemd_postun_with_restart os-autoinst-openvswitch.service %files -%{!?_licensedir:%global license %doc} %{_pkgdocdir} %license COPYING %{perl_vendorarch}/tinycv.pm @@ -163,7 +159,6 @@ make check VERBOSE=1 %{_libexecdir}/os-autoinst/videoencoder %{_libexecdir}/os-autoinst/basetest.pm # -%{_libexecdir}/os-autoinst/distri %{_libexecdir}/os-autoinst/dmidata # %{_libexecdir}/os-autoinst/bmwqemu.pm @@ -176,6 +171,7 @@ make check VERBOSE=1 %{_libexecdir}/os-autoinst/ocr.pm %{_libexecdir}/os-autoinst/needle.pm %{_libexecdir}/os-autoinst/backend +%{_libexecdir}/os-autoinst/OpenQA %{_libexecdir}/os-autoinst/consoles %dir %{_libexecdir}/os-autoinst/tools %{_libexecdir}/os-autoinst/tools/absolutize @@ -185,15 +181,15 @@ make check VERBOSE=1 %{_bindir}/debugviewer %{_bindir}/snd2png -%dir %{_sysconfdir}/os-autoinst -%config(noreplace) %{_sysconfdir}/os-autoinst/kvm2usb.yml - %files openvswitch %{_libexecdir}/os-autoinst/os-autoinst-openvswitch %{_unitdir}/os-autoinst-openvswitch.service %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %changelog +* Fri Apr 08 2016 Adam Williamson - 4.3-7.20160408gitff760a3 +- bump to current git (to go along with openQA; patch load was getting huge) + * Thu Mar 31 2016 Adam Williamson - 4.3-6 - backport: allow needles to be in nested directories (jskladan) diff --git a/sources b/sources index d9e408e..b5eba04 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -873e07ea6532d7a92ab7df17e609ea89 os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz +710dc50c326eecf3e15db3a41a5465d5 os-autoinst-ff760a31dbdd8a96bd92683bd5ff45633ee149cd.tar.gz