a846fdd
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
a020ed3
%global sources_gpg_sign 0x5d2d1e4fb8d38e6af76c50d53d4fec30cf5ce3da
b45fc96
b45fc96
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
b45fc96
Name:           diskimage-builder
b45fc96
Summary:        Image building tools for OpenStack
a020ed3
Version:        3.7.0
27c114c
Release:        3%{?dist}
b45fc96
License:        ASL 2.0
b45fc96
Group:          System Environment/Base
b45fc96
URL:            https://launchpad.net/diskimage-builder
b45fc96
Source0:        https://tarballs.openstack.org/diskimage-builder/%{name}-%{upstream_version}.tar.gz
a846fdd
# Required for tarball sources verification
a846fdd
%if 0%{?sources_gpg} == 1
a846fdd
Source101:        https://tarballs.openstack.org/diskimage-builder/%{name}-%{upstream_version}.tar.gz.asc
a846fdd
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
a846fdd
%endif
b45fc96
AutoReqProv: no
5774441
5774441
BuildArch: noarch
b45fc96
a846fdd
# Required for tarball sources verification
a846fdd
%if 0%{?sources_gpg} == 1
a846fdd
BuildRequires:  /usr/bin/gpgv2
a846fdd
%endif
a846fdd
a020ed3
BuildRequires: git-core
b7d841e
BuildRequires: python3-devel
b7d841e
BuildRequires: python3-setuptools
b7d841e
BuildRequires: python3-pbr
e714729
BuildRequires: /usr/bin/pathfix.py
5774441
5774441
Requires: kpartx
5774441
Requires: qemu-img
b8ad3df
Requires: curl
64620ef
Requires: tar
588cd83
Requires: gdisk
a020ed3
Requires: git-core
12ae458
Requires: dib-utils
b45fc96
Requires: xfsprogs
b45fc96
Requires: /bin/bash
b45fc96
Requires: /bin/sh
b45fc96
Requires: /usr/bin/env
b7d841e
Requires: python3
a020ed3
Requires: python3-flake8 >= 3.6.0
a020ed3
Requires: python3-pbr >= 2.0.0
a020ed3
Requires: python3-stevedore >= 1.20.0
a020ed3
Requires: python3-networkx >= 1.10
a020ed3
Requires: python3-yaml >= 3.12
b45fc96
b45fc96
%global __requires_exclude /usr/local/bin/dib-python
b45fc96
%global __requires_exclude %__requires_exclude|/sbin/runscript
ff54229
5774441
%prep
a846fdd
# Required for tarball sources verification
a846fdd
%if 0%{?sources_gpg} == 1
a846fdd
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
a846fdd
%endif
588cd83
%autosetup -n %{name}-%{upstream_version} -S git
588cd83
588cd83
# Remove bundled egg-info
588cd83
rm -r diskimage_builder.egg-info
5774441
5774441
%build
b7d841e
%{py3_build}
5774441
5774441
%install
b7d841e
%{py3_install}
5774441
5774441
mkdir -p %{buildroot}%{_datadir}/%{name}/elements
5774441
b45fc96
cp -vr diskimage_builder/elements/ %{buildroot}%{_datadir}/%{name}
5774441
b45fc96
# explicitly remove config-applier since it does a pip install
b45fc96
rm -rf %{buildroot}%{_datadir}/%{name}/elements/config-applier
b45fc96
b45fc96
# This file is being split out of diskimage-builder, so remove it to
b45fc96
# avoid conflicts with the new package.
b45fc96
rm -f %{buildroot}%{_bindir}/dib-run-parts
b45fc96
b45fc96
# Fix shebangs for Python 3-only distros
9170481
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir}/%{name}/elements/pypi/pre-install.d/04-configure-pypi-mirror
e714729
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir}/%{name}/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper
e714729
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir}/%{name}/elements/package-installs/bin/package-installs-squash
e714729
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir}/%{name}/elements/svc-map/extra-data.d/10-merge-svc-map-files
e714729
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir}/%{name}/elements/svc-map/bin/svc-map
b7d841e
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/diskimage_builder/elements/pypi/pre-install.d/04-configure-pypi-mirror
b7d841e
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/diskimage_builder/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper
b7d841e
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/diskimage_builder/elements/package-installs/bin/package-installs-squash
b7d841e
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files
b7d841e
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/diskimage_builder/elements/svc-map/bin/svc-map
e714729
5774441
%description
5774441
Components of TripleO that are responsible for building disk images.
5774441
5774441
%files
5774441
%doc LICENSE
Mike Burns 3ab53ce
%doc doc/source/ci.md
5774441
%{_bindir}/*
b7d841e
%{python3_sitelib}/diskimage_builder*
5774441
%{_datadir}/%{name}/elements
5774441
5774441
%changelog
27c114c
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
27c114c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
27c114c
8c56002
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
8c56002
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
8c56002
a020ed3
* Tue Mar 16 2021 Joel Capitao <jcapitao@redhat.com> 3.7.0-1
a020ed3
- Update to upstream version 3.7.0
a020ed3
d1d7c28
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
d1d7c28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d1d7c28
a846fdd
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 3.3.1-2
a846fdd
- Update to upstream version 3.3.1
a846fdd
588cd83
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 3.3.1-1
588cd83
- Update to upstream version 3.3.1
588cd83
f2cbec9
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.36.0-2
f2cbec9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f2cbec9
b7d841e
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 2.36.0-1
b7d841e
- Update to upstream version 2.36.0
b7d841e
160f6c4
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.27.2-2
160f6c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
160f6c4
9170481
* Tue Oct 01 2019 RDO <dev@lists.rdoproject.org> 2.27.2-1
9170481
- Update to 2.27.2
5774441