[arch-commits] Commit in libvirt/trunk (3 files)
Frederik Schwan
freswa at gemini.archlinux.org
Mon Aug 8 12:17:56 UTC 2022
Date: Monday, August 8, 2022 @ 12:17:56
Author: freswa
Revision: 1260621
fix build with glibc 2.36
Added:
libvirt/trunk/glibc-2.36-lxc-fix.patch
libvirt/trunk/glibc-2.36-virfile-fix.patch
Modified:
libvirt/trunk/PKGBUILD
------------------------------+
PKGBUILD | 13 ++++++++++--
glibc-2.36-lxc-fix.patch | 37 ++++++++++++++++++++++++++++++++++++
glibc-2.36-virfile-fix.patch | 42 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 90 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-08 12:12:42 UTC (rev 1260620)
+++ PKGBUILD 2022-08-08 12:17:56 UTC (rev 1260621)
@@ -81,9 +81,15 @@
'etc/sasl2/libvirt.conf'
)
options=(debug)
-source=("https://libvirt.org/sources/$pkgname-$pkgver.tar.xz"{,.asc})
+source=(
+ "https://libvirt.org/sources/$pkgname-$pkgver.tar.xz"{,.asc}
+ glibc-2.36-lxc-fix.patch
+ glibc-2.36-virfile-fix.patch
+)
sha256sums=('a81847c43ac9ade61b6f8447c44e8ba2cc544ab49bac5c0b18a5b105f5da3ae2'
- 'SKIP')
+ 'SKIP'
+ '766b998644d29bb8ea173a5911d5afc0f8e84f1845e19a65b349dd686d85aeed'
+ '5ba526edc7f486588ccde4d8a4d1b9f4afeba9517029126d981705eb16e32495')
validpgpkeys=('453B65310595562855471199CA68BE8010084C9C') # Jiří Denemark <jdenemar at redhat.com>
prepare() {
@@ -98,6 +104,9 @@
sed -i 's|/usr/libexec/qemu-bridge-helper|/usr/lib/qemu/qemu-bridge-helper|g' \
src/qemu/qemu.conf.in \
src/qemu/test_libvirtd_qemu.aug.in
+
+ patch -Np1 < ../glibc-2.36-lxc-fix.patch
+ patch -Np1 < ../glibc-2.36-virfile-fix.patch
}
build() {
Added: glibc-2.36-lxc-fix.patch
===================================================================
--- glibc-2.36-lxc-fix.patch (rev 0)
+++ glibc-2.36-lxc-fix.patch 2022-08-08 12:17:56 UTC (rev 1260621)
@@ -0,0 +1,37 @@
+From 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso at redhat.com>
+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 <eskultet at redhat.com>
+Signed-off-by: Cole Robinson <crobinso at redhat.com>
+---
+ src/lxc/lxc_container.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
+index b5278831da..a5401c2186 100644
+--- 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 <linux/unistd.h>
+
+-/* For MS_MOVE */
+-#include <linux/fs.h>
+-
+ #if WITH_CAPNG
+ # include <cap-ng.h>
+ #endif
+--
+GitLab
+
Added: glibc-2.36-virfile-fix.patch
===================================================================
--- glibc-2.36-virfile-fix.patch (rev 0)
+++ glibc-2.36-virfile-fix.patch 2022-08-08 12:17:56 UTC (rev 1260621)
@@ -0,0 +1,42 @@
+From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso at redhat.com>
+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 <eskultet at redhat.com>
+Signed-off-by: Cole Robinson <crobinso at redhat.com>
+---
+ src/util/virfile.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/util/virfile.c b/src/util/virfile.c
+index 99da058db3..ce541b8946 100644
+--- a/src/util/virfile.c
++++ b/src/util/virfile.c
+@@ -71,7 +71,11 @@
+ # endif
+ # include <sys/ioctl.h>
+ # include <linux/cdrom.h>
+-# include <linux/fs.h>
++/* 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
+--
+GitLab
+
More information about the arch-commits
mailing list