diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-apps/nvme-cli/files | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-apps/nvme-cli/files')
-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 |
2 files changed, 133 insertions, 0 deletions
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="" + |