public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/
@ 2023-02-28  3:01 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-02-28  3:01 UTC (permalink / raw
  To: gentoo-commits

commit:     4bb6e57d6449617460fbac062618ab5f9ffe9c32
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 28 02:59:15 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 28 03:01:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb6e57d

sys-libs/libnvme: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libnvme-1.3-configure-clang-16.patch     | 32 ++++++++++++++++++++++
 .../{libnvme-1.3.ebuild => libnvme-1.3-r1.ebuild}  |  4 +++
 2 files changed, 36 insertions(+)

diff --git a/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch
new file mode 100644
index 000000000000..b7954a996272
--- /dev/null
+++ b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch
@@ -0,0 +1,32 @@
+https://github.com/linux-nvme/libnvme/commit/ddfb3ba036f9df2737c165b27f9b458dd83a7df8
+
+From ddfb3ba036f9df2737c165b27f9b458dd83a7df8 Mon Sep 17 00:00:00 2001
+From: Tomas Bzatek <tbzatek@redhat.com>
+Date: Tue, 31 Jan 2023 23:27:53 +0100
+Subject: [PATCH] build: Fix nss code snippet includes
+
+With hardened distribution CFLAGS the meson code snippet wouldn't compile:
+
+Compiler stderr:
+  .build/meson-private/tmpy2z1t5q4/testfile.c: In function 'main':
+  .build/meson-private/tmpy2z1t5q4/testfile.c:2:30: error: storage size of 'hints' isn't known
+      2 |              struct addrinfo hints, *result;
+        |                              ^~~~~
+  .build/meson-private/tmpy2z1t5q4/testfile.c:3:21: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
+      3 |              return getaddrinfo(argv[1], argv[2], &hints, &result);
+        |                     ^~~~~~~~~~~
+--- a/meson.build
++++ b/meson.build
+@@ -199,7 +199,10 @@ conf.set10(
+ conf.set(
+     'HAVE_LIBNSS',
+     cc.links(
+-      '''int main(int argc, char **argv) {
++      '''#include <sys/types.h>
++         #include <sys/socket.h>
++         #include <netdb.h>
++         int main(int argc, char **argv) {
+              struct addrinfo hints, *result;
+              return getaddrinfo(argv[1], argv[2], &hints, &result);
+       }
+

diff --git a/sys-libs/libnvme/libnvme-1.3.ebuild b/sys-libs/libnvme/libnvme-1.3-r1.ebuild
similarity index 95%
rename from sys-libs/libnvme/libnvme-1.3.ebuild
rename to sys-libs/libnvme/libnvme-1.3-r1.ebuild
index aaed25b8d4b8..fe8743ba86d6 100644
--- a/sys-libs/libnvme/libnvme-1.3.ebuild
+++ b/sys-libs/libnvme/libnvme-1.3-r1.ebuild
@@ -32,6 +32,10 @@ REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-configure-clang-16.patch
+)
+
 src_configure() {
 	local emesonargs=(
 		-Dpython=false


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/
@ 2023-09-30  5:49 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-09-30  5:49 UTC (permalink / raw
  To: gentoo-commits

commit:     48ce7ec21d023e0a4d7f068bf340f96c2ec19f4e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 30 05:48:55 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 05:49:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48ce7ec2

sys-libs/libnvme: fix musl build, conditionally build tests

Closes: https://bugs.gentoo.org/914921
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libnvme/files/libnvme-1.6-musl.patch | 90 +++++++++++++++++++++++++++
 sys-libs/libnvme/libnvme-1.6.ebuild           |  8 ++-
 2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/sys-libs/libnvme/files/libnvme-1.6-musl.patch b/sys-libs/libnvme/files/libnvme-1.6-musl.patch
new file mode 100644
index 000000000000..bc1037820311
--- /dev/null
+++ b/sys-libs/libnvme/files/libnvme-1.6-musl.patch
@@ -0,0 +1,90 @@
+https://github.com/linux-nvme/libnvme/pull/724
+
+From f78a97acf9cdec1031d81f0e8a3956fc8f28c33c Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 30 Sep 2023 06:38:53 +0100
+Subject: [PATCH 1/2] 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.
+
+Bug: https://bugs.gentoo.org/914921
+Signed-off-by: Sam James <sam@gentoo.org>
+--- 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__))')
+--- 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);
+
+From 149c006d23da60e168485ede722730dc2b725e6b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 30 Sep 2023 06:43:39 +0100
+Subject: [PATCH 2/2] meson: make building tests conditional
+
+Just like we do for docs.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- 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')
+ 
+--- 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')
+

diff --git a/sys-libs/libnvme/libnvme-1.6.ebuild b/sys-libs/libnvme/libnvme-1.6.ebuild
index 2ecf469e67da..e20cb3c1eac4 100644
--- a/sys-libs/libnvme/libnvme-1.6.ebuild
+++ b/sys-libs/libnvme/libnvme-1.6.ebuild
@@ -13,7 +13,8 @@ SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -
 LICENSE="LGPL-2.1+"
 SLOT="0/1"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
-IUSE="dbus +json keyutils python ssl +uuid"
+IUSE="dbus +json keyutils python ssl test +uuid"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
@@ -34,9 +35,14 @@ BDEPEND="
 	dev-lang/swig
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.6-musl.patch
+)
+
 src_configure() {
 	local emesonargs=(
 		-Dpython=false
+		$(meson_use test tests)
 		$(meson_feature json json-c)
 		$(meson_feature dbus libdbus)
 		$(meson_feature keyutils)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/
@ 2023-12-28  4:04 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-12-28  4:04 UTC (permalink / raw
  To: gentoo-commits

commit:     95104945b94bbcbe3f4f684f6eb1e8cddae2a5c1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 03:58:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 03:58:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95104945

sys-libs/libnvme: drop 1.2-r1, 1.3-r1, 1.4, 1.5-r2

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libnvme/Manifest                          |  4 --
 .../files/libnvme-1.3-configure-clang-16.patch     | 32 ---------
 .../libnvme/files/libnvme-1.5-free-segfault.patch  | 36 -----------
 sys-libs/libnvme/libnvme-1.2-r1.ebuild             | 67 -------------------
 sys-libs/libnvme/libnvme-1.3-r1.ebuild             | 75 ----------------------
 sys-libs/libnvme/libnvme-1.4.ebuild                | 73 ---------------------
 sys-libs/libnvme/libnvme-1.5-r2.ebuild             | 75 ----------------------
 7 files changed, 362 deletions(-)

diff --git a/sys-libs/libnvme/Manifest b/sys-libs/libnvme/Manifest
index 40a0ea9ac85b..b16d9619e035 100644
--- a/sys-libs/libnvme/Manifest
+++ b/sys-libs/libnvme/Manifest
@@ -1,7 +1,3 @@
-DIST libnvme-1.2.tar.gz 484397 BLAKE2B ae6b1c3aa8f45594219470059cfc8982674433772f89faab1659811d860036f8af89bbcb383db37e96b763188935d2c1ecaa5176b8140bba50f8ea226e989a06 SHA512 f50517838cd1df3cdd123afdb67870633e9e484bf84dba70b784d7e86ecb355b96ba9d6a1cffb96b35444da7870dfe21c54b69701b5fe5b515319280db4a84e4
-DIST libnvme-1.3.tar.gz 499870 BLAKE2B 5a019c12829890a0fe0b5e6aec5fbd009fc3bd6dfe7e81f61731292f4ea8b03044e7625491479350c399cc8cd5bc023e02cc9e93f1eba38f4c747667e84cfb24 SHA512 c874b29b73e55be842f71e74a226a76fcd50dfa72e2be100f0437bc83e740cd146b6d2f2cdaa940c11c3d8c48ff2c065ac0e8a83d4d0dde743edf4179f328670
-DIST libnvme-1.4.tar.gz 506101 BLAKE2B c1496c6258bf20ed4109710b06671fa7f0e27c7649520ad8ccf4021df00fffc45f80fea248d62d2b85eecc8b15b6afaf4a113d96d6737ae6772346c9d0bc1002 SHA512 cc4a0a78083471e912736d76e4faaa5c285e1149029560f212ff06254863e8f21b48fcb1638599bd68efcf888312a248fb748d23776af03574b39fbd9b2a418d
-DIST libnvme-1.5.tar.gz 566715 BLAKE2B 2111a6929bc17949f03c39fdb247420bba371641b38e30cc7bc4b61a859471d1bfaa27d0dd3bb41379a3a59bb493ff9ce9006460aaf0b900c7ce40410701c03b SHA512 0a19eca2dd7c48c9da3123767c3c789dfb7528d6f5b2b2dfdc8af7cd64e1d724fb81c6002b9821ce916cc7adb6b5e5e28253f1d73131188b0559c6d276a7d07c
 DIST libnvme-1.6-ubsan.patch.xz 5800 BLAKE2B 8603311c44a475bd09a31a6bebe96f29f2b18b6d0917cb02b680fc20861a71688f1c5b3f618d6f38e7c105c8a00b8818b2ffa67289371fd0ab62354d318bebb9 SHA512 74f1a86c4011ce6650b54ec50422fe98ec64a65b50e3aa6c3d57f3715713f85ef7c84451416bb8d136dff646b3eba00d415208c98a16c562bf5d258d51b0d006
 DIST libnvme-1.6.tar.gz 597676 BLAKE2B 8b47b268154574688a909d0664df55eda38d9f133373fabcffe987ede03e0c531f88126e0dc50204d74fb2fa665af6379aa5205757bfc5863926db8402fbab27 SHA512 ae6a95ed75bbdc6f8c5c5608eaad8bcaf60a08348ddff356bd47258da2bd2470bdaa45747cdb7ba24f10db093fc0ab95f8bda076a45cbb87e155e3158ef726f8
 DIST libnvme-1.7.1.tar.gz 604220 BLAKE2B b02bf0914be73f5877f418bebdbed31dfb019484fb9f6e169c3474d90306706b8e787003a472f13bedb72e90eff39a30ba35df252a3cdf4ea08a362c3f9e221b SHA512 aea986ae35eafa17482e07015228d5a7d529d41148f4cee9e4619adc2460abb5460d60cd91177462cbcaf2e94e5870026ff9e45548f91d9f90b65a6268eb3abb

diff --git a/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch
deleted file mode 100644
index b7954a996272..000000000000
--- a/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://github.com/linux-nvme/libnvme/commit/ddfb3ba036f9df2737c165b27f9b458dd83a7df8
-
-From ddfb3ba036f9df2737c165b27f9b458dd83a7df8 Mon Sep 17 00:00:00 2001
-From: Tomas Bzatek <tbzatek@redhat.com>
-Date: Tue, 31 Jan 2023 23:27:53 +0100
-Subject: [PATCH] build: Fix nss code snippet includes
-
-With hardened distribution CFLAGS the meson code snippet wouldn't compile:
-
-Compiler stderr:
-  .build/meson-private/tmpy2z1t5q4/testfile.c: In function 'main':
-  .build/meson-private/tmpy2z1t5q4/testfile.c:2:30: error: storage size of 'hints' isn't known
-      2 |              struct addrinfo hints, *result;
-        |                              ^~~~~
-  .build/meson-private/tmpy2z1t5q4/testfile.c:3:21: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
-      3 |              return getaddrinfo(argv[1], argv[2], &hints, &result);
-        |                     ^~~~~~~~~~~
---- a/meson.build
-+++ b/meson.build
-@@ -199,7 +199,10 @@ conf.set10(
- conf.set(
-     'HAVE_LIBNSS',
-     cc.links(
--      '''int main(int argc, char **argv) {
-+      '''#include <sys/types.h>
-+         #include <sys/socket.h>
-+         #include <netdb.h>
-+         int main(int argc, char **argv) {
-              struct addrinfo hints, *result;
-              return getaddrinfo(argv[1], argv[2], &hints, &result);
-       }
-

diff --git a/sys-libs/libnvme/files/libnvme-1.5-free-segfault.patch b/sys-libs/libnvme/files/libnvme-1.5-free-segfault.patch
deleted file mode 100644
index a41cf380f911..000000000000
--- a/sys-libs/libnvme/files/libnvme-1.5-free-segfault.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c56910f807795528fff7ba6b81f8efcdb4babe98 Mon Sep 17 00:00:00 2001
-From: Martin Belanger <martin.belanger@dell.com>
-Date: Wed, 5 Jul 2023 10:59:25 -0400
-Subject: [PATCH] tree: missing closedir() causes fd leak for
- "/sys/bus/pci/slots"
-
-In nvme_ctrl_lookup_phy_slot(), we are missing a closedir(), which
-causes file descriptors to leak. Also, there was a missing free()
-when the function returns with ENOMEM.
-
-Signed-off-by: Martin Belanger <martin.belanger@dell.com>
----
- src/nvme/tree.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/nvme/tree.c b/src/nvme/tree.c
-index a2ac0698..805eff99 100644
---- a/src/nvme/tree.c
-+++ b/src/nvme/tree.c
-@@ -1292,6 +1292,8 @@ static char *nvme_ctrl_lookup_phy_slot(nvme_root_t r, const char *address)
- 			ret = asprintf(&path, "/sys/bus/pci/slots/%s", entry->d_name);
- 			if (ret < 0) {
- 				errno = ENOMEM;
-+				free(target_addr);
-+				closedir(slots_dir);
- 				return NULL;
- 			}
- 			addr = nvme_get_attr(path, "address");
-@@ -1306,6 +1308,7 @@ static char *nvme_ctrl_lookup_phy_slot(nvme_root_t r, const char *address)
- 		}
- 	}
- 	free(target_addr);
-+	closedir(slots_dir);
- 	if (found)
- 		return strdup(entry->d_name);
- 	return NULL;

diff --git a/sys-libs/libnvme/libnvme-1.2-r1.ebuild b/sys-libs/libnvme/libnvme-1.2-r1.ebuild
deleted file mode 100644
index b19e6a86bda7..000000000000
--- a/sys-libs/libnvme/libnvme-1.2-r1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-inherit python-r1 meson
-
-DESCRIPTION="C Library for NVM Express on Linux"
-HOMEPAGE="https://github.com/linux-nvme/libnvme"
-LICENSE="LGPL-2.1+"
-SLOT="0"
-IUSE="+json python ssl +uuid"
-
-SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86"
-
-DEPEND="
-	json? ( dev-libs/json-c:= )
-	python? ( ${PYTHON_DEPS} )
-	ssl? ( >=dev-libs/openssl-1.1:= )
-	uuid? ( sys-apps/util-linux:= )
-"
-RDEPEND="${DEPEND}"
-
-BDEPEND="
-	dev-lang/swig
-"
-
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-src_configure() {
-	local emesonargs=(
-		-Dpython=false
-	)
-	meson_src_configure
-}
-
-python_compile() {
-	local emesonargs=(
-		-Dpython=true
-	)
-	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
-}

diff --git a/sys-libs/libnvme/libnvme-1.3-r1.ebuild b/sys-libs/libnvme/libnvme-1.3-r1.ebuild
deleted file mode 100644
index d5b333357815..000000000000
--- a/sys-libs/libnvme/libnvme-1.3-r1.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-inherit python-r1 meson
-
-DESCRIPTION="C Library for NVM Express on Linux"
-HOMEPAGE="https://github.com/linux-nvme/libnvme"
-LICENSE="LGPL-2.1+"
-SLOT="0"
-IUSE="dbus python ssl +uuid"
-
-SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86"
-
-DEPEND="
-	dev-libs/json-c:=
-	dbus? ( sys-apps/dbus:= )
-	python? ( ${PYTHON_DEPS} )
-	ssl? ( >=dev-libs/openssl-1.1:= )
-	uuid? ( sys-apps/util-linux:= )
-"
-RDEPEND="${DEPEND}"
-
-BDEPEND="
-	dev-lang/swig
-"
-
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-configure-clang-16.patch
-)
-
-src_configure() {
-	local emesonargs=(
-		-Dpython=false
-		$(meson_feature ssl openssl)
-		$(meson_feature dbus libdbus)
-		$(meson_use python)
-	)
-	meson_src_configure
-}
-
-python_compile() {
-	local emesonargs=(
-		-Dpython=true
-	)
-	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
-}

diff --git a/sys-libs/libnvme/libnvme-1.4.ebuild b/sys-libs/libnvme/libnvme-1.4.ebuild
deleted file mode 100644
index e815ea07f037..000000000000
--- a/sys-libs/libnvme/libnvme-1.4.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-inherit python-r1 meson
-
-DESCRIPTION="C Library for NVM Express on Linux"
-HOMEPAGE="https://github.com/linux-nvme/libnvme"
-LICENSE="LGPL-2.1+"
-SLOT="0/1"
-IUSE="dbus +json keyutils python ssl +uuid"
-
-SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86"
-
-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
-"
-
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-src_configure() {
-	local emesonargs=(
-		-Dpython=false
-		$(meson_feature json json-c)
-		$(meson_feature dbus libdbus)
-		$(meson_feature ssl openssl)
-		$(meson_feature python)
-	)
-	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
-}

diff --git a/sys-libs/libnvme/libnvme-1.5-r2.ebuild b/sys-libs/libnvme/libnvme-1.5-r2.ebuild
deleted file mode 100644
index 1ffd8a317ec6..000000000000
--- a/sys-libs/libnvme/libnvme-1.5-r2.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-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="amd64 arm arm64 ~loong ppc64 ~riscv x86"
-IUSE="dbus +json keyutils python ssl +uuid"
-
-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}/${P}-free-segfault.patch" )
-
-src_configure() {
-	local emesonargs=(
-		-Dpython=false
-		$(meson_feature json json-c)
-		$(meson_feature dbus libdbus)
-		$(meson_feature keyutils)
-		$(meson_feature ssl openssl)
-		$(meson_feature python)
-	)
-	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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/
@ 2024-05-04 12:43 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-05-04 12:43 UTC (permalink / raw
  To: gentoo-commits

commit:     44d0530879ab4219ce8452c8aa33fc75b1a03141
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May  4 12:43:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May  4 12:43:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d05308

sys-libs/libnvme: fix musl build

I don't think this actually failed, unlike libnvme, but pull in the patches for
completeness.

Bug: https://bugs.gentoo.org/931194
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libnvme/files/libnvme-1.9-musl-stdint.patch    | 59 ++++++++++++++++++++++
 sys-libs/libnvme/libnvme-1.9.ebuild                |  4 ++
 2 files changed, 63 insertions(+)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-04 12:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-04 12:43 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-12-28  4:04 Sam James
2023-09-30  5:49 Sam James
2023-02-28  3:01 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox