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