mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 15:06:58 +02:00
sys-libs/libnvme: Sync with Gentoo
It's from Gentoo commit e37fd11363a6aec2887e3b9a2bff4355eb47f63d.
This commit is contained in:
parent
2632347bf7
commit
ebd06081d1
@ -1,4 +1 @@
|
|||||||
DIST libnvme-1.10.gh.tar.gz 720737 BLAKE2B eb5941cbdec1ccf5782c3e438b55dd09ddd2c3b9ac1079d5642896d0d80d75ece3149ebe9d965c2783a5ae2ddfad64ae0051f9c63822a739108d53eb44a583db SHA512 44e8a407c9fda8c296163832c14ba167caab53eab315bd2dee94275458532429f12a35e0adef1356420d83127e658a354ce65ac946acaa53bef2d46a8189054c
|
|
||||||
DIST libnvme-1.11.1.gh.tar.gz 740327 BLAKE2B eb9a731ce4886e7a76170d4be916e850548710dbbc135bbe94c5ff0c2f3da5e2cb162a6c8ea857d6b9b609ffafba34487cd3419fc4981e9e549419c2bb757568 SHA512 8720f2907a3d13af44fb3deec883cd6eb247d5861c4459b5fe0e67ff9ecfb565462a5faf39d43e08b5284f3e8ca8e72d41b333984beaa45d3287b1a258f3e59d
|
DIST libnvme-1.11.1.gh.tar.gz 740327 BLAKE2B eb9a731ce4886e7a76170d4be916e850548710dbbc135bbe94c5ff0c2f3da5e2cb162a6c8ea857d6b9b609ffafba34487cd3419fc4981e9e549419c2bb757568 SHA512 8720f2907a3d13af44fb3deec883cd6eb247d5861c4459b5fe0e67ff9ecfb565462a5faf39d43e08b5284f3e8ca8e72d41b333984beaa45d3287b1a258f3e59d
|
||||||
DIST libnvme-1.11.gh.tar.gz 740365 BLAKE2B c4d5950b0d0769f1aaddc6d82364ad14ae3b1b6e2b5d16225c8599833e51516c14b8802b77562b08cbb54c15b8e5814d7f5b059939c197b87375afba899ffe3d SHA512 5c1d00fe57ff699be01c326e24612da25e1772578928e2c70fb5f67e8a9fe0fa4c95e18f58d4abefa0e163e99c9e37b1109298e805e174b033e749d19865336b
|
|
||||||
DIST libnvme-1.9.tar.gz 657952 BLAKE2B e9d655709770f7c1d9c916cc9539b8ea096b0d5bf6b12079c2db494f070c98b6c388e2a79ed27a4932994a00d44da93fa3119ee224c48d40347a483548397349 SHA512 39a3346805143f93a17d00cfcb6fb75f82154658db6079134c09dfa989995ac5de79b1ce1ac091b4e997523d3216829ce9eac44110c9f59f9fd21636529c8b25
|
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
https://github.com/linux-nvme/libnvme/pull/838
|
|
||||||
|
|
||||||
From b3ca2923affce631bc302f0fdce565093ffe1b5b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sam James <sam@gentoo.org>
|
|
||||||
Date: Sat, 4 May 2024 10:59:16 +0100
|
|
||||||
Subject: [PATCH] Use C99 types for uint32_t
|
|
||||||
|
|
||||||
<stdint.h> provides `uint32_t`, while `u_int_32` is an unofficial/internal
|
|
||||||
typedef that glibc happens to provide. This fixes the build on musl.
|
|
||||||
|
|
||||||
Bug: https://bugs.gentoo.org/931194
|
|
||||||
|
|
||||||
Signed-off-by: Sam James <sam@gentoo.org>
|
|
||||||
--- a/src/nvme/base64.c
|
|
||||||
+++ b/src/nvme/base64.c
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
* Author: Hannes Reinecke <hare@suse.de>
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
@@ -29,7 +30,7 @@ static const char base64_table[65] =
|
|
||||||
int base64_encode(const unsigned char *src, int srclen, char *dst)
|
|
||||||
{
|
|
||||||
int i, bits = 0;
|
|
||||||
- u_int32_t ac = 0;
|
|
||||||
+ uint32_t ac = 0;
|
|
||||||
char *cp = dst;
|
|
||||||
|
|
||||||
for (i = 0; i < srclen; i++) {
|
|
||||||
@@ -64,7 +65,7 @@ int base64_encode(const unsigned char *src, int srclen, char *dst)
|
|
||||||
*/
|
|
||||||
int base64_decode(const char *src, int srclen, unsigned char *dst)
|
|
||||||
{
|
|
||||||
- u_int32_t ac = 0;
|
|
||||||
+ uint32_t ac = 0;
|
|
||||||
int i, bits = 0;
|
|
||||||
unsigned char *bp = dst;
|
|
||||||
|
|
||||||
--- a/src/nvme/linux.c
|
|
||||||
+++ b/src/nvme/linux.c
|
|
||||||
@@ -1513,10 +1513,10 @@ unsigned char *nvme_import_tls_key(const char *encoded_key, int *key_len,
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
crc = crc32(crc, decoded_key, decoded_len);
|
|
||||||
- key_crc = ((u_int32_t)decoded_key[decoded_len]) |
|
|
||||||
- ((u_int32_t)decoded_key[decoded_len + 1] << 8) |
|
|
||||||
- ((u_int32_t)decoded_key[decoded_len + 2] << 16) |
|
|
||||||
- ((u_int32_t)decoded_key[decoded_len + 3] << 24);
|
|
||||||
+ key_crc = ((uint32_t)decoded_key[decoded_len]) |
|
|
||||||
+ ((uint32_t)decoded_key[decoded_len + 1] << 8) |
|
|
||||||
+ ((uint32_t)decoded_key[decoded_len + 2] << 16) |
|
|
||||||
+ ((uint32_t)decoded_key[decoded_len + 3] << 24);
|
|
||||||
if (key_crc != crc) {
|
|
||||||
nvme_msg(NULL, LOG_ERR, "CRC mismatch (key %08x, crc %08x)",
|
|
||||||
key_crc, crc);
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} )
|
|
||||||
inherit python-r1 meson
|
|
||||||
|
|
||||||
DESCRIPTION="C Library for NVM Express on Linux"
|
|
||||||
HOMEPAGE="https://github.com/linux-nvme/libnvme"
|
|
||||||
SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1+"
|
|
||||||
SLOT="0/1"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
|
|
||||||
IUSE="dbus +json keyutils python ssl test +uuid"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
json? ( dev-libs/json-c:= )
|
|
||||||
keyutils? ( sys-apps/keyutils:= )
|
|
||||||
dbus? ( sys-apps/dbus:= )
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
ssl? ( >=dev-libs/openssl-1.1:= )
|
|
||||||
uuid? ( sys-apps/util-linux:= )
|
|
||||||
"
|
|
||||||
RDEPEND="
|
|
||||||
${DEPEND}
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
dev-lang/swig
|
|
||||||
"
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=disabled
|
|
||||||
$(meson_use test tests)
|
|
||||||
$(meson_feature json json-c)
|
|
||||||
$(meson_feature dbus libdbus)
|
|
||||||
$(meson_feature keyutils)
|
|
||||||
$(meson_feature ssl openssl)
|
|
||||||
)
|
|
||||||
meson_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
python_compile() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=enabled
|
|
||||||
)
|
|
||||||
meson_src_configure --reconfigure
|
|
||||||
meson_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
meson_src_compile
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
python_copy_sources
|
|
||||||
python_foreach_impl python_compile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
meson_src_install
|
|
||||||
use python && python_optimize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
use python && python_foreach_impl python_install
|
|
||||||
|
|
||||||
meson_src_install
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
# Copyright 1999-2025 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=8
|
EAPI=8
|
||||||
@ -12,7 +12,7 @@ SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -
|
|||||||
|
|
||||||
LICENSE="LGPL-2.1+"
|
LICENSE="LGPL-2.1+"
|
||||||
SLOT="0/1"
|
SLOT="0/1"
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
|
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
|
||||||
IUSE="dbus +json keyutils python ssl test +uuid"
|
IUSE="dbus +json keyutils python ssl test +uuid"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..13} python3_13t )
|
|
||||||
inherit python-r1 meson
|
|
||||||
|
|
||||||
DESCRIPTION="C Library for NVM Express on Linux"
|
|
||||||
HOMEPAGE="https://github.com/linux-nvme/libnvme"
|
|
||||||
SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1+"
|
|
||||||
SLOT="0/1"
|
|
||||||
KEYWORDS="~alpha ~amd64 arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
|
||||||
IUSE="dbus +json keyutils python ssl test +uuid"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
json? ( dev-libs/json-c:= )
|
|
||||||
keyutils? ( sys-apps/keyutils:= )
|
|
||||||
dbus? ( sys-apps/dbus:= )
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
ssl? ( >=dev-libs/openssl-1.1:= )
|
|
||||||
uuid? ( sys-apps/util-linux:= )
|
|
||||||
"
|
|
||||||
RDEPEND="
|
|
||||||
${DEPEND}
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
dev-lang/swig
|
|
||||||
"
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=disabled
|
|
||||||
$(meson_use test tests)
|
|
||||||
$(meson_feature json json-c)
|
|
||||||
$(meson_feature dbus libdbus)
|
|
||||||
$(meson_feature keyutils)
|
|
||||||
$(meson_feature ssl openssl)
|
|
||||||
)
|
|
||||||
meson_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
python_compile() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=enabled
|
|
||||||
)
|
|
||||||
meson_src_configure --reconfigure
|
|
||||||
meson_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
meson_src_compile
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
python_copy_sources
|
|
||||||
python_foreach_impl python_compile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
meson_src_install
|
|
||||||
use python && python_optimize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
use python && python_foreach_impl python_install
|
|
||||||
|
|
||||||
meson_src_install
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..12} )
|
|
||||||
inherit python-r1 meson
|
|
||||||
|
|
||||||
DESCRIPTION="C Library for NVM Express on Linux"
|
|
||||||
HOMEPAGE="https://github.com/linux-nvme/libnvme"
|
|
||||||
SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1+"
|
|
||||||
SLOT="0/1"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86"
|
|
||||||
IUSE="dbus +json keyutils python ssl test +uuid"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
json? ( dev-libs/json-c:= )
|
|
||||||
keyutils? ( sys-apps/keyutils:= )
|
|
||||||
dbus? ( sys-apps/dbus:= )
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
ssl? ( >=dev-libs/openssl-1.1:= )
|
|
||||||
uuid? ( sys-apps/util-linux:= )
|
|
||||||
"
|
|
||||||
RDEPEND="
|
|
||||||
${DEPEND}
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
dev-lang/swig
|
|
||||||
"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-1.9-musl-stdint.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=disabled
|
|
||||||
$(meson_use test tests)
|
|
||||||
$(meson_feature json json-c)
|
|
||||||
$(meson_feature dbus libdbus)
|
|
||||||
$(meson_feature keyutils)
|
|
||||||
$(meson_feature ssl openssl)
|
|
||||||
)
|
|
||||||
meson_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
python_compile() {
|
|
||||||
local emesonargs=(
|
|
||||||
-Dpython=enabled
|
|
||||||
)
|
|
||||||
meson_src_configure --reconfigure
|
|
||||||
meson_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
meson_src_compile
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
python_copy_sources
|
|
||||||
python_foreach_impl python_compile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
meson_src_install
|
|
||||||
use python && python_optimize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
use python && python_foreach_impl python_install
|
|
||||||
|
|
||||||
meson_src_install
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user