linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ver_linux: add missing software to checklist
@ 2023-01-24 20:43 Shuah Khan
  2023-01-26  8:02 ` Alexander Kapshuk
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2023-01-24 20:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: 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.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
---
Changes since v1: addressed review comments

 scripts/ver_linux | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 1a8ee4ff0e32..2daee7e88c45 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -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 = "Minimum 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.\n"
 	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) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ver_linux: add missing software to checklist
  2023-01-24 20:43 [PATCH v2] ver_linux: add missing software to checklist Shuah Khan
@ 2023-01-26  8:02 ` Alexander Kapshuk
  2023-01-31 20:07   ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kapshuk @ 2023-01-26  8:02 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel

On Tue, Jan 24, 2023 at 11:04 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> 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.
>
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
> Changes since v1: addressed review comments
>
>  scripts/ver_linux | 28 ++++++++++++++++++++++++----
>  1 file changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/ver_linux b/scripts/ver_linux
> index 1a8ee4ff0e32..2daee7e88c45 100755
> --- a/scripts/ver_linux
> +++ b/scripts/ver_linux
> @@ -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 = "Minimum 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.\n"
>         print usage

The usage message is followed by three new line characters, the 1st is
embedded in the last line of the usage message, the second is output
by the print function, and the third by the leading new line character
in the separator string.
All other sections use two trailing new line characters instead.
If the formatting of this section is desired to be consistent with all
the other sections, this print function may be substituted with the
printf function, which does not append a new line character to its
argument.

>
> +       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) {
> --
> 2.34.1
>

Other than that, LGTM. Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ver_linux: add missing software to checklist
  2023-01-26  8:02 ` Alexander Kapshuk
@ 2023-01-31 20:07   ` Shuah Khan
  0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2023-01-31 20:07 UTC (permalink / raw)
  To: Alexander Kapshuk; +Cc: linux-kernel, Shuah Khan

On 1/26/23 01:02, Alexander Kapshuk wrote:
> On Tue, Jan 24, 2023 at 11:04 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>
>> 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.
>>
>> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
>> ---
>> Changes since v1: addressed review comments
>>
>>   scripts/ver_linux | 28 ++++++++++++++++++++++++----
>>   1 file changed, 24 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/ver_linux b/scripts/ver_linux
>> index 1a8ee4ff0e32..2daee7e88c45 100755
>> --- a/scripts/ver_linux
>> +++ b/scripts/ver_linux
>> @@ -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 = "Minimum 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.\n"
>>          print usage
> 
> The usage message is followed by three new line characters, the 1st is
> embedded in the last line of the usage message, the second is output
> by the print function, and the third by the leading new line character
> in the separator string.
> All other sections use two trailing new line characters instead.
> If the formatting of this section is desired to be consistent with all
> the other sections, this print function may be substituted with the
> printf function, which does not append a new line character to its
> argument.
> 

> 
> Other than that, LGTM. Thanks.

Thanks for checking this. Make sense to keep it consistent. Will
fix it in the next version.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-31 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 20:43 [PATCH v2] ver_linux: add missing software to checklist Shuah Khan
2023-01-26  8:02 ` Alexander Kapshuk
2023-01-31 20:07   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).