summaryrefslogtreecommitdiff
path: root/app-emulation/qemu
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-04 02:04:17 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-04 02:04:17 +0100
commit00d9a8fc3e9e5bafeff6747e978c1685b384e587 (patch)
tree43c6db3767706ffe339a7040cb0a5dea8bd1ef26 /app-emulation/qemu
parent799073eb168d35819904276f6c912be4ac76166a (diff)
gentoo auto-resync : 04:08:2022 - 02:04:17
Diffstat (limited to 'app-emulation/qemu')
-rw-r--r--app-emulation/qemu/Manifest3
-rw-r--r--app-emulation/qemu/files/qemu-7.0.0-glibc-2.36.patch90
-rw-r--r--app-emulation/qemu/qemu-7.0.0-r3.ebuild1
3 files changed, 93 insertions, 1 deletions
diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index 3dbfbf699158..24cc0897164a 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -5,6 +5,7 @@ AUX qemu-5.2.0-disable-keymap.patch 884 BLAKE2B dbbe245a52615f8894cbac1c94ce3fee
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-7.0.0-also-build-virtfs-proxy-helper.patch 1168 BLAKE2B c85204a90c5af17675c1d2d09ce884acddd0cabb6816d10baafc299a924f86c94fb66b9c58160fe0e4b5d56c049f249c01390d45bebca42aaf941bdc6f04fe81 SHA512 b5a884545bbc82fe2318f18f4de103e61db6d22fce433f4ed4e175310f329fe110627640c6127df0dd2312dcba05bce342ff08166feb565b9adbea23086f1677
+AUX qemu-7.0.0-glibc-2.36.patch 3708 BLAKE2B f65dc18407606ebd30cd865ea7b83401de6d74fef2bc2432e2a50e3035d026f8048d514921af8bf3713ece9895e6657be42417dd2911c142ba4d2c4669a06716 SHA512 8fd0e7f5889ff152e4f3e02cf799e077f2563b91e5ab66c99aa9fe5e6540fa0ba0042f80bd57b904673d118112652bfe44492cb4b1d69baa19936d3386ba6f70
AUX qemu-7.0.0-pci-overflow-fortify-source-3.patch 3939 BLAKE2B 02909d525e2ff2bc79a763117ccad7fd46eb23ba731ca37d6d6b6d2edcc9aaf02f37d2e13996f1648e9befd13fa50cb14c0d04565196d9ead2ceadcba2610b8b SHA512 0ca086aa4781066133a9a2d0307d6843e0062b17443abffca87af8291569ac2c44ab29408cce5e7a9d05e75ff277f1778347f9ce155e91ea7c6d0eb1d8a2388d
AUX qemu-7.0.0-virtio-scsi-fixes.patch 7117 BLAKE2B 47f2c2a2783579bccdf0aa509051324a2c269eb9bdad1cad489e40724035cad6958559b46533c9601ffb7bfd2f9fde16117097fd470a3a6fe9b9cf5a0a9f95a8 SHA512 e15418a83b43e9313199d2198ba0434c7130b4c0561a57a244ae783803c8505defdb68ec680e03acaaa0feba3e778d7e6efd4ccec58fa2c49208e4095efe6c31
AUX qemu-7.1.0-also-build-virtfs-proxy-helper.patch 1167 BLAKE2B dee6c98a547a510827f422a5d2b03edd6d467e4713f357a5841e01d632578891a0e2e715c57153c7842b51f5199cea70d8e76ff31f0372308e26202e1587af62 SHA512 d2fb9db139588961434663910dc7151c91b82c1820f62ed5ae690e4f868f1957d8ad2dc1b812813a2081ce6bbdd0f8e59cddd9459de6ef493df02b5a4478de63
@@ -15,6 +16,6 @@ DIST qemu-7.0.0-docs.tar.xz 5101176 BLAKE2B 827d4af2b3fd229d146b47253d12a8bfd606
DIST qemu-7.0.0.tar.xz 125117636 BLAKE2B ceda6d9f1a585298bd49fed61e8bb35f0064ad8388a9f979c8bd68a38bfe1a47c5bb055e5f74f970c2c440957042b9de4a861524120040c56e4cd8b56c5cfb68 SHA512 44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1
EBUILD qemu-7.0.0-r1.ebuild 25838 BLAKE2B 875e737a2d9c56343df88972d479ca661d9cef981d44c8b176e9aa6cee06d578cbf57aa4bd8e5b6396134a91b56de5f6a1f29b6a1903d4ce90f4426b438d8a6b SHA512 f52a03cf93d1faae0fd6363f5797ada9c63138c4adaea5245ccb15d86a997aba1707107c2cda97e4f36b22733bfeb0fe46767b7886c2ec81b275755c95dd1b3a
EBUILD qemu-7.0.0-r2.ebuild 26304 BLAKE2B 478452308df45bf5f466e644cb732b592e10d9c0d66500b64bf8dd33e3471a3663b774824be2169fa65c4c50dbbd721940753d2fe1c4b65afd413231bc73ff24 SHA512 e7400db9efa895d59b5ecb9df59627439dd9a949c893aaf4d28abb6b69247b79115172f377319cca054b5f068fc1ace20d6666b78a14f786e6dcf444568df16d
-EBUILD qemu-7.0.0-r3.ebuild 27218 BLAKE2B 4b60fa22815c6cd1debb49eb90bca903ae3e3ade708ad72cf0255ccd309c6ccfdfd505ad0c713241859fe0485b87cc77de3c66e42fd374f68f7fe12a72b8eb89 SHA512 26f97dbdcc0ffac5c0c8d600901acc1f30d0b7131408c12899e1fe76907477ac8f3e7c762ec0e912360ef72193345dd666d2ed69351720d3d024f091128da09b
+EBUILD qemu-7.0.0-r3.ebuild 27255 BLAKE2B cb8c8adfea045db902eb6b2fba5b91d3d2299567b25247a01906919592d89f56f4112eadb356308781ab69a63f0aa7400f4dd499eca95dcc389fb26eb2e25e90 SHA512 66e5a51e5bf142b40f0f476995f2b252eeac33a98cc544e1d317522487d64dcdd62c36aa40a4ef4c1f9455de40230fd45a5731b7545759d4df7f37a96b154968
EBUILD qemu-9999.ebuild 27123 BLAKE2B 226e3d74476797e18dbeec36e6d976fba1c1298e336c1af049f3d1aaf375ca7da6f1e1b7fed2a45e97a6134a6b667cf34da1929d81db6bf89efda4e9f1b8a574 SHA512 72005ad77f56bc7161fd27cfcab4fce6e211b5cc5342420ee9b3e7f021af31a04565e9958fba7883286a6d3187b6888d05bc2ac96306370709377bba972f8c34
MISC metadata.xml 4672 BLAKE2B ea2319ecc6717e4f10667f70928eac2b59eb27bb117957c266984a4d5bdf84604128086956a651c1880d314efde56ce81a67c364f7944f5342b6a322b5e3e73e SHA512 27f357299abc6a82112dab17c81b825459ce4c7afd96381b4cba13d79861f80e7d452d574795cab240e7ca56154128a2597ac9957aa24ef81d7dc9092312ac79
diff --git a/app-emulation/qemu/files/qemu-7.0.0-glibc-2.36.patch b/app-emulation/qemu/files/qemu-7.0.0-glibc-2.36.patch
new file mode 100644
index 000000000000..85343c4d00e7
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-7.0.0-glibc-2.36.patch
@@ -0,0 +1,90 @@
+https://lore.kernel.org/all/20220802183409.GB2040@redhat.com/T/
+https://bugs.gentoo.org/863443
+
+From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
+To: qemu-devel@nongnu.org
+Cc: Laurent Vivier <laurent@vivier.eu>,
+ =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
+Subject: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h
+Date: Tue, 2 Aug 2022 12:41:34 -0400
+
+The latest glibc 2.36 has extended sys/mount.h so that it
+defines the FSCONFIG_* enum constants. These are historically
+defined in linux/mount.h, and thus if you include both headers
+the compiler complains:
+
+In file included from /usr/include/linux/fs.h:19,
+ from ../linux-user/syscall.c:98:
+/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command'
+ 95 | enum fsconfig_command {
+ | ^~~~~~~~~~~~~~~~
+In file included from ../linux-user/syscall.c:31:
+/usr/include/sys/mount.h:189:6: note: originally defined here
+ 189 | enum fsconfig_command
+ | ^~~~~~~~~~~~~~~~
+/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
+ 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+ | ^~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:191:3: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command'
+ 191 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+ | ^~~~~~~~~~~~~~~~~
+...snip...
+
+QEMU doesn't include linux/mount.h, but it does use
+linux/fs.h and thus gets linux/mount.h indirectly.
+
+glibc acknowledges this problem but does not appear to
+be intending to fix it in the forseeable future, simply
+documenting it as a known incompatibility with no
+workaround:
+
+ https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+ https://sourceware.org/glibc/wiki/Synchronizing_Headers
+
+To address this requires either removing use of sys/mount.h
+or linux/fs.h, despite QEMU needing declarations from
+both.
+
+This patch removes linux/fs.h, meaning we have to define
+various FS_IOC constants that are now unavailable.
+
+Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -95,7 +95,25 @@
+ #include <linux/soundcard.h>
+ #include <linux/kd.h>
+ #include <linux/mtio.h>
++
++#ifdef HAVE_SYS_MOUNT_FSCONFIG
++/*
++ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
++ * which in turn prevents use of linux/fs.h. So we have to
++ * define the constants ourselves for now.
++ */
++#define FS_IOC_GETFLAGS _IOR('f', 1, long)
++#define FS_IOC_SETFLAGS _IOW('f', 2, long)
++#define FS_IOC_GETVERSION _IOR('v', 1, long)
++#define FS_IOC_SETVERSION _IOW('v', 2, long)
++#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
++#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
++#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
++#define FS_IOC32_GETVERSION _IOR('v', 1, int)
++#define FS_IOC32_SETVERSION _IOW('v', 2, int)
++#else
+ #include <linux/fs.h>
++#endif
+ #include <linux/fd.h>
+ #if defined(CONFIG_FIEMAP)
+ #include <linux/fiemap.h>
+--- a/meson.build
++++ b/meson.build
+@@ -1963,6 +1963,8 @@ config_host_data.set('HAVE_OPTRESET',
+ cc.has_header_symbol('getopt.h', 'optreset'))
+ config_host_data.set('HAVE_IPPROTO_MPTCP',
+ cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
++config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
++ cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
+
+ # has_member
+ config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
diff --git a/app-emulation/qemu/qemu-7.0.0-r3.ebuild b/app-emulation/qemu/qemu-7.0.0-r3.ebuild
index d79b2ecdb29b..09762b74b160 100644
--- a/app-emulation/qemu/qemu-7.0.0-r3.ebuild
+++ b/app-emulation/qemu/qemu-7.0.0-r3.ebuild
@@ -300,6 +300,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.0.0-also-build-virtfs-proxy-helper.patch
"${FILESDIR}"/${P}-virtio-scsi-fixes.patch
"${FILESDIR}"/${P}-pci-overflow-fortify-source-3.patch
+ "${FILESDIR}"/${P}-glibc-2.36.patch
)
QA_PREBUILT="