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