|
|
|
@@ -1,13 +1,6 @@
|
|
|
|
|
# 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
|
|
|
|
|
# Update also version in testcloud/__init__.py when changing this!
|
|
|
|
|
Version: 0.3.0
|
|
|
|
|
# Update also version in testcloud/__init__.py and docs/source/conf.py when changing this!
|
|
|
|
|
Version: 0.5.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Tool for running cloud images locally
|
|
|
|
|
|
|
|
|
@@ -15,56 +8,30 @@ License: GPLv2+
|
|
|
|
|
URL: https://pagure.io/testcloud
|
|
|
|
|
Source0: https://releases.pagure.org/testcloud/%{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
# ExclusiveArch: kernel_arches is not possible on F32... Let's exclude i686 as it doesn't have the kernel
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
# Ensure we can create the testcloud group
|
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
|
|
|
|
|
Requires: libvirt
|
|
|
|
|
Requires: polkit
|
|
|
|
|
Requires: libguestfs
|
|
|
|
|
Requires: libguestfs-tools
|
|
|
|
|
|
|
|
|
|
Recommends: edk2-ovmf
|
|
|
|
|
|
|
|
|
|
Requires: python3-%{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python2-pytest-cov
|
|
|
|
|
BuildRequires: python2-requests
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
Requires: python2-requests
|
|
|
|
|
Requires: python2-libvirt
|
|
|
|
|
Requires: python2-jinja2
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{name}
|
|
|
|
|
Python 2 interface to testcloud.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
@@ -74,6 +41,9 @@ BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-cov
|
|
|
|
|
BuildRequires: python3-requests
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
|
|
|
|
|
Requires: libvirt
|
|
|
|
|
Requires: libguestfs-tools-c
|
|
|
|
|
Requires: python3-requests
|
|
|
|
|
Requires: python3-libvirt
|
|
|
|
|
Requires: python3-jinja2
|
|
|
|
@@ -89,17 +59,15 @@ getent group testcloud >/dev/null || groupadd testcloud
|
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
|
%py2_install
|
|
|
|
|
%endif
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
# Docs
|
|
|
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
|
|
|
install -p -m 0644 manpages/testcloud.1 %{buildroot}%{_mandir}/man1
|
|
|
|
|
|
|
|
|
|
# configuration files
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/testcloud/
|
|
|
|
|
install conf/settings-example.py %{buildroot}%{_sysconfdir}/testcloud/settings.py
|
|
|
|
@@ -121,16 +89,14 @@ 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
|
|
|
|
|
%doc README.md
|
|
|
|
|
%{_mandir}/man1/testcloud.1*
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%dir %{_sysconfdir}/testcloud
|
|
|
|
@@ -144,17 +110,79 @@ rm -rf %{buildroot}%{_sysconfdir}/testcloud/__pycache__
|
|
|
|
|
%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
|
|
|
|
|
* Mon Mar 22 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.5.0-1
|
|
|
|
|
- Fix crash in _handle_connection_tip
|
|
|
|
|
- Allow to create an instance without specifying a name
|
|
|
|
|
- Fix instance.image_path
|
|
|
|
|
- Make network working in qemu:///session
|
|
|
|
|
|
|
|
|
|
* Wed Dec 16 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.0-1
|
|
|
|
|
- Support creating instances by fedora:XX, fedora:latest and fedora:qa-matrix strings
|
|
|
|
|
- Implement auto cleaning of backingstore
|
|
|
|
|
- Make testcloud compatible with future Python 3.10
|
|
|
|
|
- Adapt to requests defaulting to simplejson if present
|
|
|
|
|
- Don't throw out exception when trying to create instance already existing in libvirt
|
|
|
|
|
- --all is now the default in testcloud instance list
|
|
|
|
|
- Show some hints to the users on instance create/start
|
|
|
|
|
- cleanup the instance bits when instance create fails
|
|
|
|
|
|
|
|
|
|
* Mon Nov 16 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.7-1
|
|
|
|
|
- Do not throw out ugly tracebacks if user uses cli (#1887815)
|
|
|
|
|
- Parse CMD_LINE_ARGS and add CMD_LINE_ENVS (https://pagure.io/testcloud/issue/49)
|
|
|
|
|
- Add try/except check to instance.prepare() as permissions error can occur there too
|
|
|
|
|
- Update documentation
|
|
|
|
|
- Add manpage
|
|
|
|
|
|
|
|
|
|
* Fri Oct 09 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.6-1
|
|
|
|
|
- Improve user experience when testcloud fails because of missing group
|
|
|
|
|
|
|
|
|
|
* Thu Aug 27 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.5-4
|
|
|
|
|
- ExclusiveArch to prevent koji from trying to build this on i686
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.5-2
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.5-1
|
|
|
|
|
- Typo fix in RHEL 8 qemu-kvm naming workaround
|
|
|
|
|
|
|
|
|
|
* Thu May 21 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.4-1
|
|
|
|
|
- Ugly hotfix for tmt
|
|
|
|
|
|
|
|
|
|
* Wed May 20 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.3-1
|
|
|
|
|
- Support RHEL 8 hosts (different qemu-kvm path)
|
|
|
|
|
- Move most of the deps into python3-testcloud
|
|
|
|
|
|
|
|
|
|
* Sun Apr 19 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.2-1
|
|
|
|
|
- Require only libguestfs-tools-c from libguestfs
|
|
|
|
|
- Bump default RAM size to 768 MB
|
|
|
|
|
- Fix for libvirt >= 6.0
|
|
|
|
|
- Fix DeprecationWarning: invalid escape sequence \w
|
|
|
|
|
|
|
|
|
|
* Mon Mar 02 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.1-1
|
|
|
|
|
- Remove Python 2 support
|
|
|
|
|
- Raise TestcloudImageError if failed to open file
|
|
|
|
|
- instance: call qemu-img in quiet mode
|
|
|
|
|
|
|
|
|
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-4
|
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-3
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed May 22 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.3.0-1
|
|
|
|
|
- Support creating UEFI VMs
|
|
|
|
|
|
|
|
|
|