summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-10-23 16:55:52 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-10-23 16:55:52 +0000
commit8254c5312bfd339d04b31138d80cd1d8852eccee (patch)
treeb7815c96bf52cb1c440f007603112a70edd43174 /app-emulation
parentTemporarily mask new pidgin-otr next to new libotr. (diff)
downloadhistorical-8254c5312bfd339d04b31138d80cd1d8852eccee.tar.gz
historical-8254c5312bfd339d04b31138d80cd1d8852eccee.tar.bz2
historical-8254c5312bfd339d04b31138d80cd1d8852eccee.zip
Revert out CPU pinning patch as it caused more problems then it fixed for some.
Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog8
-rw-r--r--app-emulation/libvirt/Manifest4
-rw-r--r--app-emulation/libvirt/libvirt-0.10.2-r3.ebuild389
3 files changed, 399 insertions, 2 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index 945653ed5816..b44d07d065d4 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,12 @@
# 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.222 2012/10/22 19:03:27 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.223 2012/10/23 16:55:52 cardoe Exp $
+
+*libvirt-0.10.2-r3 (23 Oct 2012)
+
+ 23 Oct 2012; Doug Goldstein <cardoe@gentoo.org> +libvirt-0.10.2-r3.ebuild:
+ Revert out CPU pinning patch as it caused more problems then it fixed for
+ some.
22 Oct 2012; Doug Goldstein <cardoe@gentoo.org> -libvirt-0.10.2.ebuild,
-libvirt-0.10.2-r1.ebuild:
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index f657684f1f6e..357eab5170e2 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -2,11 +2,13 @@ AUX libvirtd.confd-r3 1757 SHA256 60f341dcf33ca8d55b6394ba6cf8e22f5133393e47f827
AUX libvirtd.init-r8 3630 SHA256 2156b91662bfc9a6c668130c5f562ff79101f0ba579a86b7048d1851e8ef7968 SHA512 1f4e500bed8fad3c5fa0999f8710e1d788910d44548c0a494ffb27047e1d0b328017bd895fa5474c27364a8dcf98181159f962568d896a5bb296da93f4240dc5 WHIRLPOOL 2580754a2edd461c38aeacbc5e60c34df3d84611fe5c04b08fbfe6d9cfd4956697c4edc2df3ce86016716ab74ce574ec24498a55ff3e851d637893e2d512e17b
AUX libvirtd.init-r9 3605 SHA256 53383c6da34a9e5348c02df09d6671ce37a1661dc446ac6c5875a77824e7bbb3 SHA512 357e4a1d2e13adea3e7aaea46560d4fa460790024d8ff324107a8574b088451eb24ab29284bca91d75a3a51dd4205d04fdf35be27cde50129bff6d5a4414c206 WHIRLPOOL 78e14db80fd08f632ec3a5594827e7fe7e3fe56b1078c66f87cf2bbac0baa102a376f9540f329e787ad9b94344dcffe5e2bf8c952925dd28ef12cfd7fdef39e2
DIST libvirt-0.10.2-7feb3393.tar.xz 10180 SHA256 12eae00f6d4f67ddc1b58b5e37385389d0331c105a3c7b1696d1284fb05fa0c5 SHA512 35a26b953d8c0d9d352812006c4d93ccacfc667b7ed62894f7429e744c74acd78691dd459806900d16115e165a5428edd42820e7db46bf0dfac6162d8073d52b WHIRLPOOL f7735207e9618d98320d7fcdfaeff443972ab7ff184279f79e2a6c6cc47385632adf7e6dbf73c3759719b418cb6db1ed902bf95e3d39b967a370c3129eebdddd
+DIST libvirt-0.10.2-85e8c146.tar.xz 9096 SHA256 df88922446f4667051348c6919bbbb79697661e95d3fc952c273272356fef5ed SHA512 f4f4344289b590dc32a1d8cbc0173d05a3e64aa675ab3721b32381147db74fb77dab23100dbc19d433b043379992a278eb922e14fef33d4c899133ccb8bf111b WHIRLPOOL d763e2d97be476d1e5133105972dcaefcad763705043d504d1608ce1df1967940b26668410685ae9bb7fd1df06ef0dda884235642ee984c85ce00a91bba1e8ba
DIST libvirt-0.10.2.tar.gz 21916817 SHA256 1fe69ae1268a097cc0cf83563883b51780d528c6493efe3e7d94c4160cc46977 SHA512 b0e784ebedf1c6694792ae9d7672101669441e08ad0352be3d57eaae03d6cd99527c2826ea41e3edcf069eab6f2168200b198bca9504d8d63375d20ecbead120 WHIRLPOOL 4a1651be688aabc3b175da762cc88dfe8b61268bf42bb731d7e74ab8b51cf2c1793c77eff6b5d7696b2a4d5bb1103f40d5fbe544d8784dc80e6899c28e2d3f50
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
EBUILD libvirt-0.10.2-r2.ebuild 10823 SHA256 9f77264981011ed2304e8ba6721b7be8a617790732b49eb82e87335721d00397 SHA512 96c37af10b026f880497b7a369155a5fbe96f837017cc69a75d87475bd1271190228783b96060720a62984fddc49a98baf4e0890f3bb202bc5623f37094f3ef2 WHIRLPOOL b0f23676652e6613e09c9d6511700816838dd5b8eee6a236a9b90d65d4c652d8038cc2adf992f00ffb45bc59b756ea485ec67bd27860c751b9862fce5bd70770
+EBUILD libvirt-0.10.2-r3.ebuild 10823 SHA256 54098b7868d951d1c448ff936eb8ece10cdeb2af0ab2032636a2f077a2849ce0 SHA512 7da3ab8cb42de20cf9bcfd72f34d0d8ee64a6bb3ca1208b8f50af35f91b7b3ec99ff0aadc7818ff67be04d93c1f93556365858bc71b173dd51a769fab6b4ddf8 WHIRLPOOL 15f96f4904bdea5ebe15b15a88a850f13ff65e455036d2f81c2e84fdb6e18fbbf8dc21782c41550e7edd5a699f4a2958dc3ba599db2b756e2499b33a9f720bf7
EBUILD libvirt-0.9.13-r1.ebuild 10769 SHA256 c04a4fbd49ca663eb2762247629a3a84aa46cdfe0b49e9098522b8353572d334 SHA512 a818f43e63cb6aa409e9a8ecad6d1ad718151e758533bc2cd5292abbf5ac943dc980fbbee3b241401e2dc2fcf6379f79109bb156afd1f30f4df96ff6543e4c82 WHIRLPOOL 5e2c29bc51a9b5e48ce81eb5f2a3fa47e3d57ea3361ab7260dc5225b545647ab1b65c759fce3edb0a814de6df8f285500c6f0d8a1ceb33e0a0b262618803f763
EBUILD libvirt-9999.ebuild 10353 SHA256 ff2ddc2632f5b5238e877091ce98cd9ee265fee1bf34c8be73174eb651269fd4 SHA512 ab43bd2b15bf6773cd790dd65a736163031073fb924ed07eff8da818499af53b83996af4eb731c713380bcf6f1126191893fe47730e149808d98d2e6206c4657 WHIRLPOOL b0f320dec564d2d0d490bbc05f860864f894716cc2f3f49eb8dd86696fadb77f613322e17983a4968b3a9950af16652a6f68be75a0a08f55494a3fcb5a32a07d
-MISC ChangeLog 43469 SHA256 5698a86c735140afa00b56f825d7ab39dd9d50603f58fe2b8f4788a5900f4d09 SHA512 c939f513ab65e4c1e01b8b672ed2ce026f712164c56f16becfe2dc7a6138d42f7017174bf2f80d62126b540b50767d7f7b23b0281390702387c603d071cad494 WHIRLPOOL 296bc71c4fb17ba350f540361c9bf4c66ffdf449934577ad9d430f416841be34cd9153224a05d629073bfaae5d855ea126b7c868f55344c5b68530f86e67bee3
+MISC ChangeLog 43665 SHA256 92cb78679b31d52c66aeac8cc7fabe5f2a00ea98d4cc8f0869db0aa2f9d58766 SHA512 407842a7f323612b326f9a4c36b70fabdad9973092fd364e87498132f98bf9bd502d2cc143a402153a96eda09a491bafcb24eb9b711c97e2fadb5e9436ed8a81 WHIRLPOOL 8e0b23f7e34b18819916d75217314689f5ab56f1c1415e01375a918df1d01d740f413b4683f5caf4ec10ec672a3ff72104a4da1599b53c6e1541935cbae87155
MISC metadata.xml 3307 SHA256 677bb13ab5f99946bd4dce20bfe9c26739fd312fda5671f7080839ffc048f957 SHA512 b9dd812a97f3d698089fdd8314bab93586e9d954653f3fe90672e636c51de097bb7d211f25bbd706d71029b8f68d31cfe053b3ee2ddf035fb55ad2b3a5029089 WHIRLPOOL 707d7c1bff3c8f69fa3f3ad1dbc14c01ae313bbc16d1a27be8de314f351c1bcf8ab192eb131bb833e274dcce50f2f862f13ff784f151ab6dd8c38ea07363a0e2
diff --git a/app-emulation/libvirt/libvirt-0.10.2-r3.ebuild b/app-emulation/libvirt/libvirt-0.10.2-r3.ebuild
new file mode 100644
index 000000000000..326857aea3b5
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-0.10.2-r3.ebuild
@@ -0,0 +1,389 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.10.2-r3.ebuild,v 1.1 2012/10/23 16:55:52 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 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 )"
+
+# 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? ( >=sys-fs/udev-145 >=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] )
+ 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_MEM_RES_CTLR
+ ~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
+
+ CONFIG_CHECK=""
+ use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}"
+ kernel_is lt 3 5 && use lxc && CONFIG_CHECK+=" ~USER_NS"
+ 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
+}
+
+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)"
+
+ ## 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
+ 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 "${FILESDIR}/libvirtd.init-r9" libvirtd || die
+ newconfd "${FILESDIR}/libvirtd.confd-r3" 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
+}