[Bug 1752523] Comment bridged from LTC Bugzilla
bugproxy
bugproxy at us.ibm.com
Wed Apr 4 07:20:36 UTC 2018
------- Comment From chandnve at in.ibm.com 2018-04-04 03:13 EDT-------
Hi Pavithra,
>From Comment #11 and Comment #12, we see that the VERSION variable is
getting the incorrect value...
... which is because one of the parent directories where I was building
the backported lshw was a git repository (I didn't check that. I should
have created a separate dir in home for the test build of lshw) and the
build of lshw was pulling the "git describe" value of that existing dir.
I just built a new custom lshw from a dir which is not inside an
existing git repo. and saw in the build that no value was getting pulled
this time:
Applying patch Fix-unknown-version-issue.patch
patching file lshw-B.02.18/src/Makefile
Hunk #1 succeeded at 20 with fuzz 2.
patching file lshw-B.02.18/src/core/version.cc
Now at patch Fix-unknown-version-issue.patch
touch debian/stamp-patched
dh_testdir
# Add here commands to compile the package.
/usr/bin/make -C lshw-B.02.18/src core
make[1]: Entering directory '/home/ubuntu/chandni/lshw/lshw-02.18/lshw-B.02.18/src'
make -C core all
fatal: Not a git repository (or any of the parent directories): .git
make[2]: Entering directory '/home/ubuntu/chandni/lshw/lshw-02.18/lshw-B.02.18/src/core'
c++ -Wall -g -O2 -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"\" -c hw.cc -o hw.o
c++ -Wall -g -O2 -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"\" -c main.cc -o main.o
c++ -Wall -g -O2 -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"\" -c print.cc -o print.o
c++ -Wall -g -O2 -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"\" -c mem.cc -o mem.o
c++ -Wall -g -O2 -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/bin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"\" -c dmi.cc -o dmi.o
In file included from dmi.cc:78:0:
and on running this lshw, I see:
ubuntu at ubuntu:~/chandni/lshw$ lshw -version
ubuntu at ubuntu:~/chandni/lshw$ lshw -h
Hardware Lister (lshw) -
usage: lshw [-format] [-options ...]
lshw -version
-version print program version ()
format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-json output hardware tree as a JSON object
-short output hardware paths
-businfo output bus information
options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-c CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don't display status
-sanitize sanitize output (remove sensitive information like serial numbers, etc.)
-numeric output numeric IDs (for PCI, USB, etc.)
-notime exclude volatile attributes (timestamps) from output
So actually this is not an error. Had we had run the lshw.deb build from
an lshw directory, like the package maintainer would build, the correct
"git describe" value will be pulled. But since I am not building from a
lshw git repo, but from a debian source fetched from "apt-get source
lshw" its not pulling the correct value.
Vasant, please confirm that this is fine and the patche as mentioned in
Comment #10 is good to go!
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lshw in Ubuntu.
https://bugs.launchpad.net/bugs/1752523
Title:
Ubuntu 18.04 [ P9 WSP DD2.2 ]: lshw version is displayed as "unknown"
and -json option is not available in help message.
Status in The Ubuntu-power-systems project:
Triaged
Status in lshw package in Ubuntu:
New
Bug description:
== Comment: #0 - PAVITHRA R. PRAKASH <pavrampu at in.ibm.com> - 2018-03-01 00:30:14 ==
---Problem Description---
Ubuntu 18.04 [ P9 WSP DD2.2 ]: lshw version is displayed as "unknown"
and -json option is not available in help message.
---Environment--
Kernel Build: Ubuntu 18.04
System Name : wcwsp3
Model/Type : P9
Platform : BML
---Uname output---
root at ltc-wcwsp3:~# uname -a
Linux ltc-wcwsp3 4.15.0-10-generic #11 SMP Thu Feb 22 23:50:53 EST 2018 ppc64le ppc64le ppc64le GNU/Linux
---Steps to reproduce--
1. Run below commands.
# lshw -version
# lshw -h
---Logs----
root at ltc-wcwsp3:~# lshw -version
unknown
root at ltc-wcwsp3:~# lshw -h
Hardware Lister (lshw) - unknown
usage: lshw [-format] [-options ...]
lshw -version
-version print program version (unknown)
format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-short output hardware paths
-businfo output bus information
options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-c CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don't display status
-sanitize sanitize output (remove sensitive information like serial numbers, etc.)
-numeric output numeric IDs (for PCI, USB, etc.)
-notime exclude volatile attributes (timestamps) from output
== Comment: #1 - Chandni Verma <chandnve at in.ibm.com> - 2018-03-01 02:48:01 ==
Upstream patches:
https://github.com/lyonel/lshw/commit/18edc98f9d08883f340087cfefbdf05c585d56f7
and
https://github.com/lyonel/lshw/commit/503c76a35a9e97a098af7c1ac793a7e13c07ce70
should fix the version and missing -json option issues respectively.
Kindly cherry pick them and verify.
Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1752523/+subscriptions
More information about the foundations-bugs
mailing list