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