public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2021-12-20 23:53 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-12-20 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b24dbb2a1dc978481648d73d380422dd06083ae8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 20 23:52:22 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 20 23:52:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b24dbb2a

sys-apps/nvme-cli: fix musl build

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

 .../nvme-cli/files/nvme-cli-1.16-musl-limits.patch | 24 ++++++++++++++++++++++
 sys-apps/nvme-cli/nvme-cli-1.16.ebuild             |  4 ++++
 2 files changed, 28 insertions(+)

diff --git a/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch b/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
new file mode 100644
index 000000000000..12e66577d69d
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
@@ -0,0 +1,24 @@
+https://github.com/linux-nvme/nvme-cli/commit/4729b13f36d4713ce1162dc1d4425d44e1474078.patch
+https://bugs.gentoo.org/829705
+
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Mon, 26 Apr 2021 00:41:20 -0600
+Subject: [PATCH] nvme-rpmb: Add limits.h due to missing PATH_MAX definition
+
+Commit 21f40f38b introduced new use of PATH_MAX, but did not add the
+limits.h header.  This resulted in nvme-cli failing to build on
+ppc64le systems using the musl C library.
+
+Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
+[dwagner: removed nvme-topology.c bits]
+Signed-off-by: Daniel Wagner <dwagner@suse.de>
+--- a/nvme-rpmb.c
++++ b/nvme-rpmb.c
+@@ -25,6 +25,7 @@
+ #include <sys/socket.h>
+ #include <linux/if_alg.h>
+ #include <linux/socket.h>
++#include <limits.h>
+ 
+ #include "nvme.h"
+ #include "libnvme.h"

diff --git a/sys-apps/nvme-cli/nvme-cli-1.16.ebuild b/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
index 0debd0e006e6..1f0ebaf7bde5 100644
--- a/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
@@ -22,6 +22,10 @@ RDEPEND="json? ( dev-libs/json-c:= )
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-musl-limits.patch
+)
+
 src_prepare() {
 	default
 


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2022-06-18 17:36 Zac Medico
  0 siblings, 0 replies; 8+ messages in thread
From: Zac Medico @ 2022-06-18 17:36 UTC (permalink / raw
  To: gentoo-commits

commit:     a03fa9d85ce7ce11c162b3d42e3d150119c0b452
Author:     Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Fri Jun 17 11:21:37 2022 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 18 17:36:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a03fa9d8

sys-apps/nvme-cli: fixed bash completion

Closes: https://bugs.gentoo.org/852764
Closes: https://github.com/gentoo/gentoo/pull/25939
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 .../files/nvme-cli-1.16-bash-completions.patch     | 72 ++++++++++++++++++++++
 .../files/nvme-cli-2.0-bash-completions.patch      | 61 ++++++++++++++++++
 sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild          | 55 +++++++++++++++++
 sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild           | 38 ++++++++++++
 4 files changed, 226 insertions(+)

diff --git a/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch b/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch
new file mode 100644
index 000000000000..27a80eda9955
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch
@@ -0,0 +1,72 @@
+This fixes several issues:
+* the upstream rebase error (unclosed double quote)
+* typo "lugin_seagate_opts"
+* "readonly" with assignment is problematic on Bash 5.1.x
+
+Gentoo bug: https://bugs.gentoo.org/852764
+Upstream: https://github.com/linux-nvme/nvme-cli/pull/1574
+Upstream: https://github.com/linux-nvme/nvme-cli/commit/25fd8c707b106ca0763402566ad657ef710bf09e
+
+Author: Karlson2k (Evgeny Grin)
+Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
+
+diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
+index 41938d77..31afb3b3 100644
+--- a/completions/bash-nvme-completion.sh
++++ b/completions/bash-nvme-completion.sh
+@@ -3,12 +3,13 @@
+ # Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015
+ 
+ # Constant to indicate command has no options
+-readonly NO_OPTS=""
++NO_OPTS=""
++readonly NO_OPTS
+ 
+ # Associative array of plugins and associated subcommands
+ # Order here is same as PLUGIN_OBJS in Makefile
+ typeset -A _plugin_subcmds
+-readonly _plugin_subcmds=(
++_plugin_subcmds=(
+ 	[intel]="id-ctrl internal-log lat-stats \
+ 		set-bucket-thresholds lat-stats-tracking \
+ 		market-name smart-log-add temp-stats"
+@@ -55,10 +56,11 @@ readonly _plugin_subcmds=(
+ 	[nvidia]="id-ctrl"
+ 	[ymtc]="smart-log-add"
+ )
++readonly _plugin_subcmds
+ 
+ # Associative array mapping plugins to coresponding option completions
+ typeset -A _plugin_funcs
+-readonly _plugin_funcs=(
++_plugin_funcs=(
+ 	[intel]="plugin_intel_opts"
+ 	[amzn]="plugin_amzn_opts"
+ 	[lnvm]="plugin_lnvm_opts"
+@@ -77,6 +79,7 @@ readonly _plugin_funcs=(
+ 	[nvidia]="plugin_nvidia_opts"
+ 	[ymtc]="plugin_ymtc_opts"
+ )
++readonly _plugin_funcs
+ 
+ # Top level commands
+ _cmds="list list-subsys id-ctrl id-ns \
+@@ -101,8 +104,7 @@ _cmds="list list-subsys id-ctrl id-ns \
+ 	connect disconnect disconnect-all gen-hostnqn \
+ 	show-hostnqn dir-receive dir-send virt-mgmt \
+ 	rpmb boot-part-log fid-support-effects-log \
+-	supported-log-pages lockdown"
+-	supported-log-pages list-endgrp"
++	supported-log-pages lockdown list-endgrp"
+ 
+ # Add plugins:
+ for plugin in "${!_plugin_subcmds[@]}"; do
+@@ -983,7 +985,7 @@ plugin_micron_opts () {
+ 	return 0
+ }
+ 
+-lugin_seagate_opts () {
++plugin_seagate_opts () {
+     local opts=""
+ 	local compargs=""
+ 

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch b/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch
new file mode 100644
index 000000000000..3ddad04a5518
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch
@@ -0,0 +1,61 @@
+This fixes several issues:
+* typo "lugin_seagate_opts"
+* "readonly" with assignment resulting in error on Bash 5.x
+
+Gentoo bug: https://bugs.gentoo.org/852764
+Upstream: https://github.com/linux-nvme/nvme-cli/pull/1574
+Upstream: https://github.com/linux-nvme/nvme-cli/commit/25fd8c707b106ca0763402566ad657ef710bf09e
+
+Author: Karlson2k (Evgeny Grin)
+Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
+
+diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
+index 5e0eb23b..469ba3e2 100644
+--- a/completions/bash-nvme-completion.sh
++++ b/completions/bash-nvme-completion.sh
+@@ -3,12 +3,13 @@
+ # Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015
+ 
+ # Constant to indicate command has no options
+-readonly NO_OPTS=""
++NO_OPTS=""
++readonly NO_OPTS
+ 
+ # Associative array of plugins and associated subcommands
+ # Order here is same as PLUGIN_OBJS in Makefile
+ typeset -A _plugin_subcmds
+-readonly _plugin_subcmds=(
++_plugin_subcmds=(
+ 	[intel]="id-ctrl internal-log lat-stats \
+ 		set-bucket-thresholds lat-stats-tracking \
+ 		market-name smart-log-add temp-stats"
+@@ -53,10 +54,11 @@ readonly _plugin_subcmds=(
+ 	[nvidia]="id-ctrl"
+ 	[ymtc]="smart-log-add"
+ )
++readonly _plugin_subcmds
+ 
+ # Associative array mapping plugins to coresponding option completions
+ typeset -A _plugin_funcs
+-readonly _plugin_funcs=(
++_plugin_funcs=(
+ 	[intel]="plugin_intel_opts"
+ 	[amzn]="plugin_amzn_opts"
+ 	[memblaze]="plugin_memblaze_opts"
+@@ -74,6 +76,7 @@ readonly _plugin_funcs=(
+ 	[nvidia]="plugin_nvidia_opts"
+ 	[ymtc]="plugin_ymtc_opts"
+ )
++readonly _plugin_funcs
+ 
+ # Top level commands
+ _cmds="list list-subsys id-ctrl id-ns \
+@@ -939,7 +942,7 @@ plugin_micron_opts () {
+ 	return 0
+ }
+ 
+-lugin_seagate_opts () {
++plugin_seagate_opts () {
+     local opts=""
+ 	local compargs=""
+ 

diff --git a/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild b/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild
new file mode 100644
index 000000000000..d1507396d8fd
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs udev
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm64 ppc64 ~riscv x86"
+IUSE="hugepages +json systemd +uuid"
+
+RDEPEND="json? ( dev-libs/json-c:= )
+	hugepages? ( sys-libs/libhugetlbfs )
+	systemd? ( sys-apps/systemd:= )
+	uuid? ( sys-apps/util-linux:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-musl-limits.patch
+	"${FILESDIR}"/${P}-bash-completions.patch # Gentoo bug #852764
+)
+
+src_prepare() {
+	default
+
+	sed -e 's|^LIBUUID =|LIBUUID ?=|' \
+		-e 's|^LIBJSONC =|LIBJSONC ?=|' \
+		-e 's|^LIBHUGETLBFS =|LIBHUGETLBFS ?=|' \
+		-e 's|^HAVE_SYSTEMD =|HAVE_SYSTEMD ?=|' \
+		-e '/DESTDIROLD/d' \
+		-i Makefile || die
+}
+
+src_configure() {
+	tc-export CC
+
+	export PREFIX="${EPREFIX}/usr"
+
+	local unitdir="$(systemd_get_systemunitdir)"
+	export SYSTEMDDIR="${unitdir%/system}"
+	export UDEVDIR="${EPREFIX}$(get_udevdir)"
+
+	MAKEOPTS+=" LIBUUID=$(usex uuid 0 1)"
+	MAKEOPTS+=" LIBJSONC=$(usex json 0 1)"
+	MAKEOPTS+=" LIBHUGETLBFS=$(usex hugepages 0 1)"
+	MAKEOPTS+=" HAVE_SYSTEMD=$(usex systemd 0 1)"
+	MAKEOPTS+="  V=1"
+}

diff --git a/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild
new file mode 100644
index 000000000000..bc3e02e3f368
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson systemd udev
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="hugepages +json +uuid"
+
+RDEPEND="
+	sys-libs/libnvme:=[json=,uuid=]
+	hugepages? ( sys-libs/libhugetlbfs:= )
+	json? ( dev-libs/json-c:= )
+	uuid? ( sys-apps/util-linux:= )"
+
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-bash-completions.patch # Gentoo bug #852764
+)
+
+src_configure() {
+	local unitdir="$(systemd_get_systemunitdir)"
+	local emesonargs=(
+		-Dsystemddir=${unitdir%/system}
+		-Dudevrulesdir=${EPREFIX}$(get_udevdir)
+	)
+	meson_src_configure
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2022-10-31 17:50 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2022-10-31 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     326b97370a9222e59502b3bbb1f59507bac6fb39
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 17:50:21 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 17:50:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=326b9737

sys-apps/nvme-cli: add 2.2

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/nvme-cli/Manifest                        |  1 +
 sys-apps/nvme-cli/files/nvme-cli-2.2-docdir.patch | 13 ++++++
 sys-apps/nvme-cli/nvme-cli-2.2.ebuild             | 49 +++++++++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
index 8af04fe51003..f1f4bab98471 100644
--- a/sys-apps/nvme-cli/Manifest
+++ b/sys-apps/nvme-cli/Manifest
@@ -2,3 +2,4 @@ DIST nvme-cli-1.16.tar.gz 598246 BLAKE2B 8aef6ae82ec9a2c67de6c69addd72c87ade6554
 DIST nvme-cli-2.0.tar.gz 646320 BLAKE2B 81a8161091071be4e98d4feb78b3f3edaed07262212a8950c1882e3b46f38cd82d8cd8bfec62b3971feda6e82d297338e5541c8eda33c8b6f714d3b3ce000c25 SHA512 24a00ee8e0fc963c1757797413ff5725cec18f821a714d6bbbf37906010d72934d6fdd7b466c085f13716a5279d1a7bd3254ee474e37a0ecd00a85ef23e12417
 DIST nvme-cli-2.1.1.tar.gz 674354 BLAKE2B 2cb995195328a9c91644ff32676eb3a6d9f1927a004ed75d2be0a746f45050b8ae927924a1095a787ea10618bd600133237852f56116c1db25c4eaa03ea9dab5 SHA512 61a8e7c0ae8da082ac0cda2fdf61ffe8d83ed5d4ee31640bde89fde929ba3fe6d788950bd232630af2c7fc5f3563f05f47f350e005c8556691e5aede73c88d74
 DIST nvme-cli-2.1.2.tar.gz 674414 BLAKE2B e71e32a371c2cebfd7f66539490baa8e8074c5bd21afa2470e73c763c752318ca5abc1fe1a4d3f346137dcdbb604889a23955269f209222384a629e8d6817d6a SHA512 2162a6967a221a4ae7e0261748c26a10ff43d5b592039e29578d8310cf176428d528c2d510c0b58419b70bd6d28f4d2c77f0cd27606d87079c64289d5d14f930
+DIST nvme-cli-2.2.gh.tar.gz 706243 BLAKE2B ad06296484b9a1a8e53a904cb5f28f93a25c2882186ddcc2fca1f7762af0f7bedc1775d094d566fca3917419018d87c41b7a78378758a9e0b65c161a8188517e SHA512 a3f572bb1bbd4ba56eb3a4c1e1aa95c4ed5e7bc1d5adb80125fe54a894c470838cad5457a0420692deb39f4302cefc4fc1eab92c08c134faabe03a654b9542f4

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.2-docdir.patch b/sys-apps/nvme-cli/files/nvme-cli-2.2-docdir.patch
new file mode 100644
index 000000000000..92a1c51b11f7
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.2-docdir.patch
@@ -0,0 +1,13 @@
+diff --git a/Documentation/meson.build b/Documentation/meson.build
+index bb0c9724..519c4bfc 100644
+--- a/Documentation/meson.build
++++ b/Documentation/meson.build
+@@ -187,7 +187,7 @@ want_docs = get_option('docs')
+ want_docs_build = get_option('docs-build')
+ if want_docs != 'false'
+   mandir = join_paths(get_option('mandir'), 'man1')
+-  htmldir = join_paths(get_option('htmldir'), 'nvme')
++  htmldir = get_option('htmldir')
+ 
+   asciidoctor = find_program('asciidoc', required: get_option('docs-build'))
+   if want_docs_build and asciidoctor.found()

diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.ebuild b/sys-apps/nvme-cli/nvme-cli-2.2.ebuild
new file mode 100644
index 000000000000..e306a3a8eb3b
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-2.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson systemd udev
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+RESTRICT="test"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="hugepages +json"
+
+RDEPEND="
+	>=sys-libs/libnvme-1.2:=[json=]
+	hugepages? ( sys-libs/libhugetlbfs:= )
+	json? ( dev-libs/json-c:= )
+	sys-libs/zlib:=
+"
+
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/nvme-cli-2.2-docdir.patch"
+)
+
+src_configure() {
+	local unitdir="$(systemd_get_systemunitdir)"
+	local emesonargs=(
+		-Ddocs=all
+		-Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html"
+		-Dsystemddir="${unitdir%/system}"
+		-Dudevrulesdir="${EPREFIX}$(get_udevdir)"
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2022-12-26  8:35 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-12-26  8:35 UTC (permalink / raw
  To: gentoo-commits

commit:     175dc705fdd91cc5ae2d18c29c5e7dd3e551b040
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 26 08:26:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 08:33:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=175dc705

sys-apps/nvme-cli: drop 1.16-r1, 2.0-r1, 2.1.2

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

 sys-apps/nvme-cli/Manifest                         |  3 -
 .../files/nvme-cli-1.16-bash-completions.patch     | 72 ----------------------
 .../nvme-cli/files/nvme-cli-1.16-musl-limits.patch | 37 -----------
 .../files/nvme-cli-2.0-bash-completions.patch      | 61 ------------------
 sys-apps/nvme-cli/metadata.xml                     |  1 -
 sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild          | 55 -----------------
 sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild           | 38 ------------
 sys-apps/nvme-cli/nvme-cli-2.1.2.ebuild            | 34 ----------
 8 files changed, 301 deletions(-)

diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
index 47bc3591ad5f..edd4c759e100 100644
--- a/sys-apps/nvme-cli/Manifest
+++ b/sys-apps/nvme-cli/Manifest
@@ -1,4 +1 @@
-DIST nvme-cli-1.16.tar.gz 598246 BLAKE2B 8aef6ae82ec9a2c67de6c69addd72c87ade6554e6d374c717f8e3c0585565974a2b2870eb172b3ebdc1ae307bd3a55a14a17d3feea8d437265db136b434b519f SHA512 c713eb15b979ad17791cf95717b42d5f638cb4803d646bca1f4825e6bb50f086226b44b108b61571709b2cb615ae6ba86dbad309f675b240ebd3968d1cf536ff
-DIST nvme-cli-2.0.tar.gz 646320 BLAKE2B 81a8161091071be4e98d4feb78b3f3edaed07262212a8950c1882e3b46f38cd82d8cd8bfec62b3971feda6e82d297338e5541c8eda33c8b6f714d3b3ce000c25 SHA512 24a00ee8e0fc963c1757797413ff5725cec18f821a714d6bbbf37906010d72934d6fdd7b466c085f13716a5279d1a7bd3254ee474e37a0ecd00a85ef23e12417
-DIST nvme-cli-2.1.2.tar.gz 674414 BLAKE2B e71e32a371c2cebfd7f66539490baa8e8074c5bd21afa2470e73c763c752318ca5abc1fe1a4d3f346137dcdbb604889a23955269f209222384a629e8d6817d6a SHA512 2162a6967a221a4ae7e0261748c26a10ff43d5b592039e29578d8310cf176428d528c2d510c0b58419b70bd6d28f4d2c77f0cd27606d87079c64289d5d14f930
 DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26

diff --git a/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch b/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch
deleted file mode 100644
index 27a80eda9955..000000000000
--- a/sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-This fixes several issues:
-* the upstream rebase error (unclosed double quote)
-* typo "lugin_seagate_opts"
-* "readonly" with assignment is problematic on Bash 5.1.x
-
-Gentoo bug: https://bugs.gentoo.org/852764
-Upstream: https://github.com/linux-nvme/nvme-cli/pull/1574
-Upstream: https://github.com/linux-nvme/nvme-cli/commit/25fd8c707b106ca0763402566ad657ef710bf09e
-
-Author: Karlson2k (Evgeny Grin)
-Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
-
-diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
-index 41938d77..31afb3b3 100644
---- a/completions/bash-nvme-completion.sh
-+++ b/completions/bash-nvme-completion.sh
-@@ -3,12 +3,13 @@
- # Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015
- 
- # Constant to indicate command has no options
--readonly NO_OPTS=""
-+NO_OPTS=""
-+readonly NO_OPTS
- 
- # Associative array of plugins and associated subcommands
- # Order here is same as PLUGIN_OBJS in Makefile
- typeset -A _plugin_subcmds
--readonly _plugin_subcmds=(
-+_plugin_subcmds=(
- 	[intel]="id-ctrl internal-log lat-stats \
- 		set-bucket-thresholds lat-stats-tracking \
- 		market-name smart-log-add temp-stats"
-@@ -55,10 +56,11 @@ readonly _plugin_subcmds=(
- 	[nvidia]="id-ctrl"
- 	[ymtc]="smart-log-add"
- )
-+readonly _plugin_subcmds
- 
- # Associative array mapping plugins to coresponding option completions
- typeset -A _plugin_funcs
--readonly _plugin_funcs=(
-+_plugin_funcs=(
- 	[intel]="plugin_intel_opts"
- 	[amzn]="plugin_amzn_opts"
- 	[lnvm]="plugin_lnvm_opts"
-@@ -77,6 +79,7 @@ readonly _plugin_funcs=(
- 	[nvidia]="plugin_nvidia_opts"
- 	[ymtc]="plugin_ymtc_opts"
- )
-+readonly _plugin_funcs
- 
- # Top level commands
- _cmds="list list-subsys id-ctrl id-ns \
-@@ -101,8 +104,7 @@ _cmds="list list-subsys id-ctrl id-ns \
- 	connect disconnect disconnect-all gen-hostnqn \
- 	show-hostnqn dir-receive dir-send virt-mgmt \
- 	rpmb boot-part-log fid-support-effects-log \
--	supported-log-pages lockdown"
--	supported-log-pages list-endgrp"
-+	supported-log-pages lockdown list-endgrp"
- 
- # Add plugins:
- for plugin in "${!_plugin_subcmds[@]}"; do
-@@ -983,7 +985,7 @@ plugin_micron_opts () {
- 	return 0
- }
- 
--lugin_seagate_opts () {
-+plugin_seagate_opts () {
-     local opts=""
- 	local compargs=""
- 

diff --git a/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch b/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
deleted file mode 100644
index 27c9667c827c..000000000000
--- a/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/linux-nvme/nvme-cli/commit/4729b13f36d4713ce1162dc1d4425d44e1474078.patch
-https://bugs.gentoo.org/829705
-(and an additional hunk for https://bugs.gentoo.org/830744)
-
-From: Ariadne Conill <ariadne@dereferenced.org>
-Date: Mon, 26 Apr 2021 00:41:20 -0600
-Subject: [PATCH] nvme-rpmb: Add limits.h due to missing PATH_MAX definition
-
-Commit 21f40f38b introduced new use of PATH_MAX, but did not add the
-limits.h header.  This resulted in nvme-cli failing to build on
-ppc64le systems using the musl C library.
-
-Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
-[dwagner: removed nvme-topology.c bits]
-Signed-off-by: Daniel Wagner <dwagner@suse.de>
---- a/nvme-rpmb.c
-+++ b/nvme-rpmb.c
-@@ -25,6 +25,7 @@
- #include <sys/socket.h>
- #include <linux/if_alg.h>
- #include <linux/socket.h>
-+#include <limits.h>
- 
- #include "nvme.h"
- #include "libnvme.h"
-diff --git a/nvme-topology.c b/nvme-topology.c
-index 0a22f6b..6d510f2 100644
---- a/nvme-topology.c
-+++ b/nvme-topology.c
-@@ -1,6 +1,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <errno.h>
-+#include <limits.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <sys/stat.h>

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch b/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch
deleted file mode 100644
index 3ddad04a5518..000000000000
--- a/sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-This fixes several issues:
-* typo "lugin_seagate_opts"
-* "readonly" with assignment resulting in error on Bash 5.x
-
-Gentoo bug: https://bugs.gentoo.org/852764
-Upstream: https://github.com/linux-nvme/nvme-cli/pull/1574
-Upstream: https://github.com/linux-nvme/nvme-cli/commit/25fd8c707b106ca0763402566ad657ef710bf09e
-
-Author: Karlson2k (Evgeny Grin)
-Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
-
-diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
-index 5e0eb23b..469ba3e2 100644
---- a/completions/bash-nvme-completion.sh
-+++ b/completions/bash-nvme-completion.sh
-@@ -3,12 +3,13 @@
- # Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015
- 
- # Constant to indicate command has no options
--readonly NO_OPTS=""
-+NO_OPTS=""
-+readonly NO_OPTS
- 
- # Associative array of plugins and associated subcommands
- # Order here is same as PLUGIN_OBJS in Makefile
- typeset -A _plugin_subcmds
--readonly _plugin_subcmds=(
-+_plugin_subcmds=(
- 	[intel]="id-ctrl internal-log lat-stats \
- 		set-bucket-thresholds lat-stats-tracking \
- 		market-name smart-log-add temp-stats"
-@@ -53,10 +54,11 @@ readonly _plugin_subcmds=(
- 	[nvidia]="id-ctrl"
- 	[ymtc]="smart-log-add"
- )
-+readonly _plugin_subcmds
- 
- # Associative array mapping plugins to coresponding option completions
- typeset -A _plugin_funcs
--readonly _plugin_funcs=(
-+_plugin_funcs=(
- 	[intel]="plugin_intel_opts"
- 	[amzn]="plugin_amzn_opts"
- 	[memblaze]="plugin_memblaze_opts"
-@@ -74,6 +76,7 @@ readonly _plugin_funcs=(
- 	[nvidia]="plugin_nvidia_opts"
- 	[ymtc]="plugin_ymtc_opts"
- )
-+readonly _plugin_funcs
- 
- # Top level commands
- _cmds="list list-subsys id-ctrl id-ns \
-@@ -939,7 +942,7 @@ plugin_micron_opts () {
- 	return 0
- }
- 
--lugin_seagate_opts () {
-+plugin_seagate_opts () {
-     local opts=""
- 	local compargs=""
- 

diff --git a/sys-apps/nvme-cli/metadata.xml b/sys-apps/nvme-cli/metadata.xml
index f9624e33a203..37ce8bf89548 100644
--- a/sys-apps/nvme-cli/metadata.xml
+++ b/sys-apps/nvme-cli/metadata.xml
@@ -11,6 +11,5 @@
 	<use>
 		<flag name="json">Support JSON output via <pkg>dev-libs/json-c</pkg></flag>
 		<flag name="hugepages">Use huge pages for memory allocations via <pkg>sys-libs/libhugetlbfs</pkg></flag>
-		<flag name="uuid">UUID support via <pkg>sys-apps/util-linux</pkg></flag>
 	</use>
 </pkgmetadata>

diff --git a/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild b/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild
deleted file mode 100644
index d1507396d8fd..000000000000
--- a/sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit systemd toolchain-funcs udev
-
-DESCRIPTION="NVM-Express user space tooling for Linux"
-HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
-SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="test"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm64 ppc64 ~riscv x86"
-IUSE="hugepages +json systemd +uuid"
-
-RDEPEND="json? ( dev-libs/json-c:= )
-	hugepages? ( sys-libs/libhugetlbfs )
-	systemd? ( sys-apps/systemd:= )
-	uuid? ( sys-apps/util-linux:= )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-musl-limits.patch
-	"${FILESDIR}"/${P}-bash-completions.patch # Gentoo bug #852764
-)
-
-src_prepare() {
-	default
-
-	sed -e 's|^LIBUUID =|LIBUUID ?=|' \
-		-e 's|^LIBJSONC =|LIBJSONC ?=|' \
-		-e 's|^LIBHUGETLBFS =|LIBHUGETLBFS ?=|' \
-		-e 's|^HAVE_SYSTEMD =|HAVE_SYSTEMD ?=|' \
-		-e '/DESTDIROLD/d' \
-		-i Makefile || die
-}
-
-src_configure() {
-	tc-export CC
-
-	export PREFIX="${EPREFIX}/usr"
-
-	local unitdir="$(systemd_get_systemunitdir)"
-	export SYSTEMDDIR="${unitdir%/system}"
-	export UDEVDIR="${EPREFIX}$(get_udevdir)"
-
-	MAKEOPTS+=" LIBUUID=$(usex uuid 0 1)"
-	MAKEOPTS+=" LIBJSONC=$(usex json 0 1)"
-	MAKEOPTS+=" LIBHUGETLBFS=$(usex hugepages 0 1)"
-	MAKEOPTS+=" HAVE_SYSTEMD=$(usex systemd 0 1)"
-	MAKEOPTS+="  V=1"
-}

diff --git a/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild
deleted file mode 100644
index 3bce0f7121ce..000000000000
--- a/sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson systemd udev
-
-DESCRIPTION="NVM-Express user space tooling for Linux"
-HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
-SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="test"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
-IUSE="hugepages +json +uuid"
-
-RDEPEND="
-	sys-libs/libnvme:=[json=,uuid=]
-	hugepages? ( sys-libs/libhugetlbfs:= )
-	json? ( dev-libs/json-c:= )
-	uuid? ( sys-apps/util-linux:= )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-bash-completions.patch # Gentoo bug #852764
-)
-
-src_configure() {
-	local unitdir="$(systemd_get_systemunitdir)"
-	local emesonargs=(
-		-Dsystemddir=${unitdir%/system}
-		-Dudevrulesdir="${EPREFIX}"$(get_udevdir)
-	)
-	meson_src_configure
-}

diff --git a/sys-apps/nvme-cli/nvme-cli-2.1.2.ebuild b/sys-apps/nvme-cli/nvme-cli-2.1.2.ebuild
deleted file mode 100644
index ef7cb9b54e90..000000000000
--- a/sys-apps/nvme-cli/nvme-cli-2.1.2.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson systemd udev
-
-DESCRIPTION="NVM-Express user space tooling for Linux"
-HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
-SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="test"
-
-LICENSE="GPL-2 GPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
-IUSE="hugepages +json +uuid"
-
-RDEPEND="
-	>=sys-libs/libnvme-1.1:=[json=,uuid=]
-	hugepages? ( sys-libs/libhugetlbfs:= )
-	json? ( dev-libs/json-c:= )
-	uuid? ( sys-apps/util-linux:= )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-src_configure() {
-	local unitdir="$(systemd_get_systemunitdir)"
-	local emesonargs=(
-		-Dsystemddir="${unitdir%/system}"
-		-Dudevrulesdir="${EPREFIX}$(get_udevdir)"
-	)
-	meson_src_configure
-}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2023-01-31 23:06 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2023-01-31 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     1b42c42ef2e65c53dca291a3ca0619690adb5d78
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 23:05:47 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 23:06:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b42c42e

sys-apps/nvme-cli: Add 2.3, update libnvme json USE dep

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/nvme-cli/Manifest                         |  1 +
 .../nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch  | 25 ++++++++++++++++++++++
 sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild            |  4 ++--
 .../{nvme-cli-2.2.1.ebuild => nvme-cli-2.3.ebuild} | 12 ++++++-----
 4 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
index edd4c759e100..f7b97d36e74c 100644
--- a/sys-apps/nvme-cli/Manifest
+++ b/sys-apps/nvme-cli/Manifest
@@ -1 +1,2 @@
 DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26
+DIST nvme-cli-2.3.gh.tar.gz 733161 BLAKE2B b6da650379f24e0dc5c41af3d09fe15076ed70ad39cf48060fd949e3a4bbfe896eef4dd42e27314fab695710c9cb04985f3444e0384b71794cfbf489aa3e6244 SHA512 9ef654e782ba737d3858fb11f24caf27aea820480179d07d32599731be204e52693062cdb86786ab5cdd1d94fe32ae9028baa0a58693d2eaee5a2b71155e3db2

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch b/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch
new file mode 100644
index 000000000000..e8bba22a92bb
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch
@@ -0,0 +1,25 @@
+diff --git a/meson.build b/meson.build
+index c05dc47f..4ae7c513 100644
+--- a/meson.build
++++ b/meson.build
+@@ -64,9 +64,9 @@ libz_dep = dependency('zlib', required: true,
+                       fallback : ['zlib', 'zlib_dep'])
+ 
+ # Check for libhugetlbfs availability (optional)
+-if cc.has_header('hugetlbfs.h')
++if get_option('hugepages') and cc.has_header('hugetlbfs.h')
+   libhugetlbfs_dep = cc.find_library('hugetlbfs',
+-                                     required : false)
++                                     required : true)
+   have_libhugetlbfs = libhugetlbfs_dep.found()
+ else
+   libhugetlbfs_dep = []
+diff --git a/meson_options.txt b/meson_options.txt
+index 04843ea5..bb10b6c0 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -9,3 +9,4 @@ option('nvme-tests', type : 'boolean', value : false, description: 'Run tests ag
+ option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation')
+ option('docs-build', type : 'boolean', value : false, description : 'build documentation')
+ option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior')
++option('hugepages', type: 'boolean', value : false, description : 'Enable support for hugetlbfs')

diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild
index e048b5dc9043..2c1223bc049e 100644
--- a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -15,7 +15,7 @@ KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86"
 IUSE="hugepages +json"
 
 RDEPEND="
-	>=sys-libs/libnvme-1.2:=[json=]
+	>=sys-libs/libnvme-1.2:=[json(+)=]
 	hugepages? ( sys-libs/libhugetlbfs:= )
 	json? ( dev-libs/json-c:= )
 	sys-libs/zlib:=

diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild
similarity index 77%
copy from sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild
copy to sys-apps/nvme-cli/nvme-cli-2.3.ebuild
index e048b5dc9043..fd549dd99719 100644
--- a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,13 +11,13 @@ SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh
 
 LICENSE="GPL-2 GPL-2+"
 SLOT="0"
-KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86"
-IUSE="hugepages +json"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="hugepages"
 
 RDEPEND="
-	>=sys-libs/libnvme-1.2:=[json=]
+	>=sys-libs/libnvme-1.3:=
 	hugepages? ( sys-libs/libhugetlbfs:= )
-	json? ( dev-libs/json-c:= )
+	dev-libs/json-c:=
 	sys-libs/zlib:=
 "
 
@@ -30,6 +30,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/nvme-cli-2.2-docdir.patch"
+	"${FILESDIR}/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch"
 )
 
 src_configure() {
@@ -39,6 +40,7 @@ src_configure() {
 		-Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html"
 		-Dsystemddir="${unitdir%/system}"
 		-Dudevrulesdir="${EPREFIX}$(get_udevdir)"
+		$(meson_use hugepages)
 	)
 	meson_src_configure
 }


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2023-03-31 19:13 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2023-03-31 19:13 UTC (permalink / raw
  To: gentoo-commits

commit:     70e20951a2b238b4cb6be14671dba5c021459242
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 31 19:12:48 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Mar 31 19:13:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70e20951

sys-apps/nvme-cli: add 2.4

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/nvme-cli/Manifest                         |  1 +
 .../nvme-cli-2.4-no-hugetlbfs-automatic-dep.patch  | 25 +++++++++++
 sys-apps/nvme-cli/nvme-cli-2.4.ebuild              | 52 ++++++++++++++++++++++
 3 files changed, 78 insertions(+)

diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
index f7b97d36e74c..75d7799d2845 100644
--- a/sys-apps/nvme-cli/Manifest
+++ b/sys-apps/nvme-cli/Manifest
@@ -1,2 +1,3 @@
 DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26
 DIST nvme-cli-2.3.gh.tar.gz 733161 BLAKE2B b6da650379f24e0dc5c41af3d09fe15076ed70ad39cf48060fd949e3a4bbfe896eef4dd42e27314fab695710c9cb04985f3444e0384b71794cfbf489aa3e6244 SHA512 9ef654e782ba737d3858fb11f24caf27aea820480179d07d32599731be204e52693062cdb86786ab5cdd1d94fe32ae9028baa0a58693d2eaee5a2b71155e3db2
+DIST nvme-cli-2.4.gh.tar.gz 746955 BLAKE2B 7ca26f957bf6927f7af17ac18267cb1099d63ce0f19b085a412b3a1b343946311edf8c5d5924444b7c7d440fbf42597ee7b9717bf9f5dcdeed0a9a17f135d343 SHA512 155667a0b91e15267e3f991a30cf1d4ae26cb4c53b20c002e3d3341496dd463397e1afbfefcd7a8df88370d28417940ce44a060bda87c04482bbe3be4e901b73

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.4-no-hugetlbfs-automatic-dep.patch b/sys-apps/nvme-cli/files/nvme-cli-2.4-no-hugetlbfs-automatic-dep.patch
new file mode 100644
index 000000000000..d39f95826aae
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.4-no-hugetlbfs-automatic-dep.patch
@@ -0,0 +1,25 @@
+diff --git a/meson.build b/meson.build
+index 24fa16e2..fc3ef0d7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -66,9 +66,9 @@ endif
+ conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c available?')
+ 
+ # Check for libhugetlbfs availability (optional)
+-if cc.has_header('hugetlbfs.h')
++if get_option('hugepages') and cc.has_header('hugetlbfs.h')
+   libhugetlbfs_dep = cc.find_library('hugetlbfs',
+-                                     required : false)
++                                     required : true)
+   have_libhugetlbfs = libhugetlbfs_dep.found()
+ else
+   libhugetlbfs_dep = []
+diff --git a/meson_options.txt b/meson_options.txt
+index 677942ae..752ecd40 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -10,3 +10,4 @@ option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], descri
+ option('docs-build', type : 'boolean', value : false, description : 'build documentation')
+ option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior')
+ option('json-c', type: 'feature', value: 'auto', description: 'JSON suppport')
++option('hugepages', type: 'boolean', value : false, description : 'Enable support for hugetlbfs')

diff --git a/sys-apps/nvme-cli/nvme-cli-2.4.ebuild b/sys-apps/nvme-cli/nvme-cli-2.4.ebuild
new file mode 100644
index 000000000000..d76bb8ffda6f
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-2.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson systemd udev
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="hugepages +json"
+
+RDEPEND="
+	=sys-libs/libnvme-1.4*:=
+	hugepages? ( sys-libs/libhugetlbfs:= )
+	json? ( dev-libs/json-c:= )
+	sys-libs/zlib:=
+"
+
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/nvme-cli-2.2-docdir.patch"
+	"${FILESDIR}/nvme-cli-2.4-no-hugetlbfs-automatic-dep.patch"
+)
+
+src_configure() {
+	local unitdir="$(systemd_get_systemunitdir)"
+	local emesonargs=(
+		-Dversion-tag="${PV}"
+		-Ddocs=all
+		-Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html"
+		-Dsystemddir="${unitdir%/system}"
+		-Dudevrulesdir="${EPREFIX}$(get_udevdir)"
+		$(meson_use hugepages)
+		$(meson_feature json json-c)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2023-06-30 23:14 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2023-06-30 23:14 UTC (permalink / raw
  To: gentoo-commits

commit:     074dc80f8dbe853ae712c451f853bb67821ba370
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 30 23:14:09 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Jun 30 23:14:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=074dc80f

sys-apps/nvme-cli: add 2.5

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/nvme-cli/Manifest                         |  1 +
 .../nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch  | 30 +++++++++++
 sys-apps/nvme-cli/nvme-cli-2.5.ebuild              | 58 ++++++++++++++++++++++
 3 files changed, 89 insertions(+)

diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
index 75d7799d2845..ed290b253121 100644
--- a/sys-apps/nvme-cli/Manifest
+++ b/sys-apps/nvme-cli/Manifest
@@ -1,3 +1,4 @@
 DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26
 DIST nvme-cli-2.3.gh.tar.gz 733161 BLAKE2B b6da650379f24e0dc5c41af3d09fe15076ed70ad39cf48060fd949e3a4bbfe896eef4dd42e27314fab695710c9cb04985f3444e0384b71794cfbf489aa3e6244 SHA512 9ef654e782ba737d3858fb11f24caf27aea820480179d07d32599731be204e52693062cdb86786ab5cdd1d94fe32ae9028baa0a58693d2eaee5a2b71155e3db2
 DIST nvme-cli-2.4.gh.tar.gz 746955 BLAKE2B 7ca26f957bf6927f7af17ac18267cb1099d63ce0f19b085a412b3a1b343946311edf8c5d5924444b7c7d440fbf42597ee7b9717bf9f5dcdeed0a9a17f135d343 SHA512 155667a0b91e15267e3f991a30cf1d4ae26cb4c53b20c002e3d3341496dd463397e1afbfefcd7a8df88370d28417940ce44a060bda87c04482bbe3be4e901b73
+DIST nvme-cli-2.5.gh.tar.gz 794528 BLAKE2B 4e569c612d98a369d9ef720b74fbd50e6bd0b425725593bac2c06966d693cb0c86e034d571d24b17c12bce39467973280d440c1fb5cc3dccdb6c0d112507feab SHA512 50c557e86e95b27a0ad57779c33bbb847e12dd45c30e792f5ce1d52dedd4bc704ac25fa0af2fdebd281c9dfe0059f7ed7c1620fccfde9323f6f9a97afdf8c3cb

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch b/sys-apps/nvme-cli/files/nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch
new file mode 100644
index 000000000000..df32c2c13332
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch
@@ -0,0 +1,30 @@
+diff --git a/meson.build b/meson.build
+index af79bd4d..90c4d6ad 100644
+--- a/meson.build
++++ b/meson.build
+@@ -69,9 +69,9 @@ endif
+ conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c available?')
+ 
+ # Check for libhugetlbfs availability (optional)
+-if cc.has_header('hugetlbfs.h')
++if get_option('hugepages') and cc.has_header('hugetlbfs.h')
+   libhugetlbfs_dep = cc.find_library('hugetlbfs',
+-                                     required : false)
++                                     required : true)
+ else
+   libhugetlbfs_dep = dependency('', required: false)
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index c61dae0f..a05a7e0f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -70,3 +70,9 @@ option(
+   type : 'string',
+   description : 'override the git version string'
+ )
++option(
++  'hugepages',
++  type: 'boolean',
++  value : false,
++  description : 'Enable support for hugetlbfs'
++)

diff --git a/sys-apps/nvme-cli/nvme-cli-2.5.ebuild b/sys-apps/nvme-cli/nvme-cli-2.5.ebuild
new file mode 100644
index 000000000000..96f6ab025153
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-2.5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson systemd udev
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="hugepages +json"
+
+RDEPEND="
+	=sys-libs/libnvme-1.5*:=[json?]
+	hugepages? ( sys-libs/libhugetlbfs:= )
+	json? ( dev-libs/json-c:= )
+	sys-libs/zlib:=
+"
+
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch"
+)
+
+src_configure() {
+	local emesonargs=(
+		-Dversion-tag="${PV}"
+		-Ddocs=all
+		-Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		-Dsystemddir="$(systemd_get_systemunitdir)"
+		-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
+		$(meson_use hugepages)
+		$(meson_feature json json-c)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+}
+
+pkg_postinst() {
+	udev_reload
+}
+
+pkg_postrm() {
+	udev_reload
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/
@ 2024-06-12  2:01 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-06-12  2:01 UTC (permalink / raw
  To: gentoo-commits

commit:     f613fb6ac78a86b44272cbd40a791c714a98d7bb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 02:00:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 02:00:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f613fb6a

sys-apps/nvme-cli: fix musl build

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

 sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch | 28 +++++++++++++++++++++++
 sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild           |  1 +
 2 files changed, 29 insertions(+)

diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch b/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch
new file mode 100644
index 000000000000..de7b488cc25d
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/934081
+https://github.com/linux-nvme/nvme-cli/commit/650070ad5d4a97fc87f9018743e3b566deba36c8
+
+From 650070ad5d4a97fc87f9018743e3b566deba36c8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 21 May 2024 14:09:32 -0700
+Subject: [PATCH] plugins/ssstc: Replace __uint16_t with uint16_t
+
+uint16_t is ISO defined and comes from stdint.h, makes it
+portable across glibc and musl on linux.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/plugins/ssstc/ssstc-nvme.c
++++ b/plugins/ssstc/ssstc-nvme.c
+@@ -64,9 +64,9 @@ void show_ssstc_add_smart_log_jsn(struct nvme_additional_smart_log *smart,
+ 		unsigned int nsid, const char *devname)
+ {
+ 	struct json_object *root, *entry_stats, *dev_stats, *multi;
+-	__uint16_t wear_level_min = 0;
+-	__uint16_t wear_level_max = 0;
+-	__uint16_t wear_level_avg = 0;
++	uint16_t wear_level_min = 0;
++	uint16_t wear_level_max = 0;
++	uint16_t wear_level_avg = 0;
+ 	uint64_t raw_val = 0;
+ 
+ 	root = json_create_object();
+

diff --git a/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild
index ead3edbdb1f6..991abb4ea462 100644
--- a/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild
@@ -29,6 +29,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.9.1-musl-stdint.patch
+	"${FILESDIR}"/${PN}-2.9.1-musl.patch
 )
 
 src_configure() {


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

end of thread, other threads:[~2024-06-12  2:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12  2:01 [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-06-30 23:14 Patrick McLean
2023-03-31 19:13 Patrick McLean
2023-01-31 23:06 Patrick McLean
2022-12-26  8:35 Sam James
2022-10-31 17:50 Patrick McLean
2022-06-18 17:36 Zac Medico
2021-12-20 23:53 Sam James

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