Summary: System image generation tool
Name: imagefactory
Version: 1.1.2
Release: 1%{?dist}
# Source0: https://github.com/aeolusproject/%{name}/archive/
Source0: %{name}-%{version}.tar.gz
License: ASL 2.0
Group: Applications/System
URL: http://www.aeolusproject.org/imagefactory.html
BuildArch: noarch
Requires: oz >= 0.7.0
Requires: euca2ools
Requires: python-pycurl
Requires: python-libguestfs
Requires: python-zope-interface
Requires: python-boto >= 2.0
Requires: libxml2-python
Requires: python-httplib2
Requires: python-argparse
Requires: python-cloudservers
Requires: python-psphere
Requires: VMDKstream
Requires: python-suds >= 0.4.1
Requires: python-paste-deploy
Requires: python-oauth2
Requires: qemu-img
# We need this for dc-rhev-image
# TODO: Remove this requirement when move pushing internal to the factory
Requires: iwhd >= 1.2
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
BuildRequires: python-setuptools
%description
imagefactory allows the creation of system images for multiple virtualization
and cloud providers from a single template definition. See
http://aeolusproject.org/projects/imagefactory for more information.
%package jeosconf-ec2-fedora
Summary: Configuration for JEOS images for EC2
License: ASL 2.0
Requires: %{name} = %{version}-%{release}
%description jeosconf-ec2-fedora
The configuration file for Fedora EC2 JEOS images.
%package jeosconf-ec2-rhel
Summary: Configuration for JEOS images for EC2
License: ASL 2.0
Requires: %{name} = %{version}-%{release}
%description jeosconf-ec2-rhel
The configuration file for Fedora EC2 JEOS images.
%prep
%setup -q
%build
python setup.py build
%install
python setup.py install -O1 --root=%{buildroot} --skip-build
install -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
install -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images
install -d %{buildroot}/%{_sysconfdir}/logrotate.d
sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py
install conf/ec2_fedora_jeos.conf %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
install conf/ec2_rhel_jeos.conf %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
install -m0600 conf/imagefactory.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/imagefactory
install -m0600 conf/imagefactory.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactory
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%files
%doc COPYING
%{_initddir}/imagefactory
%config(noreplace) %{_sysconfdir}/imagefactory/imagefactory.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755, root, root) %{_sysconfdir}/pki/imagefactory/
%dir %attr(0755, root, root) %{_sysconfdir}/imagefactory/jeos_images/
%dir %attr(0755, root, root) %{_localstatedir}/lib/imagefactory/images
%config %{_sysconfdir}/pki/imagefactory/cert-ec2.pem
%{python_sitelib}/imgfac
%{python_sitelib}/imagefactory-*.egg-info
%{_bindir}/imagefactory
%{_mandir}/man1/*
%files jeosconf-ec2-fedora
%{_sysconfdir}/imagefactory/jeos_images/ec2_fedora_jeos.conf
%files jeosconf-ec2-rhel
%{_sysconfdir}/imagefactory/jeos_images/ec2_rhel_jeos.conf
%changelog
* Fri Feb 22 2013 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.2-1
- Update to 1.1.2
- Merge F-17 changes to rawhide
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Oct 13 2011 Ian McLeod <imcleod@redhat.com> - 0.7.1-1
- Incorporate subpackage improvement from clalance@redhat.com
* Thu Sep 15 2011 Ian McLeod <imcleod@redhat.com> - 0.6.1
- Update Oz requirement to 0.7.0 or later for new target-specific package config
- Update SPEC file to restart service after an install
* Mon Apr 04 2011 Chris Lalancette <clalance@redhat.com> - 0.1.6-1
- Initial spec file.