From c035b2b83f0e94c4b2e82184f00bcef874e6276b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 11 May 2024 00:01:23 +0100 Subject: gentoo auto-resync : 11:05:2024 - 00:01:22 --- app-emulation/libvirt/Manifest | 3 +- ...3.0-vsh-Don-t-init-history-in-cmdComplete.patch | 84 +++++ app-emulation/libvirt/libvirt-10.3.0-r1.ebuild | 366 +++++++++++++++++++++ app-emulation/libvirt/libvirt-10.3.0.ebuild | 365 -------------------- 4 files changed, 452 insertions(+), 366 deletions(-) create mode 100644 app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch create mode 100644 app-emulation/libvirt/libvirt-10.3.0-r1.ebuild delete mode 100644 app-emulation/libvirt/libvirt-10.3.0.ebuild (limited to 'app-emulation/libvirt') diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 1ebf09efd493..8731d71bb84a 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -1,6 +1,7 @@ AUX README.gentoo-r3 2065 BLAKE2B f3677b916121126c431ba32e324bcc9f04b4dfeef1ee54517cae1118c67274592d890d6d919a48af6709e9220379797549277904a02fea740a69b1bf8f2397aa SHA512 77ede8a3e1a380b334595e65ae148acd2e52d594200253dc67d68dd256db5bf72ce7ce222d067c739ce53f84634421e74726f30c0ab7a1c76b86ccdc191c8a69 AUX libvirt-10.1.0-Fix-off-by-one-error-in-udevListInterfacesByStatus.patch 1665 BLAKE2B 25c162ca5d33c36e1b97185f3db8517e707a20d8ee2573dfd15f9540af1a2a1d39706ffbc1b6e55be0b7156ca0d146715c9f629add883ff0d89122dd7a9962e4 SHA512 dd5dc696412529a6d004ea03ef75c991fbe7c7be839467e9bf2e8a8b2119275b053b4549e9924907b146e841c4a81e8f1ee2744c7d275c5a4007d80b87e5b1af AUX libvirt-10.2.0-remote-check-for-negative-array-lengths-before-alloc.patch 9364 BLAKE2B 05ac0aaea8741102a34657b4910569ae5601364bdfd419743900823537f982348ba68cbac37fe10b21c2869531a35d68de8fbeb462c1f66aa0c3af4a97630405 SHA512 72a40984e6de167af8de9aedabdecf79c0f99bb5e7152b6521e87268bf1a1050b9d0d9acbb86c54810029dbde671a518ebd8a3f11590594a3226d818b89188f1 +AUX libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch 2935 BLAKE2B b3bb5f7f6c21b645f43c2de8c17fe821a12fcd656629bbb44d780f408c5e50f0ee00e0d6bd82a9aba68b4651b711b29170e6989c317bada28edf3aff36cf06ec SHA512 b3421b7972a226660e475616bfc23fffcba825516e14b5267e8410fd178031e848bd7a69128c04f1188c0b75de39e6155cd480649b87a21ab650c2874765ccc7 AUX libvirt-9.10.0-virxml-include-libxml-xmlsave.h-for-xmlIndentTreeOut.patch 1125 BLAKE2B d161698463c56b9fbb8b4c4a5ec1b7d65e87e088d68ea1a2cde316449c80d9ba2a4ad5883962eb3e4d31b0441917f6b02d4c781869083c47c8eeb432f6826e8b SHA512 d1dbcb9f6e1c66a38fa09af84248c8ac68d1f263f07b275e12ae3087a6fbd223eeefe20c7b241d02be9529c14bcf311d850d418bc8cecac4cb4e225d78800a41 AUX libvirt-9.4.0-do-not-use-sysconfig.patch 8195 BLAKE2B b731d57dc86fe725d3cbd47b6e691a414107d3594377bd1c73e19735368937a0983e407ec05700213d2ec5802e90f429fd5c7354cd03fb25d3acced952ab6f38 SHA512 2a2e08a6034ed37cafebde3b0fd27913d972d1e9f8816e10a9af951e99f10bd3b9bc7ada1ac50c5085e3fdd3d02301365d031eb6ce3b71102e4b3072d609f21b AUX libvirt-9.4.0-fix_paths_in_libvirt-guests_sh.patch 988 BLAKE2B 5936eafa5c300edad7ed368ec13063d31aea59e3daefeac59cf515ea44667f61aa63b0e2c2a5c88ace24c48cc132789cc5fa1a7c6c04c17e9ac61b114778e46d SHA512 5b80a5ec2898c1c821d0d49b9de67a256f82cb60879215ddde07c2a51f2e8a8b6893fec65617c27edec50cd51a362fb1fcdd21827e8de954f26879adcfa12418 @@ -28,7 +29,7 @@ DIST libvirt-9.9.0.tar.xz.asc 833 BLAKE2B 3de3674d33c595692e71eeb9c312de76e865d3 EBUILD libvirt-10.0.0-r2.ebuild 9651 BLAKE2B 97cf379807393cc939fd0dcd40f65bf2177b4957ba600382f5b3eeed1255fe2a3e640f147c923a597430a080cd936fae8977a2a6055c548b70206e429fdf58fb SHA512 beebff18fb91e4db4e30ab063fd02f8344b32d2fc7b645e77e0323250d76bbe6a941734eea60052ac8199e87ec91129f28141f6ecc7bdc8a9ecd45f90205c611 EBUILD libvirt-10.1.0-r1.ebuild 9567 BLAKE2B 541b3ab8320a9c076c409cac1573e0f005c8a0bb1e11c905474fba6cfdf1c14f75ef2a42dcf93a089df415160db11f3e508327232b6c69ee67dd9a04b656f6c7 SHA512 d32b4e414d697dcb6a5991fe39232f61b087c307806562de3ff93519aa2f1065ed6984ece1ec06030dd4beb9a5a858b1a0eee0f728d521fc3126f903235172fb EBUILD libvirt-10.2.0.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c -EBUILD libvirt-10.3.0.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c +EBUILD libvirt-10.3.0-r1.ebuild 9552 BLAKE2B 731af9f5634d1b8ef9bc9957b17070fcc8b61ff3273d4d65ed505d9462dd02b79425a19792ee0447bff3aaca351d108f06593c1d9ffd8029bcbcfe11f011febb SHA512 246868cdee09b964c452872149a5dc8106128285827f91876cccd75d457402ca17ff5d2b722ab2e257dede403ae80e277dbb31108a706ab44f5ef45a659cee4f EBUILD libvirt-9.8.0-r2.ebuild 9647 BLAKE2B e8118d9d46ac98ad406421fb37f428ccea980cbad40e66d765bb6711c4e75f390cf93560d9be5f0826db4ea52d251bef7f4f43b693fcc903c77add4180d52143 SHA512 17ec206969afb23d01ab0568776475d9d2ffba610382bfba5289825b3c9e4975d2239601ffaf1c48f9a15088779e90b42831c8e3c6cb0355add60f66570ed9d2 EBUILD libvirt-9.9.0-r2.ebuild 9701 BLAKE2B 9c9ad40d523b3c36cc37cf1beeca8014e528270484ec88f15984bdca00abde541c0ef4cd1677788af30dc1ee1a206168c9ca894c4e8abeb649170e4903b0ce0c SHA512 4236b7d848c2e01009837bdfefcd81fedd1e95ecae24829473afcbd364fcaf378858dc3fad8cf0a93c5f00dcc7e18ee71b160d26229e5fe9499c8e7b5b3dc3d5 EBUILD libvirt-9999.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c diff --git a/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch b/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch new file mode 100644 index 000000000000..b151e3134e63 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch @@ -0,0 +1,84 @@ +From cab1e71f0161fd24c5d6ff4c379d3a242ea8c2d9 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Michal Privoznik +Date: Sat, 4 May 2024 05:12:54 +0200 +Subject: [PATCH] vsh: Don't init history in cmdComplete() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Recent rework of virshtest uncovered a subtle bug that was +dormant in now vsh but before that even in monolithic virsh. + +In vsh.c there's this vshReadlineInit() function that's supposed +to initialize readline library, i.e. set those global rl_* +pointers. But it also initializes history library. Then, when +virsh/virt-admin quits, vshReadlineDeinit() is called which +writes history into a file (ensuring the parent directory +exists). So far no problem. + +Problem arises when cmdComplete() is called (from a bash +completer, for instance). It does not guard call to +vshReadlineInit() with check for interactive shell (and it should +not), but it sets ctl->historyfile which signals to +vshReadlineDeinit() the history should be written. + +Now, no real history is written, because nothing was entered on +the stdin, but the parent directory is created nevertheless. With +recent movement in virshtest.c this means some test cases might +create virsh history file which breaks our promise of not +touching user's data in test suite. + +Resolves: https://bugs.gentoo.org/931109 +Signed-off-by: Michal Privoznik +Reviewed-by: Ján Tomko +--- + tools/vsh.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/tools/vsh.c b/tools/vsh.c +index 58855f63ba..e74045c24e 100644 +--- a/tools/vsh.c ++++ b/tools/vsh.c +@@ -2973,7 +2973,7 @@ vshReadlineInit(vshControl *ctl) + const char *quote_characters = "\"'"; + + /* initialize readline stuff only once */ +- if (ctl->historydir) ++ if (autoCompleteOpaque) + return 0; + + /* Opaque data for autocomplete callbacks. */ +@@ -2989,6 +2989,11 @@ vshReadlineInit(vshControl *ctl) + rl_completer_quote_characters = quote_characters; + rl_char_is_quoted_p = vshReadlineCharIsQuoted; + ++ /* Stuff below is needed only for interactive mode. */ ++ if (!ctl->imode) { ++ return 0; ++ } ++ + histsize_env = g_strdup_printf("%s_HISTSIZE", ctl->env_prefix); + + /* Limit the total size of the history buffer */ +@@ -3149,7 +3154,7 @@ vshInit(vshControl *ctl, const vshCmdGrp *groups) + cmdGroups = groups; + + if (vshInitDebug(ctl) < 0 || +- (ctl->imode && vshReadlineInit(ctl) < 0)) ++ vshReadlineInit(ctl) < 0) + return false; + + return true; +@@ -3168,7 +3173,7 @@ vshInitReload(vshControl *ctl) + + if (ctl->imode) + vshReadlineDeinit(ctl); +- if (ctl->imode && vshReadlineInit(ctl) < 0) ++ if (vshReadlineInit(ctl) < 0) + return false; + + return true; +-- +2.43.2 + diff --git a/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild new file mode 100644 index 000000000000..5a6a2ae58357 --- /dev/null +++ b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild @@ -0,0 +1,366 @@ +# 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_{10..12} ) +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 + virtiofsd 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-debug/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] + ) + virtiofsd? ( app-emulation/virtiofsd ) + 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 + "${FILESDIR}"/${PN}-10.3.0-vsh-Don-t-init-history-in-cmdComplete.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-10.3.0.ebuild b/app-emulation/libvirt/libvirt-10.3.0.ebuild deleted file mode 100644 index f1c08714d713..000000000000 --- a/app-emulation/libvirt/libvirt-10.3.0.ebuild +++ /dev/null @@ -1,365 +0,0 @@ -# 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_{10..12} ) -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 - virtiofsd 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-debug/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] - ) - virtiofsd? ( app-emulation/virtiofsd ) - 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 -} -- cgit v1.2.3