LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File openstack-mistral.spec of Package openstack-mistral (Project home:suse-cloud-ci:rpm-packaging-sles12-Master-a7980f22727f72ad048f236e57222d3b022bf646)

#
# spec file for package openstack-mistral
#
# 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/
#


%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
Name:           openstack-mistral
Version:        6.0.0.0~xbeta2~dev104
Release:        0
Summary:        Workflow Service for OpenStack cloud
License:        Apache-2.0
Group:          Development/Libraries
Url:            https://launchpad.net/mistral
Source0:        mistral-master.tar.gz
Source1:        mistral-api.service
Source2:        mistral-engine.service
Source3:        mistral-executor.service
BuildRequires:  openstack-macros
BuildRequires:  python-PyJWT >= 1.0.1
BuildRequires:  python-aodhclient >= 0.9.0
BuildRequires:  python-barbicanclient >= 4.0.0
BuildRequires:  python-ceilometerclient >= 2.5.0
BuildRequires:  python-cinderclient >= 3.2.0
BuildRequires:  python-croniter >= 0.3.4
BuildRequires:  python-designateclient >= 2.7.0
BuildRequires:  python-devel
BuildRequires:  python-fixtures >= 3.0.0
BuildRequires:  python-glanceclient >= 2.8.0
BuildRequires:  python-glareclient >= 0.3.0
BuildRequires:  python-gnocchiclient >= 3.3.1
BuildRequires:  python-heatclient >= 1.10.0
BuildRequires:  python-ironic-inspector-client >= 1.5.0
BuildRequires:  python-ironicclient >= 1.14.0
BuildRequires:  python-kazoo >= 2.2
BuildRequires:  python-keystoneclient >= 3.8.0
BuildRequires:  python-keystonemiddleware >= 4.17.0
BuildRequires:  python-magnumclient >= 2.1.0
BuildRequires:  python-mistral-lib >= 0.3.0
BuildRequires:  python-mistralclient >= 3.1.0
BuildRequires:  python-muranoclient >= 0.8.2
BuildRequires:  python-neutronclient >= 6.3.0
BuildRequires:  python-nose >= 1.3.7
BuildRequires:  python-novaclient >= 9.1.0
BuildRequires:  python-oslo.concurrency >= 3.20.0
BuildRequires:  python-oslo.config >= 4.6.0
BuildRequires:  python-oslo.db >= 4.27.0
BuildRequires:  python-oslo.i18n >= 3.15.3
BuildRequires:  python-oslo.log >= 3.30.0
BuildRequires:  python-oslo.messaging >= 5.29.0
BuildRequires:  python-oslo.middleware >= 3.31.0
BuildRequires:  python-oslo.policy >= 1.23.0
BuildRequires:  python-oslo.service >= 1.24.0
BuildRequires:  python-oslotest >= 1.10.0
BuildRequires:  python-osprofiler >= 1.4.0
BuildRequires:  python-pbr >= 2.0.0
BuildRequires:  python-python-subunit >= 1.0.0
BuildRequires:  python-reno >= 2.5.0
BuildRequires:  python-requests-mock >= 1.1.0
BuildRequires:  python-senlinclient >= 1.1.0
BuildRequires:  python-six >= 1.10.0
BuildRequires:  python-stevedore >= 1.20.0
BuildRequires:  python-swiftclient >= 3.2.0
BuildRequires:  python-tackerclient >= 0.8.0
BuildRequires:  python-testrepository >= 0.0.18
BuildRequires:  python-testscenarios >= 0.4
BuildRequires:  python-testtools >= 2.2.0
BuildRequires:  python-tooz >= 1.58.0
BuildRequires:  python-troveclient >= 2.2.0
BuildRequires:  python-unittest2 >= 1.1.0
BuildRequires:  python-zaqarclient >= 1.0.0
Requires:       python-mistral = %{version}-%{release}
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  systemd-rpm-macros
%else
BuildRequires:  systemd
%endif

%description
System package - %{name}
Python package - python-mistral

%package        doc
Summary:        Documentation for OpenStack Workflow Service
Group:          Development/Libraries
BuildRequires:  git
BuildRequires:  openstack-tempest
BuildRequires:  python-Sphinx
BuildRequires:  python-WSME >= 0.8.0
BuildRequires:  python-jsonschema >= 2.6.0
BuildRequires:  python-networkx >= 1.10
BuildRequires:  python-openstackdocstheme >= 1.17.0
BuildRequires:  python-paramiko >= 2.0.0
BuildRequires:  python-pecan >= 1.0.0
BuildRequires:  python-pep8
BuildRequires:  python-sphinxcontrib-httpdomain >= 1.3.0
BuildRequires:  python-sphinxcontrib-pecanwsme >= 0.8.0
BuildRequires:  python-yaql >= 1.1.3

%description    doc
OpenStack Mistral documentaion.
.
This package contains the documentation

%package -n     python-mistral
Summary:        Mistral Python libraries
Group:          Development/Libraries
Requires:       python-Babel >= 2.3.4
Requires:       python-PyJWT >= 1.0.1
Requires:       python-PyYAML >= 3.10
Requires:       python-SQLAlchemy >= 1.0.10
Requires:       python-WSME >= 0.8.0
Requires:       python-alembic >= 0.8.10
Requires:       python-barbicanclient >= 4.0.0
Requires:       python-cachetools >= 2.0.0
Requires:       python-ceilometerclient >= 2.5.0
Requires:       python-cinderclient >= 3.2.0
Requires:       python-croniter >= 0.3.4
Requires:       python-designateclient >= 2.7.0
Requires:       python-eventlet >= 0.18.2
Requires:       python-glanceclient >= 2.8.0
Requires:       python-glareclient >= 0.3.0
Requires:       python-heatclient >= 1.10.0
Requires:       python-ironic-inspector-client >= 1.5.0
Requires:       python-ironicclient >= 1.14.0
Requires:       python-jsonschema >= 2.6.0
Requires:       python-keystoneclient >= 3.8.0
Requires:       python-keystonemiddleware >= 4.17.0
Requires:       python-magnumclient >= 2.1.0
Requires:       python-mistral-lib >= 0.3.0
Requires:       python-mistralclient >= 3.1.0
Requires:       python-mock >= 2.0.0
Requires:       python-muranoclient >= 0.8.2
Requires:       python-networkx >= 1.10
Requires:       python-neutronclient >= 6.3.0
Requires:       python-novaclient >= 9.1.0
Requires:       python-oslo.concurrency >= 3.20.0
Requires:       python-oslo.config >= 4.6.0
Requires:       python-oslo.db >= 4.27.0
Requires:       python-oslo.log >= 3.30.0
Requires:       python-oslo.messaging >= 5.29.0
Requires:       python-oslo.middleware >= 3.31.0
Requires:       python-oslo.policy >= 1.23.0
Requires:       python-oslo.serialization >= 2.18.0
Requires:       python-oslo.service >= 1.24.0
Requires:       python-oslo.utils >= 3.31.0
Requires:       python-osprofiler >= 1.4.0
Requires:       python-paramiko >= 2.0.0
Requires:       python-pbr >= 2.0.0
Requires:       python-pecan >= 1.0.0
Requires:       python-requests >= 2.14.2
Requires:       python-retrying >= 1.2.3
Requires:       python-senlinclient >= 1.1.0
Requires:       python-setuptools >= 16.0
Requires:       python-six >= 1.10.0
Requires:       python-stevedore >= 1.20.0
Requires:       python-swiftclient >= 3.2.0
Requires:       python-tackerclient >= 0.8.0
Requires:       python-tooz >= 1.58.0
Requires:       python-troveclient >= 2.2.0
Requires:       python-yaql >= 1.1.3
Requires:       python-zake >= 0.1.6
Requires:       python-zaqarclient >= 1.0.0

%description -n python-mistral
Mistral is a workflow service.
Most business processes consist of multiple distinct interconnected steps that need to be executed in a particular order
in a distributed environment. One can describe such process as a set of tasks and task relations and upload such description
to Mistral so that it takes care of state management, correct execution order, parallelism, synchronization and high availability.
.
This package contains the Python libraries.

%package        api
Summary:        OpenStack Mistral API service
Group:          Development/Libraries
Requires:       %{name} = %{version}

%description    api
OpenStack rest API to the Mistral api.
.
This package contains the ReST API.

%package        engine
Summary:        OpenStack Mistral Engine service
Group:          Development/Libraries
Requires:       %{name} = %{version}

%description    engine
OpenStack Mistral Engine service.
.
This package contains the mistral engine, which is one of core services of mistral.

%package        executor
Summary:        OpenStack Mistral Executor service
Group:          Development/Libraries
Requires:       %{name} = %{version}

%description    executor
OpenStack Mistral Executor service.
.
This package contains the mistral executor, which is one of core services of mistral, and
which the API servers will use.

%prep
%if 0%{?rdo}
%autosetup -p1 -n mistral-%{upstream_version}
%else
%autosetup -p1 -n mistral-6.0.0.0b2.dev104
%endif
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{py2_build}
export PYTHONPATH="."
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
--output-file etc/mistral.conf.sample

%{__python2} setup.py build_sphinx -b html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py2_install}

mkdir -p %{buildroot}%{_sysconfdir}/mistral/
mkdir -p %{buildroot}%{_localstatedir}/log/mistral
mkdir -p %{buildroot}%{_localstatedir}/run/mistral
#systemd unitfiles
install -p -D -m 644 %SOURCE1 %{buildroot}%{_unitdir}/openstack-mistral-api.service
install -p -D -m 644 %SOURCE2 %{buildroot}%{_unitdir}/openstack-mistral-engine.service
install -p -D -m 644 %SOURCE3 %{buildroot}%{_unitdir}/openstack-mistral-executor.service

install -p -D -m 640 etc/mistral.conf.sample %{buildroot}%{_sysconfdir}/mistral/mistral.conf
install -p -D -m 640 etc/logging.conf.sample %{buildroot}%{_sysconfdir}/mistral/logging.conf
install -p -D -m 640 etc/wf_trace_logging.conf.sample %{buildroot}%{_sysconfdir}/mistral/wf_trace_logging.conf
chmod +x %{buildroot}%{_bindir}/mistral*

%pre
%openstack_pre_user_group_create mistral mistral

%check
%{__python2} setup.py test

%post api
%systemd_post openstack-mistral-api.service

%preun api
%systemd_preun openstack-mistral-api.service

%postun api
%systemd_postun_with_restart openstack-mistral-api.service

%post engine
%systemd_post openstack-mistral-engine.service

%preun engine
%systemd_preun openstack-mistral-engine.service

%postun engine
%systemd_postun_with_restart openstack-mistral-engine.service

%post executor
%systemd_post openstack-mistral-executor.service

%preun executor
%systemd_preun openstack-mistral-executor.service

%postun executor
%systemd_postun_with_restart openstack-mistral-executor.service

%files api
%{_unitdir}/openstack-mistral-api.service

%files
%license LICENSE
%dir %{_sysconfdir}/mistral
%config(noreplace) %attr(-, mistral, mistral) %{_sysconfdir}/mistral/*
%{_bindir}/mistral-*
%dir %attr(755, mistral, mistral) %{_localstatedir}/run/mistral
%dir %attr(755, mistral, mistral) %{_localstatedir}/log/mistral

%files doc
%license LICENSE
%doc doc/build/html

%files engine
%{_unitdir}/openstack-mistral-engine.service

%files executor
%{_unitdir}/openstack-mistral-executor.service

%files -n python-mistral
%{python2_sitelib}/mistral*

%changelog