[Bug 1752523] Re: Ubuntu 18.04 [ P9 WSP DD2.2 ]: lshw version is displayed as "unknown" and -json option is not available in help message.
Tiago Stürmer Daitx
1752523 at bugs.launchpad.net
Wed Jul 25 16:17:03 UTC 2018
Hi Lukasz,
I agree that depending on someone setting it manually on the rules file
is not optimal while way better than "unknown".
This is not really an issue right now: if you look at the rules file you
will notice that 'uver' is used to set the 'srcdir', which would cause
the package to FTBFS if set to the wrong version after an update.
So for Bionic this should be well enough.
While investigating this I noticed a couple change that will cause problems in the next package update for Cosmic.
Upstream had a bug [1] where the lshw.spec file would be out of the
source tree, thus the sources in the orig tarball were expanded into
that lshw-VERSION directory. This is no longer the case and now the
sources are all expanded into the package root, so there is no need for
the 'uver' variable.
Debian has already packaged a newer version [2] (tagged B.02.18.85) and
removed the 'uver' variable.
Until now the upstream tarball used to include a lshw.spec file. That
file was was generated when calling the "release" rule in lshw's
Makefile to create such tarball. Unfortunately Debian's newer orig
tarball seems to have been created differently. Without a generated
lshw.spec file there's nothing in lshw source that contains a reference
to lshw's version.
For now the only way I see to fetch a version is to use the one from the changelog entry, as in:
VERSION=$(dpkg-parsechangelog -SVersion)
Would that be acceptable for Cosmic? If so I will follow up on Debian to
include this fix.
Regards,
Tiago
References:
[1] https://ezix.org/src/pkg/lshw/commit/4af2308ad459924e792f4a09a7374ebae0cde805
[2] https://tracker.debian.org/pkg/lshw
--
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:
Fix Committed
Status in lshw package in Ubuntu:
Fix Released
Status in lshw source package in Bionic:
Fix Committed
Status in lshw package in Debian:
Unknown
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://github.com/lyonel/lshw/commit/2d0296cc31eefaba70f35c8b76af7dfc5f21b387
[2] https://github.com/lyonel/lshw/commit/18edc98f9d08883f340087cfefbdf05c585d56f7
[3] https://github.com/lyonel/lshw/commit/503c76a35a9e97a098af7c1ac793a7e13c07ce70
[Original 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