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