5901daa
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
5901daa
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
5901daa
5901daa
Name:           testcloud
c297776
Version:        0.1.7
87efa39
Release:        2%{?dist}
5901daa
Summary:        Tool for running cloud images locally
5901daa
5901daa
License:        GPLv2+
5901daa
URL:            https://github.com/Rorosha/testCloud
5901daa
Source0:        https://github.com/Rorosha/%{name}/archive/%{version}.tar.gz
5901daa
5901daa
BuildArch:      noarch
5901daa
5901daa
# Ensure we can create the testcloud group
5901daa
Requires(pre):  shadow-utils
5901daa
5901daa
# testcloud integrates with libvirt
5901daa
Requires:       libvirt
5901daa
Requires:       libvirt-python
5901daa
5901daa
# This is used to manipulate images on disk
5901daa
Requires:       libguestfs
5901daa
Requires:       libguestfs-tools
5901daa
5901daa
# Used to download images from valid URLs
5901daa
Requires:       python-requests
5901daa
5901daa
Requires:       polkit
5901daa
Requires:       python-jinja2
5901daa
Requires:       net-tools
5901daa
5901daa
BuildRequires:  python2-devel
5901daa
BuildRequires:  pytest
5901daa
BuildRequires:  python-setuptools
5901daa
5901daa
# Provides:       python2-testcloud
5901daa
5901daa
%description
5901daa
testcloud is a relatively simple system which is capable of booting images
5901daa
designed for cloud systems on a local system with minimal configuration.
5901daa
testcloud is designed to be (and remain) somewhat simple, trading fancy cloud
5901daa
system features for ease of use and sanity in development.
5901daa
5901daa
# Create the testcloud group
5901daa
%pre
5901daa
getent group testcloud >/dev/null || groupadd testcloud
5901daa
5901daa
%prep
5901daa
%setup -q -n %{name}-%{version}
5901daa
5901daa
%check
5901daa
%{__python2} setup.py test
5901daa
5901daa
%build
5901daa
%{__python2} setup.py build
5901daa
5901daa
%install
5901daa
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
5901daa
5901daa
# configuration files
5901daa
mkdir -p %{buildroot}%{_sysconfdir}/testcloud/
5901daa
install conf/settings-example.py %{buildroot}%{_sysconfdir}/testcloud/settings.py
5901daa
5901daa
# Create running directory for testcloud
5901daa
install -d %{buildroot}%{_sharedstatedir}/testcloud/
5901daa
5901daa
# Install domain jinja template for libvirt to import
5901daa
install conf/domain-template.jinja %{buildroot}/%{_sharedstatedir}/testcloud/domain-template.jinja
5901daa
c297776
# backingstores dir
c297776
install -d %{buildroot}/%{_sharedstatedir}/testcloud/backingstores
5901daa
5901daa
# instance dir
5901daa
install -d %{buildroot}/%{_sharedstatedir}/testcloud/instances
5901daa
5901daa
# create polkit rules dir and install polkit rule
5901daa
mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/rules.d
5901daa
install conf/99-testcloud-nonroot-libvirt-access.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules
5901daa
5901daa
%files
5901daa
%doc README.rst
5901daa
%license LICENSE
5901daa
%{python2_sitelib}/testcloud
5901daa
%{python2_sitelib}/*.egg-info
5901daa
5901daa
%dir %{_sysconfdir}/testcloud
5901daa
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud
c297776
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/backingstores
5901daa
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/instances
5901daa
%attr(0764, qemu, testcloud) %{_sharedstatedir}/testcloud/domain-template.jinja
5901daa
5901daa
%attr(0644, root, root) %{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules
5901daa
5901daa
%config(noreplace) %{_sysconfdir}/testcloud/settings.p*
5901daa
%{_bindir}/testcloud
5901daa
5901daa
%changelog
87efa39
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-2
87efa39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
87efa39
c297776
* Tue Dec 8 2015 Tim Flink <tflink@fedoraproject.org> - 0.1.7-1
c297776
- Enabling configurable instance memory and disk size (T420, T659)
c297776
- Improved handling of images with larger disks (T657)
c297776
- Changed "cache" to "backingstores" to reduce confusion (T521)
c297776
5901daa
* Tue Dec 1 2015 Tim Flink <tflink@fedoraproject.org> - 0.1.6-1
5901daa
- fixing python2 macros
5901daa
- other small fixes as per review
5901daa
5901daa
* Wed Nov 18 2015 Tim Flink <tflink@fedoraproject.org> - 0.1.5-4
5901daa
- adding net-tools as a dependency
5901daa
5901daa
* Wed Nov 11 2015 Martin Krizek <mkrizek@redhat.com> - 0.1.5-3
5901daa
- adding python-jinja2 as a dependency
5901daa
5901daa
* Thu Nov 05 2015 Tim Flink <tflink@fedoraproject.org> - 0.1.5-2
5901daa
- rework setup to work with github sources, proper file declarations
5901daa
5901daa
* Wed Nov 04 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.5-1
5901daa
- Multiple bugfixes (mainly use libvirt, not virt-install)
5901daa
5901daa
* Tue Sep 29 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.4-2
5901daa
- Fix permissions issues and no long overwrite stored configs.
5901daa
5901daa
* Tue Sep 29 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.4-1
5901daa
- Multiple bug fixes.
5901daa
5901daa
* Tue Sep 01 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.3-2
5901daa
- Unkludge the last release.
5901daa
5901daa
* Sun Aug 30 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.3-1
5901daa
- Multiple bugfixes and general clean up.
5901daa
5901daa
* Tue Jul 14 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.1-2
5901daa
- Added polkit rule for headless machine (or passwordless) execution.
5901daa
5901daa
* Thu Jul 09 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.1-1
5901daa
- Fixed packaging issues. Removed uneeded code.
5901daa
5901daa
* Thu Jul 09 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.0-2
5901daa
- Fixed packaging issues. Removed uneeded code.
5901daa
5901daa
* Tue Jun 23 2015 Mike Ruckman <roshi@fedoraproject.org> - 0.1.0-1
5901daa
- Initial packaging of testcloud