]>
Commit | Line | Data |
---|---|---|
7ce5923d JB |
1 | # openwsman (>= 2.2.3), sanlock, xenapi (libxenserver), xenlight (libxenlight)? |
2 | # --with-driver-modules ? | |
94462445 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_with xen # xen | |
5296d739 | 6 | %bcond_without xen_proxy # Xen proxy |
94462445 | 7 | %bcond_without qemu # Qemu |
4e034fd2 | 8 | %bcond_without polkit # PolicyKit |
36a3330a | 9 | %bcond_with netcf # host interfaces support |
94462445 | 10 | |
148a9af3 JB |
11 | # qemu available only on x86 and ppc |
12 | %ifnarch %{ix86} %{x8664} ppc | |
13 | %undefine with_qemu | |
14 | %endif | |
15 | # Xen is available only on i686 x86_64 ia64 | |
94462445 ER |
16 | %ifnarch %{ix86} %{x8664} ia64 |
17 | %undefine with_xen | |
18 | %endif | |
19 | %ifarch i386 i486 i586 | |
20 | %undefine with_xen | |
21 | %endif | |
94462445 ER |
22 | %if %{without xen} |
23 | %undefine with_xen_proxy | |
24 | %endif | |
25 | ||
94462445 | 26 | Summary: Toolkit to interact with virtualization capabilities |
148a9af3 | 27 | Summary(pl.UTF-8): Narzędzia współpracujące z funkcjami wirtualizacji |
94462445 | 28 | Name: libvirt |
a73c464c AM |
29 | Version: 0.9.6 |
30 | Release: 1 | |
148a9af3 | 31 | License: LGPL v2.1+ |
94462445 | 32 | Group: Base/Kernel |
94462445 | 33 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz |
a73c464c | 34 | # Source0-md5: b74df374b524d00a22a6c89cfc23099f |
e285e5e5 | 35 | Source1: %{name}.init |
5296d739 JB |
36 | Patch0: %{name}-sasl.patch |
37 | URL: http://www.libvirt.org/ | |
7ce5923d | 38 | BuildRequires: audit-libs-devel |
fa080175 | 39 | BuildRequires: augeas-devel |
148a9af3 | 40 | BuildRequires: autoconf >= 2.50 |
69187f5d | 41 | BuildRequires: automake |
4e034fd2 | 42 | BuildRequires: avahi-devel >= 0.6.0 |
4e034fd2 | 43 | BuildRequires: curl-devel >= 7.18.0 |
69187f5d | 44 | BuildRequires: cyrus-sasl-devel |
4e034fd2 | 45 | BuildRequires: device-mapper-devel >= 1.0.0 |
7ce5923d | 46 | BuildRequires: gettext-devel >= 0.17 |
4e034fd2 | 47 | BuildRequires: gnutls-devel >= 1.0.25 |
69187f5d | 48 | BuildRequires: libapparmor-devel |
7ce5923d JB |
49 | BuildRequires: libblkid-devel >= 2.17 |
50 | BuildRequires: libcap-ng-devel >= 0.4.0 | |
51 | BuildRequires: libgcrypt-devel | |
52 | BuildRequires: libnl1-devel >= 1.1 | |
53 | BuildRequires: libpcap-devel >= 1.0.0 | |
54 | BuildRequires: libselinux-devel >= 2.0.82 | |
55 | BuildRequires: libssh2-devel >= 1.0 | |
69187f5d | 56 | BuildRequires: libstdc++-devel |
57 | BuildRequires: libtool | |
7ce5923d | 58 | BuildRequires: libxml2-devel >= 1:2.6.0 |
fa080175 | 59 | BuildRequires: libxslt-devel |
60 | BuildRequires: openldap-devel | |
94462445 | 61 | BuildRequires: ncurses-devel |
36a3330a | 62 | %{?with_netcf:BuildRequires: netcf-devel >= 0.1.4} |
69187f5d | 63 | BuildRequires: numactl-devel |
36a3330a | 64 | BuildRequires: parted-devel >= 1.8.0 |
69187f5d | 65 | BuildRequires: perl-tools-pod |
36a3330a | 66 | %{?with_polkit:BuildRequires: polkit >= 0.90} |
69187f5d | 67 | BuildRequires: pkgconfig |
36a3330a | 68 | BuildRequires: python |
94462445 ER |
69 | BuildRequires: python-devel |
70 | BuildRequires: readline-devel | |
69187f5d | 71 | BuildRequires: rpm-pythonprov |
5296d739 | 72 | BuildRequires: rpmbuild(macros) >= 1.219 |
69187f5d | 73 | BuildRequires: udev-devel >= 145 |
98574323 | 74 | %{?with_xen:BuildRequires: xen-devel >= 3.0.4} |
94462445 | 75 | # For disk driver |
7ce5923d | 76 | BuildRequires: xorg-lib-libpciaccess-devel >= 0.10.0 |
36a3330a | 77 | BuildRequires: yajl-devel |
7ce5923d JB |
78 | Requires: curl-libs >= 7.18.0 |
79 | Requires: device-mapper >= 1.0.0 | |
80 | Requires: gnutls >= 1.0.25 | |
81 | Requires: libcap-ng >= 0.4.0 | |
82 | Requires: libnl1 >= 1.1 | |
83 | Requires: libpcap >= 1.0.0 | |
84 | Requires: libselinux >= 2.0.82 | |
85 | Requires: libssh2 >= 1.0 | |
86 | Requires: libxml2 >= 1:2.6.0 | |
94462445 ER |
87 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
88 | ||
89 | # libxenstore is not versionned properly | |
90 | %define _noautoreq devel(libxenstore.*) | |
91 | ||
92 | %description | |
93 | Libvirt is a C toolkit to interact with the virtualization | |
94 | capabilities of recent versions of Linux. | |
95 | ||
96 | Virtualization of the Linux Operating System means the ability to run | |
97 | multiple instances of Operating Systems concurently on a single | |
98 | hardware system where the basic resources are driven by a Linux | |
99 | instance. The library aim at providing long term stable C API | |
100 | initially for the Xen paravirtualization but should be able to | |
101 | integrate other virtualization mechanisms if needed. | |
102 | ||
148a9af3 JB |
103 | %description -l pl.UTF-8 |
104 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
105 | wirtualizacji obecnych wersji Linuksa. | |
106 | ||
107 | Wirtualizacja w systemie operacyjnym Linux oznacza możliwość | |
108 | jednoczesnego uruchamiania wielu instancji systemu operacyjnego na | |
109 | pojedynczym systemie sprzętowym, którego podstawowe zasoby są | |
110 | zarządzane przez instancję Linuksa. Celem biblioteki jest zapewnienie | |
111 | długotrwale stabilnego API C, początkowo do parawirtualizacji Xen, ale | |
112 | dającej się zintegrować w razie potrzeby z innymi mechanizmami | |
113 | wirtualizacji. | |
114 | ||
94462445 | 115 | %package devel |
148a9af3 JB |
116 | Summary: Development files for programs using libvirt |
117 | Summary(pl.UTF-8): Pliki programistyczne do programów wykorzystujących libvirt | |
94462445 ER |
118 | Group: Development/Libraries |
119 | Requires: %{name} = %{version}-%{release} | |
7f159b90 JB |
120 | Requires: audit-libs-devel |
121 | Requires: curl-devel >= 7.18.0 | |
122 | Requires: device-mapper-devel >= 1.0.0 | |
123 | Requires: gnutls-devel >= 1.0.25 | |
124 | Requires: libapparmor-devel | |
125 | Requires: libcap-ng-devel >= 0.4.0 | |
126 | Requires: libgcrypt-devel | |
127 | Requires: libnl1-devel >= 1.1 | |
128 | Requires: libpcap-devel >= 1.0.0 | |
129 | Requires: libselinux-devel >= 2.0.82 | |
130 | Requires: libxml2-devel >= 1:2.6.0 | |
131 | Requires: numactl-devel | |
94462445 | 132 | %{?with_xen:Requires: xen-devel} |
7f159b90 | 133 | Requires: yajl-devel |
94462445 ER |
134 | |
135 | %description devel | |
136 | Libvirt is a C toolkit to interact with the virtualization | |
137 | capabilities of recent versions of Linux. | |
138 | ||
148a9af3 JB |
139 | This package contains the header files needed for developing programs |
140 | using the libvirt library. | |
141 | ||
142 | %description devel -l pl.UTF-8 | |
143 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
144 | wirtualizacji obecnych wersji Linuksa. | |
145 | ||
146 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
147 | wykorzystujących bibliotekę libvirt. | |
94462445 ER |
148 | |
149 | %package static | |
150 | Summary: Development static libraries for programs using libvirt | |
148a9af3 | 151 | Summary(pl.UTF-8): Statyczne biblioteki programistyczne do programów wykorzystujących libvirt |
94462445 | 152 | Group: Development/Libraries |
148a9af3 | 153 | Requires: %{name}-devel = %{version}-%{release} |
94462445 ER |
154 | |
155 | %description static | |
156 | Libvirt is a C toolkit to interact with the virtualization | |
157 | capabilities of recent versions of Linux. | |
158 | ||
148a9af3 JB |
159 | This package contains the static libraries for developing programs |
160 | using the libvirt library. | |
161 | ||
162 | %description static -l pl.UTF-8 | |
163 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
164 | wirtualizacji obecnych wersji Linuksa. | |
165 | ||
166 | Ten pakiet zawiera biblioteki statyczne do tworzenia programów | |
167 | wykorzystujących bibliotekę libvirt. | |
94462445 | 168 | |
5296d739 | 169 | %package -n python-%{name} |
94462445 | 170 | Summary: Python bindings to interact with virtualization capabilities |
148a9af3 | 171 | Summary(pl.UTF-8): Wiązania Pythona do współpracy z funkcjami wirtualizacji |
94462445 ER |
172 | Group: Development/Languages/Python |
173 | Requires: %{name} = %{version}-%{release} | |
174 | ||
175 | %description -n python-%{name} | |
176 | Libvirt is a C toolkit to interact with the virtualization | |
177 | capabilities of recent versions of Linux. | |
178 | ||
179 | This package contains the Python bindings for the libvirt library. | |
180 | ||
148a9af3 JB |
181 | %description -n python-%{name} -l pl.UTF-8 |
182 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
183 | wirtualizacji obecnych wersji Linuksa. | |
184 | ||
185 | Ten pakiet zawiera wiązania Pythona do biblioteki libvirt. | |
186 | ||
94462445 ER |
187 | %package utils |
188 | Summary: Tools to interact with virtualization capabilities | |
148a9af3 | 189 | Summary(pl.UTF-8): Narzędzia do współpracy z funkcjami wirtualizacyjnymi |
94462445 ER |
190 | Group: Base/Kernel |
191 | Requires: %{name} = %{version}-%{release} | |
7ce5923d JB |
192 | Requires: avahi-libs >= 0.6.0 |
193 | Requires: libblkid >= 2.17 | |
194 | Requires: parted-libs >= 1.8.0 | |
195 | Requires: udev-libs >= 145 | |
196 | Requires: xorg-lib-libpciaccess >= 0.10.0 | |
8a8149a9 | 197 | Suggests: iptables |
624d0ccc | 198 | Suggests: bridge-utils |
8a8149a9 | 199 | Suggests: dmidecode |
624d0ccc | 200 | Suggests: dnsmasq |
8a8149a9 JR |
201 | Suggests: ebtables |
202 | Suggests: gawk | |
203 | Suggests: iptables | |
624d0ccc | 204 | Suggests: lvm2 |
8a8149a9 JR |
205 | # for management through ssh |
206 | Suggests: netcat-openbsd | |
7ce5923d | 207 | Suggests: polkit >= 0.90 |
94462445 ER |
208 | |
209 | %description utils | |
210 | Libvirt is a C toolkit to interact with the virtualization | |
211 | capabilities of recent versions of Linux. | |
212 | ||
213 | This package contains tools for the libvirt library. | |
214 | ||
148a9af3 JB |
215 | %description utils -l pl.UTF-8 |
216 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
217 | wirtualizacji obecnych wersji Linuksa. | |
218 | ||
219 | Ten pakiet zawiera narzędzia do biblioteki libvirt. | |
220 | ||
94462445 ER |
221 | %prep |
222 | %setup -q | |
5296d739 JB |
223 | %patch0 -p1 |
224 | ||
2c74cc69 | 225 | # weird translations |
5296d739 | 226 | %{__rm} po/{my,eu_ES}.{po,gmo} |
94462445 | 227 | |
01260398 AF |
228 | mv po/vi_VN.po po/vi.po |
229 | mv po/vi_VN.gmo po/vi.gmo | |
230 | ||
94462445 | 231 | %build |
4e034fd2 AF |
232 | %{__libtoolize} |
233 | %{__aclocal} -I gnulib/m4 -I m4 | |
4e034fd2 | 234 | %{__autoconf} |
7ce5923d | 235 | %{__autoheader} |
4e034fd2 AF |
236 | %{__automake} |
237 | ||
238 | %configure \ | |
239 | --disable-silent-rules \ | |
e74f18c1 | 240 | --with-html-dir=%{_gtkdocdir} \ |
46ab7552 | 241 | --with-html-subdir=%{name} \ |
624d0ccc | 242 | --x-libraries=%{_libdir} \ |
94462445 ER |
243 | %{!?with_xen:--without-xen} \ |
244 | %{!?with_qemu:--without-qemu} \ | |
36a3330a | 245 | %{!?with_netcf:--without-netcf} \ |
94462445 | 246 | --with-init-script=redhat \ |
624d0ccc | 247 | --with-storage-lvm \ |
4e034fd2 AF |
248 | --without-hal \ |
249 | --with-udev \ | |
624d0ccc | 250 | PVCREATE=/sbin/pvcreate \ |
251 | VGCREATE=/sbin/vgcreate \ | |
252 | LVCREATE=/sbin/lvcreate \ | |
253 | PVREMOVE=/sbin/pvremove \ | |
254 | VGREMOVE=/sbin/vgremove \ | |
255 | LVREMOVE=/sbin/lvremove \ | |
256 | VGCHANGE=/sbin/vgchange \ | |
257 | VGSCAN=/sbin/vgscan \ | |
258 | PVS=/sbin/pvs \ | |
259 | VGS=/sbin/vgs \ | |
260 | LVS=/sbin/lvs \ | |
7ce5923d | 261 | TC=/sbin/tc \ |
624d0ccc | 262 | BRCTL=/sbin/brctl \ |
7ce5923d JB |
263 | MOUNT=/bin/mount \ |
264 | UMOUNT=/bin/umount \ | |
265 | MKFS=/sbin/mkfs \ | |
36a3330a | 266 | SHOWMOUNT=/usr/sbin/showmount \ |
267 | IPTABLES_PATH=/usr/sbin/iptables \ | |
268 | IP6TABLES_PATH=/usr/sbin/ip6tables \ | |
d9fa538f | 269 | EBTABLES_PATH=/usr/sbin/ebtables \ |
7ce5923d JB |
270 | ISCSIADM=/sbin/iscsiadm \ |
271 | DNSMASQ=/usr/sbin/dnsmasq \ | |
272 | RADVD=/usr/sbin/radvd \ | |
273 | UDEVADM=/sbin/udevadm \ | |
274 | MODPROBE=/sbin/modprobe | |
275 | ||
276 | %{__make} \ | |
277 | AWK=gawk | |
94462445 ER |
278 | |
279 | %install | |
280 | rm -rf $RPM_BUILD_ROOT | |
281 | %{__make} install \ | |
46ab7552 | 282 | DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \ |
94462445 ER |
283 | DESTDIR=$RPM_BUILD_ROOT |
284 | ||
e285e5e5 SP |
285 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
286 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
287 | ||
feec3441 | 288 | #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd |
e285e5e5 SP |
289 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd |
290 | ||
5296d739 JB |
291 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
292 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
293 | %py_postclean | |
7f159b90 | 294 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la |
5296d739 | 295 | |
94462445 ER |
296 | %find_lang %{name} |
297 | ||
298 | %clean | |
299 | rm -rf $RPM_BUILD_ROOT | |
300 | ||
5296d739 JB |
301 | %post -p /sbin/ldconfig |
302 | %postun -p /sbin/ldconfig | |
94462445 ER |
303 | |
304 | %files -f %{name}.lang | |
305 | %defattr(644,root,root,755) | |
306 | %doc ChangeLog README TODO NEWS | |
5296d739 JB |
307 | %attr(755,root,root) %{_libdir}/libvirt.so.*.*.* |
308 | %attr(755,root,root) %ghost %{_libdir}/libvirt.so.0 | |
309 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.* | |
310 | %attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0 | |
8c29141c | 311 | %attr(755,root,root) %{_libdir}/libvirt_lxc |
36a3330a | 312 | %attr(755,root,root) %{_libdir}/libvirt_iohelper |
e74f18c1 JR |
313 | %dir %{_datadir}/libvirt |
314 | %dir %{_datadir}/libvirt/schemas | |
a73c464c | 315 | %{_datadir}/libvirt/schemas/basictypes.rng |
feec3441 | 316 | %{_datadir}/libvirt/schemas/capability.rng |
317 | %{_datadir}/libvirt/schemas/domain.rng | |
a73c464c | 318 | %{_datadir}/libvirt/schemas/domaincommon.rng |
fa080175 | 319 | %{_datadir}/libvirt/schemas/domainsnapshot.rng |
feec3441 | 320 | %{_datadir}/libvirt/schemas/interface.rng |
321 | %{_datadir}/libvirt/schemas/network.rng | |
a73c464c | 322 | %{_datadir}/libvirt/schemas/networkcommon.rng |
feec3441 | 323 | %{_datadir}/libvirt/schemas/nodedev.rng |
4e034fd2 | 324 | %{_datadir}/libvirt/schemas/nwfilter.rng |
feec3441 | 325 | %{_datadir}/libvirt/schemas/secret.rng |
326 | %{_datadir}/libvirt/schemas/storageencryption.rng | |
327 | %{_datadir}/libvirt/schemas/storagepool.rng | |
328 | %{_datadir}/libvirt/schemas/storagevol.rng | |
3ac3cd0c | 329 | |
94462445 ER |
330 | %files devel |
331 | %defattr(644,root,root,755) | |
5296d739 JB |
332 | %attr(755,root,root) %{_libdir}/libvirt.so |
333 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so | |
334 | %{_libdir}/libvirt.la | |
335 | %{_libdir}/libvirt-qemu.la | |
336 | %{_gtkdocdir}/%{name} | |
337 | %{_includedir}/%{name} | |
94462445 ER |
338 | %{_pkgconfigdir}/%{name}.pc |
339 | ||
340 | %files static | |
341 | %defattr(644,root,root,755) | |
5296d739 JB |
342 | %{_libdir}/libvirt.a |
343 | %{_libdir}/libvirt-qemu.a | |
94462445 ER |
344 | |
345 | %files -n python-%{name} | |
346 | %defattr(644,root,root,755) | |
347 | %doc %{_docdir}/%{name}-python-%{version} | |
a73c464c AM |
348 | %attr(755,root,root) %{py_sitedir}/libvirtmod.so |
349 | %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so | |
5296d739 JB |
350 | %{py_sitedir}/libvirt.py[co] |
351 | %{py_sitedir}/libvirt_qemu.py[co] | |
94462445 ER |
352 | |
353 | %files utils | |
354 | %defattr(644,root,root,755) | |
355 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt | |
72b1baa0 | 356 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf |
94462445 ER |
357 | %attr(755,root,root) %{_bindir}/virsh |
358 | %attr(755,root,root) %{_sbindir}/libvirtd | |
e285e5e5 | 359 | %attr(754,root,root) /etc/rc.d/init.d/libvirtd |
fa080175 | 360 | %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests |
3ac3cd0c | 361 | %attr(755,root,root) %{_bindir}/virt-xml-validate |
feec3441 | 362 | %attr(755,root,root) %{_bindir}/virt-pki-validate |
e285e5e5 | 363 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd |
fa080175 | 364 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests |
36a3330a | 365 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd |
4e034fd2 AF |
366 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc |
367 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu | |
368 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml | |
94462445 | 369 | %{_libdir}/libvirt_parthelper |
fa080175 | 370 | %{_libdir}/virt-aa-helper |
5296d739 | 371 | %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy} |
94462445 | 372 | %{_mandir}/man1/virsh.1* |
3ac3cd0c | 373 | %{_mandir}/man1/virt-xml-validate.1* |
feec3441 | 374 | %{_mandir}/man1/virt-pki-validate.1* |
e4177f0c | 375 | %{_mandir}/man8/libvirtd.8* |
feec3441 | 376 | %{_datadir}/%{name}/*.xml |
fa080175 | 377 | %{_datadir}/augeas/lenses/*.aug |
378 | %{_datadir}/augeas/lenses/tests/*.aug | |
7131199b | 379 | %dir /var/run/libvirt |
d5a575f6 | 380 | %dir /var/lib/libvirt |