summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-19 02:07:16 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-19 02:07:16 +0000
commitf432b083b2efe1e2aa0a7497bf0ca78eeb483332 (patch)
tree868239b43b2429804608eeb9bb649c1ff350f417 /app-emulation/libvirt
parenta4c0eb2444b57e79bce0a088e5936ed71c415e8f (diff)
gentoo auto-resync : 19:01:2024 - 02:07:15
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/Manifest7
-rw-r--r--app-emulation/libvirt/libvirt-10.0.0.ebuild364
-rw-r--r--app-emulation/libvirt/libvirt-9999.ebuild8
-rw-r--r--app-emulation/libvirt/metadata.xml3
4 files changed, 377 insertions, 5 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 2ef1012eac05..5e053a709a6d 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -16,6 +16,8 @@ AUX libvirtd.init-r19 1124 BLAKE2B 0effd71cd3dfda0892c37e4d6d69f5d6d02320a3f0793
AUX libvirtd.tmpfiles.conf 36 BLAKE2B fa0e1dac4117dcb2a2e826c82c4c63e20156db47abf4088167484f1f3149a4998840cf1aba745621851d7e2653df5c7f7268d8d61be3a3731ea053a88f35c13b SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed
AUX virtlockd.init-r2 573 BLAKE2B 83bbd228bd59fa29f1d974bc5eec8af0b701328a0a64bbb9e2d9cb918d5d0b3c0d5e791afa18f47ffa2c429082083912fda3f2401c3c5b3d8d85ea8b7cacf440 SHA512 11bf7208e8da8cf7b907049100d095f4d6b5d215a0955fa620e50d6d541d3ecd9d779a7903c64feb25d17545c45491d52441e14a04f2c793f3b03dee7784c482
AUX virtlogd.init-r2 572 BLAKE2B e6a86e34eda78fc032df17e1bd94095e357770f4036e19fff895266b58df7e31774f6004fec56fad9e69bf7d1afa5d898bdebe018013877f8844d05b3a46d509 SHA512 d5d83edee8a4bdf0dac79abc129ff7ec11573aa580e32963d7c7d47133e276a4427d8653683fc8b0a6c1c2aba631e5875c73454d6fef3bcac6dcaca542e69f34
+DIST libvirt-10.0.0.tar.xz 9395076 BLAKE2B bfbea7805a949999481293a31e52a5511bcf86db2c96486cbc3b9cb776719ec973b1208cfcb4a8ae2c9220d1d68053980eaf68893f7919c3ef354efbd1abf642 SHA512 4ab28539ff0e9a78ac231b11b4ec88b91d76ff2607cabd0226f04aaece73b05cab4aa9cfcf05073cd257ea270a377cd5d2cb915971583dbec04dadf2cf7ad252
+DIST libvirt-10.0.0.tar.xz.asc 833 BLAKE2B e6377fe80a96025fe643d9bb14b3d64da3cf7f53000d8ee55606b4bc635d735943c4a7baa3796cbb7ce5812f03e2efd700aeef72e5bfcce68938b873aeca3f1f SHA512 08681d45c39695b07c88b27fddc471284ed66caa091a73ea3957e42ec92776d435ecb4dc71b6bb18a825322468fccb09263f612aa1bde53deea3d6c5305313d8
DIST libvirt-9.3.0.tar.xz 9246292 BLAKE2B 6e47a70ec247b37c1958e324d5bf7ebcbff6aca5a7a9860f437ebe6a969d569a449d3dd5720081ad27926f445bcbe10089cb3b1d27960decc6239306f82259f9 SHA512 b9349dcd7798c76d75bb20afad67d6e676758cb201acaf7aed5109f0e91422b2bcca964a2f19aa8dc4fd0eca2923902474e16e3839bf8b15aca827028e88ddb7
DIST libvirt-9.3.0.tar.xz.asc 833 BLAKE2B 25810919210bd489ecfd85f172c472d52e911e90d651fac2c7fa4f73220890bd2448317448f0469e8abfe8ad5ea6f3eb6b321e6d989e64f6ad4b676a5a38312c SHA512 0b51a621cef616ac55ac40c9bf9da56d3e1d59b5e87bcd04deaac7f775faab8f30861e53112be2242d9c8c6be41f1ed1c29d345d96e39be0ac33ef0b01494c45
DIST libvirt-9.4.0.tar.xz 9250724 BLAKE2B 837a6eef509a43a0cd25a2ecaac9de95f21e903b553d5e56b404a689495e66bb0053866c9aea672cbe69130286d5a2ff2eb38ff447c77100e92bcb56cd244ee3 SHA512 8a8e3983c47c5ed5f4b50d90cb04e435717afddd27e16112ceeddda458d45c693daf65575f5d50274cfffcd1c83cbdd290819d8ece63f3bf9441b6bdaa309852
@@ -28,11 +30,12 @@ DIST libvirt-9.8.0.tar.xz 9307064 BLAKE2B aae47e8d4eeaf97532a0356de23ed5a9eea71b
DIST libvirt-9.8.0.tar.xz.asc 833 BLAKE2B 3ecd0a925992eeadd50675f7ad8e815bde532c0f66e331ea766fff8e613b6a60b002bedee82fd03684e703057bc13d4e92191268dcd5efe2611ce9bd3cf6b505 SHA512 e041db13281eae9323c22189b7a258caf8d0e2a350cbd31b6cbed7054ccaf09d05c155c3c09daea07940affdf15e8d42bb2339945480cd141a6e8cb417a78536
DIST libvirt-9.9.0.tar.xz 9321556 BLAKE2B 21eae5a95feaf7f5c6ba8dd48732c08212904882a11c48eccfa827d85ddc3df7e064503f21710dbe1b678670e02f003674de915a43a7403fbf85685c4832e21d SHA512 77cea28acf4f3e8c92fbd5bd72ad084be183c07f14e3a9ce35d6d9d62d36ee97a30cef55fb204b3e43f282890ecd7d5827a784a517e7f4ed8b22ee502c3f09d7
DIST libvirt-9.9.0.tar.xz.asc 833 BLAKE2B 3de3674d33c595692e71eeb9c312de76e865d3859d2482ec5b4d29d3cd7644cde080cba0001668efe7876b462f78c0233ab76076ef32943e118b34cca8c1ab4d SHA512 357fc2d1bdbbc26c6e0119a1b5c42e86a116f94bb714da855ab27ca83da0e50c7239d1b8abde3cee8a460ac537f63d518f43470d8329b727b39491771ad191e5
+EBUILD libvirt-10.0.0.ebuild 9428 BLAKE2B 621d5615cc947e66d7bad513974545b066d78f33d6232e5780c2a8a4f936430b65a0705e8203e7aa63ab223f437ed35b588987ac2607a941c537f123254ba8ef SHA512 cde6d343b7e02af0e56cd23d38405cb048e2c4abb59120ee33d4186a9aadd6155976d935814fe30e773521cff230afafaa72fd7c42edb61abce3e9160c4e2ee1
EBUILD libvirt-9.3.0-r1.ebuild 9501 BLAKE2B a0d6d5dc48a4d4bf60be4f189a3164172f339fc00c16245b84707e6bc1a777d903cb162776b15d7b4e0b570febefbef3668735e96d5ff2ac68744dcede5f1702 SHA512 d22642a55ee478bbb57d028d9c1752a62d87439ef6a41bbb974daa8fbdf1676bcbad37cda5b0c2cd4c082f605038ce72de77a39381699de380591f02ee4094b1
EBUILD libvirt-9.4.0-r4.ebuild 9560 BLAKE2B d914bf1a94c5a58d9c5044e363c774fefabfe1ad8195e55791add18d82035b0557a08b05a7be30e41aba554404e0a96a8d8499b92d50fc38a403497246536646 SHA512 4c59ef35eb9a3c5af3d6331152b373d004cd2576d0b79270ddaf3d05fcf75ea71bdfb44af5c2fec4ef0a1ba433ff5cc0a5282d7e1c39f6878a00f421fdc025ce
EBUILD libvirt-9.5.0-r1.ebuild 9563 BLAKE2B a4aff44b0fedf2a267016e45ee806fd5f98e4dae2591fe50e327db2d78882abb0c22ce3b942b655b53a3a4114f2e9f8e8fabeb97960610c31e3219af3639166e SHA512 9af29edfc382bd1645b566e02d76c541f7f90e8c5429c3ea5f2ba9cc53339ffc6743f579d779bebe6c99ea294b941bb80367040ac251655bbbbbeae1eba9ce0c
EBUILD libvirt-9.6.0.ebuild 9477 BLAKE2B 10fccc99366176d09b562d07fd438142442176bf40975dbecf8d704ef66f9bb5dc9d10300afa5c579cf11bb7155cb22f656b0963d49170d30867e8e5c2e26102 SHA512 9ca62d26871f7a2e65abe05f9eae195274fe67a1464002988d2ef27d36d6ca3ec27e70324f567d45a246b44bd1349f89711c3c7e482996c2fdcf105f1ba5e0f5
EBUILD libvirt-9.8.0.ebuild 9475 BLAKE2B 5cf4278f430a1b9dbf55b22c582dae60abe6743451f92bc49cf81228fa4f09975264652fec7d1fbfbec104ea933b27a8772c6120711d473279d33617761f0db9 SHA512 238f4b08b316366f2ad583545c15aced290735a32caedb2e24b372ab6d158ac5eefa003eb31077526b341ecb22607057e1186f1cefe3c31b1088b3bf0b23bf4e
EBUILD libvirt-9.9.0.ebuild 9477 BLAKE2B e2605b5634ed96a0b049387653449b456286fe36bd1a2f8fa21e9c1322ea7ef64a39f37e691a7519204aa23666fdd0a09d51b4bc9fa2cd8ff43a426399fd9cc0 SHA512 612e68c7aed4b5cc571452d7eb69a9b44cb3c01bbf1e5a36b8747a304d9c0ca160a074335e5a9bae241e204161e541a4b13bab626e7e8e9cfea4a385f5ea6fe2
-EBUILD libvirt-9999.ebuild 9367 BLAKE2B 82832327ce23c09cb2daa5c0394026adab6180ca3d31a43ea520d786577f5f558e14e99a63db9525da8bdd873cc847b41a0855d900e1bfc6629b2222f316aa6f SHA512 d5e86c84fa5a1ab0f511bdc0a40c5c4609c37fd6d98a00338188c799a4cbe51565571b83d53033a522f85c3da6b871aa0a9af6b7aee796e8a3dc1218783b1298
-MISC metadata.xml 3729 BLAKE2B 2e68676afb3820c7b8cd3d76b0a5c42886e246fc6b440ce49c71cbe60c124cdccd4ed8fb97f7153529b758d56dfba98b6a98a31b2fbff7e738f52bce796a3476 SHA512 0dfe519af8b740de9d41b1e2c40133026718a782b654a261c54cbe22b5f694cda8b73036c59411317757b73c40acaea77f70d7ab86ae8325e78d61151e6c64f1
+EBUILD libvirt-9999.ebuild 9428 BLAKE2B 621d5615cc947e66d7bad513974545b066d78f33d6232e5780c2a8a4f936430b65a0705e8203e7aa63ab223f437ed35b588987ac2607a941c537f123254ba8ef SHA512 cde6d343b7e02af0e56cd23d38405cb048e2c4abb59120ee33d4186a9aadd6155976d935814fe30e773521cff230afafaa72fd7c42edb61abce3e9160c4e2ee1
+MISC metadata.xml 3826 BLAKE2B 38046828e9aa7bf143913120672c8d3894eb4d1b4a32d4f09342d99fe51149a726932cfd8e42a833918fa0b68ec093f768fe2d74919bb43bfb6ce7869b212e64 SHA512 59fb2cdcf43f5484f821a76825abe56986a89f611e32297292db3cab1a341a573e466135bd84da6bf71cf13e0e7fca4c5c17f97d115b30837f37916a9779a25f
diff --git a/app-emulation/libvirt/libvirt-10.0.0.ebuild b/app-emulation/libvirt/libvirt-10.0.0.ebuild
new file mode 100644
index 000000000000..b19afcf9a801
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-10.0.0.ebuild
@@ -0,0 +1,364 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Packages which get releases together:
+# app-emacs/nxml-libvirt-schemas
+# dev-python/libvirt-python
+# dev-perl/Sys-Virt
+# app-emulation/libvirt
+# Please bump them together!
+
+PYTHON_COMPAT=( python3_{9..11} )
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libvirt.org.asc
+inherit meson linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz
+ verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+IUSE="
+ apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
+ iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nbd nfs nls numa
+ openvz parted pcap policykit +qemu rbd sasl selinux test +udev
+ virtualbox +virt-network wireshark-plugins xen zfs
+"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ firewalld? ( virt-network )
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ qemu? ( libvirtd )
+ virt-network? ( libvirtd )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )"
+
+BDEPEND="
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt
+ dev-perl/XML-XPath
+ dev-python/docutils
+ virtual/pkgconfig
+ bash-completion? ( >=app-shells/bash-completion-2.0 )
+ verify-sig? ( sec-keys/openpgp-keys-libvirt )"
+
+# 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="
+ acct-user/qemu
+ app-misc/scrub
+ >=dev-libs/glib-2.56.0
+ dev-libs/libgcrypt
+ dev-libs/libnl:3
+ >=dev-libs/libxml2-2.9.1
+ >=net-analyzer/openbsd-netcat-1.105-r1
+ >=net-libs/gnutls-3.2.0:=
+ net-libs/libtirpc:=
+ >=net-misc/curl-7.18.0
+ sys-apps/dbus
+ sys-apps/dmidecode
+ sys-devel/gettext
+ >=sys-libs/readline-7.0:=
+ virtual/acl
+ apparmor? ( sys-libs/libapparmor )
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap-ng )
+ dtrace? ( dev-util/systemtap )
+ firewalld? ( >=net-firewall/firewalld-0.6.3 )
+ fuse? ( sys-fs/fuse:= )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( >=sys-block/open-iscsi-1.18.0 )
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
+ libssh? ( >=net-libs/libssh-0.8.1:= )
+ libssh2? ( >=net-libs/libssh2-1.3 )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[lvm] )
+ lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
+ nbd? ( sys-block/nbdkit )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2[lvm]
+ )
+ pcap? ( >=net-libs/libpcap-1.8.0 )
+ policykit? (
+ acct-group/libvirt
+ >=sys-auth/polkit-0.9
+ )
+ qemu? (
+ >=app-emulation/qemu-4.2
+ app-crypt/swtpm
+ >=dev-libs/yajl-2.0.3:=
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.26 )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virt-network? (
+ net-dns/dnsmasq[dhcp,ipv6(+),script]
+ net-firewall/ebtables
+ >=net-firewall/iptables-1.4.10[ipv6(+)]
+ net-misc/radvd
+ sys-apps/iproute2[-minimal]
+ )
+ wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= )
+ xen? (
+ >=app-emulation/xen-4.9.0
+ app-emulation/xen-tools:=
+ )
+ udev? (
+ virtual/libudev:=
+ >=x11-libs/libpciaccess-0.10.9
+ )
+ zfs? ( sys-fs/zfs )
+ kernel_linux? ( sys-apps/util-linux )"
+DEPEND="
+ ${BDEPEND}
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+"
+# The 'circular' dependency on dev-python/libvirt-python is because of
+# virt-qemu-qmp-proxy.
+PDEPEND="
+ qemu? ( dev-python/libvirt-python )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.4.0-fix_paths_in_libvirt-guests_sh.patch
+ "${FILESDIR}"/${PN}-9.9.0-do-not-use-sysconfig.patch
+ "${FILESDIR}"/${PN}-9.6.0-fix-paths-for-apparmor.patch
+)
+
+pkg_setup() {
+ # Check kernel configuration:
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+="
+ ~FUSE_FS"
+
+ use lvm && CONFIG_CHECK+="
+ ~BLK_DEV_DM
+ ~DM_MULTIPATH
+ ~DM_SNAPSHOT"
+
+ use lxc && CONFIG_CHECK+="
+ ~BLK_CGROUP
+ ~CGROUP_CPUACCT
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+ ~CGROUP_NET_PRIO
+ ~CGROUP_PERF
+ ~CGROUPS
+ ~CGROUP_SCHED
+ ~CPUSETS
+ ~IPC_NS
+ ~MACVLAN
+ ~NAMESPACES
+ ~NET_CLS_CGROUP
+ ~NET_NS
+ ~PID_NS
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~USER_NS
+ ~UTS_NS
+ ~VETH
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS"
+
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
+ ~DEVPTS_MULTIPLE_INSTANCES"
+
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_MARK_T
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_CONNMARK
+ ~NETFILTER_XT_MARK
+ ~NETFILTER_XT_TARGET_CHECKSUM
+ ~IP_NF_FILTER
+ ~IP_NF_MANGLE
+ ~IP_NF_NAT
+ ~IP6_NF_FILTER
+ ~IP6_NF_MANGLE
+ ~IP6_NF_NAT"
+
+ # This was renamed in kernel commit v5.2-rc1~133^2~174^2~6
+ if use virt-network ; then
+ if kernel_is -lt 5 2 ; then
+ CONFIG_CHECK+="
+ ~IP_NF_TARGET_MASQUERADE"
+ else
+ CONFIG_CHECK+="
+ ~NETFILTER_XT_TARGET_MASQUERADE"
+ fi
+ fi
+
+ # Bandwidth Limiting Support
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_T_NAT
+ ~IP_NF_TARGET_REJECT
+ ~NET_ACT_POLICE
+ ~NET_CLS_FW
+ ~NET_CLS_U32
+ ~NET_SCH_HTB
+ ~NET_SCH_INGRESS
+ ~NET_SCH_SFQ"
+
+ ERROR_USER_NS="Optional depending on LXC configuration."
+
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ touch "${S}/.mailmap" || die
+
+ default
+ python_fix_shebang .
+
+ # Skip fragile tests which relies on pristine environment
+ # (Breaks because of sandbox environment variables)
+ # bug #802876
+ sed -i -e "/commandtest/d" tests/meson.build || die
+
+ # Tweak the init script:
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
+ -i "${S}/libvirtd.init" || die "sed failed"
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature apparmor)
+ $(meson_feature apparmor apparmor_profiles)
+ $(meson_feature audit)
+ $(meson_feature caps capng)
+ $(meson_feature dtrace)
+ $(meson_feature firewalld)
+ $(meson_feature fuse)
+ $(meson_feature glusterfs)
+ $(meson_feature glusterfs storage_gluster)
+ $(meson_feature iscsi storage_iscsi)
+ $(meson_feature iscsi-direct storage_iscsi_direct)
+ $(meson_feature libvirtd driver_libvirtd)
+ $(meson_feature libssh)
+ $(meson_feature libssh2)
+ $(meson_feature lvm storage_lvm)
+ $(meson_feature lvm storage_mpath)
+ $(meson_feature lxc driver_lxc)
+ $(meson_feature nbd nbdkit)
+ $(meson_feature nls)
+ $(meson_feature numa numactl)
+ $(meson_feature numa numad)
+ $(meson_feature openvz driver_openvz)
+ $(meson_feature parted storage_disk)
+ $(meson_feature pcap libpcap)
+ $(meson_feature policykit polkit)
+ $(meson_feature qemu driver_qemu)
+ $(meson_feature qemu yajl)
+ $(meson_feature rbd storage_rbd)
+ $(meson_feature sasl)
+ $(meson_feature selinux)
+ $(meson_feature test tests)
+ $(meson_feature udev)
+ $(meson_feature virt-network driver_network)
+ $(meson_feature virtualbox driver_vbox)
+ $(meson_feature wireshark-plugins wireshark_dissector)
+ $(meson_feature xen driver_libxl)
+ $(meson_feature zfs storage_zfs)
+
+ -Dnetcf=disabled
+ -Dsanlock=disabled
+ -Dopenwsman=disabled
+
+ -Ddriver_esx=enabled
+ -Dinit_script=systemd
+ -Dqemu_user=$(usex caps qemu root)
+ -Dqemu_group=$(usex caps qemu root)
+ -Ddriver_remote=enabled
+ -Dstorage_fs=enabled
+ -Ddriver_vmware=enabled
+
+ --localstatedir="${EPREFIX}/var"
+ -Dinitconfdir="${EPREFIX}/etc/systemd"
+ -Drunstatedir="${EPREFIX}/run"
+ -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ export VIR_TEST_DEBUG=1
+ # Don't run the syntax check tests, they're fragile and not relevant
+ # to us downstream anyway.
+ # We also crank up the timeout (as Fedora does) just to preempt failures
+ # on slower arches.
+ meson_src_test --no-suite syntax-check --timeout-multiplier 10
+}
+
+src_install() {
+ meson_src_install
+
+ # Depending on configuration option, libvirt will create some bogus
+ # directoreis. They are either not used, or libvirtd is able to create
+ # them on demand, so let's remove them.
+ #
+ # Note, we are using -f here so that rm does not fail or warn if the
+ # directory is nonexistent.
+ rm -rf "${D}"/etc/sysconfig
+ rm -rf "${D}"/var
+ rm -rf "${D}"/run
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
+
+ newinitd "${S}/libvirtd.init" libvirtd
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
+
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
+
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+ tmpfiles_process libvirtd.conf
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
index 0978698e3e61..b19afcf9a801 100644
--- a/app-emulation/libvirt/libvirt-9999.ebuild
+++ b/app-emulation/libvirt/libvirt-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -30,8 +30,8 @@ LICENSE="LGPL-2.1"
SLOT="0/${PV}"
IUSE="
apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
- iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nfs nls numa openvz
- parted pcap policykit +qemu rbd sasl selinux test +udev
+ iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nbd nfs nls numa
+ openvz parted pcap policykit +qemu rbd sasl selinux test +udev
virtualbox +virt-network wireshark-plugins xen zfs
"
RESTRICT="!test? ( test )"
@@ -90,6 +90,7 @@ RDEPEND="
libssh2? ( >=net-libs/libssh2-1.3 )
lvm? ( >=sys-fs/lvm2-2.02.48-r2[lvm] )
lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
+ nbd? ( sys-block/nbdkit )
nfs? ( net-fs/nfs-utils )
numa? (
>sys-process/numactl-2.0.2
@@ -269,6 +270,7 @@ src_configure() {
$(meson_feature lvm storage_lvm)
$(meson_feature lvm storage_mpath)
$(meson_feature lxc driver_lxc)
+ $(meson_feature nbd nbdkit)
$(meson_feature nls)
$(meson_feature numa numactl)
$(meson_feature numa numad)
diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
index 9784c19f4174..115eb8299c81 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -25,6 +25,9 @@
Allow using the Logical Volume Manager (<pkg>sys-fs/lvm2</pkg>) as pool for disk image
storage
</flag>
+ <flag name="nbd">
+ Allow using <pkg>sys-block/nbdkit</pkg> to access network disks
+ </flag>
<flag name="nfs">
Allow using Network File System mounts as pool for disk image storage
</flag>