mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
package/libnvme: bump to version 1.6
Add 2 upstream patches, one to avoid build failure due to different libc ioctl() prototype and one to avoid link conflict due to test unit enabled by default. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
39e092a06e
commit
087e2cef0e
70
package/libnvme/0001-test-handle-POSIX-ioctl-prototype.patch
Normal file
70
package/libnvme/0001-test-handle-POSIX-ioctl-prototype.patch
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
From ca47ba3119365eafac0ab25a86cab9d9a1b29bd4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Sat, 30 Sep 2023 06:38:53 +0100
|
||||||
|
Subject: [PATCH] test: handle POSIX ioctl prototype
|
||||||
|
|
||||||
|
glibc has the following prototype for ioctl: int ioctl(int fd, unsigned long request, ...)
|
||||||
|
POSIX (inc. musl) has the following for ioctl: int ioctl(int fd, int request, ...)
|
||||||
|
|
||||||
|
Check which prototype is used in <sys/ioctl.h> to avoid a conflict and conditionally
|
||||||
|
define the right one for the system.
|
||||||
|
|
||||||
|
Upstream: https://github.com/linux-nvme/libnvme/commit/ca47ba3119365eafac0ab25a86cab9d9a1b29bd4
|
||||||
|
|
||||||
|
Bug: https://bugs.gentoo.org/914921
|
||||||
|
Signed-off-by: Sam James <sam@gentoo.org>
|
||||||
|
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||||
|
---
|
||||||
|
meson.build | 10 ++++++++++
|
||||||
|
test/ioctl/mock.c | 6 +++++-
|
||||||
|
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 6fcf1da..2c979cc 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -230,6 +230,16 @@ conf.set(
|
||||||
|
),
|
||||||
|
description: 'Is network address and service translation available'
|
||||||
|
)
|
||||||
|
+conf.set(
|
||||||
|
+ 'HAVE_GLIBC_IOCTL',
|
||||||
|
+ cc.compiles(
|
||||||
|
+ '''#include <sys/ioctl.h>
|
||||||
|
+ int ioctl(int fd, unsigned long request, ...);
|
||||||
|
+ ''',
|
||||||
|
+ name: 'ioctl has glibc-style prototype'
|
||||||
|
+ ),
|
||||||
|
+ description: 'Is ioctl the glibc interface (rather than POSIX)'
|
||||||
|
+)
|
||||||
|
|
||||||
|
if cc.has_function_attribute('fallthrough')
|
||||||
|
conf.set('fallthrough', '__attribute__((__fallthrough__))')
|
||||||
|
diff --git a/test/ioctl/mock.c b/test/ioctl/mock.c
|
||||||
|
index e917244..5d2ac94 100644
|
||||||
|
--- a/test/ioctl/mock.c
|
||||||
|
+++ b/test/ioctl/mock.c
|
||||||
|
@@ -114,7 +114,11 @@ void end_mock_cmds(void)
|
||||||
|
} \
|
||||||
|
})
|
||||||
|
|
||||||
|
+#ifdef HAVE_GLIBC_IOCTL
|
||||||
|
int ioctl(int fd, unsigned long request, ...)
|
||||||
|
+#else
|
||||||
|
+int ioctl(int fd, int request, ...)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
struct mock_cmds *mock_cmds;
|
||||||
|
bool result64;
|
||||||
|
@@ -141,7 +145,7 @@ int ioctl(int fd, unsigned long request, ...)
|
||||||
|
result64 = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- fail("unexpected %s %lu", __func__, request);
|
||||||
|
+ fail("unexpected %s %lu", __func__, (unsigned long) request);
|
||||||
|
}
|
||||||
|
check(mock_cmds->remaining_cmds,
|
||||||
|
"unexpected %s command", mock_cmds->name);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
From ff742e792725c316ba6de0800188bf36751bd1d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Sat, 30 Sep 2023 06:43:39 +0100
|
||||||
|
Subject: [PATCH] meson: make building tests conditional
|
||||||
|
|
||||||
|
Just like we do for docs.
|
||||||
|
|
||||||
|
Upstream: https://github.com/linux-nvme/libnvme/commit/ff742e792725c316ba6de0800188bf36751bd1d1
|
||||||
|
|
||||||
|
Signed-off-by: Sam James <sam@gentoo.org>
|
||||||
|
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||||
|
---
|
||||||
|
meson.build | 4 +++-
|
||||||
|
meson_options.txt | 1 +
|
||||||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 2c979cc..a9263b5 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -273,7 +273,9 @@ subdir('internal')
|
||||||
|
subdir('ccan')
|
||||||
|
subdir('src')
|
||||||
|
subdir('libnvme')
|
||||||
|
-subdir('test')
|
||||||
|
+if get_option('tests')
|
||||||
|
+ subdir('test')
|
||||||
|
+endif
|
||||||
|
subdir('examples')
|
||||||
|
subdir('doc')
|
||||||
|
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index a1ed79f..251ae11 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -6,6 +6,7 @@ option('rstdir', type : 'string', value : '', description : 'directory for ReST
|
||||||
|
|
||||||
|
option('docs', type : 'combo', choices : ['false', 'html', 'man', 'rst', 'all'], description : 'install documentation')
|
||||||
|
option('docs-build', type : 'boolean', value : false, description : 'build documentation')
|
||||||
|
+option('tests', type : 'boolean', value : true, description : 'build tests')
|
||||||
|
|
||||||
|
option('python', type : 'feature', value: 'auto', description : 'Generate libnvme python bindings')
|
||||||
|
option('openssl', type : 'feature', value: 'auto', description : 'OpenSSL support')
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# Locally calculated sha256 checksums
|
# Locally calculated sha256 checksums
|
||||||
sha256 f73ba1edde059b2d5e7c1048ad4f895e6047bff241c94b34a7aff5894779d086 libnvme-1.5.tar.gz
|
sha256 0dd8ba8b655abe78c09833edb66632aa6bee82aebf117dd252ded968deaaeec7 libnvme-1.6.tar.gz
|
||||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
|
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
LIBNVME_VERSION = 1.5
|
LIBNVME_VERSION = 1.6
|
||||||
LIBNVME_SITE = $(call github,linux-nvme,libnvme,v$(LIBNVME_VERSION))
|
LIBNVME_SITE = $(call github,linux-nvme,libnvme,v$(LIBNVME_VERSION))
|
||||||
LIBNVME_LICENSE = LGPL-2.1
|
LIBNVME_LICENSE = LGPL-2.1
|
||||||
LIBNVME_LICENSE_FILES = COPYING
|
LIBNVME_LICENSE_FILES = COPYING
|
||||||
LIBNVME_INSTALL_STAGING = YES
|
LIBNVME_INSTALL_STAGING = YES
|
||||||
|
|
||||||
|
LIBNVME_CONF_OPTS += \
|
||||||
|
-Dtests=false
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||||
LIBNVME_DEPENDENCIES += python3
|
LIBNVME_DEPENDENCIES += python3
|
||||||
LIBNVME_CONF_OPTS += -Dpython=enabled
|
LIBNVME_CONF_OPTS += -Dpython=enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user