From 9b6b8a74e7373fdb22d85e83cf9710eeb52e6999 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 3 Aug 2022 19:14:47 +0100 Subject: app-emulation/libvirt: fix build w/ glibc 2.36 Closes: https://bugs.gentoo.org/863446 Signed-off-by: Sam James --- .../libvirt/files/libvirt-8.5.0-glibc-2.36.patch | 67 ++++++++++++++++++++++ app-emulation/libvirt/libvirt-8.5.0.ebuild | 1 + 2 files changed, 68 insertions(+) create mode 100644 app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch 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 new file mode 100644 index 000000000000..e02c5ea44086 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch @@ -0,0 +1,67 @@ +https://bugs.gentoo.org/863446 +https://github.com/libvirt/libvirt/commit/9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 +https://github.com/libvirt/libvirt/commit/c0d9adf220dc0d223330a7bac37b174132d330ba + +From 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Mon, 1 Aug 2022 15:20:38 -0400 +Subject: [PATCH] lxc: containter: fix build with glibc 2.36 + +With glibc 2.36, sys/mount.h and linux/mount.h conflict: +https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in +linux/mount.h. + +linux/fs.h isn't required here though. glibc sys/mount.h has had +MS_MOVE since 2.12 in 2010 + +Reviewed-by: Erik Skultety +Signed-off-by: Cole Robinson +--- a/src/lxc/lxc_container.c ++++ b/src/lxc/lxc_container.c +@@ -33,9 +33,6 @@ + /* Yes, we want linux private one, for _syscall2() macro */ + #include + +-/* For MS_MOVE */ +-#include +- + #if WITH_CAPNG + # include + #endif + +From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Mon, 1 Aug 2022 15:24:01 -0400 +Subject: [PATCH] virfile: Fix build with glibc 2.36 + +With glibc 2.36, sys/mount.h and linux/mount.h conflict: +https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +virfile.c imports sys/mount.h and linux/fs.h, which pulls in +linux/mount.h. + +Manually define the constants we need from linux/fs.h, like was +done in llvm: + +https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02 + +Reviewed-by: Erik Skultety +Signed-off-by: Cole Robinson +--- a/src/util/virfile.c ++++ b/src/util/virfile.c +@@ -71,7 +71,11 @@ + # endif + # include + # include +-# include ++/* These come from linux/fs.h, but that header conflicts with ++ * sys/mount.h on glibc 2.36+ */ ++# define FS_IOC_GETFLAGS _IOR('f', 1, long) ++# define FS_IOC_SETFLAGS _IOW('f', 2, long) ++# define FS_NOCOW_FL 0x00800000 + #endif + + #if WITH_LIBATTR + diff --git a/app-emulation/libvirt/libvirt-8.5.0.ebuild b/app-emulation/libvirt/libvirt-8.5.0.ebuild index 1ac6f7431bdb..f81dbc7d518b 100644 --- a/app-emulation/libvirt/libvirt-8.5.0.ebuild +++ b/app-emulation/libvirt/libvirt-8.5.0.ebuild @@ -137,6 +137,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch "${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch "${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch + "${FILESDIR}"/${PN}-8.5.0-glibc-2.36.patch ) pkg_setup() { -- cgit v1.2.3-65-gdbad