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