From 6f8038813c460b4f0572d5ef595cdfa94af3a94d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 21 May 2019 10:20:03 +0100 Subject: gentoo resync : 21.05.2019 --- app-emulation/libvirt/Manifest | 20 +- .../libvirt/files/libvirt-5.2.0-md-clear.patch | 36 ++ app-emulation/libvirt/files/libvirtd.init-r16 | 4 +- app-emulation/libvirt/files/libvirtd.init-r17 | 2 +- app-emulation/libvirt/files/virtlockd.init-r1 | 4 +- app-emulation/libvirt/files/virtlogd.init-r1 | 4 +- app-emulation/libvirt/libvirt-4.9.0.ebuild | 7 +- app-emulation/libvirt/libvirt-5.0.0-r1.ebuild | 392 --------------------- app-emulation/libvirt/libvirt-5.1.0-r1.ebuild | 392 --------------------- app-emulation/libvirt/libvirt-5.2.0-r1.ebuild | 392 --------------------- app-emulation/libvirt/libvirt-5.2.0-r2.ebuild | 388 ++++++++++++++++++++ app-emulation/libvirt/libvirt-5.2.0.ebuild | 392 --------------------- app-emulation/libvirt/libvirt-9999.ebuild | 7 +- 13 files changed, 441 insertions(+), 1599 deletions(-) create mode 100644 app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch delete mode 100644 app-emulation/libvirt/libvirt-5.0.0-r1.ebuild delete mode 100644 app-emulation/libvirt/libvirt-5.1.0-r1.ebuild delete mode 100644 app-emulation/libvirt/libvirt-5.2.0-r1.ebuild create mode 100644 app-emulation/libvirt/libvirt-5.2.0-r2.ebuild delete mode 100644 app-emulation/libvirt/libvirt-5.2.0.ebuild (limited to 'app-emulation/libvirt') diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index d93eee925ecc..46cb6cf86d45 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -6,23 +6,19 @@ AUX libvirt-5.0.0-do-not-use-sysconf.patch 7333 BLAKE2B 3a23b047deb1388cb46f26a0 AUX libvirt-5.0.0-fix-paths-for-apparmor.patch 4274 BLAKE2B 886fd5bdf37e672e761bde9bc5b3e4902b174019bb8efda127f7a08cb6752b67745c10a3e3953063c746380bcf8243807fd6e9a154f48b7bd02c61e85e90325e SHA512 efe4c4c940d720c467f44f405ac4ca4d3867dee0a7e2fa2a7a4fbc263198089098c48d1207c30123b6a55f6ec6bee04f3edd3f23724af46bcb1343f87ca94de6 AUX libvirt-5.1.0-do-not-use-sysconf.patch 6531 BLAKE2B fe242b96e5b1c1aba8548c2ee9dcb879565b8782d08c9c8387fb0653fc44478ca8f80e0a89e1cd385d835eb22e6a113115ca2af7bb9090fab7b66d3bee94efca SHA512 e9fe48c4442c4f249fd6ff8361c6e8982f2a97d0b59929b8975e7277b1e5ad14223daa68d6fec8a6387b90cb2633956c941117d5923bff65c9491a37c810e68e AUX libvirt-5.2.0-do-not-use-sysconf.patch 5969 BLAKE2B 965e53b33424b5e62107574bc457ee886c799b247179200cf671485dff331db3e2c453e55b3a38b34a205ba3663ddf2e4fe0ce336f9c262fa886192368ada3f0 SHA512 a1683ca986d006bcce8388d3ee5e8daf699f92c6dac9714a4cce1fdd8ea3a4f745b231e0576bed08eece04acf96872257a8e2890b0a3acefb5cf2657f3223792 +AUX libvirt-5.2.0-md-clear.patch 1268 BLAKE2B f2609a957025a59a1c5daf0faf408fdcc3c77eebb6dc315cd9ba3d6e8dc441ea6f8124ea3903ef030afe5faea0839bbf118ab22b48a424b3895a7e4b451d797f SHA512 3413ba74f841ecafdbca76496f367d85fe8ac31d637099a0c875a2ea0cab90d277a26918f7a2ffd37fd726cc1ef317a27fbdf2a73a411eb259b26a0fae0f8fd7 AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc AUX libvirt-guests.init-r3 5530 BLAKE2B 5de3e8577ded1401f6dca551c6098418e596287d43b1b90e133859bb9b74dff20b8518bc09853ccff7141e6baa52fc12c9b8d3e8f60b868b72b1993254fac5d9 SHA512 7aa4eac8c293c3063d9435a4ad1ea855f9fdd84eb0ed8cbf0779935f152aab380e2ee7eb9129b2f07147bfa4dd1eae4b836ccae295c35b63dbc767208dd11b0c AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91 -AUX libvirtd.init-r16 1093 BLAKE2B 7242ddcc7046392e8c24c1918a1dce343a3198fd80346c97850bb0226888d98f6d57f53eb00e38b8f9e71fd2073feef8399b340aea9ab9d8ed64a646140c3dc1 SHA512 5ea4c2f9e48faf2aa8fe7077d075841d610da17e28bcc85c79c55565f286e345339f042090b453e25accf5c405e322e76b6cf846fdfb3e90db3e2d0c2fff4c48 -AUX libvirtd.init-r17 1153 BLAKE2B b7f775a5bd6a2532da50fecc272036176e1b82db1c3de7e817fa9ded29f351f621fde48a134bc31dc6b4145e55ca4c5906ab9d4b34ec0c45fb738b9908f1a733 SHA512 bd81ff66c6dbaa451627c2e5b17c4428cf6f5cf81ccbf29697060c59a68dbcf75ebd0d8806d0f5af7a79bf32090fadc90af76826d177861a21049541f3832052 +AUX libvirtd.init-r16 1086 BLAKE2B 088a3e10a63826ecdd24cb811f4e88ddb2b4f649b9e1eca5eece383003760f3df1ece826416e7920fdb4cc9c6171a56ebc1509851d71048fedaf5755072b27ef SHA512 1065a5bad666a8e0a44e4c0629b3a9087322c2d934bf217d8b0b66d8fe1179e5d9661cc2f9491c0badd7874a25c772c78a3420474dfb51b9e363c489c14baf32 +AUX libvirtd.init-r17 1149 BLAKE2B e461c82c9516ca8b0011d053e775dfa3a3f8cf674ad2cc05f054aa270671a81d7f60ee12589613699489c378db0ab9c9f17c0564cc7839ac9636595d52ab0f7b SHA512 860cc1f1e607d164f2667bac5a6dae37d9e342d83b03eb8f59fd703081c23e1b86524ffe19cb2ca10ca5c4bbdcca022be6705343cfbad80f619d1050bbd194ce AUX libvirtd.service.conf 401 BLAKE2B edd74238f9639ead1d776142e6231d87f39cb6670e72cec9c1ac44f58fcfbc63e72944d2d243a1aabe48b9acc6bb1c52189161a79e3d42603c87a270027c42f8 SHA512 27adbd104ea87e51d423b057392a0c6726692ad8ee9723f73dc4bfe8eb54069725d64883434424ba810d36992d404d1ba4afe6bcefb866d3d3d92dfd161c2b32 AUX libvirtd.tmpfiles.conf 36 BLAKE2B fa0e1dac4117dcb2a2e826c82c4c63e20156db47abf4088167484f1f3149a4998840cf1aba745621851d7e2653df5c7f7268d8d61be3a3731ea053a88f35c13b SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed -AUX virtlockd.init-r1 570 BLAKE2B 734d582d867b79649f863504fcd7c87fe3c59569b56b0996a6229d6eebadc9d4c356c10bbcf5637483fbc930d0c50233da4fffa357d423029b3828b7a3be56de SHA512 65a05d406200da9a534df5caa1b9cb2af97f0b03f64e6b4157322975fa754f59ae74fff9ec8301a6c0510e4b75e2b72a78cddf004a76109e18c375e83527cee5 -AUX virtlogd.init-r1 569 BLAKE2B 20df60c23cee575577592d41d1a9913923255633d12de789c036e6085f9e7b4360e017155c61e3688332b493a0e96ffca55753bcc67a33bb877539b80eef81fe SHA512 0a3e083e742f9e0d8206ab9a48c63bbd395bdc24e5551e2cbeddffa3fb576a817b73dbafe646c392a35c354d6b65426a9b6f3ce3dcafc30077715e90684968c1 +AUX virtlockd.init-r1 563 BLAKE2B b8e1d2c29570480b477f14c25042f227093474710f1d9d445472e512415f73c574657a1eaddea892d15a838eb7fce2a0f0dc067dadfd393199640185606bff1f SHA512 524f33171cdbee8a36b341938bf5d45da88893452ed83fbe0fbcfd5191ea6127f3364fa36d6222c37dede1e0c3f195c3a68a30809fb6b11b5ce750ca297be629 +AUX virtlogd.init-r1 562 BLAKE2B 52b0dce0d3dd856d6cbffbe37e721d8f053d53a4802ce3a1e83ab78a8e0920d66436d9cf5e6d6e4fde13debb90e0b61355befd9e67d6546967f19f8c26736dbd SHA512 98e705fbd08f0f8342d33762c98786ca0690f617be27ede5ddf2c5053eeae3f441403415f4c961a7f388dc844075d21515a8ffd62d1654d1049e06910bb1c7b9 DIST libvirt-4.9.0.tar.xz 14744184 BLAKE2B 03ddefc8f505c8688ad506b81ea9b37ee085e4c9c429834c6b6f338981bfc3c6034a5455a79feca604fb36e658de766ee6104aeed690c682ae596d10eb5632a9 SHA512 3cfada940f9de6cc4b0504e089f41aa03d9986f0163344dd3b3ab8e6c4eb556a56996dc8f24bca913b036862c75b256628ea9ab7674ef0a57b87f47c58689e90 -DIST libvirt-5.0.0.tar.xz 14832576 BLAKE2B 8839a10e4ec8de012ca17e348efd75cbd94cc3b1cf378c867d958b61079105d6eb4f98d8d4b89dd5a6a368a3d9ea41f30498e44b7e039cdf8931ae6de8fa47b3 SHA512 d93042f49d2550d14577b5257c548d7108462fe1ad69420c128acf094ffd3e80deb744db13d4c3d5fbe5e4c1826d13131be12e3413710711a2d8cba6cb5a9db9 -DIST libvirt-5.1.0.tar.xz 14893608 BLAKE2B 76e46c19b09203e7875576185d533d1af4abb5c2b1d229d0215e189d3584cbd213decc15b96128a928e0120dab01bf502d304fed2bf748852cd37c9df54c2ea0 SHA512 ca64d7be683614bdeb20a8865655fe80f911cf13c00aed2334db3a2e4131e1dd6fe5e9663a24e6f82161ad5aa53f1a2637cd21730eed46e4764b7eebced94f3f DIST libvirt-5.2.0.tar.xz 14992888 BLAKE2B d68aedb634a70063a116e112689f252d3fc2fe5369a4cdde8cacd392e806203bf277406bb10c751bae27f34f27a38355fde84573b6221fc4843393f9ae60ae5c SHA512 378dc1552263cce746117487abc0a1f3411e5be149331717158ba23825734ceae7ca474290264d71de798fdd089ad9672026bcb242fa5b3aef87294284d06f04 -EBUILD libvirt-4.9.0.ebuild 9673 BLAKE2B 3ba41380b45f9a4d2b0fdc3826a3af61004213e6acaa7ab0afd2644217bbd984245789e3aeefdb5efcdd77cf5a7389d5b68b13fbd025e8a6518fcba0bddb0611 SHA512 3888b75c3ce8a1049cd2fe14bde03885e5b260a85792f898baf47943546e5d788e281b4cd6163e5bb0336608583e6ea01f29841e4aa8e5689714be45c2747906 -EBUILD libvirt-5.0.0-r1.ebuild 9897 BLAKE2B 8e562642eefa5ee6a13dc1aeb1c2f6a84692633d0023e9735b1e3cc2aaa803ea68b56694225f04d145315f5587533e34a9009fe9875307db9d3123d5b086dcf1 SHA512 158d97f7e8465094f303b9cac0fe8b7ce09af8619c1e049695bbafd7ad745382646490a041e78baab92b8db0ba10298acbbf58d2890a6fafcb2902808085a387 -EBUILD libvirt-5.1.0-r1.ebuild 9903 BLAKE2B dc8dc7dbfd7ae46d3b449bbcc69a9739333e2714d0bf7f6a89b1c8a93b625ef1bd53ab7ffc5d1f0d5ef7a6a9619f7bc7e5625d9a41006c40e7d0a38023ba46c8 SHA512 70ca917fd8925bf81cd1383996ff704997c8ef13dba7dd7c4b7fba90c6a57255b55f0143f90f51305607a0d964c0216907e7121d92c6d8e88120b49643c20139 -EBUILD libvirt-5.2.0-r1.ebuild 9903 BLAKE2B bc6d1e56e6845e8f75d1aa6af160a45ddd1e3434f1ca2e2766a535ec96a3f76ec86f5058a5f13bd146b4b5a184dec2feb6fb333fbd246743b92abd23580020e9 SHA512 0b00e5ccb7841e20670c3e0eeb1077d265aeb383444519214614a3bf7a416209013eb0946f6804cb6b39542c8d687513037df6c4d5c99a2a59ccf8be4246be45 -EBUILD libvirt-5.2.0.ebuild 9903 BLAKE2B 4609c1ec8d3c51b940e200afb5ce9cfe8dcdf0676d2875f65fb8644de0db6c2cc0fb0c2c833241f0a0dc9cd11d2872c3bc14143cf7cc56639e0bca145db04fd1 SHA512 9f3e0e77bbc35be79f99cf9bafaa74d3e314022315ef9c51ddff4120363468f0f651e56fd659f4d9e0358c9d237626720da54a5dd094cebe402c7d0332faded8 -EBUILD libvirt-9999.ebuild 9903 BLAKE2B 4609c1ec8d3c51b940e200afb5ce9cfe8dcdf0676d2875f65fb8644de0db6c2cc0fb0c2c833241f0a0dc9cd11d2872c3bc14143cf7cc56639e0bca145db04fd1 SHA512 9f3e0e77bbc35be79f99cf9bafaa74d3e314022315ef9c51ddff4120363468f0f651e56fd659f4d9e0358c9d237626720da54a5dd094cebe402c7d0332faded8 +EBUILD libvirt-4.9.0.ebuild 9502 BLAKE2B 8ac78022b1fad4a0c6767554e0ca82854b886e2d3c6e4644bdd947e81f2df14fd54dd166b37054edcf115bdb8be61607a12189aed0376a7a68528702934a1f71 SHA512 a9c22d7651dd75fc3d6dd1caf00c429aa1c7104094a9ac199283da5c7c8108cef83f0a5f74b2215706ffcc10a62b1a9396d5faa9c0ebbe21745cbeed195f1cee +EBUILD libvirt-5.2.0-r2.ebuild 9778 BLAKE2B b41a73c55961e3380fc7fe02c70b769cd5fc3a6d65dc5a75510efb73eeb85864b53b39dd834085cc694ef58283c051a82e01fc439c4bf8e28bc9d4dda31e65d6 SHA512 6333650de0a08a5eda3f34db0f010e397b40461428468f68f6b1b8aa9cb5626e5d5c53da42fd5ee1f877a8bea6955661189f76c6d6142e245fdeff0598dc2ec5 +EBUILD libvirt-9999.ebuild 9732 BLAKE2B ce063a20315cdde7113a4af99ef50c8e00377968a337f34eae53e3f4aa065569cbb23e65e0cef97b140e01950b7896b4512ae985c974d1ae88d23b73ede26dbe SHA512 2ff9360b5c201dfeb776170207d68a88a4f7606d73f2b5a3cad96817c7690a2c6de73646fe9b26bb6f0d575a9ba91ff9661edac91ed572407aae01e0a114afe4 MISC metadata.xml 3857 BLAKE2B bc5dc60897ca70f3a586c947784dec74cf7daa35909836955dc52a442668b08323398473f9df8be46f2819e762638dcfcb646a8fb7ee768210f27584fb91e3f6 SHA512 33274100068f99fe0c69546e81fb47517818adf2991529533b9bacfc6bcb23ee08ae00b9d0a7a7ff47cb920d2ff1e24b5fc788a3533a89ff477ab04dad0194fc diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch b/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch new file mode 100644 index 000000000000..cd14d0d539ae --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch @@ -0,0 +1,36 @@ +From 538d873571d7a682852dc1d70e5f4478f4d64e85 Mon Sep 17 00:00:00 2001 +From: Jiri Denemark +Date: Fri, 5 Apr 2019 15:11:20 +0200 +Subject: [PATCH] cpu_map: Define md-clear CPUID bit +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 + +The bit is set when microcode provides the mechanism to invoke a flush +of various exploitable CPU buffers by invoking the VERW instruction. + +Signed-off-by: Paolo Bonzini +Signed-off-by: Jiri Denemark +Reviewed-by: Daniel P. Berrangé +--- + src/cpu_map/x86_features.xml | 3 +++ + +diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml +index efcc10b1ae..370807f88e 100644 +--- a/src/cpu_map/x86_features.xml ++++ b/src/cpu_map/x86_features.xml +@@ -320,6 +320,9 @@ + + + ++ ++ ++ + + + +-- +2.21.0 + diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r16 index be660e35a1d8..2a3fb52696ab 100644 --- a/app-emulation/libvirt/files/libvirtd.init-r16 +++ b/app-emulation/libvirt/files/libvirtd.init-r16 @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 description="Virtual Machine Management daemon (libvirt)" @@ -10,7 +10,7 @@ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} command="/usr/sbin/libvirtd" command_args="-d ${LIBVIRTD_OPTS}" start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab" -pidfile="/var/run/libvirtd.pid" +pidfile="/run/libvirtd.pid" retry="${LIBVIRTD_TERMTIMEOUT}" depend() { diff --git a/app-emulation/libvirt/files/libvirtd.init-r17 b/app-emulation/libvirt/files/libvirtd.init-r17 index ca3f872e14e0..0f89df82db46 100644 --- a/app-emulation/libvirt/files/libvirtd.init-r17 +++ b/app-emulation/libvirt/files/libvirtd.init-r17 @@ -10,7 +10,7 @@ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} command="/usr/sbin/libvirtd" command_args="-d ${LIBVIRTD_OPTS}" start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab" -pidfile="/var/run/libvirtd.pid" +pidfile="/run/libvirtd.pid" retry="${LIBVIRTD_TERMTIMEOUT}" depend() { diff --git a/app-emulation/libvirt/files/virtlockd.init-r1 b/app-emulation/libvirt/files/virtlockd.init-r1 index e7c3db2990e9..1e812d870c19 100644 --- a/app-emulation/libvirt/files/virtlockd.init-r1 +++ b/app-emulation/libvirt/files/virtlockd.init-r1 @@ -1,11 +1,11 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 description="libvirt virtual machine lock manager" command="/usr/sbin/virtlockd" command_args="-d" -pidfile="/var/run/virtlockd.pid" +pidfile="/run/virtlockd.pid" extra_started_commands="reload" description_reload="re-exec the daemon, while maintaining locks and clients" diff --git a/app-emulation/libvirt/files/virtlogd.init-r1 b/app-emulation/libvirt/files/virtlogd.init-r1 index 438070e344db..ff9c2446e8c3 100644 --- a/app-emulation/libvirt/files/virtlogd.init-r1 +++ b/app-emulation/libvirt/files/virtlogd.init-r1 @@ -1,11 +1,11 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 description="libvirt virtual machine logging manager" command="/usr/sbin/virtlogd" command_args="-d" -pidfile="/var/run/virtlogd.pid" +pidfile="/run/virtlogd.pid" extra_started_commands="reload" description_reload="re-exec the daemon, while maintaining open connections" diff --git a/app-emulation/libvirt/libvirt-4.9.0.ebuild b/app-emulation/libvirt/libvirt-4.9.0.ebuild index 608eaa29daec..1e923491c2bd 100644 --- a/app-emulation/libvirt/libvirt-4.9.0.ebuild +++ b/app-emulation/libvirt/libvirt-4.9.0.ebuild @@ -14,12 +14,7 @@ if [[ ${PV} = *9999* ]]; then KEYWORDS="amd64 x86" SLOT="0" else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi + SRC_URI="https://libvirt.org/sources/${P}.tar.xz" KEYWORDS="amd64 ~arm64 x86" SLOT="0/${PV}" fi diff --git a/app-emulation/libvirt/libvirt-5.0.0-r1.ebuild b/app-emulation/libvirt/libvirt-5.0.0-r1.ebuild deleted file mode 100644 index e97616855873..000000000000 --- a/app-emulation/libvirt/libvirt-5.0.0-r1.ebuild +++ /dev/null @@ -1,392 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user - -if [[ ${PV} = *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" - SRC_URI="" - KEYWORDS="" - SLOT="0" -else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi - KEYWORDS="~amd64 ~arm64 ~x86" - SLOT="0/${PV}" -fi - -DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" -LICENSE="LGPL-2.1" -IUSE=" - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi iscsi-direct - +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz parted pcap phyp - policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network - wireshark-plugins xen zeroconf zfs -" - -REQUIRED_USE=" - firewalld? ( virt-network ) - libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) - lxc? ( caps libvirtd ) - openvz? ( libvirtd ) - policykit? ( dbus ) - qemu? ( libvirtd ) - vepa? ( macvtap ) - virt-network? ( libvirtd ) - virtualbox? ( libvirtd ) - xen? ( libvirtd )" - -# 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/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/dmidecode - >=sys-apps/util-linux-2.17 - sys-devel/gettext - sys-libs/ncurses:0= - sys-libs/readline:= - apparmor? ( sys-libs/libapparmor ) - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap-ng ) - dbus? ( sys-apps/dbus ) - firewalld? ( net-firewall/firewalld ) - fuse? ( >=sys-fs/fuse-2.8.6:= ) - 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] - ) - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) - wireshark-plugins? ( net-analyzer/wireshark:= ) - xen? ( - >=app-emulation/xen-4.6.0 - app-emulation/xen-tools:= - ) - udev? ( - virtual/udev - >=x11-libs/libpciaccess-0.10.9 - ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) - zfs? ( sys-fs/zfs )" - -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - app-text/xhtml1 - dev-lang/perl - dev-libs/libxslt - dev-perl/XML-XPath - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/${PN}-5.0.0-do-not-use-sysconf.patch - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch - "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch -) - -pkg_setup() { - if use qemu; then - enewgroup qemu 77 - enewuser qemu 77 -1 -1 "qemu,kvm" - fi - - use policykit && enewgroup libvirt - - # 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 macvtap && CONFIG_CHECK+=" - ~MACVTAP" - - 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" - - default - - if [[ ${PV} = *9999* ]]; then - # Reinitialize submodules as this is required for gnulib's bootstrap - git submodule init - # 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 .gnulib | awk '{ print $1 }' - git hash-object bootstrap.conf - git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' - ) >.git-module-status - fi - - # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ - -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ - -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ - -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ - -i "${S}/libvirtd.init" || die "sed failed" - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_with apparmor) - $(use_with apparmor apparmor-profiles) - $(use_with audit) - $(use_with caps capng) - $(use_with dbus) - $(use_with firewalld) - $(use_with fuse) - $(use_with glusterfs) - $(use_with glusterfs storage-gluster) - $(use_with iscsi storage-iscsi) - $(use_with iscsi-direct storage-iscsi-direct) - $(use_with libvirtd) - $(use_with libssh) - $(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 udev) - $(use_with vepa virtualport) - $(use_with virt-network network) - $(use_with wireshark-plugins wireshark-dissector) - $(use_with xen libxl) - $(use_with zeroconf avahi) - $(use_with zfs storage-zfs) - - --without-hal - --without-netcf - --without-sanlock - - --with-esx - --with-init-script=systemd - --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 - - --with-html-subdir=${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 - - econf "${myeconfargs[@]}" - - if [[ ${PV} = *9999* ]]; then - # Restore gnulib's config.sub and config.guess - # bug #377279 - (cd .gnulib && git reset --hard > /dev/null) - fi -} - -src_test() { - cd "${BUILD_DIR}" - - # remove problematic tests, bug #591416, bug #591418 - sed -i -e 's#commandtest$(EXEEXT) # #' \ - -e 's#virfirewalltest$(EXEEXT) # #' \ - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ - tests/Makefile - - export VIR_TEST_DEBUG=1 - HOME="${T}" emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" \ - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install - - 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 - - use libvirtd || return 0 - # From here, only libvirtd-related instructions, be warned! - - 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-r3" libvirt-guests || die - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die - - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die - - newbashcomp "${S}/tools/bash-completion/vsh" vsh - bashcomp_alias vsh virsh virt-admin - - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") - 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! - - readme.gentoo_print_elog -} diff --git a/app-emulation/libvirt/libvirt-5.1.0-r1.ebuild b/app-emulation/libvirt/libvirt-5.1.0-r1.ebuild deleted file mode 100644 index b455f92f276d..000000000000 --- a/app-emulation/libvirt/libvirt-5.1.0-r1.ebuild +++ /dev/null @@ -1,392 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user - -if [[ ${PV} = *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" - SRC_URI="" - KEYWORDS="" - SLOT="0" -else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi - KEYWORDS="~amd64 ~arm64 ~x86" - SLOT="0/${PV}" -fi - -DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" -LICENSE="LGPL-2.1" -IUSE=" - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi iscsi-direct - +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz parted pcap phyp - policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network - wireshark-plugins xen zeroconf zfs -" - -REQUIRED_USE=" - firewalld? ( virt-network ) - libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) - lxc? ( caps libvirtd ) - openvz? ( libvirtd ) - policykit? ( dbus ) - qemu? ( libvirtd ) - vepa? ( macvtap ) - virt-network? ( libvirtd ) - virtualbox? ( libvirtd ) - xen? ( libvirtd )" - -# 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/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/dmidecode - >=sys-apps/util-linux-2.17 - sys-devel/gettext - sys-libs/ncurses:0= - sys-libs/readline:= - apparmor? ( sys-libs/libapparmor ) - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap-ng ) - dbus? ( sys-apps/dbus ) - firewalld? ( >=net-firewall/firewalld-0.6.3 ) - fuse? ( >=sys-fs/fuse-2.8.6:= ) - 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] - ) - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) - wireshark-plugins? ( net-analyzer/wireshark:= ) - xen? ( - >=app-emulation/xen-4.6.0 - app-emulation/xen-tools:= - ) - udev? ( - virtual/udev - >=x11-libs/libpciaccess-0.10.9 - ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) - zfs? ( sys-fs/zfs )" - -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - app-text/xhtml1 - dev-lang/perl - dev-libs/libxslt - dev-perl/XML-XPath - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/${PN}-5.1.0-do-not-use-sysconf.patch - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch - "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch -) - -pkg_setup() { - if use qemu; then - enewgroup qemu 77 - enewuser qemu 77 -1 -1 "qemu,kvm" - fi - - use policykit && enewgroup libvirt - - # 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 macvtap && CONFIG_CHECK+=" - ~MACVTAP" - - 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" - - default - - if [[ ${PV} = *9999* ]]; then - # Reinitialize submodules as this is required for gnulib's bootstrap - git submodule init - # 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 .gnulib | awk '{ print $1 }' - git hash-object bootstrap.conf - git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' - ) >.git-module-status - fi - - # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ - -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ - -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ - -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ - -i "${S}/libvirtd.init" || die "sed failed" - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_with apparmor) - $(use_with apparmor apparmor-profiles) - $(use_with audit) - $(use_with caps capng) - $(use_with dbus) - $(use_with firewalld) - $(use_with fuse) - $(use_with glusterfs) - $(use_with glusterfs storage-gluster) - $(use_with iscsi storage-iscsi) - $(use_with iscsi-direct storage-iscsi-direct) - $(use_with libvirtd) - $(use_with libssh) - $(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 udev) - $(use_with vepa virtualport) - $(use_with virt-network network) - $(use_with wireshark-plugins wireshark-dissector) - $(use_with xen libxl) - $(use_with zeroconf avahi) - $(use_with zfs storage-zfs) - - --without-hal - --without-netcf - --without-sanlock - - --with-esx - --with-init-script=systemd - --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 - - --with-html-subdir=${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 - - econf "${myeconfargs[@]}" - - if [[ ${PV} = *9999* ]]; then - # Restore gnulib's config.sub and config.guess - # bug #377279 - (cd .gnulib && git reset --hard > /dev/null) - fi -} - -src_test() { - cd "${BUILD_DIR}" - - # remove problematic tests, bug #591416, bug #591418 - sed -i -e 's#commandtest$(EXEEXT) # #' \ - -e 's#virfirewalltest$(EXEEXT) # #' \ - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ - tests/Makefile - - export VIR_TEST_DEBUG=1 - HOME="${T}" emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" \ - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install - - 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 - - use libvirtd || return 0 - # From here, only libvirtd-related instructions, be warned! - - 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-r3" libvirt-guests || die - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die - - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die - - newbashcomp "${S}/tools/bash-completion/vsh" virsh - bashcomp_alias virsh virt-admin - - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") - 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! - - readme.gentoo_print_elog -} diff --git a/app-emulation/libvirt/libvirt-5.2.0-r1.ebuild b/app-emulation/libvirt/libvirt-5.2.0-r1.ebuild deleted file mode 100644 index 78ac8a38d3dc..000000000000 --- a/app-emulation/libvirt/libvirt-5.2.0-r1.ebuild +++ /dev/null @@ -1,392 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user - -if [[ ${PV} = *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" - SRC_URI="" - KEYWORDS="" - SLOT="0" -else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi - KEYWORDS="~amd64 ~arm64 ~x86" - SLOT="0/${PV}" -fi - -DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" -LICENSE="LGPL-2.1" -IUSE=" - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi iscsi-direct - +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz parted pcap phyp - policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network - wireshark-plugins xen zeroconf zfs -" - -REQUIRED_USE=" - firewalld? ( virt-network ) - libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) - lxc? ( caps libvirtd ) - openvz? ( libvirtd ) - policykit? ( dbus ) - qemu? ( libvirtd ) - vepa? ( macvtap ) - virt-network? ( libvirtd ) - virtualbox? ( libvirtd ) - xen? ( libvirtd )" - -# 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/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/dmidecode - >=sys-apps/util-linux-2.17 - sys-devel/gettext - sys-libs/ncurses:0= - sys-libs/readline:= - apparmor? ( sys-libs/libapparmor ) - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap-ng ) - dbus? ( sys-apps/dbus ) - firewalld? ( >=net-firewall/firewalld-0.6.3 ) - fuse? ( >=sys-fs/fuse-2.8.6:= ) - 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] - ) - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) - wireshark-plugins? ( net-analyzer/wireshark:= ) - xen? ( - >=app-emulation/xen-4.6.0 - app-emulation/xen-tools:= - ) - udev? ( - virtual/udev - >=x11-libs/libpciaccess-0.10.9 - ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) - zfs? ( sys-fs/zfs )" - -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - app-text/xhtml1 - dev-lang/perl - dev-libs/libxslt - dev-perl/XML-XPath - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/${PN}-5.2.0-do-not-use-sysconf.patch - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch - "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch -) - -pkg_setup() { - if use qemu; then - enewgroup qemu 77 - enewuser qemu 77 -1 -1 "qemu,kvm" - fi - - use policykit && enewgroup libvirt - - # 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 macvtap && CONFIG_CHECK+=" - ~MACVTAP" - - 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" - - default - - if [[ ${PV} = *9999* ]]; then - # Reinitialize submodules as this is required for gnulib's bootstrap - git submodule init - # 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 .gnulib | awk '{ print $1 }' - git hash-object bootstrap.conf - git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' - ) >.git-module-status - fi - - # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r17" "${S}/libvirtd.init" || die - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ - -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ - -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ - -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ - -i "${S}/libvirtd.init" || die "sed failed" - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_with apparmor) - $(use_with apparmor apparmor-profiles) - $(use_with audit) - $(use_with caps capng) - $(use_with dbus) - $(use_with firewalld) - $(use_with fuse) - $(use_with glusterfs) - $(use_with glusterfs storage-gluster) - $(use_with iscsi storage-iscsi) - $(use_with iscsi-direct storage-iscsi-direct) - $(use_with libvirtd) - $(use_with libssh) - $(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 udev) - $(use_with vepa virtualport) - $(use_with virt-network network) - $(use_with wireshark-plugins wireshark-dissector) - $(use_with xen libxl) - $(use_with zeroconf avahi) - $(use_with zfs storage-zfs) - - --without-hal - --without-netcf - --without-sanlock - - --with-esx - --with-init-script=systemd - --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 - - --with-html-subdir=${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 - - econf "${myeconfargs[@]}" - - if [[ ${PV} = *9999* ]]; then - # Restore gnulib's config.sub and config.guess - # bug #377279 - (cd .gnulib && git reset --hard > /dev/null) - fi -} - -src_test() { - cd "${BUILD_DIR}" - - # remove problematic tests, bug #591416, bug #591418 - sed -i -e 's#commandtest$(EXEEXT) # #' \ - -e 's#virfirewalltest$(EXEEXT) # #' \ - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ - tests/Makefile - - export VIR_TEST_DEBUG=1 - HOME="${T}" emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" \ - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install - - 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 - - use libvirtd || return 0 - # From here, only libvirtd-related instructions, be warned! - - 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-r3" libvirt-guests || die - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die - - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die - - newbashcomp "${S}/tools/bash-completion/vsh" virsh - bashcomp_alias virsh virt-admin - - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") - 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! - - readme.gentoo_print_elog -} diff --git a/app-emulation/libvirt/libvirt-5.2.0-r2.ebuild b/app-emulation/libvirt/libvirt-5.2.0-r2.ebuild new file mode 100644 index 000000000000..c43ba47b2591 --- /dev/null +++ b/app-emulation/libvirt/libvirt-5.2.0-r2.ebuild @@ -0,0 +1,388 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" + SRC_URI="" + KEYWORDS="amd64" + SLOT="0" +else + SRC_URI="https://libvirt.org/sources/${P}.tar.xz" + KEYWORDS="amd64 ~arm64 ~x86" + SLOT="0/${PV}" +fi + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="http://www.libvirt.org/" +LICENSE="LGPL-2.1" +IUSE=" + apparmor audit +caps +dbus firewalld fuse glusterfs iscsi iscsi-direct + +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz parted pcap phyp + policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network + wireshark-plugins xen zeroconf zfs +" + +REQUIRED_USE=" + firewalld? ( virt-network ) + libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) + lxc? ( caps libvirtd ) + openvz? ( libvirtd ) + policykit? ( dbus ) + qemu? ( libvirtd ) + vepa? ( macvtap ) + virt-network? ( libvirtd ) + virtualbox? ( libvirtd ) + xen? ( libvirtd )" + +# 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/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/dmidecode + >=sys-apps/util-linux-2.17 + sys-devel/gettext + sys-libs/ncurses:0= + sys-libs/readline:= + apparmor? ( sys-libs/libapparmor ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap-ng ) + dbus? ( sys-apps/dbus ) + firewalld? ( >=net-firewall/firewalld-0.6.3 ) + fuse? ( >=sys-fs/fuse-2.8.6:= ) + 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] + ) + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) + wireshark-plugins? ( net-analyzer/wireshark:= ) + xen? ( + >=app-emulation/xen-4.6.0 + app-emulation/xen-tools:= + ) + udev? ( + virtual/udev + >=x11-libs/libpciaccess-0.10.9 + ) + zeroconf? ( >=net-dns/avahi-0.6[dbus] ) + zfs? ( sys-fs/zfs )" + +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + app-text/xhtml1 + dev-lang/perl + dev-libs/libxslt + dev-perl/XML-XPath + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-do-not-use-sysconf.patch + "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch + "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch + "${FILESDIR}"/${PN}-5.2.0-md-clear.patch +) + +pkg_setup() { + if use qemu; then + enewgroup qemu 77 + enewuser qemu 77 -1 -1 "qemu,kvm" + fi + + use policykit && enewgroup libvirt + + # 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 macvtap && CONFIG_CHECK+=" + ~MACVTAP" + + 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" + + default + + if [[ ${PV} = *9999* ]]; then + # Reinitialize submodules as this is required for gnulib's bootstrap + git submodule init + # 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 .gnulib | awk '{ print $1 }' + git hash-object bootstrap.conf + git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' + ) >.git-module-status + fi + + # Tweak the init script: + cp "${FILESDIR}/libvirtd.init-r17" "${S}/libvirtd.init" || die + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ + -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ + -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ + -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ + -i "${S}/libvirtd.init" || die "sed failed" + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_with apparmor) + $(use_with apparmor apparmor-profiles) + $(use_with audit) + $(use_with caps capng) + $(use_with dbus) + $(use_with firewalld) + $(use_with fuse) + $(use_with glusterfs) + $(use_with glusterfs storage-gluster) + $(use_with iscsi storage-iscsi) + $(use_with iscsi-direct storage-iscsi-direct) + $(use_with libvirtd) + $(use_with libssh) + $(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 udev) + $(use_with vepa virtualport) + $(use_with virt-network network) + $(use_with wireshark-plugins wireshark-dissector) + $(use_with xen libxl) + $(use_with zeroconf avahi) + $(use_with zfs storage-zfs) + + --without-hal + --without-netcf + --without-sanlock + + --with-esx + --with-init-script=systemd + --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 + + --with-html-subdir=${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 + + econf "${myeconfargs[@]}" + + if [[ ${PV} = *9999* ]]; then + # Restore gnulib's config.sub and config.guess + # bug #377279 + (cd .gnulib && git reset --hard > /dev/null) + fi +} + +src_test() { + cd "${BUILD_DIR}" + + # remove problematic tests, bug #591416, bug #591418 + sed -i -e 's#commandtest$(EXEEXT) # #' \ + -e 's#virfirewalltest$(EXEEXT) # #' \ + -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ + -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ + tests/Makefile + + export VIR_TEST_DEBUG=1 + HOME="${T}" emake check || die "tests failed" +} + +src_install() { + emake DESTDIR="${D}" \ + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install + + 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 + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + 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-r3" libvirt-guests || die + newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die + newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die + + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die + + newbashcomp "${S}/tools/bash-completion/vsh" virsh + bashcomp_alias virsh virt-admin + + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") + 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! + + readme.gentoo_print_elog +} diff --git a/app-emulation/libvirt/libvirt-5.2.0.ebuild b/app-emulation/libvirt/libvirt-5.2.0.ebuild deleted file mode 100644 index b6a78ebc5061..000000000000 --- a/app-emulation/libvirt/libvirt-5.2.0.ebuild +++ /dev/null @@ -1,392 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user - -if [[ ${PV} = *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" - SRC_URI="" - KEYWORDS="" - SLOT="0" -else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi - KEYWORDS="~amd64 ~arm64 ~x86" - SLOT="0/${PV}" -fi - -DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" -LICENSE="LGPL-2.1" -IUSE=" - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi iscsi-direct - +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz parted pcap phyp - policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network - wireshark-plugins xen zeroconf zfs -" - -REQUIRED_USE=" - firewalld? ( virt-network ) - libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) - lxc? ( caps libvirtd ) - openvz? ( libvirtd ) - policykit? ( dbus ) - qemu? ( libvirtd ) - vepa? ( macvtap ) - virt-network? ( libvirtd ) - virtualbox? ( libvirtd ) - xen? ( libvirtd )" - -# 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/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/dmidecode - >=sys-apps/util-linux-2.17 - sys-devel/gettext - sys-libs/ncurses:0= - sys-libs/readline:= - apparmor? ( sys-libs/libapparmor ) - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap-ng ) - dbus? ( sys-apps/dbus ) - firewalld? ( >=net-firewall/firewalld-0.6.3 ) - fuse? ( >=sys-fs/fuse-2.8.6:= ) - 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] - ) - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) - wireshark-plugins? ( net-analyzer/wireshark:= ) - xen? ( - >=app-emulation/xen-4.6.0 - app-emulation/xen-tools:= - ) - udev? ( - virtual/udev - >=x11-libs/libpciaccess-0.10.9 - ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) - zfs? ( sys-fs/zfs )" - -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - app-text/xhtml1 - dev-lang/perl - dev-libs/libxslt - dev-perl/XML-XPath - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/${PN}-5.2.0-do-not-use-sysconf.patch - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch - "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch -) - -pkg_setup() { - if use qemu; then - enewgroup qemu 77 - enewuser qemu 77 -1 -1 "qemu,kvm" - fi - - use policykit && enewgroup libvirt - - # 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 macvtap && CONFIG_CHECK+=" - ~MACVTAP" - - 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" - - default - - if [[ ${PV} = *9999* ]]; then - # Reinitialize submodules as this is required for gnulib's bootstrap - git submodule init - # 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 .gnulib | awk '{ print $1 }' - git hash-object bootstrap.conf - git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' - ) >.git-module-status - fi - - # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ - -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ - -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ - -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ - -i "${S}/libvirtd.init" || die "sed failed" - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_with apparmor) - $(use_with apparmor apparmor-profiles) - $(use_with audit) - $(use_with caps capng) - $(use_with dbus) - $(use_with firewalld) - $(use_with fuse) - $(use_with glusterfs) - $(use_with glusterfs storage-gluster) - $(use_with iscsi storage-iscsi) - $(use_with iscsi-direct storage-iscsi-direct) - $(use_with libvirtd) - $(use_with libssh) - $(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 udev) - $(use_with vepa virtualport) - $(use_with virt-network network) - $(use_with wireshark-plugins wireshark-dissector) - $(use_with xen libxl) - $(use_with zeroconf avahi) - $(use_with zfs storage-zfs) - - --without-hal - --without-netcf - --without-sanlock - - --with-esx - --with-init-script=systemd - --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 - - --with-html-subdir=${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 - - econf "${myeconfargs[@]}" - - if [[ ${PV} = *9999* ]]; then - # Restore gnulib's config.sub and config.guess - # bug #377279 - (cd .gnulib && git reset --hard > /dev/null) - fi -} - -src_test() { - cd "${BUILD_DIR}" - - # remove problematic tests, bug #591416, bug #591418 - sed -i -e 's#commandtest$(EXEEXT) # #' \ - -e 's#virfirewalltest$(EXEEXT) # #' \ - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ - tests/Makefile - - export VIR_TEST_DEBUG=1 - HOME="${T}" emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" \ - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install - - 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 - - use libvirtd || return 0 - # From here, only libvirtd-related instructions, be warned! - - 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-r3" libvirt-guests || die - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die - - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die - - newbashcomp "${S}/tools/bash-completion/vsh" virsh - bashcomp_alias virsh virt-admin - - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") - 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! - - readme.gentoo_print_elog -} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index b6a78ebc5061..4c2cd8eebffb 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -14,12 +14,7 @@ if [[ ${PV} = *9999* ]]; then KEYWORDS="" SLOT="0" else - # Versions with 4 numbers are stable updates: - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then - SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz" - else - SRC_URI="https://libvirt.org/sources/${P}.tar.xz" - fi + SRC_URI="https://libvirt.org/sources/${P}.tar.xz" KEYWORDS="~amd64 ~arm64 ~x86" SLOT="0/${PV}" fi -- cgit v1.2.3