File python-Bareon.spec of Package python-Bareon

# spec file for package python-Bareon
# Copyright (c) 2020 SUSE LLC
# 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

%global pypi_name Bareon
%global sname bareon
%global sversion 0.0.1a3
Name:           python-Bareon
Version:        0.0.1~xalpha3
Release:        0
Summary:        OpenStack bareon tool
License:        Apache-2.0
Group:          System/Management
URL:  {sname}
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:       coreutils
Requires:       dmidecode
Requires:       e2fsprogs
Requires:       ethtool
Requires:       gdisk
Requires:       genisoimage
Requires:       gzip
Requires:       lvm2
Requires:       mdadm
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:       xfsprogs
Requires:       xz
BuildArch:      noarch
%if ! 0%{?suse_version}
Requires:       cloud-utils
Requires:       debootstrap
Requires:       openssh-clients
Requires:       util-linux-ng

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:          System/Management
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

%description doc
Documentation for OpenStack bareon tool.

%autosetup -n %{sname}-%{sversion}

# generate html docs
%{__python2} build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

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

%license LICENSE
%doc ChangeLog
%dir %{_sysconfdir}/bareon
%config(noreplace) %attr(-, root, root) %{_sysconfdir}/bareon/bareon.conf
%dir %{_datadir}/%{sname}

%files doc
%doc doc/build/html
%license LICENSE

openSUSE Build Service is sponsored by