From 2255e8dfb9d70e7704f605071b0ae519eb86271a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 22 Aug 2023 08:00:53 +0700 Subject: [PATCH] bash-completion: kernel module supports zstd --- .../bash-completion/patches/linux-zstd.patch | 75 +++++++++++++++++++ srcpkgs/bash-completion/template | 2 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/bash-completion/patches/linux-zstd.patch diff --git a/srcpkgs/bash-completion/patches/linux-zstd.patch b/srcpkgs/bash-completion/patches/linux-zstd.patch new file mode 100644 index 00000000000..f230a1c0816 --- /dev/null +++ b/srcpkgs/bash-completion/patches/linux-zstd.patch @@ -0,0 +1,75 @@ +From 4298bc2760d00c83025680f11a3490403b91ba98 Mon Sep 17 00:00:00 2001 +From: Richard Schütz +Date: Tue, 28 Dec 2021 20:07:11 +0100 +Subject: [PATCH] feat(_modules): support zstd compressed modules + +--- + bash_completion | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bash_completion b/bash_completion +index 3d50b2ae..16523708 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -1417,7 +1417,8 @@ _modules() + local modpath + modpath=/lib/modules/$1 + COMPREPLY=($(compgen -W "$(command ls -RL $modpath 2>/dev/null | +- command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p')" -- "$cur")) ++ command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \ ++ -e 's/^\(.*\)\.ko\.zst$/\1/p')" -- "$cur")) + } + + # This function completes on installed modules +From b6a9ed50909224fa6b7887b604e86e4efce8289b Mon Sep 17 00:00:00 2001 +From: Michal Suchánek +Date: Fri, 1 Oct 2021 21:40:44 +0200 +Subject: [PATCH] feat(insmod,modinfo,modprobe): support zstd compressed + modules (#614) + +Signed-off-by: Michal Suchanek +--- + completions/insmod | 2 +- + completions/modinfo | 2 +- + completions/modprobe | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/completions/insmod b/completions/insmod +index a59e7535..2f756a99 100644 +--- a/completions/insmod ++++ b/completions/insmod +@@ -7,7 +7,7 @@ _insmod() + + # do filename completion for first argument + if ((cword == 1)); then +- _filedir '@(?(k)o?(.[gx]z))' ++ _filedir '@(?(k)o?(.[gx]z|.zst))' + else # do module parameter completion + COMPREPLY=($(compgen -W "$(PATH="$PATH:/sbin" modinfo \ + -p ${words[1]} 2>/dev/null | cut -d: -f1)" -- "$cur")) +diff --git a/completions/modinfo b/completions/modinfo +index b2809144..4d4d835c 100644 +--- a/completions/modinfo ++++ b/completions/modinfo +@@ -43,7 +43,7 @@ _modinfo() + + # do filename completion if we're giving a path to a module + if [[ $cur == @(*/|[.~])* ]]; then +- _filedir '@(?(k)o?(.[gx]z))' ++ _filedir '@(?(k)o?(.[gx]z|.zst))' + else + _modules $version + fi +diff --git a/completions/modprobe b/completions/modprobe +index 958cd938..799ea197 100644 +--- a/completions/modprobe ++++ b/completions/modprobe +@@ -80,7 +80,7 @@ _modprobe() + insert) + # do filename completion if we're giving a path to a module + if [[ $cur == @(*/|[.~])* ]]; then +- _filedir '@(?(k)o?(.[gx]z))' ++ _filedir '@(?(k)o?(.[gx]z|.zst))' + elif [[ -n $module ]]; then + # do module parameter completion + if [[ $cur == *=* ]]; then diff --git a/srcpkgs/bash-completion/template b/srcpkgs/bash-completion/template index 74d80d5f5dd..e28e0013886 100644 --- a/srcpkgs/bash-completion/template +++ b/srcpkgs/bash-completion/template @@ -1,7 +1,7 @@ # Template file for 'bash-completion' pkgname=bash-completion version=2.11 -revision=4 +revision=5 build_style=gnu-configure make_install_args="profiledir=/etc/bash/bashrc.d" depends="bash"