diff options
Diffstat (limited to 'sys-apps/nvme-cli')
-rw-r--r-- | sys-apps/nvme-cli/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/nvme-cli/files/nvme-cli-1.16-bash-completions.patch | 72 | ||||
-rw-r--r-- | sys-apps/nvme-cli/files/nvme-cli-2.0-bash-completions.patch | 61 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-1.16-r1.ebuild | 55 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-2.0-r1.ebuild | 38 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-2.0.ebuild | 2 |
6 files changed, 232 insertions, 2 deletions
diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest index 08c15fbd444f..1ccff9723ff2 100644 --- a/sys-apps/nvme-cli/Manifest +++ b/sys-apps/nvme-cli/Manifest @@ -1,6 +1,10 @@ +AUX nvme-cli-1.16-bash-completions.patch 2223 BLAKE2B 072ce4f65ab4177a1a2f4aece0103c00a596503b7a8100cbc545750d6f7b63c12f014101f2441e0bb58a0364b6215e9fdf02bebb5191ba2e26121e896f2c2d95 SHA512 ff18cded88a78fd07f6a11f06635699a76c0efa6cfce217f7d02581a8fd60e7e2c1b248efec45fd28a962b4cff6534404d466252659a9e77e609174d07b0c2e8 AUX nvme-cli-1.16-musl-limits.patch 1148 BLAKE2B ee1206a23ee11d6badaed70a98cd2ea405d3ad144def7d00e44a49b2f2579fc61efbaa3325856e426be097e52b02e4b18c4122ab74c1f20d58ced1c1748419c0 SHA512 e7c8c387446360eb2ed816006fe7d9a7f6a1b9c81dd6d3171f909ae760236243278a4b42be727b39381f95c9b50dce09f816400a280da929da8453b6c9851004 +AUX nvme-cli-2.0-bash-completions.patch 1803 BLAKE2B fd201e60a66b1fbc61f13c002465b002b60de94acf0c604af359064e2d4d2f3ed1c02d8f2f48b7af8812405a4990fe23b20fff39b28a69770d21174af5ff9741 SHA512 6baef0aff380fe8b0f0b21ba450e81703c6a3c88959c635d9425f010ffe0845d5b47c02e63df0b190899238dc911c108eda793f7823e4dba2a793782e2aa47d6 DIST nvme-cli-1.16.tar.gz 598246 BLAKE2B 8aef6ae82ec9a2c67de6c69addd72c87ade6554e6d374c717f8e3c0585565974a2b2870eb172b3ebdc1ae307bd3a55a14a17d3feea8d437265db136b434b519f SHA512 c713eb15b979ad17791cf95717b42d5f638cb4803d646bca1f4825e6bb50f086226b44b108b61571709b2cb615ae6ba86dbad309f675b240ebd3968d1cf536ff DIST nvme-cli-2.0.tar.gz 646320 BLAKE2B 81a8161091071be4e98d4feb78b3f3edaed07262212a8950c1882e3b46f38cd82d8cd8bfec62b3971feda6e82d297338e5541c8eda33c8b6f714d3b3ce000c25 SHA512 24a00ee8e0fc963c1757797413ff5725cec18f821a714d6bbbf37906010d72934d6fdd7b466c085f13716a5279d1a7bd3254ee474e37a0ecd00a85ef23e12417 +EBUILD nvme-cli-1.16-r1.ebuild 1394 BLAKE2B bd2e45a72c07efd6e48b5872f43353817550ac4e7c4c31efc9b1b6f4e5736ac4298b2505c9d55537ecf701933bb470368a44df0587fa0a59d51a562f56273148 SHA512 63d4ef1730a6cb1fee4a331a8df795637935fc00d994f09a1d9d060d18726081ea7a2098c33187a23c4b81cec0742967fcb7ae9e1b9a107579f09a4d6ac765aa EBUILD nvme-cli-1.16.ebuild 1330 BLAKE2B dca5bcee7da2e65799bed14ba6eec3484b19d025061f1068d343891f2e76aa2c000c017b03bc977be76f51d9b0d38180ba7e44e6d7ce27eeed338a2b1741ba07 SHA512 44c68fa403731bd0d8f54f361e6d7b84cbb7f9222f7070ef174354c29e0314fa1007f0c1caba48e30afb607e5a6c56f355eb2d02b80079f62a8c2defc073b55f -EBUILD nvme-cli-2.0.ebuild 830 BLAKE2B 28e4292e92d7863ea0a56936497cf55428c3fc83efa8a9bf7fa6223c09ab46ae917b56c0cf073ee3e655d766a481dd0e63d8244a65787bf53b4935e6d56df2d6 SHA512 87536e85ae720b018679ec0798d1cdd5edd6bad105d8e5a3098efd230dd4a038aee6e4e09edf751c389af6ac0cff0e5c099abe730888f16cea2627a0265ec9a0 +EBUILD nvme-cli-2.0-r1.ebuild 914 BLAKE2B f3eab8dd6ebbda164595f6db4862d189d38a307e4cb1980d253fad3819b8bfd29f667cf800d6ca59c92389855aaf2faf41800a0a305ec3dc906869520883a590 SHA512 f32c72f6498994ce0a9ac303e2d7de5ed29717bd6c3fe812887df9d6411550c3050efea116f1bba15fadd978525b3190d3dbdf43fed4f62052f5b6fcff9974e9 +EBUILD nvme-cli-2.0.ebuild 837 BLAKE2B b701df8a1a9c88145c6c3aeb7aa338dd1235cd03e70320425cfabb0208009b87987e9f8ce73bf0c99e116a44817db0c078b0d0691482d7273dc1b0c075c0be68 SHA512 e5d801a01776c6eef50b260836e4b0fcb4bf73f0df579bc678c92b23a2213dd80b4793e71d28c2e31ff6a63929609d165aea7a0bb07b8946c1610205deb948e6 MISC metadata.xml 594 BLAKE2B 52ac0579fd52797d0c9b2ec0528b134f67ef927987f9b99cf72d1010f13088af42d5eddb761b53939b196bc96ef4b8589b1bfc02242c95a56bf6a6a40afbad91 SHA512 d971b4fd68f8574b4e93377e9c4eef1f5901e81099ae97003ccfafbbd1657db92ce8a975cae38e6516cc4652b54259013c0c5e3ba53e80d717e42dab71440464 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 +} diff --git a/sys-apps/nvme-cli/nvme-cli-2.0.ebuild b/sys-apps/nvme-cli/nvme-cli-2.0.ebuild index cc8d7246bc18..2805c11288da 100644 --- a/sys-apps/nvme-cli/nvme-cli-2.0.ebuild +++ b/sys-apps/nvme-cli/nvme-cli-2.0.ebuild @@ -12,7 +12,7 @@ RESTRICT="test" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" IUSE="hugepages +json +uuid" RDEPEND=" |