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