From: Matthias Maier Date: Sun, 15 Nov 2015 08:03:28 +0000 (-0600) Subject: app-emulation/libvirt: version bump to 1.2.21 (bug #564992), maintenance X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c0d2bfb0ec255ff23816d2d50040572a666d32da;p=gentoo.git app-emulation/libvirt: version bump to 1.2.21 (bug #564992), maintenance - version bump to 1.2.21 - remove obsolete dependency on support library for =x11-libs/libpciaccess-0.10.9 - ) - elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 .git-module-status + fi + + epatch \ + "${FILESDIR}"/${PN}-1.2.9-do_not_use_sysconf.patch \ + "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ + "${FILESDIR}"/${PN}-1.2.17-fix_paths_for_apparmor.patch + + [[ -n ${BACKPORTS} ]] && + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/patches" epatch + + epatch_user + + # Tweak the init script: + cp "${FILESDIR}/libvirtd.init-r15" "${S}/libvirtd.init" || die + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ + -e "s/USE_FLAG_AVAHI/$(usex avahi avahi-daemon '')/" \ + -e "s/USE_FLAG_ISCSI/$(usex iscsi iscsid '')/" \ + -e "s/USE_FLAG_RBD/$(usex rbd ceph '')/" \ + -i "${S}/libvirtd.init" || die "sed failed" + + AUTOTOOLS_AUTORECONF=true + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_with apparmor) + $(use_with apparmor apparmor-profiles) + $(use_with audit) + $(use_with avahi) + $(use_with caps capng) + $(use_with firewalld) + $(use_with fuse) + $(use_with glusterfs) + $(use_with glusterfs storage-gluster) + $(use_with iscsi storage-iscsi) + $(use_with libvirtd) + $(use_with lvm storage-lvm) + $(use_with lvm storage-mpath) + $(use_with lxc) + $(use_with macvtap) + $(use_enable nls) + $(use_with numa numactl) + $(use_with numa numad) + $(use_with openvz) + $(use_with parted storage-disk) + $(use_with pcap libpcap) + $(use_with phyp) + $(use_with policykit polkit) + $(use_with qemu) + $(use_with qemu yajl) + $(use_with rbd storage-rbd) + $(use_with sasl) + $(use_with selinux) + $(use_with systemd systemd-daemon) + $(usex systemd --with-init-script=systemd '') + $(use_with udev) + $(use_with uml) + $(use_with vepa virtualport) + $(use_with virt-network network) + $(use_with wireshark-plugins wireshark-dissector) + $(use_with xen) + $(use_with xen xen-inotify) + $(usex xen --with-libxl '') + + --without-hal + --without-netcf + --without-sanlock + --without-xenapi + --with-esx + --with-qemu-group=$(usex caps qemu root) + --with-qemu-user=$(usex caps qemu root) + --with-remote + --with-storage-fs + --with-vmware + + --disable-static + --disable-werror + + --docdir=/usr/share/doc/${PF} + --htmldir=/usr/share/doc/${PF}/html + --localstatedir=/var + ) + + if use virtualbox && has_version app-emulation/virtualbox-ose; then + myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) + else + myeconfargs+=( $(use_with virtualbox vbox) ) + fi + + autotools-utils_src_configure + + 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() { + autotools-utils_src_compile install \ + DESTDIR="${D}" \ + SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" + + find "${D}" -name '*.la' -delete || die + + # Remove bogus, empty directories. They are either not used, or + # libvirtd is able to create them on demand + rm -rf "${D}"/etc/sysconfig + rm -rf "${D}"/var/cache + rm -rf "${D}"/var/run + rm -rf "${D}"/var/log + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + use systemd && systemd_install_serviced \ + "${FILESDIR}"/libvirtd.service.conf libvirtd.service + + systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf + + newinitd "${S}/libvirtd.init" libvirtd || die + newinitd "${FILESDIR}/libvirt-guests.init-r1" libvirt-guests || die + newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die + + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die + + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +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 +} + +pkg_postinst() { + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml + fi + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.2.18-r2 ${REPLACING_VERSIONS} ]]; then + FORCE_PRINT_ELOG=true + fi + + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog +} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index cb757f002e64..724342a1bb13 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -34,7 +34,7 @@ LICENSE="LGPL-2.1" IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \ lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \ - xen elibc_glibc" + xen" REQUIRED_USE=" firewalld? ( virt-network ) @@ -114,8 +114,7 @@ RDEPEND=" udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 - ) - elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1