From 764bf34191481a1f179a873198e3a88791cf40fd Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2020 12:24:38 +0000 Subject: import lshw-B.02.18-15.el7 --- diff --git a/SOURCES/0001-Update-help-message-and-man-page.patch b/SOURCES/0001-Update-help-message-and-man-page.patch new file mode 100644 index 0000000..a79a04b --- /dev/null +++ b/SOURCES/0001-Update-help-message-and-man-page.patch @@ -0,0 +1,47 @@ +From 33951733bb800321780444a178b969c212c65875 Mon Sep 17 00:00:00 2001 +From: Seeteena Thoufeek +Date: Wed, 12 Jul 2017 11:00:43 +0530 +Subject: [PATCH] Update help message and man page + +lshw -dump option displays output on stdout as well as stores SQLite +format data into a file. Lets update man page and help message to +reflect this. + +Signed-off-by: Seeteena Thoufeek +[Updated description - Vasant] +Signed-off-by: Vasant Hegde +Signed-off-by: Lianbo Jiang +--- + src/lshw.1 | 2 +- + src/lshw.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lshw.1 b/src/lshw.1 +index 43239da0bb44..79c36197c32d 100644 +--- a/src/lshw.1 ++++ b/src/lshw.1 +@@ -53,7 +53,7 @@ Outputs the device tree showing hardware paths, very much like the output of HP- + Outputs the device list showing bus information, detailing SCSI, USB, IDE and PCI addresses. + .TP + \fB-dump \fIfilename\fB\fR +-Dump collected information into a file (SQLite database). ++Display output and dump collected information into a file (SQLite database). + .TP + \fB-class \fIclass\fB\fR + Only show the given class of hardware. \fIclass\fR can be found using \fBlshw -short\fR or \fBlshw -businfo\fR\&. +diff --git a/src/lshw.cc b/src/lshw.cc +index 5fc8adefd6fc..219a008df3dd 100644 +--- a/src/lshw.cc ++++ b/src/lshw.cc +@@ -35,7 +35,7 @@ void usage(const char *progname) + fprintf(stderr, _("\t-X use graphical interface\n")); + fprintf(stderr, _("\noptions can be\n")); + #ifdef SQLITE +- fprintf(stderr, _("\t-dump OUTFILE save hardware tree to a file\n")); ++ fprintf(stderr, _("\t-dump filename displays output and dump collected information into a file (SQLite database)\n")); + #endif + fprintf(stderr, _("\t-class CLASS only show a certain class of hardware\n")); + fprintf(stderr, _("\t-C CLASS same as '-class CLASS'\n")); +-- +2.17.1 + diff --git a/SOURCES/0002-Do-not-show-modified-time-with-notime-option.patch b/SOURCES/0002-Do-not-show-modified-time-with-notime-option.patch new file mode 100644 index 0000000..39da3a7 --- /dev/null +++ b/SOURCES/0002-Do-not-show-modified-time-with-notime-option.patch @@ -0,0 +1,43 @@ +From 1553540346701a501f77e73ba45b24e586013584 Mon Sep 17 00:00:00 2001 +From: Seeteena Thoufeek +Date: Thu, 13 Jul 2017 14:18:08 +0530 +Subject: [PATCH] Do not show modified time with -notime option + +Exclude volatile attributes (timestamps) from lshw -notime output. + +Signed-off-by: Seeteena Thoufeek +[Updated description and fixed detect_hfsx() - Vasant] +Signed-off-by: Vasant Hegde +Signed-off-by: Lianbo Jiang +--- + src/core/volumes.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/core/volumes.cc b/src/core/volumes.cc +index 07a253bddbf1..456809a37ae2 100644 +--- a/src/core/volumes.cc ++++ b/src/core/volumes.cc +@@ -651,8 +651,10 @@ static bool detect_hfsx(hwNode & n, source & s) + wtime = (time_t)(be_long(&vol->modifyDate) - HFSTIMEOFFSET); + n.setConfig("created", datetime(mkfstime, false)); // creation time uses local time + if (enabled("output:time")) ++ { + n.setConfig("checked", datetime(fscktime)); +- n.setConfig("modified", datetime(wtime)); ++ n.setConfig("modified", datetime(wtime)); ++ } + + return true; + } +@@ -742,7 +744,7 @@ static bool detect_hfs(hwNode & n, source & s) + n.setConfig("created", datetime(mkfstime - HFSTIMEOFFSET, false)); // all dates use local time + if(dumptime) + n.setConfig("backup", datetime(dumptime - HFSTIMEOFFSET, false)); +- if(wtime) ++ if(wtime && enabled("output:time")) + n.setConfig("modified", datetime(wtime - HFSTIMEOFFSET, false)); + + return true; +-- +2.17.1 + diff --git a/SOURCES/0003-specfile-Fix-version-issue.patch b/SOURCES/0003-specfile-Fix-version-issue.patch new file mode 100644 index 0000000..85b3715 --- /dev/null +++ b/SOURCES/0003-specfile-Fix-version-issue.patch @@ -0,0 +1,43 @@ +From 9f7b7b9edf686b6312a9e72cdc5281c62ddabfac Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Tue, 30 Apr 2019 17:29:07 +0530 +Subject: [PATCH] specfile: Fix version issue + +Current code uses `git describe` to get package version. But we missed +to update specfile. So if we build rpm then `lshw -version` shows +"unknown". + +This patch adds "VERSION" compilation flag in specfile. So that we +get proper output. + +Signed-off-by: Mamatha Inamdar +[Updated description and updated "without_gui" section - Vasant] +Signed-off-by: Vasant Hegde +Signed-off-by: Lianbo Jiang +--- + lshw.spec.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lshw.spec.in b/lshw.spec.in +index f7f88b323ce9..0e4797baab56 100644 +--- a/lshw.spec.in ++++ b/lshw.spec.in +@@ -57,6 +57,7 @@ http://lshw.ezix.org/ + SBINDIR="%{_sbindir}" \ + MANDIR="%{_mandir}" \ + DATADIR="%{_datadir}" \ ++ VERSION="%{version}" \ + all + %if %{!?_without_gui:1}0 + %{__make} %{?_smp_mflags} \ +@@ -64,6 +65,7 @@ http://lshw.ezix.org/ + SBINDIR="%{_sbindir}" \ + MANDIR="%{_mandir}" \ + DATADIR="%{_datadir}" \ ++ VERSION="%{version}" \ + gui + %endif + +-- +2.17.1 + diff --git a/SPECS/lshw.spec b/SPECS/lshw.spec index 4c59a25..c57d751 100644 --- a/SPECS/lshw.spec +++ b/SPECS/lshw.spec @@ -1,7 +1,7 @@ Summary: HardWare LiSter Name: lshw Version: B.02.18 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2 Group: Applications/System URL: http://ezix.org/project/wiki/HardwareLiSter @@ -96,6 +96,9 @@ Patch84: 0010-update-id-files.patch Patch85: 0001-merge-Github-PR44.patch Patch86: 0002-Fix-lshw-crashes-with-SEGV-in-privileged-containers.patch Patch87: 0003-Display-proper-logical-name-of-network-device.patch +Patch88: 0001-Update-help-message-and-man-page.patch +Patch89: 0002-Do-not-show-modified-time-with-notime-option.patch +Patch90: 0003-specfile-Fix-version-issue.patch BuildRequires: sqlite-devel Requires: hwdata @@ -225,6 +228,9 @@ http://lshw.ezix.org/ %patch85 -p1 %patch86 -p1 %patch87 -p1 +%patch88 -p1 +%patch89 -p1 +%patch90 -p1 %build make %{?_smp_mflags} SBINDIR="%{_sbindir}" RPM_OPT_FLAGS="%{optflags}" SQLITE=1 gui @@ -294,6 +300,11 @@ rm -rf %{buildroot}%{_datadir}/locale/fr/ %{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy %changelog +* Thu Mar 19 2020 Lianbo Jiang - B.02.18-15 +- Update help message and man page +- Do not show modified time with -notime option +- specfile: Fix version issue + * Fri Aug 02 2019 Lianbo Jiang - B.02.18-14 - Add a class 'nvme' for NVMe devices - Fix lshw crashes with SEGV in privileged containers