|
|
|
@@ -1,299 +0,0 @@
|
|
|
|
|
{% set pypi_name = 'karbor' %}
|
|
|
|
|
{% set source = fetch_source('https://tarballs.openstack.org/karbor/karbor-master.tar.gz') %}
|
|
|
|
|
{% set upstream_version = upstream_version() %}
|
|
|
|
|
{% set rpm_release = '1' %}
|
|
|
|
|
%if 0%{?rhel} || 0%{?fedora}
|
|
|
|
|
%global rdo 1
|
|
|
|
|
%endif
|
|
|
|
|
Name: {{ py2name() }}
|
|
|
|
|
Epoch: {{ epoch('karbor') }}
|
|
|
|
|
Version: {{ py2rpmversion() }}
|
|
|
|
|
Release: {{ py2rpmrelease() }}
|
|
|
|
|
Summary: OpenStack Application Data Protection Service
|
|
|
|
|
License: {{ license('Apache-2.0') }}
|
|
|
|
|
URL: https://docs.openstack.org/karbor
|
|
|
|
|
Source0: {{ source|basename }}
|
|
|
|
|
Source1: openstack-karbor.logrotate
|
|
|
|
|
Source2: openstack-karbor-operationengine.service
|
|
|
|
|
Source3: openstack-karbor-protection.service
|
|
|
|
|
BuildRequires: openstack-macros
|
|
|
|
|
BuildRequires: {{ py2pkg('tempest') }}
|
|
|
|
|
BuildRequires: {{ py3('Babel') }}
|
|
|
|
|
BuildRequires: {{ py3('Paste') }}
|
|
|
|
|
BuildRequires: {{ py3('PasteDeploy') }}
|
|
|
|
|
BuildRequires: {{ py3('Routes') }}
|
|
|
|
|
BuildRequires: {{ py3('SQLAlchemy') }}
|
|
|
|
|
BuildRequires: {{ py3('WebOb') }}
|
|
|
|
|
BuildRequires: {{ py3('WebTest') }}
|
|
|
|
|
BuildRequires: {{ py3('abclient') }}
|
|
|
|
|
BuildRequires: {{ py3('bcrypt') }}
|
|
|
|
|
BuildRequires: {{ py3('python-cinderclient') }}
|
|
|
|
|
BuildRequires: {{ py3('croniter') }}
|
|
|
|
|
BuildRequires: {{ py3('eventlet') }}
|
|
|
|
|
BuildRequires: {{ py3('fixtures') }}
|
|
|
|
|
BuildRequires: {{ py3('freezegun') }}
|
|
|
|
|
BuildRequires: {{ py3('python-glanceclient') }}
|
|
|
|
|
BuildRequires: {{ py3('greenlet') }}
|
|
|
|
|
BuildRequires: {{ py3('python-heatclient') }}
|
|
|
|
|
BuildRequires: {{ py3('icalendar') }}
|
|
|
|
|
BuildRequires: {{ py3('python-karborclient') }}
|
|
|
|
|
BuildRequires: {{ py3('keystoneauth1') }}
|
|
|
|
|
BuildRequires: {{ py3('keystonemiddleware') }}
|
|
|
|
|
BuildRequires: {{ py3('lxml') }}
|
|
|
|
|
BuildRequires: {{ py3('python-manilaclient') }}
|
|
|
|
|
BuildRequires: {{ py3('mock') }}
|
|
|
|
|
BuildRequires: {{ py3('python-neutronclient') }}
|
|
|
|
|
BuildRequires: {{ py3('python-novaclient') }}
|
|
|
|
|
BuildRequires: {{ py3('os-api-ref') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.concurrency') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.config') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.context') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.db') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.i18n') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.log') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.messaging') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.middleware') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.policy') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.serialization') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.service') }}
|
|
|
|
|
BuildRequires: {{ py3('oslo.versionedobjects') }}
|
|
|
|
|
BuildRequires: {{ py3('pbr') }}
|
|
|
|
|
BuildRequires: {{ py3('requests') }}
|
|
|
|
|
BuildRequires: {{ py3('six') }}
|
|
|
|
|
BuildRequires: {{ py3('sqlalchemy-migrate') }}
|
|
|
|
|
BuildRequires: {{ py3('stevedore') }}
|
|
|
|
|
BuildRequires: {{ py3('python-swiftclient') }}
|
|
|
|
|
BuildRequires: {{ py3('taskflow') }}
|
|
|
|
|
Requires: logrotate
|
|
|
|
|
Requires: python3-{{ pypi_name }} = %{epoch}:%{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
|
Requires(pre): pwdutils
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: systemd
|
|
|
|
|
Requires(post): systemd
|
|
|
|
|
Requires(postun): systemd
|
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
Requires(preun): systemd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Karbor is a Python implementation of the OpenStack
|
|
|
|
|
(http://www.openstack.org) Application Data Protection API.
|
|
|
|
|
.
|
|
|
|
|
This package contains the karbor python libraries.
|
|
|
|
|
|
|
|
|
|
%package -n python3-{{ pypi_name }}
|
|
|
|
|
Summary: Karbor Python libraries
|
|
|
|
|
Group: Applications/System
|
|
|
|
|
Requires: {{ py3('Babel') }}
|
|
|
|
|
Requires: {{ py3('Paste') }}
|
|
|
|
|
Requires: {{ py3('PasteDeploy') }}
|
|
|
|
|
Requires: {{ py3('Routes') }}
|
|
|
|
|
Requires: {{ py3('SQLAlchemy') }}
|
|
|
|
|
Requires: {{ py3('WebOb') }}
|
|
|
|
|
Requires: {{ py3('abclient') }}
|
|
|
|
|
Requires: {{ py3('python-cinderclient') }}
|
|
|
|
|
Requires: {{ py3('croniter') }}
|
|
|
|
|
Requires: {{ py3('eventlet') }}
|
|
|
|
|
Requires: {{ py3('python-glanceclient') }}
|
|
|
|
|
Requires: {{ py3('greenlet') }}
|
|
|
|
|
Requires: {{ py3('python-heatclient') }}
|
|
|
|
|
Requires: {{ py3('icalendar') }}
|
|
|
|
|
Requires: {{ py3('python-karborclient') }}
|
|
|
|
|
Requires: {{ py3('keystoneauth1') }}
|
|
|
|
|
Requires: {{ py3('keystonemiddleware') }}
|
|
|
|
|
Requires: {{ py3('python-manilaclient') }}
|
|
|
|
|
Requires: {{ py3('python-neutronclient') }}
|
|
|
|
|
Requires: {{ py3('python-novaclient') }}
|
|
|
|
|
Requires: {{ py3('oslo.concurrency') }}
|
|
|
|
|
Requires: {{ py3('oslo.config') }}
|
|
|
|
|
Requires: {{ py3('oslo.context') }}
|
|
|
|
|
Requires: {{ py3('oslo.db') }}
|
|
|
|
|
Requires: {{ py3('oslo.i18n') }}
|
|
|
|
|
Requires: {{ py3('oslo.log') }}
|
|
|
|
|
Requires: {{ py3('oslo.messaging') }}
|
|
|
|
|
Requires: {{ py3('oslo.middleware') }}
|
|
|
|
|
Requires: {{ py3('oslo.policy') }}
|
|
|
|
|
Requires: {{ py3('oslo.serialization') }}
|
|
|
|
|
Requires: {{ py3('oslo.service') }}
|
|
|
|
|
Requires: {{ py3('oslo.versionedobjects') }}
|
|
|
|
|
Requires: {{ py3('requests') }}
|
|
|
|
|
Requires: {{ py3('six') }}
|
|
|
|
|
Requires: {{ py3('sqlalchemy-migrate') }}
|
|
|
|
|
Requires: {{ py3('stevedore') }}
|
|
|
|
|
Requires: {{ py3('python-swiftclient') }}
|
|
|
|
|
Requires: {{ py3('taskflow') }}
|
|
|
|
|
|
|
|
|
|
%description -n python3-{{ pypi_name }}
|
|
|
|
|
Karbor is a Python implementation of the OpenStack
|
|
|
|
|
(https://docs.openstack.org/karbor/latest/) Application Data Protection API.
|
|
|
|
|
This package contains the Karbor Python library.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for OpenStack Application Data Protection Service
|
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
BuildRequires: {{ py3('Sphinx') }}
|
|
|
|
|
BuildRequires: {{ py3('oslosphinx') }}
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
OpenStack Karbor documentaion.
|
|
|
|
|
.
|
|
|
|
|
This package contains the documentation
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package api
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%define apache_name apache2
|
|
|
|
|
%define apache_site_dir %{_sysconfdir}/%{apache_name}/vhosts.d/
|
|
|
|
|
BuildRequires: apache2-mod_wsgi-python3
|
|
|
|
|
Requires: apache2-mod_wsgi-python3
|
|
|
|
|
%else
|
|
|
|
|
%define apache_name httpd
|
|
|
|
|
%define apache_site_dir %{_sysconfdir}/%{apache_name}/conf.d/
|
|
|
|
|
BuildRequires: python3-mod_wsgi
|
|
|
|
|
Requires: python3-mod_wsgi
|
|
|
|
|
%endif
|
|
|
|
|
Summary: OpenStack Karbor - API service
|
|
|
|
|
Group: Applications/System
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
|
|
%description api
|
|
|
|
|
OpenStack Karbor API service.
|
|
|
|
|
|
|
|
|
|
%package operationengine
|
|
|
|
|
Summary: OpenStack Karbor OperationEngine service
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
|
|
%description operationengine
|
|
|
|
|
OpenStack Karbor OperationEngine service.
|
|
|
|
|
|
|
|
|
|
%package protection
|
|
|
|
|
Summary: OpenStack Karbor Protection service
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
|
|
%description protection
|
|
|
|
|
OpenStack Karbor Protection service.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n {{ pypi_name }}-{{upstream_version}}
|
|
|
|
|
%py_req_cleanup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{py3_build}
|
|
|
|
|
export PYTHONPATH="."
|
|
|
|
|
# config file generation
|
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf \
|
|
|
|
|
--output-file etc/karbor.conf.sample
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%{__python3} setup.py build_sphinx
|
|
|
|
|
# remove the sphinx-build leftovers
|
|
|
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{py3_install}
|
|
|
|
|
|
|
|
|
|
# Install config files
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/karbor/
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/karbor/providers.d/
|
|
|
|
|
install -p -D -m 640 etc/karbor.conf.sample %{buildroot}%{_sysconfdir}/karbor/karbor.conf
|
|
|
|
|
install -p -D -m 640 etc/api-paste.ini %{buildroot}%{_sysconfdir}/karbor/api-paste.ini
|
|
|
|
|
install -p -D -m 640 etc/providers.d/*.conf %{buildroot}%{_sysconfdir}/karbor/providers.d/
|
|
|
|
|
|
|
|
|
|
# remove wrongly installed tree
|
|
|
|
|
rm -rv %{buildroot}/%{_prefix}%{_sysconfdir}/
|
|
|
|
|
|
|
|
|
|
# Setup log directory
|
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/log/karbor
|
|
|
|
|
|
|
|
|
|
# Install logrotate
|
|
|
|
|
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-karbor
|
|
|
|
|
|
|
|
|
|
# Install apache configuration files
|
|
|
|
|
sed -i 's#/local/bin#/bin#' etc/apache2/apache-karbor-api.conf
|
|
|
|
|
%if 0%{?rdo}
|
|
|
|
|
# adjust paths to WSGI scripts
|
|
|
|
|
sed -i 's#apache2#httpd#' etc/apache2/apache-karbor-api.conf
|
|
|
|
|
%endif
|
|
|
|
|
install -d -m 755 %{buildroot}%{apache_site_dir}
|
|
|
|
|
install -p -D -m 644 etc/apache2/apache-karbor-api.conf %{buildroot}%{_datarootdir}/karbor/wsgi-karbor.conf
|
|
|
|
|
install -p -D -m 644 etc/apache2/apache-karbor-api.conf %{buildroot}%{apache_site_dir}/karbor.conf
|
|
|
|
|
|
|
|
|
|
# systemd unitfiles
|
|
|
|
|
install -p -D -m 644 %SOURCE2 %{buildroot}%{_unitdir}/openstack-karbor-operationengine.service
|
|
|
|
|
install -p -D -m 644 %SOURCE3 %{buildroot}%{_unitdir}/openstack-karbor-protection.service
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
%openstack_pre_user_group_create karbor karbor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post operationengine
|
|
|
|
|
%systemd_post openstack-karbor-operationengine.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun operationengine
|
|
|
|
|
%systemd_preun openstack-karbor-operationengine.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun operationengine
|
|
|
|
|
%systemd_postun_with_restart openstack-karbor-operationengine.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post protection
|
|
|
|
|
%systemd_post openstack-karbor-protection.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun protection
|
|
|
|
|
%systemd_preun openstack-karbor-protection.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun protection
|
|
|
|
|
%systemd_postun_with_restart openstack-karbor-protection.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%dir %{_datarootdir}/karbor/
|
|
|
|
|
%dir %attr(0750, root, karbor) %{_sysconfdir}/karbor/
|
|
|
|
|
%dir %attr(0750, root, karbor) %{_sysconfdir}/karbor/providers.d/
|
|
|
|
|
%dir %attr(0750, karbor, karbor) %{_localstatedir}/log/karbor
|
|
|
|
|
%{_bindir}/karbor-manage
|
|
|
|
|
%{_bindir}/karbor-status
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-karbor
|
|
|
|
|
%config(noreplace) %attr(0640, root, karbor) %{_sysconfdir}/karbor/karbor.conf
|
|
|
|
|
%config(noreplace) %attr(0640, root, karbor) %{_sysconfdir}/karbor/api-paste.ini
|
|
|
|
|
%config(noreplace) %attr(0640, root, karbor) %{_sysconfdir}/karbor/providers.d/*.conf
|
|
|
|
|
|
|
|
|
|
%files -n python3-karbor
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python3_sitelib}/karbor/
|
|
|
|
|
%{python3_sitelib}/karbor-*.egg-info
|
|
|
|
|
|
|
|
|
|
%files api
|
|
|
|
|
%{_bindir}/karbor-api
|
|
|
|
|
%{_bindir}/karbor-wsgi
|
|
|
|
|
%{_datarootdir}/karbor/wsgi-karbor.conf
|
|
|
|
|
%{apache_site_dir}/karbor.conf
|
|
|
|
|
|
|
|
|
|
%files operationengine
|
|
|
|
|
%{_bindir}/karbor-operationengine
|
|
|
|
|
%{_unitdir}/openstack-karbor-operationengine.service
|
|
|
|
|
|
|
|
|
|
%files protection
|
|
|
|
|
%{_bindir}/karbor-protection
|
|
|
|
|
%{_unitdir}/openstack-karbor-protection.service
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%files doc
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc doc/build/html
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|