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