aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2022-05-16 09:49:07 +0000
committerpsykose <alice@ayaya.dev>2022-05-16 11:51:08 +0200
commit3325dcc9daf980892690e62ef1f92ff1c8db65b1 (patch)
tree19e51e707a98844d9554bac81f8b3a65d56442c0
parent8eb65adf19ee5eea5171617ed340ccae460c6f17 (diff)
main/liburing: fix include headers
fixes #13813 previously, a bug in the configure script prevented liburing from properly detecting the linux kernel headers and redefined some structs, which made the liburing headers incompatible
-rw-r--r--main/liburing/APKBUILD8
-rw-r--r--main/liburing/busybox-mktemp.patch54
2 files changed, 60 insertions, 2 deletions
diff --git a/main/liburing/APKBUILD b/main/liburing/APKBUILD
index 7ef31eaa981..229d07a80d4 100644
--- a/main/liburing/APKBUILD
+++ b/main/liburing/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=liburing
pkgver=2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Linux kernel io_uring access library"
url="https://git.kernel.dk/cgit/liburing/"
arch="all"
@@ -9,6 +9,7 @@ license="LGPL-2.1-or-later"
makedepends="linux-headers"
subpackages="$pkgname-dev $pkgname-doc"
source="https://git.kernel.dk/cgit/liburing/snapshot/liburing-$pkgver.tar.gz
+ busybox-mktemp.patch
"
build() {
@@ -25,4 +26,7 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="e7739a33bcbccc80da725556f924d49a3a78c945a7f1e74c03821a9dafc71c7821a46b7f042f1377a192b46b518ebb5e44f76e89aa7e8652f99f4cfbd9d05e79 liburing-2.0.tar.gz"
+sha512sums="
+e7739a33bcbccc80da725556f924d49a3a78c945a7f1e74c03821a9dafc71c7821a46b7f042f1377a192b46b518ebb5e44f76e89aa7e8652f99f4cfbd9d05e79 liburing-2.0.tar.gz
+28650f7833ad65823d9a32a4a8d549e5db21af609085417791145f9ab2f1e0d982cb5e111b1686d6c400a20905d646eab169704d1d4c305cca45d308fa1b7041 busybox-mktemp.patch
+"
diff --git a/main/liburing/busybox-mktemp.patch b/main/liburing/busybox-mktemp.patch
new file mode 100644
index 00000000000..d984315cbb0
--- /dev/null
+++ b/main/liburing/busybox-mktemp.patch
@@ -0,0 +1,54 @@
+Patch-Source: https://github.com/axboe/liburing/commit/cce3026ee45a86cfdd104fd1be270b759a161233
+From cce3026ee45a86cfdd104fd1be270b759a161233 Mon Sep 17 00:00:00 2001
+From: Nugra <richiisei@gmail.com>
+Date: Tue, 15 Feb 2022 22:36:50 +0700
+Subject: [PATCH] configure: Support busybox mktemp
+
+Busybox mktemp does not support `--tmpdir`, it says:
+ mktemp: unrecognized option: tmpdir
+
+It can be fixed with:
+1. Create a temporary directory.
+2. Use touch to create the temporary files inside the directory.
+3. Clean up by deleting the temporary directory.
+
+[ammarfaizi2: s/fio/liburing/]
+
+Signed-off-by: Nugra <richiisei@gmail.com>
+Link: https://t.me/GNUWeeb/530154
+[ammarfaizi2: Rephrase the commit message and add touch command]
+Co-authored-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
+Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
+Link: https://lore.kernel.org/r/20220215153651.181319-2-ammarfaizi2@gnuweeb.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+---
+ configure | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/configure b/configure
+index 805a67109..1f7f1c334 100755
+--- a/configure
++++ b/configure
+@@ -78,14 +78,17 @@ EOF
+ exit 0
+ fi
+
+-TMPC="$(mktemp --tmpdir fio-conf-XXXXXXXXXX.c)"
+-TMPC2="$(mktemp --tmpdir fio-conf-XXXXXXXXXX-2.c)"
+-TMPO="$(mktemp --tmpdir fio-conf-XXXXXXXXXX.o)"
+-TMPE="$(mktemp --tmpdir fio-conf-XXXXXXXXXX.exe)"
++TMP_DIRECTORY="$(mktemp -d)"
++TMPC="$TMP_DIRECTORY/liburing-conf.c"
++TMPC2="$TMP_DIRECTORY/liburing-conf-2.c"
++TMPO="$TMP_DIRECTORY/liburing-conf.o"
++TMPE="$TMP_DIRECTORY/liburing-conf.exe"
++
++touch $TMPC $TMPC2 $TMPO $TMPE
+
+ # NB: do not call "exit" in the trap handler; this is buggy with some shells;
+ # see <1285349658-3122-1-git-send-email-loic.minier@linaro.org>
+-trap "rm -f $TMPC $TMPC2 $TMPO $TMPE" EXIT INT QUIT TERM
++trap "rm -rf $TMP_DIRECTORY" EXIT INT QUIT TERM
+
+ rm -rf config.log
+