diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-01-06 18:54:28 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-01-06 18:54:28 +0000 |
commit | 91af6fb3bcc250df5ef0c9a5a45978cbeb4c8bef (patch) | |
tree | 3f6d42f80ca50bcad14eeefb63770b265a175eb9 /app-emulation | |
parent | Update license re #449344 (diff) | |
download | historical-91af6fb3bcc250df5ef0c9a5a45978cbeb4c8bef.tar.gz historical-91af6fb3bcc250df5ef0c9a5a45978cbeb4c8bef.tar.bz2 historical-91af6fb3bcc250df5ef0c9a5a45978cbeb4c8bef.zip |
Version bump.
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/libvirt/ChangeLog | 9 | ||||
-rw-r--r-- | app-emulation/libvirt/Manifest | 14 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-1.0.1.ebuild | 414 |
3 files changed, 424 insertions, 13 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index 25be17184612..543d3dd1c267 100644 --- a/app-emulation/libvirt/ChangeLog +++ b/app-emulation/libvirt/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-emulation/libvirt -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.237 2012/12/06 04:04:54 phajdan.jr Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.238 2013/01/06 18:54:23 cardoe Exp $ + +*libvirt-1.0.1 (06 Jan 2013) + + 06 Jan 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.1.ebuild: + Version bump. 06 Dec 2012; Pawel Hajdan jr <phajdan.jr@gentoo.org> libvirt-0.10.2-r3.ebuild: diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index bb34809bba26..9251875c37f5 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX libvirtd.confd-r3 1757 SHA256 60f341dcf33ca8d55b6394ba6cf8e22f5133393e47f827b88cef1243c255f15c SHA512 f65484ab52a5c4d0f7f1e6e7be9c379617d773b18e81ac875d628a0d9a2b5ae68d256dc1e29ca756d5216d52728bdc80da1afdd89977e6670da3a6dbd3aecc78 WHIRLPOOL 34e98b2cd72466a1152e41ea7b34533337e4aec3cf347cd75e766143b576462110bdb2ee691268ceaea0cfe6aba2a5b6bcdedc662ae6a66cc14e0099523c8e20 AUX libvirtd.confd-r4 2015 SHA256 c2ca5d9a2d4ed433e91bd215c2ca678109cc981072897a497955e36760dc3b9f SHA512 b3e1d2433be7838a35386747422a8f98f2a7f6a92a03089f9472eb8ee2efb7d10d2becd363fea7cdaf8771da31b58cd60d192b25e089b6257ad5341b1074e540 WHIRLPOOL 284e72e704b759433d5ddc1a3e4019164dda6b48cb2734ea9a6780747938bba2855a99dcf1b125ab3f500a6145315cafa4a3531ff6938c0c62e5b1a6f99ea9b3 AUX libvirtd.init-r10 3636 SHA256 8912375fc1d5e031b207074e4675f4d54a8684ba261b89cfff5491f430982641 SHA512 0a23c30e5766d32fd9d3f51053ad4a3c981b7b62281ddb2a9afc59f78ade0a1521504ad01f4cc233a66afcbd94c91b7ca341b9747e4a7bc13d61e0be235efa84 WHIRLPOOL de6cfb3637e0114978bb3492d03f2b3cd487723863cfbe086d4c3c2c2bd875f8e242338c31e610094f74867db84439c07dfad508184c798839fd0d0989a56fc1 @@ -13,17 +10,12 @@ DIST libvirt-0.10.2.tar.gz 21916817 SHA256 1fe69ae1268a097cc0cf83563883b51780d52 DIST libvirt-0.9.13-bp-1.tar.xz 6160 SHA256 dfb91f17d999f1aaf17e9cb59b64227631851ccfabaa24f0ba217dd5f4ae8f51 SHA512 9d7b7d9106fa217d1d6a218196b4692c6f560ffa2824de2b0e04ca35e8eb9ee6abeb02fece3720aa649128596c0990613d7914ab7dadfc7c8e830208882a2e1b WHIRLPOOL 54d96823526d569f081805569fa94947a0843c45cbefa83492e0da19741474fe6d07e212c5dadf93fa2d9123e05c21ab30cec9d8fff3f1ccff6dba8b41f23c8d DIST libvirt-0.9.13.tar.gz 20276757 SHA256 d124e9915c88c195da9c008a6d855e53e555dca5816052e163dda61388359d5b SHA512 d275cf6dd6c5700eeee701ff4d28a1483137f8c7525496069438b9e81727761066f1d4b1504bf170f6a3f457ecc203f6b5e7b367fe931803cb7592cccceb7f71 WHIRLPOOL 26a5c660c07516c3736f7bd818b6b4b06c98d78181ba991139818f321ace43a33dcc7d095ce6f02b94f7b3aea7c556bb5388cea34ef801576e4d86f9c08712f7 DIST libvirt-1.0.0.tar.gz 21868950 SHA256 14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076 SHA512 b4c3c34b2813f08653b33de5e1ebf030f2eafe77cb6107724494b83643a4e744b3f2c290a1755bcc586c8c7ebe0d8955540d3455736685484e27b07f677dca2c WHIRLPOOL 398af483a630294d7306f2cef95712613a0391da19bd654f5b24aff54d99df8940f79e560a61b3e978f3a62b89778a1b3e6a171188b9a8c42e31e2029a93f3d0 +DIST libvirt-1.0.1.tar.gz 22512698 SHA256 4a16c76c46ebc41a6514082b5d95b5d5a0868e7a8cc00ab2e6cc1a23ec6b5a3b SHA512 7a106998565410197b1cca45c68c84661935c96d1cd28888b977691faf29b10af6742f00f0e8baa76b27af4031e6b8b988c2ae83f3cbb5affe3381401fb6859e WHIRLPOOL 3b98c742141a63b3e6384e6fe09b01cec485bfb59fbefe89f3e64450bf66e2441aea43b754f92253e2c3f33f5b5d56975473cc4aa7313d622e40cd3185608ae6 EBUILD libvirt-0.10.2-r3.ebuild 11041 SHA256 65487371d611f9c939d13293bbed1c021c901469571118f941de07afef3c10c1 SHA512 2795251786b8d44bfb10f78ba8a729008f339f1950f36ddcb23073e9efd219024493e97b23470a70bc41f9fd3b5bd4d306c4362ee707d16c1382cd96b67f4a44 WHIRLPOOL 64466b9070c2262f27e09eb8edfa50a933e21ba00ac63e36a3b1508baafdb5bf7abc4ab4f7a6c5d829738f29f2d695bc5d0c5495ff6f30d3265a3a4e8e677f48 EBUILD libvirt-0.10.2.1.ebuild 11497 SHA256 5f805e9b579b907b6115270e2d5cd48d06b9d80309509fd396aa67f12d3daaf8 SHA512 68f511ef814c18a64ba02ddfb41e4ab966aa52eaff9139195ba84ecfe6d3e87acb6feb5ad71e951872e8db831940cfe857c16b7c1f11f86d544b7fce715c432f WHIRLPOOL 821c6d0b0c6af8b7937b2e98b2d6a5eaaebf498838634da179070062a3ac920c8c58e44e6cc402e4bd348073115b14264c3b8f436a5b7e893acd20a3f89d3463 EBUILD libvirt-0.9.13-r1.ebuild 10767 SHA256 b94671a20bd134141a4d3f8571139acb9258ede02f0ddd5664665bd61c3511c1 SHA512 73368348c69922389e4906179a9e0916fd2caa366d2a52b590854d5baa93dbc5374ae605e9f2a3484f15bf7f97f5e7caf654a586b36476dca265370f5d76c937 WHIRLPOOL 204a4d32824a1ccd697f421e06eb52f16b7b0533b378fd5e711a94a71a57e07436f69b828c13c5a7ec2333aa10087b168bffd5b024cff9af2790bf80e4d6ff3e EBUILD libvirt-1.0.0.ebuild 11697 SHA256 6859fa65dd4bd7cd18d948facf2fc3b775bf7fb274eab1d41b7fac95b53d2bd4 SHA512 af35a0362fe5c4fe9365ee17c342f568faf9141f65e0c84ce37984e786d9bcfd776e5a620e8e28e1039df6758d881b31796a6267f5b8fdce6b5a32f42443ee6b WHIRLPOOL 8e9d2682e90c328d4690597ebd47e9c9baed51f3dc76742b867f1d21bcbc984ce4bed8c06352c5016bd4c60821042c34069833390684dc9b6d4ebe67282c92c2 +EBUILD libvirt-1.0.1.ebuild 11694 SHA256 ef52b621d0dbad25b1dae82cc6548d728bdf9db6d7e858b11bc97478375305bd SHA512 f06a569d34f861c458eb0d097866874bb8026268215534153572da26d63c799630298fc2345a09c37a890095b358cf4bcfdcfcfb7845184f5eba2e9f1ae0d5e7 WHIRLPOOL 7585c3fffe61d8b69862be78209bdc70e8081d3ebea2a948639439fa0a202051a88323c89ac917b5347ffbdf0f67cb2cd8d789767d502e0d268b197f794e8fb1 EBUILD libvirt-9999.ebuild 11519 SHA256 97c4435c5719e3e94658fe3c66366afc37f1bdaffe6221183635212a5061837f SHA512 a152f25c2aa41db942f0d51dd65ae4412b31ae077b3e7ca48dbe721d2792df8fc6dead7bd03fccf2c7e95821b9bb4e167877343b549a4a6949af97fdf9a9b099 WHIRLPOOL 4ecef7a049e9610e7ce891eaa31dbbe41bffaaa08686d9bca23fd5b8770c8690c338a4a78fb64536a295b9cf1f43d379bba2891e391b935519d4f4b269c69d04 -MISC ChangeLog 45769 SHA256 c98174e10ccf4901fc671b78c1d07499cc37f9a253487806ad77a1625196e969 SHA512 9883b7c7b7ac429e108847b4b349ddabdd10a2c713b2e86bd68dd0055cc0697b93333c8230113e608d7c416a026c616ea58740dd93fac3234db1d5d572516d67 WHIRLPOOL 5358c8bab25a94b9db142ad65011700fa0122297fba6c354419b78daaaa093d1732225efff7e7642abc6f09ec0f5ca1262fc37fe7fa07bf91b7b55143c22f1de +MISC ChangeLog 45885 SHA256 4fcb4fd3606fc24339b633df77fdff2e26d00d336e8d11d3c66d5869d8511ebc SHA512 c07985c24800023a9d330fdd4f8a7416b235841c89d70902677c0e8cbe43972166f19b15baab7cd96966e536b0d35557570fc8cbbde0ab91f7506aae94f6b95b WHIRLPOOL ec90439526bc4e1a147af7bad4a9df1f3279472d843a052671be9cef5f032d4e6c28de94fb2ea720cb5bd853fa7882c3bd5e25c7d9d46c1ae2ea30d60b60ac1b MISC metadata.xml 3433 SHA256 1f1ed0c0f3ff9c388bf84c6877e7f5a9f2913b3d9b4ce71e3f98c64dde4a6084 SHA512 59c1c7df543b79e0de45dd0d30f0c2440a27baf2bf89fb8f4505c8d98ed152bb074cdf136fdb4299247f80099af5a3a2c058c3aa5ce277014128cd7f759a5b4a WHIRLPOOL 76a3e08490084f62049793359c23305565facaea07433227f432cbfdbd7e4a3956ca31a958c5b7634196345e236a5cb9000ff89bc7a22eaa9c98921990119d05 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) - -iEYEAREIAAYFAlDAGWwACgkQuUQtlDBCeQL6kgCeJun4SFbpg/HgvZUkpC9M+4Op -/2QAnRGv+Ug0hiVWBCkR6t1mLS8dXiPz -=JwGw ------END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.0.1.ebuild b/app-emulation/libvirt/libvirt-1.0.1.ebuild new file mode 100644 index 000000000000..5e7d344e22f5 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.1.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-1.0.1.ebuild,v 1.1 2013/01/06 18:54:23 cardoe Exp $ + +EAPI=4 + +#BACKPORTS=85e8c146 +AUTOTOOLIZE=yes + +MY_P="${P/_rc/-rc}" + +PYTHON_DEPEND="python? 2:2.5" +#RESTRICT_PYTHON_ABIS="3.*" +#SUPPORT_PYTHON_ABIS="1" + +inherit eutils python user autotools linux-info + +if [[ ${PV} = *9999* ]]; then + inherit git-2 + EGIT_REPO_URI="git://libvirt.org/libvirt.git" + AUTOTOOLIZE=yes + SRC_URI="" + KEYWORDS="" +else + SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz + ftp://libvirt.org/libvirt/${MY_P}.tar.gz + ${BACKPORTS:+ + http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + KEYWORDS="~amd64 ~x86" +fi +S="${WORKDIR}/${P%_rc*}" + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="http://www.libvirt.org/" +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="audit avahi +caps debug firewalld iscsi +libvirtd lvm +lxc +macvtap nfs \ + nls numa openvz parted pcap phyp policykit python qemu rbd sasl \ + selinux +udev uml +vepa virtualbox virt-network xen elibc_glibc" +REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) + lxc? ( caps libvirtd ) + openvz? ( libvirtd ) + qemu? ( libvirtd ) + uml? ( libvirtd ) + vepa? ( macvtap ) + virtualbox? ( libvirtd ) + xen? ( libvirtd ) + virt-network? ( libvirtd ) + firewalld? ( virt-network )" + +# gettext.sh command is used by the libvirt command wrappers, and it's +# non-optional, so put it into RDEPEND. +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the +# package will use 3 by default. Since we don't have slot pinning in an API, +# we must go with the most recent +RDEPEND="sys-libs/readline + sys-libs/ncurses + >=net-misc/curl-7.18.0 + dev-libs/libgcrypt + >=dev-libs/libxml2-2.7.6 + dev-libs/libnl:3 + >=net-libs/gnutls-1.0.25 + net-libs/libssh2 + sys-apps/dmidecode + >=sys-apps/util-linux-2.17 + sys-devel/gettext + >=net-analyzer/netcat6-1.0-r2 + app-misc/scrub + audit? ( sys-process/audit ) + avahi? ( >=net-dns/avahi-0.6[dbus] ) + caps? ( sys-libs/libcap-ng ) + iscsi? ( sys-block/open-iscsi ) + lxc? ( sys-power/pm-utils ) + lvm? ( >=sys-fs/lvm2-2.02.48-r2 ) + nfs? ( net-fs/nfs-utils ) + numa? ( + >sys-process/numactl-2.0.2 + sys-process/numad + ) + openvz? ( sys-kernel/openvz-sources ) + parted? ( + >=sys-block/parted-1.8[device-mapper] + sys-fs/lvm2 + ) + pcap? ( >=net-libs/libpcap-1.0.0 ) + policykit? ( >=sys-auth/polkit-0.9 ) + qemu? ( + >=app-emulation/qemu-0.13.0 + dev-libs/yajl + sys-power/pm-utils + ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( >=sys-libs/libselinux-2.0.85 ) + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) + xen? ( app-emulation/xen-tools app-emulation/xen ) + udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 ) + virt-network? ( net-dns/dnsmasq + >=net-firewall/iptables-1.4.10 + net-misc/radvd + net-firewall/ebtables + sys-apps/iproute2[-minimal] + firewalld? ( net-firewall/firewalld ) + ) + elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )" +# one? ( dev-libs/xmlrpc-c ) +DEPEND="${RDEPEND} + virtual/pkgconfig + app-text/xhtml1 + dev-libs/libxslt + =dev-lang/python-2*" + +LXC_CONFIG_CHECK=" + ~CGROUPS + ~CGROUP_FREEZER + ~CGROUP_DEVICE + ~CPUSETS + ~CGROUP_CPUACCT + ~RESOURCE_COUNTERS + ~CGROUP_SCHED + ~BLK_CGROUP + ~NAMESPACES + ~UTS_NS + ~IPC_NS + ~PID_NS + ~NET_NS + ~DEVPTS_MULTIPLE_INSTANCES + ~VETH + ~MACVLAN + ~POSIX_MQUEUE + ~!GRKERNSEC_CHROOT_MOUNT + ~!GRKERNSEC_CHROOT_DOUBLE + ~!GRKERNSEC_CHROOT_PIVOT + ~!GRKERNSEC_CHROOT_CHMOD + ~!GRKERNSEC_CHROOT_CAPS +" + +VIRTNET_CONFIG_CHECK=" + ~BRIDGE_NF_EBTABLES + ~NETFILTER_ADVANCED + ~NETFILTER_XT_TARGET_CHECKSUM +" + +MACVTAP_CONFIG_CHECK="~MACVTAP" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + + enewgroup qemu 77 + enewuser qemu 77 -1 -1 qemu kvm + + # Some people used the masked ebuild which was not adding the qemu + # user to the kvm group originally. This results in VMs failing to + # start for some users. bug #430808 + egetent group kvm | grep -q qemu + if [[ $? -ne 0 ]]; then + gpasswd -a qemu kvm + fi + + # Handle specific kernel versions for different features + kernel_is lt 3 5 && LXC_CONFIG_CHECK+=" ~USER_NS" + kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" || \ + LXC_CONFIG_CHECK+=" ~MEMCG" + + CONFIG_CHECK="" + use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}" + use macvtap && CONFIG_CHECK+="${MACVTAP}" + use virt-network && CONFIG_CHECK+="${VIRTNET_CONFIG_CHECK}" + if [[ -n ${CONFIG_CHECK} ]]; then + linux-info_pkg_setup + fi +} + +src_prepare() { + touch "${S}/.mailmap" + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ + epatch + + if [[ ${PV} = *9999* ]]; then + + # git checkouts require bootstrapping to create the configure script. + # Additionally the submodules must be cloned to the right locations + # bug #377279 + ./bootstrap || die "bootstrap failed" + ( + git submodule status | sed 's/^[ +-]//;s/ .*//' + git hash-object bootstrap.conf + ) >.git-module-status + fi + + epatch_user + + [[ -n ${AUTOTOOLIZE} ]] && eautoreconf + + # Tweak the init script + local avahi_init= + local iscsi_init= + local rbd_init= + local firewalld_init= + cp "${FILESDIR}/libvirtd.init-r11" "${S}/libvirtd.init" + use avahi && avahi_init='avahi-daemon' + use iscsi && iscsi_init='iscsid' + use rbd && rbd_init='ceph' + use firewalld && firewalld_init='need firewalld' + + sed -e "s/USE_FLAG_FIREWALLD/${firewalld_init}/" -i "${S}/libvirtd.init" + sed -e "s/USE_FLAG_AVAHI/${avahi_init}/" -i "${S}/libvirtd.init" + sed -e "s/USE_FLAG_ISCSI/${iscsi_init}/" -i "${S}/libvirtd.init" + sed -e "s/USE_FLAG_RBD/${rbd_init}/" -i "${S}/libvirtd.init" +} + +src_configure() { + local myconf="" + + myconf="${myconf} $(use_enable debug)" + + ## enable/disable daemon, otherwise client only utils + myconf="${myconf} $(use_with libvirtd)" + + ## enable/disable the daemon using avahi to find VMs + myconf="${myconf} $(use_with avahi)" + + ## hypervisors on the local host + myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)" + # leave it automagic as it depends on the version of xen used. + use xen || myconf+=" --without-libxl" + use xen || myconf+=" --without-xenapi" + myconf="${myconf} $(use_with openvz)" + myconf="${myconf} $(use_with lxc)" + if use virtualbox && has_version app-emulation/virtualbox-ose; then + myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/" + else + myconf="${myconf} $(use_with virtualbox vbox)" + fi + myconf="${myconf} $(use_with uml)" + myconf="${myconf} $(use_with qemu)" + myconf="${myconf} $(use_with qemu yajl)" # Use QMP over HMP + myconf="${myconf} $(use_with phyp)" + myconf="${myconf} --with-esx" + myconf="${myconf} --with-vmware" + + ## additional host drivers + myconf="${myconf} $(use_with virt-network network)" + myconf="${myconf} --with-storage-fs" + myconf="${myconf} $(use_with lvm storage-lvm)" + myconf="${myconf} $(use_with iscsi storage-iscsi)" + myconf="${myconf} $(use_with parted storage-disk)" + myconf="${myconf} $(use_with lvm storage-mpath)" + myconf="${myconf} $(use_with rbd storage-rbd)" + myconf="${myconf} $(use_with numa numactl)" + myconf="${myconf} $(use_with numa numad)" + myconf="${myconf} $(use_with selinux)" + + # udev for device support details + myconf="${myconf} $(use_with udev)" + + # linux capability support so we don't need privileged accounts + myconf="${myconf} $(use_with caps capng)" + + ## auth stuff + myconf="${myconf} $(use_with policykit polkit)" + myconf="${myconf} $(use_with sasl)" + + # network bits + myconf="${myconf} $(use_with macvtap)" + myconf="${myconf} $(use_with pcap libpcap)" + myconf="${myconf} $(use_with vepa virtualport)" + myconf="${myconf} $(use_with firewalld)" + + ## other + myconf="${myconf} $(use_enable nls)" + myconf="${myconf} $(use_with python)" + + # user privilege bits fir qemu/kvm + if use caps; then + myconf="${myconf} --with-qemu-user=qemu" + myconf="${myconf} --with-qemu-group=qemu" + else + myconf="${myconf} --with-qemu-user=root" + myconf="${myconf} --with-qemu-group=root" + fi + + # audit support + myconf="${myconf} $(use_with audit)" + + ## stuff we don't yet support + myconf="${myconf} --without-netcf" + + # we use udev over hal + myconf="${myconf} --without-hal" + + # locking support + myconf="${myconf} --without-sanlock" + + # this is a nasty trick to work around the problem in bug + # #275073. The reason why we don't solve this properly is that + # it'll require us to rebuild autotools (and we don't really want + # to do that right now). The proper solution has been sent + # upstream and should hopefully land in 0.7.7, in the mean time, + # mime the same functionality with this. + case ${CHOST} in + *cygwin* | *mingw* ) + ;; + *) + ac_cv_prog_WINDRES=no + ;; + esac + + econf \ + ${myconf} \ + --disable-static \ + --docdir=/usr/share/doc/${PF} \ + --with-remote \ + --localstatedir=/var + + if [[ ${PV} = *9999* ]]; then + # Restore gnulib's config.sub and config.guess + # bug #377279 + (cd .gnulib && git reset --hard > /dev/null) + fi +} + +src_test() { + # Explicitly allow parallel build of tests + export VIR_TEST_DEBUG=1 + HOME="${T}" emake check || die "tests failed" +} + +src_install() { + emake install \ + DESTDIR="${D}" \ + HTML_DIR=/usr/share/doc/${PF}/html \ + DOCS_DIR=/usr/share/doc/${PF}/python \ + EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \ + || die "emake install failed" + + find "${D}" -name '*.la' -delete || die + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + newinitd "${S}/libvirtd.init" libvirtd || die + newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die + + keepdir /var/lib/libvirt/images +} + +pkg_preinst() { + # we only ever want to generate this once + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml + fi + + # We really don't want to use or support old PolicyKit cause it + # screws with the new polkit integration + if has_version sys-auth/policykit; then + rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy + fi + + # Only sysctl files ending in .conf work + mv "${D}"/etc/sysctl.d/libvirtd "${D}"/etc/sysctl.d/libvirtd.conf +} + +pkg_postinst() { + use python && python_mod_optimize libvirt.py + + # support for dropped privileges + if use qemu; then + fperms 0750 "${EROOT}/var/lib/libvirt/qemu" + fperms 0750 "${EROOT}/var/cache/libvirt/qemu" + fi + + if use caps && use qemu; then + fowners -R qemu:qemu "${EROOT}/var/lib/libvirt/qemu" + fowners -R qemu:qemu "${EROOT}/var/cache/libvirt/qemu" + elif use qemu; then + fowners -R root:root "${EROOT}/var/lib/libvirt/qemu" + fowners -R root:root "${EROOT}/var/cache/libvirt/qemu" + fi + + if ! use policykit; then + elog "To allow normal users to connect to libvirtd you must change the" + elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf" + fi + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + elog + elog "For the basic networking support (bridged and routed networks)" + elog "you don't need any extra software. For more complex network modes" + elog "including but not limited to NATed network, you can enable the" + elog "'virt-network' USE flag." + elog + if has_version net-dns/dnsmasq; then + ewarn "If you have a DNS server setup on your machine, you will have" + ewarn "to configure /etc/dnsmasq.conf to enable the following settings: " + ewarn " bind-interfaces" + ewarn " interface or except-interface" + ewarn + ewarn "Otherwise you might have issues with your existing DNS server." + fi + + if use caps && use qemu; then + elog "libvirt will now start qemu/kvm VMs with non-root privileges." + elog "Ensure any resources your VMs use are accessible by qemu:qemu" + fi +} + +pkg_postrm() { + use python && python_mod_cleanup libvirt.py +} |