File openstack-nova-docker.spec of Package openstack-nova-docker
#
# spec file for package openstack-nova-docker
#
# Copyright (c) 2014 SUSE LINUX Products 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.dev142
Name: openstack-%{component}
Version: 0.0.1~a0~dev142
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-juno.tar.gz
Patch1: 01_Inject_SSH_keys_into_the_docker_container.patch
Patch2: 02_Flesh_out_total_and_used_vcpu_information.patch
Patch3: 03_Return_empty_string_for_get_console_output.patch
Patch4: 04_Extract_DNS_entries_from_network_info.patch
Patch5: 05_Configure_root_directory_for_docker_daemon.patch
Patch6: 06_Pass_launch_metadata_as_enviroment_variables.patch
Patch7: 07_Unpause_the_container_before_stopping.patch
Patch8: 08_Give_some_time_for_docker.stop_to_work.patch
Patch10: 10_Adds_Security_Group_support_with_OVS_Bridge.patch
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 >= 0.5.1
Requires: python-oslo.concurrency >= 0.3.0
Requires: python-oslo.config >= 1.4.0
Requires: python-oslo.serialization >= 1.0.0
Requires: python-oslo.utils >= 1.4.0
Requires: python-pbr >= 0.6
Requires: python-six >= 1.7.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}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires: python-discover
%endif
Requires: python-fixtures >= 0.3.14
Requires: python-mock >= 1.0
Requires: python-mox >= 0.5.3
Requires: python-nova
Requires: python-python-subunit
Requires: python-testrepository >= 0.0.17
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 0.9.32
%description test
The testsuite for the Docker driver for OpenStack Nova Compute.
%prep
%setup -q -n %{component}-%{version_unconverted}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch10 -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