~ubuntu-branches/ubuntu/natty/libvirt/natty-security

« back to all changes in this revision

Viewing changes to libvirt.spec.in

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-02-23 09:05:46 UTC
  • mfrom: (1.2.8 upstream) (3.4.25 sid)
  • Revision ID: james.westby@ubuntu.com-20110223090546-4pwmrrt7h51hr3l3
Tags: 0.8.8-1ubuntu1
* Resynchronize and merge from Debian unstable. Remaining changes:
  - debian/patches:
    * 9000-delayed_iff_up_bridge.patch
    * 9001-dont_clobber_existing_bridges.patch
    * 9002-better_default_uri_virsh.patch
    * 9003-better-default-arch.patch
    * 9004-libvirtd-group-name.patch
    * 9005-increase-unix-socket-timeout.patch
    * 9006-default-config-test-case.patch
    * 9007-fix-daemon-conf-ftbfs.patch
    * 9011-move-ebtables-script.patch
    * 9014-skip-nodeinfotest.patch
    * 9020-lp545795.patch
    * 9021-fix-uint64_t.patch
  - debian/patches/series:
    * Disable qemu-disable-network.diff.patch
  - debian/control:
    * set ubuntu maintainer
    * Build-Depends:
      - swap libxen to libxen3, qemu to qemu-kvm, and open-iscsi to
        open-iscsi-utils in Build-Depends
      - remove virtualbox Build-Depends
      - add libxml2 and libapparmor-dev Build-Depends
    * convert Vcs-Git to Xs-Debian-Vcs-Git
    * libvirt-bin Depends: move netcat-openbsd, bridge-utils, dnsmasq-base
      (>= 2.46-1), and iptables from Recommends to Depends
    * libvirt-bin Recommends: move qemu to Suggests
    * libvirt-bin Suggests: add apparmor
    * libvirt0 Recommands: move lvm2 to Suggests
  - keep debian/libvirt-bin.apport
  - keep debian/libvirt-bin.cron.daily
  - debian/libvirt-bin.dirs:
    * add apparmor, cron.daily, and apport dirs
  - debian/libvirt-bin.examples:
    * add debian/libvirt-suspendonreboot
  - debian/libvirt-bin.install:
    * add /etc/apparmor.d files
    * add apport hook
  - debian/libvirt-bin.manpages:
    * add debian/libvirt-migrate-qemu-disks.1
  - debian/libvirt-bin.postinst:
    * replace libvirt groupname with libvirtd
    * add each admin user to libvirtd group
    * call apparmor_parser on usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
    * call 'libvirt-migrate-qemu-disks -a' after
      libvirt-bin has started if migrating from
      older than 0.8.3-1ubuntu1
  - debian/libvirt-bin.postrm:
    * replace libvirt groupname with libvirtd
    * remove usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
  - keep added files under debian/:
    * libvirt-bin.upstart
    * libvirt-migrate-qemu-disks
    * libvirt-migrate-qemu-disks.1
    * libvirt-suspendonreboot
    * apparmor profiles
  - debian/README.Debian:
    * add 'Apparmor Profile' section
    * add 'Disk migration' section
  - debian/rules:
    * don't build with vbox since virtualbox-ose is in universe
    * add --with-apparmor to DEB_CONFIGURE_EXTRA_FLAGS
    * set DEB_DH_INSTALLINIT_ARGS to '--upstart-only'
    * set DEB_MAKE_CHECK_TARGET to 'check'
    * remove unneeded binary-install/libvirt-bin:: and clean::
      sections (they only deal with sysvinit stuff)
    * add build/libvirt-bin:: section to install
      - apparmor files
      - apport hooks
      - libvirt-migrate-qemu-disks
* The following Ubuntu packaging changes occurred during the divergence
  between Debian and Ubuntu. These changes are not new, but included here
  for completeness: (0.8.5-0ubuntu1 - 0.8.5-0ubuntu5):
  - Have upstart job source /etc/default/libvirt-bin.  This is only a
    temporary fix until upstart provides proper default override support
    through /etc/init/libvirt-bin.override (or any other mechanism).
    (LP: 708172)
  - debian/apparmor/usr.sbin.libvirtd: use PUx instead of Ux for executables
    (LP: 573315)
  - Rebuild with python 2.7 as the python default.
  - debian/libvirt-bin.cron.daily: use shell globbing to enumerate xml files.
    Based on patch thanks to Henryk Plötz (LP: 655176)
* Dropped the following patches included/fixed upstream:
  - 9010-dont-disable-ipv6.patch
  - 9022-build-cleanup-declaration-of-xen-tests.patch
  - 9023-vah-require-uuid.patch
  - 9009-autodetect-nc-params.patch
    * rolled into Debian's
      Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
* Updated the following patches:
  - 9011-move-ebtables-script.patch:
    * LOCALSTATEDIR is defined in configmake.h
  - 9000-9006: added DEP-3 tags
  - 9002-better_default_uri_virsh.patch: updated (context changed)
* New patches:
  - 9022-drop-booton-when-kernel-specified.patch (LP: #720426)
  - 9023-fix-lxc-console-hangup.patch (LP: #668369)
  - 9024-skip-broken-commandtest.patch
* debian/patches/series:
  - don't apply Disable-CHECKSUM-rule.patch: our iptables can do this
  - don't apply Debian-specific Debianize-libvirt-guests.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
# Then the hypervisor drivers that run on local host
33
33
%define with_xen           0%{!?_without_xen:%{server_drivers}}
34
 
%define with_xen_proxy     0%{!?_without_xen_proxy:%{server_drivers}}
35
34
%define with_qemu          0%{!?_without_qemu:%{server_drivers}}
36
35
%define with_openvz        0%{!?_without_openvz:%{server_drivers}}
37
36
%define with_lxc           0%{!?_without_lxc:%{server_drivers}}
44
43
# Then the hypervisor drivers that talk a native remote protocol
45
44
%define with_phyp          0%{!?_without_phyp:1}
46
45
%define with_esx           0%{!?_without_esx:1}
 
46
%define with_vmware        0%{!?_without_vmware:1}
47
47
 
48
48
# Then the secondary host drivers
49
49
%define with_network       0%{!?_without_network:%{server_drivers}}
68
68
%define with_libnl         0%{!?_without_libnl:0}
69
69
%define with_audit         0%{!?_without_audit:0}
70
70
%define with_dtrace        0%{!?_without_dtrace:0}
 
71
%define with_cgconfig      0%{!?_without_cgconfig:0}
71
72
 
72
73
# Non-server/HV driver defaults which are always enabled
73
74
%define with_python        0%{!?_without_python:1}
86
87
%define with_numactl 0
87
88
%endif
88
89
 
89
 
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor, ESX,
90
 
# or libxenserver (xenapi)
 
90
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor,
 
91
# VMWare, or libxenserver (xenapi)
91
92
%if 0%{?rhel}
92
93
%define with_openvz 0
93
94
%define with_vbox 0
94
95
%define with_uml 0
95
96
%define with_one 0
96
97
%define with_phyp 0
97
 
%define with_esx 0
 
98
%define with_vmware 0
98
99
%define with_xenapi 0
99
100
%endif
100
101
 
115
116
%define with_xen 0
116
117
%endif
117
118
 
118
 
# If Xen isn't turned on, we shouldn't build the xen proxy either
119
 
%if ! %{with_xen}
120
 
%define with_xen_proxy 0
121
 
%endif
122
 
 
123
119
# Fedora doesn't have any QEMU on ppc64 - only ppc
124
120
%if 0%{?fedora}
125
121
%ifarch ppc64
127
123
%endif
128
124
%endif
129
125
 
130
 
# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer, allowing
131
 
# the setuid Xen proxy to be killed off
 
126
# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer
132
127
%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
133
128
%define with_polkit    0%{!?_without_polkit:1}
134
 
%define with_xen_proxy 0
135
129
%endif
136
130
 
137
131
# libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer
175
169
%define with_dtrace 1
176
170
%endif
177
171
 
 
172
# Pull in cgroups config system
 
173
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
 
174
%if %{with_qemu} || %{with_lxc}
 
175
%define with_cgconfig 0%{!?_without_cgconfig:1}
 
176
%endif
 
177
%endif
 
178
 
178
179
# Force QEMU to run as non-root
179
180
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
180
181
%define qemu_user  qemu
194
195
%endif
195
196
 
196
197
 
197
 
Summary: Library providing a simple API virtualization
 
198
# there's no use compiling the network driver without
 
199
# the libvirt daemon
 
200
%if ! %{with_libvirtd}
 
201
%define with_network 0
 
202
%endif
 
203
 
 
204
Summary: Library providing a simple virtualization API
198
205
Name: libvirt
199
206
Version: @VERSION@
200
207
Release: 1%{?dist}%{?extra_release}
277
284
# For multipath support
278
285
Requires: device-mapper
279
286
%endif
 
287
%if %{with_cgconfig}
 
288
Requires: libcgroup
 
289
%endif
280
290
%if %{with_xen}
281
291
BuildRequires: xen-devel
282
292
%endif
383
393
%if %{with_audit}
384
394
BuildRequires: audit-libs-devel
385
395
%endif
 
396
%if %{with_dtrace}
 
397
# we need /usr/sbin/dtrace
 
398
BuildRequires: systemtap-sdt-devel
 
399
%endif
 
400
 
386
401
 
387
402
# Fedora build root suckage
388
403
BuildRequires: gawk
481
496
%define _without_esx --without-esx
482
497
%endif
483
498
 
 
499
%if ! %{with_vmware}
 
500
%define _without_vmware --without-vmware
 
501
%endif
 
502
 
484
503
%if ! %{with_polkit}
485
504
%define _without_polkit --without-polkit
486
505
%endif
573
592
%define _without_dtrace --without-dtrace
574
593
%endif
575
594
 
 
595
%define when  %(date +"%%F-%%T")
 
596
%define where %(hostname)
 
597
%define who   %{?packager}%{!?packager:Unknown}
 
598
%define with_packager --with-packager="%{who}, %{when}, %{where}"
 
599
%define with_packager_version --with-packager-version="%{release}"
 
600
 
 
601
 
576
602
%configure %{?_without_xen} \
577
603
           %{?_without_qemu} \
578
604
           %{?_without_openvz} \
588
614
           %{?_without_one} \
589
615
           %{?_without_phyp} \
590
616
           %{?_without_esx} \
 
617
           %{?_without_vmware} \
591
618
           %{?_without_network} \
592
619
           %{?_with_rhel5_api} \
593
620
           %{?_without_storage_fs} \
606
633
           %{?_without_macvtap} \
607
634
           %{?_without_audit} \
608
635
           %{?_without_dtrace} \
 
636
           %{with_packager} \
 
637
           %{with_packager_version} \
609
638
           --with-qemu-user=%{qemu_user} \
610
639
           --with-qemu-group=%{qemu_group} \
611
640
           --with-init-script=redhat \
663
692
 
664
693
%if ! %{with_libvirtd}
665
694
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
 
695
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}/html \
 
696
   $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-devel-%{version}/
666
697
%endif
667
698
 
668
699
%if ! %{with_qemu}
721
752
fi
722
753
%endif
723
754
 
 
755
%if %{with_cgconfig}
 
756
if [ "$1" -eq "1" ]; then
 
757
/sbin/chkconfig cgconfig on
 
758
fi
 
759
%endif
 
760
 
724
761
/sbin/chkconfig --add libvirtd
725
762
if [ "$1" -ge "1" ]; then
726
763
        /sbin/service libvirtd condrestart > /dev/null 2>&1
747
784
/sbin/ldconfig
748
785
/sbin/chkconfig --add libvirt-guests
749
786
if [ $1 -ge 1 ]; then
750
 
    # this doesn't do anything but allowing for libvirt-guests to be
751
 
    # stopped on the first shutdown
752
 
    /sbin/service libvirt-guests start > /dev/null 2>&1 || true
 
787
    level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
 
788
    if /sbin/chkconfig --list libvirt-guests | /bin/grep -q $level:on ; then
 
789
        # this doesn't do anything but allowing for libvirt-guests to be
 
790
        # stopped on the first shutdown
 
791
        /sbin/service libvirt-guests start > /dev/null 2>&1 || true
 
792
    fi
753
793
fi
754
794
 
755
795
%postun client -p /sbin/ldconfig
801
841
 
802
842
%dir %{_localstatedir}/run/libvirt/
803
843
 
804
 
%dir %{_localstatedir}/lib/libvirt/
805
844
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
806
845
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
807
846
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
848
887
 
849
888
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
850
889
 
851
 
%if %{with_xen_proxy}
852
 
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
853
 
%endif
854
 
 
855
890
%if %{with_lxc}
856
891
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
857
892
%endif
895
930
 
896
931
%{_sysconfdir}/rc.d/init.d/libvirt-guests
897
932
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
898
 
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt
 
933
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
899
934
 
900
935
%if %{with_sasl}
901
936
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
938
973
%endif
939
974
 
940
975
%changelog
 
976
* Thu Feb 17 2011 Daniel Veillard <veillard@redhat.com> - 0.8.8-1
 
977
- expose new API for sysinfo extraction
 
978
- cgroup blkio weight support
 
979
- smartcard device support
 
980
- qemu: Support per-device boot ordering
 
981
- Various improvements and bug fixes
 
982
 
 
983
* Tue Jan  4 2011 Daniel Veillard <veillard@redhat.com> - 0.8.7-1
 
984
- Preliminary support for VirtualBox 4.0
 
985
- IPv6 support
 
986
- Add VMware Workstation and Player driver driver
 
987
- Add network disk support
 
988
- Various improvements and bug fixes
 
989
 
 
990
* Tue Nov 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.6-1
 
991
- Add support for iSCSI target auto-discovery
 
992
- QED: Basic support for QED images
 
993
- remote console support
 
994
- support for SPICE graphics
 
995
- sysinfo and VMBIOS support
 
996
- virsh qemu-monitor-command
 
997
- various improvements and bug fixes
 
998
 
941
999
* Fri Oct 29 2010 Daniel Veillard <veillard@redhat.com> - 0.8.5-1
942
1000
- Enable JSON and netdev features in QEMU >= 0.13
943
1001
- framework for auditing integration