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