%{?!_licensedir:%global license %%doc} %{!?upstream_version: %global upstream_version %{version}} Name: openstack-ironic-python-agent Summary: A python agent for provisioning and deprovisioning bare metal servers Version: 0.1 Release: 0.1.gite6439ca1d06a50e72b97975da9b3963ba04ba841 License: ASL 2.0 URL: https://github.com/openstack/ironic-python-agent Source0: ironic-python-agent-0.1.0.dev731.tar.gz Source1: openstack-ironic-python-agent.service BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python-pbr BuildRequires: python2-devel BuildRequires: systemd Requires: python-ironic-python-agent = %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd # TODO(trown) when the following packages are available, package for py3: # python3-eventlet # python3-oslo-concurrency # python3-oslo-i18n # python3-oslo-log # python3-oslo-serialization # python3-oslo-service # python3-oslo-utils # python3-pecan # python3-pint # python3-wsme %description An agent for controlling and deploying Ironic controlled bare metal nodes. The ironic-python-agent works with the agent driver in Ironic to provision the node. Starting with ironic-python-agent running on a ramdisk on the unprovisioned node, Ironic makes API calls to ironic-python-agent to provision the machine. This allows for greater control and flexibility of the entire deployment process. The ironic-python-agent may also be used with the original Ironic pxe drivers as of the Kilo OpenStack release. %package -n python2-ironic-python-agent Summary: Python library for the ironic python agent. %{?python_provide:%python_provide python2-ironic-python-agent} Requires: python-pbr Requires: python-babel Requires: python-eventlet Requires: python-iso8601 Requires: python-netifaces Requires: python-oslo-config Requires: python-oslo-concurrency Requires: python-oslo-i18n Requires: python-oslo-log Requires: python-oslo-serialization Requires: python-oslo-service Requires: python-oslo-utils Requires: python-pecan Requires: python-pint Requires: python-psutil Requires: python-pyudev Requires: python-requests Requires: python-six Requires: python-stevedore Requires: python-wsme %description -n python2-ironic-python-agent Python library for ironic python agent. %package -n python2-ironic-python-agent-doc Summary: Documentation for ironic python agent. %description -n python2-ironic-python-agent-doc Documentation for ironic python agent. %prep # %%autosetup -v -p 1 -n ironic-python-agent-%{upstream_version} # Until we have a proper release upstream we have to use a # pre-release source tarball. The source tarballl was created as follows: # git clone https://github.com/openstack/ironic-python-agent.git # cd ironic-python-agent # git checkout e6439ca1d06a50e72b97975da9b3963ba04ba841 # python setup.py sdist # The source tarball will then be in the dist directory. %autosetup -v -p 1 -n ironic-python-agent-0.1.0.dev731 rm -rf *.egg-info # Remove the requirements file so that pbr hooks don't add it # to distutils requires_dist config rm -rf {test-,}requirements.txt tools/{pip,test}-requires %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root=%{buildroot} # TODO(trown) build the docs as below once we either remove the upstream # requirement on python-sphinxcontrib-pecanwsme, or it exists in rawhide. # For now, we will just include the raw restructured text. # export PYTHONPATH="$( pwd ):$PYTHONPATH" # pushd doc # sphinx-build -b html -d build/doctrees source build/html # popd # install systemd scripts mkdir -p %{buildroot}%{_unitdir} install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir} install -p -D -m 644 etc/ironic_python_agent/ironic_python_agent.conf.sample %{buildroot}/%{_sysconfdir}/ironic-python-agent/agent.conf %files %doc README.rst %license LICENSE %config(noreplace) %attr(-,root,root) %{_sysconfdir}/ironic-python-agent %{_bindir}/ironic-python-agent %{_unitdir}/openstack-ironic-python-agent.service %files -n python2-ironic-python-agent %{python2_sitelib}/ironic_python_agent* # TODO(trown) add egg-info once the agent is released on pypi %files -n python2-ironic-python-agent-doc %doc doc/source %license LICENSE %post %systemd_post openstack-ironic-python-agent.service %preun %systemd_preun openstack-ironic-python-agent.service %postun %systemd_postun_with_restart openstack-ironic-python-agent.service %changelog * Wed Aug 26 2015 John Trowbridge - 0.1.0-0.1.gite6439ca1d06a50e72b97975da9b3963ba04ba841 - Initial package build