SHA256
1
0
forked from pool/openQA

osc copypac from project:devel:openQA package:openQA revision:3290, using client side copy

OBS-URL: https://build.opensuse.org/package/show/devel:openQA:tested/openQA?expand=0&rev=20
This commit is contained in:
Oliver Kurz 2017-10-28 12:28:24 +00:00 committed by Git OBS Bridge
parent d03137a514
commit 2aa37b1110
10 changed files with 2501 additions and 109 deletions

View File

@ -1,18 +1,18 @@
<?xml version="1.0"?>
<services>
<service name="tar_scm" mode="disabled">
<service name="tar_scm">
<param name="url">git://github.com/os-autoinst/openQA.git</param>
<param name="versionprefix">4.4</param>
<param name="versionprefix">4.5</param>
<param name="versionformat">%ct.%h</param>
<param name="scm">git</param>
<param name="revision">master</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">rd-ops-cm@suse.de</param>
</service>
<service name="recompress" mode="disabled">
<service name="recompress">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled">
<service name="set_version">
</service>
</services>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4de29e413cc3bf9c5f1ebc5b1910e7fa8888dab3c04c55cc37bff3b455021639
size 1432080

View File

@ -0,0 +1,411 @@
#
# spec file for package openQA
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# can't use linebreaks here!
%define openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service openqa-resource-allocator.service
%define openqa_worker_services openqa-worker.target openqa-slirpvde.service openqa-vde_switch.service
%if %{undefined tmpfiles_create}
%define tmpfiles_create() \
%{_bindir}/systemd-tmpfiles --create %{?*} || : \
%{nil}
%endif
%if 0%{?suse_version} >= 1730
%ifarch x86_64
%bcond_without tests
%else
%bcond_with tests
%endif
%else
%bcond_with tests
%endif
# runtime requirements that also the testsuite needs
%define t_requires perl(DBD::SQLite) perl(DBIx::Class) perl(Config::IniFiles) perl(SQL::Translator) perl(Date::Format) perl(File::Copy::Recursive) perl(DateTime::Format::SQLite) perl(Net::OpenID::Consumer) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Plugin::AssetPack) perl(aliased) perl(Config::Tiny) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(IO::Socket::SSL) perl(Data::Dump) perl(DBIx::Class::OptimisticLocking) perl(Text::Markdown) perl(Net::DBus) perl(IPC::Run) perl(Archive::Extract) perl(CSS::Minifier::XS) perl(JavaScript::Minifier::XS) perl(Time::ParseDate) perl(Sort::Versions) perl(Mojo::RabbitMQ::Client) perl(BSD::Resource)
Name: openQA
Version: 4.5.1509097496.8b8e8e20
Release: 0
Summary: The openQA web-frontend, scheduler and tools
License: GPL-2.0+
Group: Development/Tools/Other
Url: http://os-autoinst.github.io/openQA/
Source0: %{name}-%{version}.tar.xz
# a workaround for set_version looking at random files (so we can't name it .tar.xz)
# use update-cache to update it
Source1: cache.txz
Source100: openQA-rpmlintrc
Source101: update-cache.sh
BuildRequires: %{t_requires}
BuildRequires: fdupes
BuildRequires: os-autoinst
BuildRequires: systemd
# critical bug fix
BuildRequires: perl(DBIx::Class) >= 0.082801
BuildRequires: perl(Mojolicious) >= 7.24
BuildRequires: perl(Mojolicious::Plugin::AssetPack) >= 1.36
BuildRequires: rubygem(sass)
Requires: dbus-1
# needed for test suite
Requires: git-core
Requires: openQA-client = %{version}
Requires: openQA-common = %{version}
# needed for saving needles optimized
Requires: optipng
Requires: perl(DBIx::Class) >= 0.082801
# needed for openid support
Requires: perl(LWP::Protocol::https)
Requires: perl(URI)
# we need to have the same sha1 as expected
%requires_eq perl-Mojolicious-Plugin-AssetPack
Requires(post): coreutils
Requires(post): sqlite3
Requires(post): perl(DBIx::Class::DeploymentHandler)
Requires(post): perl(SQL::SplitStatement)
Recommends: apache2
Recommends: apparmor-profiles
Recommends: apparmor-utils
Recommends: logrotate
Recommends: perl(DBD::Pg)
# for postgresql
Recommends: perl(DateTime::Format::Pg)
BuildArch: noarch
ExcludeArch: i586
%{?systemd_requires}
%if %{with tests}
BuildRequires: perl-App-cpanminus
BuildRequires: phantomjs
BuildRequires: perl(Mojo::RabbitMQ::Client)
BuildRequires: perl(Perl::Critic)
BuildRequires: perl(Perl::Tidy)
BuildRequires: perl(Selenium::Remote::Driver)
BuildRequires: perl(Test::Compile)
BuildRequires: perl(Test::MockObject)
BuildRequires: perl(Test::Warnings)
%endif
%if 0%{?suse_version} >= 1330
Requires(pre): group(nogroup)
%endif
%description
openQA is a testing framework that allows you to test GUI applications on one
hand and bootloader and kernel on the other. In both cases, it is difficult to
script tests and verify the output. Output can be a popup window or it can be
an error in early boot even before init is executed.
openQA is an automated test tool that makes it possible to test the whole
installation process of an operating system. It uses virtual machines to
reproduce the process, check the output (both serial console and screen) in
every step and send the necessary keystrokes and commands to proceed to the
next. openQA can check whether the system can be installed, whether it works
properly in 'live' mode, whether applications work or whether the system
responds as expected to different installation options and commands.
Even more importantly, openQA can run several combinations of tests for every
revision of the operating system, reporting the errors detected for each
combination of hardware configuration, installation options and variant of the
operating system.
%package common
Summary: The openQA common tools for web-frontend and workers
Group: Development/Tools/Other
Requires: %{t_requires}
Requires: perl(Mojolicious) >= 7.24
%description common
This package contain shared resources for openQA web-frontend and
openQA workers.
%package worker
Summary: The openQA worker
Group: Development/Tools/Other
Requires: openQA-client = %{version}
Requires: os-autoinst < 5
Requires: perl(SQL::SplitStatement)
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: openQA-common = %{version}
Requires(post): coreutils
Requires(post): os-autoinst >= 4.4
Recommends: qemu
%if 0%{?suse_version} >= 1330
Requires(pre): group(nogroup)
%endif
%description worker
The openQA worker manages test engine (provided by os-autoinst package).
%package client
Summary: Client tools for remote openQA management
Group: Development/Tools/Other
Requires: perl(Config::IniFiles)
Requires: perl(Data::Dump)
Requires: perl(Getopt::Long)
Requires: perl(JSON)
Requires: perl(Mojolicious)
%description client
Tools and support files for openQA client script. Client script is
a convenient helper for interacting with openQA webui REST API.
%package doc
Summary: The openQA documentation
Group: Development/Tools/Other
%description doc
Documentation material covering installation, configuration, basic test writing, etc.
Covering both openQA and also os-autoinst test engine.
%prep
%setup -q -a1
%build
make %{?_smp_mflags}
%check
#for double checking
%if %{with tests}
cpanm --installdeps --with-feature=test .
%endif
# we don't really need the tidy test
rm -f t/00-tidy.t
%if %{with tests}
#make test
OBS_RUN=1 prove -r -j2 -v
%endif
%install
%make_install
mkdir -p %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa
ln -s %{_sysconfdir}/openqa/openqa.ini %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa/openqa.ini
ln -s %{_sysconfdir}/openqa/database.ini %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa/database.ini
mkdir -p %{buildroot}%{_bindir}
ln -s %{_datadir}/openqa/script/client %{buildroot}%{_bindir}/openqa-client
ln -s %{_datadir}/openqa/script/clone_job.pl %{buildroot}%{_bindir}/openqa-clone-job
ln -s %{_datadir}/openqa/script/dump_templates %{buildroot}%{_bindir}/openqa-dump-templates
ln -s %{_datadir}/openqa/script/load_templates %{buildroot}%{_bindir}/openqa-load-templates
cd %{buildroot}
grep -rl %{_bindir}/env . | while read file; do
sed -e 's,%{_bindir}/env perl,%{_bindir}/perl,' -i $file
done
mkdir -p %{buildroot}%{_sbindir}
for i in webui gru worker resource-allocator scheduler websockets slirpvde vde_switch; do
ln -s ../sbin/service %{buildroot}%{_sbindir}/rcopenqa-$i
done
#
install -D -m 644 /dev/null %{buildroot}%{_localstatedir}/log/openqa
install -m 0644 %{_sourcedir}/openQA.changes %{buildroot}%{_datadir}/openqa/public/Changelog
#
mkdir %{buildroot}%{_localstatedir}/lib/openqa/pool/1
mkdir %{buildroot}%{_localstatedir}/lib/openqa/cache
#
%fdupes %{buildroot}/%{_prefix}
%pre
if ! getent passwd geekotest > /dev/null; then
%{_sbindir}/useradd -r -g nogroup -c "openQA user" \
-d %{_localstatedir}/lib/openqa geekotest 2>/dev/null || :
fi
%service_add_pre %{openqa_services}
%pre common
if [ "$1" = 1 ]; then
# upgrade from openQA -> openQA-common (before -> after package split)
# old data needs to be moved to new locations else cpio fail during package deploying
if [ -d "%{_localstatedir}/lib/openqa/" -a ! -d "%{_localstatedir}/lib/openqa/share" ]; then
echo "### performing migration of openQA data"
mkdir "%{_localstatedir}/lib/openqa/share"
if [ -e "%{_localstatedir}/lib/openqa/factory" ]; then
echo "### moving %{_localstatedir}/lib/openqa/factory to %{_localstatedir}/lib/openqa/share/"
mv "%{_localstatedir}/lib/openqa/factory" "%{_localstatedir}/lib/openqa/share/"
fi
fi
fi
%pre worker
if ! getent passwd _openqa-worker > /dev/null; then
%{_sbindir}/useradd -r -g nogroup -c "openQA worker" \
-d %{_localstatedir}/lib/empty _openqa-worker 2>/dev/null || :
# might fail for non-kvm workers (qemu package owns the group)
%{_sbindir}/usermod _openqa-worker -a -G kvm || :
fi
%service_add_pre %{openqa_worker_services}
%post
# install empty log file
if [ ! -e %{_localstatedir}/log/openqa ]; then
install -D -m 644 -o geekotest /dev/null %{_localstatedir}/log/openqa || :
fi
if [ $1 -eq 1 ]; then
echo "### copy and edit %{_sysconfdir}/apache2/vhosts.d/openqa.conf.template!"
echo "### run sudo %{_datadir}/openqa/script/fetchneedles"
else
if [ -d "%{_localstatedir}/lib/openqa/share/testresults" ]; then
# remove the symlink
rm "%{_localstatedir}/lib/openqa/testresults"
mv "%{_localstatedir}/lib/openqa/share/testresults" "%{_localstatedir}/lib/openqa/"
fi
fi
%service_add_post %{openqa_services}
%post worker
%tmpfiles_create %{_tmpfilesdir}/openqa.conf
%service_add_post %{openqa_worker_services}
%preun
%service_del_preun %{openqa_services}
%preun worker
%service_del_preun %{openqa_worker_services}
%postun
%service_del_postun %{openqa_services}
%restart_on_update boot.apparmor
%postun worker
%service_del_postun %{openqa_worker_services}
%files
%doc README.asciidoc
%{_sbindir}/rcopenqa-gru
%{_sbindir}/rcopenqa-scheduler
%{_sbindir}/rcopenqa-resource-allocator
%{_sbindir}/rcopenqa-websockets
%{_sbindir}/rcopenqa-webui
%dir %{_sysconfdir}/openqa
%config(noreplace) %attr(-,geekotest,root) %{_sysconfdir}/openqa/openqa.ini
%config(noreplace) %attr(-,geekotest,root) %{_sysconfdir}/openqa/database.ini
%dir %{_datadir}/openqa
%dir %{_datadir}/openqa/etc
%dir %{_datadir}/openqa%{_sysconfdir}/openqa
%{_datadir}/openqa%{_sysconfdir}/openqa/openqa.ini
%{_datadir}/openqa%{_sysconfdir}/openqa/database.ini
%config %{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.openqa.conf
# apache vhost
%dir %{_sysconfdir}/apache2
%dir %{_sysconfdir}/apache2/vhosts.d
%config %{_sysconfdir}/apache2/vhosts.d/openqa.conf.template
%config %{_sysconfdir}/apache2/vhosts.d/openqa-common.inc
%config %{_sysconfdir}/apache2/vhosts.d/openqa-ssl.conf.template
# apparmor profile
%dir %{_sysconfdir}/apparmor.d
%config %{_sysconfdir}/apparmor.d/usr.share.openqa.script.openqa
# init
%dir %{_unitdir}
%{_unitdir}/openqa-webui.service
%{_unitdir}/openqa-gru.service
%{_unitdir}/openqa-scheduler.service
%{_unitdir}/openqa-resource-allocator.service
%{_unitdir}/openqa-websockets.service
# web libs
%dir %{_datadir}/openqa
%{_datadir}/openqa/templates
%{_datadir}/openqa/public
%{_datadir}/openqa/assets
%{_datadir}/openqa/dbicdh
%{_datadir}/openqa/script/check_dependencies
%{_datadir}/openqa/script/clean_needles
%{_datadir}/openqa/script/create_admin
%{_datadir}/openqa/script/fetchneedles
%{_datadir}/openqa/script/initdb
%{_datadir}/openqa/script/openqa
%{_datadir}/openqa/script/openqa-scheduler
%{_datadir}/openqa/script/openqa-resource-allocator
%{_datadir}/openqa/script/openqa-websockets
%{_datadir}/openqa/script/upgradedb
%{_datadir}/openqa/script/modify_needle
# TODO: define final user
%defattr(-,geekotest,root)
# attention: never package subdirectories owned by a user other
# than root as that opens a security hole!
%dir %{_localstatedir}/lib/openqa/db
%dir %{_localstatedir}/lib/openqa/images
%{_localstatedir}/lib/openqa/testresults
%dir %{_localstatedir}/lib/openqa/share/tests
%dir %{_localstatedir}/lib/openqa/share/factory
# iso hdd repo must be geekotest writable to enable *_URL and HDD upload functionality
%dir %{_localstatedir}/lib/openqa/share/factory/iso
%dir %{_localstatedir}/lib/openqa/share/factory/hdd
%dir %{_localstatedir}/lib/openqa/share/factory/repo
%dir %{_localstatedir}/lib/openqa/share/factory/other
%ghost %{_localstatedir}/lib/openqa/db/db.sqlite
%ghost %{_localstatedir}/log/openqa
%files common
%dir %{_datadir}/openqa
%{_datadir}/openqa/lib
%exclude %{_datadir}/openqa/lib/OpenQA/Client.pm
%dir %{_localstatedir}/lib/openqa
%ghost %dir %{_localstatedir}/lib/openqa/share/
%{_localstatedir}/lib/openqa/factory
%{_localstatedir}/lib/openqa/script
%{_localstatedir}/lib/openqa/tests
%files worker
%{_sbindir}/rcopenqa-slirpvde
%{_sbindir}/rcopenqa-vde_switch
%{_sbindir}/rcopenqa-worker
%config(noreplace) %{_sysconfdir}/openqa/workers.ini
%config(noreplace) %attr(0400,_openqa-worker,root) %{_sysconfdir}/openqa/client.conf
# apparmor profile
%dir %{_sysconfdir}/apparmor.d
%config %{_sysconfdir}/apparmor.d/usr.share.openqa.script.worker
# init
%dir %{_unitdir}
%{_libexecdir}/systemd/system-generators
%{_unitdir}/openqa-worker.target
%{_unitdir}/openqa-worker@.service
%{_unitdir}/openqa-worker-no-cleanup@.service
%{_unitdir}/openqa-slirpvde.service
%{_unitdir}/openqa-vde_switch.service
%{_tmpfilesdir}/openqa.conf
%ghost %dir %{_rundir}/openqa
# worker libs
%dir %{_datadir}/openqa
%dir %{_datadir}/openqa/script
%{_datadir}/openqa/script/worker
%dir %{_localstatedir}/lib/openqa/pool
%defattr(-,_openqa-worker,root)
%dir %{_localstatedir}/lib/openqa/cache
# own one pool - to create the others is task of the admin
%dir %{_localstatedir}/lib/openqa/pool/1
%files client
%dir %{_datadir}/openqa
%dir %{_datadir}/openqa/script
%{_datadir}/openqa/script/client
%{_datadir}/openqa/script/clone_job.pl
%{_datadir}/openqa/script/dump_templates
%{_datadir}/openqa/script/load_templates
%dir %{_datadir}/openqa/lib
%{_datadir}/openqa/lib/OpenQA/Client.pm
%{_bindir}/openqa-client
%{_bindir}/openqa-clone-job
%{_bindir}/openqa-dump-templates
%{_bindir}/openqa-load-templates
%files doc
%doc docs/*
%changelog

View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/os-autoinst/openQA.git</param>
<param name="changesrevision">afcb72caae47cca465ad7df2e6e8c88131c0498a</param></service></servicedata>

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68a56ad0f2d8e03001fa8c392cdeedcd4e9249153bd75b6a37487b9aeef4d121
size 1183289
oid sha256:ce866a49a57ad69f1010bff0d04157767c2a258e9f7ad38a77c6a6a0d5534f8c
size 1197521

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ceb5bcb75d755b74a6ae34890450e77d4c4d86fb4dca8913d024b8442225891e
size 1382748

View File

@ -1 +1,9 @@
setBadness('suse-dbus-unauthorized-service', 0)
addFilter('openQA-worker.noarch: W: systemd-service-without-service_del_preun openqa-worker-no-cleanup@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_del_preun openqa-worker@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_del_postun openqa-worker-no-cleanup@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_del_postun openqa-worker@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_add_pre openqa-worker-no-cleanup@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_add_pre openqa-worker@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_add_post openqa-worker-no-cleanup@.service')
addFilter('openQA-worker.noarch: W: systemd-service-without-service_add_post openqa-worker@.service')

View File

@ -1,6 +1,194 @@
Tue Jun 13 20:33:37 UTC 2017 - rd-ops-cm@suse.de
-------------------------------------------------------------------
Thu Oct 26 04:23:45 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.4.1497257618.89b04ed8:
- Update to version 4.5.1508961373.6d2e83a0:
* Scheduler: Add option to deal with slow workers that could be detected as dead.
* Scheduler: Handle stop/restart cleanly
* Respect log level configuration even when no log file is set (#1413)
* More prominent color for closed bug references, old ones for open bugs (#1412)
* Scheduler: implement retrials before declaring a job not accepted by a worker
* Scheduler: add option to wakeup when we receive new jobs
* Adjust full-stack tests scheduler default values
* API/Worker: Get updates from job that match the worker id
* Revert "Permit a dropped test coverage for now" as we are covered now
* Worker: send worker_id when updating setup status
* Job: Return error messages when worker doesn't send id
* docs: Move label and bugrefs doc from wiki
* docs: Add description of closed issue visualization
* Use OPENQA_TEST_IPC in more tests due to scheduler changes
* Scheduler: add code comments, refactorize and simplify code
* Include '.' in INC for 24-feature-tour.t (#1420)
* Scheduler: Remove EXPBACKOFF option and default to binary
* Scheduler: Remove shuffle option. Is new default now, if we don't shuffle free workers we might go into starvation since they can keep failing
* Scheduler: schedule() now returns allocated jobs and failures
* Websockets: distinct error while dispatching job over ws
* Improve error if a worker cannot connect to a WebSocket (#1416)
* Conflict no-cleanup worker with normal worker (#1417)
* Scheduler: Add basic unit testing
* Scheduler: remove retrials and workers cache
* Scheduler: use another state for jobs that have been assigned but are not yet in running status
* Worker/Websockets: Make worker send status messages, and websockets reaping jobs that are not matching states
* Websockets: print details of messages received from unknown workers
* Websockets: remove (now) misleading debug message
* Worker: do not die in the loop when current_host is not set
* Scheduler test: simulate unstable workers
* Workers: collect error if we fail dispatching commands to websocket dbus service
* Scheduler/WebSockets/Worker: update job state to running from worker responses
* Scheduler: now job allocation checks are not needed anymore inside scheduler
* WebSockets: use set_running when updating job status (#1426)
* Add support for custom links in footer
* Fix staging link for CaaSP
* Worker: increase keepalive timer
* Seperate footer links from footer legal part
* Add 'report Bug' for OpenQA product
* Scheduler: sleep when we have nothing to do
* Adapt scheduler tests to new sleep mode
* WebSockets: reset to schedule state if we detect stale assigned jobs
* Websockets: set default appname - which is used in error templates
* Websocket: wrap database transactions in try catch so we can debug dbus service errors
* Create base for fullscreen mode on group overview site
* Include just show latest comment feature
* Add disable comments feature in group overview
* Add fullscreen to group overview and rewind comments part
* Fix uninitialized value error and typos
* Add autorefresh for builds and comments in group overview
* Make auto refresh rate adjustable
* Fix sporadic problem of systemd service start (poo#21004) (#1430)
* Add description part for api routes at not_found page
* Add a quick tour to openQA
* Enable feature tour by changing database entry
* Adjust ui test
* Replace old DEPENDENCIES.txt references to cpanfile (#1423)
* Templates: improve error handling in running_table (#1427)
* Utils: Flush log output when we don't use Mojo::Log
* WebSockets: finish connection when we don't have the worker registered
* Workers: print debug output when connection is closed
* WebSockets: enable required plugin on setup
* Add tests for WebSocket disconnection handling
* Add missing figure for closed ticket labels
* Prevent use of job_module_stats when showing jobs of worker
* Fix sorting in table for previous jobs of worker
* Remove all remaining uses of job_module_stats
* Fix accessing job module stat 'unk'
* Treat ASSIGNED state as in execution
* Subscribe start_job/stop_job events before we call send on websocket connection
* Worker: reset internal state if we fail contacting the WebUI
* Worker: Do not cleanup if pooldir is not set
* Add support for multiple distri/version/group on /tests/overview
* Websocket: Do not kill connections due to inactivity (meant mostly for browsers)
* Dereference hashrefs before using 'keys'
* Check whether description available before printing it
* Cover the websocket server to avoid uncovered changes with CI builds
* Include all relevant distros when linking overview
* Use Mojo::Log for logging worker's output
* Refactor worker status messages
* Cover main OpenQA.pm, which was left with low coverage
* Changes the log level to debug if --debug or --verbose is applied. Default is info level.
* Fix use of undefined $email by using default icon instead (#1444)
* Sync needles when caching is enabled
* Use cache_tests from isotovideo engine
* Better reflect job execution through states
* Replace tabs with spaces and fix indentation.
* Ensure CSS classes are used for Datatables
* Add setup state to be polled and tidy up
* Test 404 error page
* Ensure use of symlinked applications for clone_job/dump_templates/load_templates
* Trim less text in overview tables by using CSS instead of custom code
* Disable live log/terminal by default
* Untie live stream from live log
* Make details the default tab also for running jobs
* Ensure streams for live view are only consumed when tab is active
* Allow info/debug messages in javascript_console_is_empty
* Switch to live view by default in full stack test
* Move read_test_modules to OpenQA::Utils
* Add support for getting test results as json
* Fix missing openQA::Client import introduced in 7c91a962
* Improve documentation for contributors
* Log IPC errors
* make Makefile non-bash environment friendly (#1465)
* Add log function log_fatal
* Allow filtering by result on 'All tests' page
* Add query param for filtering 'All tests' table by result
* Adapt bugzilla link to new SLE15 installer (#1466)
* Fix filtering by result on 'All tests' page for some results
* Test enabling result filter on 'All Tests' page via query
* Fix regression introduced in https://github.com/os-autoinst/openQA/pull/1460
* Ignore .pc directory for perltidy (#1472)
* Fix missing log_warning import on IPC.pm (#1473)
* Cherry pick perltidy fixes from @henrich (#1475)
* docs: Add hint about performance impact of VM snapshots (#1474)
* Create ResourceAllocator DBus service
* Split fullstack tests in different build matrix
* Create exists_worker in OpenQA::Utils
* Use schema from ResourceAllocator instance, refactor to use exists_worker
* Adjust scheduler full tests after the split
* OpenQA::ServerStartup: set also appropriate handle when setting up logging, since now FakeApp has STDOUT as default handle
* Add safe_call to OpenQA::Utils
* Switching to safe_call in ResourceAllocator
* Make job update take into account of ASSIGNED and SETUP state
* Worker: Reset state also when we loose current_host (due to failure contacting webserver)
* Return 0 by default on worker's try_lock_asset()
* Worker: Wrap asset_lookup() query in eval/if
* Make heartbeat timeout for rabbitmq configurable (#1479)
* Add API description for worker route
* docs: Prevent parsing of '#' as markup
* Allow admins to fetch the worker status by json
* Fix name of the SUSE company
* Prevent showing duplicated bugrefs twice
-------------------------------------------------------------------
Fri Aug 18 04:07:00 UTC 2017 - okurz@suse.com
- Provide clone-job, dump-templates, load-templates as symlinks in bin-path
-------------------------------------------------------------------
Wed Aug 02 17:27:08 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.5.1501694730.25c355a8:
* OpenQA::WebAPI::Controller::API::V1::Job: catch errors and return no jobs when we fail to contact dbus
* Schedule jobs without polling
* Make workers only accept one job from one webui - also check if we dispatched the job correctly to the worker
* Update worker seen status from ws keepalives if thought dead
* Set to running just when we are sure the job got dispatched to the worker
* Improve error handling when we fail resetting scheduling state
* Do not use in the workers next_tick anymore when accepting the job
* Fix the keep alive timer handling in worker
* We need more timers to be host specific
* Scheduler: Be more strict with job states
* Apache: SetEnv proxy-nokeepalive 1
* Permit a dropped test coverage for now
* Scheduler: further optimizations and refinements
* Get rid of notify_workers, and from the signal that was associated to it in the dbus scheduler service
* Remove job grab from the API
* Fix bugzilla links for CaaSP (#1395)
-------------------------------------------------------------------
Mon Jul 31 06:57:12 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.4.1501432550.4c72a17b:
* Some more permissions required for power8 worker (#1405)
* schema: Add job module statistics to jobs table
* Use job module stats from jobs table in 'All Tests'
* Add . to INC for tests that use local modules (perl 5.26 doesn't) (#1406)
* Update job module stats when module inserted/updated
* Fix typo in networking documentation (#1407)
* Add the job module statistics to the migration code (#1409)
* SLE 'LeanOS' corresponds to 'Server' on bugzilla.suse.com (#1393)
* Dynamic feature infos for users (#1388)
-------------------------------------------------------------------
Sun Jul 30 16:39:37 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.4.1499449966.bd9ee915:
* Replace die with log_error
* Avoid edge case of asset sizes being incorrect.
* Cache: resolve to current host when host URL cannot be resolved (#1352)
* job templates: Fix removing options when finalizing row
* job templates: Fix check for test selection when finalizing
* job templates: Improve coding style in post
* Fix bullet points in dashboard (#1356)
* Provide a default (0) to max_rss_limit so that the config actually works (#1358)
* Cache: Make each log message uniquely identifiable
* Allow plugins to load specific configurations
* Remove auth_config from OpenQA::WebAPI::Auth::*
* Add fullscreen base into project
@ -9,34 +197,243 @@ Tue Jun 13 20:33:37 UTC 2017 - rd-ops-cm@suse.de
* Change help popover description in filtersection
* Correct main controller and index page
* Add error message for missing webserver
* Also recognize kde bugrefs in Utils.pm (#1366)
* Add link to CaaSP staging (#1360)
* Also recognize fdo bugrefs in Utils.pm (#1367)
* Database change for bug status
* Improve assets log messages (#1365)
* Documentation for GRE (#1369)
* Extend sorting by time to parent group overview (#1362)
- Include upstream changes for worker with no-cleanup
* Add workaround for PhantomJS in needle edit test
* Fix typo workround -> workaround
* Prevent bugref_to_href replacement at end of title (#1372)
* Refactor rendering response for server-side DataTable
* Refactor server-side code for audit log
* Refactor server-side code for previous jobs of worker
* Test takeover of exclude areas in needle editor
* Fix wrong HTML, input must not contain text
* Show exclude areas in needle diff
* Show exclude areas in needle editor always
* Document areas
* correct typo (#1379)
* Enable INTEGRATION_TESTS (#1384)
* Retrigger download retry for incomplete downloads
* Fix perl structure printed in the logs
* Check when asset has been removed by hand
* Changing from using pure perl to Mojo::Asset::File
* Allow the cache to use a configurable sleep time
* Unlock the asset before the next download retry
* Add unit test for cache
* Add 25-cache.t to testrules.yml
* Set sleep_time to 5 again
* Remove unnecesary code from cache tests
* Refactor server handling to avoid race conditions
* Improve handling of logs and directories
* Improve cache tests
* Improve server_start and port handling
* Remove unnecesary calls to Mojo::Asset::File
* Fix test directory to share/tests (#1383)
* Sort the failed modules on their timestamp not by their name (#1378)
* Add test for "Server unavailable"
* Inform user when OpenID login fails with no message from OpenID provider (#1380)
* Increase the grace timeout to have uploads finish (#1385)
* Notify the workers only when there are no errors
* Create jobs from settings within a transaction
* Increase information in logs if a wrong secret is used (#1374)
* Avoid OpenID login to clutter log files (#1386)
-------------------------------------------------------------------
Tue May 16 09:56:40 UTC 2017 - mlin@suse.com
Tue Jun 20 06:18:43 UTC 2017 - okurz@suse.com
- Prequire needed group nogroup
- Exclude not supported and not building i586 in spec file rather than project
config
- Use internal macro for %setup
- Cleanup description and doc section
-------------------------------------------------------------------
Thu May 11 05:43:42 UTC 2017 - okurz@suse.com
Wed Jun 7 13:51:42 UTC 2017 - coolo@suse.com
- Re-enable dbus service installation
- disable tests on tumbleweed as they hang - need to debug this
regression first
-------------------------------------------------------------------
Wed May 10 07:49:39 UTC 2017 - jengelh@inai.de
Thu Jun 01 07:38:52 UTC 2017 - rd-ops-cm@suse.de
- Do not suppress errors from useradd
- Rectify RPM groups
- Update to version 4.4.1496302635.5e9b3f9:
* Replace die with log_error
* Avoid edge case of asset sizes being incorrect.
* Cache: resolve to current host when host URL cannot be resolved (#1352)
* job templates: Fix removing options when finalizing row
* job templates: Fix check for test selection when finalizing
* job templates: Improve coding style in post
* Fix bullet points in dashboard (#1356)
* Provide a default (0) to max_rss_limit so that the config actually works (#1358)
* Cache: Make each log message uniquely identifiable
-------------------------------------------------------------------
Thu Apr 06 09:17:10 UTC 2017 - rd-ops-cm@suse.de
Tue May 30 13:33:09 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.4.1491400697.19ef0fc5:
- Update to version 4.4.1496150882.49e14ecd:
* Avoid OpenQA::IPC::ipc being called premetaure (#1185)
* Add $prjdir prefix for relative filenames in Needles
* Add option to change $prjdir on the fly
* Adapt timers helpers for multi-hosts
* Make api_call not to recurse into IOLoop, add callbacks
* Adapt worker registration to multihost
* Adapt jobs helpers to non recursive api_call and multihost
* New multihost workers.ini
* Per-host working directory support
* Multihost commands parsing
* Adapt worker tests for non-blocking api_call
* Use OpenQA::Utils log functions in worker
* Use share/factory directory instead of factory link
* Replace dirs parsing by one liners
* Remove dead code
* Use testcasedir helper instead of removed static
* Add some unit tests
* Fix generate/packed-assets not to require dbus session (#1186)
* Avoid 404 errors on scheduled jobs
* Take 4 travis jobs as success
* needle editor: Validate needles/tags in JavaScript (#1189)
* Reduce the number of travis jobs (#1188)
* Duplicate the job if the worker is terminated
* Simplify selenium using code
* Do not do any jsonfile path processing
* Prevent uninit ws variable warning
* Pass query params as params key for duplicate
* Allow api_call to be called without callback
* Change the Mojolicious version requirements (#1195)
* Fix needle path check (#1196)
* Fix the 12-needle-edit test to leave the data in place
* Import log_error before using it
* Introduce project share directory variable
* Adapt test to use share directory
* Switch test distro from pitux to tinycore (#1203)
* Fix last remnants of global url and ua usage
* Add image upload to full stack test
* AMQP: Declare exchange passive and durable (#1202)
* Fix an error when job result is "setup failure"
* Prepend sharedir when looking for needles with relpath (#1205)
* Add full stack test for setup failures
* Fix 24-worker.t
* Fix build lookup for single groups (poo#15988) (#1204)
* Allow override of the usual setting precedence order (#1200)
* Fix undefined warning for _stop_job_finish (#1207)
* Shared worker documentation
* Document referrer configuration and label:linked
* Fix job_timeout timer not being removed after stop_job (#1209)
* Add get_timer getter for worker timers query
* Add tests if start_job set proper timers and stop_job removes them
* Improve code preparing data for test overview
* Synchronize 'TODO' filter with review badges
* Add help popover for 'TODO' filter
* Show help popover details link in new tab
* Enhance jobs list in worker page (#1212)
* docs: Ensure pool dir exists when starting worker manually (#1213)
* Fix UI test skipping when modules not available (#1211)
* Avoid creating duplicit dependencies (#1214)
* Update documentation for a more obvious flow (#1218)
* branding: Add casp reporting links (#1219)
* Add notice to clone_job.pl help text (#1222)
* Do correct DISTRI-VERSION case dir lookup
* Fix AMQP SSL wide character JSON encoding (#1224)
* Refactor test for scheduler dependencies (#1225)
* Fix apparmor profile to let worker read from /other (#1228)
* Update GettingStarted for some Fedora repo changes (#1229)
* Fix time display regression introduced by f127654
* Harmonize running/scheduled time string also in UTC
* Show absolute time in tests list for finished as well
* Fix typo and make vhost config more readable
* Update Pitfalls.asciidoc
* Add pitfall for fake authentication method
* docs: Correct asciidoc syntax for pool instance table
* clone_job.pl: Display description with examples on '-h', too
* Update create_admin script
* docs: Improve language of 'using snapshots' section
* Fix synchronization of TODO with badges
* Add link from test details to assigned worker
* Fix bugzilla links as CASP was renamed to CaaSP
* docs: Delete reference to inactive stable repo (#1230)
* needle editor: Fix errors appearing in JS console
* needle editor: Show new tags in own line
* needle editor: Display all tags in the same way
* Allow configuration of how builds are sorted in web UI
* Add id to comments over API to allow referencing
* Fix needle editor when taking matches is disabled
* Fix openqa_web docker instance running
* Update Dockerfile to host openQA on Leap 42.2
* Change deprecated "MAINTAINER" instruction
* Add instruction "LABEL version"
* Use the default openID provider
* docker: Remove pool volume unused by webui
* Fix error when running the worker container
* Fix dockerfile for webui
* Fix dockerfile for workers
* Update README.md for docker section
* Document running selenium UI tests (under Leap) (#1250)
* Make needle edit test case less specific
* Prevent double machine tag output in 02-iso.t
* Add option for 'isos post' route to deprioritize old builds rather than obsolete
* needle editor: Format new tags bold
* needle editor: Prevent adding empty tag
* docs: Add documentation for 'triggering tests'
* Harden loading of auth modules with whitespaces (#1253)
* Allow redirects for clone_job requests (eg to ssl)
* Allow annonymous read access to operator tables
* Fix failing admin test
* Fix bugzilla reporting links for CaaSP
* [docs]: added documentation about setting up ssl (#1257)
* client script: Don't encode URL twice (#1260)
* Allow api_call to be called without callback
* Add Cache
* Enable caching on the worker
* Improve Cache package and tidy up the code
* Fix cache.db problems
* Ensure the asset has the proper name
* Add TESTPOOLSERVER variable for caching
* Refactor to allow CACHEDIRECTORY to replace share directory
* Simplify api_call nesting
* Fix the ISO expansion for local assets
* Let's set reasonable goal for codecov
* Work on testing cache
* Do not exclude .git from syncing
* Harmonize the keys used for assets
* Add newlines to log output
* Improve cache directory
* Catch errors on cache downloads
* Fix perlcritic errors
* We need Mojolicious 7.24 for max_response_size
* Implement download_asset so we can actually test caching it
* Remove -E option from flock - we do not check the exit status
* Make sure assets in pool are handled correctly
* Add support for multiple group, no build on /tests/overview
* docs: Add hint about multiple groups, no build
* Call rsync of tests in a child process and notify webui
* Move OpenQA::Cache to Worker namespace
* Trying to make workers.ini more descriptive
* docs: Add explanation for job priority (#1262)
* Schedule worker reregistration in case of api-failure
* Add more logging to job notifications
* Use host_port when parsing URL
* Prevent various timer loops
* Do job cleanup even in case of api failure
* Ensure uploaded assets have correct perms (#1263)
* Change $testpoolserver only if passed as option (#1264)
* Set read permissions for downloaded assets (#1267)
* Ignore module flag 'important' (#1266)
* product log: Don't show actions when not at least operator
* Make assets, workers and API help publicly available
* needle editor: Fix inserting tag via middle mouse button (#1269)
* Fix restarting jobs from worker page (#1272)
* Merge 'Status' and 'Connected' columns in workers overview (#1273)
* Add anchor for build results on index page (#1265)
* Lower down quantity of automatic carryover
* Add environmental variable to skip online tests
* Be specific which text element we want to test
* Fix hardcoded cache.db file
* Fix assets not being removed
* Force read_db after a write
* Add subtest for Cache
* Improve log output for label carryover
* Ensure that label carryover is done correctly
* Fix the recursive $db_file appending (#1279)
@ -47,6 +444,102 @@ Thu Apr 06 09:17:10 UTC 2017 - rd-ops-cm@suse.de
* needle editor: Test verification when not copying areas
* Improve little triangle sign below a screenshot (#1285)
* Add ignores for db.lock and phantomjs log (#1287)
* Correct 'softfailed' reference to passed (obsoleted)
* Ensure consistent naming of 'failed'+'softfailed' in all occurrences
* Fix overriden shared $dir worker registration (#1291)
* Add a Contributing section
* Add explicitly index and current.pdf
* Stop distinguishing softfailures
* Fix typo 'parallel' (#1290)
* Adjust grid wrapping in build tables (#1286)
* Use space indendation consistently in javascript files
* Delete w/s at EOL in javascript files
* Add 'build-results' anchor for group-overview page, too (#1281)
* Replace old 'important' behaviour with 'ignore_failure' (#1297)
* Give failed screenshots back the red border (#1300)
* Adjust test module flags on Details page for ignore_failure (#1299)
* Document the 'norollback' flag in WritingTests (#1298)
* Better error msg for openqa client (#1303)
* Improve 'Downloading failed' message (#1302)
* Refactor 05-scheduler-dependencies.t (#1306)
* Shorten build-numbers with dots to prevent overlapping (#1305)
* Fix "only tagged" for tags with version (#1296)
* Do not upload empty serial_terminal.txt (#1274)
* Makefile: Allow to skip checkstyle (#1304)
* Fix missing space in log debug message (#1307)
* Register job assets even if one of the assets need to be skipped (#1310)
* Test whether admin table displays needles which never matched
* Show needles in admin table which never matched
* Improve logging in case of upload failure (#1309)
* Improve product fixtures to prevent dependency warnings
* Handle wrong/missing job dependencies appropriately
* clone_job.pl: Print URL of generated job for easy access (#1313)
* Allow lscpu to read all of /proc - but only lscpu (#1315)
* clone_job.pl: Skip downloading generated assets in all cases (#1314)
* Fix invalid HTML
* Don't use name attribute on div element for markdown
* Fix indentation in overview.scss
* Fix showing long needle name in hover popup
* Prevent DB exception when adding tests in job templates (#1318)
* Remove duplicate "current step" (#1319)
* Refactor Cache.pm to use SQLite instead of json
* Update cache full stack test
* Fix minor race condition
* Increase test coverage
* Use cache.sqlite instead of cache.db
* Detect and set current version of openQA, display it in the footer (#1316)
* Add service file for workers with "no cleanup" (#1320)
* Prevent tags from getting cut by long build numbers (#1321)
* clone_job.pl: Fix generated job URL to be the receiving host (#1326)
* Unlink existing asset symlinks on syncing (#1323)
* Move OpenQA::Test::* modules to test directory (#1325)
* Improve admin test (#1327)
* Fix makefile syntax (#1328)
* Avoid line break after h4 in midori and co (#1333)
* Implement a config option to restart workers that grew too big (#1339)
* Allow cache to handle 5XX errors and retry 5 times (#1337)
* Inspect failed modules in /tests/overview (#1335)
* Fix print() on closed filehandle $log (#1334)
* Replace file_content() with Mojo::File (#1331)
* Disable printing time when logging to STDERR
* Add more tests to configuration parsing
* Fix bugzilla reporting link for SLE-12-SP1 (#1332)
* Make 'TEST' the only proper mandatory test setting (#1126)
* Avoid unit test to write on source code directory (#1341)
* Fix breakage introduced by https://github.com/os-autoinst/openQA/commit/659464d19b02e541f2529bd313c39681c71adfcf (#1343)
* Add scheduler test to cover OpenQA::Scheduler::FakeApp (#1345)
* Fix documentation publishing on gh-pages
* Make sure a valid up-to-date license in all files
* Fix doc generation - testapi (#1347)
* Add unit test to fix codecov "uncovered changes" (#1348)
* Add direct link to video position (poo#19300) (#1342)
* Avoid github and use a CDN for chosen.jquery (#1350)
* Correct Typo in Firewall config file (#1351)
-------------------------------------------------------------------
Thu May 18 09:12:07 UTC 2017 - mlin@suse.com
- Prerequire needed group nogroup
-------------------------------------------------------------------
Thu May 18 08:45:27 UTC 2017 - slindomansilla@suse.com
- Also provide systemd services for workers with '--no-cleanup'
-------------------------------------------------------------------
Thu May 18 07:28:35 UTC 2017 - rd-ops-cm@suse.de
- Update to version 4.4.1495052041.c6a5bc94:
* Remove duplicate "current step" (#1319)
* Fix minor race condition
* Increase test coverage
* Use cache.sqlite instead of cache.db
* Detect and set current version of openQA, display it in the footer (#1316)
* Add service file for workers with "no cleanup" (#1320)
* Prevent tags from getting cut by long build numbers (#1321)
* clone_job.pl: Fix generated job URL to be the receiving host (#1326)
* Unlink existing asset symlinks on syncing (#1323)
* Move OpenQA::Test::* modules to test directory (#1325)
-------------------------------------------------------------------
Sat Mar 18 20:03:22 UTC 2017 - coolo@suse.com

View File

@ -17,16 +17,14 @@
# can't use linebreaks here!
%define openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service
%define openqa_worker_services openqa-worker.target openqa-worker@.service openqa-worker-no-cleanup@.service openqa-slirpvde.service openqa-vde_switch.service
%define openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service openqa-resource-allocator.service
%define openqa_worker_services openqa-worker.target openqa-slirpvde.service openqa-vde_switch.service
%if %{undefined tmpfiles_create}
%define tmpfiles_create() \
/usr/bin/systemd-tmpfiles --create %{?*} || : \
%{_bindir}/systemd-tmpfiles --create %{?*} || : \
%{nil}
%endif
%if %suse_version >= 1730
%if 0%{?suse_version} >= 1730
%ifarch x86_64
%bcond_without tests
%else
@ -35,9 +33,10 @@
%else
%bcond_with tests
%endif
# runtime requirements that also the testsuite needs
%define t_requires perl(DBD::SQLite) perl(DBIx::Class) perl(Config::IniFiles) perl(SQL::Translator) perl(Date::Format) perl(File::Copy::Recursive) perl(DateTime::Format::SQLite) perl(Net::OpenID::Consumer) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Plugin::AssetPack) perl(aliased) perl(Config::Tiny) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(IO::Socket::SSL) perl(Data::Dump) perl(DBIx::Class::OptimisticLocking) perl(Text::Markdown) perl(Net::DBus) perl(IPC::Run) perl(Archive::Extract) perl(CSS::Minifier::XS) perl(JavaScript::Minifier::XS) perl(Time::ParseDate) perl(Sort::Versions) perl(Mojo::RabbitMQ::Client) perl(BSD::Resource)
Name: openQA
Version: 4.4.1497257618.89b04ed8
Version: 4.5.1508961373.6d2e83a0
Release: 0
Summary: The openQA web-frontend, scheduler and tools
License: GPL-2.0+
@ -47,42 +46,44 @@ Source0: %{name}-%{version}.tar.xz
# a workaround for set_version looking at random files (so we can't name it .tar.xz)
# use update-cache to update it
Source1: cache.txz
# audited dbus service is not accepted in older versions
%if %suse_version < 1330
Source100: openQA-rpmlintrc
%endif
Source101: update-cache.sh
ExcludeArch: i586
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): sqlite3
BuildRequires: %{t_requires}
BuildRequires: fdupes
BuildRequires: os-autoinst
Requires: openQA-client = %{version}
Requires: openQA-common = %{version}
Requires: perl(URI)
BuildRequires: systemd
BuildRequires: rubygem(sass)
# needed for openid support
Requires: perl(LWP::Protocol::https)
Recommends: apparmor-profiles
Recommends: apparmor-utils
Recommends: apache2
Recommends: logrotate
# for postgresql
Recommends: perl(DateTime::Format::Pg) perl(DBD::Pg)
# runtime requirements that also the testsuite needs
%define t_requires perl(DBD::SQLite) perl(DBIx::Class) perl(Config::IniFiles) perl(SQL::Translator) perl(Date::Format) perl(File::Copy::Recursive) perl(DateTime::Format::SQLite) perl(Net::OpenID::Consumer) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Plugin::AssetPack) perl(aliased) perl(Config::Tiny) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(IO::Socket::SSL) perl(Data::Dump) perl(DBIx::Class::OptimisticLocking) perl(Text::Markdown) perl(Net::DBus) perl(IPC::Run) perl(Archive::Extract) perl(CSS::Minifier::XS) perl(JavaScript::Minifier::XS) perl(Time::ParseDate) perl(Sort::Versions) perl(Mojo::RabbitMQ::Client) perl(BSD::Resource)
BuildRequires: perl(Mojolicious) >= 7.24
BuildRequires: perl(Mojolicious::Plugin::AssetPack) >= 1.36
# critical bug fix
BuildRequires: perl(DBIx::Class) >= 0.082801
Requires: perl(DBIx::Class) >= 0.082801
BuildRequires: perl(Mojolicious) >= 7.24
BuildRequires: perl(Mojolicious::Plugin::AssetPack) >= 1.36
BuildRequires: rubygem(sass)
Requires: dbus-1
# needed for test suite
Requires: git-core
Requires: openQA-client = %{version}
Requires: openQA-common = %{version}
# needed for saving needles optimized
Requires: optipng
BuildRequires: %{t_requires}
Requires: dbus-1
BuildRequires: fdupes
Requires: perl(DBIx::Class) >= 0.082801
# needed for openid support
Requires: perl(LWP::Protocol::https)
Requires: perl(URI)
# we need to have the same sha1 as expected
%requires_eq perl-Mojolicious-Plugin-AssetPack
Requires(post): coreutils
Requires(post): sqlite3
Requires(post): perl(DBIx::Class::DeploymentHandler)
Requires(post): perl(SQL::SplitStatement)
Recommends: apache2
Recommends: apparmor-profiles
Recommends: apparmor-utils
Recommends: logrotate
Recommends: perl(DBD::Pg)
# for postgresql
Recommends: perl(DateTime::Format::Pg)
BuildArch: noarch
ExcludeArch: i586
%{?systemd_requires}
%if %{with tests}
BuildRequires: perl-App-cpanminus
BuildRequires: phantomjs
@ -94,16 +95,9 @@ BuildRequires: perl(Test::Compile)
BuildRequires: perl(Test::MockObject)
BuildRequires: perl(Test::Warnings)
%endif
Requires(post): perl(DBIx::Class::DeploymentHandler)
Requires(post): perl(SQL::SplitStatement)
Requires(post): coreutils
%if 0%{?suse_version} >= 1330
Requires(pre): group(nogroup)
%endif
%{?systemd_requires}
BuildArch: noarch
# we need to have the same sha1 as expected
%requires_eq perl-Mojolicious-Plugin-AssetPack
%description
openQA is a testing framework that allows you to test GUI applications on one
@ -137,13 +131,14 @@ openQA workers.
%package worker
Summary: The openQA worker
Group: Development/Tools/Other
Requires: openQA-client = %{version}
Requires: os-autoinst < 5
Requires: perl(SQL::SplitStatement)
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: openQA-common = %{version}
Requires(post): coreutils
Requires(post): os-autoinst >= 4.4
Requires: openQA-client = %{version}
Requires: os-autoinst < 5
Recommends: qemu
Requires: perl(SQL::SplitStatement)
%if 0%{?suse_version} >= 1330
Requires(pre): group(nogroup)
%endif
@ -173,10 +168,10 @@ Documentation material covering installation, configuration, basic test writing,
Covering both openQA and also os-autoinst test engine.
%prep
%setup -a1
%setup -q -a1
%build
make
make %{?_smp_mflags}
%check
#for double checking
@ -194,39 +189,40 @@ OBS_RUN=1 prove -r -j2 -v
%install
%make_install
%if %suse_version >= 1330
rm -f openQA-rpmlintrc
%endif
mkdir -p %{buildroot}/usr/share/openqa/etc/openqa
ln -s /etc/openqa/openqa.ini %{buildroot}/usr/share/openqa/etc/openqa/openqa.ini
ln -s /etc/openqa/database.ini %{buildroot}/usr/share/openqa/etc/openqa/database.ini
mkdir -p %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa
ln -s %{_sysconfdir}/openqa/openqa.ini %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa/openqa.ini
ln -s %{_sysconfdir}/openqa/database.ini %{buildroot}%{_datadir}/openqa%{_sysconfdir}/openqa/database.ini
mkdir -p %{buildroot}%{_bindir}
ln -s /usr/share/openqa/script/client %{buildroot}%{_bindir}/openqa-client
ln -s %{_datadir}/openqa/script/client %{buildroot}%{_bindir}/openqa-client
ln -s %{_datadir}/openqa/script/clone_job.pl %{buildroot}%{_bindir}/openqa-clone-job
ln -s %{_datadir}/openqa/script/dump_templates %{buildroot}%{_bindir}/openqa-dump-templates
ln -s %{_datadir}/openqa/script/load_templates %{buildroot}%{_bindir}/openqa-load-templates
cd %buildroot
grep -rl /usr/bin/env . | while read file; do
sed -e 's,/usr/bin/env perl,/usr/bin/perl,' -i $file
cd %{buildroot}
grep -rl %{_bindir}/env . | while read file; do
sed -e 's,%{_bindir}/env perl,%{_bindir}/perl,' -i $file
done
mkdir -p %{buildroot}%{_sbindir}
for i in webui gru worker scheduler websockets slirpvde vde_switch; do
for i in webui gru worker resource-allocator scheduler websockets slirpvde vde_switch; do
ln -s ../sbin/service %{buildroot}%{_sbindir}/rcopenqa-$i
done
#
install -D -m 644 /dev/null %{buildroot}%{_localstatedir}/log/openqa
install -m 0644 %_sourcedir/openQA.changes %{buildroot}%{_datadir}/openqa/public/Changelog
install -m 0644 %{_sourcedir}/openQA.changes %{buildroot}%{_datadir}/openqa/public/Changelog
#
mkdir %{buildroot}%{_localstatedir}/lib/openqa/pool/1
mkdir %{buildroot}%{_localstatedir}/lib/openqa/cache
#
%fdupes %buildroot/%_prefix
%fdupes %{buildroot}/%{_prefix}
%pre
getent passwd geekotest >/dev/null || \
/usr/sbin/useradd -r -g nogroup -c "openQA user" \
-d /var/lib/openqa geekotest
if ! getent passwd geekotest > /dev/null; then
%{_sbindir}/useradd -r -g nogroup -c "openQA user" \
-d %{_localstatedir}/lib/openqa geekotest 2>/dev/null || :
fi
%service_add_pre %openqa_services
%service_add_pre %{openqa_services}
%pre common
if [ "$1" = 1 ]; then
@ -244,23 +240,23 @@ fi
%pre worker
if ! getent passwd _openqa-worker > /dev/null; then
/usr/sbin/useradd -r -g nogroup -c "openQA worker" \
-d /var/lib/empty _openqa-worker
%{_sbindir}/useradd -r -g nogroup -c "openQA worker" \
-d %{_localstatedir}/lib/empty _openqa-worker 2>/dev/null || :
# might fail for non-kvm workers (qemu package owns the group)
/usr/sbin/usermod _openqa-worker -a -G kvm || :
%{_sbindir}/usermod _openqa-worker -a -G kvm || :
fi
%service_add_pre %openqa_worker_services
%service_add_pre %{openqa_worker_services}
%post
# install empty log file
if [ ! -e /var/log/openqa ]; then
if [ ! -e %{_localstatedir}/log/openqa ]; then
install -D -m 644 -o geekotest /dev/null %{_localstatedir}/log/openqa || :
fi
if [ $1 -eq 1 ]; then
echo "### copy and edit /etc/apache2/vhosts.d/openqa.conf.template!"
echo "### run sudo /usr/share/openqa/script/fetchneedles"
echo "### copy and edit %{_sysconfdir}/apache2/vhosts.d/openqa.conf.template!"
echo "### run sudo %{_datadir}/openqa/script/fetchneedles"
else
if [ -d "%{_localstatedir}/lib/openqa/share/testresults" ]; then
@ -270,30 +266,30 @@ else
fi
fi
%service_add_post %openqa_services
%service_add_post %{openqa_services}
%post worker
%tmpfiles_create %{_tmpfilesdir}/openqa.conf
%service_add_post %openqa_worker_services
%service_add_post %{openqa_worker_services}
%preun
%service_del_preun %openqa_services
%service_del_preun %{openqa_services}
%preun worker
%service_del_preun %openqa_worker_services
%service_del_preun %{openqa_worker_services}
%postun
%service_del_postun %openqa_services
%service_del_postun %{openqa_services}
%restart_on_update boot.apparmor
%postun worker
%service_del_postun %openqa_worker_services
%service_del_postun %{openqa_worker_services}
%files
%defattr(-,root,root)
%doc README.asciidoc
%{_sbindir}/rcopenqa-gru
%{_sbindir}/rcopenqa-scheduler
%{_sbindir}/rcopenqa-resource-allocator
%{_sbindir}/rcopenqa-websockets
%{_sbindir}/rcopenqa-webui
%dir %{_sysconfdir}/openqa
@ -301,9 +297,9 @@ fi
%config(noreplace) %attr(-,geekotest,root) %{_sysconfdir}/openqa/database.ini
%dir %{_datadir}/openqa
%dir %{_datadir}/openqa/etc
%dir %{_datadir}/openqa/etc/openqa
%{_datadir}/openqa/etc/openqa/openqa.ini
%{_datadir}/openqa/etc/openqa/database.ini
%dir %{_datadir}/openqa%{_sysconfdir}/openqa
%{_datadir}/openqa%{_sysconfdir}/openqa/openqa.ini
%{_datadir}/openqa%{_sysconfdir}/openqa/database.ini
%config %{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.openqa.conf
# apache vhost
@ -320,6 +316,7 @@ fi
%{_unitdir}/openqa-webui.service
%{_unitdir}/openqa-gru.service
%{_unitdir}/openqa-scheduler.service
%{_unitdir}/openqa-resource-allocator.service
%{_unitdir}/openqa-websockets.service
# web libs
%dir %{_datadir}/openqa
@ -334,6 +331,7 @@ fi
%{_datadir}/openqa/script/initdb
%{_datadir}/openqa/script/openqa
%{_datadir}/openqa/script/openqa-scheduler
%{_datadir}/openqa/script/openqa-resource-allocator
%{_datadir}/openqa/script/openqa-websockets
%{_datadir}/openqa/script/upgradedb
%{_datadir}/openqa/script/modify_needle
@ -355,7 +353,6 @@ fi
%ghost %{_localstatedir}/log/openqa
%files common
%defattr(-,root,root)
%dir %{_datadir}/openqa
%{_datadir}/openqa/lib
%exclude %{_datadir}/openqa/lib/OpenQA/Client.pm
@ -366,7 +363,6 @@ fi
%{_localstatedir}/lib/openqa/tests
%files worker
%defattr(-,root,root)
%{_sbindir}/rcopenqa-slirpvde
%{_sbindir}/rcopenqa-vde_switch
%{_sbindir}/rcopenqa-worker
@ -396,7 +392,6 @@ fi
%dir %{_localstatedir}/lib/openqa/pool/1
%files client
%defattr(-,root,root)
%dir %{_datadir}/openqa
%dir %{_datadir}/openqa/script
%{_datadir}/openqa/script/client
@ -406,9 +401,11 @@ fi
%dir %{_datadir}/openqa/lib
%{_datadir}/openqa/lib/OpenQA/Client.pm
%{_bindir}/openqa-client
%{_bindir}/openqa-clone-job
%{_bindir}/openqa-dump-templates
%{_bindir}/openqa-load-templates
%files doc
%defattr(-,root,root)
%doc docs/*
%changelog