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