Skip to contentSkip to conversation

liburing: Upgrade to 2.9

PATCH New Khem Raj 1 participant 4 messages Feb 18, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 liburing: Upgrade to 2.9

Drop upstreamed patches, fix build with latest musl

---
 ...ibc.c-only-when-CONFIG_NOLIBC-is-set.patch | 43 -------------------
 ...1-test-Drop-including-error.h-header.patch | 27 ------------
 ...ncluding-missing-string.h-for-memcpy.patch | 39 +++++++++++++++++
 ...-Include-poll.h-instead-of-sys-poll..patch | 32 --------------
 .../{liburing_2.7.bb => liburing_2.9.bb}      |  6 +--
 5 files changed, 41 insertions(+), 106 deletions(-)
 delete mode 100644 meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch
 delete mode 100644 meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch
 create mode 100644 meta-oe/recipes-support/liburing/liburing/0001-test-Including-missing-string.h-for-memcpy.patch
 delete mode 100644 meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch
 rename meta-oe/recipes-support/liburing/{liburing_2.7.bb => liburing_2.9.bb} (83%)
meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch deleted +0 -43
deleted file mode 100644
index 90f028b856..0000000000
@@ -1,43 +0,0 @@
-From 7ea4e55a91e6d5564c6de762c2d1afc78ff9cfd3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Mon, 16 Sep 2024 22:58:38 +0000
-Subject: [PATCH] test: Compile nolibc.c only when CONFIG_NOLIBC is set
-
-building nolibc.c fails for non nolibc targets
-
-Fixes
-In file included from nolibc.c:33:
-./../src/lib.h:20:2: error: "This arch doesn't support building liburing without libc"
-   20 | #error "This arch doesn't support building liburing without libc"
-      |  ^
-1 error generated.
-
-Upstream-Status: Backport [https://github.com/axboe/liburing/commit/a182f62c01f981cd9dd508ec952fbc975b263e3d]
-Signed-off-by: Khem Raj <[email protected]>
----
- test/Makefile | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/test/Makefile b/test/Makefile
-index 0538a75..0dfecb8 100644
---- a/test/Makefile
-+++ b/test/Makefile
-@@ -126,7 +126,6 @@ test_srcs := \
- 	msg-ring-overflow.c \
- 	multicqes_drain.c \
- 	no-mmap-inval.c \
--	nolibc.c \
- 	nop-all-sizes.c \
- 	nop.c \
- 	ooo-file-unreg.c \
-@@ -221,6 +220,10 @@ test_srcs := \
- all_targets :=
- include ../Makefile.quiet
- 
-+ifeq ($(CONFIG_NOLIBC),y)
-+	test_srcs += nolibc.c
-+endif
-+
- ifdef CONFIG_HAVE_STATX
- 	test_srcs += statx.c
- else ifdef CONFIG_HAVE_GLIBC_STATX
meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch deleted +0 -27
deleted file mode 100644
index 62ca78a1ed..0000000000
@@ -1,27 +0,0 @@
-From 684bcb2a8795fd399d6c164e51459a2785057b1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Tue, 17 Sep 2024 09:56:42 -0700
-Subject: [PATCH 1/2] test: Drop including error.h header
-
-There is no error APIs being used in this test, therefore
-drop including it, this also makes it portable to musl
-systems which do not have error.h
-
-Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/1233]
-Signed-off-by: Khem Raj <[email protected]>
----
- test/init-mem.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/test/init-mem.c b/test/init-mem.c
-index 6f9a02a..f512190 100644
---- a/test/init-mem.c
-+++ b/test/init-mem.c
-@@ -13,7 +13,6 @@
- #include <netinet/udp.h>
- #include <arpa/inet.h>
- #include <net/if.h>
--#include <error.h>
- 
- #include "liburing.h"
- #include "helpers.h"
meta-oe/recipes-support/liburing/liburing/0001-test-Including-missing-string.h-for-memcpy.patch new file +39 -0
new file mode 100644
index 0000000000..f744812a3f
@@ -0,0 +1,39 @@
+From c55874bc28f66d606527b940d4bd0f266bbaaa2c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Feb 2025 11:51:19 -0800
+Subject: [PATCH] test: Including missing string.h for memcpy
+
+Fixes
+accept-test.c:39:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+
+Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/1351]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ test/232c93d07b74.c | 1 +
+ test/accept-test.c  | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/test/232c93d07b74.c b/test/232c93d07b74.c
+index d3053b9..d5677d3 100644
+--- a/test/232c93d07b74.c
++++ b/test/232c93d07b74.c
+@@ -10,6 +10,7 @@
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <assert.h>
++#include <string.h>
+ 
+ #include <pthread.h>
+ #include <errno.h>
+diff --git a/test/accept-test.c b/test/accept-test.c
+index 99f6080..142b2de 100644
+--- a/test/accept-test.c
++++ b/test/accept-test.c
+@@ -7,6 +7,7 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <assert.h>
++#include <string.h>
+ #include "liburing.h"
+ #include "helpers.h"
+ 
meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch deleted +0 -32
deleted file mode 100644
index 8a1d542502..0000000000
@@ -1,32 +0,0 @@
-From d06433ff1a1905436cfcde80e22ee51bd9591536 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Tue, 17 Sep 2024 09:59:31 -0700
-Subject: [PATCH 2/2] ooo-file-unreg.c: Include poll.h instead of sys/poll.h
-
-This fixes a warning e.g.
-
-In file included from ooo-file-unreg.c:12:
-/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux-musl/liburing/2.7/recipe-sysroot/usr/include/sys/poll.h:1:2: warning: redirecting incorrect #include <sys/poll.h> to <poll.h> [-W#warnings]
-    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
-      |  ^
-1 warning generated.
-
-Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/1233]
-Signed-off-by: Khem Raj <[email protected]>
----
- test/ooo-file-unreg.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test/ooo-file-unreg.c b/test/ooo-file-unreg.c
-index d76e0fb..dd6ea55 100644
---- a/test/ooo-file-unreg.c
-+++ b/test/ooo-file-unreg.c
-@@ -9,7 +9,7 @@
- #include <sys/socket.h>
- #include <unistd.h>
- #include <stdlib.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include "liburing.h"
- #include "helpers.h"
meta-oe/recipes-support/liburing/liburing_2.9.bb renamed from meta-oe/recipes-support/liburing/liburing_2.7.bb +2 -4
similarity index 83%
rename from meta-oe/recipes-support/liburing/liburing_2.7.bb
rename to meta-oe/recipes-support/liburing/liburing_2.9.bb
index b10fe40ca0..e17d829c3d 100644
@@ -10,10 +10,8 @@ LICENSE = "LGPL-2.1-only | MIT"
 LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=2b0e9926530c269f5ae95560370195af"
 
 SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https \
-           file://0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch \
-           file://0001-test-Drop-including-error.h-header.patch \
-           file://0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch"
-SRCREV = "5227d48b28ad8671e61d444b72678da584d2e6c3"
+           file://0001-test-Including-missing-string.h-for-memcpy.patch"
+SRCREV = "08468cc3830185c75f9e7edefd88aa01e5c2f8ab"
 
 S = "${WORKDIR}/git"
 
author
#1 lore raw

PATCH 2/4 multipath-tools: Fix build with latest musl

---
 ...uxsock.c-Include-string.h-for-memcpy.patch | 28 +++++++++++++++++++
 .../multipath-tools/multipath-tools_0.11.0.bb |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-support/multipath-tools/files/0001-libmpathutils-uxsock.c-Include-string.h-for-memcpy.patch
meta-oe/recipes-support/multipath-tools/files/0001-libmpathutils-uxsock.c-Include-string.h-for-memcpy.patch new file +28 -0
new file mode 100644
index 0000000000..128a0c4d8d
@@ -0,0 +1,28 @@
+From 1d444772db14f4acb8d47b874462b0cc171ab672 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Feb 2025 12:01:59 -0800
+Subject: [PATCH] libmpathutils/uxsock.c: Include string.h for memcpy
+
+Fixes
+uxsock.c:72:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+
+Upstream-Status: Submitted [https://lore.kernel.org/dm-devel/[email protected]/T/#u]
+Signed-off-by: Khem Raj <[email protected]>
+Cc: Benjamin Marzinski <[email protected]>
+Cc: Martin Wilck <[email protected]>
+---
+ libmpathutil/uxsock.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libmpathutil/uxsock.c b/libmpathutil/uxsock.c
+index 2135476d..a474874e 100644
+--- a/libmpathutil/uxsock.c
++++ b/libmpathutil/uxsock.c
+@@ -8,6 +8,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <stdarg.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.0.bb +1 -0
index 9f95361063..67e293dac2 100644
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=ma
            file://0010-Always-use-devmapper.patch \
            file://0011-fix-bug-of-do_compile-and-do_install.patch \
            file://0012-add-explicit-dependency-on-libraries.patch \
+           file://0001-libmpathutils-uxsock.c-Include-string.h-for-memcpy.patch \
            "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=9ec28527f3d544b51ceb0e1907d0bf3f"
author
#2 lore raw

PATCH 3/4 sblim-sfcb: Include string.h for memcpy

In reply to Khem Raj

Fixes build with latest musl

---
 .../0001-include-missing-system-headers.patch | 53 +++++++++++--------
 1 file changed, 31 insertions(+), 22 deletions(-)
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-include-missing-system-headers.patch +31 -22
index c16e393f49..f9083e7934 100644
@@ -18,8 +18,6 @@ Signed-off-by: Khem Raj <[email protected]>
  trace.h             | 3 ++-
  9 files changed, 12 insertions(+), 3 deletions(-)
 
-diff --git a/brokerEnc.c b/brokerEnc.c
-index 9115e71..889afcd 100644
 --- a/brokerEnc.c
 +++ b/brokerEnc.c
 @@ -25,6 +25,8 @@
@@ -31,8 +29,6 @@ index 9115e71..889afcd 100644
  extern const char *opGetClassNameChars(const CMPIObjectPath * cop);
  extern const char *opGetNameSpaceChars(const CMPIObjectPath * cop);
  extern CMPIConstClass *getConstClass(const char *ns, const char *cn);
-diff --git a/brokerOs.c b/brokerOs.c
-index 8d73a0b..b1427fd 100644
 --- a/brokerOs.c
 +++ b/brokerOs.c
 @@ -22,6 +22,7 @@
@@ -43,8 +39,6 @@ index 8d73a0b..b1427fd 100644
  
  static char    *
  resolveFileName(const char *filename)
-diff --git a/mlog.c b/mlog.c
-index a2d9eb7..6d9cd29 100644
 --- a/mlog.c
 +++ b/mlog.c
 @@ -26,6 +26,7 @@ const char     *_mlog_id =
@@ -55,8 +49,6 @@ index a2d9eb7..6d9cd29 100644
  #include <errno.h>
  #include <signal.h>
  #include "trace.h"              /* for setSignal() */
-diff --git a/mofc/backend_sfcb.c b/mofc/backend_sfcb.c
-index 614abcd..99d4061 100644
 --- a/mofc/backend_sfcb.c
 +++ b/mofc/backend_sfcb.c
 @@ -29,7 +29,7 @@
@@ -68,8 +60,6 @@ index 614abcd..99d4061 100644
  
  extern CMPIStatus sfcb_simpleArrayAdd(CMPIArray * array, CMPIValue * val, CMPIType type);
  extern CMPIObjectPath *getObjectPath(char *path, char **msg);
-diff --git a/sfcbdump.c b/sfcbdump.c
-index 8a9c335..aa8559c 100644
 --- a/sfcbdump.c
 +++ b/sfcbdump.c
 @@ -23,6 +23,7 @@
@@ -80,8 +70,6 @@ index 8a9c335..aa8559c 100644
  #include "objectImpl.h"
  
  #define BINARY_NAME argv[0]
-diff --git a/sfcbdumpP32onI32.c b/sfcbdumpP32onI32.c
-index ccf87dc..3540751 100644
 --- a/sfcbdumpP32onI32.c
 +++ b/sfcbdumpP32onI32.c
 @@ -22,6 +22,7 @@
@@ -92,8 +80,6 @@ index ccf87dc..3540751 100644
  #include <getopt.h>
  #include "objectImpl.h"
  #include <byteswap.h>
-diff --git a/sfcbsem.c b/sfcbsem.c
-index 3f8de7f..1e6358b 100644
 --- a/sfcbsem.c
 +++ b/sfcbsem.c
 @@ -21,6 +21,7 @@
@@ -104,8 +90,6 @@ index 3f8de7f..1e6358b 100644
  #include <getopt.h>
  #include <errno.h>
  
-diff --git a/trace.c b/trace.c
-index 23597e1..c4f8011 100644
 --- a/trace.c
 +++ b/trace.c
 @@ -25,6 +25,7 @@
@@ -125,8 +109,6 @@ index 23597e1..c4f8011 100644
  int             terminating = 0;
  int             colorTrace;
  
-diff --git a/trace.h b/trace.h
-index ea39850..52d408d 100644
 --- a/trace.h
 +++ b/trace.h
 @@ -25,6 +25,7 @@
@@ -137,7 +119,7 @@ index ea39850..52d408d 100644
  extern unsigned long _sfcb_trace_mask;
  /* use pointer indirect _sfcb_trace_mask to allow shared memory flag */
  extern unsigned long *_ptr_sfcb_trace_mask;
-@@ -162,7 +163,7 @@ extern sigHandler *setSignal(int sn, sigHandler * sh, int flags);
+@@ -162,7 +163,7 @@ extern sigHandler *setSignal(int sn, sig
  
  extern char    *processName;
  extern int      providerProcess;
@@ -146,6 +128,33 @@ index ea39850..52d408d 100644
  extern int      terminating;
  
  #endif
--- 
-2.37.3
-
+--- a/support.c
++++ b/support.c
+@@ -39,6 +39,7 @@
+ #include <err.h>
+ #endif
+ #include <errno.h>
++#include <string.h> /* memcpy */
+ #include "native.h"
+ #include "trace.h"
+ #include "control.h"
+--- a/qualifier.c
++++ b/qualifier.c
+@@ -19,6 +19,7 @@
+  *
+  */
+ 
++#include <string.h> /* memcpy */
+ #include "objectImpl.h"
+ #include "qualifier.h"
+ 
+--- a/objectImplSwapI32toP32.c
++++ b/objectImplSwapI32toP32.c
+@@ -24,6 +24,7 @@
+ #include <byteswap.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h> /* memcpy */
+ #include <sfcCommon/utilft.h>
+ #include <sys/utsname.h>
+ 
author
#3 lore raw

PATCH 4/4 mctp: Fix build with latest musl

In reply to Khem Raj
---
 .../mctp/0001-mctp-bench-Adjust-headers.patch | 38 +++++++++++++++++++
 .../recipes-support/mctp/mctp_2.1.bb          |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/mctp/mctp/0001-mctp-bench-Adjust-headers.patch
meta-networking/recipes-support/mctp/mctp/0001-mctp-bench-Adjust-headers.patch new file +38 -0
new file mode 100644
index 0000000000..4ff9b09299
@@ -0,0 +1,38 @@
+From 166b2251a156a03a80318533440178ac0b913945 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Feb 2025 21:29:41 -0800
+Subject: [PATCH] mctp-bench: Adjust headers
+
+bits/time.h is not be included directly, instead use time.h
+since poll.h is included there is no need to include sys/poll.h
+
+Fixes
+../git/src/mctp-bench.c:2:10: fatal error: 'bits/time.h' file not found
+    2 | #include <bits/time.h>
+      |          ^~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/CodeConstruct/mctp/pull/65]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/mctp-bench.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/mctp-bench.c b/src/mctp-bench.c
+index eeb6fcf..60b3bb0 100644
+--- a/src/mctp-bench.c
++++ b/src/mctp-bench.c
+@@ -1,5 +1,5 @@
+ #define _XOPEN_SOURCE 700
+-#include <bits/time.h>
++#include <time.h>
+ #include <err.h>
+ #include <errno.h>
+ #include <poll.h>
+@@ -9,7 +9,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <time.h>
+ #include <unistd.h>
meta-networking/recipes-support/mctp/mctp_2.1.bb +2 -1
index 5bd7039529..c76fc09af3 100644
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21"
 
 SRCREV = "dd944cf5b5a8b834f3685bcb2017190258dbcd0b"
 
-SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https"
+SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https \
+           file://0001-mctp-bench-Adjust-headers.patch"
 
 S = "${WORKDIR}/git"