Ubuntu 18.04 [ P9 WSP DD2.2 ]: lshw version is displayed as "unknown" and -json option is not available in help message.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
lshw (Debian) |
Fix Released
|
Unknown
|
|||
lshw (Ubuntu) |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* lshw version is displayed as "unknown"
* '-json' option is not available in help message although it is a fully supported
The version used to be set and then read from a text file named '.version' inside the upstream source, but since B.02.18 [1] the version is fetched from a shell call that relies on 'git describe'. This causes the version to set to "unknown" during the build. The proposed version fix has been uploaded upstream [2] and relies instead on reading from a 'VERSION' variable inside the makefile. The debdiff takes care of setting the variable to the right value in debian/rules.
The proposed fix also includes the '-json' to the help output and has been uploaded upstream [3], as the json output has been supported and recognized for a while.
[Test Case]
Trusty:
$ lshw -version
Hardware Lister (lshw) - B.02.16
Bionic:
$ lshw -version
unknown
$ lshw -help
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
Bionic patched:
$ lshw -version
B.02.18
$ lshw -help
Hardware Lister (lshw) - B.02.18
usage: lshw [-format] [-options ...]
lshw -version
-version print program version (B.02.18)
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
[Regression Potential]
* The version is set through the debian/rules variable VERSION, if set incorrectly it will misreport the actual lshw version being used.
[References]
[1] https:/
[2] https:/
[3] https:/
[Original Bug Description]
== Comment: #0 - PAVITHRA R. PRAKASH <email address hidden> - 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@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@ltc-wcwsp3:~# lshw -version
unknown
root@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 <email address hidden> - 2018-03-01 02:48:01 ==
Upstream patches:
https:/
and
https:/
should fix the version and missing -json option issues respectively.
Kindly cherry pick them and verify.
Thanks!
tags: | added: architecture-ppc64le bugnameltc-165253 severity-medium targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → lshw (Ubuntu) |
Changed in ubuntu-power-systems: | |
importance: | Undecided → Medium |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
tags: | added: triage-g |
Changed in lshw (Ubuntu): | |
assignee: | Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Foundations Team (canonical-foundations) |
importance: | Undecided → Medium |
Changed in ubuntu-power-systems: | |
status: | New → Triaged |
tags: | added: id-5ab95bc39c2b15e2cf34d491 |
Changed in lshw (Ubuntu): | |
status: | New → Incomplete |
Changed in ubuntu-power-systems: | |
status: | Triaged → Incomplete |
tags: | added: p9 ubuntu-18.04.1 |
Changed in lshw (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in ubuntu-power-systems: | |
status: | Incomplete → Triaged |
Changed in ubuntu-power-systems: | |
status: | Triaged → Fix Committed |
Changed in lshw (Debian): | |
status: | Unknown → Fix Released |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Fix Released |
------- Comment From <email address hidden> 2018-03-25 21:35 EDT------- /github. com/lyonel/ lshw/commit/ f340087cfefbdf0 5c585d56f7 /github. com/lyonel/ lshw/commit/ 098af7c1ac793a7 e13c07ce70
(In reply to comment #1)
> Upstream patches:
> https:/
> 18edc98f9d08883
> and
> https:/
> 503c76a35a9e97a
>
> should fix the version and missing -json option issues respectively.
>
> Kindly cherry pick them.
>
> Thanks!
Please provide test kernel for Pavithra to validate it internally.