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