2017-04-06 11:16:16 +02:00
|
|
|
#
|
|
|
|
# spec file for package openQA
|
|
|
|
#
|
2019-01-10 11:23:23 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-04-06 11:16:16 +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:30:13 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-06 11:16:16 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
# can't use linebreaks here!
|
2019-03-03 14:22:10 +01:00
|
|
|
%define openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service
|
2018-11-26 22:40:50 +01:00
|
|
|
%define openqa_worker_services openqa-worker.target openqa-slirpvde.service openqa-vde_switch.service openqa-worker-cacheservice.service openqa-worker-cacheservice-minion.service
|
2017-04-06 11:16:16 +02:00
|
|
|
%if %{undefined tmpfiles_create}
|
|
|
|
%define tmpfiles_create() \
|
2017-10-28 14:28:24 +02:00
|
|
|
%{_bindir}/systemd-tmpfiles --create %{?*} || : \
|
2017-04-06 11:16:16 +02:00
|
|
|
%{nil}
|
|
|
|
%endif
|
2018-05-28 02:19:43 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2017-04-06 11:16:16 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
%bcond_without tests
|
|
|
|
%else
|
|
|
|
%bcond_with tests
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%bcond_with tests
|
|
|
|
%endif
|
2017-10-28 14:28:24 +02:00
|
|
|
# runtime requirements that also the testsuite needs
|
2019-07-16 10:28:05 +02:00
|
|
|
%define t_requires perl(DBD::Pg) perl(DBIx::Class) perl(Config::IniFiles) perl(SQL::Translator) perl(Date::Format) perl(File::Copy::Recursive) perl(DateTime::Format::Pg) perl(Net::OpenID::Consumer) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Plugin::AssetPack) perl(aliased) perl(Config::Tiny) perl(DBIx::Class::DeploymentHandler) 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(Module::Pluggable) perl(Text::Diff) perl(Text::Markdown) perl(JSON::Validator) perl(YAML::XS) 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) perl(Cpanel::JSON::XS) perl(Pod::POM) perl(Mojo::IOLoop::ReadWriteProcess) perl(Minion) perl(Mojo::Pg) perl(Mojo::SQLite) perl(Minion::Backend::SQLite)
|
2017-04-06 11:16:16 +02:00
|
|
|
Name: openQA
|
2019-07-16 10:28:05 +02:00
|
|
|
Version: 4.6.1563206570.e00d3964
|
2017-04-06 11:16:16 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: The openQA web-frontend, scheduler and tools
|
2018-09-26 08:38:53 +02:00
|
|
|
License: GPL-2.0-or-later
|
2017-04-06 11:16:16 +02:00
|
|
|
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
|
|
|
|
Source101: update-cache.sh
|
2018-06-20 07:27:39 +02:00
|
|
|
Source102: Dockerfile
|
2017-10-28 14:28:24 +02:00
|
|
|
BuildRequires: %{t_requires}
|
|
|
|
BuildRequires: fdupes
|
2017-04-06 11:16:16 +02:00
|
|
|
BuildRequires: os-autoinst
|
2017-06-14 08:07:13 +02:00
|
|
|
BuildRequires: systemd
|
2017-10-28 14:28:24 +02:00
|
|
|
# critical bug fix
|
|
|
|
BuildRequires: perl(DBIx::Class) >= 0.082801
|
2019-03-29 23:33:12 +01:00
|
|
|
BuildRequires: perl(Minion) >= 9.09
|
2018-12-07 10:41:07 +01:00
|
|
|
BuildRequires: perl(Mojo::RabbitMQ::Client) >= 0.2
|
2018-08-21 20:56:08 +02:00
|
|
|
BuildRequires: perl(Mojolicious) >= 7.92
|
2017-10-28 14:28:24 +02:00
|
|
|
BuildRequires: perl(Mojolicious::Plugin::AssetPack) >= 1.36
|
2017-06-14 08:07:13 +02:00
|
|
|
BuildRequires: rubygem(sass)
|
2019-03-29 23:33:12 +01:00
|
|
|
Requires: perl(Minion) >= 9.09
|
2018-09-26 08:38:53 +02:00
|
|
|
Requires: perl(Mojo::RabbitMQ::Client) >= 0.2
|
2019-05-22 16:34:22 +02:00
|
|
|
Requires: perl(YAML::XS) >= 0.67
|
2017-10-28 14:28:24 +02:00
|
|
|
# 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
|
2017-04-06 11:16:16 +02:00
|
|
|
# needed for openid support
|
|
|
|
Requires: perl(LWP::Protocol::https)
|
2017-10-28 14:28:24 +02:00
|
|
|
Requires: perl(URI)
|
|
|
|
# we need to have the same sha1 as expected
|
|
|
|
%requires_eq perl-Mojolicious-Plugin-AssetPack
|
2017-12-06 16:49:48 +01:00
|
|
|
Recommends: %{name}-local-db
|
2017-10-28 14:28:24 +02:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(post): perl(SQL::SplitStatement)
|
|
|
|
Recommends: apache2
|
2017-04-06 11:16:16 +02:00
|
|
|
Recommends: apparmor-profiles
|
|
|
|
Recommends: apparmor-utils
|
|
|
|
Recommends: logrotate
|
2018-11-26 22:40:50 +01:00
|
|
|
# server needs to run an rsync server if worker caching is used
|
|
|
|
Recommends: rsync
|
2017-12-07 13:24:22 +01:00
|
|
|
BuildRequires: postgresql-server
|
2017-10-28 14:28:24 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
ExcludeArch: i586
|
|
|
|
%{?systemd_requires}
|
2017-04-06 11:16:16 +02:00
|
|
|
%if %{with tests}
|
2017-11-27 08:35:43 +01:00
|
|
|
BuildRequires: chromedriver
|
|
|
|
BuildRequires: chromium
|
2018-02-02 04:19:20 +01:00
|
|
|
BuildRequires: glibc-locale
|
|
|
|
# pick a font so chromium has something to render - doesn't matter so much
|
|
|
|
BuildRequires: dejavu-fonts
|
|
|
|
BuildRequires: google-roboto-fonts
|
2017-05-11 07:41:11 +02:00
|
|
|
BuildRequires: perl-App-cpanminus
|
2018-11-26 22:40:50 +01:00
|
|
|
BuildRequires: rsync
|
2017-12-05 14:10:41 +01:00
|
|
|
BuildRequires: perl(DBD::SQLite)
|
2017-04-06 11:16:16 +02:00
|
|
|
BuildRequires: perl(Perl::Critic)
|
2018-12-07 10:41:07 +01:00
|
|
|
BuildRequires: perl(Perl::Critic::Freenode)
|
2017-11-27 08:35:17 +01:00
|
|
|
BuildRequires: perl(Selenium::Remote::Driver) >= 1.20
|
2017-04-06 11:16:16 +02:00
|
|
|
BuildRequires: perl(Test::MockObject)
|
2019-07-13 00:34:53 +02:00
|
|
|
BuildRequires: perl(Test::Strict)
|
2017-04-06 11:16:16 +02:00
|
|
|
BuildRequires: perl(Test::Warnings)
|
|
|
|
%endif
|
2017-05-29 23:11:52 +02:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
Requires(pre): group(nogroup)
|
|
|
|
%endif
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%description
|
2017-05-08 13:40:17 +02:00
|
|
|
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.
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%package common
|
|
|
|
Summary: The openQA common tools for web-frontend and workers
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Requires: %{t_requires}
|
2018-08-21 20:56:08 +02:00
|
|
|
Requires: perl(Mojolicious) >= 7.92
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%description common
|
2017-10-28 14:28:24 +02:00
|
|
|
This package contain shared resources for openQA web-frontend and
|
2017-04-06 11:16:16 +02:00
|
|
|
openQA workers.
|
|
|
|
|
|
|
|
%package worker
|
|
|
|
Summary: The openQA worker
|
|
|
|
Group: Development/Tools/Other
|
2017-10-28 14:28:24 +02:00
|
|
|
Requires: openQA-client = %{version}
|
|
|
|
Requires: os-autoinst < 5
|
2018-11-26 22:40:50 +01:00
|
|
|
Requires: perl(DBD::SQLite) > 1.51
|
|
|
|
Requires: perl(Minion::Backend::SQLite)
|
2018-04-12 14:11:42 +02:00
|
|
|
Requires: perl(Mojo::IOLoop::ReadWriteProcess) > 0.19
|
2018-11-26 22:40:50 +01:00
|
|
|
Requires: perl(Mojo::SQLite)
|
2017-10-28 14:28:24 +02:00
|
|
|
Requires: perl(SQL::SplitStatement)
|
|
|
|
# FIXME: use proper Requires(pre/post/preun/...)
|
2017-04-06 11:16:16 +02:00
|
|
|
PreReq: openQA-common = %{version}
|
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(post): os-autoinst >= 4.4
|
|
|
|
Recommends: qemu
|
2018-11-26 22:40:50 +01:00
|
|
|
# Needed for caching - not required if caching not used...
|
|
|
|
Recommends: rsync
|
2017-05-29 23:11:52 +02:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
Requires(pre): group(nogroup)
|
|
|
|
%endif
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%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
|
2018-11-26 22:40:50 +01:00
|
|
|
Requires: openQA-common = %{version}
|
2017-04-06 11:16:16 +02:00
|
|
|
Requires: perl(Config::IniFiles)
|
2017-11-27 08:35:43 +01:00
|
|
|
Requires: perl(Cpanel::JSON::XS)
|
2017-04-06 11:16:16 +02:00
|
|
|
Requires: perl(Data::Dump)
|
|
|
|
Requires: perl(Getopt::Long)
|
2018-08-10 19:20:29 +02:00
|
|
|
Requires: perl(IO::Socket::SSL) >= 2.009
|
2018-11-26 22:40:50 +01:00
|
|
|
Requires: perl(LWP::UserAgent)
|
2017-04-06 11:16:16 +02:00
|
|
|
Requires: perl(Mojolicious)
|
2018-12-07 10:41:07 +01:00
|
|
|
Requires: perl(Regexp::Common)
|
2018-11-26 22:40:50 +01:00
|
|
|
Requires: perl(Try::Tiny)
|
2019-02-01 00:29:00 +01:00
|
|
|
Recommends: jq
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%description client
|
|
|
|
Tools and support files for openQA client script. Client script is
|
|
|
|
a convenient helper for interacting with openQA webui REST API.
|
|
|
|
|
2017-12-06 16:49:48 +01:00
|
|
|
%package local-db
|
|
|
|
Summary: Helper package to ease setup of postgresql DB
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Requires: %name
|
|
|
|
Requires: postgresql-server
|
|
|
|
Supplements: packageand(%name:postgresql-server)
|
|
|
|
|
|
|
|
%description local-db
|
|
|
|
You only need this package if you have a local postgresql server
|
|
|
|
next to the webui.
|
|
|
|
|
2018-12-22 14:41:36 +01:00
|
|
|
%package bootstrap
|
|
|
|
Summary: Automated openQA setup
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
|
|
|
|
%description bootstrap
|
|
|
|
This can automatically setup openQA - either directly on your system
|
|
|
|
or within a systemd-nspawn container.
|
|
|
|
|
2017-04-06 11:16:16 +02:00
|
|
|
%package doc
|
|
|
|
Summary: The openQA documentation
|
2017-06-14 08:54:41 +02:00
|
|
|
Group: Development/Tools/Other
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation material covering installation, configuration, basic test writing, etc.
|
2017-05-11 07:41:11 +02:00
|
|
|
Covering both openQA and also os-autoinst test engine.
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%prep
|
2017-10-28 14:28:24 +02:00
|
|
|
%setup -q -a1
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%build
|
2017-10-28 14:28:24 +02:00
|
|
|
make %{?_smp_mflags}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
#for double checking
|
|
|
|
%if %{with tests}
|
2019-06-05 16:51:04 +02:00
|
|
|
sed -i '/Perl::Tidy/d' cpanfile
|
2017-10-28 14:28:24 +02:00
|
|
|
cpanm --installdeps --with-feature=test .
|
2017-04-06 11:16:16 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
# we don't really need the tidy test
|
|
|
|
rm -f t/00-tidy.t
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
#make test
|
2017-12-05 14:10:41 +01:00
|
|
|
rm -rf %{buildroot}/DB
|
2018-02-02 04:19:20 +01:00
|
|
|
export LC_ALL=en_US.UTF-8
|
2019-07-06 00:35:29 +02:00
|
|
|
make test-with-database OBS_RUN=1 PROVE_ARGS='-rv' TEST_PG_PATH=%{buildroot}/DB || true
|
2018-02-02 04:19:20 +01:00
|
|
|
rm -rf %{buildroot}/DB
|
2017-04-06 11:16:16 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
2018-04-16 02:11:41 +02:00
|
|
|
export LC_ALL=en_US.UTF-8
|
|
|
|
export LANG=en_US.UTF-8
|
2017-04-06 11:16:16 +02:00
|
|
|
%make_install
|
|
|
|
|
2017-10-28 14:28:24 +02:00
|
|
|
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
|
2017-04-06 11:16:16 +02:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2017-10-28 14:28:24 +02:00
|
|
|
ln -s %{_datadir}/openqa/script/client %{buildroot}%{_bindir}/openqa-client
|
2019-06-07 17:54:15 +02:00
|
|
|
ln -s %{_datadir}/openqa/script/openqa-clone-job %{buildroot}%{_bindir}/openqa-clone-job
|
2017-10-28 14:28:24 +02:00
|
|
|
ln -s %{_datadir}/openqa/script/dump_templates %{buildroot}%{_bindir}/openqa-dump-templates
|
|
|
|
ln -s %{_datadir}/openqa/script/load_templates %{buildroot}%{_bindir}/openqa-load-templates
|
2019-02-01 00:29:00 +01:00
|
|
|
ln -s %{_datadir}/openqa/script/openqa-clone-custom-git-refspec %{buildroot}%{_bindir}/openqa-clone-custom-git-refspec
|
2017-10-28 14:28:24 +02:00
|
|
|
|
|
|
|
cd %{buildroot}
|
|
|
|
grep -rl %{_bindir}/env . | while read file; do
|
2018-09-26 08:38:53 +02:00
|
|
|
sed -e 's,%{_bindir}/env perl,%{_bindir}/perl,' -i $file
|
2017-04-06 11:16:16 +02:00
|
|
|
done
|
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
2019-03-03 14:22:10 +01:00
|
|
|
for i in webui gru worker scheduler websockets slirpvde vde_switch livehandler; do
|
2018-09-26 08:38:53 +02:00
|
|
|
ln -s ../sbin/service %{buildroot}%{_sbindir}/rcopenqa-$i
|
2017-04-06 11:16:16 +02:00
|
|
|
done
|
|
|
|
#
|
|
|
|
install -D -m 644 /dev/null %{buildroot}%{_localstatedir}/log/openqa
|
2017-10-28 14:28:24 +02:00
|
|
|
install -m 0644 %{_sourcedir}/openQA.changes %{buildroot}%{_datadir}/openqa/public/Changelog
|
2017-04-06 11:16:16 +02:00
|
|
|
#
|
|
|
|
mkdir %{buildroot}%{_localstatedir}/lib/openqa/pool/1
|
|
|
|
mkdir %{buildroot}%{_localstatedir}/lib/openqa/cache
|
2018-11-26 22:40:50 +01:00
|
|
|
mkdir %{buildroot}%{_localstatedir}/lib/openqa/webui
|
|
|
|
mkdir %{buildroot}%{_localstatedir}/lib/openqa/webui/cache
|
2017-04-06 11:16:16 +02:00
|
|
|
#
|
2017-10-28 14:28:24 +02:00
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%pre
|
2017-10-28 14:28:24 +02:00
|
|
|
if ! getent passwd geekotest > /dev/null; then
|
2018-09-26 08:38:53 +02:00
|
|
|
%{_sbindir}/useradd -r -g nogroup -c "openQA user" \
|
|
|
|
-d %{_localstatedir}/lib/openqa geekotest 2>/dev/null || :
|
2017-10-28 14:28:24 +02:00
|
|
|
fi
|
2017-04-06 11:16:16 +02:00
|
|
|
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_add_pre %{openqa_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%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
|
2017-10-28 14:28:24 +02:00
|
|
|
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 || :
|
2017-04-06 11:16:16 +02:00
|
|
|
# might fail for non-kvm workers (qemu package owns the group)
|
2017-10-28 14:28:24 +02:00
|
|
|
%{_sbindir}/usermod _openqa-worker -a -G kvm || :
|
2017-04-06 11:16:16 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_add_pre %{openqa_worker_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
# install empty log file
|
2017-10-28 14:28:24 +02:00
|
|
|
if [ ! -e %{_localstatedir}/log/openqa ]; then
|
2017-04-06 11:16:16 +02:00
|
|
|
install -D -m 644 -o geekotest /dev/null %{_localstatedir}/log/openqa || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $1 -eq 1 ]; then
|
2018-09-26 08:38:53 +02:00
|
|
|
echo "### copy and edit %{_sysconfdir}/apache2/vhosts.d/openqa.conf.template!"
|
|
|
|
echo "### run sudo %{_datadir}/openqa/script/fetchneedles"
|
2017-04-06 11:16:16 +02:00
|
|
|
else
|
2018-09-26 08:38:53 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
# we don't want to require the scheduler for the webui (so we can stop it independent)
|
|
|
|
# but it should be enabled together with the webui
|
|
|
|
if test "$(systemctl is-enabled openqa-webui.service)" = "enabled"; then
|
|
|
|
systemctl enable openqa-scheduler.service
|
|
|
|
fi
|
2017-04-06 11:16:16 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_add_post %{openqa_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%post worker
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/openqa.conf
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_add_post %{openqa_worker_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%preun
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_del_preun %{openqa_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%preun worker
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_del_preun %{openqa_worker_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%postun
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_del_postun %{openqa_services}
|
2018-12-13 06:41:07 +01:00
|
|
|
%restart_on_update apparmor
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%postun worker
|
2017-10-28 14:28:24 +02:00
|
|
|
%service_del_postun %{openqa_worker_services}
|
2017-04-06 11:16:16 +02:00
|
|
|
|
2017-12-06 16:49:48 +01:00
|
|
|
%post local-db
|
|
|
|
%service_add_post openqa-setup-db.service
|
|
|
|
|
|
|
|
%preun local-db
|
|
|
|
%service_del_preun openqa-setup-db.service
|
|
|
|
|
2018-08-10 19:20:29 +02:00
|
|
|
%postun local-db
|
2017-12-06 16:49:48 +01:00
|
|
|
%service_del_postun openqa-setup-db.service
|
|
|
|
|
2017-04-06 11:16:16 +02:00
|
|
|
%files
|
|
|
|
%doc README.asciidoc
|
|
|
|
%{_sbindir}/rcopenqa-gru
|
|
|
|
%{_sbindir}/rcopenqa-scheduler
|
|
|
|
%{_sbindir}/rcopenqa-websockets
|
|
|
|
%{_sbindir}/rcopenqa-webui
|
2018-09-26 08:38:53 +02:00
|
|
|
%{_sbindir}/rcopenqa-livehandler
|
2017-04-06 11:16:16 +02:00
|
|
|
%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
|
2017-10-28 14:28:24 +02:00
|
|
|
%dir %{_datadir}/openqa%{_sysconfdir}/openqa
|
|
|
|
%{_datadir}/openqa%{_sysconfdir}/openqa/openqa.ini
|
|
|
|
%{_datadir}/openqa%{_sysconfdir}/openqa/database.ini
|
2017-04-06 11:16:16 +02:00
|
|
|
%config %{_sysconfdir}/logrotate.d
|
|
|
|
# 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
|
2018-06-20 07:27:39 +02:00
|
|
|
%{_unitdir}/openqa-livehandler.service
|
2017-04-06 11:16:16 +02:00
|
|
|
%{_unitdir}/openqa-gru.service
|
|
|
|
%{_unitdir}/openqa-scheduler.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/create_admin
|
|
|
|
%{_datadir}/openqa/script/fetchneedles
|
|
|
|
%{_datadir}/openqa/script/initdb
|
|
|
|
%{_datadir}/openqa/script/openqa
|
|
|
|
%{_datadir}/openqa/script/openqa-scheduler
|
|
|
|
%{_datadir}/openqa/script/openqa-websockets
|
2018-06-20 07:27:39 +02:00
|
|
|
%{_datadir}/openqa/script/openqa-livehandler
|
2017-04-06 11:16:16 +02:00
|
|
|
%{_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
|
2018-11-26 22:40:50 +01:00
|
|
|
%dir %{_localstatedir}/lib/openqa/webui
|
|
|
|
%dir %{_localstatedir}/lib/openqa/webui/cache
|
2017-04-06 11:16:16 +02:00
|
|
|
%{_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
|
2018-11-26 22:40:50 +01:00
|
|
|
%exclude %{_datadir}/openqa/lib/OpenQA/Client
|
|
|
|
%exclude %{_datadir}/openqa/lib/OpenQA/UserAgent.pm
|
2017-04-06 11:16:16 +02:00
|
|
|
%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
|
2018-11-26 22:40:50 +01:00
|
|
|
%{_unitdir}/openqa-worker-cacheservice-minion.service
|
|
|
|
%{_unitdir}/openqa-worker-cacheservice.service
|
2017-06-14 08:54:41 +02:00
|
|
|
%{_unitdir}/openqa-worker-no-cleanup@.service
|
2017-04-06 11:16:16 +02:00
|
|
|
%{_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
|
2018-11-26 22:40:50 +01:00
|
|
|
%{_datadir}/openqa/script/openqa-workercache
|
2017-04-06 11:16:16 +02:00
|
|
|
%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
|
2019-06-07 17:54:15 +02:00
|
|
|
%{_datadir}/openqa/script/openqa-clone-job
|
2019-02-01 00:29:00 +01:00
|
|
|
%{_datadir}/openqa/script/openqa-clone-custom-git-refspec
|
2019-07-03 16:35:14 +02:00
|
|
|
%{_datadir}/openqa/script/configure-web-proxy
|
2017-04-06 11:16:16 +02:00
|
|
|
%dir %{_datadir}/openqa/lib
|
|
|
|
%{_datadir}/openqa/lib/OpenQA/Client.pm
|
2018-11-26 22:40:50 +01:00
|
|
|
%{_datadir}/openqa/lib/OpenQA/Client
|
|
|
|
%{_datadir}/openqa/lib/OpenQA/UserAgent.pm
|
2017-04-06 11:16:16 +02:00
|
|
|
%{_bindir}/openqa-client
|
2017-10-28 14:28:24 +02:00
|
|
|
%{_bindir}/openqa-clone-job
|
|
|
|
%{_bindir}/openqa-dump-templates
|
|
|
|
%{_bindir}/openqa-load-templates
|
2019-02-01 00:29:00 +01:00
|
|
|
%{_bindir}/openqa-clone-custom-git-refspec
|
2017-04-06 11:16:16 +02:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%doc docs/*
|
|
|
|
|
2017-12-06 16:49:48 +01:00
|
|
|
%files local-db
|
|
|
|
%{_unitdir}/openqa-setup-db.service
|
|
|
|
|
2018-12-22 14:41:36 +01:00
|
|
|
%files bootstrap
|
|
|
|
%{_datadir}/openqa/script/openqa-bootstrap
|
|
|
|
%{_datadir}/openqa/script/openqa-bootstrap-container
|
|
|
|
|
2017-04-06 11:16:16 +02:00
|
|
|
%changelog
|