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