]>
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 | |
554d0f8c | 16 | Patch0: fix-no-kvm.patch |
bc935a7a | 17 | Patch1: systemd.patch |
4a9e23c9 | 18 | Patch2: daemon-util-use-service.patch |
7e1fcc70 | 19 | URL: https://code.google.com/p/ganeti/ |
bc935a7a JR |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
22 | BuildRequires: curl-devel | |
7e1fcc70 JR |
23 | BuildRequires: fakeroot |
24 | BuildRequires: gawk | |
25 | BuildRequires: ghc | |
86f7b894 | 26 | BuildRequires: ghc-Crypto |
7e1fcc70 JR |
27 | BuildRequires: ghc-QuickCheck |
28 | BuildRequires: ghc-curl | |
29 | BuildRequires: ghc-haskell-platform | |
86f7b894 | 30 | BuildRequires: ghc-hinotify |
2b0c5c25 | 31 | BuildRequires: ghc-hslogger >= 1.2.3 |
7e1fcc70 | 32 | BuildRequires: ghc-json |
2b0c5c25 | 33 | BuildRequires: ghc-snap-server |
86f7b894 JR |
34 | BuildRequires: ghc-regex-pcre |
35 | BuildRequires: ghc-utf8-string | |
bc935a7a | 36 | BuildRequires: gmp-devel |
7e1fcc70 JR |
37 | BuildRequires: hlint |
38 | BuildRequires: hscolour | |
39 | BuildRequires: python | |
40 | BuildRequires: python-affinity | |
86f7b894 | 41 | BuildRequires: python-bitarray |
a24e1f94 | 42 | BuildRequires: python-devel |
a24e1f94 | 43 | BuildRequires: python-distribute |
86f7b894 | 44 | BuildRequires: python-ipaddr |
7e1fcc70 JR |
45 | BuildRequires: python-modules |
46 | BuildRequires: python-paramiko | |
bc935a7a | 47 | BuildRequires: python-pyOpenSSL |
7e1fcc70 JR |
48 | BuildRequires: python-pycurl |
49 | BuildRequires: python-pyinotify | |
50 | BuildRequires: python-pyparsing | |
51 | BuildRequires: python-simplejson | |
43241b14 | 52 | BuildRequires: rpm-pythonprov |
7e1fcc70 | 53 | BuildRequires: rpmbuild(macros) >= 1.647 |
43241b14 | 54 | Requires(post,preun): /sbin/chkconfig |
7e1fcc70 | 55 | Requires(post,preun,postun): systemd-units >= 38 |
adaac8ef JR |
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 | |
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 | ||
a24e1f94 ER |
161 | cp -p doc/examples/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/ganeti |
162 | cp -p doc/examples/ganeti.cron $RPM_BUILD_ROOT/etc/cron.d/ganeti | |
163 | cp -p doc/examples/ganeti.default $RPM_BUILD_ROOT/etc/sysconfig/ganeti | |
164 | cp -p doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir} | |
165 | cp -p doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir} | |
2b0c5c25 | 166 | cp -p doc/examples/ganeti-{noded,masterd,rapi,confd,luxid,mond}.service $RPM_BUILD_ROOT%{systemdunitdir} |
7adb0d04 | 167 | |
43241b14 JR |
168 | %py_postclean |
169 | ||
7e1fcc70 JR |
170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
7e1fcc70 | 173 | %post |
da74baa0 JR |
174 | /sbin/chkconfig --add ganeti-noded |
175 | %service ganeti-noded restart | |
176 | /sbin/chkconfig --add ganeti-masterd | |
177 | %service ganeti-masterd restart | |
178 | /sbin/chkconfig --add ganeti-rapi | |
179 | %service ganeti-rapi restart | |
180 | /sbin/chkconfig --add ganeti-confd | |
181 | %service ganeti-confd restart | |
2b0c5c25 JR |
182 | /sbin/chkconfig --add ganeti-luxid |
183 | %service ganeti-luxid restart | |
184 | /sbin/chkconfig --add ganeti-mond | |
185 | %service ganeti-mond restart | |
186 | %systemd_post ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service | |
7e1fcc70 JR |
187 | |
188 | %preun | |
189 | if [ "$1" = "0" ]; then | |
da74baa0 JR |
190 | %service -q ganeti-confd stop |
191 | /sbin/chkconfig --del ganeti-confd | |
192 | %service -q ganeti-rapi stop | |
193 | /sbin/chkconfig --del ganeti-rapi | |
194 | %service -q ganeti-masterd stop | |
195 | /sbin/chkconfig --del ganeti-masterd | |
196 | %service -q ganeti-noded stop | |
197 | /sbin/chkconfig --del ganeti-noded | |
2b0c5c25 JR |
198 | %service -q ganeti-luxid stop |
199 | /sbin/chkconfig --del ganeti-luxid | |
200 | %service -q ganeti-mond stop | |
201 | /sbin/chkconfig --del ganeti-mond | |
7e1fcc70 | 202 | fi |
2b0c5c25 | 203 | %systemd_preun ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service ganeti-luxid.service ganeti-mond.service |
7e1fcc70 JR |
204 | |
205 | %postun | |
206 | %systemd_reload | |
7e1fcc70 JR |
207 | |
208 | %files | |
209 | %defattr(644,root,root,755) | |
7adb0d04 | 210 | %doc NEWS README UPGRADE |
bc935a7a | 211 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-confd |
2b0c5c25 | 212 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-luxid |
bc935a7a | 213 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-masterd |
2b0c5c25 | 214 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-mond |
bc935a7a JR |
215 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-noded |
216 | %attr(754,root,root) /etc/rc.d/init.d/ganeti-rapi | |
217 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ganeti | |
218 | %dir %{_sysconfdir}/ganeti | |
219 | %{systemdunitdir}/ganeti.target | |
220 | %{systemdunitdir}/ganeti-confd.service | |
2b0c5c25 | 221 | %{systemdunitdir}/ganeti-luxid.service |
bc935a7a | 222 | %{systemdunitdir}/ganeti-masterd.service |
2b0c5c25 | 223 | %{systemdunitdir}/ganeti-mond.service |
bc935a7a JR |
224 | %{systemdunitdir}/ganeti-noded.service |
225 | %{systemdunitdir}/ganeti-rapi.service | |
7adb0d04 | 226 | %{systemdtmpfilesdir}/ganeti.conf |
bc935a7a | 227 | /etc/cron.d/ganeti |
3926baa3 JR |
228 | %dir %{_datadir}/ganeti |
229 | %dir %{_datadir}/ganeti/os | |
7adb0d04 | 230 | %dir %{_libdir}/ganeti |
666a3f96 JR |
231 | %attr(755,root,root) %{_libdir}/ganeti/check-cert-expired |
232 | %attr(755,root,root) %{_libdir}/ganeti/daemon-util | |
233 | %attr(755,root,root) %{_libdir}/ganeti/ensure-dirs | |
234 | %attr(755,root,root) %{_libdir}/ganeti/import-export | |
235 | %attr(755,root,root) %{_libdir}/ganeti/kvm-ifup | |
236 | %attr(755,root,root) %{_libdir}/ganeti/mon-collector | |
237 | %attr(755,root,root) %{_libdir}/ganeti/node-daemon-setup | |
238 | %attr(755,root,root) %{_libdir}/ganeti/prepare-node-join | |
43241b14 | 239 | %dir %{_libdir}/ganeti/iallocators |
7adb0d04 | 240 | %dir %{_libdir}/ganeti/tools |
666a3f96 JR |
241 | %attr(755,root,root) %{_libdir}/ganeti/tools/burnin |
242 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgshell | |
243 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade | |
244 | %attr(755,root,root) %{_libdir}/ganeti/tools/cfgupgrade12 | |
245 | %attr(755,root,root) %{_libdir}/ganeti/tools/cluster-merge | |
246 | %attr(755,root,root) %{_libdir}/ganeti/tools/confd-client | |
247 | %attr(755,root,root) %{_libdir}/ganeti/tools/fmtjson | |
248 | %attr(755,root,root) %{_libdir}/ganeti/tools/kvm-console-wrapper | |
249 | %attr(755,root,root) %{_libdir}/ganeti/tools/lvmstrap | |
250 | %attr(755,root,root) %{_libdir}/ganeti/tools/master-ip-setup | |
251 | %attr(755,root,root) %{_libdir}/ganeti/tools/move-instance | |
252 | %attr(755,root,root) %{_libdir}/ganeti/tools/node-cleanup | |
253 | %attr(755,root,root) %{_libdir}/ganeti/tools/ovfconverter | |
254 | %attr(755,root,root) %{_libdir}/ganeti/tools/sanitize-config | |
255 | %attr(755,root,root) %{_libdir}/ganeti/tools/users-setup | |
256 | %attr(755,root,root) %{_libdir}/ganeti/tools/vcluster-setup | |
257 | %attr(755,root,root) %{_libdir}/ganeti/tools/xen-console-wrapper | |
7adb0d04 JR |
258 | %attr(755,root,root) %{_sbindir}/ganeti-cleaner |
259 | %attr(755,root,root) %{_sbindir}/ganeti-confd | |
260 | %attr(755,root,root) %{_sbindir}/ganeti-listrunner | |
2b0c5c25 | 261 | %attr(755,root,root) %{_sbindir}/ganeti-luxid |
7adb0d04 | 262 | %attr(755,root,root) %{_sbindir}/ganeti-masterd |
2b0c5c25 | 263 | %attr(755,root,root) %{_sbindir}/ganeti-mond |
7adb0d04 JR |
264 | %attr(755,root,root) %{_sbindir}/ganeti-noded |
265 | %attr(755,root,root) %{_sbindir}/ganeti-rapi | |
266 | %attr(755,root,root) %{_sbindir}/ganeti-watcher | |
267 | %attr(755,root,root) %{_sbindir}/gnt-backup | |
268 | %attr(755,root,root) %{_sbindir}/gnt-cluster | |
269 | %attr(755,root,root) %{_sbindir}/gnt-debug | |
270 | %attr(755,root,root) %{_sbindir}/gnt-group | |
271 | %attr(755,root,root) %{_sbindir}/gnt-instance | |
272 | %attr(755,root,root) %{_sbindir}/gnt-job | |
b327c64e | 273 | %attr(755,root,root) %{_sbindir}/gnt-network |
7adb0d04 JR |
274 | %attr(755,root,root) %{_sbindir}/gnt-node |
275 | %attr(755,root,root) %{_sbindir}/gnt-os | |
b327c64e | 276 | %attr(755,root,root) %{_sbindir}/gnt-storage |
2b0c5c25 | 277 | %{_mandir}/man7/ganeti.7* |
b327c64e | 278 | %{_mandir}/man7/ganeti-extstorage-interface.7* |
7adb0d04 | 279 | %{_mandir}/man7/ganeti-os-interface.7* |
b327c64e | 280 | %{_mandir}/man7/mon-collector.7* |
7adb0d04 JR |
281 | %{_mandir}/man8/ganeti-cleaner.8* |
282 | %{_mandir}/man8/ganeti-confd.8* | |
283 | %{_mandir}/man8/ganeti-listrunner.8* | |
2b0c5c25 | 284 | %{_mandir}/man8/ganeti-luxid.8* |
7adb0d04 | 285 | %{_mandir}/man8/ganeti-masterd.8* |
2b0c5c25 | 286 | %{_mandir}/man8/ganeti-mond.8* |
7adb0d04 JR |
287 | %{_mandir}/man8/ganeti-noded.8* |
288 | %{_mandir}/man8/ganeti-rapi.8* | |
289 | %{_mandir}/man8/ganeti-watcher.8* | |
290 | %{_mandir}/man8/gnt-backup.8* | |
291 | %{_mandir}/man8/gnt-cluster.8* | |
292 | %{_mandir}/man8/gnt-debug.8* | |
293 | %{_mandir}/man8/gnt-group.8* | |
294 | %{_mandir}/man8/gnt-instance.8* | |
295 | %{_mandir}/man8/gnt-job.8* | |
b327c64e | 296 | %{_mandir}/man8/gnt-network.8* |
7adb0d04 JR |
297 | %{_mandir}/man8/gnt-node.8* |
298 | %{_mandir}/man8/gnt-os.8* | |
b327c64e | 299 | %{_mandir}/man8/gnt-storage.8* |
7adb0d04 JR |
300 | %dir %{py_sitescriptdir}/ganeti |
301 | %{py_sitescriptdir}/ganeti/*.py* | |
302 | %dir %{py_sitescriptdir}/ganeti/client | |
303 | %{py_sitescriptdir}/ganeti/client/*.py* | |
2b0c5c25 JR |
304 | %dir %{py_sitescriptdir}/ganeti/cmdlib |
305 | %{py_sitescriptdir}/ganeti/cmdlib/*.py* | |
7adb0d04 JR |
306 | %dir %{py_sitescriptdir}/ganeti/confd |
307 | %{py_sitescriptdir}/ganeti/confd/*.py* | |
308 | %dir %{py_sitescriptdir}/ganeti/http | |
309 | %{py_sitescriptdir}/ganeti/http/*.py* | |
310 | %dir %{py_sitescriptdir}/ganeti/hypervisor | |
311 | %{py_sitescriptdir}/ganeti/hypervisor/*.py* | |
312 | %dir %{py_sitescriptdir}/ganeti/impexpd | |
313 | %{py_sitescriptdir}/ganeti/impexpd/*.py* | |
314 | %dir %{py_sitescriptdir}/ganeti/masterd | |
315 | %{py_sitescriptdir}/ganeti/masterd/*.py* | |
316 | %dir %{py_sitescriptdir}/ganeti/rapi | |
317 | %{py_sitescriptdir}/ganeti/rapi/*.py* | |
318 | %dir %{py_sitescriptdir}/ganeti/server | |
319 | %{py_sitescriptdir}/ganeti/server/*.py* | |
320 | %dir %{py_sitescriptdir}/ganeti/tools | |
321 | %{py_sitescriptdir}/ganeti/tools/*.py* | |
322 | %dir %{py_sitescriptdir}/ganeti/utils | |
323 | %{py_sitescriptdir}/ganeti/utils/*.py* | |
324 | %dir %{py_sitescriptdir}/ganeti/watcher | |
325 | %{py_sitescriptdir}/ganeti/watcher/*.py* | |
7e1fcc70 | 326 | |
554d0f8c | 327 | %files htools |
7e1fcc70 | 328 | %defattr(644,root,root,755) |
2b0c5c25 | 329 | %attr(755,root,root) %{_bindir}/harep |
a24e1f94 ER |
330 | %attr(755,root,root) %{_bindir}/hbal |
331 | %attr(755,root,root) %{_bindir}/hcheck | |
332 | %attr(755,root,root) %{_bindir}/hinfo | |
b327c64e | 333 | %attr(755,root,root) %{_bindir}/hroller |
a24e1f94 ER |
334 | %attr(755,root,root) %{_bindir}/hscan |
335 | %attr(755,root,root) %{_bindir}/hspace | |
336 | %attr(755,root,root) %{_bindir}/htools | |
666a3f96 | 337 | %attr(755,root,root) %{_libdir}/ganeti/iallocators/hail |
554d0f8c | 338 | %{_mandir}/man1/hail.1* |
2b0c5c25 | 339 | %{_mandir}/man1/harep.1* |
554d0f8c JR |
340 | %{_mandir}/man1/hbal.1* |
341 | %{_mandir}/man1/hcheck.1* | |
342 | %{_mandir}/man1/hinfo.1* | |
b327c64e | 343 | %{_mandir}/man1/hroller.1* |
554d0f8c JR |
344 | %{_mandir}/man1/hscan.1* |
345 | %{_mandir}/man1/hspace.1* | |
346 | %{_mandir}/man1/htools.1* | |
bc935a7a JR |
347 | |
348 | %files -n bash-completion-ganeti | |
349 | %defattr(644,root,root,755) | |
350 | /etc/bash_completion.d/ganeti |