From 5901daa7793a5bcb240dc6366d6d9262d0301571 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 8 Dec 2015 09:33:27 -0700 Subject: [PATCH] initial 0.1.6 build of testcloud after review --- .gitignore | 1 + sources | 1 + testcloud.spec | 137 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 testcloud.spec diff --git a/.gitignore b/.gitignore index e69de29..121c9ac 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/0.1.6.tar.gz diff --git a/sources b/sources index e69de29..801693b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +094525bea8b573886354c91b8873d49d 0.1.6.tar.gz diff --git a/testcloud.spec b/testcloud.spec new file mode 100644 index 0000000..70670e2 --- /dev/null +++ b/testcloud.spec @@ -0,0 +1,137 @@ +# 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.6 +Release: 1%{?dist} +Summary: Tool for running cloud images locally + +License: GPLv2+ +URL: https://github.com/Rorosha/testCloud +Source0: https://github.com/Rorosha/%{name}/archive/%{version}.tar.gz + +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: libguestfs +Requires: libguestfs-tools + +# Used to download images from valid URLs +Requires: python-requests + +Requires: polkit +Requires: python-jinja2 +Requires: net-tools + +BuildRequires: python2-devel +BuildRequires: pytest +BuildRequires: python-setuptools + +# Provides: python2-testcloud + +%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. + +# Create the testcloud group +%pre +getent group testcloud >/dev/null || groupadd testcloud + +%prep +%setup -q -n %{name}-%{version} + +%check +%{__python2} setup.py test + +%build +%{__python2} setup.py build + +%install +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} + +# configuration files +mkdir -p %{buildroot}%{_sysconfdir}/testcloud/ +install conf/settings-example.py %{buildroot}%{_sysconfdir}/testcloud/settings.py + +# Create running directory for testcloud +install -d %{buildroot}%{_sharedstatedir}/testcloud/ + +# Install domain jinja template for libvirt to import +install conf/domain-template.jinja %{buildroot}/%{_sharedstatedir}/testcloud/domain-template.jinja + +# cache dir +install -d %{buildroot}/%{_sharedstatedir}/testcloud/cache + +# instance dir +install -d %{buildroot}/%{_sharedstatedir}/testcloud/instances + +# create polkit rules dir and install polkit rule +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 + +%files +%doc README.rst +%license LICENSE +%{python2_sitelib}/testcloud +%{python2_sitelib}/*.egg-info + +%dir %{_sysconfdir}/testcloud +%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud +%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/cache +%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/instances +%attr(0764, qemu, testcloud) %{_sharedstatedir}/testcloud/domain-template.jinja + +%attr(0644, root, root) %{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules + +%config(noreplace) %{_sysconfdir}/testcloud/settings.p* +%{_bindir}/testcloud + +%changelog +* Tue Dec 1 2015 Tim Flink - 0.1.6-1 +- fixing python2 macros +- other small fixes as per review + +* Wed Nov 18 2015 Tim Flink - 0.1.5-4 +- adding net-tools as a dependency + +* Wed Nov 11 2015 Martin Krizek - 0.1.5-3 +- adding python-jinja2 as a dependency + +* Thu Nov 05 2015 Tim Flink - 0.1.5-2 +- rework setup to work with github sources, proper file declarations + +* Wed Nov 04 2015 Mike Ruckman - 0.1.5-1 +- Multiple bugfixes (mainly use libvirt, not virt-install) + +* Tue Sep 29 2015 Mike Ruckman - 0.1.4-2 +- Fix permissions issues and no long overwrite stored configs. + +* Tue Sep 29 2015 Mike Ruckman - 0.1.4-1 +- Multiple bug fixes. + +* Tue Sep 01 2015 Mike Ruckman - 0.1.3-2 +- Unkludge the last release. + +* Sun Aug 30 2015 Mike Ruckman - 0.1.3-1 +- Multiple bugfixes and general clean up. + +* Tue Jul 14 2015 Mike Ruckman - 0.1.1-2 +- Added polkit rule for headless machine (or passwordless) execution. + +* Thu Jul 09 2015 Mike Ruckman - 0.1.1-1 +- Fixed packaging issues. Removed uneeded code. + +* Thu Jul 09 2015 Mike Ruckman - 0.1.0-2 +- Fixed packaging issues. Removed uneeded code. + +* Tue Jun 23 2015 Mike Ruckman - 0.1.0-1 +- Initial packaging of testcloud