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