1 |
commit: 9b6b8a74e7373fdb22d85e83cf9710eeb52e6999 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 3 18:14:47 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 3 18:21:25 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b6b8a74 |
7 |
|
8 |
app-emulation/libvirt: fix build w/ glibc 2.36 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/863446 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../libvirt/files/libvirt-8.5.0-glibc-2.36.patch | 67 ++++++++++++++++++++++ |
14 |
app-emulation/libvirt/libvirt-8.5.0.ebuild | 1 + |
15 |
2 files changed, 68 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch b/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..e02c5ea44086 |
20 |
--- /dev/null |
21 |
+++ b/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch |
22 |
@@ -0,0 +1,67 @@ |
23 |
+https://bugs.gentoo.org/863446 |
24 |
+https://github.com/libvirt/libvirt/commit/9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 |
25 |
+https://github.com/libvirt/libvirt/commit/c0d9adf220dc0d223330a7bac37b174132d330ba |
26 |
+ |
27 |
+From 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 Mon Sep 17 00:00:00 2001 |
28 |
+From: Cole Robinson <crobinso@××××××.com> |
29 |
+Date: Mon, 1 Aug 2022 15:20:38 -0400 |
30 |
+Subject: [PATCH] lxc: containter: fix build with glibc 2.36 |
31 |
+ |
32 |
+With glibc 2.36, sys/mount.h and linux/mount.h conflict: |
33 |
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E |
34 |
+ |
35 |
+lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in |
36 |
+linux/mount.h. |
37 |
+ |
38 |
+linux/fs.h isn't required here though. glibc sys/mount.h has had |
39 |
+MS_MOVE since 2.12 in 2010 |
40 |
+ |
41 |
+Reviewed-by: Erik Skultety <eskultet@××××××.com> |
42 |
+Signed-off-by: Cole Robinson <crobinso@××××××.com> |
43 |
+--- a/src/lxc/lxc_container.c |
44 |
++++ b/src/lxc/lxc_container.c |
45 |
+@@ -33,9 +33,6 @@ |
46 |
+ /* Yes, we want linux private one, for _syscall2() macro */ |
47 |
+ #include <linux/unistd.h> |
48 |
+ |
49 |
+-/* For MS_MOVE */ |
50 |
+-#include <linux/fs.h> |
51 |
+- |
52 |
+ #if WITH_CAPNG |
53 |
+ # include <cap-ng.h> |
54 |
+ #endif |
55 |
+ |
56 |
+From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001 |
57 |
+From: Cole Robinson <crobinso@××××××.com> |
58 |
+Date: Mon, 1 Aug 2022 15:24:01 -0400 |
59 |
+Subject: [PATCH] virfile: Fix build with glibc 2.36 |
60 |
+ |
61 |
+With glibc 2.36, sys/mount.h and linux/mount.h conflict: |
62 |
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E |
63 |
+ |
64 |
+virfile.c imports sys/mount.h and linux/fs.h, which pulls in |
65 |
+linux/mount.h. |
66 |
+ |
67 |
+Manually define the constants we need from linux/fs.h, like was |
68 |
+done in llvm: |
69 |
+ |
70 |
+https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02 |
71 |
+ |
72 |
+Reviewed-by: Erik Skultety <eskultet@××××××.com> |
73 |
+Signed-off-by: Cole Robinson <crobinso@××××××.com> |
74 |
+--- a/src/util/virfile.c |
75 |
++++ b/src/util/virfile.c |
76 |
+@@ -71,7 +71,11 @@ |
77 |
+ # endif |
78 |
+ # include <sys/ioctl.h> |
79 |
+ # include <linux/cdrom.h> |
80 |
+-# include <linux/fs.h> |
81 |
++/* These come from linux/fs.h, but that header conflicts with |
82 |
++ * sys/mount.h on glibc 2.36+ */ |
83 |
++# define FS_IOC_GETFLAGS _IOR('f', 1, long) |
84 |
++# define FS_IOC_SETFLAGS _IOW('f', 2, long) |
85 |
++# define FS_NOCOW_FL 0x00800000 |
86 |
+ #endif |
87 |
+ |
88 |
+ #if WITH_LIBATTR |
89 |
+ |
90 |
|
91 |
diff --git a/app-emulation/libvirt/libvirt-8.5.0.ebuild b/app-emulation/libvirt/libvirt-8.5.0.ebuild |
92 |
index 1ac6f7431bdb..f81dbc7d518b 100644 |
93 |
--- a/app-emulation/libvirt/libvirt-8.5.0.ebuild |
94 |
+++ b/app-emulation/libvirt/libvirt-8.5.0.ebuild |
95 |
@@ -137,6 +137,7 @@ PATCHES=( |
96 |
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
97 |
"${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch |
98 |
"${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch |
99 |
+ "${FILESDIR}"/${PN}-8.5.0-glibc-2.36.patch |
100 |
) |
101 |
|
102 |
pkg_setup() { |