summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiu Wenbo2022-08-10 09:06:31 +0800
committerQiu Wenbo2022-08-10 09:06:31 +0800
commit88a57ab807700c048363854c6cd050e849c0501d (patch)
tree7ae7fa293a71550424113b1b83146b96279fd7d2
parente4fcbc7d60378e59bc28107c565c873aca95154f (diff)
downloadaur-88a57ab807700c048363854c6cd050e849c0501d.tar.gz
build against glibc 2.36
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--qemu-7.0.0-glibc-2.36.patch43
3 files changed, 53 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c146f6370389..ee50846dd716 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = qemu-user-static
pkgdesc = Statically linked binaries of Qemu with user emulation. Useful for containers/chroot environment with binfmt.
pkgver = 7.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://wiki.qemu.org/
arch = x86_64
arch = aarch64
@@ -13,9 +13,11 @@ pkgbase = qemu-user-static
makedepends = pcre-static
source = https://download.qemu.org/qemu-7.0.0.tar.xz
source = https://download.qemu.org/qemu-7.0.0.tar.xz.sig
+ source = qemu-7.0.0-glibc-2.36.patch
validpgpkeys = CEACC9E15534EBABB82D3FA03353C9CEF108B584
sha512sums = 44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1
sha512sums = SKIP
+ sha512sums = aa976c84d8524bb40ada506f80c01384c49f2e48fba889b0e535285aee700937886e935d18ad83b38093ba07f38be50b0fae76a0b29fd487daeac31e3221381e
pkgname = qemu-user-static
provides = qemu-user-static
diff --git a/PKGBUILD b/PKGBUILD
index 72ed073a1290..dcbc491c6c05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,17 @@
pkgname=qemu-user-static
pkgdesc="Statically linked binaries of Qemu with user emulation. Useful for containers/chroot environment with binfmt."
pkgver=7.0.0
-pkgrel=1
+pkgrel=2
arch=(x86_64 aarch64)
license=(GPL2 LGPL2.1)
url="http://wiki.qemu.org/"
depends=()
makedepends=(python meson glib2-static pcre-static)
-source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig})
+source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig}
+ qemu-7.0.0-glibc-2.36.patch)
sha512sums=('44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1'
- 'SKIP')
+ 'SKIP'
+ 'aa976c84d8524bb40ada506f80c01384c49f2e48fba889b0e535285aee700937886e935d18ad83b38093ba07f38be50b0fae76a0b29fd487daeac31e3221381e')
validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584')
case $CARCH in
@@ -28,6 +30,8 @@ prepare() {
cd qemu-${pkgver}
#sed -i 's/vte-2\.90/vte-2.91/g' configure
+
+ patch -Np1 -d . -i ../qemu-7.0.0-glibc-2.36.patch
}
_configure() {
diff --git a/qemu-7.0.0-glibc-2.36.patch b/qemu-7.0.0-glibc-2.36.patch
new file mode 100644
index 000000000000..21b09da92cf2
--- /dev/null
+++ b/qemu-7.0.0-glibc-2.36.patch
@@ -0,0 +1,43 @@
+diff --git a/linux-user/syscall.c b/linux-user/syscall.c
+index b27a6552aa..52d178afe7 100644
+--- 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>
+diff --git a/meson.build b/meson.build
+index 294e9a8f32..30a380752c 100644
+--- 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',