mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 08:56:58 +02:00
sys-libs/liburing: Sync with gentoo
It's from gentoo commit 31e437d5c46c16b4f86e255561b41dba9dbfba04.
This commit is contained in:
parent
685927fde1
commit
45ab816b66
@ -1 +1 @@
|
|||||||
DIST liburing-0.7.tar.bz2 86386 BLAKE2B a4fa00cc8e384f9909f3c628d479774beaffd5ab09c9f321ef22bfbabd273e4c8d4dbb30a3280633e89e1a79e893348e68f0aa2f3b1b4deda56759f77d9b1875 SHA512 9a23bc08e0fa59273264295859dddbe3276b2911df6d937b3c6f7647a250a3175222b5f051f3094efc98e48cacd242511327c5c5b895ebde10c8c87929ba4328
|
DIST liburing-2.1.tar.bz2 120806 BLAKE2B 3a09d1504150ed1c111f064187d868fd86ec7c3dbf661f73999f7fbb9c945b528f7ab2e0cfff5d270a1a977f04deedc7c790b6df8708ef2884fbf28c1a9ffd1b SHA512 a658454869b01752b5e499c4f0b50c342a8ff63b3dd1a473a96f9fad03f22a6e4d2354b0e658a4e7e50ea27440a84ee274856b3687803583bc80cb4bc45aec71
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
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);
|
||||||
|
|
67
sdk_container/src/third_party/portage-stable/sys-libs/liburing/liburing-2.1-r1.ebuild
vendored
Normal file
67
sdk_container/src/third_party/portage-stable/sys-libs/liburing/liburing-2.1-r1.ebuild
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# 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 ppc ppc64 ~riscv sparc x86"
|
||||||
|
fi
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0/2" # liburing.so major version
|
||||||
|
|
||||||
|
IUSE="static-libs"
|
||||||
|
# fsync test hangs forever
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
# Upstream, bug #816798
|
||||||
|
"${FILESDIR}"/${P}-arm-syscall.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)"
|
||||||
|
)
|
||||||
|
# No autotools configure! "econf" will fail.
|
||||||
|
TMPDIR="${T}" ./configure "${myconf[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
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,16 +1,21 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=8
|
||||||
|
|
||||||
inherit multilib-minimal toolchain-funcs
|
inherit multilib-minimal toolchain-funcs
|
||||||
|
|
||||||
DESCRIPTION="Efficient I/O with io_uring"
|
DESCRIPTION="Efficient I/O with io_uring"
|
||||||
HOMEPAGE="https://github.com/axboe/liburing"
|
HOMEPAGE="https://github.com/axboe/liburing"
|
||||||
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
|
if [[ "${PV}" == *9999 ]] ; then
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 sparc x86"
|
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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||||
|
fi
|
||||||
LICENSE="MIT"
|
LICENSE="MIT"
|
||||||
SLOT="0/1.0.7" # liburing.so version
|
SLOT="0/2" # liburing.so major version
|
||||||
|
|
||||||
IUSE="static-libs"
|
IUSE="static-libs"
|
||||||
# fsync test hangs forever
|
# fsync test hangs forever
|
||||||
@ -18,6 +23,13 @@ RESTRICT="test"
|
|||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
default
|
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_copy_sources
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="person">
|
<maintainer type="person">
|
||||||
<email>polynomial-c@gentoo.org</email>
|
<email>polynomial-c@gentoo.org</email>
|
||||||
|
Loading…
Reference in New Issue
Block a user