2017-04-06 10:13:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package os-autoinst
|
|
|
|
#
|
2020-01-09 15:49:14 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2017-04-06 10:13:15 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-11 10:29:36 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-06 10:13:15 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: os-autoinst
|
2020-07-09 21:25:57 +02:00
|
|
|
Version: 4.6.1594300744.d68c85a3
|
2017-04-06 10:13:15 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: OS-level test automation
|
2018-05-28 02:19:28 +02:00
|
|
|
License: GPL-2.0-or-later
|
2017-04-06 10:13:15 +02:00
|
|
|
Group: Development/Tools/Other
|
2019-11-10 23:25:20 +01:00
|
|
|
URL: https://github.com/os-autoinst/os-autoinst
|
2017-04-06 10:13:15 +02:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2017-10-28 14:23:59 +02:00
|
|
|
%{perl_requires}
|
2020-01-14 07:49:40 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
# openSUSE Tumbleweed
|
2019-12-07 06:04:28 +01:00
|
|
|
%define opencv_require pkgconfig(opencv4)
|
2020-01-14 07:49:40 +01:00
|
|
|
%else
|
|
|
|
%define opencv_require pkgconfig(opencv)
|
2019-12-07 06:04:28 +01:00
|
|
|
%endif
|
2020-06-04 21:25:18 +02:00
|
|
|
# The following line is generated from dependencies.yaml
|
2020-06-11 21:25:24 +02:00
|
|
|
%define build_requires %opencv_require autoconf automake gcc-c++ libtool make perl(ExtUtils::Embed) perl(ExtUtils::MakeMaker) >= 7.12 perl(Module::CPANfile) perl(Pod::Html) pkg-config pkgconfig(fftw3) pkgconfig(libpng) pkgconfig(sndfile) pkgconfig(theoraenc)
|
2020-06-04 21:25:18 +02:00
|
|
|
# The following line is generated from dependencies.yaml
|
2020-07-09 21:25:57 +02:00
|
|
|
%define main_requires git-core 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.26 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(version) perl(warnings) perl-base
|
2019-09-17 13:08:27 +02:00
|
|
|
# all requirements needed by the tests, do not require on this in the package
|
|
|
|
# itself or any sub-packages
|
2019-11-16 06:04:03 +01:00
|
|
|
# SLE is missing spell check requirements
|
|
|
|
%if !0%{?is_opensuse}
|
2019-12-11 22:04:36 +01:00
|
|
|
%bcond_with spellcheck
|
|
|
|
%else
|
|
|
|
%bcond_without spellcheck
|
|
|
|
%endif
|
|
|
|
%if %{with spellcheck}
|
2020-06-04 21:25:18 +02:00
|
|
|
# The following line is generated from dependencies.yaml
|
|
|
|
%define spellcheck_requires aspell-en aspell-spell perl(Pod::Spell)
|
2019-12-11 22:04:36 +01:00
|
|
|
%define make_check_args %{nil}
|
2019-11-16 06:04:03 +01:00
|
|
|
%else
|
2019-12-11 22:04:36 +01:00
|
|
|
%define spellcheck_requires %{nil}
|
|
|
|
%define make_check_args CHECK_DOC=0
|
2019-11-16 06:04:03 +01:00
|
|
|
%endif
|
2020-06-04 21:25:18 +02:00
|
|
|
# The following line is generated from dependencies.yaml
|
2020-06-23 13:25:32 +02:00
|
|
|
%define test_requires %build_requires %main_requires %spellcheck_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 qemu-tools qemu-x86
|
2020-06-04 21:25:18 +02:00
|
|
|
# The following line is generated from dependencies.yaml
|
2020-06-11 21:25:24 +02:00
|
|
|
%define devel_requires %test_requires perl(Devel::Cover) perl(Devel::Cover::Report::Codecov) perl(Perl::Tidy)
|
2019-09-17 13:08:27 +02:00
|
|
|
BuildRequires: %test_requires
|
2020-06-09 13:25:09 +02:00
|
|
|
Requires: %main_requires
|
2018-05-28 02:19:28 +02:00
|
|
|
Recommends: tesseract-ocr
|
2017-04-06 10:13:15 +02:00
|
|
|
Recommends: /usr/bin/xkbcomp /usr/bin/Xvnc dumponlyconsole
|
2019-10-24 11:07:05 +02:00
|
|
|
Recommends: qemu >= 2.0.0
|
|
|
|
Recommends: /usr/bin/qemu-img
|
2017-04-06 10:13:15 +02:00
|
|
|
Requires(pre): %{_bindir}/getent
|
|
|
|
Requires(pre): %{_sbindir}/useradd
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The OS-autoinst project aims at providing a means to run fully
|
|
|
|
automated tests. Especially to run tests of basic and low-level
|
|
|
|
operating system components such as bootloader, kernel, installer
|
|
|
|
and upgrade, which can not easily and safely be tested with other
|
|
|
|
automated testing frameworks. However, it can just as well be used
|
|
|
|
to test firefox and openoffice operation on top of a newly
|
|
|
|
installed OS.
|
|
|
|
|
2019-07-16 10:27:46 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development package pulling in all build+test dependencies
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Requires: %devel_requires
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development package pulling in all build+test dependencies.
|
|
|
|
|
2017-04-06 10:13:15 +02:00
|
|
|
%package openvswitch
|
|
|
|
Summary: Openvswitch support for os-autoinst
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Requires: openvswitch
|
|
|
|
Requires: openvswitch-switch
|
|
|
|
Requires: os-autoinst
|
|
|
|
|
|
|
|
%description openvswitch
|
|
|
|
This package contains openvswitch support for os-autoinst.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2019-11-08 15:26:07 +01:00
|
|
|
sed -e 's,/bin/env python,/bin/python3,' -i crop.py
|
2019-09-17 13:08:27 +02:00
|
|
|
# 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
|
2017-04-06 10:13:15 +02:00
|
|
|
|
2019-10-14 11:24:15 +02:00
|
|
|
# don't require qemu within OBS
|
|
|
|
# and exclude known flaky tests in OBS check
|
|
|
|
# https://progress.opensuse.org/issues/52652
|
2019-12-09 14:04:25 +01:00
|
|
|
# 07-commands: https://progress.opensuse.org/issues/60755
|
|
|
|
for i in 07-commands 13-osutils 14-isotovideo 18-qemu-options 18-backend-qemu 99-full-stack; do
|
2019-10-14 11:24:15 +02:00
|
|
|
rm t/$i.t
|
2019-12-11 22:04:36 +01:00
|
|
|
sed -i "s/ \?$i\.t//g" Makefile.am
|
2019-10-14 11:24:15 +02:00
|
|
|
done
|
|
|
|
|
2017-04-06 10:13:15 +02:00
|
|
|
%build
|
|
|
|
mkdir -p m4
|
|
|
|
autoreconf -f -i
|
|
|
|
%configure --docdir=%{_docdir}/%{name}
|
|
|
|
make INSTALLDIRS=vendor %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install INSTALLDIRS=vendor
|
|
|
|
# only internal stuff
|
2020-06-11 21:25:24 +02:00
|
|
|
rm -r %{buildroot}/usr/lib/os-autoinst/tools/
|
|
|
|
|
2017-04-06 10:13:15 +02:00
|
|
|
ls -lR %buildroot
|
|
|
|
find %{buildroot} -type f -name .packlist -print0 | xargs -0 --no-run-if-empty rm -f
|
|
|
|
find %{buildroot} -depth -type d -and -not -name distri -print0 | xargs -0 --no-run-if-empty rmdir 2>/dev/null || true
|
|
|
|
%perl_gen_filelist
|
|
|
|
#
|
|
|
|
# service symlink
|
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
ln -s ../sbin/service %{buildroot}%{_sbindir}/rcos-autoinst-openvswitch
|
|
|
|
#
|
|
|
|
# we need the stale symlinks to point to git
|
|
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
|
|
|
|
|
|
|
%check
|
2017-12-18 19:32:47 +01:00
|
|
|
# disable code quality checks - not worth the time for package builds
|
2017-04-06 10:13:15 +02:00
|
|
|
sed '/perlcritic/d' -i Makefile
|
|
|
|
sed '/Perl::Critic/d' -i cpanfile
|
2017-12-18 19:32:47 +01:00
|
|
|
sed '/tidy/d' -i Makefile
|
|
|
|
|
2017-04-06 10:13:15 +02:00
|
|
|
# should work offline
|
|
|
|
for p in $(cpanfile-dump); do rpm -q --whatprovides "perl($p)"; done
|
2019-12-11 22:04:36 +01:00
|
|
|
make check test VERBOSE=1 %{make_check_args}
|
2017-04-06 10:13:15 +02:00
|
|
|
|
|
|
|
%pre openvswitch
|
|
|
|
%service_add_pre os-autoinst-openvswitch.service
|
|
|
|
|
|
|
|
%post openvswitch
|
|
|
|
%service_add_post os-autoinst-openvswitch.service
|
|
|
|
|
|
|
|
%preun openvswitch
|
|
|
|
%service_del_preun os-autoinst-openvswitch.service
|
|
|
|
|
|
|
|
%postun openvswitch
|
|
|
|
%service_del_postun os-autoinst-openvswitch.service
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_docdir}/os-autoinst
|
|
|
|
%dir %{_libexecdir}/os-autoinst
|
|
|
|
%{_libexecdir}/os-autoinst/videoencoder
|
|
|
|
%{_libexecdir}/os-autoinst/basetest.pm
|
|
|
|
#
|
|
|
|
%{_libexecdir}/os-autoinst/dmidata
|
|
|
|
#
|
|
|
|
%{_libexecdir}/os-autoinst/bmwqemu.pm
|
|
|
|
%{_libexecdir}/os-autoinst/commands.pm
|
|
|
|
%{_libexecdir}/os-autoinst/distribution.pm
|
|
|
|
%{_libexecdir}/os-autoinst/testapi.pm
|
|
|
|
%{_libexecdir}/os-autoinst/mmapi.pm
|
|
|
|
%{_libexecdir}/os-autoinst/lockapi.pm
|
|
|
|
%{_libexecdir}/os-autoinst/cv.pm
|
|
|
|
%{_libexecdir}/os-autoinst/ocr.pm
|
|
|
|
%{_libexecdir}/os-autoinst/needle.pm
|
2017-06-20 08:03:58 +02:00
|
|
|
%{_libexecdir}/os-autoinst/osutils.pm
|
2017-04-06 10:13:15 +02:00
|
|
|
%{_libexecdir}/os-autoinst/myjsonrpc.pm
|
|
|
|
%{_libexecdir}/os-autoinst/backend
|
|
|
|
%{_libexecdir}/os-autoinst/OpenQA
|
|
|
|
%{_libexecdir}/os-autoinst/consoles
|
|
|
|
%{_libexecdir}/os-autoinst/autotest.pm
|
|
|
|
%{_libexecdir}/os-autoinst/crop.py
|
|
|
|
|
|
|
|
%files openvswitch
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libexecdir}/os-autoinst/os-autoinst-openvswitch
|
|
|
|
/usr/lib/systemd/system/os-autoinst-openvswitch.service
|
2017-05-10 11:08:10 +02:00
|
|
|
%config /etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf
|
2017-04-06 10:13:15 +02:00
|
|
|
%{_sbindir}/rcos-autoinst-openvswitch
|
|
|
|
|
2019-07-16 10:27:46 +02:00
|
|
|
%files devel
|
|
|
|
|
2017-04-06 10:13:15 +02:00
|
|
|
%changelog
|