2019-11-27 11:24:16 +01:00
|
|
|
#
|
|
|
|
# spec file for package liburing
|
|
|
|
#
|
2024-04-03 11:35:44 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-11-27 11:24:16 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-03-15 08:35:31 +01:00
|
|
|
%define lname liburing2
|
2019-11-27 11:24:16 +01:00
|
|
|
Name: liburing
|
2024-04-03 11:35:44 +02:00
|
|
|
Version: 2.5
|
2019-11-27 11:24:16 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Linux-native io_uring I/O access library
|
2020-11-10 17:36:31 +01:00
|
|
|
License: (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
|
2019-12-12 10:42:57 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-11-27 11:24:16 +01:00
|
|
|
URL: https://git.kernel.dk/cgit/liburing
|
2021-10-15 14:23:42 +02:00
|
|
|
Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.bz2
|
2024-04-03 11:35:44 +02:00
|
|
|
Patch0: test-recv-multishot-wait-for-the-right-amount-of-CQE.patch
|
|
|
|
Patch1: test-no-mmap-inval-0-return-is-fine-too.patch
|
2022-07-06 13:22:40 +02:00
|
|
|
BuildRequires: gcc-c++
|
2021-03-15 08:35:31 +01:00
|
|
|
BuildRequires: pkgconfig
|
2022-07-06 13:22:40 +02:00
|
|
|
BuildRequires: procps
|
2022-04-29 09:47:16 +02:00
|
|
|
# Kernel part has landed in 5.1
|
|
|
|
Conflicts: kernel < 5.1
|
2019-11-27 11:24:16 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Provides native async IO for the Linux kernel, in a fast and efficient
|
|
|
|
manner, for both buffered and O_DIRECT.
|
|
|
|
|
|
|
|
%package -n %{lname}
|
|
|
|
Summary: Linux-native io_uring I/O access library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n %{lname}
|
|
|
|
Provides native async IO for the Linux kernel, in a fast and efficient
|
|
|
|
manner, for both buffered and O_DIRECT.
|
|
|
|
|
Accepting request 1092686 from home:dmdiss:liburing_2.4
- Update to 2.4:
* Add io_uring_{major,minor,check}_version() functions.
* Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
* FFI support (for non-C/C++ languages integration).
* Add io_uring_prep_msg_ring_cqe_flags() function.
* Deprecate --nolibc configure option.
* CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
* Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
* Add io_uring_close_ring_fd() function.
* Add io_uring_prep_msg_ring_fd_alloc function.
* Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
* Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
* Add io_uring_prep_sendto() function.
- Add liburing-ffi2 package for corresponding FFI library, given that
dependents will normally require either that or the base library (not both).
- Drop upstream patches:
* 0001-Do-not-always-expect-multishot-recv-to-stop-posting-.patch
* 0001-test-file-verify.t-Don-t-run-over-mlock-limit-when-r.patch
* 0001-test-helpers-fix-socket-length-type.patch
OBS-URL: https://build.opensuse.org/request/show/1092686
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=32
2023-06-13 07:51:40 +02:00
|
|
|
%package -n liburing-ffi2
|
|
|
|
Summary: io_uring I/O access library for non-C/C++ languages
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n liburing-ffi2
|
|
|
|
Foreign function interface for liburing, offering non-C/C++ language
|
|
|
|
integration.
|
|
|
|
|
2019-11-27 11:24:16 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for Linux-native io_uring I/O access library
|
2019-12-12 10:42:57 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2022-02-17 23:50:56 +01:00
|
|
|
# SLE/Leap 15.4+ retain liburing-devel for the inherited 0.6 API. The v2 API is:
|
|
|
|
Provides: %{lname}-devel = %{version}
|
2021-03-15 08:35:31 +01:00
|
|
|
Requires: %{lname} = %{version}
|
2019-11-27 11:24:16 +01:00
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package provides header files to include and libraries to link with
|
|
|
|
for the Linux-native io_uring.
|
|
|
|
|
|
|
|
%prep
|
2022-07-08 15:50:50 +02:00
|
|
|
%autosetup -p1
|
2019-11-27 11:24:16 +01:00
|
|
|
|
|
|
|
%build
|
2021-03-15 08:35:31 +01:00
|
|
|
# not autotools, so configure macro doesn't work
|
2023-12-01 16:54:52 +01:00
|
|
|
%set_build_flags
|
2023-12-05 02:56:24 +01:00
|
|
|
%ifarch %{ix86}
|
|
|
|
# Otherwise 32-bit x86 fails with: undefined reference to `__stack_chk_fail_local'
|
|
|
|
export CFLAGS="%{optflags} -fno-stack-protector"
|
|
|
|
export CPPFLAGS="%{optflags} -fno-stack-protector"
|
|
|
|
%endif
|
2021-03-15 08:35:31 +01:00
|
|
|
sh ./configure --prefix=%{_prefix} \
|
2020-11-10 17:36:31 +01:00
|
|
|
--includedir=%{_includedir} \
|
|
|
|
--libdir=/%{_libdir} \
|
|
|
|
--libdevdir=/%{_libdir} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--datadir=%{_datadir}
|
2021-03-15 08:35:31 +01:00
|
|
|
%make_build -C src
|
2019-11-27 11:24:16 +01:00
|
|
|
|
2022-07-06 13:22:40 +02:00
|
|
|
%check
|
2022-09-26 09:35:06 +02:00
|
|
|
# io_uring syscalls not supported as of qemu 7.0.0 and would test the host
|
|
|
|
# kernel anyway not the target kernel..
|
|
|
|
%if !0%{?qemu_user_space_build}
|
2023-09-14 18:18:26 +02:00
|
|
|
/usr/bin/make %{?_smp_mflags} runtests
|
2022-09-26 09:35:06 +02:00
|
|
|
%endif
|
2022-07-06 13:22:40 +02:00
|
|
|
|
2019-11-27 11:24:16 +01:00
|
|
|
%install
|
|
|
|
%make_install
|
Accepting request 1092686 from home:dmdiss:liburing_2.4
- Update to 2.4:
* Add io_uring_{major,minor,check}_version() functions.
* Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
* FFI support (for non-C/C++ languages integration).
* Add io_uring_prep_msg_ring_cqe_flags() function.
* Deprecate --nolibc configure option.
* CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
* Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
* Add io_uring_close_ring_fd() function.
* Add io_uring_prep_msg_ring_fd_alloc function.
* Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
* Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
* Add io_uring_prep_sendto() function.
- Add liburing-ffi2 package for corresponding FFI library, given that
dependents will normally require either that or the base library (not both).
- Drop upstream patches:
* 0001-Do-not-always-expect-multishot-recv-to-stop-posting-.patch
* 0001-test-file-verify.t-Don-t-run-over-mlock-limit-when-r.patch
* 0001-test-helpers-fix-socket-length-type.patch
OBS-URL: https://build.opensuse.org/request/show/1092686
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=32
2023-06-13 07:51:40 +02:00
|
|
|
rm -v %{buildroot}%{_libdir}/%{name}*.a
|
2019-11-27 11:24:16 +01:00
|
|
|
|
2020-11-10 17:36:31 +01:00
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
|
|
|
|
Accepting request 1092686 from home:dmdiss:liburing_2.4
- Update to 2.4:
* Add io_uring_{major,minor,check}_version() functions.
* Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
* FFI support (for non-C/C++ languages integration).
* Add io_uring_prep_msg_ring_cqe_flags() function.
* Deprecate --nolibc configure option.
* CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
* Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
* Add io_uring_close_ring_fd() function.
* Add io_uring_prep_msg_ring_fd_alloc function.
* Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
* Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
* Add io_uring_prep_sendto() function.
- Add liburing-ffi2 package for corresponding FFI library, given that
dependents will normally require either that or the base library (not both).
- Drop upstream patches:
* 0001-Do-not-always-expect-multishot-recv-to-stop-posting-.patch
* 0001-test-file-verify.t-Don-t-run-over-mlock-limit-when-r.patch
* 0001-test-helpers-fix-socket-length-type.patch
OBS-URL: https://build.opensuse.org/request/show/1092686
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=32
2023-06-13 07:51:40 +02:00
|
|
|
%post -n liburing-ffi2 -p /sbin/ldconfig
|
|
|
|
%postun -n liburing-ffi2 -p /sbin/ldconfig
|
|
|
|
|
2019-11-27 11:24:16 +01:00
|
|
|
%files -n %{lname}
|
|
|
|
%{_libdir}/liburing.so.*
|
2020-11-10 17:36:31 +01:00
|
|
|
%license COPYING COPYING.GPL LICENSE
|
2019-11-27 11:24:16 +01:00
|
|
|
|
Accepting request 1092686 from home:dmdiss:liburing_2.4
- Update to 2.4:
* Add io_uring_{major,minor,check}_version() functions.
* Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
* FFI support (for non-C/C++ languages integration).
* Add io_uring_prep_msg_ring_cqe_flags() function.
* Deprecate --nolibc configure option.
* CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
* Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
* Add io_uring_close_ring_fd() function.
* Add io_uring_prep_msg_ring_fd_alloc function.
* Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
* Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
* Add io_uring_prep_sendto() function.
- Add liburing-ffi2 package for corresponding FFI library, given that
dependents will normally require either that or the base library (not both).
- Drop upstream patches:
* 0001-Do-not-always-expect-multishot-recv-to-stop-posting-.patch
* 0001-test-file-verify.t-Don-t-run-over-mlock-limit-when-r.patch
* 0001-test-helpers-fix-socket-length-type.patch
OBS-URL: https://build.opensuse.org/request/show/1092686
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=32
2023-06-13 07:51:40 +02:00
|
|
|
%files -n liburing-ffi2
|
|
|
|
%{_libdir}/liburing-ffi.so.*
|
|
|
|
|
2019-11-27 11:24:16 +01:00
|
|
|
%files devel
|
2021-03-15 08:35:31 +01:00
|
|
|
%doc README
|
2019-11-27 11:24:16 +01:00
|
|
|
%{_includedir}/liburing/
|
|
|
|
%{_includedir}/liburing.h
|
|
|
|
%{_libdir}/liburing.so
|
Accepting request 1092686 from home:dmdiss:liburing_2.4
- Update to 2.4:
* Add io_uring_{major,minor,check}_version() functions.
* Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
* FFI support (for non-C/C++ languages integration).
* Add io_uring_prep_msg_ring_cqe_flags() function.
* Deprecate --nolibc configure option.
* CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
* Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
* Add io_uring_close_ring_fd() function.
* Add io_uring_prep_msg_ring_fd_alloc function.
* Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
* Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
* Add io_uring_prep_sendto() function.
- Add liburing-ffi2 package for corresponding FFI library, given that
dependents will normally require either that or the base library (not both).
- Drop upstream patches:
* 0001-Do-not-always-expect-multishot-recv-to-stop-posting-.patch
* 0001-test-file-verify.t-Don-t-run-over-mlock-limit-when-r.patch
* 0001-test-helpers-fix-socket-length-type.patch
OBS-URL: https://build.opensuse.org/request/show/1092686
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=32
2023-06-13 07:51:40 +02:00
|
|
|
%{_libdir}/liburing-ffi.so
|
2019-11-27 11:24:16 +01:00
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
|
%{_mandir}/man2/*
|
2021-03-15 08:35:31 +01:00
|
|
|
%{_mandir}/man3/*
|
|
|
|
%{_mandir}/man7/*
|
2019-11-27 11:24:16 +01:00
|
|
|
|
|
|
|
%changelog
|