forked from redhat-imaging/imagefactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imagefactory.spec.in
194 lines (155 loc) · 5.79 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
%global use_systemd 1
%else
%global use_systemd 0
# This is, of course, not set in older RPMs and is needed below
%global _unitdir /usr/lib/systemd/system
%endif
Summary: System image generation tool
Name: imagefactory
Version: @VERSION@
Release: @RELEASE@%{?dist}
Source0: http://repos.fedorapeople.org/repos/aeolus/imagefactory/%{version}/tarball/%{name}-%{version}.tar.gz
License: ASL 2.0
Group: Applications/System
URL: https://github.com/redhat-imaging/imagefactory
BuildArch: noarch
%if 0%{?rhel} == 6
ExcludeArch: i386 ppc64
%endif
Requires: python3-pycurl
Requires: python3-libguestfs
Requires: python3-zope-interface
Requires: python3-libxml2
Requires: python3-httplib2
Requires: python3-cherrypy
Requires: python3-oauth2
Requires: python3-libs
Requires: oz
%if %{use_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd-units
%else
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
%endif
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python3-rpm-macros
BuildRequires: python-rpm-macros
# TODO: Any changes to the _internal_ API must increment this version or, in
# the case of backwards compatible changes, add a new version (RPM
# allows multiple version "=" lines for the same package or
# pseudo-package name)
Provides: imagefactory-plugin-api = 1.0
%description
imagefactory allows the creation of system images for multiple virtualization
and cloud providers from a single template definition. See
https://github.com/redhat-imaging/imagefactory for more information.
%prep
%setup -q
%build
%py3_build
%install
%py3_install
%{__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/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
%{__install} -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
# setup.py installs both of these which I suppose is OK
# delete the one we don't want here
%if %{use_systemd}
rm -f %{buildroot}/%{_initddir}/imagefactoryd
%else
rm -f %{buildroot}/%{_unitdir}/imagefactoryd.service
%endif
%if %{use_systemd}
%post
%systemd_post imagefactoryd.service
%preun
%systemd_preun imagefactoryd.service
%postun
%systemd_postun imagefactoryd.service
%else
%post
/sbin/chkconfig --add imagefactoryd
%preun
if [ $1 = 0 ] ; then
/sbin/service imagefactoryd stop >/dev/null 2>&1
/sbin/chkconfig --del imagefactoryd
fi
%endif
%files
%doc COPYING
%if %{use_systemd}
%{_unitdir}/imagefactoryd.service
%else
%{_initddir}/imagefactoryd
%endif
%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
%{python3_sitelib}/imgfac/*.py*
%{python3_sitelib}/imgfac/__pycache__/*.py*
%{python3_sitelib}/imgfac/rest
#%{python3_sitelib}/imgfac/picklingtools
%{python3_sitelib}/imagefactory-*.egg-info
%{_bindir}/imagefactory
%{_bindir}/imagefactoryd
%changelog
* Fri Jan 10 2020 Brendan Reilly <[email protected]> - 1.1.15-1
- Upstream release 1.1.15
- improve handling of canceled builds
* Thu Jun 20 2019 Brendan Reilly <[email protected]> - 1.1.14-1
- Upstream release 1.1.14
- make codebase python 3 compatible
* Tue Jun 26 2018 Brendan Reilly <[email protected]> - 1.1.11-1
- Upstream release 1.1.11
- ovfcommon: supporting OVAs with subdirectories
* Tue May 31 2016 Ian McLeod <[email protected]> - 1.1.9-1
- Upstream release 1.1.9
- Add HyperV Vagrant support
- enhance vSphere and VMWare Fusion support
* Thu Mar 17 2016 Ian McLeod <[email protected]> - 1.1.8-2
- fix RHEL7 conditional for systemd unit file content
* Wed Mar 16 2016 Ian McLeod <[email protected]> - 1.1.8-1
- Upstream release 1.1.8
- systemd support
- docker base image updates
- significant EC2 updates for regions and instance types
- VMWare fusion vagrant box support
* Thu Feb 04 2016 Fedora Release Engineering <[email protected]> - 1.1.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <[email protected]> - 1.1.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Jan 7 2015 Ian McLeod <[email protected]> - 1.1.7-1
- Upstream release 1.1.7
- Vagrant box support added to OVA plugin
* Mon Nov 24 2014 Ian McLeod <[email protected]> - 1.1.6-2
- Assorted fixes and features to enable rpm-ostree-toolbox integration
* Tue Oct 21 2014 Ian McLeod <[email protected]> -1.1.6-1
- Upstream 1.1.6 release
* Tue May 6 2014 Ian McLeod <[email protected]> - 1.1.5-1
- Rebase with upstream
- Improved CLI parameter passing support
* Thu Jan 30 2014 Steve Loranz <[email protected]> - 1.1.3-1
- Remove references to man directories. Documentation will be hosted @ imgfac.org.
* Thu Aug 15 2013 Ian McLeod <[email protected]> - 1.1.3
- Rebase with upstream
* 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.