summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/Manifest.gzbin20517 -> 20525 bytes
-rw-r--r--app-emulation/diskimage-builder/Manifest2
-rw-r--r--app-emulation/diskimage-builder/diskimage-builder-3.12.0.ebuild39
-rw-r--r--app-emulation/libvirt-glib/Manifest2
-rw-r--r--app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild19
-rw-r--r--app-emulation/lxd/Manifest3
-rw-r--r--app-emulation/lxd/files/lxd-4.0.7-r1.service20
-rw-r--r--app-emulation/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch58
-rw-r--r--app-emulation/lxd/lxd-4.0.7-r1.ebuild170
-rw-r--r--app-emulation/open-vm-tools/Manifest2
-rw-r--r--app-emulation/open-vm-tools/open-vm-tools-11.2.5_p17337674-r3.ebuild4
-rw-r--r--app-emulation/protontricks/Manifest2
-rw-r--r--app-emulation/protontricks/protontricks-1.6.0.ebuild2
-rw-r--r--app-emulation/qemu/Manifest9
-rw-r--r--app-emulation/qemu/files/qemu-6.1.0-strings.patch26
-rw-r--r--app-emulation/qemu/qemu-6.0.0-r3.ebuild2
-rw-r--r--app-emulation/qemu/qemu-6.0.0-r53.ebuild2
-rw-r--r--app-emulation/qemu/qemu-6.1.0.ebuild909
-rw-r--r--app-emulation/qemu/qemu-9999.ebuild21
-rw-r--r--app-emulation/snapd/Manifest2
-rw-r--r--app-emulation/snapd/snapd-2.52.ebuild180
-rw-r--r--app-emulation/wine-staging/Manifest1
-rw-r--r--app-emulation/wine-staging/files/wine-staging-6.12-winegcc-equals-args.patch13
-rw-r--r--app-emulation/wine-vanilla/Manifest1
-rw-r--r--app-emulation/wine-vanilla/files/wine-vanilla-6.12-winegcc-equals-args.patch13
-rw-r--r--app-emulation/xen-tools/Manifest6
-rw-r--r--app-emulation/xen-tools/files/gentoo-patches.conf27
-rw-r--r--app-emulation/xen-tools/xen-tools-4.14.3.ebuild533
-rw-r--r--app-emulation/xen-tools/xen-tools-4.15.1.ebuild540
-rw-r--r--app-emulation/xen/Manifest5
-rw-r--r--app-emulation/xen/files/xen-4.15-flask.patch13
-rw-r--r--app-emulation/xen/xen-4.14.3.ebuild167
-rw-r--r--app-emulation/xen/xen-4.15.1.ebuild167
33 files changed, 2859 insertions, 101 deletions
diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz
index 91c545837bfe..04172e7cb932 100644
--- a/app-emulation/Manifest.gz
+++ b/app-emulation/Manifest.gz
Binary files differ
diff --git a/app-emulation/diskimage-builder/Manifest b/app-emulation/diskimage-builder/Manifest
index f2473607d5a3..fe30d513df82 100644
--- a/app-emulation/diskimage-builder/Manifest
+++ b/app-emulation/diskimage-builder/Manifest
@@ -1,6 +1,4 @@
-DIST diskimage-builder-3.12.0.tar.gz 477540 BLAKE2B 9facf1d6ef9a38b960b7bcc8ee035d8f7ae6c5189d1de25e335d68a6e8389be0ab0f3b787e5d5112ee7ef508b583d1df612ca75149659f78685a2fdf6dee21a7 SHA512 edec229023673c48a3176b315c9d84067b4e7b4a30843839722a7ce300f898d92ee5f5146b6d92f2eda692bada4370b32f1b19f3b929a379b3e604b6e7ce29d6
DIST diskimage-builder-3.13.0.tar.gz 494027 BLAKE2B 27a88118d688018a5f842e0d483e3128b0715cdc21f33308de61ea5077ad1b824738363ae066463e84e7e3821a36085afc9985fde74883ab040c67a25073e5c0 SHA512 7b099811021f199ed0680e2dc4db6302b05dc6adf95ac96e890501cf92727dc319fbf96f9c68a8b9bca26ba54d7ff5e6a67f036a9d86a3ad1752d5cc4a8edbaf
-EBUILD diskimage-builder-3.12.0.ebuild 1123 BLAKE2B e08d7364d05eb37576d34f950030e90fa5b8e4e7ad4e2d485e57e1399567af9e065f5f998b27fedae1d84a51f6df2aba33f33baea467871988cd197852a4db7a SHA512 e1f2646722a8b253408c28fe55693cf0a77e6cb1a46b846f655b68384d4761ce3c3d4c669201fae482bd012340f0b7f4896a2c7140b400bb29cfc9436cf1018d
EBUILD diskimage-builder-3.13.0.ebuild 1123 BLAKE2B e08d7364d05eb37576d34f950030e90fa5b8e4e7ad4e2d485e57e1399567af9e065f5f998b27fedae1d84a51f6df2aba33f33baea467871988cd197852a4db7a SHA512 e1f2646722a8b253408c28fe55693cf0a77e6cb1a46b846f655b68384d4761ce3c3d4c669201fae482bd012340f0b7f4896a2c7140b400bb29cfc9436cf1018d
EBUILD diskimage-builder-9999.ebuild 1125 BLAKE2B 2e91c98564bf0c4ffff2e97d5900feb0b6c74aceba0880d0d51d0fafc26a89f9de5c16b7484e223b9f190106a72e541d658ca483e0bf36e098baf250f0d39dbc SHA512 652e697141503582b7e648efe2d4448118525798ebe3db86ddd1964a741ffd3e0c68c3d42b91aa2f0df63e6903a9a922e7d0b1d6ff68c5abd1c124931ab93f92
MISC metadata.xml 719 BLAKE2B 872a4d37e8ddb2a28eb85d18cd88990934327bc23194f3be9e5dea03627a6169987b246a93b50754cbe5e331f8c854a808bf307b70521c481d83b846f7385606 SHA512 d151fd95659211b2057ef0a61a6020e2f9efebebf3d7c5e1392ddb9954e3627e1040f2a9fe84ea4caeb65a745411fefebf2d896bbddbe0ddbb56acf42d2fedc3
diff --git a/app-emulation/diskimage-builder/diskimage-builder-3.12.0.ebuild b/app-emulation/diskimage-builder/diskimage-builder-3.12.0.ebuild
deleted file mode 100644
index 7a9c76c9cccd..000000000000
--- a/app-emulation/diskimage-builder/diskimage-builder-3.12.0.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-inherit distutils-r1
-
-DESCRIPTION="Golden Disk Image builder."
-HOMEPAGE="http://docs.openstack.org/developer/diskimage-builder/"
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://opendev.org/openstack/diskimage-builder.git"
-else
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
- KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
-fi
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE=""
-
-CDEPEND=">=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
- !~dev-python/pbr-2.1.0[${PYTHON_USEDEP}]"
-DEPEND="${CDEPEND}"
-RDEPEND="${CDEPEND}
- >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
- !~dev-python/Babel-2.4.0[${PYTHON_USEDEP}]
- >=dev-python/networkx-1.10[${PYTHON_USEDEP}]
- >=dev-python/pyyaml-3.12[${PYTHON_USEDEP}]
- >=dev-python/six-1.10.0[${PYTHON_USEDEP}]
- >=dev-python/stevedore-1.20.0[${PYTHON_USEDEP}]
- app-emulation/qemu
- sys-block/parted
- sys-fs/multipath-tools
- sys-fs/dosfstools
- sys-apps/gptfdisk
- !dev-python/dib-utils[${PYTHON_USEDEP}]"
diff --git a/app-emulation/libvirt-glib/Manifest b/app-emulation/libvirt-glib/Manifest
index 32dd92b7100f..8028b12e4419 100644
--- a/app-emulation/libvirt-glib/Manifest
+++ b/app-emulation/libvirt-glib/Manifest
@@ -1,5 +1,5 @@
DIST libvirt-glib-3.0.0.tar.gz 899180 BLAKE2B ef10b3d9bad48e49dd1898733aacb2f51f1826330eda9c63a7f8df5f11c96812f8cc7fe6a867961efa85a433f45c934d75cf605eb523ec723459da4646335b1a SHA512 b9e7d782c25b5c3a9b2829f1be8162352438ab3505510a1ca7dd64d741eaab158dc9206fdd4b0e3e27b0c049e4bcfc47db0c9a7fa1a84888864e23d3c35c079e
DIST libvirt-glib-4.0.0.tar.xz 161836 BLAKE2B e196d1f02f6f202b1883500241bbfda963b34ee12bd945b3fa897f84f55a049f98e0429132ccfad7168e5ba2b41245e9e7e3817a7f057e0dc40b674ca6c9b661 SHA512 e1b99e80aa671fa5a4d7f7f7a4ea70ce7c5fdaf97574407f79aa11a75dd177e1e3f92027728a83ded62e305852bbda76eb90326aaa1f5f19b77272b008351810
EBUILD libvirt-glib-3.0.0.ebuild 975 BLAKE2B 1ea53e40c805b2d2de91f7c1a7a0690bc8bf768919b0c3706a05ae557dd4d4f6040e6df9e0e75fcb16bcf2caa411eb2570028e2937ceb377cd0c74002f7fbbcd SHA512 ef198cbd6313dd117b62f95cd5884b0254f90f638f42818f29217e926d0f0eefd293416afeda704bd38f77f13d400dcd16a4c1e2e318e6e34def2a80aa7c4911
-EBUILD libvirt-glib-4.0.0.ebuild 1049 BLAKE2B dbf6890b8721664c7adadd96bdb7062cf8c92a99ac3bd856c45bf047e58a10d7691dd7932afe546fc51636c16ae9aea168b6f5aab59c345d30041f0d6108a54d SHA512 9094f1b27c22b3a3b2c8964887b28c55abce4535277dcd51f9d1b96af4d130a2603d539a24897ee762223c64e7049d57e48e9c43bcb159060024b8475ef4b0ef
+EBUILD libvirt-glib-4.0.0.ebuild 1081 BLAKE2B d80fa3892811dc776fc31958bc7ce41d2c9ba3c781c9431435a1c1752ddd302e23d84646ebb0a4ff05672c52923468bd0eb89f852654279914184832b9ea9a5e SHA512 5d76fd7aecbb4e7efbbb9f7ee47085115c0fc78baa6d4f9b14af1a45337ca8f2162a52ff1e720db3fffa3df055c73cd7a6a674cd1200ead9ed9cdec6e30bfaf7
MISC metadata.xml 354 BLAKE2B 8a886534226d61f7908655b29315cb651520b4c6e890f7e11111b77f49d256c2517d7b0e498ba1166df04a485c6bdf191f6fbf4b308f54d8b90efed5031346fb SHA512 6f4374b2ebba9be49b1ca819fab9da8d093a7fba1e7c9c9a12257d33002dd9a7ce78cc5a43b1cddfe5f179bc74d237327347cccbf7a70b43e2d1b86c9ee33ab2
diff --git a/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild b/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild
index 759c44779b2d..825b6a5327a6 100644
--- a/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild
+++ b/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild
@@ -8,29 +8,30 @@ inherit meson vala
DESCRIPTION="GLib and GObject mappings for libvirt"
HOMEPAGE="https://libvirt.org/ https://gitlab.com/libvirt/libvirt-glib/"
SRC_URI="https://libvirt.org/sources/glib/${P}.tar.xz"
-LICENSE="LGPL-2.1"
+LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~ppc64 x86"
IUSE="gtk-doc +introspection test +vala"
RESTRICT="!test? ( test )"
REQUIRED_USE="vala? ( introspection )"
-BDEPEND="
- dev-util/glib-utils
- >=dev-util/intltool-0.35.0
- virtual/pkgconfig
- gtk-doc? ( dev-util/gtk-doc )
- vala? ( $(vala_depend) )
-"
RDEPEND="
>=dev-libs/libxml2-2.9.1
>=app-emulation/libvirt-1.2.8:=
>=dev-libs/glib-2.48.0:2
introspection? ( >=dev-libs/gobject-introspection-1.48.0:= )
"
-
DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/glib-utils
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc
+ app-text/docbook-xml-dtd:4.3 )
+ vala? ( $(vala_depend) )
+"
+
src_prepare() {
default
use vala && vala_src_prepare
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
index 7211d0266d62..a5a98a50e5a0 100644
--- a/app-emulation/lxd/Manifest
+++ b/app-emulation/lxd/Manifest
@@ -3,8 +3,11 @@ AUX lxd-4.0.0.initd 1221 BLAKE2B cdff6d900e09f85d9a4dc86b30f0d32b848689e209b79b4
AUX lxd-4.0.0.service 519 BLAKE2B 5314820c25e52449aad8db6584739cbe0f2654111e4b42c3eef0df995373487c789390dee99420dfd1aa5768ba66ba72999e8f2d8a3b0be6e621185f185b5b85 SHA512 c68c4106e189bd32538f5f2963c43afc30418dd9afeca56e5590f354725eb0126ee0aac02082cc42d69b851f392a4977a4f95cf2886044ad563c9a36facea222
AUX lxd-4.0.0.socket 197 BLAKE2B 8c0d2dee71c14ee5f34b2bd0804adfa06ab3ae2a73bcf8d122184434c42b7f91f66fe610bddda93c458e0f171b505fe79a4f268d8243aabdf226f47e95027e71 SHA512 d70dc867b2e92b69928c83fc5feca4e387808adbc267b9fe4ecf0c8befdf3ca13366b229c6eefcb5667e51405fb0aa4e6bb8f59a0b5b5fb3895c46b4aaab0661
AUX lxd-4.0.0_apparmor.service 567 BLAKE2B e5951c31f90b842f5b625060326d9611ed67fb50360b11791cbd1ab1953fdfe5eb726e22b7091bb8e45c294b772e6b00e9ca65833512eb5b570627fa3234812e SHA512 364764d007f4800138c712fce70fe28b096b6e35dc6d2e4f8aa9aff4b335ecec7dfc9600a1a16cd38e69a96534b7462daf5f6e946a2ee81bce17977b8d5911db
+AUX lxd-4.0.7-r1.service 497 BLAKE2B 90141dce8dbef52521c5f9c2924111904f8b0528e8555afb8a2eb8d9dc8b4c6b32b543a6ee3caf42dc0a90f20d35d40810a3f0828a88377e91424f7b00e589a8 SHA512 91fa16a9e9de2eda34c06ec66c144a43fe1cb23c99137cbd830ff9621c7362989404ca9906e4f53b3c10ba84c3cc950713cb69ed7a81bd66f07935312f8f75f8
AUX lxd-containers-4.0.0.service 322 BLAKE2B a38cffd4b5809946abdac858564dcab2c2967c295d671df0d315d790df1849e25f0bc052e20cd0d9e4c23403289050b4538f5a52437ab8ae9ca3b40c6a9a1571 SHA512 a55f2c1a367c5c3c5eb6880e01893977de18c6e9463949236ee3247715fbf53641bbe1b69404362dd6cb6ba2a30ac6539fd362b21059e529dc4dac4ec5ca6718
+AUX lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch 2055 BLAKE2B 4f17aeb03e6022b6e88c4279865215fbecb699b9cc112a8e1fe16d9cda113e41d39faf448d17f9810bb65efb37d37b74b3c20ffb65329e012820f46705235f6f SHA512 1f0846ab9aa3ebfd96e79a91bc17be871f0ac3af44ddd3f9ba2a17570b2d800407a76634476e61d6d1f8bfbb880f5df37ad3b435a139e62f4c1c786c002d29d4
DIST lxd-4.0.7.tar.gz 15454709 BLAKE2B 6278fa058efa15a689a982dcf0bce58bf320ac500bc8bd6cd4227f5f126a03dd85a65363d4d36b3437a0a2fd8e08e8a7332b96f9aba8e8eb2aa508d1129fec13 SHA512 dd99db21a4de95d95e6bd53dcbd68f4d9f0ffbd9e60d994340cd0b1e820068e671507a9718d1c56488c79ad49019f86637a4a8b9c945cdd3f70d59c9e2026fb1
DIST lxd-4.0.7.tar.gz.asc 833 BLAKE2B a28e43d1fd0d5851a62121069703637e7ba25cbeb142507e4e162b254eddce2b5a13a100eedb202fbf3d8aa40f6e20b4fd587ef38f6c73a07d2bd9d8d9d00c8f SHA512 561d7cbf94a37e7ed03828ac98a2022dc1a4e11b80cdee3ad925bf4226b78b9e1d1b9c51ed070e60fba881b69e06dc70be2713026285b10de5cca59549ac5f82
+EBUILD lxd-4.0.7-r1.ebuild 4357 BLAKE2B cb3dc55ab05afa9339f6eeb2cac4a39628eb430bf4914c8e3548fd30f793e4102e9de7ee61ee001bd8f91dc2b18f7980ef7c3db3d845b6de7e0176159091b2a3 SHA512 d91618a54fb6a0868c4f450ce2a7ffdfec0aeac7e74b337b2488e4912c1044ba0d891ed1eaf74d3578a4c56481074c44d1c7a37bf0cea337229f802e61dbb29c
EBUILD lxd-4.0.7.ebuild 4190 BLAKE2B 2938b717899c7ad9199b13265c4f250959d1b353ea4e591b8e77470c31e2cb72da47733dd823bcfbd842c26bcca9a9e820fb56784c0aca048b8221ac5ba7fbd6 SHA512 5699cdbb47c6752012f5500abae8d0ff655111d6d7843583e97e3ebd000bb63745e77dc7f3d4099c80d60939cf5d1972f74e8f90012c195ff135d7e9e3b6e749
MISC metadata.xml 777 BLAKE2B e25ff2ac780143763e40917f2570bbe8244c2a2a9eac1a9761199e7ea19df9863ade968ca8218f62da9fe41f3b9e7110ef86abff764c2a3d85f02ae102951a16 SHA512 e39a06e8b838990a9b0019f52e1d0c7dd83527c6a15bc8a14f0aa9fec2ee86c914de52f1ba48e7a586c3866d9da46dc32c2d6e1ea3e2c42ca985fdfe0783b40c
diff --git a/app-emulation/lxd/files/lxd-4.0.7-r1.service b/app-emulation/lxd/files/lxd-4.0.7-r1.service
new file mode 100644
index 000000000000..f1e644b95df8
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-4.0.7-r1.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=LXD - main daemon
+After=network-online.target lxcfs.service lxd.socket
+Requires=network-online.target lxcfs.service lxd.socket
+Documentation=man:lxd(1)
+
+[Service]
+EnvironmentFile=-/etc/environment
+ExecStart=/usr/sbin/lxd --group lxd --syslog
+ExecStartPost=/usr/sbin/lxd waitready --timeout=600
+KillMode=process
+TimeoutStartSec=600s
+TimeoutStopSec=30s
+Restart=on-failure
+LimitNOFILE=1048576
+LimitNPROC=infinity
+TasksMax=infinity
+
+[Install]
+Also=lxd-containers.service lxd.socket
diff --git a/app-emulation/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch b/app-emulation/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch
new file mode 100644
index 000000000000..0b471688cc0d
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch
@@ -0,0 +1,58 @@
+From 9a128f32fc277dd0c07bc85c71dc25d123f8a831 Mon Sep 17 00:00:00 2001
+From: Christian Brauner <christian.brauner@ubuntu.com>
+Date: Wed, 4 Aug 2021 21:34:11 +0200
+Subject: [PATCH] syscall_wrappers: don't conflict with glibc provided
+ close_range()
+
+Newer glibc version's provide a wrapper for close_range().
+
+Fixes: #9084
+Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
+---
+ lxd/include/syscall_wrappers.h | 2 +-
+ lxd/main_checkfeature.go | 2 +-
+ lxd/main_forkexec.go | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lxd/include/syscall_wrappers.h b/lxd/include/syscall_wrappers.h
+index 4405a622b801..25e56a5cefac 100644
+--- a/lxd/include/syscall_wrappers.h
++++ b/lxd/include/syscall_wrappers.h
+@@ -16,7 +16,7 @@
+ #define CLOSE_RANGE_UNSHARE (1U << 1)
+ #endif
+
+-static inline int close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
++static inline int lxd_close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
+ {
+ return syscall(__NR_close_range, fd, max_fd, flags);
+ }
+diff --git a/lxd/main_checkfeature.go b/lxd/main_checkfeature.go
+index 9511b684fa5d..0cc89207158d 100644
+--- a/lxd/main_checkfeature.go
++++ b/lxd/main_checkfeature.go
+@@ -496,7 +496,7 @@ static void is_close_range_aware(void)
+ if (fd < 0)
+ return;
+
+- if (close_range(fd, fd, CLOSE_RANGE_UNSHARE))
++ if (lxd_close_range(fd, fd, CLOSE_RANGE_UNSHARE))
+ return;
+
+ close_range_aware = true;
+diff --git a/lxd/main_forkexec.go b/lxd/main_forkexec.go
+index 574f25eeb988..cfa4cd6bcda8 100644
+--- a/lxd/main_forkexec.go
++++ b/lxd/main_forkexec.go
+@@ -290,7 +290,7 @@ __attribute__ ((noinline)) static int __forkexec(void)
+ if (!argvp || !*argvp)
+ return log_error(EXIT_FAILURE, "No command specified");
+
+- ret = close_range(EXEC_PIPE_FD + 1, UINT_MAX, CLOSE_RANGE_UNSHARE);
++ ret = lxd_close_range(EXEC_PIPE_FD + 1, UINT_MAX, CLOSE_RANGE_UNSHARE);
+ if (ret) {
+ // Fallback to close_inherited() when the syscall is not
+ // available or when CLOSE_RANGE_UNSHARE isn't supported.
+--
+2.32.0
+
diff --git a/app-emulation/lxd/lxd-4.0.7-r1.ebuild b/app-emulation/lxd/lxd-4.0.7-r1.ebuild
new file mode 100644
index 000000000000..f7a259aeafe0
--- /dev/null
+++ b/app-emulation/lxd/lxd-4.0.7-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 linux-info optfeature systemd verify-sig
+
+DESCRIPTION="Fast, dense and secure container management"
+HOMEPAGE="https://linuxcontainers.org/lxd/introduction/ https://github.com/lxc/lxd"
+SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
+ verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor ipv6 nls verify-sig"
+
+DEPEND="app-arch/xz-utils
+ >=app-emulation/lxc-3.0.0[apparmor?,seccomp(+)]
+ dev-libs/dqlite
+ dev-libs/lzo
+ dev-libs/raft[lz4]
+ >=dev-util/xdelta-3.0[lzma(+)]
+ net-dns/dnsmasq[dhcp,ipv6?]"
+RDEPEND="${DEPEND}
+ acct-group/lxd
+ net-firewall/ebtables
+ net-firewall/iptables[ipv6?]
+ sys-apps/iproute2[ipv6?]
+ sys-fs/fuse:*
+ sys-fs/lxcfs
+ sys-fs/squashfs-tools[lzma]
+ virtual/acl"
+BDEPEND="dev-lang/go
+ nls? ( sys-devel/gettext )
+ verify-sig? ( app-crypt/openpgp-keys-linuxcontainers )"
+
+CONFIG_CHECK="
+ ~CGROUPS
+ ~IPC_NS
+ ~NET_NS
+ ~PID_NS
+
+ ~SECCOMP
+ ~USER_NS
+ ~UTS_NS
+"
+
+ERROR_IPC_NS="CONFIG_IPC_NS is required."
+ERROR_NET_NS="CONFIG_NET_NS is required."
+ERROR_PID_NS="CONFIG_PID_NS is required."
+ERROR_SECCOMP="CONFIG_SECCOMP is required."
+ERROR_UTS_NS="CONFIG_UTS_NS is required."
+
+# Go magic.
+QA_PREBUILT="/usr/bin/fuidshift
+ /usr/bin/lxc
+ /usr/bin/lxc-to-lxd
+ /usr/bin/lxd-agent
+ /usr/bin/lxd-benchmark
+ /usr/bin/lxd-p2c
+ /usr/sbin/lxd"
+
+EGO_PN="github.com/lxc/lxd"
+GOPATH="${S}/_dist" # this seems to reset every now and then, though
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
+
+PATCHES=(
+ "${FILESDIR}/${PN}-syscall_wrappers-don-t-conflict-with-glibc-provided.patch"
+)
+
+src_prepare() {
+ default
+
+ export GOPATH="${S}/_dist"
+
+ sed -i \
+ -e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/lxd:g" \
+ -e "s:make:make ${MAKEOPTS}:g" \
+ Makefile || die
+
+ # Fix hardcoded ovmf file path, see bug 763180
+ sed -i \
+ -e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
+ -e "s:OVMF_VARS.ms.fd:OVMF_VARS.secboot.fd:g" \
+ doc/environment.md \
+ lxd/apparmor/instance_qemu.go \
+ lxd/instance/drivers/driver_qemu.go || die "Failed to fix hardcoded ovmf paths."
+
+ # Fix hardcoded virtfs-proxy-helper file path, see bug 798924
+ sed -i \
+ -e "s:/usr/lib/qemu/virtfs-proxy-helper:/usr/libexec/virtfs-proxy-helper:g" \
+ lxd/device/disk.go || die "Failed to fix virtfs-proxy-helper path."
+
+ cp "${FILESDIR}"/lxd-4.0.7-r1.service "${T}"/lxd.service || die
+ if use apparmor; then
+ sed -i \
+ '/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
+ "${T}"/lxd.service || die
+ fi
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export GOPATH="${S}/_dist"
+ export GO111MODULE=auto
+ export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
+
+ cd "${S}" || die
+
+ for k in fuidshift lxd-benchmark lxc lxc-to-lxd; do
+ go install -v -x "${EGO_PN}/${k}" || die "failed compiling ${k}"
+ done
+
+ go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
+
+ # Needs to be built statically
+ CGO_ENABLED=0 go install -v -tags netgo "${EGO_PN}"/lxd-p2c
+ CGO_ENABLED=0 go install -v -tags agent,netgo "${EGO_PN}"/lxd-agent
+
+ use nls && emake build-mo
+}
+
+src_test() {
+ export GOPATH="${S}/_dist"
+ export GO111MODULE=off
+ go test -v ${EGO_PN}/lxd || die
+}
+
+src_install() {
+ local bindir="_dist/bin"
+ export GOPATH="${S}/_dist"
+
+ dosbin ${bindir}/lxd
+
+ for l in fuidshift lxd-agent lxd-benchmark lxd-p2c lxc lxc-to-lxd; do
+ dobin ${bindir}/${l}
+ done
+
+ cd "${S}" || die
+
+ newbashcomp scripts/bash/lxd-client lxc
+
+ newconfd "${FILESDIR}"/lxd-4.0.0.confd lxd
+ newinitd "${FILESDIR}"/lxd-4.0.0.initd lxd
+
+ systemd_dounit "${T}"/lxd.service
+
+ systemd_newunit "${FILESDIR}"/lxd-containers-4.0.0.service lxd-containers.service
+ systemd_newunit "${FILESDIR}"/lxd-4.0.0.socket lxd.socket
+
+ dodoc AUTHORS doc/*
+ use nls && domo po/*.mo
+}
+
+pkg_postinst() {
+ elog
+ elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
+ elog "including a Quick Start."
+ elog
+ elog "Please run 'lxc-checkconfig' to see all optional kernel features."
+ elog
+ optfeature "btrfs storage backend" sys-fs/btrfs-progs
+ optfeature "lvm2 storage backend" sys-fs/lvm2
+ optfeature "zfs storage backend" sys-fs/zfs
+ elog
+ elog "Be sure to add your local user to the lxd group."
+}
diff --git a/app-emulation/open-vm-tools/Manifest b/app-emulation/open-vm-tools/Manifest
index 49cae148ec7c..dbedc4e45891 100644
--- a/app-emulation/open-vm-tools/Manifest
+++ b/app-emulation/open-vm-tools/Manifest
@@ -10,5 +10,5 @@ AUX vmtoolsd.vgauth.service 312 BLAKE2B dba8ddb1b701cea490b117d08c93738a38bd668c
DIST open-vm-tools-11.2.0-16938113.tar.gz 4050857 BLAKE2B b0e5e1e985d9f3d50dbbb8a4a7939d37d8968f0aa15e6d7200b7ec8511bd059d3a78a4ddd763d22965dc6da614d156e6b7ee23af73490f8bbf8e1dc2664041d3 SHA512 c950d6e8ba5218dd40e845f3c2b09eeb640ef0d33c7ea1671164027927e062dcf0b4745f6e4515a7495ec20a6d06a8fbf700819f6211073194b5ef97d7be441d
DIST open-vm-tools-11.2.5-17337674.tar.gz 4057528 BLAKE2B 2adc5179e09a4bb501fe12c9e6dea7fee106516fd250899170a8fb3bcefb9b576136a82e4c3d3a73217b44aba8880728bb3588cedd715529f9b2991f0156ac84 SHA512 b6d4bc6522418ec7a881752181ad9240e535854df492e758abf3996c6afe245466ffbff60cc1b6cdff5cf731b5769c9f9cb96aed29f0b788d0eef05f91fcf8ab
EBUILD open-vm-tools-11.2.0_p16938113-r4.ebuild 3169 BLAKE2B f82fa2d219fb85c836c3935d15d8069c7b04566bb09c939b5a88116f80f21b99f3520e9819c703d2714d7f8e4e203cd656f00c3c708d2229c606b90f222622ad SHA512 3223eddb1813bec285a60d300da328251573a09044e514dcb74c9fae008ebcb7becb20552a3d90c07277c60023fb8406426c838926d868e4e983ac5e5d7adf45
-EBUILD open-vm-tools-11.2.5_p17337674-r3.ebuild 3181 BLAKE2B d5d2ba6839a1a0f4e1bd179242cf186a619c1fc065c41c1bb5bd41052da3e61f981a64e91c298b484b62670f853253f7a6f9f3fd21cdc1cdc4b7f90b70e03e06 SHA512 8aaafb51593ad38f86eeb1eee52cac6255866688bc42bcae11d83dbf428134948719d39b835bd248fe0cd2c5f5257a581adb808e6d1e540a084bd6d20431c7bf
+EBUILD open-vm-tools-11.2.5_p17337674-r3.ebuild 3168 BLAKE2B f901525ed954503befa9a410ead53b1a8ff011dd91a4f00f558ddeda1846325d4fecdddabc5138853b7097e9d7ca8f1eb94fa6ef5bff8eb1c703716396d079c4 SHA512 a4463fe80831d886bb6c64d1ad3b35f30df449095ee2c2eda6c3be84c017aed9aab822edaf1438429093e8ae8e4396e1c489db5a2a6ad9c400ead853d8c635f5
MISC metadata.xml 1099 BLAKE2B 90cf8ba3bc47e8daf898c4dd6ae0044bb5e4483e0ee83400718176962b7d739ee8fc046614fb7ac051ac24cf08756d4f0e04ddd5d07c39c28373ff6edea51a64 SHA512 5f9f269727b6467b77c0554019d34e27de94d25b93e85fe28d5eefdc5318dddaa45e03ccfbeb2353226982eb3e6cd3b76352a940af6cd579dbc776dade8fc1ef
diff --git a/app-emulation/open-vm-tools/open-vm-tools-11.2.5_p17337674-r3.ebuild b/app-emulation/open-vm-tools/open-vm-tools-11.2.5_p17337674-r3.ebuild
index 0d6b5c3e6f9d..65a8e5d713de 100644
--- a/app-emulation/open-vm-tools/open-vm-tools-11.2.5_p17337674-r3.ebuild
+++ b/app-emulation/open-vm-tools/open-vm-tools-11.2.5_p17337674-r3.ebuild
@@ -5,14 +5,14 @@ EAPI=7
inherit autotools linux-info pam systemd
-DESCRIPTION="Opensourced tools for VMware guests"
+DESCRIPTION="Tools for VMware guests"
HOMEPAGE="https://github.com/vmware/open-vm-tools"
MY_P="${PN}-${PV/_p/-}"
SRC_URI="https://github.com/vmware/open-vm-tools/releases/download/stable-${PV%_p*}/${MY_P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 ~x86"
IUSE="X +deploypkg +dnet doc +fuse gtkmm +icu multimon pam +resolutionkms +ssl +vgauth"
REQUIRED_USE="
multimon? ( X )
diff --git a/app-emulation/protontricks/Manifest b/app-emulation/protontricks/Manifest
index 5bb9c8c5b72b..4393c00ea626 100644
--- a/app-emulation/protontricks/Manifest
+++ b/app-emulation/protontricks/Manifest
@@ -2,5 +2,5 @@ AUX protontricks-1.5.0_no-setuptools-scm.patch 1321 BLAKE2B d96472bf9b0827cbc6bb
DIST protontricks-1.5.2.tar.gz 49590 BLAKE2B 9a4f6b5869d2d23d104c3785a99549e74168d7dea429bed78ed00029ed6431460bab2c8fdd4f3905943b3e93075dea4bc9b0bf472f0044e5cbae3c335d128c12 SHA512 9e57c7ea61ae9a6638ee967041672a85962c9210fe329600bf30ab78f46b2a23cc6f859fb78e50e94686794b3fad81185d83222ca8f67e1dc73b578df7dcd411
DIST protontricks-1.6.0.tar.gz 61220 BLAKE2B 8a9af6f8cc134ad0e74b4c5e6c35bc8344687e65cc9811ca54402b16f723264cef8def6e733a532fd412db51d0ec63533baec52699ae994a97ecad0a25ebe847 SHA512 7276d7de1f0c18afc5c67552290888e3851bd5f073bbbf684000be66c2e65abac84b079373b120ff0ab6e4f4919caf8ee1288a2320de6c37629cb1185dfbea29
EBUILD protontricks-1.5.2.ebuild 1443 BLAKE2B a64ee0e8679859aa818b2c34e42dadfe9eb194c6f97d526cbc4dec8ff0121598f8fcb9e9a006d694318cfffa4f8040f25dd664c576bdcc7383669c5eb7d71dd4 SHA512 382d6f5fd98f523cf954763c5cb61bc39668af84eff511e38fe867d50d10b1971dbeb047137ecc5ed44f0a0a94eb62db78f38d86841bbb430dc7c657acce5ca2
-EBUILD protontricks-1.6.0.ebuild 1444 BLAKE2B 7c83362b5064262e13fd90b02297bfaaa297429ad5562c9abe67b43648ec22a821376788bb286822d4595e742fa665f8e1ea3ba3fedcebc8ba64d0f371447868 SHA512 862c1386eeb3b2bae97cf7186d5650f69b6ed75523beb502c6a7fdf3e59fda4c69884904e07413afcab270aceadf5a9486e7f10505901e55cbd2009623ce722f
+EBUILD protontricks-1.6.0.ebuild 1443 BLAKE2B 5f85c7b2f5a01e6a59fb8cb91ae9c894f10176066daa8cdf23e1ad52e9a86d54f2df79c27dddfd4017f982f6c471b89882ecc86d6bbf253274ed3410dfa5c9a5 SHA512 cdf43dc566f66b85282f44b51153e5c9991f7a9b6efb0935edd0f15ef1857055dab2abfc9b9bb632deb6e2b5f2277bdd162476f86913cd35f51db1d1a3cf80d6
MISC metadata.xml 809 BLAKE2B dc0506e6f3224adc867438699359c4eafc389041846c644818732036e04bcb9c789e358a08effdb4b9ff4430521f7fe8ff6800b75aa93d6313e3d85395467741 SHA512 351bb79dc7921e6c62100b3354546185d31578b044393ea5e5b5fea089eb47164882ff4ede30d8a575dea31ec9d0927793f8109d9e63ca4ad6954c1affdbe6f4
diff --git a/app-emulation/protontricks/protontricks-1.6.0.ebuild b/app-emulation/protontricks/protontricks-1.6.0.ebuild
index 11287d6d76bf..2f2c167b9165 100644
--- a/app-emulation/protontricks/protontricks-1.6.0.ebuild
+++ b/app-emulation/protontricks/protontricks-1.6.0.ebuild
@@ -15,7 +15,7 @@ SRC_URI="https://github.com/Matoking/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
IUSE="+gui"
RDEPEND="app-emulation/winetricks
diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index 767d8589f961..484f6d6dbde9 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -6,10 +6,13 @@ AUX qemu-5.2.0-dce-locks.patch 738 BLAKE2B 121372ed4d812a19f365ec88b584a196548f8
AUX qemu-5.2.0-disable-keymap.patch 884 BLAKE2B dbbe245a52615f8894cbac1c94ce3fee2051b1c54def32ec6ad43dedfe8190d02937c28ce93d93eeb13fe82f2ac2df52bec375501e83af53624d8292f8208fe3 SHA512 f84c6f37ce742201b63b308bef5fdaf1dc50e77e0dcf164e85284e338ed7bd861fc0e147fb88668b056ab0f15b4e6cbefbfb2cd2bafeb002c281ae88d08f9703
AUX qemu-5.2.0-strings.patch 799 BLAKE2B 8f249a647714a4a677d1aca5d8d5c19b27a0e1933877a286017928e01ec23d82e41dc1d196a50ba38bcf4ec8b71fd89c89e41b7c9673faf13935188eebaf4a56 SHA512 481917c8ec9c5089c210f80e719f5a65af1193323ccda4d68bec6afaab0d0e6407cee1d05cd1f3b1bfbd7b7a5f9d2cdb42dd12123813f2c3c51116e999c09288
AUX qemu-6.0.0-make.patch 306 BLAKE2B 701c6d929dc7544a2e155243a2545dc488765cf8b733fca29c4f4cb06cad732d72f64c330d95fbcdcf12b174b92b7fa5b713bf833065e5014f8aed1eec22c0a1 SHA512 5d22c6c4085dd0bf58752e21af9addd6a1a670a60f172b488d1ccfb1b9356ce9808a3b9337dd1bd2aa9e06735a3c7a465bc11ae3871cc4294ec609729b2e09c7
+AUX qemu-6.1.0-strings.patch 882 BLAKE2B 9c35aca28371c15e037af5e9deaa90edcad769b5346f7c90cbb7768ce5639b1d1d1204933024241b7349573cc94ebca7a85ebaf051a9fb9dab8ea7d87d843ef9 SHA512 fcbf02a38401dbc7612130bb993dbec72468c926f729cd32e822b39fefe446ed8fd0906d6ffd4557181df753a84d77182fa713a5939300f193008532be88ada4
AUX qemu-binfmt.initd.head 1442 BLAKE2B 23aa5338914aa7c47f9b1cc1d28291abd0ea037a33cca81f990decfafac2907c86c042350c9dd45591d16330846d4e11d2c8a2a409a68ad81656d9c2c51964c0 SHA512 3fec8946a37bfbd2089f5d95089ed5987a198fc0139ee7482d4bb38c2ffa0e165667a7853afcf2b458bc3e2a6540f172c929ca5a334a00db47e2d0f881382c0e
AUX qemu-binfmt.initd.tail 245 BLAKE2B dd59f2944c6e3f0c4d282b94b687a9b5c51dd77c5103fb9889bd9ce56874495397676ae6c8375d9e9e23094828477240778d9e0f361e68cdd63fdad574851561 SHA512 bcca16805f8380d52cc591ea3d65a8f6e5de456730618f6aee301510edb75d235a22d4d7aeed224882210392840adb403eb53234b6cb76a4cb24533852a8b737
DIST qemu-6.0.0.tar.xz 107333232 BLAKE2B 7746329d3e13782b7c346ce4052cc517cfc65cd9b2d514d199e4d5b8570ca79566ec04b0c114db2e97c84e68eb551e0d4cdce1b14b91a88fe08d2a5f682c1418 SHA512 ee3ff00aebec4d8891d2ff6dabe4e667e510b2a4fe3f6190aa34673a91ea32dcd2db2e9bf94c2f1bf05aa79788f17cfbbedc6027c0988ea08a92587b79ee05e4
-EBUILD qemu-6.0.0-r3.ebuild 25687 BLAKE2B d27bfd13df26badcde5a3a3140d1980f3d8fdcad459c6500fa8f668461b2d23ae9fd9f0530dd58484fc688979a60754de01d0d8e8dbb314d982b61d929b5c441 SHA512 03f5132fc62db51a661b20d619bf4ff9b28eb509e90493f2ebb05a3a20d48d947bb139c0b17ba017539e2337cf4a363de08ced82d97e4a769d107d35e8955121
-EBUILD qemu-6.0.0-r53.ebuild 25755 BLAKE2B 28f009e1e9f8d02941ddffda8c1ab50cd2740ba779ef6ae6d7b30cae6e18e4ac5580bcb690db9c1651ce277b1fc025a4d875d5496bc72d2252fbf239139c0716 SHA512 87e40774c283b3fdd30236db7d01f28c6e8ae90b68ffa9d617e130dc0b4e74f3e30b3e6a105f1cc465c22ce9460e47d7408bf9140fcf695f53ab4aa727e87d16
-EBUILD qemu-9999.ebuild 25717 BLAKE2B 1205ede5d7bc9d7e0390e336cae226274ebdc0dff8668aedc8d4ef9eff7d45d0123338c5e5f5c4e1b47cb7bdf712bc1a7ff32b66e482c41a345a1b919ccd95bb SHA512 1fd85860eb57d9532adc47b15d04e917facf8576081de036eaf97b2c5fcd3d63d01d5db797216ebdfbfb9cdb6f8a9871b98158b2ed87f720f03011b8cf55bec3
+DIST qemu-6.1.0.tar.xz 111258808 BLAKE2B 412eecf6d39debd6089b26d3b22e5d25c6c8c30d2eaf31b17c25cc2b3a1b10794a30218dfb151c78801aa295255aa974b297f1fe05b93f14334f203c2af5ccee SHA512 3378ae21c75b77ee6a759827f1fcf7b2a50a0fef07e3b0e89117108022a8d8655fa977e4d65596f4f24f7c735c6594d44b0c6f69732ea4465e88a7406b1d5d3c
+EBUILD qemu-6.0.0-r3.ebuild 25705 BLAKE2B df201ef5eca3ff9a4bac85506f21e46090a0a6833a8e69f23f9098c20ef08a0d285a6ea5c6886c63f2f5cb0bb508f49a2311b73720fb4ebddfe395fb1cb0eb8e SHA512 597ece956b0019cf5c2f258d87dbd48f6f4f62da6058d3ecffb73a5353deaf70c29412c29ea289beb218587436536ea459711b5a8ff829d32d4d36f20222b6d2
+EBUILD qemu-6.0.0-r53.ebuild 25773 BLAKE2B 47a79709694066d58e0bec797842ec7e47620093f4ececdb7bc0b3bfbf5308ab77ba1dfd65496a96701ab15bc58be39f2ce250ca42e3671899e47cd590ff4d7a SHA512 e2ec452965b44ef759ea29b2ab1e5e6e71c82eb2003b8979223f8e49b44eec8367c39afc079993e49950ede76b2276c6ec053f8467cdc72a778a3fa2e4e7463f
+EBUILD qemu-6.1.0.ebuild 25677 BLAKE2B a76260c356b8d28d637026de6da8a307e2b91a9d6e0d78b9c160acf5ac9fccc529252aa5bde910824720477d9bb86a95623724e59ce74c337687d51e5367ae9e SHA512 fb1c7cf27602c5afee1ff7241024db7e923f12963b06f3bab4beae8a601f608b9c360fd6137280a5853e34e81a5b8faddcf1b90e877f6f5a9d09e284d0eead5e
+EBUILD qemu-9999.ebuild 25641 BLAKE2B 83ae500dbf12f4105575280b5ab51fd2d3b745996edd82870c2cbad2603ae5d400f0f76e8e62b21ba7df7dd9196ee5ab531a8a9b3d05c4aeb2228d6be2864255 SHA512 b74d34bbcc5da5310d4b24e39c20805269f452f58611cf8835c27e6da4a652db9173b6899065ca66aa030c43e8284f7e9f9f9d263acc15ba07d55f5e95574ed5
MISC metadata.xml 4404 BLAKE2B 2b4bfa49d040e8ec3d4b6f6ac86dc68fc6c28e96731eacf78894c87b0f8f63c625a9b7b08640b002d20ad8ccde90c0fadab8cbb80808d9f43f238d428a24ec6a SHA512 095113ce8366dcb78945a6cda3bcda99a2add394f3ff6ffd0798c8f8c1ef471ea20bd74b0a2dbfe41155886fa05e3d5e817319931091154164b251f01c41ca1f
diff --git a/app-emulation/qemu/files/qemu-6.1.0-strings.patch b/app-emulation/qemu/files/qemu-6.1.0-strings.patch
new file mode 100644
index 000000000000..2efe7b29330a
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-6.1.0-strings.patch
@@ -0,0 +1,26 @@
+Forward-ported from original patch for 5.2.0.
+
+diff --git a/configure b/configure
+index da2501489f..4660ee3ee5 100755
+--- a/configure
++++ b/configure
+@@ -516,6 +516,7 @@ ld="${LD-${cross_prefix}ld}"
+ ranlib="${RANLIB-${cross_prefix}ranlib}"
+ nm="${NM-${cross_prefix}nm}"
+ strip="${STRIP-${cross_prefix}strip}"
++strings="${STRINGS-${cross_prefix}strings}"
+ windres="${WINDRES-${cross_prefix}windres}"
+ pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
+ query_pkg_config() {
+@@ -2380,9 +2381,9 @@ int main(int argc, char *argv[])
+ EOF
+
+ if compile_prog ; then
+- if strings -a $TMPE | grep -q BiGeNdIaN ; then
++ if $strings -a $TMPE | grep -q BiGeNdIaN ; then
+ bigendian="yes"
+- elif strings -a $TMPE | grep -q LiTtLeEnDiAn ; then
++ elif $strings -a $TMPE | grep -q LiTtLeEnDiAn ; then
+ bigendian="no"
+ else
+ echo big/little test failed
diff --git a/app-emulation/qemu/qemu-6.0.0-r3.ebuild b/app-emulation/qemu/qemu-6.0.0-r3.ebuild
index 30b2df14de08..975fb3832626 100644
--- a/app-emulation/qemu/qemu-6.0.0-r3.ebuild
+++ b/app-emulation/qemu/qemu-6.0.0-r3.ebuild
@@ -242,7 +242,7 @@ BDEPEND="
dev-lang/perl
sys-apps/texinfo
virtual/pkgconfig
- doc? ( dev-python/sphinx )
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
gtk? ( nls? ( sys-devel/gettext ) )
test? (
dev-libs/glib[utils]
diff --git a/app-emulation/qemu/qemu-6.0.0-r53.ebuild b/app-emulation/qemu/qemu-6.0.0-r53.ebuild
index 7a0e85ac85a1..29d79b1c24a3 100644
--- a/app-emulation/qemu/qemu-6.0.0-r53.ebuild
+++ b/app-emulation/qemu/qemu-6.0.0-r53.ebuild
@@ -243,7 +243,7 @@ BDEPEND="
dev-lang/perl
sys-apps/texinfo
virtual/pkgconfig
- doc? ( dev-python/sphinx )
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
gtk? ( nls? ( sys-devel/gettext ) )
test? (
dev-libs/glib[utils]
diff --git a/app-emulation/qemu/qemu-6.1.0.ebuild b/app-emulation/qemu/qemu-6.1.0.ebuild
new file mode 100644
index 000000000000..33bb63f8bb96
--- /dev/null
+++ b/app-emulation/qemu/qemu-6.1.0.ebuild
@@ -0,0 +1,909 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+PYTHON_REQ_USE="ncurses,readline"
+
+FIRMWARE_ABI_VERSION="6.1.0"
+
+inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
+ pax-utils xdg-utils
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://git.qemu.org/git/qemu.git"
+ EGIT_SUBMODULES=(
+ meson
+ tests/fp/berkeley-softfloat-3
+ tests/fp/berkeley-testfloat-3
+ ui/keycodemapdb
+ )
+ inherit git-r3
+ SRC_URI=""
+else
+ SRC_URI="https://download.qemu.org/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
+HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
+
+LICENSE="GPL-2 LGPL-2 BSD-2"
+SLOT="0"
+
+IUSE="accessibility +aio alsa bzip2 capstone +caps +curl debug +doc
+ +fdt fuse glusterfs gnutls gtk infiniband iscsi io-uring
+ jack jemalloc +jpeg kernel_linux
+ kernel_FreeBSD lzo multipath
+ ncurses nfs nls numa opengl +oss +pin-upstream-blobs
+ plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
+ +slirp
+ smartcard snappy spice ssh static static-user systemtap test udev usb
+ usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
+ xfs zstd"
+
+COMMON_TARGETS="
+ aarch64
+ alpha
+ arm
+ cris
+ hppa
+ i386
+ m68k
+ microblaze
+ microblazeel
+ mips
+ mips64
+ mips64el
+ mipsel
+ nios2
+ or1k
+ ppc
+ ppc64
+ riscv32
+ riscv64
+ s390x
+ sh4
+ sh4eb
+ sparc
+ sparc64
+ x86_64
+ xtensa
+ xtensaeb
+"
+IUSE_SOFTMMU_TARGETS="
+ ${COMMON_TARGETS}
+ avr
+ rx
+ tricore
+"
+IUSE_USER_TARGETS="
+ ${COMMON_TARGETS}
+ aarch64_be
+ armeb
+ hexagon
+ mipsn32
+ mipsn32el
+ ppc64abi32
+ ppc64le
+ sparc32plus
+"
+
+use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
+use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
+IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
+
+RESTRICT="!test? ( test )"
+# Allow no targets to be built so that people can get a tools-only build.
+# Block USE flag configurations known to not work.
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ qemu_softmmu_targets_arm? ( fdt )
+ qemu_softmmu_targets_microblaze? ( fdt )
+ qemu_softmmu_targets_mips64el? ( fdt )
+ qemu_softmmu_targets_ppc64? ( fdt )
+ qemu_softmmu_targets_ppc? ( fdt )
+ qemu_softmmu_targets_riscv32? ( fdt )
+ qemu_softmmu_targets_riscv64? ( fdt )
+ sdl-image? ( sdl )
+ static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins !rbd !snappy !udev )
+ static-user? ( !plugins )
+ vhost-user-fs? ( caps seccomp )
+ virgl? ( opengl )
+ virtfs? ( caps xattr )
+ vte? ( gtk )
+ multipath? ( udev )
+ plugins? ( !static !static-user )
+"
+
+# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
+# and user/softmmu targets (qemu-*, qemu-system-*).
+#
+# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
+#
+# The attr lib isn't always linked in (although the USE flag is always
+# respected). This is because qemu supports using the C library's API
+# when available rather than always using the external library.
+ALL_DEPEND="
+ >=dev-libs/glib-2.0[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ python? ( ${PYTHON_DEPS} )
+ systemtap? ( dev-util/systemtap )
+ xattr? ( sys-apps/attr[static-libs(+)] )"
+
+# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
+# softmmu targets (qemu-system-*).
+SOFTMMU_TOOLS_DEPEND="
+ dev-libs/libxml2[static-libs(+)]
+ >=x11-libs/pixman-0.28.0[static-libs(+)]
+ accessibility? (
+ app-accessibility/brltty[api]
+ app-accessibility/brltty[static-libs(+)]
+ )
+ aio? ( dev-libs/libaio[static-libs(+)] )
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ bzip2? ( app-arch/bzip2[static-libs(+)] )
+ capstone? ( dev-libs/capstone:= )
+ caps? ( sys-libs/libcap-ng[static-libs(+)] )
+ curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
+ fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] )
+ fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
+ gnutls? (
+ dev-libs/nettle:=[static-libs(+)]
+ >=net-libs/gnutls-3.0:=[static-libs(+)]
+ )
+ gtk? (
+ x11-libs/gtk+:3
+ vte? ( x11-libs/vte:2.91 )
+ )
+ infiniband? (
+ sys-fabric/libibumad:=[static-libs(+)]
+ sys-fabric/libibverbs:=[static-libs(+)]
+ sys-fabric/librdmacm:=[static-libs(+)]
+ )
+ iscsi? ( net-libs/libiscsi )
+ io-uring? ( sys-libs/liburing:=[static-libs(+)] )
+ jack? ( virtual/jack )
+ jemalloc? ( dev-libs/jemalloc )
+ jpeg? ( virtual/jpeg:0=[static-libs(+)] )
+ lzo? ( dev-libs/lzo:2[static-libs(+)] )
+ multipath? ( sys-fs/multipath-tools )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)]
+ sys-libs/ncurses:=[static-libs(+)]
+ )
+ nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
+ numa? ( sys-process/numactl[static-libs(+)] )
+ opengl? (
+ virtual/opengl
+ media-libs/libepoxy[static-libs(+)]
+ media-libs/mesa[static-libs(+)]
+ media-libs/mesa[egl,gbm]
+ )
+ png? ( media-libs/libpng:0=[static-libs(+)] )
+ pulseaudio? ( media-sound/pulseaudio )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
+ sdl? (
+ media-libs/libsdl2[video]
+ media-libs/libsdl2[static-libs(+)]
+ )
+ sdl-image? ( media-libs/sdl2-image[static-libs(+)] )
+ seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
+ slirp? ( net-libs/libslirp[static-libs(+)] )
+ smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
+ snappy? ( app-arch/snappy:= )
+ spice? (
+ >=app-emulation/spice-protocol-0.12.3
+ >=app-emulation/spice-0.12.0[static-libs(+)]
+ )
+ ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] )
+ udev? ( virtual/libudev:= )
+ usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
+ usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
+ vde? ( net-misc/vde[static-libs(+)] )
+ virgl? ( media-libs/virglrenderer[static-libs(+)] )
+ virtfs? ( sys-libs/libcap )
+ xen? ( app-emulation/xen-tools:= )
+ xfs? ( sys-fs/xfsprogs[static-libs(+)] )
+ zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] )
+"
+
+EDK2_OVMF_VERSION="202105"
+SEABIOS_VERSION="1.14.0"
+
+X86_FIRMWARE_DEPEND="
+ pin-upstream-blobs? (
+ ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary]
+ ~sys-firmware/ipxe-1.21.1[binary,qemu]
+ ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
+ ~sys-firmware/sgabios-0.1_pre10[binary]
+ )
+ !pin-upstream-blobs? (
+ >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}
+ sys-firmware/ipxe[qemu]
+ >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
+ sys-firmware/sgabios
+ )"
+PPC_FIRMWARE_DEPEND="
+ pin-upstream-blobs? (
+ ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
+ )
+ !pin-upstream-blobs? (
+ >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
+ )
+"
+
+BDEPEND="
+ $(python_gen_impl_dep)
+ dev-lang/perl
+ sys-apps/texinfo
+ virtual/pkgconfig
+ doc? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ )
+ gtk? ( nls? ( sys-devel/gettext ) )
+ test? (
+ dev-libs/glib[utils]
+ sys-devel/bc
+ )
+"
+CDEPEND="
+ !static? (
+ ${ALL_DEPEND//\[static-libs(+)]}
+ ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
+ )
+ qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
+ qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
+ qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} )
+ qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} )
+"
+DEPEND="${CDEPEND}
+ kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
+ static? (
+ ${ALL_DEPEND}
+ ${SOFTMMU_TOOLS_DEPEND}
+ )
+ static-user? ( ${ALL_DEPEND} )"
+RDEPEND="${CDEPEND}
+ acct-group/kvm
+ selinux? ( sec-policy/selinux-qemu )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
+ "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
+ "${FILESDIR}"/${PN}-6.0.0-make.patch
+ "${FILESDIR}"/${PN}-6.1.0-strings.patch
+)
+
+QA_PREBUILT="
+ usr/share/qemu/hppa-firmware.img
+ usr/share/qemu/openbios-ppc
+ usr/share/qemu/openbios-sparc64
+ usr/share/qemu/openbios-sparc32
+ usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+ usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+ usr/share/qemu/palcode-clipper
+ usr/share/qemu/s390-ccw.img
+ usr/share/qemu/s390-netboot.img
+ usr/share/qemu/u-boot.e500
+"
+
+QA_WX_LOAD="usr/bin/qemu-i386
+ usr/bin/qemu-x86_64
+ usr/bin/qemu-alpha
+ usr/bin/qemu-arm
+ usr/bin/qemu-cris
+ usr/bin/qemu-m68k
+ usr/bin/qemu-microblaze
+ usr/bin/qemu-microblazeel
+ usr/bin/qemu-mips
+ usr/bin/qemu-mipsel
+ usr/bin/qemu-or1k
+ usr/bin/qemu-ppc
+ usr/bin/qemu-ppc64
+ usr/bin/qemu-ppc64abi32
+ usr/bin/qemu-sh4
+ usr/bin/qemu-sh4eb
+ usr/bin/qemu-sparc
+ usr/bin/qemu-sparc64
+ usr/bin/qemu-armeb
+ usr/bin/qemu-sparc32plus
+ usr/bin/qemu-s390x
+ usr/bin/qemu-unicore32
+"
+
+DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
+kernel module loaded before running kvm. The easiest way to ensure that the
+kernel module is loaded is to load it on boot.
+ For AMD CPUs the module is called 'kvm-amd'.
+ For Intel CPUs the module is called 'kvm-intel'.
+Please review /etc/conf.d/modules for how to load these.
+
+Make sure your user is in the 'kvm' group. Just run
+ $ gpasswd -a <USER> kvm
+then have <USER> re-login.
+
+For brand new installs, the default permissions on /dev/kvm might not let
+you access it. You can tell udev to reset ownership/perms:
+ $ udevadm trigger -c add /dev/kvm
+
+If you want to register binfmt handlers for qemu user targets:
+For openrc:
+ # rc-update add qemu-binfmt
+For systemd:
+ # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is lt 2 6 25; then
+ eerror "This version of KVM requires a host kernel of 2.6.25 or higher."
+ elif use kernel_linux; then
+ if ! linux_config_exists; then
+ eerror "Unable to check your kernel for KVM support"
+ else
+ CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
+ ERROR_KVM="You must enable KVM in your kernel to continue"
+ ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
+ ERROR_KVM_AMD+=" your kernel configuration."
+ ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
+ ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
+ ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
+ ERROR_TUN+=" into your kernel or loaded as a module to use the"
+ ERROR_TUN+=" virtual network device if using -net tap."
+ ERROR_BRIDGE="You will also need support for 802.1d"
+ ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
+ use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
+ ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
+ ERROR_VHOST_NET+=" support"
+
+ if use amd64 || use x86 || use amd64-linux || use x86-linux; then
+ if grep -q AuthenticAMD /proc/cpuinfo; then
+ CONFIG_CHECK+=" ~KVM_AMD"
+ elif grep -q GenuineIntel /proc/cpuinfo; then
+ CONFIG_CHECK+=" ~KVM_INTEL"
+ fi
+ fi
+
+ use python && CONFIG_CHECK+=" ~DEBUG_FS"
+ ERROR_DEBUG_FS="debugFS support required for kvm_stat"
+
+ # Now do the actual checks setup above
+ check_extra_config
+ fi
+ fi
+
+ if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
+ eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
+ eerror "instances are still pointing to it. Please update your"
+ eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
+ eerror "and the right system binary (e.g. qemu-system-x86_64)."
+ die "update your virt configs to not use qemu-kvm"
+ fi
+}
+
+# Sanity check to make sure target lists are kept up-to-date.
+check_targets() {
+ local var=$1 mak=$2
+ local detected sorted
+
+ pushd "${S}"/configs/targets/ >/dev/null || die
+
+ # Force C locale until glibc is updated. #564936
+ detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
+ sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
+ if [[ ${sorted} != "${detected}" ]] ; then
+ eerror "The ebuild needs to be kept in sync."
+ eerror "${var}: ${sorted}"
+ eerror "$(printf '%-*s' ${#var} configure): ${detected}"
+ die "sync ${var} to the list of targets"
+ fi
+
+ popd >/dev/null
+}
+
+src_prepare() {
+ check_targets IUSE_SOFTMMU_TARGETS softmmu
+ check_targets IUSE_USER_TARGETS linux-user
+
+ default
+
+ # Use correct toolchain to fix cross-compiling
+ tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
+ export WINDRES=${CHOST}-windres
+
+ # Verbose builds
+ MAKEOPTS+=" V=1"
+
+ # Remove bundled copy of libfdt
+ rm -r dtc || die
+}
+
+##
+# configures qemu based on the build directory and the build type
+# we are using.
+#
+qemu_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local buildtype=$1
+ local builddir="${S}/${buildtype}-build"
+
+ mkdir "${builddir}"
+
+ local conf_opts=(
+ --prefix=/usr
+ --sysconfdir=/etc
+ --bindir=/usr/bin
+ --libdir=/usr/$(get_libdir)
+ --datadir=/usr/share
+ --docdir=/usr/share/doc/${PF}/html
+ --mandir=/usr/share/man
+ --localstatedir=/var
+ --disable-bsd-user
+ --disable-containers # bug #732972
+ --disable-guest-agent
+ --disable-strip
+
+ # bug #746752: TCG interpreter has a few limitations:
+ # - it does not support FPU
+ # - it's generally slower on non-self-modifying code
+ # It's advantage is support for host architectures
+ # where native codegeneration is not implemented.
+ # Gentoo has qemu keyworded only on targets with
+ # native code generation available. Avoid the interpreter.
+ --disable-tcg-interpreter
+
+ --disable-werror
+ # We support gnutls/nettle for crypto operations. It is possible
+ # to use gcrypt when gnutls/nettle are disabled (but not when they
+ # are enabled), but it's not really worth the hassle. Disable it
+ # all the time to avoid automatically detecting it. #568856
+ --disable-gcrypt
+ --python="${PYTHON}"
+ --cc="$(tc-getCC)"
+ --cxx="$(tc-getCXX)"
+ --host-cc="$(tc-getBUILD_CC)"
+ $(use_enable debug debug-info)
+ $(use_enable debug debug-tcg)
+ $(use_enable doc docs)
+ $(use_enable nls gettext)
+ $(use_enable plugins)
+ $(use_enable xattr attr)
+ )
+
+ # Disable options not used by user targets. This simplifies building
+ # static user targets (USE=static-user) considerably.
+ conf_notuser() {
+ if [[ ${buildtype} == "user" ]] ; then
+ echo "--disable-${2:-$1}"
+ else
+ use_enable "$@"
+ fi
+ }
+ # Enable option only for softmmu build, but not 'user' or 'tools'
+ conf_softmmu() {
+ if [[ ${buildtype} == "softmmu" ]] ; then
+ use_enable "$@"
+ else
+ echo "--disable-${2:-$1}"
+ fi
+ }
+ # Enable option only for tools build, but not 'user' or 'softmmu'
+ conf_tools() {
+ if [[ ${buildtype} == "tools" ]] ; then
+ use_enable "$@"
+ else
+ echo "--disable-${2:-$1}"
+ fi
+ }
+ conf_opts+=(
+ $(conf_notuser accessibility brlapi)
+ $(conf_notuser aio linux-aio)
+ $(conf_notuser bzip2)
+ $(conf_notuser capstone)
+ $(conf_notuser caps cap-ng)
+ $(conf_notuser curl)
+ $(conf_notuser fdt)
+ $(conf_notuser fuse)
+ $(conf_notuser glusterfs)
+ $(conf_notuser gnutls)
+ $(conf_notuser gnutls nettle)
+ $(conf_notuser gtk)
+ $(conf_notuser infiniband rdma)
+ $(conf_notuser iscsi libiscsi)
+ $(conf_notuser io-uring linux-io-uring)
+ $(conf_notuser jemalloc jemalloc)
+ $(conf_notuser jpeg vnc-jpeg)
+ $(conf_notuser kernel_linux kvm)
+ $(conf_notuser lzo)
+ $(conf_notuser multipath mpath)
+ $(conf_notuser ncurses curses)
+ $(conf_notuser nfs libnfs)
+ $(conf_notuser numa)
+ $(conf_notuser opengl)
+ $(conf_notuser png vnc-png)
+ $(conf_notuser rbd)
+ $(conf_notuser sasl vnc-sasl)
+ $(conf_notuser sdl)
+ $(conf_softmmu sdl-image)
+ $(conf_notuser seccomp)
+ $(conf_notuser slirp slirp system)
+ $(conf_notuser smartcard)
+ $(conf_notuser snappy)
+ $(conf_notuser spice)
+ $(conf_notuser ssh libssh)
+ $(conf_notuser udev libudev)
+ $(conf_notuser usb libusb)
+ $(conf_notuser usbredir usb-redir)
+ $(conf_notuser vde)
+ $(conf_notuser vhost-net)
+ $(conf_notuser vhost-user-fs)
+ $(conf_tools vhost-user-fs virtiofsd)
+ $(conf_notuser virgl virglrenderer)
+ $(conf_softmmu virtfs)
+ $(conf_notuser vnc)
+ $(conf_notuser vte)
+ $(conf_notuser xen)
+ $(conf_notuser xen xen-pci-passthrough)
+ $(conf_notuser xfs xfsctl)
+ # use prebuilt keymaps, bug #759604
+ --disable-xkbcommon
+ $(conf_notuser zstd)
+ )
+
+ if [[ ${buildtype} == "user" ]] ; then
+ conf_opts+=( --disable-libxml2 )
+ else
+ conf_opts+=( --enable-libxml2 )
+ fi
+
+ if [[ ! ${buildtype} == "user" ]] ; then
+ # audio options
+ local audio_opts=(
+ # Note: backend order matters here: #716202
+ # We iterate from higher-level to lower level.
+ $(usex pulseaudio pa "")
+ $(usev jack)
+ $(usev sdl)
+ $(usev alsa)
+ $(usev oss)
+ )
+ conf_opts+=(
+ --audio-drv-list=$(printf "%s," "${audio_opts[@]}")
+ )
+ fi
+
+ case ${buildtype} in
+ user)
+ conf_opts+=(
+ --enable-linux-user
+ --disable-system
+ --disable-blobs
+ --disable-tools
+ )
+ local static_flag="static-user"
+ ;;
+ softmmu)
+ conf_opts+=(
+ --disable-linux-user
+ --enable-system
+ --disable-tools
+ )
+ local static_flag="static"
+ ;;
+ tools)
+ conf_opts+=(
+ --disable-linux-user
+ --disable-system
+ --disable-blobs
+ --enable-tools
+ )
+ local static_flag="static"
+ ;;
+ esac
+
+ local targets="${buildtype}_targets"
+ [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
+
+ # Add support for SystemTAP
+ use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
+
+ # We always want to attempt to build with PIE support as it results
+ # in a more secure binary. But it doesn't work with static or if
+ # the current GCC doesn't have PIE support.
+ if use ${static_flag}; then
+ conf_opts+=( --static --disable-pie )
+ else
+ tc-enables-pie && conf_opts+=( --enable-pie )
+ fi
+
+ # Meson will not use a cross-file unless cross_prefix is set.
+ tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" )
+
+ # Plumb through equivalent of EXTRA_ECONF to allow experiments
+ # like bug #747928.
+ conf_opts+=( ${EXTRA_CONF_QEMU} )
+
+ echo "../configure ${conf_opts[*]}"
+ cd "${builddir}"
+ ../configure "${conf_opts[@]}" || die "configure failed"
+
+ # FreeBSD's kernel does not support QEMU assigning/grabbing
+ # host USB devices yet
+ use kernel_FreeBSD && \
+ sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
+}
+
+src_configure() {
+ local target
+
+ python_setup
+
+ softmmu_targets= softmmu_bins=()
+ user_targets= user_bins=()
+
+ for target in ${IUSE_SOFTMMU_TARGETS} ; do
+ if use "qemu_softmmu_targets_${target}"; then
+ softmmu_targets+=",${target}-softmmu"
+ softmmu_bins+=( "qemu-system-${target}" )
+ fi
+ done
+
+ for target in ${IUSE_USER_TARGETS} ; do
+ if use "qemu_user_targets_${target}"; then
+ user_targets+=",${target}-linux-user"
+ user_bins+=( "qemu-${target}" )
+ fi
+ done
+
+ softmmu_targets=${softmmu_targets#,}
+ user_targets=${user_targets#,}
+
+ [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
+ [[ -n ${user_targets} ]] && qemu_src_configure "user"
+ qemu_src_configure "tools"
+}
+
+src_compile() {
+ if [[ -n ${user_targets} ]]; then
+ cd "${S}/user-build"
+ default
+ fi
+
+ if [[ -n ${softmmu_targets} ]]; then
+ cd "${S}/softmmu-build"
+ default
+ fi
+
+ cd "${S}/tools-build"
+ default
+}
+
+src_test() {
+ if [[ -n ${softmmu_targets} ]]; then
+ cd "${S}/softmmu-build"
+ pax-mark m */qemu-system-* #515550
+ emake check
+ fi
+}
+
+qemu_python_install() {
+ python_domodule "${S}/python/qemu"
+
+ python_doscript "${S}/scripts/kvm/vmxcap"
+ python_doscript "${S}/scripts/qmp/qmp-shell"
+ python_doscript "${S}/scripts/qmp/qemu-ga-client"
+}
+
+# Generate binfmt support files.
+# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
+# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
+generate_initd() {
+ local out="${T}/qemu-binfmt"
+ local out_systemd="${T}/qemu.conf"
+ local d="${T}/binfmt.d"
+
+ einfo "Generating qemu binfmt scripts and configuration files"
+
+ # Generate the debian fragments first.
+ mkdir -p "${d}"
+ "${S}"/scripts/qemu-binfmt-conf.sh \
+ --debian \
+ --exportdir "${d}" \
+ --qemu-path "${EPREFIX}/usr/bin" \
+ || die
+ # Then turn the fragments into a shell script we can source.
+ sed -E -i \
+ -e 's:^([^ ]+) (.*)$:\1="\2":' \
+ "${d}"/* || die
+
+ # Generate the init.d script by assembling the fragments from above.
+ local f qcpu package interpreter magic mask
+ cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
+ for f in "${d}"/qemu-* ; do
+ source "${f}"
+
+ # Normalize the cpu logic like we do in the init.d for the native cpu.
+ qcpu=${package#qemu-}
+ case ${qcpu} in
+ arm*) qcpu="arm";;
+ mips*) qcpu="mips";;
+ ppc*) qcpu="ppc";;
+ s390*) qcpu="s390";;
+ sh*) qcpu="sh";;
+ sparc*) qcpu="sparc";;
+ esac
+
+ # we use 'printf' here to be portable across 'sh'
+ # implementations: #679168
+ cat <<EOF >>"${out}"
+ if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
+ printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
+ fi
+EOF
+
+ echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
+
+ done
+ cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
+}
+
+src_install() {
+ if [[ -n ${user_targets} ]]; then
+ cd "${S}/user-build"
+ emake DESTDIR="${ED}" install
+
+ # Install binfmt handler init script for user targets.
+ generate_initd
+ doinitd "${T}/qemu-binfmt"
+
+ # Install binfmt/qemu.conf.
+ insinto "/usr/share/qemu/binfmt.d"
+ doins "${T}/qemu.conf"
+ fi
+
+ if [[ -n ${softmmu_targets} ]]; then
+ cd "${S}/softmmu-build"
+ emake DESTDIR="${ED}" install
+
+ # This might not exist if the test failed. #512010
+ [[ -e check-report.html ]] && dodoc check-report.html
+
+ if use kernel_linux; then
+ udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules
+ fi
+
+ if use python; then
+ python_foreach_impl qemu_python_install
+ fi
+ fi
+
+ cd "${S}/tools-build"
+ emake DESTDIR="${ED}" install
+
+ # Disable mprotect on the qemu binaries as they use JITs to be fast #459348
+ pushd "${ED}"/usr/bin >/dev/null
+ pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
+ popd >/dev/null
+
+ # Install config file example for qemu-bridge-helper
+ insinto "/etc/qemu"
+ doins "${FILESDIR}/bridge.conf"
+
+ cd "${S}"
+ dodoc MAINTAINERS docs/specs/pci-ids.txt
+ newdoc pc-bios/README README.pc-bios
+
+ # Disallow stripping of prebuilt firmware files.
+ dostrip -x ${QA_PREBUILT}
+
+ if [[ -n ${softmmu_targets} ]]; then
+ # Remove SeaBIOS since we're using the SeaBIOS packaged one
+ rm "${ED}/usr/share/qemu/bios.bin"
+ rm "${ED}/usr/share/qemu/bios-256k.bin"
+ if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
+ dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
+ dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
+ fi
+
+ # Remove vgabios since we're using the seavgabios packaged one
+ rm "${ED}/usr/share/qemu/vgabios.bin"
+ rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
+ rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
+ rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
+ rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
+ rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
+ # PPC/PPC64 loads vgabios-stdvga
+ if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then
+ dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
+ dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
+ dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
+ dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
+ dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
+ dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
+ fi
+
+ # Remove sgabios since we're using the sgabios packaged one
+ rm "${ED}/usr/share/qemu/sgabios.bin"
+ if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
+ dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
+ fi
+
+ # Remove iPXE since we're using the iPXE packaged one
+ rm "${ED}"/usr/share/qemu/pxe-*.rom
+ if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
+ dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
+ dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
+ dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
+ dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
+ dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
+ dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
+ fi
+ fi
+
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_create_doc
+}
+
+firmware_abi_change() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+pkg_postinst() {
+ if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
+ udev_reload
+ fi
+
+ xdg_icon_cache_update
+
+ [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \
+ fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper
+
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_print_elog
+
+ if use pin-upstream-blobs && firmware_abi_change; then
+ ewarn "This version of qemu pins new versions of firmware blobs:"
+ ewarn " $(best_version sys-firmware/edk2-ovmf)"
+ ewarn " $(best_version sys-firmware/ipxe)"
+ ewarn " $(best_version sys-firmware/seabios)"
+ ewarn " $(best_version sys-firmware/sgabios)"
+ ewarn "This might break resume of hibernated guests (started with a different"
+ ewarn "firmware version) and live migration to/from qemu versions with different"
+ ewarn "firmware. Please (cold) restart all running guests. For functional"
+ ewarn "guest migration ensure that all"
+ ewarn "hosts run at least"
+ ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
+ fi
+}
+
+pkg_info() {
+ echo "Using:"
+ echo " $(best_version app-emulation/spice-protocol)"
+ echo " $(best_version sys-firmware/edk2-ovmf)"
+ if has_version 'sys-firmware/edk2-ovmf[binary]'; then
+ echo " USE=binary"
+ else
+ echo " USE=''"
+ fi
+ echo " $(best_version sys-firmware/ipxe)"
+ echo " $(best_version sys-firmware/seabios)"
+ if has_version 'sys-firmware/seabios[binary]'; then
+ echo " USE=binary"
+ else
+ echo " USE=''"
+ fi
+ echo " $(best_version sys-firmware/sgabios)"
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild
index 8aa463f41c8e..d887f5b1537a 100644
--- a/app-emulation/qemu/qemu-9999.ebuild
+++ b/app-emulation/qemu/qemu-9999.ebuild
@@ -6,10 +6,10 @@ EAPI="7"
PYTHON_COMPAT=( python3_{7,8,9,10} )
PYTHON_REQ_USE="ncurses,readline"
-FIRMWARE_ABI_VERSION="6.0.0-r50"
+FIRMWARE_ABI_VERSION="6.1.0"
-inherit eutils linux-info toolchain-funcs multilib python-r1
-inherit udev fcaps readme.gentoo-r1 pax-utils xdg-utils
+inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
+ pax-utils xdg-utils
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://git.qemu.org/git/qemu.git"
@@ -75,11 +75,8 @@ COMMON_TARGETS="
IUSE_SOFTMMU_TARGETS="
${COMMON_TARGETS}
avr
- lm32
- moxie
rx
tricore
- unicore32
"
IUSE_USER_TARGETS="
${COMMON_TARGETS}
@@ -243,7 +240,10 @@ BDEPEND="
dev-lang/perl
sys-apps/texinfo
virtual/pkgconfig
- doc? ( dev-python/sphinx )
+ doc? (
+ dev-python/sphinx
+ dev-python/sphinx_rtd_theme
+ )
gtk? ( nls? ( sys-devel/gettext ) )
test? (
dev-libs/glib[utils]
@@ -273,10 +273,9 @@ RDEPEND="${CDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
- "${FILESDIR}"/${PN}-5.2.0-strings.patch
- "${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch
"${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
- "${FILESDIR}"/${PN}-5.2.0-dce-locks.patch
+ "${FILESDIR}"/${PN}-6.0.0-make.patch
+ "${FILESDIR}"/${PN}-6.1.0-strings.patch
)
QA_PREBUILT="
@@ -389,7 +388,7 @@ check_targets() {
local var=$1 mak=$2
local detected sorted
- pushd "${S}"/default-configs/targets/ >/dev/null || die
+ pushd "${S}"/configs/targets/ >/dev/null || die
# Force C locale until glibc is updated. #564936
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
diff --git a/app-emulation/snapd/Manifest b/app-emulation/snapd/Manifest
index 271c8b6d7569..99d7dfa07654 100644
--- a/app-emulation/snapd/Manifest
+++ b/app-emulation/snapd/Manifest
@@ -1,6 +1,8 @@
AUX README.gentoo 1941 BLAKE2B dd25269f2aaaea693701d74511d632bc45f2c99954ae683cb81d4df41c4c1f8007bb6c337234e46bfc5973aa7e8356cd12ac510e9109eca09890cbc42bd184bb SHA512 5b522e6c29bdad84a71245fa1f0289e9cfed0501d936b433829f66ef9d655f3cc13d6bca29beeae2c00e1b68f9fa30058608b9c4cde86ba66eab67bd011c9d00
DIST snapd-2.48.tar.xz 3757292 BLAKE2B 4d1fd4b9ff3bd7cf05ebf0e27db4bcc87b5de689be470b4c62758e411e9d99a541ae084c7b1afe4ede44ad6dce19a53b337dcddc18d0b82957ef537f466e720a SHA512 27e1924d86296a969cd18980d6100c8e41be66f2ad0214ac2857580a2686b1e7ef01e2561c6ed532106eadb1ac2d5fd070ef9eb05e5fabfb8fa9a98456259b89
DIST snapd-2.51.tar.xz 4036884 BLAKE2B debdfe51407306451ecdb7851e3768be5aa5b9714b2861cb17e9989194dfbf441b1569955c6440a7d44f1d36996b398bcf60b903a76116e14dcc3173625e105c SHA512 959cceb8fcb326a14557347cecfb931763084e00639b828dc539646d2988cdeb3c9276ab8b770c6bbe37c7a05fb6548f609f490c55f7ee28713a4eb80cf3da15
+DIST snapd-2.52.tar.xz 4146496 BLAKE2B 49b952503c60b589fe7ddea9ded135139243da34b35b39d9e309df6854109fb3a99f52ca324737fa7f5773221d453f7093047dcdcb1114d0389e20ba24c3d2c3 SHA512 56d3a2c5048d2ffde5b34f63e6a99dc74a7c6e4637f36250f674a68863c4b997cf940689529eca9d3bf58b0148cc18a0b4033d93aa06375a5f12c552d40472da
EBUILD snapd-2.48.ebuild 5366 BLAKE2B 1dd5ce2d317e9be68f85edae48806f53fd8e79f7479c08af66b0dd329273f80fc9d8fded1550af67210e751ae276a4848fb3e51f13c172376cd865d47bff9ea0 SHA512 2f237c6514e5319eb4d99578f7b1ad2c4a9f506bf29e7f3d5212a41eb56c0a9158f19b11f4a0385653e146691890427f2b07eaf5dbd4c743a95aba1339c13ad1
EBUILD snapd-2.51.ebuild 5372 BLAKE2B af735d3f690eb176b37611bc16770bfd92c311bbe8578254b9859b57df1ccb9e650358f40b24770934198a7edd74df758848f70b79503869da11dcc388a04381 SHA512 41d520a0c0a03d47e00b01dd67db1336599c42af377e6b8213c257ff751ec6fb1593c250b37b0c6668b515f30bb16a4fd7d459fe3d1376dcaa39d16e19555ce8
+EBUILD snapd-2.52.ebuild 5372 BLAKE2B af735d3f690eb176b37611bc16770bfd92c311bbe8578254b9859b57df1ccb9e650358f40b24770934198a7edd74df758848f70b79503869da11dcc388a04381 SHA512 41d520a0c0a03d47e00b01dd67db1336599c42af377e6b8213c257ff751ec6fb1593c250b37b0c6668b515f30bb16a4fd7d459fe3d1376dcaa39d16e19555ce8
MISC metadata.xml 636 BLAKE2B 4a281c549f4279097b8cb1739e557eabe36f97e8c43e1736c68385bb4f0fe46d6952991b0e0ca531552ec27fd9f3c990324c2f35d44cf6030a4957f6eaf4f441 SHA512 6cb86bb37aa587be9744e8a45f80bc8c78df644f97f7cfbd8c7e0228d26ea7a1d834ef8e1542bed099e1b80f7c91797871e4b447102c4bfbf2f46489b59dc244
diff --git a/app-emulation/snapd/snapd-2.52.ebuild b/app-emulation/snapd/snapd-2.52.ebuild
new file mode 100644
index 000000000000..abc28376ab87
--- /dev/null
+++ b/app-emulation/snapd/snapd-2.52.ebuild
@@ -0,0 +1,180 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGO_PN="github.com/snapcore/${PN}"
+inherit autotools bash-completion-r1 golang-vcs-snapshot linux-info readme.gentoo-r1 systemd xdg-utils
+
+DESCRIPTION="Service and tools for management of snap packages"
+HOMEPAGE="http://snapcraft.io/"
+
+MY_S="${S}/src/github.com/snapcore/${PN}"
+
+SRC_URI="https://github.com/snapcore/${PN}/releases/download/${PV}/${PN}_${PV}.vendor.tar.xz -> ${P}.tar.xz"
+MY_PV=${PV}
+KEYWORDS="~amd64"
+
+LICENSE="GPL-3 Apache-2.0 BSD BSD-2 LGPL-3-with-linking-exception MIT"
+SLOT="0"
+IUSE="apparmor +cgroup-hybrid +forced-devmode gtk kde systemd"
+REQUIRED_USE="!forced-devmode? ( apparmor cgroup-hybrid ) systemd"
+
+CONFIG_CHECK="~CGROUPS
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+ ~NAMESPACES
+ ~SQUASHFS
+ ~SQUASHFS_ZLIB
+ ~SQUASHFS_LZO
+ ~SQUASHFS_XZ
+ ~BLK_DEV_LOOP
+ ~SECCOMP
+ ~SECCOMP_FILTER"
+
+RDEPEND="
+ sys-libs/libseccomp:=
+ apparmor? (
+ sec-policy/apparmor-profiles
+ sys-apps/apparmor:=
+ )
+ dev-libs/glib
+ virtual/libudev
+ systemd? ( sys-apps/systemd[cgroup-hybrid(+)?] )
+ sys-libs/libcap:=
+ sys-fs/squashfs-tools[lzma]"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ >=dev-lang/go-1.9
+ dev-python/docutils
+ sys-devel/gettext
+ sys-fs/xfsprogs"
+
+PDEPEND="sys-auth/polkit[gtk?,kde?]"
+
+README_GENTOO_SUFFIX=""
+
+pkg_setup() {
+ if use apparmor; then
+ CONFIG_CHECK+=" ~SECURITY_APPARMOR"
+ fi
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+ # Update apparmor profile to allow libtinfow.so*
+ sed -i 's/libtinfo/libtinfo{,w}/' \
+ "${MY_S}/cmd/snap-confine/snap-confine.apparmor.in" || die
+
+ if ! use forced-devmode; then
+ sed -e 's#return \(!apparmorFull || cgroupv2\)#//\1\n\tif !apparmorFull || cgroupv2 {\n\t\tpanic("USE=forced-devmode is disabled")\n\t}\n\treturn false#' \
+ -i "${MY_S}/sandbox/forcedevmode.go" || die
+ grep -q 'panic("USE=forced-devmode is disabled")' "${MY_S}/sandbox/forcedevmode.go" || die "failed to disable forced-devmode"
+ fi
+
+ sed -i 's:command -v git >/dev/null:false:' -i "${MY_S}/mkversion.sh" || die
+
+ pushd "${MY_S}" >/dev/null || die
+ ./mkversion.sh "${PV}"
+ popd >/dev/null || die
+ pushd "${MY_S}/cmd" >/dev/null || die
+ eautoreconf
+}
+
+src_configure() {
+ SNAPD_MAKEARGS=(
+ "BINDIR=${EPREFIX}/usr/bin"
+ "DBUSSERVICESDIR=${EPREFIX}/usr/share/dbus-1/services"
+ "LIBEXECDIR=${EPREFIX}/usr/lib"
+ "SNAP_MOUNT_DIR=${EPREFIX}/var/lib/snapd/snap"
+ "SYSTEMDSYSTEMUNITDIR=$(systemd_get_systemunitdir)"
+ )
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+
+ pushd "${MY_S}/cmd" >/dev/null || die
+ econf --libdir="${EPREFIX}/usr/lib" \
+ --libexecdir="${EPREFIX}/usr/lib/snapd" \
+ $(use_enable apparmor) \
+ --enable-nvidia-biarch \
+ --with-snap-mount-dir="${EPREFIX}/var/lib/snapd/snap"
+}
+
+src_compile() {
+ export -n GOCACHE XDG_CACHE_HOME
+ export GO111MODULE=off GOBIN="${S}/bin" GOPATH="${S}"
+
+ local file
+ for file in "${MY_S}/po/"*.po; do
+ msgfmt "${file}" -o "${file%.po}.mo" || die
+ done
+
+ emake -C "${MY_S}/data" "${SNAPD_MAKEARGS[@]}"
+
+ local -a flags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS}'" -trimpath)
+ local -a staticflags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS} -static'" -trimpath)
+
+ local cmd
+ for cmd in snap snapd snap-bootstrap snap-failure snap-preseed snap-recovery-chooser snap-repair snap-seccomp; do
+ go build -o "${GOBIN}/${cmd}" "${flags[@]}" \
+ -v -x "github.com/snapcore/${PN}/cmd/${cmd}"
+ [[ -e "${GOBIN}/${cmd}" ]] || die "failed to build ${cmd}"
+ done
+ for cmd in snapctl snap-exec snap-update-ns; do
+ go build -o "${GOBIN}/${cmd}" "${staticflags[@]}" \
+ -v -x "github.com/snapcore/${PN}/cmd/${cmd}"
+ [[ -e "${GOBIN}/${cmd}" ]] || die "failed to build ${cmd}"
+ done
+}
+
+src_install() {
+ emake -C "${MY_S}/data" install "${SNAPD_MAKEARGS[@]}" DESTDIR="${D}"
+ emake -C "${MY_S}/cmd" install "${SNAPD_MAKEARGS[@]}" DESTDIR="${D}"
+
+ if use apparmor; then
+ mv "${ED}/etc/apparmor.d/usr.lib.snapd.snap-confine"{,.real} || die
+ keepdir /var/lib/snapd/apparmor/profiles
+ fi
+ keepdir /var/lib/snapd/{apparmor/snap-confine,cache,cookie,snap,void}
+ fperms 700 /var/lib/snapd/{cache,cookie}
+
+ dobin "${GOBIN}/"{snap,snapctl}
+ ln "${ED}/usr/bin/snapctl" "${ED}/usr/lib/snapd/snapctl" || die
+
+ exeinto /usr/lib/snapd
+ doexe "${GOBIN}/"{snapd,snap-bootstrap,snap-failure,snap-exec,snap-preseed,snap-recovery-chooser,snap-repair,snap-seccomp,snap-update-ns} \
+ "${MY_S}/"{cmd/snap-confine/snap-device-helper,cmd/snap-discard-ns/snap-discard-ns,cmd/snap-gdb-shim/snap-gdb-shim,cmd/snap-mgmt/snap-mgmt} \
+ "${MY_S}/data/completion/bash/"{complete.sh,etelpmoc.sh,}
+
+ dobashcomp "${MY_S}/data/completion/bash/snap"
+
+ insinto /usr/share/zsh/site-functions
+ doins "${MY_S}/data/completion/zsh/_snap"
+
+ insinto "/usr/share/polkit-1/actions"
+ doins "${MY_S}/data/polkit/io.snapcraft.snapd.policy"
+
+ dodoc "${MY_S}/packaging/ubuntu-16.04/changelog"
+ domo "${MY_S}/po/"*.mo
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ xdg_desktop_database_update
+
+ if use apparmor && [[ -z ${ROOT} && -e /sys/kernel/security/apparmor/profiles &&
+ $(wc -l < /sys/kernel/security/apparmor/profiles) -gt 0 ]]; then
+ apparmor_parser -r "${EPREFIX}/etc/apparmor.d/usr.lib.snapd.snap-confine.real"
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest
index ddd4a27626dd..952716168891 100644
--- a/app-emulation/wine-staging/Manifest
+++ b/app-emulation/wine-staging/Manifest
@@ -1,4 +1,3 @@
-AUX wine-staging-6.12-winegcc-equals-args.patch 666 BLAKE2B 1546e146a5942c46c01e72d06693e0875dc84483159a404d1a13824b29e2539f2abe95f2086509de049ef0477a0846be7149e82949f5c55aa5c8da925679773f SHA512 6377b3f86966a19c1129c75da6e2bfdbee2c2ee7d7c38460778239adc01fd56328a20b74b9c73d5b757f0d53abc91bc498d71f988eba316267bb508234a98a8f
DIST gentoo-wine-patches-20200523.tar.xz 59740 BLAKE2B 951d7f305a6e5b3759c8095629d48de4830b8a0c9558de859a9e02d9824fe85553fda2bc0820ca97022a0ca63ac28473dadfe827821220445dbf1a7fd15c7c98 SHA512 46eea45c982b475e3ff444cbd87c6a0a235fc8dcaf3d83d89655a10ed8841a9ddb09e5a638a05803f3bf2c3bd34165c16067aba561efa4c183ee396dc31cdf75
DIST wine-6.14.tar.xz 24721316 BLAKE2B 3965d4071006a54f595baf329c1b238c4faa506d60597cfb5f8ccb127b9881d34d66e89cbdeff0d05a5e4a203a541edea8953565e2edf464ce4d2bfbf5e7a437 SHA512 261858dcf11604a6078b39faf64bd05288194647f8397efe03abcda1934ec5452e18f85dbb269e728ef532ac8ad39af5bbf5d8603f3598a20e2ef16f60405581
DIST wine-6.15.tar.xz 24751680 BLAKE2B f1e8df4f6a65f5776b260edf5a12a48810b24ea668be5ef8b405b64a057a16329a30d0b295eefb8f79d378faa243c20884de543e96213ed5ee22b6c752dab028 SHA512 bb4420a6fb0455aaab2f45354ea470acba9feeaea07b6c2cbf8afd49a6ef97bfc794cee330ecb12fb2098994738227d149cd5685d29310bb6cd0ed25d5fdc8bf
diff --git a/app-emulation/wine-staging/files/wine-staging-6.12-winegcc-equals-args.patch b/app-emulation/wine-staging/files/wine-staging-6.12-winegcc-equals-args.patch
deleted file mode 100644
index 562b63af063a..000000000000
--- a/app-emulation/wine-staging/files/wine-staging-6.12-winegcc-equals-args.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.winehq.org/show_bug.cgi?id=51413
-https://bugs.gentoo.org/800809
---- a/tools/winegcc/winegcc.c
-+++ b/tools/winegcc/winegcc.c
-@@ -1982,7 +1982,7 @@ int main(int argc, char **argv)
- if (strncmp("-Wl,", opts.args->base[i], 4) == 0)
- {
- unsigned int j;
-- strarray* Wl = strarray_fromstring(opts.args->base[i] + 4, ",=");
-+ strarray* Wl = strarray_fromstring(opts.args->base[i] + 4, ",");
- for (j = 0; j < Wl->size; j++)
- {
- if (!strcmp(Wl->base[j], "--image-base") && j < Wl->size - 1)
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index dc251e7517b4..958b85ece7f8 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -1,4 +1,3 @@
-AUX wine-vanilla-6.12-winegcc-equals-args.patch 666 BLAKE2B 1546e146a5942c46c01e72d06693e0875dc84483159a404d1a13824b29e2539f2abe95f2086509de049ef0477a0846be7149e82949f5c55aa5c8da925679773f SHA512 6377b3f86966a19c1129c75da6e2bfdbee2c2ee7d7c38460778239adc01fd56328a20b74b9c73d5b757f0d53abc91bc498d71f988eba316267bb508234a98a8f
DIST gentoo-wine-patches-20200523.tar.xz 59740 BLAKE2B 951d7f305a6e5b3759c8095629d48de4830b8a0c9558de859a9e02d9824fe85553fda2bc0820ca97022a0ca63ac28473dadfe827821220445dbf1a7fd15c7c98 SHA512 46eea45c982b475e3ff444cbd87c6a0a235fc8dcaf3d83d89655a10ed8841a9ddb09e5a638a05803f3bf2c3bd34165c16067aba561efa4c183ee396dc31cdf75
DIST wine-6.0.1.tar.xz 24210540 BLAKE2B 2075e59024e75594e0be0851db33981ebfcc57477bb9864055a938db0e39b8480f3c501b1d1fc39a9eee52303ad71ef71d24a0fb546697eecf3bb098f13317f1 SHA512 06b720d6adbbb7e2f15b963e4f3f1ff06e6d0d3973064d866ae720e6380bab8881fd1ebf16665435f5f7976b2c6dc72fd20631678a28e9d4d7b068c30cd22bb0
DIST wine-6.0.tar.xz 24192280 BLAKE2B baf0eee582190ede8d210390b51d330c1879cb442100bc2e957052898fbd84bcc047a885065f9bf96ac4f072f92eee44f0e1c3baddc68937286e7cc6f976bd4e SHA512 c0732fbab1da8737d595a876b28ce87eef1440c317746e798642b59b44b34e890de562e0c0cc674e97096f39db82f8e9c3b1cc1ba9edc246b7266a0f7cb00057
diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-6.12-winegcc-equals-args.patch b/app-emulation/wine-vanilla/files/wine-vanilla-6.12-winegcc-equals-args.patch
deleted file mode 100644
index 562b63af063a..000000000000
--- a/app-emulation/wine-vanilla/files/wine-vanilla-6.12-winegcc-equals-args.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.winehq.org/show_bug.cgi?id=51413
-https://bugs.gentoo.org/800809
---- a/tools/winegcc/winegcc.c
-+++ b/tools/winegcc/winegcc.c
-@@ -1982,7 +1982,7 @@ int main(int argc, char **argv)
- if (strncmp("-Wl,", opts.args->base[i], 4) == 0)
- {
- unsigned int j;
-- strarray* Wl = strarray_fromstring(opts.args->base[i] + 4, ",=");
-+ strarray* Wl = strarray_fromstring(opts.args->base[i] + 4, ",");
- for (j = 0; j < Wl->size; j++)
- {
- if (!strcmp(Wl->base[j], "--image-base") && j < Wl->size - 1)
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index f0de6c97b02b..d373cf5d5225 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,4 +1,4 @@
-AUX gentoo-patches.conf 2502 BLAKE2B 05b4fdbd2715099c6ef9bd988112614b518700a3b7bdd0190488ae9d602e1323e6a9ba2335790ace96390f3db8de243f53f20726ddc5df5939943fcbc7eeac2c SHA512 7c8735a4ef6a21caa62363bcbdc93783f9c56524a93572d587e94c5e3a42e687999f4239c284d81b57d2abdd51e2ec7f69367f171adef4d62c3f7bfef09b7b69
+AUX gentoo-patches.conf 3301 BLAKE2B c6850cff51d4f562641bac43d5b04436a5e18ae6806c49ff2a1b2980a6d3fccb27e2309737f465fdc00128d731de74440b34aa78aa088e3515547052ca0a614a SHA512 13e51f05d0bc1c42914ca636cd29cb2208a968a56f28ac268ae323e892e6f5e813864b31d0558def3c00a01e0d3e4beea0824cf132814d962fe91e230c2b8ecb
AUX stubs-32.h 537 BLAKE2B 456f57c4a4ba574c737f1b84b62a085d0290ebc8981a5f96fdebc16b6c86c801c5ca8dde135e803f46c5ec875fdd74770f6ed754880bc7af930b8ce1ce972fb7 SHA512 55308dbedaa91909a2213940f7a7b574cabe6b5a3104761a2a6f28d6aed00164544488c00cbf9d66a9a370a14c6b6d3a00434efd3ff0228cc8e4d81af19c0e68
AUX xen-consoles.logrotate 63 BLAKE2B 4ae650876035d2815dbcacc6ed618c58cc61d9cfd9cde1b6c2f792cbf51898c577ef979443ad827fc82ced4d21ae24836883160b20d697965ef5377d50c2973c SHA512 ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426
AUX xen-tools-4.15.0-fix-xenstat-python-bindings.patch 850 BLAKE2B e0150d32e01ddda954b97eee9d4f0df97f01b710193e803c7db08776bee71b8a05b78ab1bec858c69834a3b61a7562dd25b6c78ad49dc9d5a68109ad171d17b7 SHA512 25df248f40d37be130f8601d5b7a0e21562c31e9d4e4b65af632048e7b29d63397434ce45afeee0eeb6686ed43f7b659427ca6e151cbd17007798058917abd7c
@@ -22,9 +22,13 @@ DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf
DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
+DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16
DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
+DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
EBUILD xen-tools-4.14.2-r1.ebuild 16894 BLAKE2B 7ca989c17e00354912ae4470e99f0e9c669c4bf94c463c709d5616968cb1c18467ff884c307ba51af3864983e2e2b4e2a7233a7f7e2368e8dac0cff6c795ebe1 SHA512 1a863617ca7dda05ad950d7f3f85d2e502c602b31966483472fedc04ed6074962ef10cf137e15c50311167ba87e56318d540d05af4baf2ad680c22f883094d47
+EBUILD xen-tools-4.14.3.ebuild 17085 BLAKE2B 307122a50a4d2869b17d52c81644644c2e154faff80022b5a61fa71441ca92ba75d767f0cbda99f83f6f1ff519076b299b46caf87cf2004474f6d61fcf51eba2 SHA512 add91512fab0dd7f92d6e7eb6451653556ca73d3b7e44e66387f1944fc0a1c93f3fbf9e8de879d55d2fcf3d2077ad370d8b161f9569a03dce26b87fbbb81c8c9
EBUILD xen-tools-4.15.0-r2.ebuild 17083 BLAKE2B b0e87f450797d82cac0577d0153520242f3360251ab0bd9a96ff40fa272f310b545933a31b313cef03d33667c7de4f1e5cad9d0a5f273d3ab76388ae93fbd929 SHA512 c1fc4f872a06fc51cd82258c9a15d56a95d31ba21623a9e4169f26f06f2ada27438dff1282c97ff888dee20e644324c617a3a3a27e9db57f4ca1cd2dc9ac8374
+EBUILD xen-tools-4.15.1.ebuild 17294 BLAKE2B 83ea2598cc5f00497864ec079d7e2f6ee99a32c00d50a3f9f17e45d39d978ffa37a9eaad4c847cfaebd6baae9586a27f3038cad0254fae6bccea37dcfab3ca82 SHA512 a04b3a7937e324652e5b411aa83c5aa4787397f64791ea17ffead62987185311374916239bb5c810267487e05b5d6eefb64e7a22979ac1e730bcff228ad5e651
MISC metadata.xml 1627 BLAKE2B db09991191c1ab78dbb026789a86f3988e6a4c98fd654ce6b231939ad907ee2b709bf8005ffef7ff5c958264a0411f467b143b85ffccf2e63f505c82951ddd98 SHA512 46704ca7bfa042b6dfd8322dba515e2d886347ea518a1556c01a195fd5cdccbd0b961ba2fab718d4db3c917d4ed7c228672dde5ae8f61c02be7dd3cb7b1be47e
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf
index d8c6e67b10c3..3651d99a68a2 100644
--- a/app-emulation/xen-tools/files/gentoo-patches.conf
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf
@@ -67,6 +67,21 @@ _gpv_xen_tools_4142_0="
xen-tools-4-qemu-fix-po-collision.patch
"
+# xen-tools-4.14.3 patches set
+_gpv_xen_tools_4143_0="
+ xen-tools-4.12.0-gcc8.patch
+ xen-tools-4.12.0-shim.patch
+ xen-tools-4.12.0-unbundle-ipxe.patch
+ xen-tools-4.12.2-libxenstat-makefile.patch
+ xen-tools-4.14-ar-cc.patch
+ xen-tools-4.14-qemu-bridge.patch
+ xen-tools-4.15.0-disable-werror.patch
+ xen-tools-4.4.1-tinfo.patch
+ xen-tools-4.6-increase-stack-size.patch
+ xen-tools-4-anti-ovmf-download.patch
+ xen-tools-4-qemu-fix-po-collision.patch
+"
+
# xen-tools-4.15.0 patches set
_gpv_xen_tools_4150_0="
xen-tools-4.14-ar-cc.patch
@@ -80,3 +95,15 @@ _gpv_xen_tools_4150_0="
xen-tools-4-anti-ovmf-download.patch
xen-tools-4-qemu-fix-po-collision.patch
"
+
+# xen-tools-4.15.1 patches set
+_gpv_xen_tools_4151_0="
+ xen-tools-4.14-ar-cc.patch
+ xen-tools-4.15.0-disable-werror.patch
+ xen-tools-4.15.0-libxenstat-makefile.patch
+ xen-tools-4.15.0-qemu-bridge.patch
+ xen-tools-4.15.0-unbundle-ipxe.patch
+ xen-tools-4.4.1-tinfo.patch
+ xen-tools-4-anti-ovmf-download.patch
+ xen-tools-4-qemu-fix-po-collision.patch
+"
diff --git a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
new file mode 100644
index 000000000000..550d43d8b601
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
@@ -0,0 +1,533 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ REPO="xen.git"
+ EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+ S="${WORKDIR}/${REPO}"
+else
+ KEYWORDS="amd64 ~arm ~arm64 x86"
+ UPSTREAM_VER=
+ SECURITY_VER=
+ # xen-tools's gentoo patches tarball
+ GENTOO_VER=23
+ # xen-tools's gentoo patches version which apply to this specific ebuild
+ GENTOO_GPV=0
+ # xen-tools ovmf's patches
+ OVMF_VER=
+
+ SEABIOS_VER="1.14.0"
+ EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+ EDK2_OPENSSL_VERSION="1_1_1g"
+ EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+ EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+ IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
+
+ [[ -n ${UPSTREAM_VER} ]] && \
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+ [[ -n ${SECURITY_VER} ]] && \
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+ [[ -n ${GENTOO_VER} ]] && \
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+ [[ -n ${OVMF_VER} ]] && \
+ OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+ https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+ ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+ ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+ https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+ https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+ https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+ ${OVMF_PATCHSET_URI} )
+ ${UPSTREAM_PATCHSET_URI}
+ ${SECURITY_PATCHSET_URI}
+ ${GENTOO_PATCHSET_URI}"
+
+ S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ipxe? ( rombios )
+ ovmf? ( hvm )
+ pygrub? ( python )
+ rombios? ( hvm )
+ system-ipxe? ( rombios )
+ ?? ( ipxe system-ipxe )
+ ?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+ sys-apps/pciutils
+ dev-libs/lzo:2
+ dev-libs/glib:2
+ dev-libs/yajl
+ dev-libs/libaio
+ dev-libs/libgcrypt:0
+ sys-libs/zlib
+ ${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2[-minimal]
+ net-misc/bridge-utils
+ screen? (
+ app-misc/screen
+ app-admin/logrotate
+ )
+ selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+ app-misc/pax-utils
+ >=sys-kernel/linux-headers-4.11
+ x11-libs/pixman
+ $(python_gen_cond_dep '
+ dev-python/lxml[${PYTHON_USEDEP}]
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+ ')
+ x86? ( sys-devel/dev86
+ system-ipxe? ( sys-firmware/ipxe[qemu] )
+ sys-power/iasl )
+ api? ( dev-libs/libxml2
+ net-misc/curl )
+
+ ovmf? (
+ !arm? ( !arm64? ( dev-lang/nasm ) )
+ $(python_gen_impl_dep sqlite)
+ )
+ !amd64? ( >=sys-apps/dtc-1.4.0 )
+ amd64? ( sys-power/iasl
+ system-seabios? ( sys-firmware/seabios )
+ system-ipxe? ( sys-firmware/ipxe[qemu] )
+ rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+ doc? (
+ app-text/ghostscript-gpl
+ app-text/pandoc
+ $(python_gen_cond_dep '
+ dev-python/markdown[${PYTHON_USEDEP}]
+ ')
+ dev-texlive/texlive-latexextra
+ media-gfx/transfig
+ )
+ hvm? ( x11-base/xorg-proto )
+ qemu? (
+ app-arch/snappy:=
+ sdl? (
+ media-libs/libsdl[X]
+ media-libs/libsdl2[X]
+ )
+ )
+ system-qemu? ( app-emulation/qemu[xen] )
+ ocaml? ( dev-ml/findlib
+ dev-lang/ocaml[ocamlopt] )
+ python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+ sys-devel/bison
+ sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+ usr/libexec/xen/boot/hvmloader
+ usr/share/qemu-xen/qemu/hppa-firmware.img
+ usr/share/qemu-xen/qemu/s390-ccw.img
+ usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+ usr/libexec/xen/bin/elf2dmp
+ usr/libexec/xen/bin/ivshmem-client
+ usr/libexec/xen/bin/ivshmem-server
+ usr/libexec/xen/bin/qemu-edid
+ usr/libexec/xen/bin/qemu-img
+ usr/libexec/xen/bin/qemu-io
+ usr/libexec/xen/bin/qemu-keymap
+ usr/libexec/xen/bin/qemu-nbd
+ usr/libexec/xen/bin/qemu-pr-helper
+ usr/libexec/xen/bin/qemu-system-i386
+ usr/libexec/xen/bin/virtfs-proxy-helper
+ usr/libexec/xen/libexec/xen-bridge-helper
+ usr/share/qemu-xen/qemu/s390-ccw.img
+ usr/share/qemu-xen/qemu/s390-netboot.img
+ usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+ python_setup
+ export "CONFIG_LOMOUNT=y"
+
+ #bug 522642, disable compile tools/tests
+ export "CONFIG_TESTS=n"
+
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+ if use x86 && use amd64; then
+ die "Confusion! Both x86 and amd64 are set in your use flags!"
+ elif use x86; then
+ export XEN_TARGET_ARCH="x86_32"
+ elif use amd64 ; then
+ export XEN_TARGET_ARCH="x86_64"
+ elif use arm; then
+ export XEN_TARGET_ARCH="arm32"
+ elif use arm64; then
+ export XEN_TARGET_ARCH="arm64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
+src_prepare() {
+ local i
+
+ # Upstream's patchset
+ if [[ -n ${UPSTREAM_VER} ]]; then
+ einfo "Try to apply Xen Upstream patch set"
+ eapply "${WORKDIR}"/patches-upstream
+ fi
+
+ # Security patchset
+ if [[ -n ${SECURITY_VER} ]]; then
+ einfo "Try to apply Xen Security patch set"
+ # apply main xen patches
+ # Two parallel systems, both work side by side
+ # Over time they may concdense into one. This will suffice for now
+ EPATCH_SUFFIX="patch"
+ EPATCH_FORCE="yes"
+
+ source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+ for i in ${XEN_SECURITY_MAIN}; do
+ eapply "${WORKDIR}"/patches-security/xen/$i
+ done
+
+ # apply qemu-xen/upstream patches
+ pushd "${S}"/tools/qemu-xen/ > /dev/null
+ for i in ${XEN_SECURITY_QEMUU}; do
+ eapply "${WORKDIR}"/patches-security/qemuu/$i
+ done
+ popd > /dev/null
+
+ # apply qemu-traditional patches
+ pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+ for i in ${XEN_SECURITY_QEMUT}; do
+ eapply "${WORKDIR}"/patches-security/qemut/$i
+ done
+ popd > /dev/null
+ fi
+
+ # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+ mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+ pushd tools/firmware/ > /dev/null
+ ln -s seabios-dir-remote seabios-dir || die
+ popd > /dev/null
+
+ # Gentoo's patchset
+ if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+ einfo "Try to apply Gentoo specific patch set"
+ source "${FILESDIR}"/gentoo-patches.conf || die
+ _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+ for i in ${!_gpv}; do
+ eapply "${WORKDIR}"/patches-gentoo/$i
+ done
+ fi
+
+ # Ovmf's patchset
+ if use ovmf; then
+ if [[ -n ${OVMF_VER} ]];then
+ einfo "Try to apply Ovmf patch set"
+ pushd "${WORKDIR}"/edk2-*/ > /dev/null
+ eapply "${WORKDIR}"/patches-ovmf
+ popd > /dev/null
+ fi
+ mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+ rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+ rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+ rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+ rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+ mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+ mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+ cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+ fi
+
+ # ipxe
+ if use ipxe; then
+ cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+ # gcc 11
+ cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+ echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+ fi
+
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+ # Fix texi2html build error with new texi2html, qemu.doc.html
+ sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+ -i tools/firmware/Makefile || die
+
+ # Drop .config, fixes to gcc-4.6
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
+ # drop flags
+ unset CFLAGS
+ unset LDFLAGS
+ unset ASFLAGS
+ unset CPPFLAGS
+
+ if ! use pygrub; then
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+ fi
+
+ if ! use python; then
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+ fi
+
+ if ! use hvm; then
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+ # Bug 351648
+ elif ! use x86 && ! has x86 $(get_all_abis); then
+ mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+ touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+ export CPATH="${WORKDIR}"/extra-headers
+ fi
+
+ if use qemu; then
+ if use sdl; then
+ sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+ tools/Makefile || die
+ else
+ sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+ tools/qemu-xen-traditional/xen-setup || die
+ sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+ tools/Makefile || die
+ fi
+ else
+ # Don't bother with qemu, only needed for fully virtualised guests
+ sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+ fi
+
+ # Reset bash completion dir; Bug 472438
+ sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+ -i Config.mk || die
+ sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+ # xencommons, Bug #492332, sed lighter weight than patching
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+ -i tools/hotplug/Linux/init.d/xencommons.in || die
+
+ # fix bashishm
+ sed -e '/Usage/s/\$//g' \
+ -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+ # respect multilib, usr/lib/libcacard.so.0.0.0
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+ -i tools/qemu-xen/configure || die
+
+ #bug 518136, don't build 32bit exactuable for nomultilib profile
+ if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+ sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+ fi
+
+ # uncomment lines in xl.conf
+ sed -e 's:^#autoballoon=:autoballoon=:' \
+ -e 's:^#lockfile=:lockfile=:' \
+ -e 's:^#vif.default.script=:vif.default.script=:' \
+ -i tools/examples/xl.conf || die
+
+ # disable capstone (Bug #673474)
+ sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+ -i tools/Makefile || die
+
+ # disable glusterfs
+ sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+ -i tools/Makefile || die
+
+ # disable jpeg automagic
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+ -i tools/Makefile || die
+
+ # disable png automagic
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+ -i tools/Makefile || die
+
+ # disable docker (Bug #732970)
+ sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+ -i tools/Makefile || die
+
+ # disable abi-dumper (Bug #791172)
+ sed -e 's/$(ABI_DUMPER) /echo /g' \
+ -i tools/libs/libs.mk || die
+
+ default
+}
+
+src_configure() {
+ local myconf="--prefix=${PREFIX}/usr \
+ --libdir=${PREFIX}/usr/$(get_libdir) \
+ --libexecdir=${PREFIX}/usr/libexec \
+ --localstatedir=${EPREFIX}/var \
+ --disable-golang \
+ --disable-werror \
+ --disable-xen \
+ --enable-tools \
+ --enable-docs \
+ $(use_enable api xenapi) \
+ $(use_enable ipxe) \
+ $(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+ $(use_enable ocaml ocamltools) \
+ $(use_enable ovmf) \
+ $(use_enable pam) \
+ $(use_enable rombios) \
+ --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+ "
+
+ use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+ use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+ use amd64 && myconf+=" $(use_enable qemu-traditional)"
+ tc-ld-disable-gold # Bug 669570
+ econf ${myconf}
+}
+
+src_compile() {
+ local myopt
+ use debug && myopt="${myopt} debug=y"
+ use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+ if test-flag-CC -fno-strict-overflow; then
+ append-flags -fno-strict-overflow
+ fi
+
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+ if use doc; then
+ emake -C docs build
+ else
+ emake -C docs man-pages
+ fi
+}
+
+src_install() {
+ # Override auto-detection in the build system, bug #382573
+ export INITD_DIR=/tmp/init.d
+ export CONFIG_LEAF_DIR=../tmp/default
+
+ # Let the build system compile installed Python modules.
+ local PYTHONDONTWRITEBYTECODE
+ export PYTHONDONTWRITEBYTECODE
+
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+ # Created at runtime
+ rm -rv "${ED}/var/run" || die
+
+ # Fix the remaining Python shebangs.
+ python_fix_shebang "${D}"
+
+ # Remove RedHat-specific stuff
+ rm -rf "${D}"/tmp || die
+
+ if use doc; then
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+ dodoc -r docs/{pdf,txt}
+ else
+ emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+ fi
+ dodoc ${DOCS[@]}
+
+ newconfd "${FILESDIR}"/xendomains.confd xendomains
+ newconfd "${FILESDIR}"/xenstored.confd xenstored
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+ newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+ newinitd "${FILESDIR}"/xencommons.initd xencommons
+ newconfd "${FILESDIR}"/xencommons.confd xencommons
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+ newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+ if use screen; then
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+ keepdir /var/log/xen-consoles
+ fi
+
+ # For -static-libs wrt Bug 384355
+ if ! use static-libs; then
+ rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+ fi
+
+ # for xendomains
+ keepdir /etc/xen/auto
+
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+ keepdir /var/lib/xen/dump
+ keepdir /var/lib/xen/xenpaging
+ keepdir /var/lib/xenstored
+ keepdir /var/log/xen
+
+ if use python; then
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+ fi
+
+ python_optimize
+}
+
+pkg_postinst() {
+ elog "Official Xen Guide and the offical wiki page:"
+ elog "https://wiki.gentoo.org/wiki/Xen"
+ elog "https://wiki.xen.org/wiki/Main_Page"
+ elog ""
+ elog "Recommended to utilise the xencommons script to config system at boot"
+ elog "Add by use of rc-update on completion of the install"
+
+ if ! use hvm; then
+ echo
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+ elog "support enable the hvm use flag."
+ elog "An x86 or amd64 system is required to build HVM support."
+ fi
+
+ if use qemu; then
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+ fi
+}
diff --git a/app-emulation/xen-tools/xen-tools-4.15.1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1.ebuild
new file mode 100644
index 000000000000..45c217b88f1d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.1.ebuild
@@ -0,0 +1,540 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ REPO="xen.git"
+ EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+ S="${WORKDIR}/${REPO}"
+else
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+ UPSTREAM_VER=
+ SECURITY_VER=
+ # xen-tools's gentoo patches tarball
+ GENTOO_VER=23
+ # xen-tools's gentoo patches version which apply to this specific ebuild
+ GENTOO_GPV=0
+ # xen-tools ovmf's patches
+ OVMF_VER=
+
+ SEABIOS_VER="1.14.0"
+ EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+ EDK2_OPENSSL_VERSION="1_1_1g"
+ EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+ EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+ IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
+
+ [[ -n ${UPSTREAM_VER} ]] && \
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+ [[ -n ${SECURITY_VER} ]] && \
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+ [[ -n ${GENTOO_VER} ]] && \
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+ [[ -n ${OVMF_VER} ]] && \
+ OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+ https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+ ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+ ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+ https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+ https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+ https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+ ${OVMF_PATCHSET_URI} )
+ ${UPSTREAM_PATCHSET_URI}
+ ${SECURITY_PATCHSET_URI}
+ ${GENTOO_PATCHSET_URI}"
+
+ S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ipxe? ( rombios )
+ ovmf? ( hvm )
+ pygrub? ( python )
+ rombios? ( hvm )
+ system-ipxe? ( rombios )
+ ?? ( ipxe system-ipxe )
+ ?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+ sys-apps/pciutils
+ dev-libs/lzo:2
+ dev-libs/glib:2
+ dev-libs/yajl
+ dev-libs/libaio
+ dev-libs/libgcrypt:0
+ sys-libs/zlib
+ ${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2[-minimal]
+ net-misc/bridge-utils
+ screen? (
+ app-misc/screen
+ app-admin/logrotate
+ )
+ selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+ app-misc/pax-utils
+ >=sys-kernel/linux-headers-4.11
+ x11-libs/pixman
+ $(python_gen_cond_dep '
+ dev-python/lxml[${PYTHON_USEDEP}]
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+ ')
+ x86? ( sys-devel/dev86
+ system-ipxe? ( sys-firmware/ipxe[qemu] )
+ sys-power/iasl )
+ api? ( dev-libs/libxml2
+ net-misc/curl )
+
+ ovmf? (
+ !arm? ( !arm64? ( dev-lang/nasm ) )
+ $(python_gen_impl_dep sqlite)
+ )
+ !amd64? ( >=sys-apps/dtc-1.4.0 )
+ amd64? ( sys-power/iasl
+ system-seabios? ( sys-firmware/seabios )
+ system-ipxe? ( sys-firmware/ipxe[qemu] )
+ rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+ doc? (
+ app-text/ghostscript-gpl
+ app-text/pandoc
+ $(python_gen_cond_dep '
+ dev-python/markdown[${PYTHON_USEDEP}]
+ ')
+ dev-texlive/texlive-latexextra
+ media-gfx/transfig
+ )
+ hvm? ( x11-base/xorg-proto )
+ qemu? (
+ app-arch/snappy:=
+ sdl? (
+ media-libs/libsdl[X]
+ media-libs/libsdl2[X]
+ )
+ )
+ system-qemu? ( app-emulation/qemu[xen] )
+ ocaml? ( dev-ml/findlib
+ dev-lang/ocaml[ocamlopt] )
+ python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+ sys-devel/bison
+ sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+ usr/libexec/xen/boot/hvmloader
+ usr/libexec/xen/boot/xen-shim
+ usr/share/qemu-xen/qemu/hppa-firmware.img
+ usr/share/qemu-xen/qemu/s390-ccw.img
+ usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+ usr/libexec/xen/bin/elf2dmp
+ usr/libexec/xen/bin/ivshmem-client
+ usr/libexec/xen/bin/ivshmem-server
+ usr/libexec/xen/bin/qemu-edid
+ usr/libexec/xen/bin/qemu-img
+ usr/libexec/xen/bin/qemu-io
+ usr/libexec/xen/bin/qemu-keymap
+ usr/libexec/xen/bin/qemu-nbd
+ usr/libexec/xen/bin/qemu-pr-helper
+ usr/libexec/xen/bin/qemu-storage-daemon
+ usr/libexec/xen/bin/qemu-system-i386
+ usr/libexec/xen/bin/virtfs-proxy-helper
+ usr/libexec/xen/boot/xen-shim
+ usr/libexec/xen/libexec/qemu-pr-helper
+ usr/libexec/xen/libexec/virtfs-proxy-helper
+ usr/libexec/xen/libexec/virtiofsd
+ usr/libexec/xen/libexec/xen-bridge-helper
+ usr/share/qemu-xen/qemu/s390-ccw.img
+ usr/share/qemu-xen/qemu/s390-netboot.img
+ usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
+
+pkg_setup() {
+ python_setup
+ export "CONFIG_LOMOUNT=y"
+
+ #bug 522642, disable compile tools/tests
+ export "CONFIG_TESTS=n"
+
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+ if use x86 && use amd64; then
+ die "Confusion! Both x86 and amd64 are set in your use flags!"
+ elif use x86; then
+ export XEN_TARGET_ARCH="x86_32"
+ elif use amd64 ; then
+ export XEN_TARGET_ARCH="x86_64"
+ elif use arm; then
+ export XEN_TARGET_ARCH="arm32"
+ elif use arm64; then
+ export XEN_TARGET_ARCH="arm64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
+src_prepare() {
+ local i
+
+ # Upstream's patchset
+ if [[ -n ${UPSTREAM_VER} ]]; then
+ einfo "Try to apply Xen Upstream patch set"
+ eapply "${WORKDIR}"/patches-upstream
+ fi
+
+ # Security patchset
+ if [[ -n ${SECURITY_VER} ]]; then
+ einfo "Try to apply Xen Security patch set"
+ # apply main xen patches
+ # Two parallel systems, both work side by side
+ # Over time they may concdense into one. This will suffice for now
+ EPATCH_SUFFIX="patch"
+ EPATCH_FORCE="yes"
+
+ source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+ for i in ${XEN_SECURITY_MAIN}; do
+ eapply "${WORKDIR}"/patches-security/xen/$i
+ done
+
+ # apply qemu-xen/upstream patches
+ pushd "${S}"/tools/qemu-xen/ > /dev/null
+ for i in ${XEN_SECURITY_QEMUU}; do
+ eapply "${WORKDIR}"/patches-security/qemuu/$i
+ done
+ popd > /dev/null
+
+ # apply qemu-traditional patches
+ pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+ for i in ${XEN_SECURITY_QEMUT}; do
+ eapply "${WORKDIR}"/patches-security/qemut/$i
+ done
+ popd > /dev/null
+ fi
+
+ # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+ mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+ pushd tools/firmware/ > /dev/null
+ ln -s seabios-dir-remote seabios-dir || die
+ popd > /dev/null
+
+ # Gentoo's patchset
+ if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+ einfo "Try to apply Gentoo specific patch set"
+ source "${FILESDIR}"/gentoo-patches.conf || die
+ _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+ for i in ${!_gpv}; do
+ eapply "${WORKDIR}"/patches-gentoo/$i
+ done
+ fi
+
+ # Ovmf's patchset
+ if use ovmf; then
+ if [[ -n ${OVMF_VER} ]];then
+ einfo "Try to apply Ovmf patch set"
+ pushd "${WORKDIR}"/edk2-*/ > /dev/null
+ eapply "${WORKDIR}"/patches-ovmf
+ popd > /dev/null
+ fi
+ mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+ rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+ rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+ rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+ rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+ mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+ mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+ cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+ fi
+
+ # ipxe
+ if use ipxe; then
+ cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+ # gcc 11
+ cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+ echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+ fi
+
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+ # Fix texi2html build error with new texi2html, qemu.doc.html
+ sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+ -i tools/firmware/Makefile || die
+
+ # Drop .config, fixes to gcc-4.6
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
+ # drop flags
+ unset CFLAGS
+ unset LDFLAGS
+ unset ASFLAGS
+ unset CPPFLAGS
+
+ if ! use pygrub; then
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+ fi
+
+ if ! use python; then
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+ fi
+
+ if ! use hvm; then
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+ # Bug 351648
+ elif ! use x86 && ! has x86 $(get_all_abis); then
+ mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+ touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+ export CPATH="${WORKDIR}"/extra-headers
+ fi
+
+ if use qemu; then
+ if use sdl; then
+ sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+ tools/Makefile || die
+ else
+ sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+ tools/qemu-xen-traditional/xen-setup || die
+ sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+ tools/Makefile || die
+ fi
+ else
+ # Don't bother with qemu, only needed for fully virtualised guests
+ sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+ fi
+
+ # Reset bash completion dir; Bug 472438
+ sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+ -i Config.mk || die
+
+ # xencommons, Bug #492332, sed lighter weight than patching
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+ -i tools/hotplug/Linux/init.d/xencommons.in || die
+
+ # fix bashishm
+ sed -e '/Usage/s/\$//g' \
+ -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+ # respect multilib, usr/lib/libcacard.so.0.0.0
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+ -i tools/qemu-xen/configure || die
+
+ #bug 518136, don't build 32bit exactuable for nomultilib profile
+ if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+ sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+ fi
+
+ # uncomment lines in xl.conf
+ sed -e 's:^#autoballoon=:autoballoon=:' \
+ -e 's:^#lockfile=:lockfile=:' \
+ -e 's:^#vif.default.script=:vif.default.script=:' \
+ -i tools/examples/xl.conf || die
+
+ # disable capstone (Bug #673474)
+ sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+ -i tools/Makefile || die
+
+ # disable glusterfs
+ sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+ -i tools/Makefile || die
+
+ # disable jpeg automagic
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+ -i tools/Makefile || die
+
+ # disable png automagic
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+ -i tools/Makefile || die
+
+ # disable docker (Bug #732970)
+ sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+ -i tools/Makefile || die
+
+ # disable abi-dumper (Bug #791172)
+ sed -e 's/$(ABI_DUMPER) /echo /g' \
+ -i tools/libs/libs.mk || die
+
+ default
+}
+
+src_configure() {
+ local myconf="--prefix=${PREFIX}/usr \
+ --libdir=${PREFIX}/usr/$(get_libdir) \
+ --libexecdir=${PREFIX}/usr/libexec \
+ --localstatedir=${EPREFIX}/var \
+ --disable-golang \
+ --disable-werror \
+ --disable-xen \
+ --enable-tools \
+ --enable-docs \
+ $(use_enable api xenapi) \
+ $(use_enable ipxe) \
+ $(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+ $(use_enable ocaml ocamltools) \
+ $(use_enable ovmf) \
+ $(use_enable pam) \
+ $(use_enable rombios) \
+ --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+ "
+
+ use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+ use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+ use amd64 && myconf+=" $(use_enable qemu-traditional)"
+ tc-ld-disable-gold # Bug 669570
+ econf ${myconf}
+}
+
+src_compile() {
+ local myopt
+ use debug && myopt="${myopt} debug=y"
+ use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+ if test-flag-CC -fno-strict-overflow; then
+ append-flags -fno-strict-overflow
+ fi
+
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+ if use doc; then
+ emake -C docs build
+ else
+ emake -C docs man-pages
+ fi
+}
+
+src_install() {
+ # Override auto-detection in the build system, bug #382573
+ export INITD_DIR=/tmp/init.d
+ export CONFIG_LEAF_DIR=../tmp/default
+
+ # Let the build system compile installed Python modules.
+ local PYTHONDONTWRITEBYTECODE
+ export PYTHONDONTWRITEBYTECODE
+
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+ # Created at runtime
+ rm -rv "${ED}/var/run" || die
+
+ # Fix the remaining Python shebangs.
+ python_fix_shebang "${D}"
+
+ # Remove RedHat-specific stuff
+ rm -rf "${D}"/tmp || die
+
+ if use doc; then
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+ dodoc -r docs/{pdf,txt}
+ else
+ emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+ fi
+ dodoc ${DOCS[@]}
+
+ newconfd "${FILESDIR}"/xendomains.confd xendomains
+ newconfd "${FILESDIR}"/xenstored.confd xenstored
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+ newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+ newinitd "${FILESDIR}"/xencommons.initd xencommons
+ newconfd "${FILESDIR}"/xencommons.confd xencommons
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+ newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+ if use screen; then
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+ keepdir /var/log/xen-consoles
+ fi
+
+ # For -static-libs wrt Bug 384355
+ if ! use static-libs; then
+ rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+ fi
+
+ # for xendomains
+ keepdir /etc/xen/auto
+
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+ keepdir /var/lib/xen/dump
+ keepdir /var/lib/xen/xenpaging
+ keepdir /var/lib/xenstored
+ keepdir /var/log/xen
+
+ if use python; then
+ python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+ python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+ fi
+
+ python_optimize
+}
+
+pkg_postinst() {
+ elog "Official Xen Guide and the offical wiki page:"
+ elog "https://wiki.gentoo.org/wiki/Xen"
+ elog "https://wiki.xen.org/wiki/Main_Page"
+ elog ""
+ elog "Recommended to utilise the xencommons script to config system at boot"
+ elog "Add by use of rc-update on completion of the install"
+
+ if ! use hvm; then
+ echo
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+ elog "support enable the hvm use flag."
+ elog "An x86 or amd64 system is required to build HVM support."
+ fi
+
+ if use qemu; then
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+ fi
+}
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index ab3fee237a36..30991c8229e8 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -1,9 +1,14 @@
AUX xen-4.14-efi.patch 1969 BLAKE2B dec62e9b04ce23025443caa68df2fd69c50a3fdf650bf26047b28f3a72d1aa58124127274cd2c1373a4e133784b2691145c49c9a182bd635aa9c60bb1e45a0c1 SHA512 3e32aac5ba2ec371a3877d64532e8d134c3b4fe3a6644477ee8ecf56cbb8378b20f9d5d7415bec891d96910550a787848779c82ee4b9d57046f4c13235531ea0
AUX xen-4.15-efi.patch 2181 BLAKE2B a06b944dea37c3dfdbe4344191ec4a286348f46bcccf1b5a75f061e55b961d767972456803b8c9aa15120b2b2497651495e903925bf93b04c483e0713d9117a9 SHA512 7ec52fc65b5b8a22877c941f0ab6f249ba1d7b40ad7d50d8f0ac793069cc0eb85b1e5394ce81adf60fa23b01ecc8ce983e6c508b8e0d22189dc46e2c1ad8c1b4
+AUX xen-4.15-flask.patch 400 BLAKE2B 68ee04b8b0923cbe7e2b93b834a23b465c9c8e63ae41bea98c8b4bce4ff59374534294b8c5cd5be30ea64d7c66caec54de0bc1bf70d80275d027b3a082ec2003 SHA512 146c6a161d3def5ab947264d6ac5932066f3124e25be14185ebd75eaa18932adcf35daf21edd051861cacd28b950b6a3ee5c5ac335ccc1d0e27b3242da5c4441
DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
+DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16
DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
+DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
EBUILD xen-4.14.2-r1.ebuild 4592 BLAKE2B a2864d4f2deab4f806b673a0e129bcee9b3142cd859d7c1293a8638d2122534439a042feab690e634e75deeb7c8afc7a94dd9188447faea283a59f2eec453537 SHA512 ff083e3655f2fa78b2f0f1c286298f56e96ab259ea9dce2389fd38dc0c2ad9ad0da2eadc966ebbbf8efefb6dc05445b969fabacb376ea30f72b339ece6d0b0d1
+EBUILD xen-4.14.3.ebuild 4626 BLAKE2B a342c96582d3d36f293981457ca7ee2f97b95de813e6d7c9a6ddfed5383875bfa20e9b4fb78878eac3475f9221a1a9271ed91d250cc45f350861b3dcf185f7d3 SHA512 780343cf02e20aeb6effebda25f0870f1822efbf0db9d85ffd0af46b210a4f8a06bb4fb27ec8652adaadb3cf13a60c32881fafb2036cf139613f42e6c1e3b83d
EBUILD xen-4.15.0-r1.ebuild 4593 BLAKE2B 5000db5af318b142a4909265d0670602956cf098b1307379e2dbfc0d3edb36bd7c6429f0355d34065d2aa9148bbd77d0d1cb8333fe0d7ce5fd2d9d2d398eccd5 SHA512 084ba7c9cce964b200c65b05a43bd548d3fa541f39e0b7403a6f006a40415ed457cb25fdcb8b5ab9b12f97878a0d9a4897443eec1439bb66c0d4a6fe4b69cd44
+EBUILD xen-4.15.1.ebuild 4627 BLAKE2B 6d98b7959fff0cc4a559c226c997c3d8a29de79c96fa52c3d2ec470bd4422426b6fafc4264ed666e982e6e6d9e47f3b2fce7f7df35e35b4be83482e1b50a2632 SHA512 052cbfd11dce2764157243a476572be5ea3b99dda68e60f18a04cf6cde58de4de5e1bd23b468e6ed6e38950fe57f25a243676ef654f46ee88a88358ba781979d
MISC metadata.xml 676 BLAKE2B 23003620a5ae9ecc8fca8bea77951fdf0469bb3b997819bfaccb7be4ece20b8a2c2f4b3385f1fc04e749d40a3f2353ed8559806049069fa6bf6bcbe43921db03 SHA512 027f25045231ae0425f5d60e7cf0981654f9e0f445ebfecdee9d7ca0f13272c0edc0440faf9bca85feb55711391d4e3dce402b138a5d4e72f30aa7ee680e14fb
diff --git a/app-emulation/xen/files/xen-4.15-flask.patch b/app-emulation/xen/files/xen-4.15-flask.patch
new file mode 100644
index 000000000000..7dcf91b30fc1
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.15-flask.patch
@@ -0,0 +1,13 @@
+diff --git a/xen/common/Kconfig b/xen/common/Kconfig
+index eb953d1..78f058c 100644
+--- a/xen/common/Kconfig
++++ b/xen/common/Kconfig
+@@ -198,7 +198,7 @@ config XENOPROF
+
+ config XSM
+ bool "Xen Security Modules support"
+- default ARM
++ default y
+ ---help---
+ Enables the security framework known as Xen Security Modules which
+ allows administrators fine-grained control over a Xen domain and
diff --git a/app-emulation/xen/xen-4.14.3.ebuild b/app-emulation/xen/xen-4.14.3.ebuild
new file mode 100644
index 000000000000..aa58a7aae317
--- /dev/null
+++ b/app-emulation/xen/xen-4.14.3.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+
+inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+ SRC_URI=""
+else
+ KEYWORDS="amd64 ~arm -x86"
+ UPSTREAM_VER=
+ SECURITY_VER=
+ GENTOO_VER=
+
+ [[ -n ${UPSTREAM_VER} ]] && \
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+ [[ -n ${SECURITY_VER} ]] && \
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
+ [[ -n ${GENTOO_VER} ]] && \
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
+ ${UPSTREAM_PATCHSET_URI}
+ ${SECURITY_PATCHSET_URI}
+ ${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="https://www.xenproject.org"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug efi flask"
+
+DEPEND="${PYTHON_DEPS}
+ efi? ( >=sys-devel/binutils-2.22[multitarget] )
+ !efi? ( >=sys-devel/binutils-2.22 )
+ flask? ( sys-apps/checkpolicy )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+# no tests are available for the hypervisor
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
+RESTRICT="test splitdebug strip"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then
+ if use amd64; then
+ export XEN_TARGET_ARCH="x86_64"
+ elif use arm; then
+ export XEN_TARGET_ARCH="arm32"
+ elif use arm64; then
+ export XEN_TARGET_ARCH="arm64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
+src_prepare() {
+ # Upstream's patchset
+ [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
+
+ # Security patchset
+ if [[ -n ${SECURITY_VER} ]]; then
+ einfo "Try to apply Xen Security patch set"
+ # apply main xen patches
+ # Two parallel systems, both work side by side
+ # Over time they may concdense into one. This will suffice for now
+ source "${WORKDIR}"/patches-security/${PV}.conf
+
+ local i
+ for i in ${XEN_SECURITY_MAIN}; do
+ eapply "${WORKDIR}"/patches-security/xen/$i
+ done
+ fi
+
+ # Gentoo's patchset
+ [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
+
+ # Symlinks do not work on fat32 volumes
+ eapply "${FILESDIR}"/${PN}-4.14-efi.patch
+
+ # Enable XSM-FLASK
+ use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
+
+ # Workaround new gcc-11 options
+ sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
+
+ # Drop .config
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
+ if use efi; then
+ export EFI_VENDOR="gentoo"
+ export EFI_MOUNTPOINT="/boot"
+ fi
+
+ default
+}
+
+src_configure() {
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+ use debug && myopt="${myopt} debug=y"
+
+ # remove flags
+ unset CFLAGS
+ unset LDFLAGS
+ unset ASFLAGS
+
+ tc-ld-disable-gold # Bug 700374
+}
+
+src_compile() {
+ # Send raw LDFLAGS so that --as-needed works
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
+}
+
+src_install() {
+ local myopt
+ use debug && myopt="${myopt} debug=y"
+
+ # The 'make install' doesn't 'mkdir -p' the subdirs
+ if use efi; then
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+ fi
+
+ emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
+
+ # make install likes to throw in some extra EFI bits if it built
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
+}
+
+pkg_postinst() {
+ elog "Official Xen Guide:"
+ elog " https://wiki.gentoo.org/wiki/Xen"
+
+ use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
+
+ elog "You can optionally block the installation of /boot/xen-syms by an entry"
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
+
+ ewarn
+ ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
+ ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
+ ewarn "to work fine."
+ ewarn
+ ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
+ ewarn
+ ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
+}
diff --git a/app-emulation/xen/xen-4.15.1.ebuild b/app-emulation/xen/xen-4.15.1.ebuild
new file mode 100644
index 000000000000..ddd079776931
--- /dev/null
+++ b/app-emulation/xen/xen-4.15.1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+
+inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~arm -x86"
+ UPSTREAM_VER=
+ SECURITY_VER=
+ GENTOO_VER=
+
+ [[ -n ${UPSTREAM_VER} ]] && \
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
+ https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+ [[ -n ${SECURITY_VER} ]] && \
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
+ [[ -n ${GENTOO_VER} ]] && \
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
+ ${UPSTREAM_PATCHSET_URI}
+ ${SECURITY_PATCHSET_URI}
+ ${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="https://www.xenproject.org"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug efi flask"
+
+DEPEND="${PYTHON_DEPS}
+ efi? ( >=sys-devel/binutils-2.22[multitarget] )
+ !efi? ( >=sys-devel/binutils-2.22 )
+ flask? ( sys-apps/checkpolicy )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+# no tests are available for the hypervisor
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
+RESTRICT="test splitdebug strip"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then
+ if use amd64; then
+ export XEN_TARGET_ARCH="x86_64"
+ elif use arm; then
+ export XEN_TARGET_ARCH="arm32"
+ elif use arm64; then
+ export XEN_TARGET_ARCH="arm64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
+src_prepare() {
+ # Upstream's patchset
+ [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
+
+ # Security patchset
+ if [[ -n ${SECURITY_VER} ]]; then
+ einfo "Try to apply Xen Security patch set"
+ # apply main xen patches
+ # Two parallel systems, both work side by side
+ # Over time they may concdense into one. This will suffice for now
+ source "${WORKDIR}"/patches-security/${PV}.conf
+
+ local i
+ for i in ${XEN_SECURITY_MAIN}; do
+ eapply "${WORKDIR}"/patches-security/xen/$i
+ done
+ fi
+
+ # Gentoo's patchset
+ [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
+
+ # Symlinks do not work on fat32 volumes
+ eapply "${FILESDIR}"/${PN}-4.15-efi.patch
+
+ # Enable XSM-FLASK
+ use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
+
+ # Workaround new gcc-11 options
+ sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
+
+ # Drop .config
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
+ if use efi; then
+ export EFI_VENDOR="gentoo"
+ export EFI_MOUNTPOINT="/boot"
+ fi
+
+ default
+}
+
+src_configure() {
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+ use debug && myopt="${myopt} debug=y"
+
+ # remove flags
+ unset CFLAGS
+ unset LDFLAGS
+ unset ASFLAGS
+
+ tc-ld-disable-gold # Bug 700374
+}
+
+src_compile() {
+ # Send raw LDFLAGS so that --as-needed works
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
+}
+
+src_install() {
+ local myopt
+ use debug && myopt="${myopt} debug=y"
+
+ # The 'make install' doesn't 'mkdir -p' the subdirs
+ if use efi; then
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+ fi
+
+ emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
+
+ # make install likes to throw in some extra EFI bits if it built
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
+}
+
+pkg_postinst() {
+ elog "Official Xen Guide:"
+ elog " https://wiki.gentoo.org/wiki/Xen"
+
+ use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
+
+ elog "You can optionally block the installation of /boot/xen-syms by an entry"
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
+
+ ewarn
+ ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
+ ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
+ ewarn "to work fine."
+ ewarn
+ ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
+ ewarn
+ ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
+}