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