From patchwork Sat Apr 22 09:06:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 1772244 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q3QWT5rmHz1ybF for ; Sat, 22 Apr 2023 19:07:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 12F0760C00; Sat, 22 Apr 2023 09:07:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 12F0760C00 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rjfMSIk4Vfl1; Sat, 22 Apr 2023 09:06:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 157B460D76; Sat, 22 Apr 2023 09:06:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 157B460D76 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 53DE31C2B8D for ; Sat, 22 Apr 2023 09:06:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 27E1860C00 for ; Sat, 22 Apr 2023 09:06:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 27E1860C00 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nP4BCA3Rs1nY for ; Sat, 22 Apr 2023 09:06:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7F4DB60B2D Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by smtp3.osuosl.org (Postfix) with ESMTPS id 7F4DB60B2D for ; Sat, 22 Apr 2023 09:06:30 +0000 (UTC) X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost.fritz.box ([62.216.209.208]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8ygO-1pv7H21vwk-00675D; Sat, 22 Apr 2023 11:06:26 +0200 From: Peter Seiderer To: buildroot@buildroot.org Date: Sat, 22 Apr 2023 11:06:25 +0200 Message-Id: <20230422090625.25006-3-ps.report@gmx.net> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230422090625.25006-1-ps.report@gmx.net> References: <20230422090625.25006-1-ps.report@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:DC+15dtD+zbk4Z5oKd01/lFnKoqTcas9bc1fTa1zjXC311dID/q yPPwSud+ubAYETP6AMCZXMerYNXpCa8KHw9qrdWiIxTWPUH701LU0Cr2zcF8iizYQpxbS0d CMeDGrKxaX2ECtB6W1dAVX3U+akWVQovd6h127bZZ4GOYVHzOmCoWedp+ABfgZ9/ygiNmjn jD607DpV+ZsAv485qr7dA== UI-OutboundReport: notjunk:1;M01:P0:KsLUZan0YGI=;8Lj7RRbNHmL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ps.report@gmx.net; bh=4zkCh/PYmtmk0dwSlXK4D6mU5eVdBDSZkVQhrE0RCXI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=XnfUJik99kLNFHjF1Q6uE0FXU2GWgnwe74OwPS1EHUpwhxD+ZYmlU+DEvPXX4MtDU R6VxBW0DcfmEZcB03VrVa/kl0JWcaFrhplg/vuIJFYySm1WzYbGi+gUAyiquzLGRej HYwKfesOXjs/gEnJaodRdIHPKW9bGNIhbDgh55ZG6tPVu+LX1szivJINPXLNwqNbTO 97i8Fc92gGkMHJy5iP24J6FYHInMFVe1oqfz6eWdoTrqkfb4/kMEeFBX8tx8r+0H1q K209fNKRuI7zXWnsp4+sMcQW7xd2nKWw45jD1csmuIBeAKj5tqn7ZXun5vOSBAvgHl Xek9G6dsjCrrA== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=ps.report@gmx.net header.a=rsa-sha256 header.s=s31663417 header.b=XnfUJik9 Subject: [Buildroot] [PATCH v1 3/3] package/qemu: add patches to fix host libc-2.37 compile X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" - add two upstream patches to fix host libc-2.37 compile (see [1], [2] for details) Fixes: In file included from /usr/include/linux/btrfs.h:29, from ../linux-user/syscall.c:163: /usr/include/linux/fs.h:50:8: error: redefinition of ‘struct file_clone_range’ 50 | struct file_clone_range { | ^~~~~~~~~~~~~~~~ ../linux-user/syscall.c:129:8: note: originally defined here 129 | struct file_clone_range { | ^~~~~~~~~~~~~~~~ [1] https://lists.openembedded.org/g/openembedded-core/message/177322 [2] https://lore.kernel.org/qemu-devel/20230110174901.2580297-1-berrange@redhat.com/ Signed-off-by: Peter Seiderer Reviewed-by: Romain Naour --- ...er-add-more-compat-ioctl-definitions.patch | 73 +++++++++++++++++ ...r-fix-compat-with-glibc-2.36-sys-mou.patch | 82 +++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 package/qemu/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch create mode 100644 package/qemu/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch diff --git a/package/qemu/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch b/package/qemu/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch new file mode 100644 index 0000000000..9040daea92 --- /dev/null +++ b/package/qemu/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch @@ -0,0 +1,73 @@ +From ba43bb7b641a602081554d7d2a497888209fec2d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= +Date: Tue, 10 Jan 2023 12:49:00 -0500 +Subject: [PATCH 3/4] Revert "linux-user: add more compat ioctl definitions" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0. + +glibc has fixed (in 2.36.9000-40-g774058d729) the problem +that caused a clash when both sys/mount.h annd linux/mount.h +are included, and backported this to the 2.36 stable release +too: + + https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +It is saner for QEMU to remove the workaround it applied for +glibc 2.36 and expect distros to ship the 2.36 maint release +with the fix. This avoids needing to add a further workaround +to QEMU to deal with the fact that linux/brtfs.h now also pulls +in linux/mount.h via linux/fs.h since Linux 6.1 + +Signed-off-by: Daniel P. Berrangé +Reviewed-by: Marc-André Lureau +Message-Id: <20230110174901.2580297-2-berrange@redhat.com> +Signed-off-by: Laurent Vivier + +[Upstream: https://gitlab.com/qemu-project/qemu/-/commit/9f0246539ae84a5e21efd1cc4516fc343f08115a] +Signed-off-by: Peter Seiderer +--- + linux-user/syscall.c | 25 ------------------------- + 1 file changed, 25 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 24b25759be..10af5e0d8e 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -111,31 +111,6 @@ + #define FS_IOC32_SETFLAGS _IOW('f', 2, int) + #define FS_IOC32_GETVERSION _IOR('v', 1, int) + #define FS_IOC32_SETVERSION _IOW('v', 2, int) +- +-#define BLKGETSIZE64 _IOR(0x12,114,size_t) +-#define BLKDISCARD _IO(0x12,119) +-#define BLKIOMIN _IO(0x12,120) +-#define BLKIOOPT _IO(0x12,121) +-#define BLKALIGNOFF _IO(0x12,122) +-#define BLKPBSZGET _IO(0x12,123) +-#define BLKDISCARDZEROES _IO(0x12,124) +-#define BLKSECDISCARD _IO(0x12,125) +-#define BLKROTATIONAL _IO(0x12,126) +-#define BLKZEROOUT _IO(0x12,127) +- +-#define FIBMAP _IO(0x00,1) +-#define FIGETBSZ _IO(0x00,2) +- +-struct file_clone_range { +- __s64 src_fd; +- __u64 src_offset; +- __u64 src_length; +- __u64 dest_offset; +-}; +- +-#define FICLONE _IOW(0x94, 9, int) +-#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) +- + #else + #include + #endif +-- +2.40.0 + diff --git a/package/qemu/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch b/package/qemu/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch new file mode 100644 index 0000000000..5dbef6d6a4 --- /dev/null +++ b/package/qemu/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch @@ -0,0 +1,82 @@ +From ec8b232faefcdd7482c4998e64b78d49d0204502 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= +Date: Tue, 10 Jan 2023 12:49:01 -0500 +Subject: [PATCH 4/4] Revert "linux-user: fix compat with glibc >= 2.36 + sys/mount.h" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532. + +glibc has fixed (in 2.36.9000-40-g774058d729) the problem +that caused a clash when both sys/mount.h annd linux/mount.h +are included, and backported this to the 2.36 stable release +too: + + https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +It is saner for QEMU to remove the workaround it applied for +glibc 2.36 and expect distros to ship the 2.36 maint release +with the fix. This avoids needing to add a further workaround +to QEMU to deal with the fact that linux/brtfs.h now also pulls +in linux/mount.h via linux/fs.h since Linux 6.1 + +Signed-off-by: Daniel P. Berrangé +Reviewed-by: Marc-André Lureau +Message-Id: <20230110174901.2580297-3-berrange@redhat.com> +Signed-off-by: Laurent Vivier + +[Upstream: https://gitlab.com/qemu-project/qemu/-/commit/6003159ce18faad4e1bc7bf9c85669019cd4950e] +Signed-off-by: Peter Seiderer +--- + linux-user/syscall.c | 18 ------------------ + meson.build | 2 -- + 2 files changed, 20 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 10af5e0d8e..d974c76b60 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -95,25 +95,7 @@ + #include + #include + #include +- +-#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 +-#endif + #include + #if defined(CONFIG_FIEMAP) + #include +diff --git a/meson.build b/meson.build +index b88867ca9d..39e83bbafe 100644 +--- a/meson.build ++++ b/meson.build +@@ -2032,8 +2032,6 @@ 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', +-- +2.40.0 +