public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCH] ver_linux: uniform output across various linux distros
@ 2015-09-28  4:50 Alexander Kapshuk
  2015-09-28 14:09 ` Greg KH
  2015-09-28 21:56 ` Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Kapshuk @ 2015-09-28  4:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, gregkh

[-- Attachment #1: Type: text/plain, Size: 10427 bytes --]

Hello,

Having run 'scripts/ver_linux' on my Gentoo system, as well as having
looked through some recent bug reports on the kernel bugzilla website
showing the output of the script in question, I have observed that
the output is not accurate across various distros. While the current
implementation of the script expects the version info to be found in
particular fields, some of the utilities invoked by the script, output
their version information in varying formats, which results in the
script displaying information other than the version number.

The proposed implementation relies mostly on sed to detect the version
numbers more accurately. Running the patched version of the script on
the distros below resulted in accurate and uniform output.

Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Arch Linux

The items left unchanged are those I did not have access to. I would
be willing to work on those too, if supplied the output of the affected
commands whose format differs based on the distro.

-------------------------------------
A few comments are in order.

/usr/src/linux/scripts/ver_linux.orig:22,26
The current implementation
outputs the version of 'util-linux' by calling 'fdformat', which had
not been found installed on most of the test systems available to me. As
'mount' is a part of the 'util-linux' package, the proposed implementation
invokes 'mount' only, and unifies the lines above into a single block.

/usr/src/linux/scripts/ver_linux.orig:77,83
'loadkeys -h' does not output
the version number across all the test systems available to me, while
'loadkeys -V' does. The proposed implementation calls 'loadkeys -V'
only once, and outputs the version info acquired for both 'Kdb' and
'console-tools'.

/usr/src/linux/scripts/ver_linux.orig:90
None of the test systems I
have access to seem to have 'udevinfo' installed. Perhaps, 'udevinfo'
is the former name for something that could now be substituted by
'udevadm --version'.

-------------------------------------
Sample output of the current implementation on Gentoo Linux:

/usr/src/linux/scripts/ver_linux.orig
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux

Gnu C                  4.8.5
Gnu make               4.1
binutils               2.25.1
1.1
2.25.1
util-linux             /usr/src/linux/scripts/ver_linux.orig: line 23:
fdformat: command not found
mount                  debug
module-init-tools      found
Linux C Library        Dynamic linker (ldd)   2.20
Procps                 3.3.9
Net-tools              1.60_p20130513023548
Kbd                    1.15.5
Sh-utils               8.23
Modules Loaded         xt_mark xt_LOG vgem v4l2_dv_timings ulpi udf
sil164 nf_nat_sip nf_nat_irc uvcvideo videobuf2_vmalloc
videobuf2_memops nf_nat_ipv4 videobuf2_core v4l2_common nf_nat_ftp
nf_nat nf_log_ipv6 nf_log_ipv4 nf_log_common lcd i2c_mux hp_wireless
gspca_main videodev cuse fuse crc_itu_t ch7006 ath5k coretemp
input_leds led_class ath

-------------------------------------
Sample output of the patched implementation on Gentoo Linux:

/usr/src/linux/scripts/ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux

GNU C            4.8.5
GNU Make         4.1
binutils        2.25.1
util-linux        2.26.2
mount            2.26.2
module-init-tools    20
e2fsprogs        1.42.13
Linux C Library        2.20
Dynamic linker (ldd)    2.20
Linux C++ Library    6.0.19
Procps            3.3.9
net-tools        1.60
Kbd            1.15.5
Console-tools        1.15.5
Sh-utils        8.23
Modules Loaded         ath ath5k ch7006 coretemp crc_itu_t cuse fuse
gspca_main hp_wireless i2c_mux input_leds lcd led_class nf_log_common
nf_log_ipv4 nf_log_ipv6 nf_nat nf_nat_ftp nf_nat_ipv4 nf_nat_irc
nf_nat_sip sil164 udf ulpi uvcvideo v4l2_common v4l2_dv_timings vgem
videobuf2_core videobuf2_memops videobuf2_vmalloc videodev xt_LOG
xt_mark
-------------------------------------

The actual patch.
-------------------------------------

--- scripts/ver_linux.orig    2015-08-30 21:34:09.000000000 +0300
+++ scripts/ver_linux    2015-09-27 21:32:38.652765768 +0300
@@ -4,54 +4,112 @@
 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
 # differ on your system.
 #
+
 echo 'If some fields are empty or look unusual you may have an old version.'
 echo 'Compare to the current minimal requirements in Documentation/Changes.'
-echo ' '
+echo

 uname -a
-echo ' '
-
-gcc -dumpversion 2>&1| awk \
-'NR==1{print "Gnu C                 ", $1}'
-
-make --version 2>&1 | awk -F, '{print $1}' | awk \
-      '/GNU Make/{print "Gnu make              ",$NF}'
-
-echo "binutils               $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
-
-echo -n "util-linux             "
-fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
+echo

-echo -n "mount                  "
-mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
-
-depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
-
-tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
-'NR==1 {print "e2fsprogs             ", $2}'
-
-fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
-'NR==1 {print "jfsutils              ", $3}'
-
-reiserfsck -V 2>&1 | grep ^reiserfsck | awk \
-'NR==1{print "reiserfsprogs         ", $2}'
+gcc -dumpversion 2>&1 |
+sed '
+    /^[0-9\.]*$/!d
+    s/^/GNU C\t\t\t/
+'
+
+make --version 2>&1 |
+sed '
+    /^GNU Make/!d
+    s//&\t\t/
+'
+
+ld -v 2>&1 |
+sed '
+    /[0-9]$/!d
+    s/-.*//
+    s/.*[ \t]//
+    s/^/binutils\t\t/
+'
+
+mount --version 2>&1 |
+sed '
+    /^mount/!d
+    s/.*util-linux//
+    s/lib.*//
+    s/[^0-9\.]//g
+    s/^/util-linux\t\t/
+    h
+    s/util-linux/mount\t/
+    H
+    g
+'
+
+/sbin/depmod -V 2>&1 |
+sed '
+    /[0-9]$/!d
+    s/[^0-9\.]//g
+    s/^/module-init-tools\t/
+'
+
+/sbin/tune2fs 2>&1 |
+sed '
+    /^tune2fs/!d
+    s/-.*//
+    s/[^0-9\.]*//
+    s/.*[ \t]\(.*\)[ \t].*/e2fsprogs\t\t\1/
+'
+
+fsck.jfs -V 2>&1 |
+sed '
+    /version/!d
+    s/.*version[ \t]//
+    s/[ \t].*//
+    s/[^0-9]$//
+    s/^/jfsutils\t/
+'
+
+reiserfsck -V 2>&1 |
+sed '
+    /^reiserfsck/!d
+    s/[^0-9\.]//g
+    /^$/d
+    s/^/reiserfsprogs\t/
+'

 fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
 'NR==1{print "reiser4progs          ", $2}'

-xfs_db -V 2>&1 | grep version | awk \
-'NR==1{print "xfsprogs              ", $3}'
-
-pccardctl -V 2>&1| grep pcmciautils | awk '{print "pcmciautils
   ", $2}'
+xfs_db -V 2>&1 |
+sed '
+    /version/!d
+    s/[^0-9\.]//g
+    s/^/xfsprogs\t\t\t/
+'
+
+pccardctl -V 2>&1 |
+sed '
+    /^pcmciautils/!d
+    s/[ \t]/\t/
+'

 cardmgr -V 2>&1| grep version | awk \
 'NR==1{print "pcmcia-cs             ", $3}'

-quota -V 2>&1 | grep version | awk \
-'NR==1{print "quota-tools           ", $NF}'
-
-pppd --version 2>&1| grep version | awk \
-'NR==1{print "PPP                   ", $3}'
+quota -V 2>&1 |
+sed '
+    /version/!d
+    s/[^0-9\.]//g
+    s/\.$//
+    s/^/quota-tools\t\t/
+'
+
+pppd --version 2>&1 |
+sed '
+    /version/!d
+    s/[^0-9\.]//g
+    s/^/PPP\t\t\t\t/
+'

 isdnctrl 2>&1 | grep version | awk \
 'NR==1{print "isdn4k-utils          ", $NF}'
@@ -59,40 +117,97 @@ isdnctrl 2>&1 | grep version | awk \
 showmount --version 2>&1 | grep nfs-utils | awk \
 'NR==1{print "nfs-utils             ", $NF}'

-echo -n "Linux C Library        "
-sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
-
-ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
-'NR==1{print "Dynamic linker (ldd)  ", $NF}'
-
-ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so  2>/dev/null | awk -F. \
-       '{print "Linux C++ Library      " $4"."$5"."$6}'
-
-ps --version 2>&1 | grep version | awk \
-'NR==1{print "Procps                ", $NF}'
-
-ifconfig --version 2>&1 | grep tools | awk \
-'NR==1{print "Net-tools             ", $NF}'
+test -r /proc/self/maps &&
+sed '
+    /.*libc-\(.*\)\.so$/!d
+    s//Linux C Library\t\t\1/
+    q
+' /proc/self/maps
+
+lddsed='
+    /^ldd/!d
+    s/.*[ \t]\([0-9\.]*$\)/\1/
+    s/^/Dynamic linker (ldd)\t/
+'
+if ldd -v >/dev/null 2>&1
+then
+    ldd -v 2>&1 | sed "$lddsed"
+else
+    ldd --version 2>&1 | sed "$lddsed"
+fi

-# Kbd needs 'loadkeys -h',
-loadkeys -h 2>&1 | awk \
-'(NR==1 && ($3 !~ /option/)) {print "Kbd                   ", $3}'
+libcpp=`/sbin/ldconfig -p |
+    awk '/(libg|stdc)[+]+\.so/ {
+    print $NF
+    exit
+    }
+'`
+ls -l $libcpp |
+sed '
+    s!.*so\.!!
+    s!^!Linux C++ Library\t!
+'
+
+ps --version 2>&1 |
+sed '
+    /version/!d
+    s/[^0-9.]//g
+    s/^/Procps\t\t\t/
+'
+
+ifconfig=`whereis ifconfig | awk '{print $2}'`
+if test -n "$ifconfig"
+then
+    $ifconfig --version 2>&1 |
+    sed '
+        /net-tools/!d
+        s/\([0-9]\)-.*/\1/
+        s/[ \t]/\t\t/
+        s/_.*//
+    '
+else
+    :
+fi

-# while console-tools needs 'loadkeys -V'.
-loadkeys -V 2>&1 | awk \
-'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools         ", $3}'
+loadkeys -V 2>&1 |
+sed '
+    /^loadkeys/!d
+    s/.*[ \t]\([0-9\.]*$\)/\1/
+    s/^/Kbd\t\t\t/
+    h
+    s/Kbd\t/Console-tools/
+    H
+    g
+'

 oprofiled --version 2>&1 | awk \
 '(NR==1 && ($2 == "oprofile")) {print "oprofile              ", $3}'

-expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
-
+expr --v 2>&1 |
+sed '
+    /^expr/!d
+    s/[^0-9.]//g
+    s/^/Sh-utils\t\t/
+'
 udevinfo -V 2>&1 | grep version | awk '{print "udev                  ", $3}'

-iwconfig --version 2>&1 | awk \
-'(NR==1 && ($3 == "version")) {print "wireless-tools        ",$4}'
-
-if [ -e /proc/modules ]; then
-    X=`cat /proc/modules | sed -e "s/ .*$//"`
-    echo "Modules Loaded         "$X
-fi
+iwconfig --version 2>&1 |
+sed '
+    /version/!d
+    s/[^0-9\.]//g
+    s/^/wireless-tools\t\t/
+'
+
+test -e /proc/modules &&
+sort /proc/modules |
+sed '
+    s/ .*//
+    H
+${
+    g
+    s/^/Modules Loaded\t\t/
+    y/\n/ /
+    q
+}
+    d
+'
-------------------------------------
The list's input would be much appreciated.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>

[-- Attachment #2: ver_linux.patch --]
[-- Type: text/x-patch, Size: 5624 bytes --]

--- scripts/ver_linux.orig	2015-08-30 21:34:09.000000000 +0300
+++ scripts/ver_linux	2015-09-27 21:32:38.652765768 +0300
@@ -4,54 +4,112 @@
 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
 # differ on your system.
 #
+
 echo 'If some fields are empty or look unusual you may have an old version.'
 echo 'Compare to the current minimal requirements in Documentation/Changes.'
-echo ' '
+echo
 
 uname -a
-echo ' '
-
-gcc -dumpversion 2>&1| awk \
-'NR==1{print "Gnu C                 ", $1}'
-
-make --version 2>&1 | awk -F, '{print $1}' | awk \
-      '/GNU Make/{print "Gnu make              ",$NF}'
-
-echo "binutils               $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
-
-echo -n "util-linux             "
-fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
+echo
 
-echo -n "mount                  "
-mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
-
-depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
-
-tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
-'NR==1 {print "e2fsprogs             ", $2}'
-
-fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
-'NR==1 {print "jfsutils              ", $3}'
-
-reiserfsck -V 2>&1 | grep ^reiserfsck | awk \
-'NR==1{print "reiserfsprogs         ", $2}'
+gcc -dumpversion 2>&1 |
+sed '
+	/^[0-9\.]*$/!d
+	s/^/GNU C\t\t\t/
+'
+
+make --version 2>&1 |
+sed '
+	/^GNU Make/!d
+	s//&\t\t/
+'
+
+ld -v 2>&1 |
+sed '
+	/[0-9]$/!d
+	s/-.*//
+	s/.*[ \t]//
+	s/^/binutils\t\t/
+'
+
+mount --version 2>&1 |
+sed '
+	/^mount/!d
+	s/.*util-linux//
+	s/lib.*//
+	s/[^0-9\.]//g
+	s/^/util-linux\t\t/
+	h
+	s/util-linux/mount\t/
+	H
+	g
+'
+
+/sbin/depmod -V 2>&1 |
+sed '
+	/[0-9]$/!d
+	s/[^0-9\.]//g
+	s/^/module-init-tools\t/
+'
+
+/sbin/tune2fs 2>&1 |
+sed '
+	/^tune2fs/!d
+	s/-.*//
+	s/[^0-9\.]*//
+	s/.*[ \t]\(.*\)[ \t].*/e2fsprogs\t\t\1/
+'
+
+fsck.jfs -V 2>&1 |
+sed '
+	/version/!d
+	s/.*version[ \t]//
+	s/[ \t].*//
+	s/[^0-9]$//
+	s/^/jfsutils\t/
+'
+
+reiserfsck -V 2>&1 |
+sed '
+	/^reiserfsck/!d
+	s/[^0-9\.]//g
+	/^$/d
+	s/^/reiserfsprogs\t/
+'
 
 fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \
 'NR==1{print "reiser4progs          ", $2}'
 
-xfs_db -V 2>&1 | grep version | awk \
-'NR==1{print "xfsprogs              ", $3}'
-
-pccardctl -V 2>&1| grep pcmciautils | awk '{print "pcmciautils           ", $2}'
+xfs_db -V 2>&1 |
+sed '
+	/version/!d
+	s/[^0-9\.]//g
+	s/^/xfsprogs\t\t\t/
+'
+
+pccardctl -V 2>&1 |
+sed '
+	/^pcmciautils/!d
+	s/[ \t]/\t/
+'
 
 cardmgr -V 2>&1| grep version | awk \
 'NR==1{print "pcmcia-cs             ", $3}'
 
-quota -V 2>&1 | grep version | awk \
-'NR==1{print "quota-tools           ", $NF}'
-
-pppd --version 2>&1| grep version | awk \
-'NR==1{print "PPP                   ", $3}'
+quota -V 2>&1 |
+sed '
+	/version/!d
+	s/[^0-9\.]//g
+	s/\.$//
+	s/^/quota-tools\t\t/
+'
+
+pppd --version 2>&1 |
+sed '
+	/version/!d
+	s/[^0-9\.]//g
+	s/^/PPP\t\t\t\t/
+'
 
 isdnctrl 2>&1 | grep version | awk \
 'NR==1{print "isdn4k-utils          ", $NF}'
@@ -59,40 +117,97 @@ isdnctrl 2>&1 | grep version | awk \
 showmount --version 2>&1 | grep nfs-utils | awk \
 'NR==1{print "nfs-utils             ", $NF}'
 
-echo -n "Linux C Library        "
-sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
-
-ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
-'NR==1{print "Dynamic linker (ldd)  ", $NF}'
-
-ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so  2>/dev/null | awk -F. \
-       '{print "Linux C++ Library      " $4"."$5"."$6}'
-
-ps --version 2>&1 | grep version | awk \
-'NR==1{print "Procps                ", $NF}'
-
-ifconfig --version 2>&1 | grep tools | awk \
-'NR==1{print "Net-tools             ", $NF}'
+test -r /proc/self/maps &&
+sed '
+	/.*libc-\(.*\)\.so$/!d
+	s//Linux C Library\t\t\1/
+	q
+' /proc/self/maps
+
+lddsed='
+	/^ldd/!d
+	s/.*[ \t]\([0-9\.]*$\)/\1/
+	s/^/Dynamic linker (ldd)\t/
+'
+if ldd -v >/dev/null 2>&1
+then
+	ldd -v 2>&1 | sed "$lddsed"
+else
+	ldd --version 2>&1 | sed "$lddsed"
+fi
 
-# Kbd needs 'loadkeys -h',
-loadkeys -h 2>&1 | awk \
-'(NR==1 && ($3 !~ /option/)) {print "Kbd                   ", $3}'
+libcpp=`/sbin/ldconfig -p |
+	awk '/(libg|stdc)[+]+\.so/ {
+	print $NF
+	exit
+	}
+'`
+ls -l $libcpp |
+sed '
+	s!.*so\.!!
+	s!^!Linux C++ Library\t!
+'
+
+ps --version 2>&1 |
+sed '
+	/version/!d
+	s/[^0-9.]//g
+	s/^/Procps\t\t\t/
+'
+
+ifconfig=`whereis ifconfig | awk '{print $2}'`
+if test -n "$ifconfig"
+then
+	$ifconfig --version 2>&1 |
+	sed '
+		/net-tools/!d
+		s/\([0-9]\)-.*/\1/
+		s/[ \t]/\t\t/
+		s/_.*//
+	'
+else
+	:
+fi
 
-# while console-tools needs 'loadkeys -V'.
-loadkeys -V 2>&1 | awk \
-'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools         ", $3}'
+loadkeys -V 2>&1 |
+sed '
+	/^loadkeys/!d
+	s/.*[ \t]\([0-9\.]*$\)/\1/
+	s/^/Kbd\t\t\t/
+	h
+	s/Kbd\t/Console-tools/
+	H
+	g
+'
 
 oprofiled --version 2>&1 | awk \
 '(NR==1 && ($2 == "oprofile")) {print "oprofile              ", $3}'
 
-expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
-
+expr --v 2>&1 |
+sed '
+	/^expr/!d
+	s/[^0-9.]//g
+	s/^/Sh-utils\t\t/
+'
 udevinfo -V 2>&1 | grep version | awk '{print "udev                  ", $3}'
 
-iwconfig --version 2>&1 | awk \
-'(NR==1 && ($3 == "version")) {print "wireless-tools        ",$4}'
-
-if [ -e /proc/modules ]; then
-    X=`cat /proc/modules | sed -e "s/ .*$//"`
-    echo "Modules Loaded         "$X
-fi
+iwconfig --version 2>&1 |
+sed '
+	/version/!d
+	s/[^0-9\.]//g
+	s/^/wireless-tools\t\t/
+'
+
+test -e /proc/modules &&
+sort /proc/modules |
+sed '
+	s/ .*//
+	H
+${
+	g
+	s/^/Modules Loaded\t\t/
+	y/\n/ /
+	q
+}
+	d
+'

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

* Re: Subject: [PATCH] ver_linux: uniform output across various linux distros
  2015-09-28  4:50 Subject: [PATCH] ver_linux: uniform output across various linux distros Alexander Kapshuk
@ 2015-09-28 14:09 ` Greg KH
  2015-09-28 21:56 ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2015-09-28 14:09 UTC (permalink / raw)
  To: Alexander Kapshuk; +Cc: linux-kernel, akpm

On Mon, Sep 28, 2015 at 07:50:37AM +0300, Alexander Kapshuk wrote:
> Hello,

Hi!

First off, your Subject: is a bit odd, you might want to fix up your
email client :)

> 
> Having run 'scripts/ver_linux' on my Gentoo system, as well as having
> looked through some recent bug reports on the kernel bugzilla website
> showing the output of the script in question, I have observed that
> the output is not accurate across various distros. While the current
> implementation of the script expects the version info to be found in
> particular fields, some of the utilities invoked by the script, output
> their version information in varying formats, which results in the
> script displaying information other than the version number.
> 
> The proposed implementation relies mostly on sed to detect the version
> numbers more accurately. Running the patched version of the script on
> the distros below resulted in accurate and uniform output.
> 
> Gentoo Linux
> Debian 6.0.10
> Oracle Linux Server release 7.1
> Arch Linux
> 
> The items left unchanged are those I did not have access to. I would
> be willing to work on those too, if supplied the output of the affected
> commands whose format differs based on the distro.

<snip>

Your patch is a bit complex, you are changing the formatting, and at the
same time, also changing the code.  Please do this in multiple patches,
one to fix any issues you see, and the second to then clean up the
formatting, making it easier to actually see what the difference is
here.

Also, take a look at Documentation/SubmittingPatches for the proper
format of a kernel patch to ensure we are able to accept it (hint, your
patch is missing the signed-off-by line in the body of the changelog
area).

thanks,

greg k-h

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

* Re: Subject: [PATCH] ver_linux: uniform output across various linux distros
  2015-09-28  4:50 Subject: [PATCH] ver_linux: uniform output across various linux distros Alexander Kapshuk
  2015-09-28 14:09 ` Greg KH
@ 2015-09-28 21:56 ` Randy Dunlap
  2015-09-29  4:44   ` Alexander Kapshuk
  1 sibling, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2015-09-28 21:56 UTC (permalink / raw)
  To: Alexander Kapshuk, linux-kernel; +Cc: akpm, gregkh

On 09/27/15 21:50, Alexander Kapshuk wrote:
> 
> -------------------------------------
> Sample output of the current implementation on Gentoo Linux:
> 
> /usr/src/linux/scripts/ver_linux.orig
> If some fields are empty or look unusual you may have an old version.
> Compare to the current minimal requirements in Documentation/Changes.
> 
> Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
> Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux
> 
> Gnu C                  4.8.5
> Gnu make               4.1
> binutils               2.25.1
> 1.1
> 2.25.1
> util-linux             /usr/src/linux/scripts/ver_linux.orig: line 23:
> fdformat: command not found
> mount                  debug
> module-init-tools      found
> Linux C Library        Dynamic linker (ldd)   2.20
> Procps                 3.3.9
> Net-tools              1.60_p20130513023548
> Kbd                    1.15.5
> Sh-utils               8.23
> Modules Loaded         xt_mark xt_LOG vgem v4l2_dv_timings ulpi udf
> sil164 nf_nat_sip nf_nat_irc uvcvideo videobuf2_vmalloc
> videobuf2_memops nf_nat_ipv4 videobuf2_core v4l2_common nf_nat_ftp
> nf_nat nf_log_ipv6 nf_log_ipv4 nf_log_common lcd i2c_mux hp_wireless
> gspca_main videodev cuse fuse crc_itu_t ch7006 ath5k coretemp
> input_leds led_class ath
> 
> -------------------------------------
> Sample output of the patched implementation on Gentoo Linux:
> 
> /usr/src/linux/scripts/ver_linux
> If some fields are empty or look unusual you may have an old version.
> Compare to the current minimal requirements in Documentation/Changes.
> 
> Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
> Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux
> 
> GNU C            4.8.5
> GNU Make         4.1
> binutils        2.25.1
> util-linux        2.26.2
> mount            2.26.2
> module-init-tools    20
> e2fsprogs        1.42.13
> Linux C Library        2.20
> Dynamic linker (ldd)    2.20
> Linux C++ Library    6.0.19
> Procps            3.3.9
> net-tools        1.60
> Kbd            1.15.5
> Console-tools        1.15.5
> Sh-utils        8.23
> Modules Loaded         ath ath5k ch7006 coretemp crc_itu_t cuse fuse
> gspca_main hp_wireless i2c_mux input_leds lcd led_class nf_log_common
> nf_log_ipv4 nf_log_ipv6 nf_nat nf_nat_ftp nf_nat_ipv4 nf_nat_irc
> nf_nat_sip sil164 udf ulpi uvcvideo v4l2_common v4l2_dv_timings vgem
> videobuf2_core videobuf2_memops videobuf2_vmalloc videodev xt_LOG
> xt_mark
> -------------------------------------

On openSuSE 13.2 I get this (fragment):

Linux dragon 3.16.7-24-desktop #1 SMP PREEMPT Mon Aug 3 14:37:06 UTC 2015 (ec183cc) x86_64 x86_64 x86_64 GNU/Linux

GNU C			4.8
GNU Make		 4.0
binutils		2.24.0.20140403
util-linux		2.25.1
mount			2.25.1
module-init-tools	18
e2fsprogs		1.42.12
pcmciautils	017
Linux C Library		2.19
Dynamic linker (ldd)	2.19
Linux C++ Library	6.0.19
Procps			3.3.9
net-tools		1.60
Kbd			2.0.2
Console-tools		2.0.2
Sh-utils		8.23
wireless-tools		30


Tabs/spaces on GNU Make and pcmciautils could be better.


ciao.
-- 
~Randy

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

* Re: Subject: [PATCH] ver_linux: uniform output across various linux distros
  2015-09-28 21:56 ` Randy Dunlap
@ 2015-09-29  4:44   ` Alexander Kapshuk
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kapshuk @ 2015-09-29  4:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, akpm, Greg KH

On Tue, Sep 29, 2015 at 12:56 AM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 09/27/15 21:50, Alexander Kapshuk wrote:
>>
>> -------------------------------------
>> Sample output of the current implementation on Gentoo Linux:
>>
>> /usr/src/linux/scripts/ver_linux.orig
>> If some fields are empty or look unusual you may have an old version.
>> Compare to the current minimal requirements in Documentation/Changes.
>>
>> Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
>> Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux
>>
>> Gnu C                  4.8.5
>> Gnu make               4.1
>> binutils               2.25.1
>> 1.1
>> 2.25.1
>> util-linux             /usr/src/linux/scripts/ver_linux.orig: line 23:
>> fdformat: command not found
>> mount                  debug
>> module-init-tools      found
>> Linux C Library        Dynamic linker (ldd)   2.20
>> Procps                 3.3.9
>> Net-tools              1.60_p20130513023548
>> Kbd                    1.15.5
>> Sh-utils               8.23
>> Modules Loaded         xt_mark xt_LOG vgem v4l2_dv_timings ulpi udf
>> sil164 nf_nat_sip nf_nat_irc uvcvideo videobuf2_vmalloc
>> videobuf2_memops nf_nat_ipv4 videobuf2_core v4l2_common nf_nat_ftp
>> nf_nat nf_log_ipv6 nf_log_ipv4 nf_log_common lcd i2c_mux hp_wireless
>> gspca_main videodev cuse fuse crc_itu_t ch7006 ath5k coretemp
>> input_leds led_class ath
>>
>> -------------------------------------
>> Sample output of the patched implementation on Gentoo Linux:
>>
>> /usr/src/linux/scripts/ver_linux
>> If some fields are empty or look unusual you may have an old version.
>> Compare to the current minimal requirements in Documentation/Changes.
>>
>> Linux box0 4.2.1-vanilla #1 SMP Thu Sep 24 18:05:42 EEST 2015 i686
>> Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel GNU/Linux
>>
>> GNU C            4.8.5
>> GNU Make         4.1
>> binutils        2.25.1
>> util-linux        2.26.2
>> mount            2.26.2
>> module-init-tools    20
>> e2fsprogs        1.42.13
>> Linux C Library        2.20
>> Dynamic linker (ldd)    2.20
>> Linux C++ Library    6.0.19
>> Procps            3.3.9
>> net-tools        1.60
>> Kbd            1.15.5
>> Console-tools        1.15.5
>> Sh-utils        8.23
>> Modules Loaded         ath ath5k ch7006 coretemp crc_itu_t cuse fuse
>> gspca_main hp_wireless i2c_mux input_leds lcd led_class nf_log_common
>> nf_log_ipv4 nf_log_ipv6 nf_nat nf_nat_ftp nf_nat_ipv4 nf_nat_irc
>> nf_nat_sip sil164 udf ulpi uvcvideo v4l2_common v4l2_dv_timings vgem
>> videobuf2_core videobuf2_memops videobuf2_vmalloc videodev xt_LOG
>> xt_mark
>> -------------------------------------
>
> On openSuSE 13.2 I get this (fragment):
>
> Linux dragon 3.16.7-24-desktop #1 SMP PREEMPT Mon Aug 3 14:37:06 UTC 2015 (ec183cc) x86_64 x86_64 x86_64 GNU/Linux
>
> GNU C                   4.8
> GNU Make                 4.0
> binutils                2.24.0.20140403
> util-linux              2.25.1
> mount                   2.25.1
> module-init-tools       18
> e2fsprogs               1.42.12
> pcmciautils     017
> Linux C Library         2.19
> Dynamic linker (ldd)    2.19
> Linux C++ Library       6.0.19
> Procps                  3.3.9
> net-tools               1.60
> Kbd                     2.0.2
> Console-tools           2.0.2
> Sh-utils                8.23
> wireless-tools          30
>
>
> Tabs/spaces on GNU Make and pcmciautils could be better.
>
>
> ciao.
> --
> ~Randy

Thanks for your input.

I'll see what can be done about those tabs and spaces.

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

end of thread, other threads:[~2015-09-29  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28  4:50 Subject: [PATCH] ver_linux: uniform output across various linux distros Alexander Kapshuk
2015-09-28 14:09 ` Greg KH
2015-09-28 21:56 ` Randy Dunlap
2015-09-29  4:44   ` Alexander Kapshuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox