|
|
|
@@ -1,8 +1,13 @@
|
|
|
|
|
# Avoid warnings when bytecompiling settings.py in /etc
|
|
|
|
|
%global __python %{__python3}
|
|
|
|
|
|
|
|
|
|
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
|
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: testcloud
|
|
|
|
|
Version: 0.1.15
|
|
|
|
|
# Update also version in testcloud/__init__.py when changing this!
|
|
|
|
|
Version: 0.3.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Tool for running cloud images locally
|
|
|
|
|
|
|
|
|
@@ -15,21 +20,30 @@ BuildArch: noarch
|
|
|
|
|
# Ensure we can create the testcloud group
|
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
|
|
|
|
|
# testcloud integrates with libvirt
|
|
|
|
|
Requires: libvirt
|
|
|
|
|
Requires: libvirt-python
|
|
|
|
|
|
|
|
|
|
# This is used to manipulate images on disk
|
|
|
|
|
Requires: polkit
|
|
|
|
|
Requires: libguestfs
|
|
|
|
|
Requires: libguestfs-tools
|
|
|
|
|
|
|
|
|
|
# Used to download images from valid URLs
|
|
|
|
|
Requires: python2-requests
|
|
|
|
|
Recommends: edk2-ovmf
|
|
|
|
|
|
|
|
|
|
Requires: polkit
|
|
|
|
|
Requires: python2-jinja2
|
|
|
|
|
Requires: python3-%{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
BuildRequires: libvirt-python
|
|
|
|
|
# Install python2 interface on stable Fedora Releases
|
|
|
|
|
%if 0%{?fedora} <= 28
|
|
|
|
|
Requires: python2-%{name} = %{version}-%{release}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
testcloud is a relatively simple system which is capable of booting images
|
|
|
|
|
designed for cloud systems on a local system with minimal configuration.
|
|
|
|
|
testcloud is designed to be (and remain) somewhat simple, trading fancy cloud
|
|
|
|
|
system features for ease of use and sanity in development.
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%package -n python2-%{name}
|
|
|
|
|
Summary: Python 2 interface to testcloud
|
|
|
|
|
BuildRequires: python2-libvirt
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-jinja2
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
@@ -37,14 +51,35 @@ BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python2-pytest-cov
|
|
|
|
|
BuildRequires: python2-requests
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
Requires: python2-requests
|
|
|
|
|
Requires: python2-libvirt
|
|
|
|
|
Requires: python2-jinja2
|
|
|
|
|
|
|
|
|
|
# Provides: python2-testcloud
|
|
|
|
|
%description -n python2-%{name}
|
|
|
|
|
Python 2 interface to testcloud.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
testcloud is a relatively simple system which is capable of booting images
|
|
|
|
|
designed for cloud systems on a local system with minimal configuration.
|
|
|
|
|
testcloud is designed to be (and remain) somewhat simple, trading fancy cloud
|
|
|
|
|
system features for ease of use and sanity in development.
|
|
|
|
|
%package -n python3-%{name}
|
|
|
|
|
Summary: Python 3 interface to testcloud
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 30
|
|
|
|
|
Obsoletes: python2-testcloud <= %{version}-%{release}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-libvirt
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-jinja2
|
|
|
|
|
BuildRequires: python3-mock
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-cov
|
|
|
|
|
BuildRequires: python3-requests
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
Requires: python3-requests
|
|
|
|
|
Requires: python3-libvirt
|
|
|
|
|
Requires: python3-jinja2
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
|
Python 3 interface to testcloud.
|
|
|
|
|
|
|
|
|
|
# Create the testcloud group
|
|
|
|
|
%pre
|
|
|
|
@@ -53,16 +88,17 @@ getent group testcloud >/dev/null || groupadd testcloud
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
# Remove compiled .py files from /etc after running unittests
|
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/testcloud/*.py{c,o}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{__python2} setup.py build
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%py2_install
|
|
|
|
|
%endif
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
# configuration files
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/testcloud/
|
|
|
|
@@ -84,11 +120,18 @@ install -d %{buildroot}/%{_sharedstatedir}/testcloud/instances
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/rules.d
|
|
|
|
|
install conf/99-testcloud-nonroot-libvirt-access.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
%endif
|
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
# Remove compiled .py files from /etc after os_install_post
|
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/testcloud/*.py{c,o}
|
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/testcloud/__pycache__
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python2_sitelib}/testcloud
|
|
|
|
|
%{python2_sitelib}/*.egg-info
|
|
|
|
|
|
|
|
|
|
%dir %{_sysconfdir}/testcloud
|
|
|
|
|
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud
|
|
|
|
@@ -101,7 +144,64 @@ install conf/99-testcloud-nonroot-libvirt-access.rules %{buildroot}%{_sysconfdir
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/testcloud/settings.py
|
|
|
|
|
%{_bindir}/testcloud
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%files -n python2-%{name}
|
|
|
|
|
%{python2_sitelib}/testcloud
|
|
|
|
|
%{python2_sitelib}/*.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{name}
|
|
|
|
|
%{python3_sitelib}/testcloud
|
|
|
|
|
%{python3_sitelib}/*.egg-info
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed May 22 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.0-1
|
|
|
|
|
- Support creating UEFI VMs
|
|
|
|
|
|
|
|
|
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Nov 20 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.2.2-1
|
|
|
|
|
- drop and obsolete python2-testcloud on Fedora >= 30
|
|
|
|
|
- Fix setup.py test to also work with Python 3 (pytest-3)
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.1-2
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Fri Jun 29 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.2.1-1
|
|
|
|
|
- domain-template: use cpu host-passthrough
|
|
|
|
|
- domain-template: use urandom for RNG
|
|
|
|
|
|
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-2
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Wed May 30 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.2.0-1
|
|
|
|
|
- Drop Fedora 26
|
|
|
|
|
- Use Python 3 by default
|
|
|
|
|
- Remove shebangs from non-executables
|
|
|
|
|
- Split testcloud into testcloud, python2-testcloud and python3-testcloud
|
|
|
|
|
|
|
|
|
|
* Wed May 02 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.1.18-1
|
|
|
|
|
- Host /dev/random passthrough
|
|
|
|
|
|
|
|
|
|
* Tue Mar 06 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.1.17-1
|
|
|
|
|
- Add instance clean command
|
|
|
|
|
- Ignore error when domain stopped between stop attempts
|
|
|
|
|
- Add Makefile
|
|
|
|
|
|
|
|
|
|
* Tue Feb 20 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.1.16-1
|
|
|
|
|
- Retry to stop instance when host is busy
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.15-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Feb 02 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.1.15-2
|
|
|
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
|
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
|
|
|
|
|
|
* Thu Oct 26 2017 Kamil Páral <kparal@redhat.com> - 0.1.15-1
|
|
|
|
|
- keep backwards compatible API
|
|
|
|
|
|
|
|
|
|