Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update imagefactory spec file.

This does a number of things:
1)  Brings it up-to-date with respect to the Fedora guidelines
2)  Adds in imagefactory JEOS configuration files as subpackages

Signed-off-by: Chris Lalancette <clalance@redhat.com>
  • Loading branch information...
commit 4897b982885a61fd256ba2fc15613dcfc0f4baba 1 parent bcc434d
Chris Lalancette authored
View
2  MANIFEST.in
@@ -1,2 +1,2 @@
include COPYING Documentation/man/imagefactory.1 cert-ec2.pem imagefactory.conf
-include scripts/imagefactory
+include scripts/imagefactory conf/*.conf
View
8 conf/ec2_fedora_jeos_03_OCT_2011.conf
@@ -0,0 +1,8 @@
+ec2:ec2-us-east-1:Fedora:15:x86_64:ami-c31cd8aa
+ec2:ec2-us-east-1:Fedora:15:i386:ami-b71cd8de
+ec2:ec2-us-east-1:Fedora:14:x86_64:ami-5b1dd932
+ec2:ec2-us-east-1:Fedora:14:i386:ami-171dd97e
+ec2:ec2-us-west-1:Fedora:15:x86_64:ami-45a9fb00
+ec2:ec2-us-west-1:Fedora:15:i386:ami-65a9fb20
+ec2:ec2-us-west-1:Fedora:14:x86_64:ami-75a9fb30
+ec2:ec2-us-west-1:Fedora:14:i386:ami-73a9fb36
View
54 conf/ec2_rhel_jeos_03_OCT_2011.conf
@@ -0,0 +1,54 @@
+# Official RHEL AMIs - List compiled 3-October-2011
+# Billing details here:
+# http://aws.amazon.com/rhel/
+
+ec2:ec2-ap-northeast-1:RHEL-5:U5:i386:ami-0e19ac0f
+ec2:ec2-ap-northeast-1:RHEL-5:U6:i386:ami-5e19ac5f
+ec2:ec2-ap-northeast-1:RHEL-5:U7:i386:ami-3805b039
+ec2:ec2-ap-northeast-1:RHEL-6:0:i386:ami-542a9f55
+ec2:ec2-ap-northeast-1:RHEL-6:1:i386:ami-2c0fba2d
+ec2:ec2-ap-southeast-1:RHEL-5:U5:i386:ami-0484ff56
+ec2:ec2-ap-southeast-1:RHEL-5:U6:i386:ami-cc84ff9e
+ec2:ec2-ap-southeast-1:RHEL-5:U7:i386:ami-d2f88380
+ec2:ec2-ap-southeast-1:RHEL-6:0:i386:ami-d08ef582
+ec2:ec2-ap-southeast-1:RHEL-6:1:i386:ami-62f48f30
+ec2:ec2-eu-west-1:RHEL-5:U5:i386:ami-76ac9f02
+ec2:ec2-eu-west-1:RHEL-5:U6:i386:ami-28ac9f5c
+ec2:ec2-eu-west-1:RHEL-5:U7:i386:ami-fa95a68e
+ec2:ec2-eu-west-1:RHEL-6:0:i386:ami-52bb8826
+ec2:ec2-eu-west-1:RHEL-6:1:i386:ami-9289bae6
+ec2:ec2-us-east-1:RHEL-5:U5:i386:ami-2d8e4c44
+ec2:ec2-us-east-1:RHEL-5:U6:i386:ami-8d8f4de4
+ec2:ec2-us-east-1:RHEL-5:U7:i386:ami-77a2601e
+ec2:ec2-us-east-1:RHEL-6:0:i386:ami-5550933c
+ec2:ec2-us-east-1:RHEL-6:1:i386:ami-3ddb1954
+ec2:ec2-us-west-1:RHEL-5:U5:i386:ami-c7c69b82
+ec2:ec2-us-west-1:RHEL-5:U6:i386:ami-99c69bdc
+ec2:ec2-us-west-1:RHEL-5:U7:i386:ami-67fca122
+ec2:ec2-us-west-1:RHEL-6:0:i386:ami-6bd38e2e
+ec2:ec2-us-west-1:RHEL-6:1:i386:ami-03f3ae46
+ec2:ec2-ap-northeast-1:RHEL-5:U5:x86_64:ami-a42b9ea5
+ec2:ec2-ap-northeast-1:RHEL-5:U6:x86_64:ami-ce2e9bcf
+ec2:ec2-ap-northeast-1:RHEL-5:U7:x86_64:ami-b02e9bb1
+ec2:ec2-ap-northeast-1:RHEL-6:0:x86_64:ami-6817a269
+ec2:ec2-ap-northeast-1:RHEL-6:1:x86_64:ami-c80cb9c9
+ec2:ec2-ap-southeast-1:RHEL-5:U5:x86_64:ami-9e8af1cc
+ec2:ec2-ap-southeast-1:RHEL-5:U6:x86_64:ami-8295eed0
+ec2:ec2-ap-southeast-1:RHEL-5:U7:x86_64:ami-0495ee56
+ec2:ec2-ap-southeast-1:RHEL-6:0:x86_64:ami-c48ef596
+ec2:ec2-ap-southeast-1:RHEL-6:1:x86_64:ami-94f58ec6
+ec2:ec2-eu-west-1:RHEL-5:U5:x86_64:ami-f2b48786
+ec2:ec2-eu-west-1:RHEL-5:U6:x86_64:ami-2eb1825a
+ec2:ec2-eu-west-1:RHEL-5:U7:x86_64:ami-16b28162
+ec2:ec2-eu-west-1:RHEL-6:0:x86_64:ami-46be8d32
+ec2:ec2-eu-west-1:RHEL-6:1:x86_64:ami-7289ba06
+ec2:ec2-us-east-1:RHEL-5:U5:x86_64:ami-a95390c0
+ec2:ec2-us-east-1:RHEL-5:U6:x86_64:ami-8f4083e6
+ec2:ec2-us-east-1:RHEL-5:U7:x86_64:ami-0f0bc866
+ec2:ec2-us-east-1:RHEL-6:0:x86_64:ami-6f63a006
+ec2:ec2-us-east-1:RHEL-6:1:x86_64:ami-31d41658
+ec2:ec2-us-west-1:RHEL-5:U5:x86_64:ami-35d08d70
+ec2:ec2-us-west-1:RHEL-5:U6:x86_64:ami-75d08d30
+ec2:ec2-us-west-1:RHEL-5:U7:x86_64:ami-3dd48978
+ec2:ec2-us-west-1:RHEL-6:0:x86_64:ami-25cc9160
+ec2:ec2-us-west-1:RHEL-6:1:x86_64:ami-ddf0ad98
View
74 imagefactory.spec.in
@@ -1,12 +1,11 @@
-Summary: Image Factory system image generation tool
+Summary: System image generation tool
Name: imagefactory
Version: @VERSION@
Release: 1%{?dist}
-Source0: %{name}-%{version}.tar.gz
-License: GPLv2
-Group: Development/Libraries
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-Url: http://www.aeolusproject.org/imagefactory.html
+Source0: http://repos.fedorapeople.org/repos/aeolus/imagefactory/%{version}/tarball/%{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
@@ -24,7 +23,10 @@ Requires: VMDKstream
Requires: python-suds >= 0.4.1
Requires: python-paste-deploy
Requires: python-oauth2
-BuildRequires: python
+Requires(post): chkconfig
+Requires(preun): chkconfig
+# This is for /sbin/service
+Requires(preun): initscripts
BuildRequires: python-setuptools
%description
@@ -32,41 +34,71 @@ imagefactory is a daemon that listens for build requests via QMF. When
a build request is received, imagefactory will build the requested image
for the requested target.
+%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 -n %{name}-%{version}
+%setup -q
%build
python setup.py build
%install
-%{__rm} -rf $RPM_BUILD_ROOT
-python setup.py install -O1 --root=$RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/imagefactory/jeos_images
-mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/imagefactory/images
-%clean
-rm -rf $RPM_BUILD_ROOT
+python setup.py install -O1 --root=%{buildroot} --skip-build
+
+mkdir -p %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
+mkdir -p %{buildroot}/%{_localstatedir}/lib/imagefactory/images
-%postun
-/sbin/service imagefactory condrestart > /dev/null 2>&1 || :
+sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py
+
+cp conf/ec2_fedora_jeos_03_OCT_2011.conf %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
+cp conf/ec2_rhel_jeos_03_OCT_2011.conf %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
+
+%post
+/sbin/chkconfig --add %{name}
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/service %{name} stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{name}
+fi
%files
-%defattr(-,root,root,-)
-%doc COPYING version.txt
-%{_initrddir}/imagefactory
+%doc COPYING
+%{_initddir}/imagefactory
%config(noreplace) %{_sysconfdir}/imagefactory/imagefactory.conf
%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
-%{_sysconfdir}/pki/imagefactory/cert-ec2.pem
+%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_03_OCT_2011.conf
+
+%files jeosconf-ec2-rhel
+%{_sysconfdir}/imagefactory/jeos_images/ec2_rhel_jeos_03_OCT_2011.conf
+
%changelog
* 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
+- 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.
Please sign in to comment.
Something went wrong with that request. Please try again.