From 7a7933f924226747034f700133b19cb60f721eaa Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Fri, 17 Jun 2022 12:16:26 -0400 Subject: [PATCH] update to version 2.1 Resolves: rhbz#2070603 Signed-off-by: Jeff Moyer --- .gitignore | 2 + ...ext-cp.c-cope-with-variable-SIGSTKSZ.patch | 74 ------------------- liburing.spec | 12 ++- sources | 4 +- 4 files changed, 12 insertions(+), 80 deletions(-) delete mode 100644 8aac320-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch diff --git a/.gitignore b/.gitignore index 1c4226f..d5e3c09 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ /liburing-0.6.tar.gz.asc /liburing-0.7.tar.gz /liburing-0.7.tar.gz.asc +/liburing-2.1.tar.gz +/liburing-2.1.tar.gz.asc diff --git a/8aac320-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch b/8aac320-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch deleted file mode 100644 index b057b85..0000000 --- a/8aac320-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch +++ /dev/null @@ -1,74 +0,0 @@ -examples/ucontext-cp.c: cope with variable SIGSTKSZ - -BZ: 1980845 - -commit 8aac320ae8445c5434ab3be1761414a5247e5d42 -Author: Stefan Hajnoczi -Date: Tue Apr 13 16:03:19 2021 +0100 - - examples/ucontext-cp.c: cope with variable SIGSTKSZ - - The size of C arrays at file scope must be constant. The following - compiler error occurs with recent upstream glibc (2.33.9000): - - CC ucontext-cp - ucontext-cp.c:31:23: error: variably modified ‘stack_buf’ at file scope - 31 | unsigned char stack_buf[SIGSTKSZ]; - | ^~~~~~~~~ - make[1]: *** [Makefile:26: ucontext-cp] Error 1 - - The following glibc commit changed SIGSTKSZ from a constant value to a - variable: - - commit 6c57d320484988e87e446e2e60ce42816bf51d53 - Author: H.J. Lu - Date: Mon Feb 1 11:00:38 2021 -0800 - - sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305] - ... - +# define SIGSTKSZ sysconf (_SC_SIGSTKSZ) - - Allocate the stack buffer explicitly to avoid declaring an array at file - scope. - - Cc: H.J. Lu - Signed-off-by: Stefan Hajnoczi - Signed-off-by: Jens Axboe - -diff --git a/examples/ucontext-cp.c b/examples/ucontext-cp.c -index 0b2a6b5..ea0c934 100644 ---- a/examples/ucontext-cp.c -+++ b/examples/ucontext-cp.c -@@ -28,7 +28,7 @@ - - typedef struct { - struct io_uring *ring; -- unsigned char stack_buf[SIGSTKSZ]; -+ unsigned char *stack_buf; - ucontext_t ctx_main, ctx_fnew; - } async_context; - -@@ -115,8 +115,13 @@ static int setup_context(async_context *pctx, struct io_uring *ring) - perror("getcontext"); - return -1; - } -- pctx->ctx_fnew.uc_stack.ss_sp = &pctx->stack_buf; -- pctx->ctx_fnew.uc_stack.ss_size = sizeof(pctx->stack_buf); -+ pctx->stack_buf = malloc(SIGSTKSZ); -+ if (!pctx->stack_buf) { -+ perror("malloc"); -+ return -1; -+ } -+ pctx->ctx_fnew.uc_stack.ss_sp = pctx->stack_buf; -+ pctx->ctx_fnew.uc_stack.ss_size = SIGSTKSZ; - pctx->ctx_fnew.uc_link = &pctx->ctx_main; - - return 0; -@@ -174,6 +179,7 @@ static void copy_file_wrapper(arguments_bundle *pbundle) - free(iov.iov_base); - close(pbundle->infd); - close(pbundle->outfd); -+ free(pbundle->pctx->stack_buf); - free(pbundle->pctx); - free(pbundle); - diff --git a/liburing.spec b/liburing.spec index 6681035..264b809 100644 --- a/liburing.spec +++ b/liburing.spec @@ -1,6 +1,6 @@ Name: liburing -Version: 0.7 -Release: 7%{?dist} +Version: 2.1 +Release: 1%{?dist} Summary: Linux-native io_uring I/O access library License: (GPLv2 with exceptions and LGPLv2+) or MIT Source0: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz @@ -9,8 +9,6 @@ URL: https://git.kernel.dk/cgit/liburing/ BuildRequires: gcc BuildRequires: make -Patch0: 8aac320-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch - %description Provides native async IO for the Linux kernel, in a fast and efficient manner, for both buffered and O_DIRECT. @@ -47,8 +45,14 @@ for the Linux-native io_uring. %exclude %{_libdir}/liburing.a %{_libdir}/pkgconfig/* %{_mandir}/man2/* +%{_mandir}/man3/* +%{_mandir}/man7/* %changelog +* Fri Jun 17 2022 Jeff Moyer - 2.1-1.el9 +- Rebase to 2.1. +- Resolves: rhbz#2070603 + * Mon Aug 09 2021 Mohan Boddu - 0.7-7 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index c59ab63..f62d08e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (liburing-0.7.tar.gz) = fcc04abcab9377c66c52b8114b4758a70a71a6e20575fd4114c07903ce8001b4764df8c7588d8b8d784c53306bfb561af6f1af6ad3459dc0c801464ce059fcb8 -SHA512 (liburing-0.7.tar.gz.asc) = d4b07308ffdc0818c0346a4d266a2a3e9d35801944fef70bb999b85e3aec7fa68498a2f8011fbcb9dc14a6e01a74f2ca75f1bd7e8c12311822a4e970ec433211 +SHA512 (liburing-2.1.tar.gz) = d0e3e8596b29aab30b0ac2f046d9884b55c22a07b3eea225edfccca3eb3d2b51bf5a2168d4ce5ed814dc8cecbe9beceee4bbd2fe390a068404754e6ad35a0a96 +SHA512 (liburing-2.1.tar.gz.asc) = f2952a34cfed56b8d768d0133aeb09cf8e804f0819975fcb6636c6027e95d90744f54e790bd14ee47d3da36ff0fcd7f4edade0e1f45e357a83ed6839e6783a37