# Fedora spec initially based on upstream spec file from OBS: # https://build.opensuse.org/package/view_file/devel:openQA/os-autoinst/os-autoinst.spec # License: GPLv2+ # Tests require perl-Test-Compile >= 1.1.0, currently only available # on Fedora > 21 (and I'm guessing RHEL > 7) %if 0%{?fedora} > 21 || 0%{?rhel} > 7 %global with_tests 1 %endif %{?perl_default_filter} %global __requires_exclude_from %{_docdir} # FIXME: there are a bunch of auto-generated provides that we should # really filter, but doing so is hard because we also auto-*require* # them, and I don't want a gigantic auto-require filter. Probably we # should get upstream to install to the perl vendor dir, properly # namespaced, so the auto-provides and auto-requires won't be dirty # dirty lies. %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.3 %global github_commit 8b5f22e8a84cc12b3ab8b24992fbb601048adc1b # if set, will be a post-release snapshot build, otherwise a 'normal' build #global github_date 20150423 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} Release: 1%{?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 BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool 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: opencv-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(theoraenc) BuildRequires: systemd %if 0%{?with_tests} # The OO interface to Test::Compile only appeared in 1.1.0 BuildRequires: perl(Test::Compile) >= 1.1.0 %endif # with_tests Requires: /usr/bin/qemu-img Requires: optipng Requires: qemu >= 2.0.0 Requires: qemu-kvm Requires: tesseract Requires: withlock %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) BuildRequires: %{t_requires} Requires: %{t_requires} BuildRequires: perl(Mojolicious) Requires: perl(Mojolicious) >= 5.60 #Recommends: eatmydata /usr/bin/multimon Requires(pre): %{_bindir}/getent Requires(pre): %{_sbindir}/useradd %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 applications on top of a newly installed OS. %package openvswitch Summary: Open vSwitch support for os-autoinst Requires: openvswitch Requires: %{name}%{?_isa} = %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: systemd %description openvswitch This package contains Open vSwitch support for os-autoinst. %prep %autosetup -n %{github_name}-%{github_commit} -p1 %build mkdir -p m4 autoreconf -f -i %configure --docdir=%{_pkgdocdir} make INSTALLDIRS=vendor %{?_smp_mflags} %install %make_install INSTALLDIRS=vendor # only internal stuff rm %{buildroot}%{_libexecdir}/os-autoinst/tools/tidy 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 rm %{buildroot}%{_libexecdir}/os-autoinst/crop.py* # we're going to %%license this 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 {} \; # we need the stale symlinks to point to git export NO_BRP_STALE_LINK_ERROR=yes %check %if 0%{?with_tests} make check VERBOSE=1 %endif # with_tests %post openvswitch %systemd_post os-autoinst-openvswitch.service %preun openvswitch %systemd_preun os-autoinst-openvswitch.service %postun openvswitch %systemd_postun_with_restart os-autoinst-openvswitch.service %files %{!?_licensedir:%global license %doc} %{_pkgdocdir} %license COPYING %{perl_vendorarch}/tinycv.pm %{perl_vendorarch}/auto/tinycv %dir %{_libexecdir}/os-autoinst %{_libexecdir}/os-autoinst/videoencoder %{_libexecdir}/os-autoinst/basetest.pm # %{_libexecdir}/os-autoinst/distri %{_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 %{_libexecdir}/os-autoinst/backend %{_libexecdir}/os-autoinst/consoles %dir %{_libexecdir}/os-autoinst/tools %{_libexecdir}/os-autoinst/tools/absolutize %{_libexecdir}/os-autoinst/tools/preparepool %{_libexecdir}/os-autoinst/autotest.pm %{_bindir}/isotovideo %{_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 * Thu Jan 14 2016 Adam Williamson - 4.3-1 - new release 4.3, drop patches merged upstream - resync with upstream spec changes - some package review cleanups - fix 'format not a literal' errors in new snd2png (submitted upstream) * Tue Dec 22 2015 Adam Williamson - 4.2.1-6 - changes requested in package review: + improve 'find and destroy' commands + drop tests/ directory (upstream did this too) + drop git dependency (seems to be ancient stuff) + use %%license + mark dbus config file as (noreplace) + 'Open vSwitch' not 'openvswitch' in summary/description + systemd snippets for openvswitch service + drop useless python scripts to avoid automatic python requirements * Thu Dec 03 2015 Adam Williamson - 4.2.1-5 - fix a bug in the UEFI patch * Thu Dec 03 2015 Adam Williamson - 4.2.1-4 - support Fedora UEFI firmware location (submitted upstream) * Mon Nov 2 2015 Adam Williamson - 4.2.1-3 - tweak hardcoded path patch a little (upstream request) * Sat Oct 24 2015 Adam Williamson - 4.2.1-2 - fix a hardcoded path which is incorrect on Fedora * Thu Oct 15 2015 Adam Williamson - 4.2.1-1 - new release 4.2.1 - merge changes from upstream * Thu Apr 23 2015 Adam Williamson - 4.1-1.20150423git24609047 - initial Fedora package, based on OBS package