Accepting request 989441 from devel:libraries:c_c++

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/989441
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/liburing?expand=0&rev=10
This commit is contained in:
Richard Brown 2022-07-26 17:42:48 +00:00 committed by Git OBS Bridge
commit e75d4a606f
5 changed files with 109 additions and 7 deletions

52
handle-eintr.patch Normal file
View File

@ -0,0 +1,52 @@
--- liburing-2.2/test/ce593a6c480a.c
+++ liburing-2.2/test/ce593a6c480a.c
@@ -111,15 +111,16 @@
(void*) (intptr_t) other_fd);
/* Wait on the event fd for an event to be ready */
- ret = read(loop_fd, buf, 8);
- if (ret < 0) {
- perror("read");
- return 1;
- } else if (ret != 8) {
- fprintf(stderr, "Odd-sized eventfd read: %d\n", ret);
- return 1;
- }
-
+ do {
+ ret = read(loop_fd, buf, 8);
+ if (ret < 0 && errno != EINTR) {
+ perror("read");
+ return 1;
+ } else if (ret > 0 && ret != 8) {
+ fprintf(stderr, "Odd-sized eventfd read: %d\n", ret);
+ return 1;
+ }
+ } while (ret < 0);
ret = io_uring_wait_cqe(&ring, &cqe);
if (ret) {
--- liburing-2.2/test/io-cancel.c
+++ liburing-2.2/test/io-cancel.c
@@ -366,10 +366,17 @@
} else {
int wstatus;
- if (waitpid(p, &wstatus, 0) == (pid_t)-1) {
- perror("waitpid()");
- return 1;
- }
+ do {
+ if (waitpid(p, &wstatus, 0) == (pid_t)-1) {
+ if (errno == EINTR) {
+ continue;
+ }
+ perror("waitpid()");
+ return 1;
+ }
+ break;
+ } while (1);
+
if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus)) {
fprintf(stderr, "child failed %i\n", WEXITSTATUS(wstatus));
return 1;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df7c8fd05fd39da622b2814e06f815f11f1beb429487a4330eed64bb7f353dbf
size 120806

3
liburing-2.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0fcd25dc1eb32cbeb534219f8e7fcfeadbd8dc2304aa447148e5ca8408076f22
size 172733

View File

@ -1,7 +1,49 @@
-------------------------------------------------------------------
Fri Jul 8 12:40:13 UTC 2022 - Dirk Müller <dmueller@suse.com>
- add handle-eintr.patch, enable tests everywhere
-------------------------------------------------------------------
Wed Jun 29 11:28:10 UTC 2022 - Dirk Müller <dmueller@suse.com>
- enable tests for != ppc64le
-------------------------------------------------------------------
Tue Jun 28 13:40:10 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.2:
* Support non-libc builds.
* Optimized syscall handling for x86-64/x86/aarch64.
* Enable non-lib function calls for fast path functions.
* Add support for multishot accept.
* io_uring_register_files() will set RLIMIT_NOFILE if necessary.
* Add support for registered ring fds, io_uring_register_ring_fd(),
reducingthe overhead of an io_uring_enter() system call.
* Add support for the message ring opcode.
* Add support for newer request cancelation features.
* Add support for IORING_SETUP_COOP_TASKRUN, which can help reduce the
overhead of io_uring in general. Most applications should set this flag,
see the io_uring_setup.2 man page for details.
* Add support for registering a sparse buffer and file set.
* Add support for a new buffer provide scheme, see
io_uring_register_buf_ring.3 for details.
* Add io_uring_submit_and_wait_timeout() for submitting IO and waiting
for completions with a timeout.
* Add io_uring_prep_{read,write}v2 prep helpers.
* Add io_uring_prep_close_direct() helper.
* Add support for SQE128 and CQE32, which are doubly sized SQE and CQE
rings. This is needed for some cases of the new IORING_OP_URING_CMD,
notably for NVMe passthrough.
* ~5500 lines of man page additions, including adding ~90 new man pages.
* Synced with the 5.19 kernel release, supporting all the features of
5.19 and earlier.
* 24 new regression test cases, and ~7000 lines of new tests in general.
* General optimizations and fixes.
-------------------------------------------------------------------
Fri Apr 29 06:53:08 UTC 2022 - Dirk Müller <dmueller@suse.com>
- avoid requiring kernel-default (bsc#1193522)
- avoid requiring kernel-default (bsc#1193522)
-------------------------------------------------------------------
Thu Feb 10 13:32:35 UTC 2022 - David Disseldorp <ddiss@suse.com>

View File

@ -18,15 +18,20 @@
%define lname liburing2
Name: liburing
Version: 2.1
Version: 2.2
Release: 0
Summary: Linux-native io_uring I/O access library
License: (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
Group: Development/Libraries/C and C++
URL: https://git.kernel.dk/cgit/liburing
Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.bz2
BuildRequires: gcc
# PATCH-FIX-UPSTREAM: has been accepted upstream
# [1/1] Handle EINTR in tests
# commit: fa67f6aedcfdaffc14cbf0b631253477b2565ef0
Patch2: handle-eintr.patch
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: procps
# Kernel part has landed in 5.1
Conflicts: kernel < 5.1
@ -55,7 +60,7 @@ This package provides header files to include and libraries to link with
for the Linux-native io_uring.
%prep
%setup -q
%autosetup -p1
%build
# not autotools, so configure macro doesn't work
@ -67,6 +72,9 @@ sh ./configure --prefix=%{_prefix} \
--datadir=%{_datadir}
%make_build -C src
%check
/usr/bin/make runtests
%install
%make_install
rm -v %{buildroot}%{_libdir}/%{name}.a