Update openstack clients to stein/master
python-aodhclient spec file is based off 1.1.1 (rocky) python-barbicanclient spec file is based off 4.7.1 (rocky) python-cinderclient spec file is based off 4.0.1 (rocky) python-glanceclient spec file is based off 2.13.1 (rocky) - docs disabled python-gnocchiclient spec file is based off 7.0.4 (rocky) python-heatclient spec file is based off 1.16.1 (rocky) - docs disabled python-ironicclient spec file is based off 2.5.0 (rocky) python-keystoneclient spec file is based off 3.17.0 (rocky) python-magnumclient spec file is based off 2.10.0 (rocky) python-muranoclient spec file is based off 1.1.1 (rocky) python-neutronclient spec file is based off 6.9.1 (rocky) python-novaclient spec file is based off 11.0.0 (rocky) - docs disabled python-openstackclient spec file is based off 3.16.2 (rocky) - docs disabled - unit tests disabled python-openstacksdk spec file is based of 0.17.2 (rocky) - unit tests disabled python-pankoclient spec file is based off 0.5.0 (rocky) The primary changes to each spec files are 1) version has tis extension 2) sdk package added 3) wheels package added Disable building: - openstack-aodh - python-osc-lib ceilometerclient no longer exists. openstack-heat no longer requires ceilometerclient Story: 2004751 Task: 28864 Change-Id: Ifa905bea2e95ded72a327f8ff43667c8c5429363 Depends-On: Iea58cb9484c75cf757397d53d7d1576a2f436d81 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
7713430481
commit
d7964a17fb
@ -40,7 +40,7 @@ python2-ironicclient
|
||||
# python-magnumclient
|
||||
python2-magnumclient
|
||||
python-magnumclient-doc
|
||||
python-magnumclient-tests
|
||||
# python-magnumclient-tests
|
||||
|
||||
# openstack-magnum
|
||||
python-magnum
|
||||
@ -147,15 +147,6 @@ distributedcloud-dcorch
|
||||
# distributedcloud-client
|
||||
distributedcloud-client-dcmanagerclient
|
||||
|
||||
# openstack-aodh
|
||||
openstack-aodh-compat
|
||||
openstack-aodh-api
|
||||
openstack-aodh-evaluator
|
||||
openstack-aodh-notifier
|
||||
openstack-aodh-listener
|
||||
openstack-aodh-expirer
|
||||
openstack-aodh-config
|
||||
|
||||
# openstack-panko
|
||||
python-panko
|
||||
openstack-panko-api
|
||||
|
@ -1,5 +1,3 @@
|
||||
openstack/openstack-aodh
|
||||
openstack/openstack-aodh-config
|
||||
openstack/openstack-murano
|
||||
openstack/python-muranoclient
|
||||
openstack/openstack-murano-ui
|
||||
@ -13,8 +11,8 @@ openstack/openstack-panko
|
||||
openstack/openstack-panko-config
|
||||
openstack/openstack-os-vif
|
||||
openstack/python-aodhclient
|
||||
openstack/python-barbicanclient
|
||||
openstack/python-ceilometer
|
||||
openstack/python-ceilometerclient
|
||||
openstack/python-cinder
|
||||
openstack/python-cinderclient
|
||||
openstack/python-glance
|
||||
@ -28,7 +26,6 @@ openstack/python-heatclient
|
||||
openstack/python-horizon
|
||||
openstack/python-keystone
|
||||
openstack/python-keystoneclient
|
||||
openstack/python-keystonemiddleware
|
||||
openstack/python-networking-bgpvpn
|
||||
openstack/python-networking-sfc
|
||||
openstack/python-networking-odl
|
||||
@ -42,11 +39,10 @@ openstack/python-openstackdocstheme
|
||||
openstack/python-oslo-concurrency
|
||||
openstack/python-oslo-service
|
||||
openstack/python-oslo-messaging
|
||||
openstack/python-pankoclient
|
||||
openstack/rabbitmq-server
|
||||
openstack/rabbitmq-server-config
|
||||
openstack/python-keystoneauth1
|
||||
openstack/python-openstackclient
|
||||
openstack/python-osc-lib
|
||||
openstack/python-openstacksdk
|
||||
openstack/python-django-openstack-auth
|
||||
openstack/python-wsme
|
||||
|
@ -1 +1,3 @@
|
||||
TIS_PATCH_VER=1
|
||||
TAR_NAME=aodhclient
|
||||
SRC_DIR=$CGCS_BASE/git/python-aodhclient
|
||||
TIS_PATCH_VER=0
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff --git a/SPECS/python-aodhclient.spec b/SPECS/python-aodhclient.spec
|
||||
index 5d60fe2..ec5afaa 100644
|
||||
--- a/SPECS/python-aodhclient.spec
|
||||
+++ b/SPECS/python-aodhclient.spec
|
||||
@@ -8,13 +8,15 @@
|
||||
|
||||
Name: python-aodhclient
|
||||
Version: 0.9.0
|
||||
-Release: 1%{?dist}
|
||||
+Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://launchpad.net/python-aodhclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz
|
||||
|
||||
+Patch0: 0001-fix-interface.patch
|
||||
+
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
@ -1 +0,0 @@
|
||||
0001-spec.patch
|
@ -1,15 +0,0 @@
|
||||
diff --git a/aodhclient/osc.py b/aodhclient/osc.py
|
||||
index 1e8599f..a1ecfee 100644
|
||||
--- a/aodhclient/osc.py
|
||||
+++ b/aodhclient/osc.py
|
||||
@@ -39,7 +39,9 @@ def make_client(instance):
|
||||
API_VERSIONS)
|
||||
# NOTE(sileht): ensure setup of the session is done
|
||||
instance.setup_auth()
|
||||
- return aodh_client(session=instance.session)
|
||||
+ return aodh_client(session=instance.session,
|
||||
+ interface=instance.interface,
|
||||
+ region_name=instance.region_name)
|
||||
|
||||
|
||||
def build_option_parser(parser):
|
207
openstack/python-aodhclient/centos/python-aodhclient.spec
Normal file
207
openstack/python-aodhclient/centos/python-aodhclient.spec
Normal file
@ -0,0 +1,207 @@
|
||||
%global pypi_name aodhclient
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global common_desc \
|
||||
This is a client library for Aodh built on the Aodh API. It \
|
||||
provides a Python API (the aodhclient module) and a command-line tool.
|
||||
|
||||
Name: python-aodhclient
|
||||
Version: 1.1.1
|
||||
Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://launchpad.net/python-aodhclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-wheel
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: git
|
||||
|
||||
Requires: python-pbr
|
||||
Requires: python-cliff >= 1.14.0
|
||||
Requires: python-oslo-i18n >= 1.5.0
|
||||
Requires: python-oslo-serialization >= 1.4.0
|
||||
Requires: python-oslo-utils >= 2.0.0
|
||||
Requires: python-keystoneauth1 >= 1.0.0
|
||||
Requires: python-six >= 1.9.0
|
||||
Requires: python-osc-lib >= 1.0.1
|
||||
Requires: pyparsing
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Aodh API Client
|
||||
|
||||
BuildRequires: python-sphinx
|
||||
# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-c
|
||||
BuildRequires: python-oslo-sphinx
|
||||
BuildRequires: python-openstackdocstheme
|
||||
BuildRequires: python-keystoneauth1
|
||||
BuildRequires: python-oslo-utils
|
||||
BuildRequires: python-oslo-serialization
|
||||
BuildRequires: python-cliff
|
||||
|
||||
|
||||
%description doc
|
||||
%{common_desc}
|
||||
(aodh).
|
||||
|
||||
This package contains auto-generated documentation.
|
||||
|
||||
%package -n python2-%{pypi_name}-tests
|
||||
Summary: Python API and CLI for OpenStack Aodh Tests
|
||||
Requires: python2-%{pypi_name} = %{version}-%{release}
|
||||
|
||||
%description -n python2-%{pypi_name}-tests
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pbr
|
||||
|
||||
Requires: python3-pbr
|
||||
Requires: python3-cliff >= 1.14.0
|
||||
Requires: python3-oslo-i18n >= 1.5.0
|
||||
Requires: python3-oslo-serialization >= 1.4.0
|
||||
Requires: python3-oslo-utils >= 2.0.0
|
||||
Requires: python3-keystoneauth1 >= 1.0.0
|
||||
Requires: python3-six >= 1.9.0
|
||||
Requires: python3-osc-lib >= 1.0.1
|
||||
Requires: python3-pyparsing
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
%{common_desc}
|
||||
|
||||
%package -n python3-%{pypi_name}-tests
|
||||
Summary: Python API and CLI for OpenStack Aodh Tests
|
||||
Requires: python3-%{pypi_name} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{pypi_name}-tests
|
||||
%{common_desc}
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pypi_name}-%{upstream_version} -S git
|
||||
|
||||
# Let RPM handle the requirements
|
||||
rm -f {,test-}requirements.txt
|
||||
|
||||
|
||||
%build
|
||||
export PBR_VERSION=%{version}
|
||||
%py2_build
|
||||
%py2_build_wheel
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
export PBR_VERSION=%{version}
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python3_version}
|
||||
ln -s ./aodh-%{python3_version} %{buildroot}%{_bindir}/aodh-3
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python2_version}
|
||||
ln -s ./aodh-%{python2_version} %{buildroot}%{_bindir}/aodh-2
|
||||
|
||||
ln -s ./aodh-2 %{buildroot}%{_bindir}/aodh
|
||||
|
||||
export PYTHONPATH=.
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
|
||||
# STX: stage wheels
|
||||
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||
|
||||
# STX: prep SDK package
|
||||
mkdir -p %{buildroot}/usr/share/remote-clients
|
||||
tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{pypi_name}-%{version}
|
||||
|
||||
%files -n python2-%{pypi_name}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/aodhclient
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%{_bindir}/aodh
|
||||
%{_bindir}/aodh-2
|
||||
%{_bindir}/aodh-%{python2_version}
|
||||
%exclude %{python2_sitelib}/aodhclient/tests
|
||||
|
||||
%files -n python2-%{pypi_name}-tests
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/aodhclient/tests
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{pypi_name}
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{_bindir}/aodh-3
|
||||
%{_bindir}/aodh-%{python3_version}
|
||||
%exclude %{python3_sitelib}/aodhclient/tests
|
||||
|
||||
%files -n python3-%{pypi_name}-tests
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/aodhclient/tests
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
%license LICENSE
|
||||
|
||||
%package sdk
|
||||
Summary: SDK files for %{pypi_name}
|
||||
|
||||
%description sdk
|
||||
Contains SDK files for %{pypi_name} package
|
||||
|
||||
%files sdk
|
||||
/usr/share/remote-clients/%{pypi_name}-%{version}.tgz
|
||||
|
||||
%package wheels
|
||||
Summary: %{name} wheels
|
||||
|
||||
%description wheels
|
||||
Contains python wheels for %{name}
|
||||
|
||||
%files wheels
|
||||
/wheels/*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 09 2018 RDO <dev@lists.rdoproject.org> 1.1.1-1
|
||||
- Update to 1.1.1
|
||||
|
176
openstack/python-aodhclient/centos/python-aodhclient.spec.orig
Normal file
176
openstack/python-aodhclient/centos/python-aodhclient.spec.orig
Normal file
@ -0,0 +1,176 @@
|
||||
%global pypi_name aodhclient
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global common_desc \
|
||||
This is a client library for Aodh built on the Aodh API. It \
|
||||
provides a Python API (the aodhclient module) and a command-line tool.
|
||||
|
||||
Name: python-aodhclient
|
||||
Version: 1.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://launchpad.net/python-aodhclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: git
|
||||
|
||||
Requires: python-pbr
|
||||
Requires: python-cliff >= 1.14.0
|
||||
Requires: python-oslo-i18n >= 1.5.0
|
||||
Requires: python-oslo-serialization >= 1.4.0
|
||||
Requires: python-oslo-utils >= 2.0.0
|
||||
Requires: python-keystoneauth1 >= 1.0.0
|
||||
Requires: python-six >= 1.9.0
|
||||
Requires: python-osc-lib >= 1.0.1
|
||||
Requires: pyparsing
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Aodh API Client
|
||||
|
||||
BuildRequires: python-sphinx
|
||||
# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-c
|
||||
BuildRequires: python-oslo-sphinx
|
||||
BuildRequires: python-openstackdocstheme
|
||||
BuildRequires: python-keystoneauth1
|
||||
BuildRequires: python-oslo-utils
|
||||
BuildRequires: python-oslo-serialization
|
||||
BuildRequires: python-cliff
|
||||
|
||||
|
||||
%description doc
|
||||
%{common_desc}
|
||||
(aodh).
|
||||
|
||||
This package contains auto-generated documentation.
|
||||
|
||||
%package -n python2-%{pypi_name}-tests
|
||||
Summary: Python API and CLI for OpenStack Aodh Tests
|
||||
Requires: python2-%{pypi_name} = %{version}-%{release}
|
||||
|
||||
%description -n python2-%{pypi_name}-tests
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: Python API and CLI for OpenStack Aodh
|
||||
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pbr
|
||||
|
||||
Requires: python3-pbr
|
||||
Requires: python3-cliff >= 1.14.0
|
||||
Requires: python3-oslo-i18n >= 1.5.0
|
||||
Requires: python3-oslo-serialization >= 1.4.0
|
||||
Requires: python3-oslo-utils >= 2.0.0
|
||||
Requires: python3-keystoneauth1 >= 1.0.0
|
||||
Requires: python3-six >= 1.9.0
|
||||
Requires: python3-osc-lib >= 1.0.1
|
||||
Requires: python3-pyparsing
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
%{common_desc}
|
||||
|
||||
%package -n python3-%{pypi_name}-tests
|
||||
Summary: Python API and CLI for OpenStack Aodh Tests
|
||||
Requires: python3-%{pypi_name} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{pypi_name}-tests
|
||||
%{common_desc}
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pypi_name}-%{upstream_version} -S git
|
||||
|
||||
# Let RPM handle the requirements
|
||||
rm -f {,test-}requirements.txt
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python3_version}
|
||||
ln -s ./aodh-%{python3_version} %{buildroot}%{_bindir}/aodh-3
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python2_version}
|
||||
ln -s ./aodh-%{python2_version} %{buildroot}%{_bindir}/aodh-2
|
||||
|
||||
ln -s ./aodh-2 %{buildroot}%{_bindir}/aodh
|
||||
|
||||
export PYTHONPATH=.
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
|
||||
%files -n python2-%{pypi_name}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/aodhclient
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%{_bindir}/aodh
|
||||
%{_bindir}/aodh-2
|
||||
%{_bindir}/aodh-%{python2_version}
|
||||
%exclude %{python2_sitelib}/aodhclient/tests
|
||||
|
||||
%files -n python2-%{pypi_name}-tests
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/aodhclient/tests
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{pypi_name}
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{_bindir}/aodh-3
|
||||
%{_bindir}/aodh-%{python3_version}
|
||||
%exclude %{python3_sitelib}/aodhclient/tests
|
||||
|
||||
%files -n python3-%{pypi_name}-tests
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/aodhclient/tests
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Aug 09 2018 RDO <dev@lists.rdoproject.org> 1.1.1-1
|
||||
- Update to 1.1.1
|
||||
|
@ -1 +0,0 @@
|
||||
mirror:Source/python-aodhclient-0.9.0-1.el7.src.rpm
|
3
openstack/python-barbicanclient/centos/build_srpm.data
Normal file
3
openstack/python-barbicanclient/centos/build_srpm.data
Normal file
@ -0,0 +1,3 @@
|
||||
TAR_NAME=python-barbicanclient
|
||||
SRC_DIR=$CGCS_BASE/git/python-barbicanclient
|
||||
TIS_PATCH_VER=0
|
@ -0,0 +1,182 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global sname barbicanclient
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global common_desc \
|
||||
This is a client for the Barbican Key Management API. There is a \
|
||||
Python library for accessing the API (barbicanclient module), and \
|
||||
a command-line script (barbican).
|
||||
|
||||
Name: python-barbicanclient
|
||||
Version: 4.7.1
|
||||
Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://pypi.python.org/pypi/python-barbicanclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%package -n python2-%{sname}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-pbr
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-wheel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: git
|
||||
|
||||
Requires: python2-requests
|
||||
Requires: python2-six >= 1.10.0
|
||||
Requires: python2-oslo-i18n >= 3.15.3
|
||||
Requires: python2-oslo-serialization >= 2.18.0
|
||||
Requires: python2-oslo-utils >= 3.33.0
|
||||
Requires: python2-prettytable
|
||||
Requires: python2-keystoneauth1 >= 3.4.0
|
||||
Requires: python2-pbr >= 2.0.0
|
||||
%if 0%{?fedora} > 0
|
||||
Requires: python2-cliff
|
||||
%else
|
||||
Requires: python-cliff
|
||||
%endif
|
||||
|
||||
%{?python_provide:%python_provide python2-%{sname}}
|
||||
|
||||
%description -n python2-%{sname}
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{sname}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
Requires: python3-requests
|
||||
Requires: python3-six >= 1.10.0
|
||||
Requires: python3-cliff
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-serialization >= 2.18.0
|
||||
Requires: python3-oslo-utils >= 3.33.0
|
||||
Requires: python3-prettytable
|
||||
Requires: python3-keystoneauth1 >= 3.4.0
|
||||
Requires: python3-pbr >= 2.0.0
|
||||
|
||||
%{?python_provide:%python_provide python3-%{sname}}
|
||||
|
||||
%description -n python3-%{sname}
|
||||
%{common_desc}
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Barbican API client
|
||||
|
||||
BuildRequires: python2-sphinx
|
||||
BuildRequires: python2-openstackdocstheme
|
||||
BuildRequires: python2-oslo-utils
|
||||
BuildRequires: python2-oslo-i18n
|
||||
BuildRequires: python2-prettytable
|
||||
|
||||
%description doc
|
||||
Documentation for the barbicanclient module
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
# let RPM handle deps
|
||||
sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
|
||||
|
||||
rm -rf {test-,}requirements.txt
|
||||
|
||||
%build
|
||||
export PBR_VERSION=%{version}
|
||||
%py2_build
|
||||
%py2_build_wheel
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
# doc
|
||||
%{__python2} setup.py build_sphinx -b html
|
||||
# Fix hidden-file-or-dir warnings
|
||||
rm -fr doc/build/html/.buildinfo
|
||||
|
||||
%install
|
||||
export PBR_VERSION=%{version}
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python3_version}
|
||||
ln -s ./barbican-%{python3_version} %{buildroot}%{_bindir}/barbican-3
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python2_version}
|
||||
ln -s ./barbican-%{python2_version} %{buildroot}%{_bindir}/barbican-2
|
||||
ln -s ./barbican-2 %{buildroot}%{_bindir}/barbican
|
||||
|
||||
# STX: stage wheels
|
||||
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||
|
||||
# STX: prep SDK package
|
||||
mkdir -p %{buildroot}/usr/share/remote-clients
|
||||
tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version}
|
||||
|
||||
%files -n python2-%{sname}
|
||||
%license LICENSE
|
||||
%doc AUTHORS CONTRIBUTING.rst README.rst ChangeLog
|
||||
%{_bindir}/barbican
|
||||
%{_bindir}/barbican-2*
|
||||
%{python2_sitelib}/barbicanclient
|
||||
%{python2_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{sname}
|
||||
%license LICENSE
|
||||
%doc AUTHORS CONTRIBUTING.rst README.rst ChangeLog
|
||||
%{_bindir}/barbican-3*
|
||||
%{python3_sitelib}/barbicanclient
|
||||
%{python3_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
%license LICENSE
|
||||
|
||||
%package sdk
|
||||
Summary: SDK files for %{name}
|
||||
|
||||
%description sdk
|
||||
Contains SDK files for %{name} package
|
||||
|
||||
%files sdk
|
||||
/usr/share/remote-clients/%{name}-%{version}.tgz
|
||||
|
||||
%package wheels
|
||||
Summary: %{name} wheels
|
||||
|
||||
%description wheels
|
||||
Contains python wheels for %{name}
|
||||
|
||||
%files wheels
|
||||
/wheels/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 27 2018 RDO <dev@lists.rdoproject.org> 4.7.1-1
|
||||
- Update to 4.7.1
|
||||
|
||||
* Wed Aug 08 2018 RDO <dev@lists.rdoproject.org> 4.7.0-1
|
||||
- Update to 4.7.0
|
||||
|
@ -0,0 +1,152 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global sname barbicanclient
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global common_desc \
|
||||
This is a client for the Barbican Key Management API. There is a \
|
||||
Python library for accessing the API (barbicanclient module), and \
|
||||
a command-line script (barbican).
|
||||
|
||||
Name: python-barbicanclient
|
||||
Version: 4.7.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://pypi.python.org/pypi/python-barbicanclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%package -n python2-%{sname}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-pbr
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: git
|
||||
|
||||
Requires: python2-requests
|
||||
Requires: python2-six >= 1.10.0
|
||||
Requires: python2-oslo-i18n >= 3.15.3
|
||||
Requires: python2-oslo-serialization >= 2.18.0
|
||||
Requires: python2-oslo-utils >= 3.33.0
|
||||
Requires: python2-prettytable
|
||||
Requires: python2-keystoneauth1 >= 3.4.0
|
||||
Requires: python2-pbr >= 2.0.0
|
||||
%if 0%{?fedora} > 0
|
||||
Requires: python2-cliff
|
||||
%else
|
||||
Requires: python-cliff
|
||||
%endif
|
||||
|
||||
%{?python_provide:%python_provide python2-%{sname}}
|
||||
|
||||
%description -n python2-%{sname}
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{sname}
|
||||
Summary: Client Library for OpenStack Barbican Key Management API
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
Requires: python3-requests
|
||||
Requires: python3-six >= 1.10.0
|
||||
Requires: python3-cliff
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-serialization >= 2.18.0
|
||||
Requires: python3-oslo-utils >= 3.33.0
|
||||
Requires: python3-prettytable
|
||||
Requires: python3-keystoneauth1 >= 3.4.0
|
||||
Requires: python3-pbr >= 2.0.0
|
||||
|
||||
%{?python_provide:%python_provide python3-%{sname}}
|
||||
|
||||
%description -n python3-%{sname}
|
||||
%{common_desc}
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Barbican API client
|
||||
|
||||
BuildRequires: python2-sphinx
|
||||
BuildRequires: python2-openstackdocstheme
|
||||
BuildRequires: python2-oslo-utils
|
||||
BuildRequires: python2-oslo-i18n
|
||||
BuildRequires: python2-prettytable
|
||||
|
||||
%description doc
|
||||
Documentation for the barbicanclient module
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
# let RPM handle deps
|
||||
sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
|
||||
|
||||
rm -rf {test-,}requirements.txt
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
# doc
|
||||
%{__python2} setup.py build_sphinx -b html
|
||||
# Fix hidden-file-or-dir warnings
|
||||
rm -fr doc/build/html/.buildinfo
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python3_version}
|
||||
ln -s ./barbican-%{python3_version} %{buildroot}%{_bindir}/barbican-3
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python2_version}
|
||||
ln -s ./barbican-%{python2_version} %{buildroot}%{_bindir}/barbican-2
|
||||
ln -s ./barbican-2 %{buildroot}%{_bindir}/barbican
|
||||
|
||||
|
||||
%files -n python2-%{sname}
|
||||
%license LICENSE
|
||||
%doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog
|
||||
%{_bindir}/barbican
|
||||
%{_bindir}/barbican-2*
|
||||
%{python2_sitelib}/barbicanclient
|
||||
%{python2_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{sname}
|
||||
%license LICENSE
|
||||
%doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog
|
||||
%{_bindir}/barbican-3*
|
||||
%{python3_sitelib}/barbicanclient
|
||||
%{python3_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Tue Nov 27 2018 RDO <dev@lists.rdoproject.org> 4.7.1-1
|
||||
- Update to 4.7.1
|
||||
|
||||
* Wed Aug 08 2018 RDO <dev@lists.rdoproject.org> 4.7.0-1
|
||||
- Update to 4.7.0
|
||||
|
@ -1,10 +0,0 @@
|
||||
TAR_NAME=python-ceilometerclient
|
||||
SRC_DIR=$CGCS_BASE/git/python-ceilometerclient
|
||||
|
||||
# Tar everything found in this subdirectory. Define this if source need to be collected into a tarball in SOURCES.
|
||||
# Tar file name and version are derived from PKG-INFO. Alternatively you may define TAR_NAME ad VERSION
|
||||
|
||||
# A Space separated list of paths to copy to .distro/centos7/rpmbuild/SOURCES.
|
||||
#COPY_LIST="$CGCS_BASE/downloads/$CLIENT_NAME-$CLIENT_VER.tar.gz $PKG_BASE/$CLIENT_NAME/*"
|
||||
TIS_BASE_SRCREV=3d4966e6a76c63f6bf4a24d3cb3f86d7a585c1e0
|
||||
TIS_PATCH_VER=GITREVCOUNT
|
@ -1,207 +0,0 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global sname ceilometerclient
|
||||
%global sum Python API and CLI for OpenStack Ceilometer
|
||||
|
||||
Name: python-ceilometerclient
|
||||
Version: 2.9.0
|
||||
Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: %{sum}
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/openstack/%{name}
|
||||
Source0: %{name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: git
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-wheel
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-pbr >= 1.6
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pbr >= 1.6
|
||||
%endif
|
||||
|
||||
%description
|
||||
This is a client library for Ceilometer built on the Ceilometer API. It
|
||||
provides a Python API (the ceilometerclient module) and a command-line tool
|
||||
(ceilometer).
|
||||
|
||||
|
||||
%package -n python2-%{sname}
|
||||
Summary: %{sum}
|
||||
# from requirements.txt
|
||||
Requires: python-iso8601
|
||||
Requires: python-oslo-i18n >= 2.1.0
|
||||
Requires: python-oslo-serialization >= 1.10.0
|
||||
Requires: python-oslo-utils >= 3.17.0
|
||||
Requires: python-requests >= 2.8.1
|
||||
Requires: python-six >= 1.9.0
|
||||
Requires: python-stevedore
|
||||
Requires: python-pbr
|
||||
Requires: python-keystoneauth1 >= 2.1.0
|
||||
Requires: python-prettytable
|
||||
%{?python_provide:%python_provide python2-%{sname}}
|
||||
|
||||
%description -n python2-%{sname}
|
||||
This is a client library for Ceilometer built on the Ceilometer API. It
|
||||
provides a Python API (the ceilometerclient module) and a command-line tool
|
||||
(ceilometer).
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{sname}
|
||||
Summary: %{sum}
|
||||
# from requirements.txt
|
||||
Requires: python3-iso8601
|
||||
Requires: python3-oslo-i18n >= 2.1.0
|
||||
Requires: python3-oslo-serialization >= 1.10.0
|
||||
Requires: python3-oslo-utils >= 3.17.0
|
||||
Requires: python3-requests >= 2.8.1
|
||||
Requires: python3-six >= 1.9.0
|
||||
Requires: python3-stevedore
|
||||
Requires: python3-pbr
|
||||
Requires: python3-keystoneauth1 >= 2.1.0
|
||||
Requires: python3-prettytable
|
||||
%{?python_provide:%python_provide python3-%{sname}}
|
||||
|
||||
# WRS installs to usr/lib and not /usr/lib64
|
||||
|
||||
%description -n python3-%{sname}
|
||||
This is a client library for Ceilometer built on the Ceilometer API. It
|
||||
provides a Python API (the ceilometerclient module) and a command-line tool
|
||||
(ceilometer).
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Ceilometer API Client
|
||||
|
||||
BuildRequires: python-sphinx
|
||||
# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-u
|
||||
BuildRequires: python-oslo-sphinx
|
||||
BuildRequires: python-openstackdocstheme
|
||||
|
||||
%description doc
|
||||
This is a client library for Ceilometer built on the Ceilometer API. It
|
||||
provides a Python API (the ceilometerclient module) and a command-line tool
|
||||
(ceilometer).
|
||||
|
||||
This package contains auto-generated documentation.
|
||||
|
||||
|
||||
%package sdk
|
||||
Summary: SDK files for %{name}
|
||||
|
||||
%description sdk
|
||||
Contains SDK files for %{name} package
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf python_%{sname}.egg-info
|
||||
|
||||
# Let RPM handle the requirements
|
||||
rm -f test-requirements.txt
|
||||
|
||||
%build
|
||||
export PBR_VERSION=%{version}
|
||||
%py2_build
|
||||
%py2_build_wheel
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
export PBR_VERSION=%{version}
|
||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/ceilometer %{buildroot}%{_bindir}/ceilometer-%{python3_version}
|
||||
ln -s ./ceilometer-%{python3_version} %{buildroot}%{_bindir}/ceilometer-3
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/ceilometer %{buildroot}%{_bindir}/ceilometer-%{python2_version}
|
||||
ln -s ./ceilometer-%{python2_version} %{buildroot}%{_bindir}/ceilometer-2
|
||||
|
||||
ln -s ./ceilometer-2 %{buildroot}%{_bindir}/ceilometer
|
||||
|
||||
# Delete tests
|
||||
rm -fr %{buildroot}%{python2_sitelib}/%{sname}/tests
|
||||
%if 0%{?with_python3}
|
||||
rm -fr %{buildroot}%{python3_sitelib}/%{sname}/tests
|
||||
%endif
|
||||
|
||||
# Build HTML docs
|
||||
%{__python2} setup.py build_sphinx -b html
|
||||
|
||||
# Fix hidden-file-or-dir warnings
|
||||
rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo
|
||||
|
||||
# WRS
|
||||
install -d %{buildroot}/%{_sysconfdir}/bash_completion.d
|
||||
install -m 664 tools/ceilometer.bash_completion %{buildroot}/%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion
|
||||
|
||||
# prep SDK package
|
||||
mkdir -p %{buildroot}/usr/share/remote-clients
|
||||
tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version}
|
||||
|
||||
%files -n python2-%{sname}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python2_sitelib}/%{sname}
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%{_bindir}/ceilometer
|
||||
%{_bindir}/ceilometer-2
|
||||
%{_bindir}/ceilometer-%{python2_version}
|
||||
%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{sname}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{sname}
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{_bindir}/ceilometer-3
|
||||
%{_bindir}/ceilometer-%{python3_version}
|
||||
%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion
|
||||
%endif # with_python3
|
||||
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
|
||||
%files sdk
|
||||
/usr/share/remote-clients/%{name}-%{version}.tgz
|
||||
|
||||
%package wheels
|
||||
Summary: %{name} wheels
|
||||
|
||||
%description wheels
|
||||
Contains python wheels for %{name}
|
||||
|
||||
%files wheels
|
||||
/wheels/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 11 2017 Alfredo Moralejo <amoralej@redhat.com> 2.9.0-1
|
||||
- Update to 2.9.0
|
||||
|
@ -1,10 +1,3 @@
|
||||
TAR_NAME=python-cinderclient
|
||||
SRC_DIR=$CGCS_BASE/git/python-cinderclient
|
||||
|
||||
# Tar everything found in this subdirectory. Define this if source need to be collected into a tarball in SOURCES.
|
||||
# Tar file name and version are derived from PKG-INFO. Alternatively you may define TAR_NAME ad VERSION
|
||||
|
||||
# A Space separated list of paths to copy to .distro/centos7/rpmbuild/SOURCES.
|
||||
#COPY_LIST="$CGCS_BASE/downloads/$CLIENT_NAME-$CLIENT_VER.tar.gz $PKG_BASE/$CLIENT_NAME/*"
|
||||
TIS_BASE_SRCREV=3640aeab6e11987288a2f149fbeedb1c026045e2
|
||||
TIS_PATCH_VER=GITREVCOUNT
|
||||
TIS_PATCH_VER=0
|
||||
|
@ -5,8 +5,12 @@
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global common_desc \
|
||||
Client library (cinderclient python module) and command line utility \
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
|
||||
Name: python-cinderclient
|
||||
Version: 3.1.0
|
||||
Version: 4.0.1
|
||||
Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Python API and CLI for OpenStack Cinder
|
||||
|
||||
@ -19,34 +23,37 @@ BuildArch: noarch
|
||||
BuildRequires: git
|
||||
|
||||
%description
|
||||
Client library (cinderclient python module) and command line utility
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
%{common_desc}
|
||||
|
||||
%package -n python2-%{sname}
|
||||
Summary: Python API and CLI for OpenStack Cinder
|
||||
%{?python_provide:%python_provide python2-%{sname}}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-wheel
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-pbr
|
||||
%if 0%{?fedora} > 0
|
||||
BuildRequires: python2-d2to1
|
||||
%else
|
||||
BuildRequires: python-d2to1
|
||||
%endif
|
||||
|
||||
Requires: python-babel
|
||||
Requires: python-pbr
|
||||
Requires: python-prettytable
|
||||
Requires: python-requests
|
||||
Requires: python-setuptools
|
||||
Requires: python2-babel
|
||||
Requires: python2-pbr
|
||||
Requires: python2-prettytable
|
||||
Requires: python2-requests
|
||||
Requires: python2-six
|
||||
Requires: python2-keystoneauth1 >= 3.4.0
|
||||
Requires: python2-oslo-i18n >= 3.15.3
|
||||
Requires: python2-oslo-utils >= 3.33.0
|
||||
%if 0%{?fedora} > 0
|
||||
Requires: python2-simplejson
|
||||
%else
|
||||
Requires: python-simplejson
|
||||
Requires: python-six
|
||||
Requires: python-keystoneauth1 >= 2.21.0
|
||||
Requires: python-oslo-i18n >= 3.9.0
|
||||
Requires: python-oslo-utils >= 3.20.0
|
||||
%endif
|
||||
|
||||
%description -n python2-%{sname}
|
||||
Client library (cinderclient python module) and command line utility
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
@ -66,13 +73,12 @@ Requires: python3-requests
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-simplejson
|
||||
Requires: python3-six
|
||||
Requires: python3-keystoneauth1 >= 2.21.0
|
||||
Requires: python3-oslo-i18n >= 3.9.0
|
||||
Requires: python3-oslo-utils >= 3.20.0
|
||||
Requires: python3-keystoneauth1 >= 3.4.0
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-utils >= 3.33.0
|
||||
|
||||
%description -n python3-%{sname}
|
||||
Client library (cinderclient python module) and command line utility
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
%{common_desc}
|
||||
%endif
|
||||
|
||||
|
||||
@ -85,16 +91,10 @@ BuildRequires: python-sphinx
|
||||
BuildRequires: python-openstackdocstheme
|
||||
|
||||
%description doc
|
||||
Client library (cinderclient python module) and command line utility
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
%{common_desc}
|
||||
|
||||
This package contains auto-generated documentation.
|
||||
|
||||
%package sdk
|
||||
Summary: SDK files for %{name}
|
||||
|
||||
%description sdk
|
||||
Contains SDK files for %{name} package
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
@ -113,18 +113,13 @@ export PBR_VERSION=%{version}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
# FIXME (amoralej): following manual edit on conf.py is required for man page
|
||||
# until https://review.openstack.org/#/c/489123 is merged
|
||||
sed -i 's/man\/cinder/user\/cinder/' doc/source/conf.py
|
||||
|
||||
%{__python2} setup.py build_sphinx -b html
|
||||
%{__python2} setup.py build_sphinx -b man
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
sphinx-build -W -b man doc/source doc/build/man
|
||||
|
||||
# Fix hidden-file-or-dir warnings
|
||||
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
||||
|
||||
%install
|
||||
export PBR_VERSION=%{version}
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python3_version}
|
||||
@ -151,6 +146,7 @@ install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1
|
||||
mkdir -p %{buildroot}/usr/share/remote-clients
|
||||
tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version}
|
||||
|
||||
|
||||
%files -n python2-%{sname}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
@ -173,6 +169,12 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
|
||||
%package sdk
|
||||
Summary: SDK files for %{name}
|
||||
|
||||
%description sdk
|
||||
Contains SDK files for %{name} package
|
||||
|
||||
%files sdk
|
||||
/usr/share/remote-clients/%{name}-%{version}.tgz
|
||||
|
||||
@ -186,6 +188,6 @@ Contains python wheels for %{name}
|
||||
/wheels/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 11 2017 Alfredo Moralejo <amoralej@redhat.com> 3.1.0-1
|
||||
- Update to 3.1.0
|
||||
* Thu Aug 09 2018 RDO <dev@lists.rdoproject.org> 4.0.1-1
|
||||
- Update to 4.0.1
|
||||
|
||||
|
@ -0,0 +1,166 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global sname cinderclient
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global common_desc \
|
||||
Client library (cinderclient python module) and command line utility \
|
||||
(cinder) for interacting with OpenStack Cinder (Block Storage) API.
|
||||
|
||||
Name: python-cinderclient
|
||||
Version: 4.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Python API and CLI for OpenStack Cinder
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://github.com/openstack/python-cinderclient
|
||||
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: git
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
%package -n python2-%{sname}
|
||||
Summary: Python API and CLI for OpenStack Cinder
|
||||
%{?python_provide:%python_provide python2-%{sname}}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-pbr
|
||||
%if 0%{?fedora} > 0
|
||||
BuildRequires: python2-d2to1
|
||||
%else
|
||||
BuildRequires: python-d2to1
|
||||
%endif
|
||||
|
||||
Requires: python2-babel
|
||||
Requires: python2-pbr
|
||||
Requires: python2-prettytable
|
||||
Requires: python2-requests
|
||||
Requires: python2-six
|
||||
Requires: python2-keystoneauth1 >= 3.4.0
|
||||
Requires: python2-oslo-i18n >= 3.15.3
|
||||
Requires: python2-oslo-utils >= 3.33.0
|
||||
%if 0%{?fedora} > 0
|
||||
Requires: python2-simplejson
|
||||
%else
|
||||
Requires: python-simplejson
|
||||
%endif
|
||||
|
||||
%description -n python2-%{sname}
|
||||
%{common_desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{sname}
|
||||
Summary: Python API and CLI for OpenStack Cinder
|
||||
%{?python_provide:%python_provide python3-%{sname}}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-d2to1
|
||||
|
||||
Requires: python3-babel
|
||||
Requires: python3-pbr
|
||||
Requires: python3-prettytable
|
||||
Requires: python3-requests
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-simplejson
|
||||
Requires: python3-six
|
||||
Requires: python3-keystoneauth1 >= 3.4.0
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-utils >= 3.33.0
|
||||
|
||||
%description -n python3-%{sname}
|
||||
%{common_desc}
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Cinder API Client
|
||||
Group: Documentation
|
||||
|
||||
BuildRequires: python-reno
|
||||
BuildRequires: python-sphinx
|
||||
BuildRequires: python-openstackdocstheme
|
||||
|
||||
%description doc
|
||||
%{common_desc}
|
||||
|
||||
This package contains auto-generated documentation.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf python_cinderclient.egg-info
|
||||
|
||||
# Let RPM handle the requirements
|
||||
rm -f {,test-}requirements.txt
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
sphinx-build -W -b man doc/source doc/build/man
|
||||
|
||||
# Fix hidden-file-or-dir warnings
|
||||
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python3_version}
|
||||
ln -s ./cinder-%{python3_version} %{buildroot}%{_bindir}/cinder-3
|
||||
# Delete tests
|
||||
rm -fr %{buildroot}%{python3_sitelib}/cinderclient/tests
|
||||
%endif
|
||||
|
||||
%py2_install
|
||||
mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python2_version}
|
||||
ln -s ./cinder-%{python2_version} %{buildroot}%{_bindir}/cinder-2
|
||||
# Delete tests
|
||||
rm -fr %{buildroot}%{python2_sitelib}/cinderclient/tests
|
||||
|
||||
ln -s ./cinder-2 %{buildroot}%{_bindir}/cinder
|
||||
|
||||
install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/cinder.bash_completion
|
||||
|
||||
install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1
|
||||
|
||||
%files -n python2-%{sname}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{_bindir}/cinder
|
||||
%{_bindir}/cinder-2*
|
||||
%{python2_sitelib}/cinderclient
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%{_sysconfdir}/bash_completion.d/cinder.bash_completion
|
||||
%{_mandir}/man1/cinder.1*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{sname}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{_bindir}/cinder-3*
|
||||
%{python3_sitelib}/cinderclient
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
|
||||
%changelog
|
||||
* Thu Aug 09 2018 RDO <dev@lists.rdoproject.org> 4.0.1-1
|
||||
- Update to 4.0.1
|
||||
|
@ -1,5 +1,3 @@
|
||||
TAR_NAME=python-glanceclient
|
||||
SRC_DIR="$CGCS_BASE/git/python-glanceclient"
|
||||
COPY_LIST="$FILES_BASE/*"
|
||||
TIS_BASE_SRCREV=13b25ff1fed908cfe7b4e719a97efd7121e3be96
|
||||
TIS_PATCH_VER=GITREVCOUNT
|
||||
TIS_PATCH_VER=0
|
||||
|
@ -1,209 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2016 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
backup_dir="/opt/backups"
|
||||
tmp_dir="${backup_dir}/image_temp"
|
||||
|
||||
function usage {
|
||||
cat <<"EOF"
|
||||
Helper tool for backing up Glance images
|
||||
Usage:
|
||||
image-backup export <uuid> - export the image with <uuid> into backup file /opt/backups/image_<uuid>.tgz
|
||||
image-backup import image_<uuid>.tgz - import the image from the backup source file at /opt/backups/image_<uuid>.tgz
|
||||
into the corresponding image.
|
||||
|
||||
Temporary files are stored in /opt/backups/image_temp
|
||||
|
||||
Please consult the System Backups section of the Administration Guide.
|
||||
EOF
|
||||
}
|
||||
|
||||
function create_tmp {
|
||||
if [ ! -d ${backup_dir} ]; then
|
||||
echo "Error: backup directory ${backup_dir} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
# Create temporary directory
|
||||
if [ ! -d ${tmp_dir} ]; then
|
||||
mkdir ${tmp_dir}
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function remove_tmp {
|
||||
# Remove temporary files and directory if not empty
|
||||
local uuid=$1
|
||||
rm -f ${tmp_dir}/${uuid}*
|
||||
rmdir --ignore-fail-on-non-empty ${tmp_dir} &>/dev/null
|
||||
}
|
||||
|
||||
function export_file_from_rbd_image {
|
||||
local file=$1
|
||||
rbd export -p images ${file} ${tmp_dir}/${file}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to export image ${file} from Ceph images pool, please check status of storage cluster"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function export_image {
|
||||
local uuid=$1
|
||||
|
||||
# Check if the corresponding image is present in the RBD pool
|
||||
rbd -p images ls | grep -q -e "^${uuid}$"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Corresponding file for image with id: ${uuid} was not found in the RBD images pool"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
|
||||
# Export original image
|
||||
export_file_from_rbd_image ${uuid}
|
||||
|
||||
# Export raw cache if present
|
||||
rbd -p images ls | grep -q ${uuid}_raw
|
||||
if [ $? -eq 0 ]; then
|
||||
export_file_from_rbd_image ${uuid}_raw
|
||||
raw="${uuid}_raw"
|
||||
fi
|
||||
|
||||
echo -n "Creating backup archive..."
|
||||
archive="${backup_dir}/image_${uuid}.tgz"
|
||||
tar czf ${archive} -C ${tmp_dir} ${uuid} ${raw}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to create archive ${archive}"
|
||||
remove_tmp; exit 1
|
||||
else
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
echo "Backup archive ${archive} created"
|
||||
}
|
||||
|
||||
function import_file_to_rbd_image {
|
||||
local file=$1
|
||||
local snap="images/${file}@snap"
|
||||
rbd import --image-format 2 ${tmp_dir}/${file} images/${file}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to import image ${file} into Ceph images pool, please check status of storage cluster"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
rbd snap create ${snap} 1>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to create snapshot ${snap}, please check status of storage cluster"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
rbd snap protect ${snap} 1>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to protect snapshot ${snap}, please check status of storage cluster"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function import_image {
|
||||
local uuid=$1
|
||||
|
||||
# Storage cluster must be healthy before starting the import
|
||||
if [ ! "$(ceph health)" = "HEALTH_OK" ]; then
|
||||
echo "Error: The storage cluster health must be HEALTH_OK before proceding"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
|
||||
# Check if the corresponding image is already present in the RBD pool
|
||||
rbd -p images ls | grep -q -e "^${uuid}$"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Error: Image with id: ${uuid} is already imported"
|
||||
remove_tmp; exit 1
|
||||
fi
|
||||
|
||||
# Import original image
|
||||
import_file_to_rbd_image ${uuid}
|
||||
|
||||
# Import raw cache
|
||||
if [ -f "${tmp_dir}/${uuid}_raw" ]; then
|
||||
import_file_to_rbd_image ${uuid}_raw
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
echo "This script must be executed as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
source /etc/nova/openrc
|
||||
|
||||
# Check if glance is using ceph as RBD
|
||||
cat /etc/glance/glance-api.conf | grep -q -e "^stores.*=.*rbd"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Glance is not configured to use the ceph backend."
|
||||
echo "This command should be used only on setups with configured Ceph storage."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "export" ]; then
|
||||
# Check that glance image is present in glance
|
||||
glance image-list | tail -n +3 | awk '{print $2}' | grep -q $2
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Glance image with id: $2 not found. Please try with an existing image id."
|
||||
remove_tmp; exit 1
|
||||