parent
02f20bf83b
commit
7f911b5c2c
@ -0,0 +1 @@
|
|||||||
|
/os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz
|
@ -0,0 +1,53 @@
|
|||||||
|
From 97546a9336a1de2f9e6bd6c20dd6f54756ede02e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,233 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
# os-autoinst has a bunch of annoyingly-badly-named private modules,
|
||||||
|
# we do not want automatic provides or requires for these
|
||||||
|
# ref https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Perl
|
||||||
|
# but per https://fedorahosted.org/fpc/ticket/591 , these have been
|
||||||
|
# improved, and contrary to the wiki it is safe to set them first and
|
||||||
|
# then call perl_default_filter, the values will be properly merged.
|
||||||
|
# I tried to sell upstream on naming these properly and installing
|
||||||
|
# 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)
|
||||||
|
%{?perl_default_filter}
|
||||||
|
|
||||||
|
%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: 4%{?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: opencv-devel
|
||||||
|
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
|
||||||
|
%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
|
||||||
|
# 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
|
||||||
|
Requires: tesseract
|
||||||
|
Requires: withlock
|
||||||
|
# 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(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
|
||||||
|
* Fri Jan 15 2016 Adam Williamson <awilliam@redhat.com> - 4.3-4
|
||||||
|
- simplify requires/provides excludes (thanks Zbigniew)
|
||||||
|
|
||||||
|
* Fri Jan 15 2016 Adam Williamson <awilliam@redhat.com> - 4.3-3
|
||||||
|
- add perl(:MODULE_COMPAT require
|
||||||
|
|
||||||
|
* Fri Jan 15 2016 Adam Williamson <awilliam@redhat.com> - 4.3-2
|
||||||
|
- exclude provides and requires from the private modules
|
||||||
|
|
||||||
|
* Thu Jan 14 2016 Adam Williamson <awilliam@redhat.com> - 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 <awilliam@redhat.com> - 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 <awilliam@redhat.com> - 4.2.1-5
|
||||||
|
- fix a bug in the UEFI patch
|
||||||
|
|
||||||
|
* Thu Dec 03 2015 Adam Williamson <awilliam@redhat.com> - 4.2.1-4
|
||||||
|
- support Fedora UEFI firmware location (submitted upstream)
|
||||||
|
|
||||||
|
* Mon Nov 2 2015 Adam Williamson <awilliam@redhat.com> - 4.2.1-3
|
||||||
|
- tweak hardcoded path patch a little (upstream request)
|
||||||
|
|
||||||
|
* Sat Oct 24 2015 Adam Williamson <awilliam@redhat.com> - 4.2.1-2
|
||||||
|
- fix a hardcoded path which is incorrect on Fedora
|
||||||
|
|
||||||
|
* Thu Oct 15 2015 Adam Williamson <awilliam@redhat.com> - 4.2.1-1
|
||||||
|
- new release 4.2.1
|
||||||
|
- merge changes from upstream
|
||||||
|
|
||||||
|
* Thu Apr 23 2015 Adam Williamson <awilliam@redhat.com> - 4.1-1.20150423git24609047
|
||||||
|
- initial Fedora package, based on OBS package
|
Loading…
Reference in new issue