diff options
author | 2013-01-30 20:11:19 +0000 | |
---|---|---|
committer | 2013-01-30 20:11:19 +0000 | |
commit | efee12d7f085a375eeef64d0069ed8b4ea642ad3 (patch) | |
tree | 7d0bff0a73af9f5e418d47b39174d6d6969cc8aa /app-emulation | |
parent | old (diff) | |
download | historical-efee12d7f085a375eeef64d0069ed8b4ea642ad3.tar.gz historical-efee12d7f085a375eeef64d0069ed8b4ea642ad3.tar.bz2 historical-efee12d7f085a375eeef64d0069ed8b4ea642ad3.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 | 7 | ||||
-rw-r--r-- | app-emulation/libvirt/Manifest | 4 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-1.0.2.ebuild | 419 |
3 files changed, 428 insertions, 2 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index 88dd079e9bf3..58f502c29f1f 100644 --- a/app-emulation/libvirt/ChangeLog +++ b/app-emulation/libvirt/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-emulation/libvirt # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.244 2013/01/27 00:31:57 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.245 2013/01/30 20:11:14 cardoe Exp $ + +*libvirt-1.0.2 (30 Jan 2013) + + 30 Jan 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.2.ebuild: + Version bump 24 Jan 2013; Doug Goldstein <cardoe@gentoo.org> libvirt-1.0.0.ebuild, libvirt-1.0.1.ebuild: diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 79e87e50d00c..8d2f74c2b83a 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -5,10 +5,12 @@ DIST libvirt-0.10.2.1.tar.gz 21300749 SHA256 449628d798b82cb2f24416ef2e38c2d06f1 DIST libvirt-0.10.2.2.tar.gz 21987939 SHA256 05714ba82d8d8cdcadc96fdd393f02ec4a7e975d181b3a06702b83c0444af084 SHA512 e4dbf8d43cfbd2fe9f3f21f114b40a8f78f60d96acbb09178067191bd6e6ca7942212bf30ba2d61315a5c1dbd8cb6bbfd0873fc7bb3f699ace84dcf6c21ded15 WHIRLPOOL a88eb048d65bd70eb24f3130e51eaa57a80bb48ea7b07f591df34051ebba9f2da32f32a3fb0ae07f97490c0f9185673014c5c307aa53a6634f86a24a3085bd32 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 +DIST libvirt-1.0.2.tar.gz 22971729 SHA256 9b8c2752f78658b65ef1c608b3775be0978d60855a9b5e2778f79c113201c179 SHA512 c35b6dc46594a93d4d633ad42df2cf1da7cbbf7327205ba4c608d4f95f0017cb4041518c3dafa3d5ab7dadaafad116779415c843e0d4e67ef1df31bd9a9295e7 WHIRLPOOL cf56954392f263fe686c79e320f238cc657424512bf3b136bd68747777640cd564affc38f7ed077a1e00f2d2511ab607b236a9b6ea4fbc8f089a2a0267b214ce EBUILD libvirt-0.10.2.1.ebuild 11493 SHA256 8b16eb20d78026ffa2feccea853650da67479ebcb2cd2da43f6e30d740b1c9d4 SHA512 fd3efc36c1358ac9413a319e20efe25a71be62714071e43951bae6bc8e2104d5c86e74a50edfbaabeba43d6c12638b5df198f565e56dbc5ec7c26783300ce2a6 WHIRLPOOL b1a859a1f105ed3e37e8fd59606db8244196b9f4341495aea91fe78d76f8c8cada4bc21fcbe5079639147f8c15fe00c8c02ca6ee60039174f8d6cb2caf434842 EBUILD libvirt-0.10.2.2.ebuild 11622 SHA256 82e89a1ad116af8ad4818e32108f36a739b52b97be5df6f996a26c73aa8b5ea0 SHA512 a2484b229926316ab9735efb8bd6835ed15e773f87c7a25ea387f83ed14812e66f4498faca6989801684f40a01e3f7a53382c953827ca0105ae815ea42b8c189 WHIRLPOOL 51c1ec1d51d3c950ef01b7af02b4808e0c87fe2413eeeef9dc9be189acd771b384a0c60fd0d2a72eeed7709af71a7d1565dd77ba66bef0d87b79e1fa98554779 EBUILD libvirt-1.0.0.ebuild 11574 SHA256 1277354f747515fda62740224ff1d8dd967640d0ad3a3231aa292f8c42dc6e29 SHA512 2c55fe9f0dc27765aed9989ff624d3dd3b31d5d015eb666b53b5c9f8f156c9bd4aa904a0f2a1bc22771aab01d46c2ea56d066adcb6d2add9f18486f0b1bb75bf WHIRLPOOL 73e0d6892b78766ae5e744af6b822fc64e37fe3f4737b495e766f08902c9b26d6f6b833be49397a8aa4f26d37e02de62af3f7365f88ecc39eb3b93d5a5cb2d3c EBUILD libvirt-1.0.1.ebuild 11798 SHA256 76427bfbe624c6491384d431a254a93fd63403856d1436a03899b9a7223c9c9b SHA512 6d01eaaec0f29c3f00218ca3062f815ccb186cbbd02e123106c7dc35fe88c0bf823a6392915c0309645f43fc384b158e93fd634eeabd1db1131a2bc23405c72e WHIRLPOOL 8d7285f4638a01d397060d076c70bcd273573f9daa6d606726004094dd6139f4bcecabb1c7ac73f5848cd8403ef3b9d1b272a16ea10b72167623602f7a01d32d +EBUILD libvirt-1.0.2.ebuild 11798 SHA256 1d75d56f5eecb69f921c8c6accf5b50043c19e5174bff821b6d7fe5446101f11 SHA512 dffa44dccd777bf4143db650d7998861950f0313d33c01222074180ffbd1283ed129fad75afa85f9427518343fab9db8c50b5cfcf9439c27290b056854579489 WHIRLPOOL a57461f769784f3a610a4f0a4bb55f4e3b760da5d9cad6d6d0419ef4ca9fd969327df9285e08d71221db685ab0cc1d257248dacb208fd80759afabe4fd7bf068 EBUILD libvirt-9999.ebuild 11519 SHA256 97c4435c5719e3e94658fe3c66366afc37f1bdaffe6221183635212a5061837f SHA512 a152f25c2aa41db942f0d51dd65ae4412b31ae077b3e7ca48dbe721d2792df8fc6dead7bd03fccf2c7e95821b9bb4e167877343b549a4a6949af97fdf9a9b099 WHIRLPOOL 4ecef7a049e9610e7ce891eaa31dbbe41bffaaa08686d9bca23fd5b8770c8690c338a4a78fb64536a295b9cf1f43d379bba2891e391b935519d4f4b269c69d04 -MISC ChangeLog 46929 SHA256 b6d92bd8f6729c0c0160700353d9cb5d7a425a6b5c772b596ccd71758e58f20f SHA512 858950e557193d6d85da86965f9815d2596f4b3dae0eed20a44e18583472e3a8c6b31f7c7422da200139b2824affdd38e6a24162c5170ba4fa24342c6ca4e9d5 WHIRLPOOL a4eb1dac8a4fc7b31e88e84ff405dbb84fc7ac8261478f5e79887793eb49636e922d63df0167aa5eead01a1f59d63f9d34f2166411e39421311e24bbe68e51fc +MISC ChangeLog 47048 SHA256 c17db188dd5601d5a71e14afd55594d07365f66520c386a00cc97777ebf40b88 SHA512 4bf205de32cce52d99e7d578ee2ad947c439cff43484296b34e550e8af18e7af18585ede5d3672fc32135bd4750e32b38f18eda6887a20185e95b381c77f24e6 WHIRLPOOL 1cfab326b89fd77ad5d02e56b8e2b9a6cd47c29b6d993583cb11202f1013a722c61f23b3146b1619dd125f1bb3b42480d2d74539f5b96b744dfdc805bc81eead MISC metadata.xml 3433 SHA256 1f1ed0c0f3ff9c388bf84c6877e7f5a9f2913b3d9b4ce71e3f98c64dde4a6084 SHA512 59c1c7df543b79e0de45dd0d30f0c2440a27baf2bf89fb8f4505c8d98ed152bb074cdf136fdb4299247f80099af5a3a2c058c3aa5ce277014128cd7f759a5b4a WHIRLPOOL 76a3e08490084f62049793359c23305565facaea07433227f432cbfdbd7e4a3956ca31a958c5b7634196345e236a5cb9000ff89bc7a22eaa9c98921990119d05 diff --git a/app-emulation/libvirt/libvirt-1.0.2.ebuild b/app-emulation/libvirt/libvirt-1.0.2.ebuild new file mode 100644 index 000000000000..a605cdc64b40 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.2.ebuild @@ -0,0 +1,419 @@ +# 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.2.ebuild,v 1.1 2013/01/30 20:11:14 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 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="" + + ## 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)" + myconf+=" $(use_with xen xenapi)" + if use xen && has_version ">=app-emulation/xen-tools-4.2.0"; then + myconf+=" --with-libxl" + else + myconf+=" --without-libxl" + fi + 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 + + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml + fi + + # 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 +} |