mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 09:01:55 +02:00
sys-libs/liburing: Sync with Gentoo
It's from Gentoo commit 2efcad9cf8a4b4fc4af6bcbbdbcca5cdf1e095ab.
This commit is contained in:
parent
9a395c1480
commit
4396005ee7
@ -1,5 +1,4 @@
|
||||
DIST liburing-2.1.tar.bz2 120806 BLAKE2B 3a09d1504150ed1c111f064187d868fd86ec7c3dbf661f73999f7fbb9c945b528f7ab2e0cfff5d270a1a977f04deedc7c790b6df8708ef2884fbf28c1a9ffd1b SHA512 a658454869b01752b5e499c4f0b50c342a8ff63b3dd1a473a96f9fad03f22a6e4d2354b0e658a4e7e50ea27440a84ee274856b3687803583bc80cb4bc45aec71
|
||||
DIST liburing-2.2.tar.bz2 172733 BLAKE2B 19ae8a356e4fdc296bfb3ff121b777bd7c970388b31686aac5c531508e807360d58220bc27f9c62c55bd76ca687013acfceb3fa8a2162b615561f637cc50ffe1 SHA512 55b935a90c108be54393a5ab341b56e40ad8d506360fe15b3dcde5ee263356f11080f8614efdc4253f6318ea35d808ec47a9dbfc6b9f6cc2e04f7f1a75c3f621
|
||||
DIST liburing-2.3.tar.bz2 197929 BLAKE2B 94ae2a79522fbac13c071ad752f5cbfae3e3b3dd6b35da24e5c756ba47a7b304e5bcb18391ca23fc2edafeb2dbcdcf143fd2cda71656396ac34248159a964fb7 SHA512 341aa13d3b560617f3710291945ec2fe35d828e0b67ee3a97555fd4eb3d2042a7f9e722080d8ebb45aa74a2ca4ef58db1e8a10c351e951a604da007ba69d2738
|
||||
DIST liburing-2.4.tar.bz2 213774 BLAKE2B 3e6c28842db6ee10e38df297e392803e0ff40ccfea774b2c473ba63b5583e760371bf0ce8e34ca4311e2bef69eee81b2b50b5e906bb328d5b321488136fc61e0 SHA512 45b5123739280835c88c1addcf99a3210a91c6e1b3e0c5a20fd4cf3ff55db5fd1475b0351806be2e86fedfa313200eecac6a9a6f410a9eca7e451081fd8eec96
|
||||
DIST liburing-2.5.tar.bz2 217397 BLAKE2B cb5d0a61bc8ce5a92a1b581c5411938146a84c365598454ac8bac7ba0d7429e20a5a608cb725619cbf8b77570b2d638fc347fd9ee9cb1456361957a2a4d6e6d6 SHA512 cba62acde52c07185ade0ac0fee6bf3845f5677d061b52d179c6341a62f8581d4f8920fc09d27a3723bc3832bc84dd5475d173427ee5d8a063d079b07af96416
|
||||
DIST liburing-2.6.tar.bz2 244371 BLAKE2B f0e05a5a82592ed45c7c7f12b437d17655989102961c3d349d18d993f21cf0f1a6eb2aa7ad863a579428a1546c307924bf368e10af96045fd40a02fd5bd5843e SHA512 bf07cc0e67498ba64d888d1a113f7c8bea3feaed6f05ce69c99a1dec9506e553a1695ab4e1ecfa86f0ba1af699769557291d5c6b125b9bf59a1452f69eac0613
|
||||
|
@ -1,54 +0,0 @@
|
||||
https://github.com/axboe/liburing/commit/cb350a8989adbd65db574325d9a86d5437d800da
|
||||
https://bugs.gentoo.org/816798
|
||||
|
||||
From cb350a8989adbd65db574325d9a86d5437d800da Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Mon, 13 Sep 2021 23:56:08 +0200
|
||||
Subject: [PATCH] test: Use syscall wrappers instead of using syscall(2)
|
||||
directly
|
||||
|
||||
Some of these syscalls have different entry points depending on the
|
||||
architecture. Use the wrappers to avoid having to reimplement them
|
||||
portably.
|
||||
|
||||
Fixes build failures on Debian armel and armhf builds.
|
||||
|
||||
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
||||
--- a/test/sqpoll-cancel-hang.c
|
||||
+++ b/test/sqpoll-cancel-hang.c
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
-#include <sys/syscall.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
@@ -29,8 +28,6 @@ static uint64_t current_time_ms(void)
|
||||
|
||||
#define IORING_OFF_SQES 0x10000000ULL
|
||||
|
||||
-#define sys_io_uring_setup 425
|
||||
-
|
||||
static void kill_and_wait(int pid, int* status)
|
||||
{
|
||||
kill(-pid, SIGKILL);
|
||||
@@ -53,7 +50,7 @@ a5)
|
||||
void* vma2 = (void*)a3;
|
||||
void** ring_ptr_out = (void**)a4;
|
||||
void** sqes_ptr_out = (void**)a5;
|
||||
- uint32_t fd_io_uring = syscall(sys_io_uring_setup, entries, setup_params);
|
||||
+ uint32_t fd_io_uring = __sys_io_uring_setup(entries, setup_params);
|
||||
uint32_t sq_ring_sz = setup_params->sq_off.array +
|
||||
setup_params->sq_entries * sizeof(uint32_t);
|
||||
uint32_t cq_ring_sz = setup_params->cq_off.cqes +
|
||||
@@ -135,7 +132,7 @@ void trigger_bug(void)
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
- syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
|
||||
+ mmap((void *)0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
|
||||
int pid = fork();
|
||||
if (pid < 0)
|
||||
exit(1);
|
||||
|
@ -1,42 +0,0 @@
|
||||
https://github.com/axboe/liburing/commit/c34070e08199491fe9653617364f4aea9b9b22be
|
||||
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Mon, 14 Mar 2022 14:18:55 +0000
|
||||
Subject: [PATCH] liburing.h: define GNU_SOURCE for cpu_set_t
|
||||
|
||||
On musl, cpu_set_t is only exposed if GNU_SOURCE is defined. While in
|
||||
the liburing build system, this is set (43b7ec8d17888df0debccda27dd58f4d1b90245e),
|
||||
it can't be guaranteed that folks including the header externally will set
|
||||
that macro.
|
||||
|
||||
Noticed while investigating a build failure for glusterfs on a musl
|
||||
system:
|
||||
```
|
||||
configure:17701: checking for liburing.h
|
||||
configure:17701: x86_64-gentoo-linux-musl-gcc -c -pipe -march=native -fno-diagnostics-color -O2 conftest.c >&5
|
||||
In file included from conftest.c:105:
|
||||
/usr/include/liburing.h:162:39: error: unknown type name 'cpu_set_t'
|
||||
162 | const cpu_set_t *mask);
|
||||
| ^~~~~~~~~
|
||||
configure:17701: $? = 1
|
||||
```
|
||||
|
||||
Just like _XOPEN_SOURCE, set if needed.
|
||||
|
||||
Bug: https://bugs.gentoo.org/829293
|
||||
Bug: https://github.com/axboe/liburing/issues/422
|
||||
See: 43b7ec8d17888df0debccda27dd58f4d1b90245e
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/src/include/liburing.h
|
||||
+++ b/src/include/liburing.h
|
||||
@@ -6,6 +6,10 @@
|
||||
#define _XOPEN_SOURCE 500 /* Required for glibc to expose sigset_t */
|
||||
#endif
|
||||
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE /* Required for musl to expose cpu_set_t */
|
||||
+#endif
|
||||
+
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/uio.h>
|
@ -1,74 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit multilib-minimal toolchain-funcs
|
||||
|
||||
DESCRIPTION="Efficient I/O with io_uring"
|
||||
HOMEPAGE="https://github.com/axboe/liburing"
|
||||
if [[ "${PV}" == *9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
|
||||
else
|
||||
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
|
||||
fi
|
||||
LICENSE="MIT"
|
||||
SLOT="0/2" # liburing.so major version
|
||||
|
||||
IUSE="static-libs"
|
||||
# fsync test hangs forever
|
||||
RESTRICT="test"
|
||||
|
||||
# At least installed headers need <linux/*>, bug #802516
|
||||
DEPEND=">=sys-kernel/linux-headers-5.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
# Upstream, bug #816798
|
||||
"${FILESDIR}"/${P}-arm-syscall.patch
|
||||
# Upstream, bug #829293
|
||||
"${FILESDIR}"/${P}-gnu_source-musl-cpuset.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ "${PV}" != *9999 ]] ; then
|
||||
# Make sure pkgconfig files contain the correct version
|
||||
# bug #809095 and #833895
|
||||
sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die
|
||||
fi
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--libdevdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--mandir="${EPREFIX}/usr/share/man"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
)
|
||||
# No autotools configure! "econf" will fail.
|
||||
TMPDIR="${T}" ./configure "${myconf[@]}" || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -type f -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake V=1 runtests
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit multilib-minimal toolchain-funcs
|
||||
|
||||
DESCRIPTION="Efficient I/O with io_uring"
|
||||
HOMEPAGE="https://github.com/axboe/liburing"
|
||||
if [[ "${PV}" == *9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
|
||||
else
|
||||
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
QA_PKGCONFIG_VERSION=${PV}
|
||||
fi
|
||||
LICENSE="MIT"
|
||||
SLOT="0/2" # liburing.so major version
|
||||
|
||||
IUSE="examples static-libs test"
|
||||
# fsync test hangs forever
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# At least installed headers need <linux/*>, bug #802516
|
||||
DEPEND=">=sys-kernel/linux-headers-5.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use examples; then
|
||||
sed -e '/examples/d' Makefile -i || die
|
||||
fi
|
||||
if ! use test; then
|
||||
sed -e '/test/d' Makefile -i || die
|
||||
fi
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--libdevdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--mandir="${EPREFIX}/usr/share/man"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
)
|
||||
# No autotools configure! "econf" will fail.
|
||||
TMPDIR="${T}" ./configure "${myconf[@]}" || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -type f -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
local disabled_tests=(
|
||||
accept.c
|
||||
fpos.c
|
||||
io_uring_register.c
|
||||
link-timeout.c
|
||||
read-before-exit.c
|
||||
recv-msgall-stream.c
|
||||
)
|
||||
local disabled_test
|
||||
for disabled_test in "${disabled_tests[@]}"; do
|
||||
sed -i "/\s*${disabled_test}/d" test/Makefile \
|
||||
|| die "Failed to remove ${disabled_test}"
|
||||
done
|
||||
|
||||
emake -C test V=1 runtests
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit multilib-minimal toolchain-funcs
|
||||
|
||||
DESCRIPTION="Efficient I/O with io_uring"
|
||||
HOMEPAGE="https://github.com/axboe/liburing"
|
||||
if [[ "${PV}" == *9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
|
||||
else
|
||||
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
QA_PKGCONFIG_VERSION=${PV}
|
||||
fi
|
||||
LICENSE="MIT"
|
||||
SLOT="0/2" # liburing.so major version
|
||||
|
||||
IUSE="examples static-libs test"
|
||||
# fsync test hangs forever
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# At least installed headers need <linux/*>, bug #802516
|
||||
DEPEND=">=sys-kernel/linux-headers-5.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-lld-17.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use examples; then
|
||||
sed -e '/examples/d' Makefile -i || die
|
||||
fi
|
||||
if ! use test; then
|
||||
sed -e '/test/d' Makefile -i || die
|
||||
fi
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--libdevdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--mandir="${EPREFIX}/usr/share/man"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
)
|
||||
# No autotools configure! "econf" will fail.
|
||||
TMPDIR="${T}" ./configure "${myconf[@]}" || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -type f -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
local disabled_tests=(
|
||||
accept.c
|
||||
fpos.c
|
||||
io_uring_register.c
|
||||
link-timeout.c
|
||||
read-before-exit.c
|
||||
recv-msgall-stream.c
|
||||
)
|
||||
local disabled_test
|
||||
for disabled_test in "${disabled_tests[@]}"; do
|
||||
sed -i "/\s*${disabled_test}/d" test/Makefile \
|
||||
|| die "Failed to remove ${disabled_test}"
|
||||
done
|
||||
|
||||
emake -C test V=1 runtests
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
Loading…
x
Reference in New Issue
Block a user