forked from redhat-imaging/imagefactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imagefactory.spec.in
105 lines (93 loc) · 3.28 KB
/
imagefactory.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Summary: System image generation tool
Name: imagefactory
Version: @VERSION@
Release: 1%{?dist}
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
#Commenting out requirements that have moved to plugins
#Leaving them temporarily to aid in testing
#
#Moved to EC2Cloud
# Requires: euca2ools
# Requires: python-boto >= 2.0
#
#Moved to FedoraOS (and possibly other OS plugins)
# Requires: oz >= 0.7.0
#
#To be moved to vsphere/ESX
#Requires: VMDKstream
#Requires: python-suds >= 0.4.1
#Requires: python-psphere
#
#To be moved to RackSpace
#Requires: python-cloudservers
#
#To be moved/removed in RHEV-M
# We need this for dc-rhev-image
# TODO: Remove this requirement when move pushing internal to the factory
#Requires: iwhd >= 1.2
#Requires: qemu-img
Requires: python-pycurl
Requires: python-libguestfs
Requires: python-zope-interface
Requires: libxml2-python
Requires: python-httplib2
Requires: python-argparse
Requires: python-paste-deploy
Requires: python-oauth2
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.
%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}/imagefactory/plugins.d
%{__install} -d %{buildroot}/%{_sysconfdir}/logrotate.d
sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py
%{__install} -m0600 conf/imagefactoryd.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
%{__install} -m0600 conf/imagefactoryd.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
%post
/sbin/chkconfig --add imagefactoryd
%preun
if [ $1 = 0 ] ; then
/sbin/service imagefactoryd stop >/dev/null 2>&1
/sbin/chkconfig --del imagefactoryd
fi
%files
%doc COPYING
%{_initddir}/imagefactoryd
%config(noreplace) %{_sysconfdir}/imagefactory/imagefactory.conf
%config(noreplace) %{_sysconfdir}/sysconfig/imagefactoryd
%config(noreplace) %{_sysconfdir}/logrotate.d/imagefactoryd
%dir %attr(0755, root, root) %{_sysconfdir}/pki/imagefactory/
%dir %attr(0755, root, root) %{_sysconfdir}/imagefactory/jeos_images/
%dir %attr(0755, root, root) %{_sysconfdir}/imagefactory/plugins.d/
%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
%{_bindir}/imagefactoryd
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man7/*
%changelog
* Thu Sep 15 2011 Ian McLeod <[email protected]> - 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 <[email protected]> - 0.1.6-1
- Initial spec file.