summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
commit51af5f0eb4cddbe6aa7953717873691d77aae9ff (patch)
tree1541525274162b033ebbc3ed38abaf335fbbd49a /app-emulation/libvirt
parent7014a5a3ea0feffab9701fdd6b64cc7667a985af (diff)
gentoo resync : 11.07.2019
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/Manifest19
-rw-r--r--app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch77
-rw-r--r--app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch216
-rw-r--r--app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch10
-rw-r--r--app-emulation/libvirt/files/libvirt-5.2.0-fix-paths-for-apparmor.patch116
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init-r4237
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r18 (renamed from app-emulation/libvirt/files/libvirtd.init-r16)13
-rw-r--r--app-emulation/libvirt/libvirt-5.2.0-r3.ebuild (renamed from app-emulation/libvirt/libvirt-4.9.0.ebuild)41
-rw-r--r--app-emulation/libvirt/libvirt-5.4.0-r1.ebuild388
-rw-r--r--app-emulation/libvirt/libvirt-5.5.0-r1.ebuild383
-rw-r--r--app-emulation/libvirt/libvirt-9999.ebuild22
-rw-r--r--app-emulation/libvirt/metadata.xml4
12 files changed, 1184 insertions, 342 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 0e969e282d42..24be4dfc1801 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -1,22 +1,25 @@
AUX README.gentoo-r2 2094 BLAKE2B ccfad63217f7778e97d8de49e20002dffefff32562f560b23c777c5f2f20407493b4288fc67516c7b45cf2c1868340673c7ba92ea1774a22d59524c6a626b59a SHA512 595ede7bb574c7f244a15e430b70f828bc4574b409d4cc37261bf38bfb30cdb31edb6091ff63f6517b281cc11a34eee960ea0330a6ea285dd48fe2288dd67196
AUX libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch 641 BLAKE2B e796f4e32f00e8970eabf723520601b26c7fa5f7579d538299538632ba036dafbb2dc64ad40d10152c0637043b2a649e1dc08468d1f250e00ee0af095d94a093 SHA512 df9960b80c7dda852e38d992ab31181d79091bd6e1ba88c0b0c1af8a2f2d1445ee95c957df38ab27b452cd2de01d36b88164e665a867ad69c15ca15c18b1d588
-AUX libvirt-3.10.0-r2-fix_paths_for_apparmor.patch 2730 BLAKE2B ae92a37cdfb929862bd58d1cd208e3f8a3aab10dae98ec8e51d6c3ab579295e3f59ff091970499c6c57b625edec77b98421502df625b1d10c1c3d0be3dfbe489 SHA512 751b971fd0f109f3a4147feea8481adb9c868313ea57d293a89ee548661514f124318324823d9380839a7a5c8ae7c1e3ae8c4c6e62027587f163c8856e353a6a
-AUX libvirt-4.5.0-do_not_use_sysconf.patch 7417 BLAKE2B b1e6471a7b6a923a3ca4b630df3ddf31994d3492837e842fd0eb43f79757f2a39652345711719fd2b189116d533472d4e4298520b81838706264d371537d6947 SHA512 1362feb1d2ff3dbb1d5550152453c2fe7fbc4645356a866195601eb17a280af0106753d873285b307267b2c941c18d8db2b5a24d7916a49dfd6af3515217bfcc
-AUX libvirt-5.0.0-fix-paths-for-apparmor.patch 4274 BLAKE2B 886fd5bdf37e672e761bde9bc5b3e4902b174019bb8efda127f7a08cb6752b67745c10a3e3953063c746380bcf8243807fd6e9a154f48b7bd02c61e85e90325e SHA512 efe4c4c940d720c467f44f405ac4ca4d3867dee0a7e2fa2a7a4fbc263198089098c48d1207c30123b6a55f6ec6bee04f3edd3f23724af46bcb1343f87ca94de6
+AUX libvirt-5.0.0-fix-paths-for-apparmor.patch 4372 BLAKE2B ac8c78097b8125932fd89756ca7332665e2080afc5de37e0a31d6f2a84e15f21e01d41b39c7781c26cf514c74a215623c0013e67cffe7543892d5b13d3022642 SHA512 391e78a2ea113c38afb07b9f0c7638748e5bc04fb88ea96be7ff439624c429ff0106024674546b01e750d8b1e1418d13040bc8462653eb8567651378b66d53a5
AUX libvirt-5.2.0-do-not-use-sysconf.patch 5969 BLAKE2B 965e53b33424b5e62107574bc457ee886c799b247179200cf671485dff331db3e2c453e55b3a38b34a205ba3663ddf2e4fe0ce336f9c262fa886192368ada3f0 SHA512 a1683ca986d006bcce8388d3ee5e8daf699f92c6dac9714a4cce1fdd8ea3a4f745b231e0576bed08eece04acf96872257a8e2890b0a3acefb5cf2657f3223792
+AUX libvirt-5.2.0-fix-paths-for-apparmor.patch 4372 BLAKE2B ac8c78097b8125932fd89756ca7332665e2080afc5de37e0a31d6f2a84e15f21e01d41b39c7781c26cf514c74a215623c0013e67cffe7543892d5b13d3022642 SHA512 391e78a2ea113c38afb07b9f0c7638748e5bc04fb88ea96be7ff439624c429ff0106024674546b01e750d8b1e1418d13040bc8462653eb8567651378b66d53a5
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 libvirt-guests.init-r4 5591 BLAKE2B e745692a7ea706c8367cdb7ee2114565770bda5be5675ba3a541555659d17875f7996ff7028bf415224d095b49b71205a3d77f420464d5579ccc189def5e434d SHA512 ec2bc46d72afa61513983b777e2d49da618a35a4687bc75674b3a49ababd4e2e387661010d342fee86c7a73d259644985a263a6c2976e29a436d88921bb040b0
AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91
-AUX libvirtd.init-r16 1086 BLAKE2B 088a3e10a63826ecdd24cb811f4e88ddb2b4f649b9e1eca5eece383003760f3df1ece826416e7920fdb4cc9c6171a56ebc1509851d71048fedaf5755072b27ef SHA512 1065a5bad666a8e0a44e4c0629b3a9087322c2d934bf217d8b0b66d8fe1179e5d9661cc2f9491c0badd7874a25c772c78a3420474dfb51b9e363c489c14baf32
AUX libvirtd.init-r17 1149 BLAKE2B e461c82c9516ca8b0011d053e775dfa3a3f8cf674ad2cc05f054aa270671a81d7f60ee12589613699489c378db0ab9c9f17c0564cc7839ac9636595d52ab0f7b SHA512 860cc1f1e607d164f2667bac5a6dae37d9e342d83b03eb8f59fd703081c23e1b86524ffe19cb2ca10ca5c4bbdcca022be6705343cfbad80f619d1050bbd194ce
+AUX libvirtd.init-r18 1114 BLAKE2B a934bcacb8d3c041e9bd4f287bc137975b4ef73111e7012f5ebc6cc84250a7ac8f4388d2c0bff79a4254f2639623879d83d97d72f0d51101a05165b6bb9af522 SHA512 2f43d33b6eee2a571269c1a20cfbf0ce6a189522ca4b22826b6140991b4657869afca7800dab145a18583c39f101054a8d6258ca0a58a578dc65d16c7a993636
AUX libvirtd.service.conf 401 BLAKE2B edd74238f9639ead1d776142e6231d87f39cb6670e72cec9c1ac44f58fcfbc63e72944d2d243a1aabe48b9acc6bb1c52189161a79e3d42603c87a270027c42f8 SHA512 27adbd104ea87e51d423b057392a0c6726692ad8ee9723f73dc4bfe8eb54069725d64883434424ba810d36992d404d1ba4afe6bcefb866d3d3d92dfd161c2b32
AUX libvirtd.tmpfiles.conf 36 BLAKE2B fa0e1dac4117dcb2a2e826c82c4c63e20156db47abf4088167484f1f3149a4998840cf1aba745621851d7e2653df5c7f7268d8d61be3a3731ea053a88f35c13b SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed
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.2.0.tar.xz 14992888 BLAKE2B d68aedb634a70063a116e112689f252d3fc2fe5369a4cdde8cacd392e806203bf277406bb10c751bae27f34f27a38355fde84573b6221fc4843393f9ae60ae5c SHA512 378dc1552263cce746117487abc0a1f3411e5be149331717158ba23825734ceae7ca474290264d71de798fdd089ad9672026bcb242fa5b3aef87294284d06f04
-EBUILD libvirt-4.9.0.ebuild 9502 BLAKE2B 8ac78022b1fad4a0c6767554e0ca82854b886e2d3c6e4644bdd947e81f2df14fd54dd166b37054edcf115bdb8be61607a12189aed0376a7a68528702934a1f71 SHA512 a9c22d7651dd75fc3d6dd1caf00c429aa1c7104094a9ac199283da5c7c8108cef83f0a5f74b2215706ffcc10a62b1a9396d5faa9c0ebbe21745cbeed195f1cee
+DIST libvirt-5.4.0.tar.xz 12346896 BLAKE2B 28efa8ddc1b3262cf195bb114d3fad8307e7b4b4578a8dca05c03e36c85c7bffb4a4f6c73f89d156fc5b046f8ff7f27950dc5cadfd944e9f3c1b854ad03f328c SHA512 03fa932d041d147cab79eab200bb33f8db72579be72ec7cbff3305f4a8d574835a80f1b99936eddf67f83d21cc5567f45c86e555209de6cd702f43f91197cfd0
+DIST libvirt-5.5.0.tar.xz 12930224 BLAKE2B 4add0b727e4754bd1b2b4e9020942b17872533737e496ddf7976bf86a0fd3bcfbebd83387a8f3bab8dcc9afb05755b245e55682ed17d6094085d3dc96d94eefe SHA512 47923aaca605fb43a53238ac535abc1f88f73435336b8f3e88cb01df277ed205d99c586991e523aa32b50c832a0a7c949ab5f84dc78eb8d18a4951cfc791448d
EBUILD libvirt-5.2.0-r2.ebuild 9781 BLAKE2B 0765e5f6de150cb2fbd9366c4178785219a869bb2f48f212e216cfdefb79a84465302d5a3a5ae7b9825d046cdc70a72c808d0b9914cd2458632332b0919e532d SHA512 b8345ace2a7828bb0e29e64e21edd6618ea96c3faa350209a8ebb37dc0093103c0e8d598a40cc9327a0c8714fea257fea1a5fd2442882ee4fef51744ed3a94ac
-EBUILD libvirt-9999.ebuild 9732 BLAKE2B ce063a20315cdde7113a4af99ef50c8e00377968a337f34eae53e3f4aa065569cbb23e65e0cef97b140e01950b7896b4512ae985c974d1ae88d23b73ede26dbe SHA512 2ff9360b5c201dfeb776170207d68a88a4f7606d73f2b5a3cad96817c7690a2c6de73646fe9b26bb6f0d575a9ba91ff9661edac91ed572407aae01e0a114afe4
-MISC metadata.xml 3857 BLAKE2B bc5dc60897ca70f3a586c947784dec74cf7daa35909836955dc52a442668b08323398473f9df8be46f2819e762638dcfcb646a8fb7ee768210f27584fb91e3f6 SHA512 33274100068f99fe0c69546e81fb47517818adf2991529533b9bacfc6bcb23ee08ae00b9d0a7a7ff47cb920d2ff1e24b5fc788a3533a89ff477ab04dad0194fc
+EBUILD libvirt-5.2.0-r3.ebuild 9774 BLAKE2B 099ab0dc39f879dc43d94eb82b093d1d41278b3781024dc1e9460adba80aaf444dbabee8b8f786dbb5ff584a6dd82c6d0ca8d775558e10084c70c2b45c6d4a81 SHA512 7900b0475f7efd1d333d5374d95af90ad8815ef29af93cbf0413b28193a877421e1f5be4b8adb3fdfd2485903d576590a59eddf31f829317844ec24ce54a6882
+EBUILD libvirt-5.4.0-r1.ebuild 9760 BLAKE2B 5763c8387ce0e146db256dd188c48d53f66798e7db48242000337c02b57956e43d8e48fedca3dca67cd0075f8b480b846a95be7146ea97fb2752b03b70341b82 SHA512 5158436ddebbb408d7bb654824cc23345f2e61db162ce1111703909916cd397d78ca3f559dc116dfc3230bb77ae6952b130cbd8966c3bd62c61651830d93bd3b
+EBUILD libvirt-5.5.0-r1.ebuild 9507 BLAKE2B 60e4418bc396243692528015ffbb0a17b0056cc64894e276c467f54f199f9c4beb9a8b6b0315253766dfa7f8fc3faa684ab7d83109ac001a55d62751e04e9443 SHA512 b8f2e594168c69f2bd5dff93680ffdccfb33b5e1803e3a6bcf126dff36630be99c93b3e023b6d2d5777591b28283cf62ae48ae2d12147aa2689c9bb3c41730e5
+EBUILD libvirt-9999.ebuild 9507 BLAKE2B 60e4418bc396243692528015ffbb0a17b0056cc64894e276c467f54f199f9c4beb9a8b6b0315253766dfa7f8fc3faa684ab7d83109ac001a55d62751e04e9443 SHA512 b8f2e594168c69f2bd5dff93680ffdccfb33b5e1803e3a6bcf126dff36630be99c93b3e023b6d2d5777591b28283cf62ae48ae2d12147aa2689c9bb3c41730e5
+MISC metadata.xml 3858 BLAKE2B 7f1d686cbc66544ff5ab20db52cd8a77ebb92adb0c4d01c44012c720da2c3de8aa8a2ba0f125ab90e5994f7264a3cea619cb2eb6e56338645f1ba5debd9c4585 SHA512 e97d6beba9f2f6beed28c50d06b34508a841b3e916ebfd535350e2f0c22fed40098891b4d23f041f5935ca51f671f02d3488d9d0c675e2c98640a03ae30ddf88
diff --git a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
deleted file mode 100644
index f1360ae4e4e9..000000000000
--- a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index ef2f79db3..d8cdb9b3f 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -23,7 +23,7 @@ EXTRA_DIST = \
- apparmor/TEMPLATE.lxc \
- apparmor/libvirt-qemu \
- apparmor/libvirt-lxc \
-- apparmor/usr.lib.libvirt.virt-aa-helper \
-+ apparmor/usr.libexec.virt-aa-helper \
- apparmor/usr.sbin.libvirtd \
- lxcconvert/virt-lxc-convert \
- polkit/libvirt-acl.rules \
-@@ -70,7 +70,7 @@ admin_logging_SOURCES = admin/logging.c
- if WITH_APPARMOR_PROFILES
- apparmordir = $(sysconfdir)/apparmor.d/
- apparmor_DATA = \
-- apparmor/usr.lib.libvirt.virt-aa-helper \
-+ apparmor/usr.libexec.virt-aa-helper \
- apparmor/usr.sbin.libvirtd \
- $(NULL)
-
-diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
-index d4fad85a1..0b22009e5 100644
---- a/examples/apparmor/libvirt-qemu
-+++ b/examples/apparmor/libvirt-qemu
-@@ -86,6 +86,8 @@
- /usr/share/AAVMF/** r,
- /usr/share/qemu-efi/** r,
- /usr/share/slof/** r,
-+ /usr/share/seavgabios/** r,
-+ /usr/share/edk2-ovmf/** r,
-
- # access PKI infrastructure
- /etc/pki/libvirt-vnc/** r,
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-similarity index 92%
-rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
-rename to examples/apparmor/usr.libexec.virt-aa-helper
-index bd6181d00..4086f140a 100644
---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/examples/apparmor/usr.libexec.virt-aa-helper
-@@ -1,7 +1,7 @@
- # Last Modified: Mon Apr 5 15:10:27 2010
- #include <tunables/global>
-
--profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-+profile virt-aa-helper /usr/libexec/virt-aa-helper {
- #include <abstractions/base>
-
- # needed for searching directories
-@@ -32,7 +32,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- deny /dev/mapper/ r,
- deny /dev/mapper/* r,
-
-- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
-+ /usr/libexec/virt-aa-helper mr,
- /{usr/,}sbin/apparmor_parser Ux,
-
- /etc/apparmor.d/libvirt/* r,
-diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
-index 8d61d154e..656a5595b 100644
---- a/examples/apparmor/usr.sbin.libvirtd
-+++ b/examples/apparmor/usr.sbin.libvirtd
-@@ -84,8 +84,10 @@
- audit deny /sys/kernel/security/apparmor/.* rwxl,
- /sys/kernel/security/apparmor/profiles r,
- /usr/{lib,lib64}/libvirt/* PUxr,
-- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
-- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
-+ /usr/libexec/virt-aa-helper PUxr,
-+ /usr/libexec/libvirt_lxc PUxr,
-+ /usr/libexec/libvirt_parthelper ix,
-+ /usr/libexec/libvirt_iohelper ix,
- /etc/libvirt/hooks/** rmix,
- /etc/xen/scripts/** rmix,
-
diff --git a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
deleted file mode 100644
index 3e430cba1d2f..000000000000
--- a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a365e2d5b4af1ab2be743773412fe265579a9a0b Mon Sep 17 00:00:00 2001
-Message-Id: <a365e2d5b4af1ab2be743773412fe265579a9a0b.1529989118.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am | 29 ++++++-----------------------
- src/locking/virtlockd.service.in | 3 +--
- src/logging/virtlogd.service.in | 3 +--
- src/remote/libvirtd.service.in | 3 +--
- tools/Makefile.am | 17 ++++-------------
- tools/libvirt-guests.service.in | 2 +-
- tools/libvirt-guests.sysconf | 7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index db8c8ebd1a..63d7a9ca46 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -757,23 +757,6 @@ endif WITH_SETUID_RPC_CLIENT
-
- EXTRA_DIST += $(SYSCONF_FILES)
-
--install-sysconfig:
-- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
-- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
-- do \
-- tgt=`basename $$f`; \
-- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
-- done
--
--uninstall-sysconfig:
-- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
-- do \
-- tgt=`basename $$f`; \
-- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
-- done
-- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- SYSVINIT_FILES_IN += \
- locking/virtlockd.init.in \
- $(NULL)
-@@ -814,14 +797,14 @@ uninstall-logrotate:
- endif ! WITH_LIBVIRTD
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
- for f in $(SYSVINIT_FILES:%.init=%) ; \
- do \
- $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
- done
-
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
- rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
-
-@@ -859,14 +842,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
-
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- for f in $(SYSTEMD_UNIT_FILES); \
- do \
- $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- done
-
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
-
--install-upstart: install-sysconfig
-+install-upstart:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- done
-
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
- tgt=`basename $$f` ; \
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587032..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
-
- [Service]
--EnvironmentFile=-/etc/sysconfig/virtlockd
--ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
-+ExecStart=@sbindir@/virtlockd
- ExecReload=/bin/kill -USR1 $MAINPID
- # Loosing the locks is a really bad thing that will
- # cause the machine to be fenced (rebooted), so make
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36150..43736191d5 100644
---- a/src/logging/virtlogd.service.in
-+++ b/src/logging/virtlogd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8)
- Documentation=https://libvirt.org
-
- [Service]
--EnvironmentFile=-/etc/sysconfig/virtlogd
--ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
-+ExecStart=@sbindir@/virtlogd
- ExecReload=/bin/kill -USR1 $MAINPID
- # Loosing the logs is a really bad thing that will
- # cause the machine to be fenced (rebooted), so make
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 7f689e08a8..239beeced9 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
-
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 1452d984a0..cef08741cb 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -336,15 +336,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
- uninstall-bash-completion
-
--install-sysconfig:
-- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
-- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
-- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
-- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
-
- install-initscript: libvirt-guests.init
-@@ -359,8 +350,8 @@ uninstall-initscript:
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -391,12 +382,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
-
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- $(INSTALL_DATA) libvirt-guests.service \
- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
-
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
-
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62138..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
-
- [Service]
--EnvironmentFile=-/etc/sysconfig/libvirt-guests
-+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
- # Hack just call traditional service until we factor
- # out the code
- ExecStart=@libexecdir@/libvirt-guests.sh start
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# Warning: This configuration file is only sourced by the systemd
-+# libvirt-guests.service unit. The coresponding openrc facility is in
-+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
---
-2.16.4
-
diff --git a/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
index ca9f952a8234..866c6357b6e4 100644
--- a/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
@@ -79,7 +79,7 @@ index de9436872c..99ab4ea527 100644
#include <abstractions/base>
# needed for searching directories
-@@ -33,7 +33,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
+@@ -36,7 +36,7 @@
deny /dev/mapper/ r,
deny /dev/mapper/* r,
@@ -88,6 +88,13 @@ index de9436872c..99ab4ea527 100644
/{usr/,}sbin/apparmor_parser Ux,
/etc/apparmor.d/libvirt/* r,
+@@ -66,5 +66,5 @@
+ /**.[iI][sS][oO] r,
+ /**/disk{,.*} r,
+
+- #include <local/usr.lib.libvirt.virt-aa-helper>
++ #include <local/usr.libexec.virt-aa-helper>
+ }
diff --git a/src/security/apparmor/usr.sbin.libvirtd b/src/security/apparmor/usr.sbin.libvirtd
index f0ffc53008..8a402bd6ec 100644
--- a/src/security/apparmor/usr.sbin.libvirtd
@@ -107,4 +114,3 @@ index f0ffc53008..8a402bd6ec 100644
--
2.19.2
-
diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-5.2.0-fix-paths-for-apparmor.patch
new file mode 100644
index 000000000000..866c6357b6e4
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-5.2.0-fix-paths-for-apparmor.patch
@@ -0,0 +1,116 @@
+From 563706143779166624812b3faf498d869f5dd383 Mon Sep 17 00:00:00 2001
+Message-Id: <563706143779166624812b3faf498d869f5dd383.1547196492.git.mprivozn@redhat.com>
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Fri, 11 Jan 2019 09:41:06 +0100
+Subject: [PATCH] gentoo: fix paths for apparmor
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ src/security/Makefile.inc.am | 10 +++++-----
+ src/security/apparmor/libvirt-qemu | 2 ++
+ ...bvirt.virt-aa-helper => usr.libexec.virt-aa-helper} | 4 ++--
+ src/security/apparmor/usr.sbin.libvirtd | 6 ++++--
+ 4 files changed, 13 insertions(+), 9 deletions(-)
+ rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (93%)
+
+diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am
+index b24cdfd083..ae8e979b84 100644
+--- a/src/security/Makefile.inc.am
++++ b/src/security/Makefile.inc.am
+@@ -36,7 +36,7 @@ EXTRA_DIST += \
+ security/apparmor/TEMPLATE.lxc \
+ security/apparmor/libvirt-qemu \
+ security/apparmor/libvirt-lxc \
+- security/apparmor/usr.lib.libvirt.virt-aa-helper \
++ security/apparmor/usr.libexec.virt-aa-helper \
+ security/apparmor/usr.sbin.libvirtd \
+ $(NULL)
+
+@@ -90,7 +90,7 @@ endif WITH_SECDRIVER_APPARMOR
+ if WITH_APPARMOR_PROFILES
+ apparmordir = $(sysconfdir)/apparmor.d/
+ apparmor_DATA = \
+- security/apparmor/usr.lib.libvirt.virt-aa-helper \
++ security/apparmor/usr.libexec.virt-aa-helper \
+ security/apparmor/usr.sbin.libvirtd \
+ $(NULL)
+
+@@ -110,11 +110,11 @@ APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
+ install-apparmor-local:
+ $(MKDIR_P) "$(APPARMOR_LOCAL_DIR)"
+ echo "# Site-specific additions and overrides for \
+- 'usr.lib.libvirt.virt-aa-helper'" \
+- >"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
++ 'usr.libexec.virt-aa-helper'" \
++ >"$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper"
+
+ uninstall-apparmor-local:
+- rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
++ rm -f "$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper"
+ rmdir "$(APPARMOR_LOCAL_DIR)" || :
+
+ INSTALL_DATA_LOCAL += install-apparmor-local
+diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
+index eaa5167525..9be50bbbe0 100644
+--- a/src/security/apparmor/libvirt-qemu
++++ b/src/security/apparmor/libvirt-qemu
+@@ -87,6 +87,8 @@
+ /usr/share/AAVMF/** r,
+ /usr/share/qemu-efi/** r,
+ /usr/share/slof/** r,
++ /usr/share/seavgabios/** r,
++ /usr/share/edk2-ovmf/** r,
+
+ # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
+ /etc/pki/CA/ r,
+diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper b/src/security/apparmor/usr.libexec.virt-aa-helper
+similarity index 93%
+rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper
+rename to src/security/apparmor/usr.libexec.virt-aa-helper
+index de9436872c..99ab4ea527 100644
+--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper
++++ b/src/security/apparmor/usr.libexec.virt-aa-helper
+@@ -1,7 +1,7 @@
+ # Last Modified: Mon Apr 5 15:10:27 2010
+ #include <tunables/global>
+
+-profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
++profile virt-aa-helper /usr/libexec/virt-aa-helper {
+ #include <abstractions/base>
+
+ # needed for searching directories
+@@ -36,7 +36,7 @@
+ deny /dev/mapper/ r,
+ deny /dev/mapper/* r,
+
+- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
++ /usr/libexec/virt-aa-helper mr,
+ /{usr/,}sbin/apparmor_parser Ux,
+
+ /etc/apparmor.d/libvirt/* r,
+@@ -66,5 +66,5 @@
+ /**.[iI][sS][oO] r,
+ /**/disk{,.*} r,
+
+- #include <local/usr.lib.libvirt.virt-aa-helper>
++ #include <local/usr.libexec.virt-aa-helper>
+ }
+diff --git a/src/security/apparmor/usr.sbin.libvirtd b/src/security/apparmor/usr.sbin.libvirtd
+index f0ffc53008..8a402bd6ec 100644
+--- a/src/security/apparmor/usr.sbin.libvirtd
++++ b/src/security/apparmor/usr.sbin.libvirtd
+@@ -98,8 +98,10 @@
+ audit deny /sys/kernel/security/apparmor/.* rwxl,
+ /sys/kernel/security/apparmor/profiles r,
+ /usr/{lib,lib64}/libvirt/* PUxr,
+- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
+- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
++ /usr/libexec/virt-aa-helper PUxr,
++ /usr/libexec/libvirt_lxc PUxr,
++ /usr/libexec/libvirt_parthelper ix,
++ /usr/libexec/libvirt_iohelper ix,
+ /etc/libvirt/hooks/** rmix,
+ /etc/xen/scripts/** rmix,
+
+--
+2.19.2
diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r4 b/app-emulation/libvirt/files/libvirt-guests.init-r4
new file mode 100644
index 000000000000..b29f04c24a54
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-guests.init-r4
@@ -0,0 +1,237 @@
+#!/sbin/openrc-run
+
+description="Virtual Machine Management (libvirt) Guests"
+
+depend() {
+ use libvirtd
+}
+
+# set the default to QEMU
+[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system"
+
+# default to suspending the VM via managedsave
+case "${LIBVIRT_SHUTDOWN}" in
+ managedsave|shutdown|destroy) ;;
+ *) LIBVIRT_SHUTDOWN="managedsave" ;;
+esac
+
+# default to 500 seconds
+[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500
+
+gueststatefile="/var/lib/libvirt/libvirt-guests.state"
+netstatefile="/var/lib/libvirt/libvirt-net.state"
+
+do_virsh() {
+ local hvuri=$1
+ shift
+
+ # if unset, default to qemu
+ [ -z ${hvuri} ] && hvuri="qemu:///system"
+ # if only qemu was supplied then correct the value
+ [ "xqemu" = x${hvuri} ] && hvuri="qemu:///system"
+
+ # Silence errors because virsh always throws an error about
+ # not finding the hypervisor version when connecting to libvirtd
+ # lastly strip the blank line at the end
+ LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1
+}
+
+libvirtd_dom_list() {
+ # Only work with domains by their UUIDs
+ local hvuri=$1
+ shift
+
+ # The grep is to remove dom0 for xen domains. Otherwise we never hit 0
+ do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000
+}
+
+libvirtd_dom_count() {
+ local hvuri=$1
+ shift
+
+ libvirtd_dom_list "${hvuri}" $@ | wc -l
+}
+
+libvirtd_net_list() {
+ # Only work with networks by their UUIDs
+ local hvuri=$1
+ shift
+
+ do_virsh "${hvuri}" net-list --uuid $@
+}
+
+libvirtd_net_count() {
+ local hvuri=$1
+ shift
+
+ libvirtd_net_list "${hvuri}" $@ | wc -l
+}
+
+libvirtd_dom_stop() {
+ # stops all persistent or transient domains for a given URI
+ # $1 - uri
+ # $2 - persisent/transient
+
+ local uri=$1
+ local persist=$2
+ local shutdown_type=${LIBVIRT_SHUTDOWN}
+ local counter=${LIBVIRT_MAXWAIT}
+ local dom_name=
+ local dom_as=
+ local dom_ids=
+ local uuid=
+ local dom_count=
+
+ [ "${persist}" = "--transient" ] && shutdown_type="shutdown"
+ [ -n "${counter}" ] || counter=500
+
+ einfo " Shutting down domain(s) ..."
+
+ # grab all persistent or transient domains running
+ dom_ids=$(libvirtd_dom_list ${uri} ${persist})
+
+ for uuid in ${dom_ids}; do
+ # Get the name
+ dom_name=$(do_virsh ${uri} domname ${uuid})
+ einfo " ${dom_name}"
+ # Get autostart state
+ dom_as=$(do_virsh ${uri} dominfo ${uuid} | \
+ awk '$1 == "Autostart:" { print $2 }')
+
+ if [ "${persist}" = "--persistent" ]; then
+ # Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes
+ if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \
+ [ ${dom_as} = "enabled" ]; then
+ :
+ else
+ echo "${uri} ${uuid}" >> ${gueststatefile}
+ fi
+
+ fi
+
+ # Now let's stop it
+ do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null
+
+ done
+
+ dom_count="$(libvirtd_dom_count ${uri} ${persist})"
+ while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do
+ dom_count="$(libvirtd_dom_count ${uri} ${persist})"
+ sleep 1
+ if [ "${shutdown_type}" = "shutdown" ]; then
+ counter=$((${counter} - 1))
+ fi
+ printf "."
+ done
+
+ if [ "${shutdown_type}" = "shutdown" ]; then
+ # grab all domains still running
+ dom_ids=$(libvirtd_dom_list ${uri} ${persist})
+ for uuid in ${dom_ids}; do
+ dom_name=$(do_virsh ${uri} domname ${uuid})
+ eerror " ${dom_name} forcibly stopped"
+ do_virsh "${uri}" destroy ${uuid} > /dev/null
+ done
+ fi
+}
+
+libvirtd_net_stop() {
+ # stops all persistent or transient domains for a given URI
+ # $1 - uri
+ # $2 - persisent/transient
+
+ local uri=$1
+ local persist=$2
+ local uuid=
+ local net_name=
+
+ if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then
+
+ einfo " Shutting down network(s):"
+ for uuid in $(libvirtd_net_list ${uri} ${persist}); do
+ net_name=$(do_virsh ${uri} net-name ${uuid})
+ einfo " ${net_name}"
+
+ if [ "${persist}" = "--persistent" ]; then
+ # Save our running state
+ echo "${uri} ${uuid}" >> ${netstatefile}
+
+ fi
+
+ # Actually stop the network
+ do_virsh qemu net-destroy ${uuid} > /dev/null
+ done
+
+ fi
+}
+
+start() {
+ local uri=
+ local uuid=
+ local name=
+
+ for uri in ${LIBVIRT_URIS}; do
+ do_virsh "${uri}" connect
+ if [ $? -ne 0 ]; then
+ eerror "Failed to connect to '${uri}'. Domains may not start."
+ fi
+ done
+
+ [ ! -e "${netstatefile}" ] && touch "${netstatefile}"
+ [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
+
+ # if the user didn't want to start any guests up then respect their wish
+ [ "x${LIBVIRT_START}" = "xno" ] && return 0
+
+ # start networks
+ ebegin "Starting libvirt networks"
+ while read -r uri uuid
+ do
+ # ignore trash
+ [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
+
+ name=$(do_virsh "${uri}" net-name ${uuid})
+ einfo " ${name}"
+ do_virsh "${uri}" net-start ${uuid} > /dev/null
+ done <"${netstatefile}"
+ eend 0
+
+ # start domains
+ ebegin "Starting libvirt domains"
+ while read -r uri uuid
+ do
+ # ignore trash
+ [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
+
+ name=$(do_virsh "${uri}" domname ${uuid})
+ einfo " ${name}"
+ do_virsh "${uri}" start ${uuid} > /dev/null
+ do_virsh "${uri}" domtime --sync ${uuid} > /dev/null
+ done <"${gueststatefile}"
+ eend 0
+}
+
+stop() {
+ local counter=
+ local dom_name=
+ local net_name=
+ local dom_ids=
+ local uuid=
+ local dom_count=
+
+ rm -f "${gueststatefile}"
+ [ $? -ne 0 ] && eerror "Unable to save domain state"
+ rm -f "${netstatefile}"
+ [ $? -ne 0 ] && eerror "Unable to save net state"
+
+ for uri in ${LIBVIRT_URIS}; do
+ einfo "Stopping libvirt domains and networks for ${uri}"
+
+ libvirtd_dom_stop "${uri}" "--persistent"
+ libvirtd_dom_stop "${uri}" "--transient"
+ libvirtd_net_stop "${uri}" "--persistent"
+ libvirtd_net_stop "${uri}" "--transient"
+
+ einfo "Done stopping domains and networks for ${uri}"
+ done
+}
diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r18
index 2a3fb52696ab..5e9efc83e2f9 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r16
+++ b/app-emulation/libvirt/files/libvirtd.init-r18
@@ -15,12 +15,9 @@ retry="${LIBVIRTD_TERMTIMEOUT}"
depend() {
need virtlogd
- use dbus virtlockd
- after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
+ use ceph dbus iscsid virtlockd
+ after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled
USE_FLAG_FIREWALLD
- USE_FLAG_AVAHI
- USE_FLAG_ISCSI
- USE_FLAG_RBD
}
start_pre() {
@@ -29,6 +26,8 @@ start_pre() {
checkpath --directory /etc/libvirt/lxc || return 1
checkpath --directory /etc/libvirt/nwfilter || return 1
- checkpath --directory /etc/libvirt/qemu || return 1
- checkpath --directory /etc/libvirt/storage || return 1
+ [ -L /etc/libvirt/qemu ] ||
+ checkpath --directory /etc/libvirt/qemu || return 1
+ [ -L /etc/libvirt/storage ] ||
+ checkpath --directory /etc/libvirt/storage || return 1
}
diff --git a/app-emulation/libvirt/libvirt-4.9.0.ebuild b/app-emulation/libvirt/libvirt-5.2.0-r3.ebuild
index 1e923491c2bd..6eaa333934d9 100644
--- a/app-emulation/libvirt/libvirt-4.9.0.ebuild
+++ b/app-emulation/libvirt/libvirt-5.2.0-r3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
@@ -11,11 +11,11 @@ if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://libvirt.org/git/libvirt.git"
SRC_URI=""
- KEYWORDS="amd64 x86"
+ KEYWORDS=""
SLOT="0"
else
SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
- KEYWORDS="amd64 ~arm64 x86"
+ KEYWORDS="~amd64 ~arm64 ~x86"
SLOT="0/${PV}"
fi
@@ -25,18 +25,17 @@ 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 uml +vepa virtualbox virt-network
+ policykit +qemu rbd sasl selinux +udev +vepa virtualbox virt-network
wireshark-plugins xen zeroconf zfs
"
REQUIRED_USE="
firewalld? ( virt-network )
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
lxc? ( caps libvirtd )
openvz? ( libvirtd )
policykit? ( dbus )
qemu? ( libvirtd )
- uml? ( libvirtd )
vepa? ( macvtap )
virt-network? ( libvirtd )
virtualbox? ( libvirtd )
@@ -67,7 +66,7 @@ RDEPEND="
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dbus? ( sys-apps/dbus )
- firewalld? ( net-firewall/firewalld )
+ 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 )
@@ -121,9 +120,10 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}"/${PN}-4.5.0-do_not_use_sysconf.patch
+ "${FILESDIR}"/${PN}-5.2.0-do-not-use-sysconf.patch
"${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
- "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
+ "${FILESDIR}"/${PN}-5.2.0-fix-paths-for-apparmor.patch
+ "${FILESDIR}"/${PN}-5.2.0-md-clear.patch
)
pkg_setup() {
@@ -183,7 +183,14 @@ pkg_setup() {
~NETFILTER_ADVANCED
~NETFILTER_XT_CONNMARK
~NETFILTER_XT_MARK
- ~NETFILTER_XT_TARGET_CHECKSUM"
+ ~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
@@ -215,18 +222,21 @@ src_prepare() {
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 | sed 's/^[ +-]//;s/ .*//'
- git hash-object bootstrap.conf
+ 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
+ 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' '')/" \
@@ -269,7 +279,6 @@ src_configure() {
$(use_with sasl)
$(use_with selinux)
$(use_with udev)
- $(use_with uml)
$(use_with vepa virtualport)
$(use_with virt-network network)
$(use_with wireshark-plugins wireshark-dissector)
@@ -352,8 +361,8 @@ src_install() {
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
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh
+ bashcomp_alias virsh virt-admin
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
DISABLE_AUTOFORMATTING=true
diff --git a/app-emulation/libvirt/libvirt-5.4.0-r1.ebuild b/app-emulation/libvirt/libvirt-5.4.0-r1.ebuild
new file mode 100644
index 000000000000..796ca2632a99
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-5.4.0-r1.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=""
+ 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 dtrace 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 )
+ dtrace? ( dev-util/systemtap )
+ 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.2.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 dtrace)
+ $(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
+
+ --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-r4" 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.5.0-r1.ebuild b/app-emulation/libvirt/libvirt-5.5.0-r1.ebuild
new file mode 100644
index 000000000000..5cb42f7609c9
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-5.5.0-r1.ebuild
@@ -0,0 +1,383 @@
+# 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
+ 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 dtrace 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 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 )
+ dtrace? ( dev-util/systemtap )
+ 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
+ )
+ 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.2.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-r18" "${S}/libvirtd.init" || die
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
+ -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 dtrace)
+ $(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 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
+
+ --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-r4" 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 4c2cd8eebffb..5cb42f7609c9 100644
--- a/app-emulation/libvirt/libvirt-9999.ebuild
+++ b/app-emulation/libvirt/libvirt-9999.ebuild
@@ -23,10 +23,10 @@ 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
+ apparmor audit +caps +dbus dtrace 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 zfs
"
REQUIRED_USE="
@@ -66,6 +66,7 @@ RDEPEND="
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dbus? ( sys-apps/dbus )
+ dtrace? ( dev-util/systemtap )
firewalld? ( >=net-firewall/firewalld-0.6.3 )
fuse? ( >=sys-fs/fuse-2.8.6:= )
glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
@@ -108,7 +109,6 @@ RDEPEND="
virtual/udev
>=x11-libs/libpciaccess-0.10.9
)
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )
zfs? ( sys-fs/zfs )"
DEPEND="${RDEPEND}
@@ -122,7 +122,7 @@ DEPEND="${RDEPEND}
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-fix-paths-for-apparmor.patch
)
pkg_setup() {
@@ -235,11 +235,8 @@ src_prepare() {
fi
# Tweak the init script:
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
+ cp "${FILESDIR}/libvirtd.init-r18" "${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
@@ -252,6 +249,7 @@ src_configure() {
$(use_with audit)
$(use_with caps capng)
$(use_with dbus)
+ $(use_with dtrace)
$(use_with firewalld)
$(use_with fuse)
$(use_with glusterfs)
@@ -282,7 +280,6 @@ src_configure() {
$(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
@@ -300,7 +297,6 @@ src_configure() {
--disable-static
--disable-werror
- --with-html-subdir=${PF}/html
--localstatedir=/var
)
@@ -353,7 +349,7 @@ src_install() {
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}/libvirt-guests.init-r4" libvirt-guests || die
newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
index 63d0a74b30b4..870d636e83d2 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -38,9 +38,6 @@
<flag name="openvz">
Support management of OpenVZ virtualisation (openvz-sources)
</flag>
- <flag name="uml">
- Support management of User Mode Linux virtualisation
- </flag>
<flag name="qemu">
Support management of QEMU virtualisation (<pkg>app-emulation/qemu</pkg>)
</flag>
@@ -56,6 +53,7 @@
</flag>
<!-- Miscellaneous flags -->
<flag name="apparmor">Enable AppArmor support</flag>
+ <flag name="dtrace">Enable dtrace support via <pkg>dev-util/systemtap</pkg></flag>
<flag name="fuse">Allow LXC to use <pkg>sys-fs/fuse</pkg> for mount
points</flag>
<flag name="numa">