fc2fea0
# Some Openstack supporting packages from EPEL have been removed due to updated
fc2fea0
# deps that override RHEL and, thus, violate EPEL rules.  We would like to 
fc2fea0
# eventually support these features as part of an EL6 and EL7 set of factory
fc2fea0
# plugin packages in RDO.  Until this is sorted out we must disable things when
fc2fea0
# building on RHEL.
fc2fea0
# TODO: If we end up building as part of RDO either remove this for RDO
fc2fea0
# SPEC builds or find a way to detect an RDO build and automagically negate this
3261cb6
# UPDATE: F24 dropped the supporting modules we currently use
3261cb6
# TODO: Refresh/refactor OpenStack support to use newer module and then update below
3261cb6
%if 0%{?fedora} >= 24 || 0%{?rhel} >= 3
3261cb6
%define include_openstack 0
3261cb6
%else
3261cb6
%define include_openstack 1
3261cb6
%endif
fc2fea0
4e4ef0f
# For now, do not build this sub RPM - It has bitrotted and needs to be revisited
4e4ef0f
%define include_nova_image_builder 0
4e4ef0f
3261cb6
3261cb6
ee1ac58
%global auto_register_macro_post() # create it if it doesn't already exist as a link \
ee1ac58
# If it is an existing file other than a link, do nothing \
ee1ac58
[ -L %{_sysconfdir}/imagefactory/plugins.d/%1.info ] || \
ee1ac58
[ -e %{_sysconfdir}/imagefactory/plugins.d/%1.info ] || \
ee1ac58
ln -s %{python_sitelib}/imagefactory_plugins/%1/%1.info %{_sysconfdir}/imagefactory/plugins.d/%1.info \
ee1ac58
exit 0 
ee1ac58
ee1ac58
%global auto_register_macro_postun() if [ "\$1" = "0" ]; then \
ee1ac58
  # clean up the link if it exists - if it doesn't or if this is a regular file, do nothing \
ee1ac58
  [ -L %{_sysconfdir}/imagefactory/plugins.d/%1.info ] && rm -f  %{_sysconfdir}/imagefactory/plugins.d/%1.info \
ee1ac58
fi \
ee1ac58
exit 0
ee1ac58
ee1ac58
ee1ac58
Summary: Default plugins for the Image Factory system image generation tool
ee1ac58
Name: imagefactory-plugins
2a8fdbf
Version: 1.1.9
2a8fdbf
Release: 1%{?dist}
ee1ac58
Source0: http://repos.fedorapeople.org/repos/aeolus/imagefactory/%{version}/tarball/%{name}-%{version}.tar.gz
ee1ac58
License: ASL 2.0
ee1ac58
Group: Applications/System
2a8fdbf
URL: https://github.com/redhat-imaging/imagefactory
ee1ac58
BuildArch: noarch
ee1ac58
%if 0%{?rhel} == 6
ee1ac58
ExcludeArch: i386 ppc64
ee1ac58
%endif
ee1ac58
BuildRequires: python2
ee1ac58
BuildRequires: python-setuptools
ee1ac58
Requires: imagefactory
ee1ac58
ee1ac58
%description
ee1ac58
This is a placeholder top level package for a collection of plugins for the 
ee1ac58
Image Factory cloud system image generation tool.
ee1ac58
ee1ac58
imagefactory allows the creation of system images for multiple virtualization
ee1ac58
and cloud providers from a single template definition. See 
2a8fdbf
https://github.com/redhat-imaging/imagefactory for more information.
ee1ac58
ee1ac58
%package ovfcommon
ee1ac58
Summary: common utilities to manipulate ovf-related objects
ee1ac58
License: ASL 2.0
ee1ac58
Requires: oz >= 0.7.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
ee1ac58
%description ovfcommon
ee1ac58
This pseudo-plugin is used to provide common OVF functionality to other 
ee1ac58
plugins.
ee1ac58
ee1ac58
%package OVA
ee1ac58
Summary: Cloud plugin for generating OVA archives
ee1ac58
License: ASL 2.0
ee1ac58
Requires: oz >= 0.7.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugins-ovfcommon
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description OVA
ee1ac58
This Cloud plugin allows users to specify a Base Image to generate an OVA
ee1ac58
archive from.
ee1ac58
ee1ac58
%package IndirectionCloud
ee1ac58
Summary: Cloud plugin for allowing images to modify other images
ee1ac58
License: ASL 2.0
ee1ac58
Requires: oz >= 0.12.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description IndirectionCloud
ee1ac58
This Cloud plugin allows users to specify a Base Image to use to manipulate
ee1ac58
another Base Image to generate a Target Image.
ee1ac58
ee1ac58
It was originally created to produce Live CDs and other live media using an
ee1ac58
arbitrary  host OS and package selection for the actual media creation tools.
ee1ac58
ee1ac58
%package TinMan
ee1ac58
Summary: OS plugin for Fedora
ee1ac58
License: ASL 2.0
ee1ac58
Requires: oz >= 0.12.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description TinMan
ee1ac58
An OS plugin to support Fedora OSes
ee1ac58
fc2fea0
%if 0%{include_openstack}
ee1ac58
%package OpenStack
ee1ac58
Summary: Cloud plugin for OpenStack running on KVM
ee1ac58
License: ASL 2.0
ee1ac58
Requires: python-glance
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description OpenStack
ee1ac58
A Cloud plugin to support OpenStack running on top of KVM.
ee1ac58
fc2fea0
%package Rackspace
fc2fea0
Summary: Cloud plugin for Rackspace
fc2fea0
License: ASL 2.0
fc2fea0
Requires: python-novaclient
fc2fea0
Requires: python-pyrax
fc2fea0
Requires: imagefactory-plugins
fc2fea0
Requires: imagefactory-plugin-api = 1.0
fc2fea0
fc2fea0
%description Rackspace
fc2fea0
A Cloud plugin to support Rackspace
fc2fea0
fc2fea0
%package Rackspace-JEOS-images
fc2fea0
Summary: JEOS images for various OSes to support Rackspace snapshot builds
fc2fea0
Requires: imagefactory-plugins-Rackspace
fc2fea0
fc2fea0
%description Rackspace-JEOS-images
fc2fea0
These configuration files point to existing JEOS Image ID's on Rackspace that
fc2fea0
can be used to do "snapshot" style builds.
4e4ef0f
%endif
fc2fea0
4e4ef0f
%if 0%{include_nova_image_builder}
fc2fea0
%package Nova
fc2fea0
Summary: OS plugin that allows imagefactory to use Nova instances to build base images.
fc2fea0
License: ASL 2.0
fc2fea0
Requires: python-novaclient
fc2fea0
Requires: oz >= 0.12.0
fc2fea0
Requires: imagefactory-plugins
fc2fea0
Requires: imagefactory-plugin-api = 1.0
fc2fea0
fc2fea0
%description Nova
fc2fea0
An alternative to the TinMan plugin for creating base images using an OpenStack cloud.
fc2fea0
%endif
fc2fea0
ee1ac58
%package EC2
ee1ac58
Summary: Cloud plugin for EC2
ee1ac58
License: ASL 2.0
ee1ac58
Requires: euca2ools
ee1ac58
Requires: python-boto >= 2.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description EC2
ee1ac58
A Cloud plugin to support EC2
ee1ac58
ee1ac58
%package EC2-JEOS-images
ee1ac58
Summary: JEOS images for various OSes to support EC2 snapshot builds
ee1ac58
Requires: imagefactory-plugins-EC2
ee1ac58
ee1ac58
%description EC2-JEOS-images
ee1ac58
These configuration files point to existing JEOS AMIs on EC2 that can be used
ee1ac58
to do "snapshot" style builds.
ee1ac58
ee1ac58
%if 0%{?build_mock}
ee1ac58
%package MockOS
ee1ac58
Summary: Mock OS plugin
ee1ac58
License: ASL 2.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description MockOS
ee1ac58
This plugin mimcs some of the behaviour of the RPM based OS plugins without
ee1ac58
actually doing a build.
ee1ac58
ee1ac58
For testing use only.
ee1ac58
ee1ac58
%package MockCloud
ee1ac58
Summary: Mock Cloud plugin
ee1ac58
License: ASL 2.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description MockCloud
ee1ac58
This plugin mimcs some of the behaviour of a real cloud plugin without needing
ee1ac58
any real external infra.
ee1ac58
ee1ac58
For testing use only.
ee1ac58
ee1ac58
%endif
ee1ac58
ee1ac58
%package RHEVM
ee1ac58
Summary: RHEVM Cloud plugin
ee1ac58
License: ASL 2.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: imagefactory-plugins-ovfcommon
ee1ac58
Requires: ovirt-engine-sdk >= 3.1.0
ee1ac58
Requires: imagefactory-plugin-api = 1.0
ee1ac58
ee1ac58
%description RHEVM
ee1ac58
A plugin for RHEVM "clouds"
ee1ac58
ee1ac58
%package vSphere
ee1ac58
Summary: vSphere Cloud plugin
ee1ac58
License: ASL 2.0
ee1ac58
Requires: imagefactory-plugins
ee1ac58
Requires: python-psphere
ee1ac58
Requires: imagefactory-plugin-api = 1.0
c2c65e1
# Earlier VMDKstream is not VirtualBox compatible
c2c65e1
Requires: VMDKstream >= 0.3
4e4ef0f
Requires: PyYAML
ee1ac58
ee1ac58
%description vSphere
ee1ac58
A plugin for vSphere "clouds"
ee1ac58
ee1ac58
%package Docker
ee1ac58
Summary: Cloud plugin for Docker
ee1ac58
License: ASL 2.0
4e4ef0f
Requires: tar
ee1ac58
ee1ac58
%description Docker
ee1ac58
A Cloud plugin to support Docker
ee1ac58
2a8fdbf
%package HyperV
2a8fdbf
Summary: Cloud plugin for HyperV
2a8fdbf
License: ASL 2.0
2a8fdbf
Requires: qemu-img
2a8fdbf
2a8fdbf
%description HyperV
2a8fdbf
A Cloud plugin to support HyperV
2a8fdbf
ee1ac58
%prep
ee1ac58
%setup -q
ee1ac58
ee1ac58
%build
ee1ac58
python setup.py build
ee1ac58
ee1ac58
%install
ee1ac58
python setup.py install -O1 --root=%{buildroot} --skip-build
ee1ac58
ee1ac58
# TODO: Cleaner negative conditional
ee1ac58
%if 0%{?build_mock}
ee1ac58
%else
ee1ac58
rm -rf %{buildroot}%{python_sitelib}/imagefactory_plugins/MockOS
ee1ac58
rm -rf %{buildroot}%{python_sitelib}/imagefactory_plugins/MockCloud
ee1ac58
%endif
ee1ac58
fc2fea0
%if 0%{include_openstack}
fc2fea0
%else
fc2fea0
rm -rf  %{buildroot}%{python_sitelib}/imagefactory_plugins/OpenStack
fc2fea0
rm -rf  %{buildroot}%{python_sitelib}/imagefactory_plugins/Rackspace
fc2fea0
rm -f  %{buildroot}%{_sysconfdir}/imagefactory/jeos_images/rackspace_fedora_jeos.conf
fc2fea0
rm -f  %{buildroot}%{_sysconfdir}/imagefactory/jeos_images/rackspace_rhel_jeos.conf
fc2fea0
%endif
fc2fea0
4e4ef0f
%if 0%{include_nova_image_builder}
4e4ef0f
%else
4e4ef0f
rm -rf  %{buildroot}%{python_sitelib}/imagefactory_plugins/Nova
4e4ef0f
%endif
4e4ef0f
ee1ac58
%post OVA
ee1ac58
%auto_register_macro_post OVA
ee1ac58
%postun OVA
ee1ac58
%auto_register_macro_postun OVA
ee1ac58
ee1ac58
%post IndirectionCloud
ee1ac58
%auto_register_macro_post IndirectionCloud
ee1ac58
%postun IndirectionCloud
ee1ac58
%auto_register_macro_postun IndirectionCloud
ee1ac58
ee1ac58
%post TinMan
ee1ac58
%auto_register_macro_post TinMan
ee1ac58
%postun TinMan
ee1ac58
%auto_register_macro_postun TinMan
ee1ac58
fc2fea0
%if 0%{include_openstack}
ee1ac58
%post OpenStack
ee1ac58
%auto_register_macro_post OpenStack
ee1ac58
%postun OpenStack
ee1ac58
%auto_register_macro_postun OpenStack
ee1ac58
fc2fea0
%post Rackspace
fc2fea0
%auto_register_macro_post Rackspace
fc2fea0
%postun Rackspace
fc2fea0
%auto_register_macro_postun Rackspace
4e4ef0f
%endif
fc2fea0
4e4ef0f
%if 0%{include_nova_image_builder}
fc2fea0
%post Nova
fc2fea0
%auto_register_macro_post Nova
fc2fea0
%postun Nova
fc2fea0
%auto_register_macro_postrun Nova
fc2fea0
%endif
fc2fea0
fc2fea0
%post RHEVM
c2c65e1
%auto_register_macro_post RHEVM
fc2fea0
%postun RHEVM
fc2fea0
%auto_register_macro_postun RHEVM
fc2fea0
ee1ac58
%post EC2
ee1ac58
%auto_register_macro_post EC2
ee1ac58
%postun EC2
ee1ac58
%auto_register_macro_postun EC2
ee1ac58
ee1ac58
%if 0%{?build_mock}
ee1ac58
%post MockOS
ee1ac58
%auto_register_macro_post MockOS
ee1ac58
%postun MockOS
ee1ac58
%auto_register_macro_postun MockOS
ee1ac58
ee1ac58
%post MockCloud
ee1ac58
%auto_register_macro_post MockCloud
ee1ac58
%postun MockCloud
ee1ac58
%auto_register_macro_postun MockCloud
ee1ac58
%endif
ee1ac58
ee1ac58
%post vSphere
ee1ac58
%auto_register_macro_post vSphere
ee1ac58
%postun vSphere
ee1ac58
%auto_register_macro_postun vSphere
ee1ac58
ee1ac58
%post Docker
ee1ac58
%auto_register_macro_post Docker
ee1ac58
%postun Docker
ee1ac58
%auto_register_macro_postun Docker
ee1ac58
2a8fdbf
%post HyperV
2a8fdbf
%auto_register_macro_post HyperV
2a8fdbf
%postun HyperV
2a8fdbf
%auto_register_macro_postun HyperV
2a8fdbf
ee1ac58
%files
ee1ac58
%doc COPYING
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins
ee1ac58
%{python_sitelib}/imagefactory_plugins/__init__.py*
ee1ac58
%{python_sitelib}/imagefactory_plugins*.egg-info
ee1ac58
ee1ac58
%files ovfcommon
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/ovfcommon
ee1ac58
%{python_sitelib}/imagefactory_plugins/ovfcommon/*
ee1ac58
ee1ac58
%files OVA
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/OVA
ee1ac58
%{python_sitelib}/imagefactory_plugins/OVA/*
ee1ac58
ee1ac58
%files IndirectionCloud
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/IndirectionCloud
ee1ac58
%{python_sitelib}/imagefactory_plugins/IndirectionCloud/*
ee1ac58
ee1ac58
%files TinMan
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/TinMan
ee1ac58
%{python_sitelib}/imagefactory_plugins/TinMan/*
ee1ac58
fc2fea0
%if 0%{include_openstack}
ee1ac58
%files OpenStack
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/OpenStack
ee1ac58
%{python_sitelib}/imagefactory_plugins/OpenStack/*
ee1ac58
fc2fea0
%files Rackspace
fc2fea0
%dir %{python_sitelib}/imagefactory_plugins/Rackspace
fc2fea0
%{python_sitelib}/imagefactory_plugins/Rackspace/*
fc2fea0
fc2fea0
%files Rackspace-JEOS-images
fc2fea0
%{_sysconfdir}/imagefactory/jeos_images/rackspace_fedora_jeos.conf
fc2fea0
%{_sysconfdir}/imagefactory/jeos_images/rackspace_rhel_jeos.conf
4e4ef0f
%endif
fc2fea0
4e4ef0f
%if 0%{include_nova_image_builder}
fc2fea0
%files Nova
fc2fea0
%dir %{python_sitelib}/imagefactory_plugins/Nova
fc2fea0
%{python_sitelib}/imagefactory_plugins/Nova/*
fc2fea0
%endif
fc2fea0
ee1ac58
%files EC2
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/EC2
ee1ac58
%{python_sitelib}/imagefactory_plugins/EC2/*
ee1ac58
%{_bindir}/create-ec2-factory-credentials
ee1ac58
ee1ac58
%files EC2-JEOS-images
ee1ac58
%{_sysconfdir}/imagefactory/jeos_images/ec2_fedora_jeos.conf
ee1ac58
%{_sysconfdir}/imagefactory/jeos_images/ec2_rhel_jeos.conf
ee1ac58
ee1ac58
%if 0%{?build_mock}
ee1ac58
%files MockOS
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/MockOS
ee1ac58
%{python_sitelib}/imagefactory_plugins/MockOS/*
ee1ac58
ee1ac58
%files MockCloud
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/MockCloud
ee1ac58
%{python_sitelib}/imagefactory_plugins/MockCloud/*
ee1ac58
%endif
ee1ac58
ee1ac58
%files RHEVM
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/RHEVM
ee1ac58
%{python_sitelib}/imagefactory_plugins/RHEVM/*
ee1ac58
ee1ac58
%files vSphere
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/vSphere
ee1ac58
%{python_sitelib}/imagefactory_plugins/vSphere/*
ee1ac58
ee1ac58
%files Docker
ee1ac58
%dir %{python_sitelib}/imagefactory_plugins/Docker
ee1ac58
%{python_sitelib}/imagefactory_plugins/Docker/*
ee1ac58
2a8fdbf
%files HyperV
2a8fdbf
%dir %{python_sitelib}/imagefactory_plugins/HyperV
2a8fdbf
%{python_sitelib}/imagefactory_plugins/HyperV/*
2a8fdbf
ee1ac58
%changelog
2a8fdbf
* Tue May 31 2016 Ian McLeod <imcleod@redhat.com> - 1.1.9-1
2a8fdbf
- Upstream release 1.1.9
2a8fdbf
  - Add HyperV Vagrant support
2a8fdbf
  - enhance vSphere and VMWare Fusion support
2a8fdbf
3261cb6
* Thu Mar 24 2016 Ian McLeod <imcleod@redhat.com> - 1.1.8-4
3261cb6
- add new docker base image version options
3261cb6
- fix koji issue when ICICLE generation is disabled
3261cb6
3261cb6
* Thu Mar 17 2016 Ian McLeod <imcleod@redhat.com> - 1.1.8-3
3261cb6
- temporarily disable OpenShift and RAX for F24
3261cb6
915b225
* Wed Mar 16 2016 Ian McLeod <imcleod@redhat.com> - 1.1.8-2
915b225
- enable non-x86_64 Docker base image builds
915b225
4e4ef0f
* Wed Mar 16 2016 Ian McLeod <imcleod@redhat.com> - 1.1.8-1
4e4ef0f
- Upstream release 1.1.8
4e4ef0f
- systemd support
4e4ef0f
- docker base image updates
4e4ef0f
- significant EC2 updates for regions and instance types
4e4ef0f
- VMWare fusion vagrant box support
4e4ef0f
915b225
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-3
915b225
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
915b225
915b225
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.7-2
915b225
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
915b225
c2c65e1
* Wed Jan 7 2015 Ian McLeod <imcleod@redhat.com> - 1.1.7-1
c2c65e1
- Upstream release 1.1.7
c2c65e1
- Vagrant box support added to OVA plugin
c2c65e1
fc2fea0
* Mon Nov 24 2014 Ian McLeod <imcleod@redhat.com> - 1.1.6-2
fc2fea0
- Assorted fixes and features to enable rpm-ostree-toolbox integration
fc2fea0
3b7da95
* Tue Oct 21 2014 Ian McLeod <imcleod@redhat.com> - 1.1.6-1
3b7da95
- Upstream 1.1.6 release
3b7da95
185ea81
* Wed Jul 9 2014 Steve Loranz <sloranz@redhat.com> - 1.1.6
185ea81
- Add Nova plugin
185ea81
ee1ac58
* Tue May 6 2014 Ian McLeod <imcleod@redhat.com> - 1.1.5-2
ee1ac58
- Rebase with upstream
ee1ac58
- Improved parameters parsing that couples with improved parameters CLI support in core imagefactory
ee1ac58
- Add support for "offline" ICICLE generation in TinMan
ee1ac58
- Rework IndirectionCloud to work with recent Oz releases
ee1ac58
ee1ac58
* Mon Sep 23 2013 Ian McLeod <imcleod@redhat.com> - 1.1.3-2
ee1ac58
- Add abort() method to TinMan plugin
ee1ac58
ee1ac58
* Thu Aug 15 2013 Ian McLeod <imcleod@redhat.com> - 1.1.3
ee1ac58
- Rebase with upstream