From 011ae283a1a43037091d6c0174fe26c2d0e90cb9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 8 Jun 2020 17:15:52 -0700 Subject: [PATCH] Bump to latest git, resync spec with upstream --- .gitignore | 1 + ...-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.patch | 71 ------------------- os-autoinst.spec | 71 ++++++++++--------- sources | 2 +- 4 files changed, 41 insertions(+), 104 deletions(-) delete mode 100644 0001-Makefiles-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.patch diff --git a/.gitignore b/.gitignore index 387d823..450b363 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /os-autoinst-63af2f4f91cfad88712bd0773e0a236d6e3853ea.tar.gz /os-autoinst-50464d4e81fcac9dd36785ba88f69b489e4e99e7.tar.gz /os-autoinst-85fa4f12c1fb5bed7295791801085d32a69d4586.tar.gz +/os-autoinst-bcbc6c412cbd69ab461d5448f8bf08b5371a0adb.tar.gz diff --git a/0001-Makefiles-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.patch b/0001-Makefiles-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.patch deleted file mode 100644 index 158d8ff..0000000 --- a/0001-Makefiles-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 5a2c3ffa7264319c52f0dfd30bcff5f0a86ec01d Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Mon, 25 May 2020 12:08:23 -0700 -Subject: [PATCH] Makefiles: set CXXFLAGS not CFLAGS or CPPFLAGS - -CFLAGS is for C compilation. CPPFLAGS is for the preprocessor. -CXXFLAGS is for C++ compilation, which is what we're actually -trying to apply the flags to in all three cases. CPPFLAGS happen -to be applied to the compile stage as well as the preprocessor -usually, so CPPFLAGS was working, but it wasn't correct. CFLAGS -is not applied to C++ compiles, so `videoencoder_CFLAGS` was -not being used at all. - -This broke build on Fedora Rawhide, because /usr/include/opencv2 -no longer exists there. There is /usr/include/opencv4/opencv2 and -this should be fine because we should get -I/usr/include/opencv4 -from OPENCV_CFLAGS, but because of this bug, that wasn't set -correctly and the build failed. With this change it works. - -Thanks to Orion Poplowski for reminding me of the CPPFLAGS vs. -CXXFLAGS distinction here. - -Signed-off-by: Adam Williamson ---- - Makefile.am | 2 +- - debugviewer/Makefile.am | 2 +- - snd2png/Makefile.am | 3 +-- - 3 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 61dbe1d2..a5b4fbf2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -119,7 +119,7 @@ pkglibexec_FOLDERS = \ - pkglibexec_PROGRAMS = videoencoder - - videoencoder_SOURCES = videoencoder.cpp --videoencoder_CFLAGS = -O2 -Wall -W $(OPENCV_CFLAGS) -+videoencoder_CXXFLAGS = -O2 -Wall -W $(OPENCV_CFLAGS) - videoencoder_LDADD = $(OPENCV_LIBS) $(THEORAENC_LIBS) -lm - - EXTRA_DIST = \ -diff --git a/debugviewer/Makefile.am b/debugviewer/Makefile.am -index 47d1d953..eea1de60 100644 ---- a/debugviewer/Makefile.am -+++ b/debugviewer/Makefile.am -@@ -2,6 +2,6 @@ bin_PROGRAMS = debugviewer - - debugviewer_SOURCES = debugviewer.cpp - --AM_CPPFLAGS = $(OPENCV_CFLAGS) -+AM_CXXFLAGS = $(OPENCV_CFLAGS) - debugviewer_LDFLAGS = $(OPENCV_LIBS) - -diff --git a/snd2png/Makefile.am b/snd2png/Makefile.am -index 07bd084e..ec6f1840 100644 ---- a/snd2png/Makefile.am -+++ b/snd2png/Makefile.am -@@ -2,8 +2,7 @@ bin_PROGRAMS = snd2png - - snd2png_SOURCES = snd2png.cpp - --AM_CXXFLAGS = -g3 -Wall -W --AM_CPPFLAGS = $(OPENCV_CFLAGS) $(FFTW_CFLAGS) $(SNDFILE_CFLAGS) -+AM_CXXFLAGS = -g3 -Wall -W $(OPENCV_CFLAGS) $(FFTW_CFLAGS) $(SNDFILE_CFLAGS) - snd2png_LDFLAGS = $(OPENCV_LIBS) $(FFTW_LIBS) $(SNDFILE_LIBS) -lm - - check-local: --- -2.26.2 - diff --git a/os-autoinst.spec b/os-autoinst.spec index 796f724..3927ad9 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -31,58 +31,62 @@ %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.6 -%global github_commit 85fa4f12c1fb5bed7295791801085d32a69d4586 +%global github_commit bcbc6c412cbd69ab461d5448f8bf08b5371a0adb # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20200430 +%global github_date 20200608 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 14%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 15%{?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 -# https://github.com/os-autoinst/os-autoinst/pull/1419 -# https://bugzilla.redhat.com/show_bug.cgi?id=1839616 -# Fixes build when /usr/include/opencv2 compat symlink is removed -Patch0: 0001-Makefiles-set-CXXFLAGS-not-CFLAGS-or-CPPFLAGS.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 # cross-comparison %define opencv_require pkgconfig(opencv) # this is stuff we added to build_requires, we put it in its own macro -# to make resyncing with upstream spec changes easier. TODO: submit -# these upstream, at least ones that make sense for SUSE too. -%define build_requires_additional perl(ExtUtils::MakeMaker) perl(ExtUtils::Embed) +# to make resyncing with upstream spec changes easier. Upstream put +# MakeMaker in main_requires for some reason but it is clearly a build +# requirement: +# https://github.com/os-autoinst/os-autoinst/pull/1435 +# Pod::Html is needed to run pod2html as part of doc build, it used to +# be pulled in as a dep of Perl::Tidy but that's not explicitly listed +# in test_requires any more: +# https://github.com/os-autoinst/os-autoinst/pull/1437 +%define build_requires_additional perl(ExtUtils::MakeMaker) >= 7.12 perl(Pod::Html) # diff from SUSE: added build_requires_additional -%define build_requires %build_requires_additional %opencv_require autoconf automake gcc-c++ libtool make perl(Module::CPANfile) pkg-config pkgconfig(fftw3) pkgconfig(libpng) pkgconfig(sndfile) pkgconfig(theoraenc) +# The following line is generated from dependencies.yaml (upstream) +%define build_requires %build_requires_additional %opencv_require autoconf automake gcc-c++ libtool make perl(ExtUtils::Embed) perl(Module::CPANfile) pkg-config pkgconfig(fftw3) pkgconfig(libpng) pkgconfig(sndfile) pkgconfig(theoraenc) # this is stuff we added to requires, we put it in its own macro -# to make resyncing with upstream spec changes easier. These are all -# things ppisar added in afeb766c. TODO: submit these upstream, at -# least ones that make sense for SUSE too. -%define requires_additional perl(base) perl(Carp) perl(Cwd) perl(English) perl(Errno) perl(Fcntl) perl(File::Temp) perl(integer) perl(Mojo::JSON) perl(Mojo::Log) perl(POSIX) perl(Scalar::Util) perl(Socket) perl(strict) perl(Time::HiRes) perl(warnings) -# diff from SUSE: added requires_additional, dropped perl-base which -# does not exist in Fedora - we have perl(base) in requires_additional -# and the perl(:MODULE_COMPAT) require below -%define requires %requires_additional perl(B::Deparse) perl(Carp::Always) perl(Class::Accessor::Fast) perl(Cpanel::JSON::XS) perl(Crypt::DES) perl(Data::Dumper) perl(Exception::Class) perl(File::Touch) perl(File::Which) perl(IO::Scalar) perl(IO::Socket::INET) perl(IPC::Run::Debug) perl(IPC::System::Simple) perl(List::MoreUtils) perl(Mojolicious) >= 7.92 perl(Mojo::IOLoop::ReadWriteProcess) >= 0.23 perl(Net::DBus) perl(Net::IP) perl(Net::SNMP) perl(Net::SSH2) perl(Socket::MsgHdr) perl(Try::Tiny) perl(XML::LibXML) perl(XML::SemanticDiff) perl(autodie) +# to make resyncing with upstream spec changes easier. SUSE has +# perl-base, we have perl(base) +%define main_requires_additional perl(base) +# diff from SUSE: added main_requires_additional, dropped perl-base +# which does not exist in Fedora - we have perl(base) in +# main_requires_additional and the perl(:MODULE_COMPAT) require below, +# dropped perl(ExtUtils::MakeMaker) which should be in build_requires +# The following line is generated from dependencies.yaml (upstream) +%define main_requires %main_requires_additional perl(B::Deparse) perl(Carp) perl(Carp::Always) perl(Class::Accessor::Fast) perl(Config) perl(Cpanel::JSON::XS) perl(Crypt::DES) perl(Cwd) perl(Data::Dumper) perl(Digest::MD5) perl(DynaLoader) perl(English) perl(Errno) perl(Exception::Class) perl(Exporter) perl(ExtUtils::testlib) perl(Fcntl) perl(File::Basename) perl(File::Find) perl(File::Path) perl(File::Spec) perl(File::Temp) perl(File::Touch) perl(File::Which) perl(IO::Handle) perl(IO::Scalar) perl(IO::Select) perl(IO::Socket) perl(IO::Socket::INET) perl(IO::Socket::UNIX) perl(IPC::Open3) perl(IPC::Run::Debug) perl(IPC::System::Simple) perl(List::MoreUtils) perl(List::Util) perl(Mojo::IOLoop::ReadWriteProcess) >= 0.23 perl(Mojo::JSON) perl(Mojo::Log) perl(Mojo::URL) perl(Mojo::UserAgent) perl(Mojolicious) >= 8.42 perl(Mojolicious::Lite) perl(Net::DBus) perl(Net::IP) perl(Net::SNMP) perl(Net::SSH2) perl(POSIX) perl(Scalar::Util) perl(Socket) perl(Socket::MsgHdr) perl(Term::ANSIColor) perl(Thread::Queue) perl(Time::HiRes) perl(Try::Tiny) perl(XML::LibXML) perl(XML::SemanticDiff) perl(autodie) perl(base) perl(constant) perl(integer) perl(strict) perl(warnings) %define requires_not_needed_in_tests git-core # this is stuff we added to test_requires, we put it in its own macro -# to make resyncing with upstream spec changes easier. FindBin is one -# ppisar added in afeb766c, Test::Mojo and Test::More are just things -# the test suite uses which I added, we add qemu-system-i386 because -# the fullstack and qemu-options tests use it - we run them in Koji -# but SUSE disables them as they cannot run in OBS, so they don't have -# the requirement either. TODO: submit relevant changes upstream -%define test_requires_additional perl(FindBin) perl(Test::Mojo) perl(Test::More) /usr/bin/qemu-system-i386 +# to make resyncing with upstream spec changes easier. Since 7add21687 +# it seems tests fail unless git is installed: +# https://github.com/os-autoinst/os-autoinst/pull/1436 +%define test_requires_additional 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 test_requires_additional, replaced qemu-tools -# with qemu-img, dropped spell check requirement stuff as this isn't -# needed in package builds IMO -%define test_requires %test_requires_additional %build_requires %requires perl(Devel::Cover) perl(Perl::Tidy) perl(Pod::Coverage) perl(Test::Exception) perl(Test::Fatal) perl(Test::MockModule) perl(Test::MockObject) perl(Test::Mock::Time) perl(Test::Output) perl(Test::Pod) perl(Test::Strict) perl(Test::Warnings) /usr/bin/qemu-img -%define devel_requires %test_requires %requires_not_needed_in_tests +# with qemu-img, replaced qemu-x86 with qemu-system-i386, dropped spell +# check requirement stuff as this isn't needed in package builds IMO, +# dropped critic stuff as we don't run those tests in our build +# The following line is generated from dependencies.yaml +%define test_requires %test_requires_additional %build_requires %main_requires perl(Benchmark) perl(Devel::Cover) perl(FindBin) perl(Pod::Coverage) perl(Test::Exception) perl(Test::Fatal) perl(Test::Mock::Time) perl(Test::MockModule) perl(Test::MockObject) perl(Test::Mojo) perl(Test::More) perl(Test::Output) perl(Test::Pod) perl(Test::Strict) perl(Test::Warnings) >= 0.029 perl(YAML::PP) qemu-kvm /usr/bin/qemu-img /usr/bin/qemu-system-i386 +# The following line is generated from dependencies.yaml +%define devel_requires %requires_not_needed_in_tests %test_requires perl(Devel::Cover) perl(Devel::Cover::Report::Codecov) perl(Perl::Tidy) BuildRequires: perl-devel BuildRequires: perl-generators @@ -98,7 +102,7 @@ Recommends: qemu >= 2.0.0 Recommends: qemu-kvm Recommends: /usr/bin/qemu-img BuildRequires: %test_requires -Requires: %requires %requires_not_needed_in_tests +Requires: %main_requires %requires_not_needed_in_tests Requires(pre): %{_bindir}/getent Requires(pre): %{_sbindir}/useradd @@ -168,7 +172,7 @@ make INSTALLDIRS=vendor %{?_smp_mflags} %install %make_install INSTALLDIRS=vendor # only internal stuff -rm %{buildroot}%{_libexecdir}/os-autoinst/tools/{tidy,check_coverage,absolutize} +rm %{buildroot}%{_libexecdir}/os-autoinst/tools/{tidy,check_coverage,absolutize,docker_run_ci,update-deps} rm -r %{buildroot}%{_libexecdir}/os-autoinst/tools/lib/perlcritic # we don't really need to ship this in the package, usually the web UI # is much better for needle editing @@ -241,6 +245,9 @@ make check test VERBOSE=1 CHECK_DOC=0 %files devel %changelog +* Mon Jun 08 2020 Adam Williamson - 4.6-15.20200608gitbcbc6c41 +- Bump to latest git, resync spec with upstream + * Thu Jun 04 2020 Nicolas Chauvet - 4.6-14.20200430git85fa4f1 - Rebuilt for OpenCV 4.3 diff --git a/sources b/sources index 3ad082c..057c478 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-85fa4f12c1fb5bed7295791801085d32a69d4586.tar.gz) = d7c6cb7f6f7c3cf923e76a1f9e887abf451a68412bda2dfef05d510cc625ea758669510dd33ab736b30674ca6fb34f9f95be69e0334c3b683627e95ee67d39d9 +SHA512 (os-autoinst-bcbc6c412cbd69ab461d5448f8bf08b5371a0adb.tar.gz) = df061b71621139737a7dae934810cb44354cb2c635e8ef61c0cef1f02e8dfb0b4419f2c2018f4e60d596622ada1d5c63f3a54cf7e65f7be89954f50125cf8a42