Skip to contentSkip to conversation

ver_linux: add missing software to checklist

PATCH In review Shuah Khan 2 participants 2 messages Jan 31, 2023 – Feb 1, 2023

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH v3 1/1 ver_linux: add missing software to checklist

Update to add missing software checks to bring it in sync with the Documentation/Changes list. Make improvements to the output with separator between different sections.

---
Changes since v2: Fix extra line in usage

 scripts/ver_linux | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
scripts/ver_linux +24 -4
index 1a8ee4ff0e32..adef5dc67038 100755
@@ -6,20 +6,29 @@
 # differ on your system.
 
 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 = "\nMinimum required software versions to build and run current kernel version.\n"
+	usage = usage "If some fields are empty or look unusual you may have an old version.\n"
+	usage = usage "Compare with the current minimal requirements in Documentation/Changes."
 	print usage
 
+	separator = "\n===================================================\n"
+
+	print separator
 	system("uname -a")
-	printf("\n")
 
 	vernum = "[0-9]+([.]?[0-9]+)+"
 	libc = "libc[.]so[.][0-9]+$"
 	libcpp = "(libg|stdc)[+]+[.]so([.][0-9]+)+$"
 
+	print separator
 	printversion("GNU C", version("gcc -dumpversion"))
+	printversion("Clang/LLVM (optional)", version("clang --version"))
+	printversion("Rust (optional)", version("rustc --version"))
+	printversion("bindgen (optional)", version("bindgen --version"))
 	printversion("GNU Make", version("make --version"))
+	printversion("bash", version("bash --version"))
 	printversion("Binutils", version("ld -v"))
+	printversion("pahole", version("pahole --version"))
 	printversion("Util-linux", version("mount --version"))
 	printversion("Mount", version("mount --version"))
 	printversion("Module-init-tools", version("depmod -V"))
@@ -28,6 +37,8 @@ BEGIN {
 	printversion("Reiserfsprogs", version("reiserfsck -V"))
 	printversion("Reiser4fsprogs", version("fsck.reiser4 -V"))
 	printversion("Xfsprogs", version("xfs_db -V"))
+	printversion("squashfs-tools", version("mksquashfs -version"))
+	printversion("btrfs-progs", version("mkfs.btrfs --version"))
 	printversion("Pcmciautils", version("pccardctl -V"))
 	printversion("Pcmcia-cs", version("cardmgr -V"))
 	printversion("Quota-tools", version("quota -V"))
@@ -36,7 +47,15 @@ BEGIN {
 	printversion("Nfs-utils", version("showmount --version"))
 	printversion("Bison", version("bison --version"))
 	printversion("Flex", version("flex --version"))
+	printversion("Grub", version("grub-install --version"))
+	printversion("mcelog", version("mcelog --version"))
+	printversion("iptables", version("iptables --version"))
+	printversion("openssl & libcrypto", version("openssl version"))
+	printversion("bc", version("bc --version"))
+	printversion("Sphinx (for doc builds)", version("sphinx-build --version"))
+	printversion("cpio", version("cpio --version"))
 
+	print separator
 	while ("ldconfig -p 2>/dev/null" | getline > 0)
 		if ($NF ~ libc || $NF ~ libcpp)
 			if (!seen[ver = version("readlink " $NF)]++)
@@ -51,11 +70,12 @@ BEGIN {
 	printversion("Udev", version("udevadm --version"))
 	printversion("Wireless-tools", version("iwconfig --version"))
 
+	print separator
 	while ("sort /proc/modules" | getline > 0) {
 		mods = mods sep $1
 		sep = " "
 	}
-	printversion("Modules Loaded", mods)
+	printversion("Modules Loaded:\n", mods)
 }
 
 function version(cmd,    ver) {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 89 lines · Shuah Khan

Update to add missing software checks to bring it in sync with the Documentation/Changes list. Make improvements to the output with separator between different sections.

---
Changes since v2: Fix extra line in usage

 scripts/ver_linux | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
scripts/ver_linux +24 -5
index 1a8ee4ff0e32..adef5dc67038 100755
@@ -6,20 +6,29 @@
 # differ on your system.
 
 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 = "\nMinimum required software versions to build and run current kernel version.\n"
+       usage = usage "If some fields are empty or look unusual you may have an old version.\n"
+       usage = usage "Compare with the current minimal requirements in Documentation/Changes."
        print usage
 
+       separator = "\n===================================================\n"
+
+       print separator
        system("uname -a")
-       printf("\n")
 
        vernum = "[0-9]+([.]?[0-9]+)+"
        libc = "libc[.]so[.][0-9]+$"
        libcpp = "(libg|stdc)[+]+[.]so([.][0-9]+)+$"
 
+       print separator
        printversion("GNU C", version("gcc -dumpversion"))
+       printversion("Clang/LLVM (optional)", version("clang --version"))
+       printversion("Rust (optional)", version("rustc --version"))
+       printversion("bindgen (optional)", version("bindgen --version"))
        printversion("GNU Make", version("make --version"))
+       printversion("bash", version("bash --version"))
        printversion("Binutils", version("ld -v"))
+       printversion("pahole", version("pahole --version"))
        printversion("Util-linux", version("mount --version"))
        printversion("Mount", version("mount --version"))
        printversion("Module-init-tools", version("depmod -V"))
@@ -28,6 +37,8 @@ BEGIN {
        printversion("Reiserfsprogs", version("reiserfsck -V"))
        printversion("Reiser4fsprogs", version("fsck.reiser4 -V"))
        printversion("Xfsprogs", version("xfs_db -V"))
+       printversion("squashfs-tools", version("mksquashfs -version"))
+       printversion("btrfs-progs", version("mkfs.btrfs --version"))
        printversion("Pcmciautils", version("pccardctl -V"))
        printversion("Pcmcia-cs", version("cardmgr -V"))
        printversion("Quota-tools", version("quota -V"))
@@ -36,7 +47,15 @@ BEGIN {
        printversion("Nfs-utils", version("showmount --version"))
        printversion("Bison", version("bison --version"))
        printversion("Flex", version("flex --version"))
+       printversion("Grub", version("grub-install --version"))
+       printversion("mcelog", version("mcelog --version"))
+       printversion("iptables", version("iptables --version"))
+       printversion("openssl & libcrypto", version("openssl version"))
+       printversion("bc", version("bc --version"))
+       printversion("Sphinx (for doc builds)", version("sphinx-build --version"))
+       printversion("cpio", version("cpio --version"))
 
+       print separator
        while ("ldconfig -p 2>/dev/null" | getline > 0)
                if ($NF ~ libc || $NF ~ libcpp)
                        if (!seen[ver = version("readlink " $NF)]++)
@@ -51,11 +70,12 @@ BEGIN {
        printversion("Udev", version("udevadm --version"))
        printversion("Wireless-tools", version("iwconfig --version"))
 
+       print separator
        while ("sort /proc/modules" | getline > 0) {
                mods = mods sep $1
                sep = " "
        }
-       printversion("Modules Loaded", mods)
+       printversion("Modules Loaded:\n", mods)
 }
 
 function version(cmd,    ver) {
--
Quoted 2 lines

2.34.1

LGTM, thanks.