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