summaryrefslogtreecommitdiff
path: root/sys-libs/libnvme
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-05 00:00:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-05 00:00:45 +0100
commitb594445f39d99066071d80fc8efeba5c8f72cc35 (patch)
tree9bf469821b12ac103807e30a6f7751d955648125 /sys-libs/libnvme
parent7f3fecbb5b871825fe9632f46659869cab6a3769 (diff)
gentoo auto-resync : 05:05:2024 - 00:00:45
Diffstat (limited to 'sys-libs/libnvme')
-rw-r--r--sys-libs/libnvme/Manifest3
-rw-r--r--sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch59
-rw-r--r--sys-libs/libnvme/libnvme-1.9.ebuild4
3 files changed, 65 insertions, 1 deletions
diff --git a/sys-libs/libnvme/Manifest b/sys-libs/libnvme/Manifest
index f987f0ec26f4..36b8f89d4c8d 100644
--- a/sys-libs/libnvme/Manifest
+++ b/sys-libs/libnvme/Manifest
@@ -1,7 +1,8 @@
+AUX libnvme-1.9-musl-stdint.patch 1873 BLAKE2B 44be4e9068286f32c8f4e9fc32f02fae7c70df4043db1418b1f889cccaa57d66769d3aa41b30e824a988e5635179be7a2a02676ce385b33dca877b0ff472c29b SHA512 5eb38bae6c38a97f108dff7be8a8c914392b1f3d4a2e26debd00fb62551101061824220b64c3aa791bb980185decf0a0fbc6d228b16c9cdcce6199d121764789
DIST libnvme-1.7.1.tar.gz 604220 BLAKE2B b02bf0914be73f5877f418bebdbed31dfb019484fb9f6e169c3474d90306706b8e787003a472f13bedb72e90eff39a30ba35df252a3cdf4ea08a362c3f9e221b SHA512 aea986ae35eafa17482e07015228d5a7d529d41148f4cee9e4619adc2460abb5460d60cd91177462cbcaf2e94e5870026ff9e45548f91d9f90b65a6268eb3abb
DIST libnvme-1.8.tar.gz 629032 BLAKE2B cba5215983fa14e485156cf68613a7acca07b7e0fdac41663ebf2246c9f6fd6d1bfcebc7c1457ab4217705769ebea382e85726eb302fd9af6f6b85cec7b2e14d SHA512 ba0cec72fd6c9bb29b29c4342be7b25aec1f31157a094ad387a1105cbd1961ab600e1448a2462d8be2af91d5251b2970d6d06d4871ce96604c5be204d6096bcb
DIST libnvme-1.9.tar.gz 657952 BLAKE2B e9d655709770f7c1d9c916cc9539b8ea096b0d5bf6b12079c2db494f070c98b6c388e2a79ed27a4932994a00d44da93fa3119ee224c48d40347a483548397349 SHA512 39a3346805143f93a17d00cfcb6fb75f82154658db6079134c09dfa989995ac5de79b1ce1ac091b4e997523d3216829ce9eac44110c9f59f9fd21636529c8b25
EBUILD libnvme-1.7.1-r1.ebuild 1494 BLAKE2B c23a1718224b17dfe7cbabc3fe63c1595dfee5748895dcc24ed58127a558fb98afe6198ac2381736da998c840f5b691781ab90730162344d210e04df5c105b3c SHA512 5c16f0b68e731480b6786c6cfb9f98c6125847da2e8f70aeb051c7706cd1d65f04a53077272019f14ed61ecb754ee514d1ee2b399a0d52cf52a265549c6e9bc7
EBUILD libnvme-1.8.ebuild 1497 BLAKE2B 4ef6591a10cefabdd879e08e1d95612667a2148bf25fc941a3dcac782ab507a6124a39da1f4b860c171e7254b64ccdb0e911a150de9edea97a7637769dc6abf6 SHA512 d6a06f1f7b9929ea00046874d0e56ce0d23e46ef6c97cc985695cf43b0552d4ddda757a49ce84aac95cced1a09076d72226fceff306ede1fdca7038142b76663
-EBUILD libnvme-1.9.ebuild 1499 BLAKE2B 022b7ce14254156fe9315dbd4ba4aeae5101223eb7b5d778de0c0e8cfcf8270b5a16bde5a69793b18904a7cc76f2bc7d7a9908844e1299f2937a2a97c0d3db94 SHA512 95f30ad0792840f13b66dc88812f4042902a5be9adec61239e3be70c2fbb6fbd4c0ce7e6db4ef1f6a8bb238d52df22f76dcd100aacd8462265dcf5b27c2a043b
+EBUILD libnvme-1.9.ebuild 1555 BLAKE2B 9e5fd043c9254dc13b6e57b2f079090fb653749930b06b228b7889d5080d9ac6b5c6fd1b9cd8443aaae7663a1d6a2bbefc699ccc685e3041258b129f6def47e8 SHA512 dc9994ef9b3dcda7b823ca1e2b9a2f78176d96201b134ae25eee8e410c0ec459fca1278ea41b508bfb1ea92dd54da2473a3fa6bb8abf6abcca7d3e6911d02f93
MISC metadata.xml 585 BLAKE2B 6163419190adb903fdbdef99ad53f8b14ffbc08ac3c8b56f820049468010af2a58ac204ded1b53c767759e9ac864bf85dbc3b723cd7113cb919194dd9ceaaac3 SHA512 2f5268b41676d2a61d5415de3ec62149cda53613970a1af6aface937cc635d26866c88205a6d9fcf7efd7df0c7f45308ecf5b29b6cea937966b765a222edb8f7
diff --git a/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch b/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch
new file mode 100644
index 000000000000..c2319b72bc96
--- /dev/null
+++ b/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch
@@ -0,0 +1,59 @@
+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);
+
diff --git a/sys-libs/libnvme/libnvme-1.9.ebuild b/sys-libs/libnvme/libnvme-1.9.ebuild
index 1cc2223f879a..3436c4d122bd 100644
--- a/sys-libs/libnvme/libnvme-1.9.ebuild
+++ b/sys-libs/libnvme/libnvme-1.9.ebuild
@@ -35,6 +35,10 @@ BDEPEND="
dev-lang/swig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9-musl-stdint.patch
+)
+
src_configure() {
local emesonargs=(
-Dpython=disabled