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