From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 609CB158091 for ; Sat, 18 Jun 2022 17:36:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87BCDE0A99; Sat, 18 Jun 2022 17:36:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 63EB6E0A99 for ; Sat, 18 Jun 2022 17:36:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 808083418ED for ; Sat, 18 Jun 2022 17:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D58054FA for ; Sat, 18 Jun 2022 17:36:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1655573760.a03fa9d85ce7ce11c162b3d42e3d150119c0b452.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/nvme-cli/files/, sys-apps/nvme-cli/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild X-VCS-Directories: sys-apps/nvme-cli/files/ sys-apps/nvme-cli/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a03fa9d85ce7ce11c162b3d42e3d150119c0b452 X-VCS-Branch: master Date: Sat, 18 Jun 2022 17:36:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 42385a1a-013c-4ecd-95c9-71559bb64838 X-Archives-Hash: 5d41e10b8f2145aef44c5e9e3558159e commit: a03fa9d85ce7ce11c162b3d42e3d150119c0b452 Author: Karlson2k (Evgeny Grin) narod ru> AuthorDate: Fri Jun 17 11:21:37 2022 +0000 Commit: Zac Medico gentoo 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) narod.ru> Signed-off-by: Zac Medico 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) + +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) + +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 +}