File openstack-nova-docker.spec of Package openstack-nova-docker
#
# spec file for package openstack-nova-docker
#
# Copyright (c) 2015 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/
#
%define component nova-docker
%define version_unconverted 0.0.1.dev238
Name: openstack-%{component}
Version: 0.0.1~a0~dev238
Release: 0
Summary: Docker Driver for OpenStack Compute (Nova)
License: Apache-2.0
Group: System/Management
Url: https://wiki.openstack.org/wiki/Docker
Source: http://tarballs.openstack.org/nova-docker/nova-docker-stable-liberty.tar.gz
Patch0: 0001-When-creating-a-container-wait-for-network-events.patch
# PATCH-FIX-UPSTREAM https://review.openstack.org/#/c/254487/
BuildRequires: fdupes
BuildRequires: openstack-suse-macros
BuildRequires: python-base
BuildRequires: python-pbr >= 0.5.21
Requires: python >= 2.6.8
Requires: python-Babel >= 1.3
Requires: python-docker-py >= 1.1.0
Requires: python-oslo.concurrency >= 2.3.0
Requires: python-oslo.config >= 2.3.0
Requires: python-oslo.serialization >= 1.4.0
Requires: python-oslo.utils >= 2.0.0
Requires: python-oslo.i18n >= 1.5.0
Requires: python-pbr >= 1.6
Requires: python-six >= 1.9.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
The Docker driver is a hypervisor driver for Openstack Nova Compute.
%package test
Summary: Docker Driver for OpenStack Compute (Nova) - Testsuite
Group: System/Management
Requires: %{name} = %{version}
Requires: python-fixtures >= 1.3.1
Requires: python-hacking >= 0.9.2
Requires: python-mock >= 1.2
Requires: python-mox3 >= 0.7.0
Requires: python-oslotest >= 1.10.0
Requires: python-nova
Requires: python-python-subunit >= 0.0.18
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 1.4.0
%description test
The testsuite for the Docker driver for OpenStack Nova Compute.
%prep
%setup -q -n %{component}-%{version_unconverted}
%patch0 -p1
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --root %{buildroot} --prefix %{_prefix}
install -d -m 755 %{buildroot}%{_sysconfdir}/nova/
cp -a etc/nova/rootwrap.d/ %{buildroot}%{_sysconfdir}/nova/
%fdupes %{buildroot}%{python_sitelib}/nova_docker-*.egg-info
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%dir %{_sysconfdir}/nova
%dir %{_sysconfdir}/nova/rootwrap.d
%config %{_sysconfdir}/nova/rootwrap.d/docker.filters
%{python_sitelib}/novadocker/
%{python_sitelib}/nova_docker-*.egg-info
# Part of test subpackage
%exclude %{python_sitelib}/novadocker/tests/
%files test
%defattr(-,root,root)
%{python_sitelib}/novadocker/tests/
%changelog