]>
Commit | Line | Data |
---|---|---|
1 | Summary: Cluster-based virtualization management software | |
2 | Name: ganeti | |
3 | Version: 2.9.3 | |
4 | Release: 0.4 | |
5 | License: GPL v2 | |
6 | Group: Applications/System | |
7 | Source0: http://downloads.ganeti.org/releases/2.9/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: 0542ca872bf2d57284359fcc8dc565ef | |
9 | Source1: %{name}.tmpfiles | |
10 | Source2: %{name}-confd.init | |
11 | Source3: %{name}-masterd.init | |
12 | Source4: %{name}-noded.init | |
13 | Source5: %{name}-rapi.init | |
14 | Source6: %{name}-luxid.init | |
15 | Source7: %{name}-mond.init | |
16 | Source8: %{name}.sysconfig | |
17 | Patch0: fix-no-kvm.patch | |
18 | Patch1: systemd.patch | |
19 | Patch2: daemon-util-use-service.patch | |
20 | Patch3: mtl.patch | |
21 | URL: https://code.google.com/p/ganeti/ | |
22 | BuildRequires: autoconf | |
23 | BuildRequires: automake | |
24 | BuildRequires: curl-devel | |
25 | BuildRequires: fakeroot | |
26 | BuildRequires: gawk | |
27 | BuildRequires: ghc | |
28 | BuildRequires: ghc-Crypto | |
29 | BuildRequires: ghc-QuickCheck | |
30 | BuildRequires: ghc-curl | |
31 | BuildRequires: ghc-haskell-platform | |
32 | BuildRequires: ghc-hinotify | |
33 | BuildRequires: ghc-hslogger >= 1.2.3 | |
34 | BuildRequires: ghc-json | |
35 | BuildRequires: ghc-regex-pcre | |
36 | BuildRequires: ghc-snap-server | |
37 | BuildRequires: ghc-temporary | |
38 | BuildRequires: ghc-utf8-string | |
39 | BuildRequires: gmp-devel | |
40 | BuildRequires: hlint | |
41 | BuildRequires: hscolour | |
42 | BuildRequires: pandoc | |
43 | BuildRequires: python | |
44 | BuildRequires: python-affinity | |
45 | BuildRequires: python-bitarray | |
46 | BuildRequires: python-coverage | |
47 | BuildRequires: python-devel | |
48 | BuildRequires: python-distribute | |
49 | BuildRequires: python-ipaddr | |
50 | BuildRequires: python-mock >= 1.0.1 | |
51 | BuildRequires: python-modules | |
52 | BuildRequires: python-paramiko | |
53 | BuildRequires: python-pep8 | |
54 | BuildRequires: python-pyOpenSSL | |
55 | BuildRequires: python-pycurl | |
56 | BuildRequires: python-pyinotify | |
57 | BuildRequires: python-pyparsing | |
58 | BuildRequires: python-simplejson | |
59 | BuildRequires: rpm-pythonprov | |
60 | BuildRequires: rpmbuild(macros) >= 1.647 | |
61 | Requires(post,preun): /sbin/chkconfig | |
62 | Requires(post,preun,postun): systemd-units >= 38 | |
63 | Requires: bridge-utils | |
64 | Requires: drbdsetup >= 8.0.12 | |
65 | Requires: iproute2 | |
66 | Requires: iputils-arping | |
67 | Requires: lvm2 | |
68 | Requires: openssh-clients | |
69 | Requires: openssh-server | |
70 | Requires: python | |
71 | Requires: python-affinity | |
72 | Requires: python-bitarray | |
73 | Requires: python-devel | |
74 | Requires: python-distribute | |
75 | Requires: python-ipaddr | |
76 | Requires: python-modules | |
77 | Requires: python-paramiko | |
78 | Requires: python-pycurl | |
79 | Requires: python-pyinotify | |
80 | Requires: python-pyOpenSSL | |
81 | Requires: python-pyparsing | |
82 | Requires: python-simplejson | |
83 | Requires: rc-scripts | |
84 | Requires: socat | |
85 | Requires: sudo | |
86 | Requires: systemd-units >= 0.38 | |
87 | #Suggests: ganeti-instance-debootstrap | |
88 | Suggests: qemu | |
89 | Suggests: xen | |
90 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
91 | ||
92 | %description | |
93 | Ganeti is a cluster virtual server management software tool built on | |
94 | top of existing virtualization technologies such as Xen or KVM and | |
95 | other Open Source software. | |
96 | ||
97 | %package htools | |
98 | Summary: Cluster allocation tools for Ganeti | |
99 | Group: Applications/System | |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
102 | %description htools | |
103 | These are additional tools used for enhanced allocation and capacity | |
104 | calculation on Ganeti clusters. | |
105 | ||
106 | The tools provided are: | |
107 | - hail, an iallocator script for ganeti | |
108 | - hbal, used to redistribute instances on the cluster | |
109 | - hspace, used for capacity calculation | |
110 | - hscan, used to gather cluster files for offline use in hbal/hspace | |
111 | ||
112 | %package -n bash-completion-ganeti | |
113 | Summary: bash-completion for ganeti | |
114 | Group: Applications/Shells | |
115 | Requires: %{name} = %{version} | |
116 | ||
117 | %description -n bash-completion-ganeti | |
118 | bash-completion for ganeti. | |
119 | ||
120 | %prep | |
121 | %setup -q | |
122 | %patch0 -p1 | |
123 | %patch1 -p1 | |
124 | %patch2 -p1 | |
125 | %patch3 -p1 | |
126 | ||
127 | %build | |
128 | %{__aclocal} -I autotools | |
129 | %{__autoconf} | |
130 | %{__automake} | |
131 | # DON'T use full path to xl binary, just 'xl' (see lib/hypervisor/hv_xen.py for a reason) | |
132 | %configure \ | |
133 | IP_PATH=/sbin/ip \ | |
134 | DOT=/usr/bin/dot \ | |
135 | PYCOVERAGE=/usr/bin/coverage-%{py_ver} \ | |
136 | PYLINT=/usr/bin/pylint \ | |
137 | SOCAT=/usr/bin/socat \ | |
138 | QEMUIMG_PATH=/usr/bin/qemu-img \ | |
139 | --enable-syslog \ | |
140 | --enable-confd \ | |
141 | --enable-monitoring \ | |
142 | --enable-socat-escape \ | |
143 | --with-ssh-initscript=/etc/rc.d/init.d/sshd \ | |
144 | --with-ssh-config-dir=/etc/ssh \ | |
145 | --with-kvm-path=/usr/bin/qemu-kvm \ | |
146 | --enable-restricted-commands \ | |
147 | --with-user-prefix="gnt-" \ | |
148 | --with-group-prefix="gnt-" | |
149 | ||
150 | %{__make} | |
151 | ||
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} \ | |
155 | $RPM_BUILD_ROOT/etc/{ganeti,cron.d,bash_completion.d,sysconfig,rc.d/init.d,sudoers.d} | |
156 | ||
157 | %{__make} install \ | |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | ||
160 | install -d $RPM_BUILD_ROOT%{_datadir}/ganeti/os | |
161 | ||
162 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ganeti.conf | |
163 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-confd | |
164 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-masterd | |
165 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-noded | |
166 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-rapi | |
167 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-luxid | |
168 | install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-mond | |
169 | ||
170 | %{__sed} -i -e 's|@LIBDIR@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-* | |
171 | ||
172 | cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/ganeti | |
173 | ||
174 | cp -p doc/examples/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/ganeti | |
175 | cp -p doc/examples/ganeti.cron $RPM_BUILD_ROOT/etc/cron.d/ganeti | |
176 | cp -p doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir} | |
177 | cp -p doc/examples/ganeti-{noded,masterd,rapi,confd,luxid,mond}.service $RPM_BUILD_ROOT%{systemdunitdir} | |
178 | cp -p doc/examples/ganeti.sudoers $RPM_BUILD_ROOT/etc/sudoers.d/ganeti | |
179 | ||
180 | %py_postclean | |
181 | ||
182 | %clean | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %pre | |
186 | %groupadd -g 300 gnt-masterd | |
187 | %groupadd -g 301 gnt-confd | |
188 | %groupadd -g 302 gnt-luxid | |
189 | %groupadd -g 303 gnt-rapi | |
190 | %groupadd -g 304 gnt-daemons | |
191 | %groupadd -g 305 gnt-admin | |
192 | %useradd -u 300 -d /var/lib/ganeti -g gnt-masterd -G gnt-daemons,gnt-confd,gnt-admin -c "Ganeti Masterd User" gnt-masterd | |
193 | %useradd -u 301 -d /var/lib/ganeti -g gnt-confd -G gnt-daemons -c "Ganeti Confd User" gnt-confd | |
194 | %useradd -u 302 -d /var/lib/ganeti -g gnt-luxid -G gnt-daemons,gnt-confd,gnt-masterd -c "Ganeti Luxid User" gnt-luxid | |
195 | %useradd -u 303 -d /var/lib/ganeti -g gnt-rapi -G gnt-daemons,gnt-admin -c "Ganeti RAPI User" gnt-rapi | |
196 | ||
197 | %post | |
198 | /sbin/chkconfig --add ganeti-noded | |
199 | %service ganeti-noded restart | |
200 | /sbin/chkconfig --add ganeti-masterd | |
201 | %service ganeti-masterd restart | |
202 | /sbin/chkconfig --add ganeti-rapi | |
203 | %service ganeti-rapi restart | |
204 | /sbin/chkconfig --add ganeti-confd | |
205 | %service ganeti-confd restart | |
206 | /sbin/chkconfig --add ganeti-luxid | |
207 | %service ganeti-luxid restart | |
208 | /sbin/chkconfig --add ganeti-mond | |
209 | %service ganeti-mond restart | |
210 | %systemd_post ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service | |
211 | ||
212 | %preun | |
213 | if [ "$1" = "0" ]; then | |
214 | %service -q ganeti-confd stop | |
215 | /sbin/chkconfig --del ganeti-confd | |
216 | %service -q ganeti-rapi stop | |
217 | /sbin/chkconfig --del ganeti-rapi | |
218 | %service -q ganeti-masterd stop | |
219 | /sbin/chkconfig --del ganeti-masterd | |
220 | %service -q ganeti-noded stop | |
221 | /sbin/chkconfig --del ganeti-noded | |
222 | %service -q ganeti-luxid stop | |
223 | /sbin/chkconfig --del ganeti-luxid | |
224 | %service -q ganeti-mond stop | |
225 | /sbin/chkconfig --del ganeti-mond | |
226 | fi | |
227 | %systemd_preun ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service | |
228 | ||
229 | %postun | |
230 | if [ "$1" = "0" ]; then | |
231 | %userremove gnt-rapi | |
232 | %userremove gnt-luxid | |
233 | %userremove gnt-confd | |
234 | %userremove gnt-masterd | |
235 | %groupremove gnt-admin | |
236 | %groupremove gnt-masterd | |
237 | %groupremove gnt-rapi | |
238 | %groupremove gnt-luxid | |
239 | %groupremove gnt-confd | |
240 | %groupremove gnt-daemons | |
241 | fi | |
242 | %systemd_reload | |
243 | ||
244 | %files | |
245 | %defattr(644,root,root,755) | |
246 | %doc NEWS README UPGRADE | |
247 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-confd | |
248 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-luxid | |
249 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-masterd | |
250 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-mond | |
251 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-noded | |
252 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-rapi | |
253 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ganeti | |
254 | %config(noreplace) %verify(not md5 mtime size) /etc/sudoers.d/ganeti | |
255 | %dir %{_sysconfdir}/ganeti | |
256 | %{systemdunitdir}/ganeti.target | |
257 | %{systemdunitdir}/ganeti-confd.service | |
258 | %{systemdunitdir}/ganeti-luxid.service | |
259 | %{systemdunitdir}/ganeti-masterd.service | |
260 | %{systemdunitdir}/ganeti-mond.service | |
261 | %{systemdunitdir}/ganeti-noded.service | |
262 | %{systemdunitdir}/ganeti-rapi.service | |
263 | %{systemdtmpfilesdir}/ganeti.conf | |
264 | /etc/cron.d/ganeti | |
265 | %dir %{_datadir}/ganeti | |
266 | %dir %{_datadir}/ganeti/os | |
267 | %dir %{_libdir}/ganeti | |
268 | %attr(755,root,root) %{_libdir}/ganeti/check-cert-expired | |
269 | %attr(755,root,root) %{_libdir}/ganeti/daemon-util | |
270 | %attr(755,root,root) %{_libdir}/ganeti/ensure-dirs | |
271 | %attr(755,root,root) %{_libdir}/ganeti/import-export | |
272 | %attr(755,root,root) %{_libdir}/ganeti/kvm-ifup | |
273 | %attr(755,root,root) %{_libdir}/ganeti/mon-collector | |
274 | %attr(755,root,root) %{_libdir}/ganeti/node-daemon-setup | |
275 | %attr(755,root,root) %{_libdir}/ganeti/net-common | |
276 | %attr(755,root,root) %{_libdir}/ganeti/prepare-node-join | |
277 | %attr(755,root,root) %{_libdir}/ganeti/vif-ganeti | |
278 | %dir %{_libdir}/ganeti/iallocators | |
279 | %dir %{_libdir}/ganeti/tools | |
280 | %attr(755,root,root) %{_libdir}/ganeti/tools/burnin | |
281 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgshell | |
282 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade | |
283 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade12 | |
284 | %attr(755,root,root) %{_libdir}/ganeti/tools/cluster-merge | |
285 | %attr(755,root,root) %{_libdir}/ganeti/tools/confd-client | |
286 | %attr(755,root,root) %{_libdir}/ganeti/tools/fmtjson | |
287 | %attr(755,root,root) %{_libdir}/ganeti/tools/kvm-console-wrapper | |
288 | %attr(755,root,root) %{_libdir}/ganeti/tools/lvmstrap | |
289 | %attr(755,root,root) %{_libdir}/ganeti/tools/master-ip-setup | |
290 | %attr(755,root,root) %{_libdir}/ganeti/tools/move-instance | |
291 | %attr(755,root,root) %{_libdir}/ganeti/tools/node-cleanup | |
292 | %attr(755,root,root) %{_libdir}/ganeti/tools/ovfconverter | |
293 | %attr(755,root,root) %{_libdir}/ganeti/tools/sanitize-config | |
294 | %attr(755,root,root) %{_libdir}/ganeti/tools/users-setup | |
295 | %attr(755,root,root) %{_libdir}/ganeti/tools/vcluster-setup | |
296 | %attr(755,root,root) %{_libdir}/ganeti/tools/xen-console-wrapper | |
297 | %attr(755,root,root) %{_sbindir}/ganeti-cleaner | |
298 | %attr(755,root,root) %{_sbindir}/ganeti-confd | |
299 | %attr(755,root,root) %{_sbindir}/ganeti-listrunner | |
300 | %attr(755,root,root) %{_sbindir}/ganeti-luxid | |
301 | %attr(755,root,root) %{_sbindir}/ganeti-masterd | |
302 | %attr(755,root,root) %{_sbindir}/ganeti-mond | |
303 | %attr(755,root,root) %{_sbindir}/ganeti-noded | |
304 | %attr(755,root,root) %{_sbindir}/ganeti-rapi | |
305 | %attr(755,root,root) %{_sbindir}/ganeti-watcher | |
306 | %attr(755,root,root) %{_sbindir}/gnt-backup | |
307 | %attr(755,root,root) %{_sbindir}/gnt-cluster | |
308 | %attr(755,root,root) %{_sbindir}/gnt-debug | |
309 | %attr(755,root,root) %{_sbindir}/gnt-group | |
310 | %attr(755,root,root) %{_sbindir}/gnt-instance | |
311 | %attr(755,root,root) %{_sbindir}/gnt-job | |
312 | %attr(755,root,root) %{_sbindir}/gnt-network | |
313 | %attr(755,root,root) %{_sbindir}/gnt-node | |
314 | %attr(755,root,root) %{_sbindir}/gnt-os | |
315 | %attr(755,root,root) %{_sbindir}/gnt-storage | |
316 | %{_mandir}/man7/ganeti.7* | |
317 | %{_mandir}/man7/ganeti-extstorage-interface.7* | |
318 | %{_mandir}/man7/ganeti-os-interface.7* | |
319 | %{_mandir}/man7/mon-collector.7* | |
320 | %{_mandir}/man8/ganeti-cleaner.8* | |
321 | %{_mandir}/man8/ganeti-confd.8* | |
322 | %{_mandir}/man8/ganeti-listrunner.8* | |
323 | %{_mandir}/man8/ganeti-luxid.8* | |
324 | %{_mandir}/man8/ganeti-masterd.8* | |
325 | %{_mandir}/man8/ganeti-mond.8* | |
326 | %{_mandir}/man8/ganeti-noded.8* | |
327 | %{_mandir}/man8/ganeti-rapi.8* | |
328 | %{_mandir}/man8/ganeti-watcher.8* | |
329 | %{_mandir}/man8/gnt-backup.8* | |
330 | %{_mandir}/man8/gnt-cluster.8* | |
331 | %{_mandir}/man8/gnt-debug.8* | |
332 | %{_mandir}/man8/gnt-group.8* | |
333 | %{_mandir}/man8/gnt-instance.8* | |
334 | %{_mandir}/man8/gnt-job.8* | |
335 | %{_mandir}/man8/gnt-network.8* | |
336 | %{_mandir}/man8/gnt-node.8* | |
337 | %{_mandir}/man8/gnt-os.8* | |
338 | %{_mandir}/man8/gnt-storage.8* | |
339 | %dir %{py_sitescriptdir}/ganeti | |
340 | %{py_sitescriptdir}/ganeti/*.py* | |
341 | %dir %{py_sitescriptdir}/ganeti/client | |
342 | %{py_sitescriptdir}/ganeti/client/*.py* | |
343 | %dir %{py_sitescriptdir}/ganeti/cmdlib | |
344 | %{py_sitescriptdir}/ganeti/cmdlib/*.py* | |
345 | %dir %{py_sitescriptdir}/ganeti/confd | |
346 | %{py_sitescriptdir}/ganeti/confd/*.py* | |
347 | %dir %{py_sitescriptdir}/ganeti/http | |
348 | %{py_sitescriptdir}/ganeti/http/*.py* | |
349 | %dir %{py_sitescriptdir}/ganeti/hypervisor | |
350 | %{py_sitescriptdir}/ganeti/hypervisor/*.py* | |
351 | %dir %{py_sitescriptdir}/ganeti/impexpd | |
352 | %{py_sitescriptdir}/ganeti/impexpd/*.py* | |
353 | %dir %{py_sitescriptdir}/ganeti/masterd | |
354 | %{py_sitescriptdir}/ganeti/masterd/*.py* | |
355 | %dir %{py_sitescriptdir}/ganeti/rapi | |
356 | %{py_sitescriptdir}/ganeti/rapi/*.py* | |
357 | %dir %{py_sitescriptdir}/ganeti/server | |
358 | %{py_sitescriptdir}/ganeti/server/*.py* | |
359 | %dir %{py_sitescriptdir}/ganeti/storage | |
360 | %{py_sitescriptdir}/ganeti/storage/*.py* | |
361 | %dir %{py_sitescriptdir}/ganeti/tools | |
362 | %{py_sitescriptdir}/ganeti/tools/*.py* | |
363 | %dir %{py_sitescriptdir}/ganeti/utils | |
364 | %{py_sitescriptdir}/ganeti/utils/*.py* | |
365 | %dir %{py_sitescriptdir}/ganeti/watcher | |
366 | %{py_sitescriptdir}/ganeti/watcher/*.py* | |
367 | ||
368 | %files htools | |
369 | %defattr(644,root,root,755) | |
370 | %attr(755,root,root) %{_bindir}/harep | |
371 | %attr(755,root,root) %{_bindir}/hbal | |
372 | %attr(755,root,root) %{_bindir}/hcheck | |
373 | %attr(755,root,root) %{_bindir}/hinfo | |
374 | %attr(755,root,root) %{_bindir}/hroller | |
375 | %attr(755,root,root) %{_bindir}/hscan | |
376 | %attr(755,root,root) %{_bindir}/hspace | |
377 | %attr(755,root,root) %{_bindir}/htools | |
378 | %attr(755,root,root) %{_libdir}/ganeti/iallocators/hail | |
379 | %{_mandir}/man1/hail.1* | |
380 | %{_mandir}/man1/harep.1* | |
381 | %{_mandir}/man1/hbal.1* | |
382 | %{_mandir}/man1/hcheck.1* | |
383 | %{_mandir}/man1/hinfo.1* | |
384 | %{_mandir}/man1/hroller.1* | |
385 | %{_mandir}/man1/hscan.1* | |
386 | %{_mandir}/man1/hspace.1* | |
387 | %{_mandir}/man1/htools.1* | |
388 | ||
389 | %files -n bash-completion-ganeti | |
390 | %defattr(644,root,root,755) | |
391 | /etc/bash_completion.d/ganeti |