- upodated configure options
[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-confd \
136         --enable-monitoring \
137         --enable-socat-escape \
138         --with-ssh-initscript=/etc/rc.d/init.d/sshd \
139         --with-ssh-config-dir=/etc/ssh \
140         --with-kvm-path=/usr/bin/qemu-kvm \
141         --enable-restricted-commands \
142         --with-user-prefix="gnt-" \
143         --with-group-prefix="gnt-"
144
145 %{__make}
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} \
150         $RPM_BUILD_ROOT/etc/{ganeti,cron.d,bash_completion.d,sysconfig,rc.d/init.d}
151
152 %{__make} install \
153         DESTDIR=$RPM_BUILD_ROOT
154
155 install -d $RPM_BUILD_ROOT%{_datadir}/ganeti/os
156
157 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ganeti.conf
158 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-confd
159 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-masterd
160 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-noded
161 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-rapi
162 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-luxid
163 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-mond
164
165 %{__sed} -i -e 's|@LIBDIR@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-*
166
167 cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/ganeti
168
169 cp -p doc/examples/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/ganeti
170 cp -p doc/examples/ganeti.cron $RPM_BUILD_ROOT/etc/cron.d/ganeti
171 cp -p doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir}
172 cp -p doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir}
173 cp -p doc/examples/ganeti-{noded,masterd,rapi,confd,luxid,mond}.service $RPM_BUILD_ROOT%{systemdunitdir}
174
175 %py_postclean
176
177 %clean
178 rm -rf $RPM_BUILD_ROOT
179
180 %pre
181 %groupadd -g 300 gnt-masterd
182 %groupadd -g 301 gnt-confd
183 %groupadd -g 302 gnt-luxid
184 %groupadd -g 303 gnt-rapi
185 %groupadd -g 304 gnt-daemons
186 %groupadd -g 305 gnt-admin
187 %useradd -u 300 -d /var/lib/ganeti -g gnt-masterd -G gnt-daemons,gnt-confd,gnt-admin -c "Ganeti Masterd User" gnt-masterd
188 %useradd -u 301 -d /var/lib/ganeti -g gnt-confd -G gnt-daemons -c "Ganeti Confd User" gnt-confd
189 %useradd -u 302 -d /var/lib/ganeti -g gnt-luxid -G gnt-daemons,gnt-confd,gnt-masterd -c "Ganeti Luxid User" gnt-luxid
190 %useradd -u 303 -d /var/lib/ganeti -g gnt-rapi -G gnt-daemons,gnt-admin -c "Ganeti RAPI User" gnt-rapi
191
192 %post
193 /sbin/chkconfig --add ganeti-noded
194 %service ganeti-noded restart
195 /sbin/chkconfig --add ganeti-masterd
196 %service ganeti-masterd restart
197 /sbin/chkconfig --add ganeti-rapi
198 %service ganeti-rapi restart
199 /sbin/chkconfig --add ganeti-confd
200 %service ganeti-confd restart
201 /sbin/chkconfig --add ganeti-luxid
202 %service ganeti-luxid restart
203 /sbin/chkconfig --add ganeti-mond
204 %service ganeti-mond restart
205 %systemd_post ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service
206
207 %preun
208 if [ "$1" = "0" ]; then
209         %service -q ganeti-confd stop
210         /sbin/chkconfig --del ganeti-confd
211         %service -q ganeti-rapi stop
212         /sbin/chkconfig --del ganeti-rapi
213         %service -q ganeti-masterd stop
214         /sbin/chkconfig --del ganeti-masterd
215         %service -q ganeti-noded stop
216         /sbin/chkconfig --del ganeti-noded
217         %service -q ganeti-luxid stop
218         /sbin/chkconfig --del ganeti-luxid
219         %service -q ganeti-mond stop
220         /sbin/chkconfig --del ganeti-mond
221 fi
222 %systemd_preun ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service
223
224 %postun
225 if [ "$1" = "0" ]; then
226         %userremove gnt-rapi
227         %userremove gnt-luxid
228         %userremove gnt-confd
229         %userremove gnt-masterd
230         %groupremove gnt-admin
231         %groupremove gnt-masterd
232         %groupremove gnt-rapi
233         %groupremove gnt-luxid
234         %groupremove gnt-confd
235         %groupremove gnt-daemons
236 fi
237 %systemd_reload
238
239 %files
240 %defattr(644,root,root,755)
241 %doc NEWS README UPGRADE
242 %attr(754,root,root) /etc/rc.d/init.d/ganeti-confd
243 %attr(754,root,root) /etc/rc.d/init.d/ganeti-luxid
244 %attr(754,root,root) /etc/rc.d/init.d/ganeti-masterd
245 %attr(754,root,root) /etc/rc.d/init.d/ganeti-mond
246 %attr(754,root,root) /etc/rc.d/init.d/ganeti-noded
247 %attr(754,root,root) /etc/rc.d/init.d/ganeti-rapi
248 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ganeti
249 %dir %{_sysconfdir}/ganeti
250 %{systemdunitdir}/ganeti.target
251 %{systemdunitdir}/ganeti-confd.service
252 %{systemdunitdir}/ganeti-luxid.service
253 %{systemdunitdir}/ganeti-masterd.service
254 %{systemdunitdir}/ganeti-mond.service
255 %{systemdunitdir}/ganeti-noded.service
256 %{systemdunitdir}/ganeti-rapi.service
257 %{systemdtmpfilesdir}/ganeti.conf
258 /etc/cron.d/ganeti
259 %dir %{_datadir}/ganeti
260 %dir %{_datadir}/ganeti/os
261 %dir %{_libdir}/ganeti
262 %attr(755,root,root) %{_libdir}/ganeti/check-cert-expired
263 %attr(755,root,root) %{_libdir}/ganeti/daemon-util
264 %attr(755,root,root) %{_libdir}/ganeti/ensure-dirs
265 %attr(755,root,root) %{_libdir}/ganeti/import-export
266 %attr(755,root,root) %{_libdir}/ganeti/kvm-ifup
267 %attr(755,root,root) %{_libdir}/ganeti/mon-collector
268 %attr(755,root,root) %{_libdir}/ganeti/node-daemon-setup
269 %attr(755,root,root) %{_libdir}/ganeti/net-common
270 %attr(755,root,root) %{_libdir}/ganeti/prepare-node-join
271 %attr(755,root,root) %{_libdir}/ganeti/vif-ganeti
272 %dir %{_libdir}/ganeti/iallocators
273 %dir %{_libdir}/ganeti/tools
274 %attr(755,root,root) %{_libdir}/ganeti/tools/burnin
275 %attr(755,root,root) %{_libdir}/ganeti/tools/cfgshell
276 %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade
277 %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade12
278 %attr(755,root,root) %{_libdir}/ganeti/tools/cluster-merge
279 %attr(755,root,root) %{_libdir}/ganeti/tools/confd-client
280 %attr(755,root,root) %{_libdir}/ganeti/tools/fmtjson
281 %attr(755,root,root) %{_libdir}/ganeti/tools/kvm-console-wrapper
282 %attr(755,root,root) %{_libdir}/ganeti/tools/lvmstrap
283 %attr(755,root,root) %{_libdir}/ganeti/tools/master-ip-setup
284 %attr(755,root,root) %{_libdir}/ganeti/tools/move-instance
285 %attr(755,root,root) %{_libdir}/ganeti/tools/node-cleanup
286 %attr(755,root,root) %{_libdir}/ganeti/tools/ovfconverter
287 %attr(755,root,root) %{_libdir}/ganeti/tools/sanitize-config
288 %attr(755,root,root) %{_libdir}/ganeti/tools/users-setup
289 %attr(755,root,root) %{_libdir}/ganeti/tools/vcluster-setup
290 %attr(755,root,root) %{_libdir}/ganeti/tools/xen-console-wrapper
291 %attr(755,root,root) %{_sbindir}/ganeti-cleaner
292 %attr(755,root,root) %{_sbindir}/ganeti-confd
293 %attr(755,root,root) %{_sbindir}/ganeti-listrunner
294 %attr(755,root,root) %{_sbindir}/ganeti-luxid
295 %attr(755,root,root) %{_sbindir}/ganeti-masterd
296 %attr(755,root,root) %{_sbindir}/ganeti-mond
297 %attr(755,root,root) %{_sbindir}/ganeti-noded
298 %attr(755,root,root) %{_sbindir}/ganeti-rapi
299 %attr(755,root,root) %{_sbindir}/ganeti-watcher
300 %attr(755,root,root) %{_sbindir}/gnt-backup
301 %attr(755,root,root) %{_sbindir}/gnt-cluster
302 %attr(755,root,root) %{_sbindir}/gnt-debug
303 %attr(755,root,root) %{_sbindir}/gnt-group
304 %attr(755,root,root) %{_sbindir}/gnt-instance
305 %attr(755,root,root) %{_sbindir}/gnt-job
306 %attr(755,root,root) %{_sbindir}/gnt-network
307 %attr(755,root,root) %{_sbindir}/gnt-node
308 %attr(755,root,root) %{_sbindir}/gnt-os
309 %attr(755,root,root) %{_sbindir}/gnt-storage
310 %{_mandir}/man7/ganeti.7*
311 %{_mandir}/man7/ganeti-extstorage-interface.7*
312 %{_mandir}/man7/ganeti-os-interface.7*
313 %{_mandir}/man7/mon-collector.7*
314 %{_mandir}/man8/ganeti-cleaner.8*
315 %{_mandir}/man8/ganeti-confd.8*
316 %{_mandir}/man8/ganeti-listrunner.8*
317 %{_mandir}/man8/ganeti-luxid.8*
318 %{_mandir}/man8/ganeti-masterd.8*
319 %{_mandir}/man8/ganeti-mond.8*
320 %{_mandir}/man8/ganeti-noded.8*
321 %{_mandir}/man8/ganeti-rapi.8*
322 %{_mandir}/man8/ganeti-watcher.8*
323 %{_mandir}/man8/gnt-backup.8*
324 %{_mandir}/man8/gnt-cluster.8*
325 %{_mandir}/man8/gnt-debug.8*
326 %{_mandir}/man8/gnt-group.8*
327 %{_mandir}/man8/gnt-instance.8*
328 %{_mandir}/man8/gnt-job.8*
329 %{_mandir}/man8/gnt-network.8*
330 %{_mandir}/man8/gnt-node.8*
331 %{_mandir}/man8/gnt-os.8*
332 %{_mandir}/man8/gnt-storage.8*
333 %dir %{py_sitescriptdir}/ganeti
334 %{py_sitescriptdir}/ganeti/*.py*
335 %dir %{py_sitescriptdir}/ganeti/client
336 %{py_sitescriptdir}/ganeti/client/*.py*
337 %dir %{py_sitescriptdir}/ganeti/cmdlib
338 %{py_sitescriptdir}/ganeti/cmdlib/*.py*
339 %dir %{py_sitescriptdir}/ganeti/confd
340 %{py_sitescriptdir}/ganeti/confd/*.py*
341 %dir %{py_sitescriptdir}/ganeti/http
342 %{py_sitescriptdir}/ganeti/http/*.py*
343 %dir %{py_sitescriptdir}/ganeti/hypervisor
344 %{py_sitescriptdir}/ganeti/hypervisor/*.py*
345 %dir %{py_sitescriptdir}/ganeti/impexpd
346 %{py_sitescriptdir}/ganeti/impexpd/*.py*
347 %dir %{py_sitescriptdir}/ganeti/masterd
348 %{py_sitescriptdir}/ganeti/masterd/*.py*
349 %dir %{py_sitescriptdir}/ganeti/rapi
350 %{py_sitescriptdir}/ganeti/rapi/*.py*
351 %dir %{py_sitescriptdir}/ganeti/server
352 %{py_sitescriptdir}/ganeti/server/*.py*
353 %dir %{py_sitescriptdir}/ganeti/storage
354 %{py_sitescriptdir}/ganeti/storage/*.py*
355 %dir %{py_sitescriptdir}/ganeti/tools
356 %{py_sitescriptdir}/ganeti/tools/*.py*
357 %dir %{py_sitescriptdir}/ganeti/utils
358 %{py_sitescriptdir}/ganeti/utils/*.py*
359 %dir %{py_sitescriptdir}/ganeti/watcher
360 %{py_sitescriptdir}/ganeti/watcher/*.py*
361
362 %files htools
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_bindir}/harep
365 %attr(755,root,root) %{_bindir}/hbal
366 %attr(755,root,root) %{_bindir}/hcheck
367 %attr(755,root,root) %{_bindir}/hinfo
368 %attr(755,root,root) %{_bindir}/hroller
369 %attr(755,root,root) %{_bindir}/hscan
370 %attr(755,root,root) %{_bindir}/hspace
371 %attr(755,root,root) %{_bindir}/htools
372 %attr(755,root,root) %{_libdir}/ganeti/iallocators/hail
373 %{_mandir}/man1/hail.1*
374 %{_mandir}/man1/harep.1*
375 %{_mandir}/man1/hbal.1*
376 %{_mandir}/man1/hcheck.1*
377 %{_mandir}/man1/hinfo.1*
378 %{_mandir}/man1/hroller.1*
379 %{_mandir}/man1/hscan.1*
380 %{_mandir}/man1/hspace.1*
381 %{_mandir}/man1/htools.1*
382
383 %files -n bash-completion-ganeti
384 %defattr(644,root,root,755)
385 /etc/bash_completion.d/ganeti
This page took 0.130393 seconds and 3 git commands to generate.