From c7213bd643dd4ae5089a19ce98d93efc7dde7077 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 18 Sep 2024 17:09:55 +0100 Subject: [PATCH 1/4] refactor(insmod): deprecate in favor of upstream one in >= 34 Issue: https://github.com/scop/bash-completion/issues/1246 Signed-off-by: Emil Velikov --- completions/.gitignore | 2 +- completions/Makefile.am | 8 ++++---- completions/{insmod => _insmod} | 3 +++ test/fallback/completions/Makefile.am | 1 + test/fallback/completions/insmod | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) rename completions/{insmod => _insmod} (84%) create mode 120000 test/fallback/completions/insmod diff --git a/completions/.gitignore b/completions/.gitignore index a382becd7f4..4f97312971a 100644 --- a/completions/.gitignore +++ b/completions/.gitignore @@ -139,7 +139,7 @@ /_incus /_infracost /inotifywatch -/insmod.static +/_insmod.static /iperf3 /_istioctl /javac diff --git a/completions/Makefile.am b/completions/Makefile.am index 5eb7a18b543..5e0d1a713c0 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -181,7 +181,7 @@ bashcomp_DATA = 2to3 \ info \ inject \ inotifywait \ - insmod \ + _insmod \ installpkg \ interdiff \ invoke-rc.d \ @@ -688,7 +688,7 @@ CLEANFILES = \ _incus \ _infracost \ inotifywatch \ - insmod.static \ + _insmod.static \ iperf3 \ _istioctl \ javac \ @@ -1108,8 +1108,8 @@ symlinks: $(DATA) pinfo $(ss) inotifywait \ inotifywatch - $(ss) insmod \ - insmod.static + $(ss) _insmod \ + _insmod.static $(ss) iperf \ iperf3 $(ss) java \ diff --git a/completions/insmod b/completions/_insmod similarity index 84% rename from completions/insmod rename to completions/_insmod index 2c02f3f67d4..4198ccf7b99 100644 --- a/completions/insmod +++ b/completions/_insmod @@ -1,5 +1,8 @@ # Linux insmod(8) completion -*- shell-script -*- +# Use of this file is deprecated. +# Upstream completion is available in kmod >= 34, use that instead. + _comp_cmd_insmod() { local cur prev words cword comp_args diff --git a/test/fallback/completions/Makefile.am b/test/fallback/completions/Makefile.am index c8057f0f5e0..b0ca0aeccd0 100644 --- a/test/fallback/completions/Makefile.am +++ b/test/fallback/completions/Makefile.am @@ -13,6 +13,7 @@ EXTRA_DIST = \ gsctl \ hexdump \ hwclock \ + insmod \ ionice \ jungle \ keyring \ diff --git a/test/fallback/completions/insmod b/test/fallback/completions/insmod new file mode 120000 index 00000000000..a8a107c914f --- /dev/null +++ b/test/fallback/completions/insmod @@ -0,0 +1 @@ +../../../completions/_insmod \ No newline at end of file From 7679bbfbe167144a44c20a341dbd032b4a93ddbd Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 18 Sep 2024 17:09:55 +0100 Subject: [PATCH 2/4] refactor(rmmod): deprecate in favor of upstream one in >= 34 Issue: https://github.com/scop/bash-completion/issues/1246 Signed-off-by: Emil Velikov --- completions/Makefile.am | 2 +- completions/{rmmod => _rmmod} | 3 +++ test/fallback/completions/Makefile.am | 1 + test/fallback/completions/rmmmod | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) rename completions/{rmmod => _rmmod} (83%) create mode 120000 test/fallback/completions/rmmmod diff --git a/completions/Makefile.am b/completions/Makefile.am index 5e0d1a713c0..c6178b5989d 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -376,7 +376,7 @@ bashcomp_DATA = 2to3 \ _rg \ ri \ rmlist \ - rmmod \ + _rmmod \ route \ rpcdebug \ rpm \ diff --git a/completions/rmmod b/completions/_rmmod similarity index 83% rename from completions/rmmod rename to completions/_rmmod index a57a206c973..6f33a7bfe7a 100644 --- a/completions/rmmod +++ b/completions/_rmmod @@ -1,6 +1,9 @@ # Linux rmmod(8) completion. -*- shell-script -*- # This completes on a list of all currently installed kernel modules. +# Use of this file is deprecated. +# Upstream completion is available in kmod >= 34, use that instead. + _comp_cmd_rmmod() { local cur prev words cword comp_args diff --git a/test/fallback/completions/Makefile.am b/test/fallback/completions/Makefile.am index b0ca0aeccd0..507bf6fce8b 100644 --- a/test/fallback/completions/Makefile.am +++ b/test/fallback/completions/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST = \ renice \ repomanage \ reptyr \ + rmmod \ rfkill \ rtcwake \ ruff \ diff --git a/test/fallback/completions/rmmmod b/test/fallback/completions/rmmmod new file mode 120000 index 00000000000..57f58328f5a --- /dev/null +++ b/test/fallback/completions/rmmmod @@ -0,0 +1 @@ +../../../completions/_rmmod \ No newline at end of file From 61a01e90610b447a08ffcbbd84300026f0a62245 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 18 Sep 2024 17:09:55 +0100 Subject: [PATCH 3/4] refactor(modinfo): deprecate in favor of upstream one in >= 35 There isn't an equivalent merged upstream, yet, so use "expected to" wording. Issue: https://github.com/scop/bash-completion/issues/1246 Signed-off-by: Emil Velikov --- completions/Makefile.am | 2 +- completions/{modinfo => _modinfo} | 3 +++ test/fallback/completions/Makefile.am | 1 + test/fallback/completions/modinfo | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) rename completions/{modinfo => _modinfo} (92%) create mode 120000 test/fallback/completions/modinfo diff --git a/completions/Makefile.am b/completions/Makefile.am index c6178b5989d..46201fae611 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -268,7 +268,7 @@ bashcomp_DATA = 2to3 \ mktemp \ mmsitepass \ _mock \ - modinfo \ + _modinfo \ modprobe \ _modules \ monodevelop \ diff --git a/completions/modinfo b/completions/_modinfo similarity index 92% rename from completions/modinfo rename to completions/_modinfo index 5c8d416b321..cda24015da3 100644 --- a/completions/modinfo +++ b/completions/_modinfo @@ -1,5 +1,8 @@ # Linux modinfo(8) completion -*- shell-script -*- +# Use of this file is deprecated. +# Upstream completion is expected to be available in kmod >= 35, use that instead. + _comp_cmd_modinfo() { local cur prev words cword was_split comp_args diff --git a/test/fallback/completions/Makefile.am b/test/fallback/completions/Makefile.am index 507bf6fce8b..6aec5221705 100644 --- a/test/fallback/completions/Makefile.am +++ b/test/fallback/completions/Makefile.am @@ -21,6 +21,7 @@ EXTRA_DIST = \ look \ mdbook \ mock \ + modinfo \ modules \ mount \ mount.linux \ diff --git a/test/fallback/completions/modinfo b/test/fallback/completions/modinfo new file mode 120000 index 00000000000..edb41dae2bf --- /dev/null +++ b/test/fallback/completions/modinfo @@ -0,0 +1 @@ +../../../completions/_modinfo \ No newline at end of file From 66a52b0e9bc1441f0758927da1a938d1d05857b6 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 18 Sep 2024 17:09:55 +0100 Subject: [PATCH 4/4] refactor(modprobe): deprecate in favor of upstream one in >= 35 There isn't an equivalent merged upstream, yet, so use "expected to" wording. Issue: https://github.com/scop/bash-completion/issues/1246 Signed-off-by: Emil Velikov --- completions/Makefile.am | 2 +- completions/{modprobe => _modprobe} | 3 +++ test/fallback/completions/Makefile.am | 1 + test/fallback/completions/modprobe | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) rename completions/{modprobe => _modprobe} (97%) create mode 120000 test/fallback/completions/modprobe diff --git a/completions/Makefile.am b/completions/Makefile.am index 46201fae611..4cbb0567026 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -269,7 +269,7 @@ bashcomp_DATA = 2to3 \ mmsitepass \ _mock \ _modinfo \ - modprobe \ + _modprobe \ _modules \ monodevelop \ _mount \ diff --git a/completions/modprobe b/completions/_modprobe similarity index 97% rename from completions/modprobe rename to completions/_modprobe index 242a2823c7e..0501624afc8 100644 --- a/completions/modprobe +++ b/completions/_modprobe @@ -1,5 +1,8 @@ # Linux modprobe(8) completion -*- shell-script -*- +# Use of this file is deprecated. +# Upstream completion is expected to be available in kmod >= 35, use that instead. + _comp_cmd_modprobe() { local cur prev words cword was_split comp_args diff --git a/test/fallback/completions/Makefile.am b/test/fallback/completions/Makefile.am index 6aec5221705..60bbaf2ced9 100644 --- a/test/fallback/completions/Makefile.am +++ b/test/fallback/completions/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ mock \ modinfo \ modules \ + modprobe \ mount \ mount.linux \ newgrp \ diff --git a/test/fallback/completions/modprobe b/test/fallback/completions/modprobe new file mode 120000 index 00000000000..634041053de --- /dev/null +++ b/test/fallback/completions/modprobe @@ -0,0 +1 @@ +../../../completions/_modprobe \ No newline at end of file