[PATCH v5 1/2] workflows, scripts: harmonize and cleanup

Manuel Ebner posted 2 patches 1 week, 1 day ago
[PATCH v5 1/2] workflows, scripts: harmonize and cleanup
Posted by Manuel Ebner 1 week, 1 day ago
cleanup and harmonize output of scripts/ver_linux and table in changes.rst

ver_linux:
fix path to changes.rst
Add missing tools in ver_linux
 bash, bc, bindgen, btrfs-progs, Clang, gdb,  GNU awk, GNU tar,
 GRUB, GRUB2, gtags, iptables, kmod, mcelog, mkimage, openssl,
 pahole, Python, Rust, Sphinx, squashfs-tools

changes.rst:
add reference to ./scripts/ver_linux
needn't -> do not need to
add gdb version 7.2 as mentioned in:
 Documentation/process/debugging/gdb-kernel-debugging.rst
 scripts/gdb/vmlinux-gdb.py

Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
 Documentation/process/changes.rst | 14 +++++----
 scripts/ver_linux                 | 49 ++++++++++++++++++++++---------
 2 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index 6b373e193548..d94503341254 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -19,12 +19,13 @@ Current Minimal Requirements
 
 Upgrade to at **least** these software revisions before thinking you've
 encountered a bug!  If you're unsure what version you're currently
-running, the suggested command should tell you.
+running, the suggested command should tell you. For a list of the programs
+on your system including their version execute ./scripts/ver_linux
 
 Again, keep in mind that this list assumes you are already functionally
 running a Linux kernel.  Also, not all tools are necessary on all
 systems; obviously, if you don't have any PC Card hardware, for example,
-you probably needn't concern yourself with pcmciautils.
+you probably do not need to concern yourself with pcmciautils.
 
 ====================== ===============  ========================================
         Program        Minimal version       Command to check the version
@@ -40,7 +41,7 @@ flex                   2.5.35           flex --version
 bison                  2.0              bison --version
 pahole                 1.22             pahole --version
 util-linux             2.10o            mount --version
-kmod                   13               depmod -V
+kmod                   13               kmod -V
 e2fsprogs              1.41.4           e2fsck -V
 jfsutils               1.1.3            fsck.jfs -V
 xfsprogs               2.6.0            xfs_db -V
@@ -51,8 +52,8 @@ quota-tools            3.09             quota -V
 PPP                    2.4.0            pppd --version
 nfs-utils              1.0.5            showmount --version
 procps                 3.2.0            ps --version
-udev                   081              udevd --version
-grub                   0.93             grub --version || grub-install --version
+udev                   081              udevadm --version
+GRUB                   0.93             grub --version || grub-install --version
 mcelog                 0.6              mcelog --version
 iptables               1.4.2            iptables -V
 openssl & libcrypto    1.0.0            openssl version
@@ -62,7 +63,8 @@ GNU tar                1.28             tar --version
 gtags (optional)       6.6.5            gtags --version
 mkimage (optional)     2017.01          mkimage --version
 Python                 3.9.x            python3 --version
-GNU AWK (optional)     5.1.0            gawk --version
+GNU awk (optional)     5.1.0            gawk --version
+gdb                    7.2              gdb --version
 ====================== ===============  ========================================
 
 .. [#f1] Sphinx is needed only to build the Kernel documentation
diff --git a/scripts/ver_linux b/scripts/ver_linux
index d6f2362d3792..fab0c68a6c52 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -7,7 +7,7 @@
 
 BEGIN {
 	usage = "If some fields are empty or look unusual you may have an old version.\n"
-	usage = usage "Compare to the current minimal requirements in Documentation/Changes.\n"
+	usage = usage "Compare to the current minimal requirements in Documentation/process/changes.rst\n"
 	print usage
 
 	system("uname -a")
@@ -18,22 +18,22 @@ BEGIN {
 	libcpp = "(libg|stdc)[+]+[.]so([.][0-9]+)+$"
 
 	printversion("GNU C", version("gcc -dumpversion"))
-	printversion("GNU Make", version("make --version"))
-	printversion("Binutils", version("ld -v"))
-	printversion("Util-linux", version("mount --version"))
+	printversion("GNU make", version("make --version"))
+	printversion("binutils", version("ld -v"))
+	printversion("util-linux", version("mount --version"))
 	printversion("Mount", version("mount --version"))
 	printversion("Module-init-tools", version("depmod -V"))
-	printversion("E2fsprogs", version("tune2fs"))
-	printversion("Jfsutils", version("fsck.jfs -V"))
-	printversion("Xfsprogs", version("xfs_db -V"))
-	printversion("Pcmciautils", version("pccardctl -V"))
+	printversion("e2fsprogs", version("e2fsck -V"))
+	printversion("jfsutils", version("fsck.jfs -V"))
+	printversion("xfsprogs", version("xfs_db -V"))
+	printversion("pcmciautils", version("pccardctl -V"))
 	printversion("Pcmcia-cs", version("cardmgr -V"))
-	printversion("Quota-tools", version("quota -V"))
+	printversion("quota-tools", version("quota -V"))
 	printversion("PPP", version("pppd --version"))
 	printversion("Isdn4k-utils", version("isdnctrl"))
-	printversion("Nfs-utils", version("showmount --version"))
-	printversion("Bison", version("bison --version"))
-	printversion("Flex", version("flex --version"))
+	printversion("nfs-utils", version("showmount --version"))
+	printversion("bison", version("bison --version"))
+	printversion("flex", version("flex --version"))
 
 	while ("ldconfig -p 2>/dev/null" | getline > 0)
 		if ($NF ~ libc || $NF ~ libcpp)
@@ -41,13 +41,34 @@ BEGIN {
 				printversion("Linux C" ($NF ~ libcpp? "++" : "") " Library", ver)
 
 	printversion("Dynamic linker (ldd)", version("ldd --version"))
-	printversion("Procps", version("ps --version"))
+	printversion("procps", version("ps --version"))
 	printversion("Net-tools", version("ifconfig --version"))
 	printversion("Kbd", version("loadkeys -V"))
 	printversion("Console-tools", version("loadkeys -V"))
 	printversion("Sh-utils", version("expr --v"))
-	printversion("Udev", version("udevadm --version"))
+	printversion("udev", version("udevadm --version"))
 	printversion("Wireless-tools", version("iwconfig --version"))
+	printversion("bash", version("bash --version"))
+	printversion("bc", version("bc --version"))
+	printversion("bindgen", version("bindgen --version"))
+	printversion("btrfs-progs", version("btrfs --version"))
+	printversion("Clang", version("clang --version"))
+	printversion("gdb", version("gdb -version"))
+	printversion("GNU awk", version("gawk --version"))
+	printversion("GNU tar", version("tar --version"))
+	printversion("GRUB", version("grub-install --version"))
+	printversion("GRUB2", version("grub2-install --version"))
+	printversion("gtags", version("gtags --version"))
+	printversion("iptables", version("iptables -V"))
+	printversion("kmod", version("kmod -V"))
+	printversion("mcelog", version("mcelog --version"))
+	printversion("mkimage", version("mkimage --version"))
+	printversion("openssl", version("openssl version"))
+	printversion("pahole", version("pahole --version"))
+	printversion("Python", version("python3 -V"))
+	printversion("Rust", version("rustc --version"))
+	printversion("Sphinx", version("sphinx-build --version"))
+	printversion("squashfs-tools", version("mksquashfs -version"))
 
 	while ("sort /proc/modules" | getline > 0) {
 		mods = mods sep $1
-- 
2.53.0
Re: [PATCH v5 1/2] workflows, scripts: harmonize and cleanup
Posted by Jonathan Corbet 3 days, 7 hours ago
Manuel Ebner <manuelebner@mailbox.org> writes:

> cleanup and harmonize output of scripts/ver_linux and table in changes.rst
>
> ver_linux:
> fix path to changes.rst
> Add missing tools in ver_linux
>  bash, bc, bindgen, btrfs-progs, Clang, gdb,  GNU awk, GNU tar,
>  GRUB, GRUB2, gtags, iptables, kmod, mcelog, mkimage, openssl,
>  pahole, Python, Rust, Sphinx, squashfs-tools
>
> changes.rst:
> add reference to ./scripts/ver_linux
> needn't -> do not need to
> add gdb version 7.2 as mentioned in:
>  Documentation/process/debugging/gdb-kernel-debugging.rst
>  scripts/gdb/vmlinux-gdb.py
>
> Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>

Applied, but the changelog now reads:

docs: changes/ver_linux: fix entries and add several tools

Some of the entries in both Documentation/process/changes.rst and
script/ver_linux were obsolete; update them to reflect the current way of
getting version information.

Many were missing altogether; add the relevant information for:

 bash, bc, bindgen, btrfs-progs, Clang, gdb,  GNU awk, GNU tar,
 GRUB, GRUB2, gtags, iptables, kmod, mcelog, mkimage, openssl,
 pahole, Python, Rust, Sphinx, squashfs-tools

Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
[jc: rewrote changelog]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

jon