File python-Bareon.spec of Package python-Bareon
#
# spec file for package python-Bareon
#
# Copyright (c) 2020 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 https://bugs.opensuse.org/
#
%global pypi_name Bareon
%global sname bareon
%global sversion 0.0.1a3
Name: python-Bareon
Version: 0.0.1~a3
Release: 0
Summary: OpenStack bareon tool
License: Apache-2.0
Group: Applications/System
Url: https://launchpad.net/%{sname}
Source0: https://pypi.io/packages/source/b/bareon/%{sname}-%{sversion}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-jsonschema
BuildRequires: python-mock
BuildRequires: python-oslo.config
BuildRequires: python-oslo.serialization
BuildRequires: python-pbr
BuildRequires: python-requests-mock
BuildRequires: python-setuptools
BuildRequires: python-unittest2
BuildRequires: python-yaml
Requires: bzip2
Requires: cloud-utils
Requires: coreutils
Requires: debootstrap
Requires: dmidecode
Requires: e2fsprogs
Requires: ethtool
Requires: gdisk
Requires: genisoimage
Requires: gzip
Requires: lvm2
Requires: mdadm
Requires: openssh-clients
Requires: parted
Requires: pciutils
Requires: psmisc
Requires: python-Jinja2
Requires: python-PyYAML
Requires: python-iso8601
Requires: python-jsonschema
Requires: python-oslo.config
Requires: python-oslo.serialization
Requires: python-requests
Requires: python-six
Requires: python-stevedore
Requires: python-urllib3
Requires: tar
Requires: udev
Requires: util-linux-ng
Requires: xfsprogs
Requires: xz
BuildArch: noarch
%description
Bareon is nothing more than just a set of data driven executable scripts:
* One of these scripts is used for building operating system images. One can
run this script on wherever needed passing a set of repository URIs and a set of
package names that are to be installed into the image.
* Another script is used for the actual provisioning. This script being installed
into a ramdisk (live image) can be run to provision an operating system on a
hard drive. When running one needs to pass input data that contain information
about disk partitions, initial node configuration, operating system image
location, etc. This script is to prepare disk partitions according to the input
data, download operating system images and put these images on partitions.
%package doc
Summary: Documentation for OpenStack bareon
Group: Applications/System
BuildRequires: python-Sphinx
BuildRequires: python-oslosphinx
%description doc
Documentation for OpenStack bareon tool.
%prep
%setup -q -n %{sname}-%{sversion}
%build
%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
mkdir -p %{buildroot}/%{_sysconfdir}/bareon
mkdir -p %{buildroot}%{_datadir}/%{sname}/cloud-init-templates
install -p -D -m 640 etc/bareon/bareon.conf.sample %{buildroot}/%{_sysconfdir}/bareon/bareon.conf
install -p -D -m 644 cloud-init-templates/* %{buildroot}%{_datadir}/%{sname}/cloud-init-templates
%files
%license LICENSE
%doc ChangeLog README.md
%dir %{_sysconfdir}/bareon
%config(noreplace) %attr(-, root, root) %{_sysconfdir}/bareon/bareon.conf
%dir %{_datadir}/%{sname}
%{_datadir}/%{sname}/cloud-init-templates
%{_bindir}/bareon-*
%{python2_sitelib}/%{sname}
%{python2_sitelib}/*.egg-info
%files doc
%doc doc/build/html
%license LICENSE
%changelog