summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /app-emulation/libvirt
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/Manifest6
-rw-r--r--app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch61
-rw-r--r--app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch56
-rw-r--r--app-emulation/libvirt/libvirt-6.10.0-r2.ebuild329
-rw-r--r--app-emulation/libvirt/libvirt-6.8.0-r2.ebuild (renamed from app-emulation/libvirt/libvirt-6.8.0-r1.ebuild)1
5 files changed, 452 insertions, 1 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 1f6eeaa4a55b..e3877b895cfd 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -1,9 +1,11 @@
AUX README.gentoo-r3 2062 BLAKE2B bf45e0f63182dbff31982581045389c5510d5c3e648de34982ea9861923833a024681072ecf4f76b2ca025da30ed4a5a0f1273c85b4c0beb08189f80ce54de3e SHA512 6c54bd70a8521fcfe7eb21df87466c1df0026c569700f3d1b14c76cef4c1e68a56aa13d66b5214ae35a4c24bca58350d07d3e54ca3204ad336be618f51b00984
AUX libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch 1281 BLAKE2B 631f813ad29db29a6eb537ecd7b9d12aed097c5e0e01c07161adac1dec8a6f129bc098172fe6de4e78a2fbe5e67052005a7c5d1d17cbbb63ad27025662b9fa34 SHA512 dc80c9fc459207dd1ff77548054ea5a51c41a2d36e1b8917eca5f69293a86168af3da47466d8ff954a8b2e0ead9f28ed7d6c2c3671cf67d0ebb4039003a0dde2
+AUX libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch 4415 BLAKE2B 0bac886d57267eee37b78b146f68dbbd487a7d4a6c72a7ce27a328ba7077fe344dbd1930e5111439fdfb616a997e73e2a6f4c91f18a2a6f5518e37fe3c9f637c SHA512 8bd69463dc8ee705a64626203b3b05ad68dc8042e7d5ae9a7545a7597c7858633bb122a4dc3529c80de68367da24db5a106f632c9a52b178f44a448525030cc2
AUX libvirt-6.7.0-do-not-use-sysconfig.patch 5001 BLAKE2B 65e6dfacc598ba771fccc1c45c504aadcc83d0d8df211e70721dd0d7e3653c2c4d44a892ece19ee7e22d95552950e21f9d9e0a4ff960d66ebd2f9999c4cd52d1 SHA512 7dd3e4cf03dd8351a644a1669be70fcc6397b27983c0ec7b716dde61c92cf7dc9c46fc841cead5ae616897d9ed60209b03d5d78a4247215f4e79d11282da91ad
AUX libvirt-6.7.0-doc-path.patch 468 BLAKE2B 2438dcccd20faa9bf32734b7a043ca7a9981d37f32d7c867c5ab31a0904f6d57f5bdb4817296506e65e40b3013eef6a978b1d22e3a204b2989f6b766a4f18877 SHA512 401ae495e8aaef1fdea02fc0e05562f3d2f29e286ea493a2eab0f874d1d89053580ff15110ab484a2f39b0546bdc82135e6e1561545ceff6fa7341b875dd54ad
AUX libvirt-6.7.0-fix-paths-for-apparmor.patch 1974 BLAKE2B b5e9a151aa6bfbccf76ef0d6638b00cfbc3f8c4d5a722ba83699d29a32ef2f9a7d9eb678c1f61a128b0fee958a3349a4b843be08cec940f7d1e22757bc66bb95 SHA512 f81627e9c3d6c117e76a7a30af162a8ff8fafa191313155ceecf39bae2c457417152a0380d06cd3a4958b52a6ba410730cf66cd912072f7ec951b507c0a83f96
AUX libvirt-6.8.0-fix-libvirt-lxc-dbus.patch 1035 BLAKE2B 33beb95638fb97322ec811a887f45c27316e228a08359d4d9f0fae1f8224d6aa8a4c31fbe92b08076c6dd9dd413f7d2dd2058dd78aff3531363348096e10d591 SHA512 b8945a448c201121a791a08d8a7b17b8db27156e5ba568e2b2349cdb504521a5dde1d1425bfd280b7b344eb58bc8b40321e26932474caddfc4cf035804c1d40a
+AUX libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch 2059 BLAKE2B f9613928e3c59df0401da9574865e2c44770c62257ea39b354312a4dc8b05d7b4eb7d7501b212ea80089bd64396fa7f79d5e22ec4857d79cad2656c574a6c573 SHA512 c6769fa48ab684666d9c9df58d348c31b78520764cb0135ef0f635c04e986507d400beb961b18dd35ded2eb865307bbd9a34af711e790c36f08721c9bc239000
AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc
AUX libvirt-guests.init-r4 5591 BLAKE2B e745692a7ea706c8367cdb7ee2114565770bda5be5675ba3a541555659d17875f7996ff7028bf415224d095b49b71205a3d77f420464d5579ccc189def5e434d SHA512 ec2bc46d72afa61513983b777e2d49da618a35a4687bc75674b3a49ababd4e2e387661010d342fee86c7a73d259644985a263a6c2976e29a436d88921bb040b0
AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91
@@ -11,11 +13,13 @@ AUX libvirtd.init-r19 1114 BLAKE2B a69f5a07e0b946a3167ac4509611d08a8b848e7337677
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-6.10.0.tar.xz 8462796 BLAKE2B f1188cc869768682bdcb7ab763465705413ebc4fe418e37d4f5ef6a861507c4104a1844cd533fce905e24847918eba6e4e4f054f66b112e9fb54ee19a3653dfc SHA512 42e77a3542e9f15c3aeaab1639a80ee6539cb0f09a1e8324aa0059a8f6041acf20263a9556ac65c9a7a14693b0756020231085e4556ff54cf8329110018a2485
DIST libvirt-6.7.0.tar.xz 8362140 BLAKE2B d0afe33fcdaab3cc0f2ea8c552e7550bcece018b049a3b58e5c05ee85b39e2b3ebf42fa1b70ddb1d2a541d1114b6b49734f23a889b3589397a30a672f27a3a56 SHA512 cabfb6aa65a3a1412b0111654ad3a7d0a6dfc63399a892c540ca39ab4e56f87626a067037e4480bb55418a371d2b5e9ac74862c92a3cdea69822ec3d158d769f
DIST libvirt-6.8.0.tar.xz 8412092 BLAKE2B c118ca6b263054bb6941c62f3d1415f7ed1a3f29a35294272d04bc726643247ee5691e0310a1bf013faeba856d7aadd00a90fe8dbdca6ff4c7eb480e94d92fa2 SHA512 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
DIST libvirt-6.9.0.tar.xz 8432360 BLAKE2B 5cf577017158bab3ec5ad55e8e5944f4efd88cb3eb5460355ad0bfc1a30dba5c607b5b3523b8f9095552c494129ccb19bb89a6a0791469d5d47052c2375fa940 SHA512 ca9aed93589e91d383f9a5bddf5ba9fa20b849ba3b302017d625ba4910a0f942d1531006ddeaaa2622d121808105dec6e9bcb0c867f62e2fc546ce043675e175
+EBUILD libvirt-6.10.0-r2.ebuild 8233 BLAKE2B e02e58b17295af39f93714c9ae3339eb3da784afed7a816e4c0e482df579d6ec69406440a19453a2cf195851e3bb51b99f13965cec1b338c7e3b1750f7e6b25b SHA512 e4f5c22c750be1286902e0d6870d12130e55c196ae3726d73be6f18d65022d53c4ce9f834144bbd3fe4ae8f1b13daf6c7a53272a8fc1800863fbd344a0364503
EBUILD libvirt-6.7.0.ebuild 8629 BLAKE2B cf0058a6e48a2e47f300bb677ed876c9ea6b93cd0feb1fbc94d50036fdea0f4d47a9b23465f12bfaf911a3807b7c7ec1c86a0a18da70024a40f771162c4cf616 SHA512 9b4768af296ac97193d7230a0da95afd59eeb500b1b18e881b6d9974b073617167adafd34c70b5f3aa5b68099533835555299dddfab0d7626f8553d43badc65e
-EBUILD libvirt-6.8.0-r1.ebuild 8683 BLAKE2B 7772088918cfacbde706741813b4a41d5ae4be43e0a9db43f285688f520018191ebb1fcdcd106184f291db65f19ebcfbaa6734b14f17fc2f4dbead865c47fe71 SHA512 53bec05caed3c16bc02b57043ec1404ef6d0697a3d828e32b8b738200d3f5441683bf93c0aa03cf225bc2d60bd4411404fd3e7b83c600ad25bb278b32e364450
+EBUILD libvirt-6.8.0-r2.ebuild 8769 BLAKE2B 5d425a9f6b776869b2d4a886100ed30730ea504b619d76ac24f823583697ea88b0fa039db1cfd927c82351abe0bea97601eb06cdb5c0ecf40bc42d65521767d9 SHA512 76a636969fb6b11c9def8cfac402762fa35a474f925beecc40b4bec2b841981a235eaf3bfa272ec63e907275dce332aa03bae8f72f033ed7f2adfae987796e09
EBUILD libvirt-6.9.0-r1.ebuild 8685 BLAKE2B 469fa6996995f038297721b54a5f10e51bdd39d54545a419214875d46628acd06f566d1780a52a87f92f52836441b0f96d42ed5830afaf8a2b2bef90abd6dc15 SHA512 2fbc8c8aa73839a515c0c52be1a27731d6269b1b31149542feb0430220ad32e960b09107d094c04fa91b79804a1b262a4a1a55a8d788e69a26da808ea980c762
EBUILD libvirt-9999.ebuild 8479 BLAKE2B 2904b27b77891240cb2c5eddd0b379b1ccb648d788eb30ccaeec1ec3136f541434ab5961ca8a0478a3ae02189b10f97015cd2e0338cbffd509926c621c6d5f36 SHA512 0f15123b538ffad3bc19b69fef888685016a74f31418de809edf1d1bced61d371a36f22c83025478b578d0ce4d7c3580eb55b6ee230b0a186ebe13764e6a84d7
MISC metadata.xml 3568 BLAKE2B ea4e03121fbc3aca8af2d8e12b42fefc9954e8e38fd83b1014353dd83bceeae4e1ba65329b42fb19fc0d6a9aae7c9d16cf88817d4ea7cfe767c7ef5734b291f6 SHA512 4d691fecee1ddd161a67e3b18a6071d1f0f6e1dcc6ae8deb1a63d73ca9c6d86f5a879d8ab9e43397b7988d66a7df9be6f556a52ebfe8d886b1f03e89614cf073
diff --git a/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch b/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch
new file mode 100644
index 000000000000..207cc20ba091
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch
@@ -0,0 +1,61 @@
+From 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a Mon Sep 17 00:00:00 2001
+Message-Id: <4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a.1607416232.git.mprivozn@redhat.com>
+From: Jonathon Jongsma <jjongsma@redhat.com>
+Date: Wed, 2 Dec 2020 11:52:39 -0600
+Subject: [PATCH] conf: Fix segfault when parsing mdev types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit f1b0890 introduced a potential crash due to incorrect operator
+precedence when accessing an element from a pointer to an array.
+
+Backtrace below:
+
+ #0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801c9b40, nmdev_types=0x7fff801c9b48) at ../src/conf/node_device_conf.c:2676
+ #1 0x00007ffff7caf53d in virNodeDeviceGetPCIDynamicCaps (sysfsPath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", pci_dev=0x7fff801c9ac8) at ../src/conf/node_device_conf.c:2705
+ #2 0x00007ffff7cae38f in virNodeDeviceUpdateCaps (def=0x7fff80168a10) at ../src/conf/node_device_conf.c:2342
+ #3 0x00007ffff7cb11c0 in virNodeDeviceObjMatch (obj=0x7fff84002e50, flags=0) at ../src/conf/virnodedeviceobj.c:850
+ #4 0x00007ffff7cb153d in virNodeDeviceObjListExportCallback (payload=0x7fff84002e50, name=0x7fff801cbc20 "pci_0000_00_02_0", opaque=0x7fffe2ffc6a0) at ../src/conf/virnodedeviceobj.c:909
+ #5 0x00007ffff7b69146 in virHashForEach (table=0x7fff9814b700 = {...}, iter=0x7ffff7cb149e <virNodeDeviceObjListExportCallback>, opaque=0x7fffe2ffc6a0) at ../src/util/virhash.c:394
+ #6 0x00007ffff7cb1694 in virNodeDeviceObjListExport (conn=0x7fff98013170, devs=0x7fff98154430, devices=0x7fffe2ffc798, filter=0x7ffff7cf47a1 <virConnectListAllNodeDevicesCheckACL>, flags=0)
+ at ../src/conf/virnodedeviceobj.c:943
+ #7 0x00007fffe00694b2 in nodeConnectListAllNodeDevices (conn=0x7fff98013170, devices=0x7fffe2ffc798, flags=0) at ../src/node_device/node_device_driver.c:228
+ #8 0x00007ffff7e703aa in virConnectListAllNodeDevices (conn=0x7fff98013170, devices=0x7fffe2ffc798, flags=0) at ../src/libvirt-nodedev.c:130
+ #9 0x000055555557f796 in remoteDispatchConnectListAllNodeDevices (server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000, rerr=0x7fffe2ffc8a0, args=0x7fffd4008470, ret=0x7fffd40084e0)
+ at src/remote/remote_daemon_dispatch_stubs.h:1613
+ #10 0x000055555557f6f9 in remoteDispatchConnectListAllNodeDevicesHelper (server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000, rerr=0x7fffe2ffc8a0, args=0x7fffd4008470, ret=0x7fffd40084e0)
+ at src/remote/remote_daemon_dispatch_stubs.h:1591
+ #11 0x00007ffff7ce9542 in virNetServerProgramDispatchCall (prog=0x555555690c10, server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000) at ../src/rpc/virnetserverprogram.c:428
+ #12 0x00007ffff7ce90bd in virNetServerProgramDispatch (prog=0x555555690c10, server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000) at ../src/rpc/virnetserverprogram.c:302
+ #13 0x00007ffff7cf042b in virNetServerProcessMsg (srv=0x555555627080, client=0x5555556bf050, prog=0x555555690c10, msg=0x5555556c0000) at ../src/rpc/virnetserver.c:137
+ #14 0x00007ffff7cf04eb in virNetServerHandleJob (jobOpaque=0x5555556b66b0, opaque=0x555555627080) at ../src/rpc/virnetserver.c:154
+ #15 0x00007ffff7bd912f in virThreadPoolWorker (opaque=0x55555562bc70) at ../src/util/virthreadpool.c:163
+ #16 0x00007ffff7bd8645 in virThreadHelper (data=0x55555562bc90) at ../src/util/virthread.c:233
+ #17 0x00007ffff6d90432 in start_thread () at /lib64/libpthread.so.0
+ #18 0x00007ffff75c5913 in clone () at /lib64/libc.so.6
+
+Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
+Reviewed-by: Ján Tomko <jtomko@redhat.com>
+Signed-off-by: Ján Tomko <jtomko@redhat.com>
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ src/conf/node_device_conf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
+index 4e2837c1cd..cac4243b50 100644
+--- a/src/conf/node_device_conf.c
++++ b/src/conf/node_device_conf.c
+@@ -2673,7 +2673,7 @@ virNodeDeviceGetMdevTypesCaps(const char *sysfspath,
+
+ /* this could be a refresh, so clear out the old data */
+ for (i = 0; i < *nmdev_types; i++)
+- virMediatedDeviceTypeFree(*mdev_types[i]);
++ virMediatedDeviceTypeFree((*mdev_types)[i]);
+ VIR_FREE(*mdev_types);
+ *nmdev_types = 0;
+
+--
+2.26.2
+
diff --git a/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch b/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
new file mode 100644
index 000000000000..46da07afdf00
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
@@ -0,0 +1,56 @@
+From c8be9ccc36a32cc756d05b2c0838c43a57be15f7 Mon Sep 17 00:00:00 2001
+Message-Id: <c8be9ccc36a32cc756d05b2c0838c43a57be15f7.1607284606.git.mprivozn@redhat.com>
+From: Pavel Hrdina <phrdina@redhat.com>
+Date: Thu, 8 Oct 2020 13:09:45 +0200
+Subject: [PATCH] meson: properly handle libpcap if it's explicitly disabled
+
+If libpcap is detected using pkg-config it would ignore the libpcap
+option.
+
+Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
+Reviewed-by: Andrea Bolognani <abologna@redhat.com>
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ meson.build | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e5a8316668..ec252ddf39 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1101,17 +1101,22 @@ if libparted_dep.found()
+ endif
+
+ libpcap_version = '1.5.0'
+-libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
+-if not libpcap_dep.found()
+- pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
+- if pcap_config_prog.found()
+- pcap_args = run_command(pcap_config_prog, '--cflags').stdout().strip().split()
+- pcap_libs = run_command(pcap_config_prog, '--libs').stdout().strip().split()
+- libpcap_dep = declare_dependency(
+- compile_args: pcap_args,
+- link_args: pcap_libs,
+- )
++if not get_option('libpcap').disabled()
++ libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
++
++ if not libpcap_dep.found()
++ pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
++ if pcap_config_prog.found()
++ pcap_args = run_command(pcap_config_prog, '--cflags').stdout().strip().split()
++ pcap_libs = run_command(pcap_config_prog, '--libs').stdout().strip().split()
++ libpcap_dep = declare_dependency(
++ compile_args: pcap_args,
++ link_args: pcap_libs,
++ )
++ endif
+ endif
++else
++ libpcap_dep = dependency('', required: false)
+ endif
+ if libpcap_dep.found()
+ conf.set('WITH_LIBPCAP', 1)
+--
+2.26.2
+
diff --git a/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild b/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild
new file mode 100644
index 000000000000..0662672e8ae2
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
+ SRC_URI=""
+ SLOT="0"
+else
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+ SLOT="0/${PV}"
+fi
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="https://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+IUSE="
+ apparmor audit +caps dtrace firewalld fuse glusterfs iscsi
+ iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz
+ parted pcap policykit +qemu rbd sasl selinux +udev
+ virtualbox +virt-network wireshark-plugins xen zfs
+"
+
+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="
+ acct-user/qemu
+ policykit? ( acct-group/libvirt )
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt
+ dev-perl/XML-XPath
+ dev-python/docutils
+ virtual/pkgconfig"
+
+# 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="
+ app-misc/scrub
+ >=dev-libs/glib-2.48.0
+ dev-libs/libgcrypt:0
+ dev-libs/libnl:3
+ >=dev-libs/libxml2-2.7.6
+ >=net-analyzer/openbsd-netcat-1.105-r1
+ >=net-libs/gnutls-1.0.25:0=
+ net-libs/libssh2
+ net-libs/libtirpc
+ net-libs/rpcsvc-proto
+ >=net-misc/curl-7.18.0
+ sys-apps/dbus
+ sys-apps/dmidecode
+ sys-devel/gettext
+ sys-libs/ncurses:0=
+ sys-libs/readline:=
+ 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:0= )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( sys-block/open-iscsi )
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
+ libssh? ( net-libs/libssh )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
+ 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[-device-mapper-only(-)]
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? ( >=sys-auth/polkit-0.9 )
+ qemu? (
+ >=app-emulation/qemu-1.5.0
+ dev-libs/yajl
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virt-network? (
+ net-dns/dnsmasq[script]
+ net-firewall/ebtables
+ >=net-firewall/iptables-1.4.10[ipv6]
+ net-misc/radvd
+ sys-apps/iproute2[-minimal]
+ )
+ wireshark-plugins? ( net-analyzer/wireshark:= )
+ xen? (
+ >=app-emulation/xen-4.6.0
+ app-emulation/xen-tools:=
+ )
+ udev? (
+ virtual/libudev
+ >=x11-libs/libpciaccess-0.10.9
+ )
+ zfs? ( sys-fs/zfs )"
+
+DEPEND="${BDEPEND}
+ ${RDEPEND}
+ ${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
+ "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
+ "${FILESDIR}"/${PN}-6.7.0-doc-path.patch
+ "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
+ "${FILESDIR}"/${PN}-6.10.0-Fix-segfault-when-parsing-mdev-types.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
+ ~IP_NF_TARGET_MASQUERADE
+ ~IP6_NF_FILTER
+ ~IP6_NF_MANGLE
+ ~IP6_NF_NAT"
+ # 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"
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
+ if kernel_is ge 3 6; then
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
+ fi
+
+ ERROR_USER_NS="Optional depending on LXC configuration."
+
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap" || die
+
+ default
+
+ # 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_use 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 lvm storage_lvm)
+ $(meson_feature lvm storage_mpath)
+ $(meson_feature lxc driver_lxc)
+ $(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 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
+
+ -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"
+ -Drunstatedir="${EPREFIX}/run"
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ export VIR_TEST_DEBUG=1
+ meson_src_test
+}
+
+src_install() {
+ meson_src_install
+
+ # Remove bogus, empty directories. They are either not used, or
+ # libvirtd is able to create them on demand
+ rm -rf "${D}"/etc/sysconfig || die
+ rm -rf "${D}"/var || die
+ rm -rf "${D}"/run || die
+
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh
+ bashcomp_alias virsh virt-admin
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ systemd_newtmpfilesd "${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_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 || die
+ fi
+}
+
+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!
+
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/libvirt/libvirt-6.8.0-r1.ebuild b/app-emulation/libvirt/libvirt-6.8.0-r2.ebuild
index 4de73f27c9f8..2e07035bce72 100644
--- a/app-emulation/libvirt/libvirt-6.8.0-r1.ebuild
+++ b/app-emulation/libvirt/libvirt-6.8.0-r2.ebuild
@@ -129,6 +129,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.7.0-doc-path.patch
"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
"${FILESDIR}"/${PN}-6.8.0-fix-libvirt-lxc-dbus.patch
+ "${FILESDIR}"/${PN}-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
)
pkg_setup() {