Accepting request 895505 from hardware

- Update to version B.02.19+git.20210429:
  * Fix getting size of memory banks <32GiB
  * devtree: Add UUID property
  * code clean-up
  * improve portability (esp. musl)
  * fix potential crash
  * add static target to Makefile
  * Avoid crash on device-tree parsing
  * Add JEDEC manufacturer
  * Report correct memory size on SMBIOS < 2.7
  * fix man page after previous update
- Drop no longer needed patches:
  * lshw-fix-segfault-in-apfs-volume-code.patch
  * lshw-fix-mmc.patch
  * lshw-fix-ppc.patch
  * lshw-devtree-Add-UUID-property.patch

OBS-URL: https://build.opensuse.org/request/show/895505
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lshw?expand=0&rev=20
This commit is contained in:
Dominique Leuenberger 2021-06-01 08:36:59 +00:00 committed by Git OBS Bridge
commit 2f6703dc7a
11 changed files with 50 additions and 150 deletions

14
_service Normal file
View File

@ -0,0 +1,14 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/lyonel/lshw.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="versionformat">@PARENT_TAG@+git.%cd</param>
</service>
<service mode="disabled" name="set_version"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/lyonel/lshw.git</param>
<param name="changesrevision">74e23540335254b8fca6a81cc891c52d96937d40</param></service></servicedata>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:487650839bb664738e49593979a88e62acb4d1555c5d0f2e99971a3eb87a735c
size 9017357

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80
size 2467937

View File

@ -1,32 +0,0 @@
From 9c5c2f0706db330114ff4624e0931ac40c1d6fe2 Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Wed, 20 Jan 2021 11:28:47 +0530
Subject: [PATCH] devtree: Add UUID property
References: bsc#1181411 ltc#191040
Upstrem: accepted
Git-commit: 9c5c2f0706db330114ff4624e0931ac40c1d6fe2
Add UUID property to PowerVM LPAR.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
src/core/device-tree.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
index d3188c6a8a27..7df6a4ee074c 100644
--- a/src/core/device-tree.cc
+++ b/src/core/device-tree.cc
@@ -1503,6 +1503,8 @@ bool scan_device_tree(hwNode & n)
scan_devtree_bootrom(*core);
if (exists(DEVICETREE "/ibm,lpar-capable")) {
n.setDescription("pSeries LPAR");
+ if (exists( DEVICETREE "/ibm,partition-uuid"))
+ n.setConfig("uuid", get_string(DEVICETREE "/ibm,partition-uuid"));
scan_devtree_cpu_power(*core);
}
else {
--
2.26.2

View File

@ -1,52 +0,0 @@
From 2524bb3def3009e53a78e600bbea2c4639dc1e99 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 24 Apr 2020 15:02:44 +0200
Subject: [PATCH] Fix type used for read to ssize_t.
Function declaration:
ssize_t read(int fd, void *buf, size_t count);
With size_t the following expression is always true:
while ((count = read(cpuinfo, buffer, sizeof(buffer))) > 0)
and bad things happen.
---
src/core/cpuinfo.cc | 2 +-
src/core/osutils.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
index eceb83a..3dbdd0c 100644
--- a/src/core/cpuinfo.cc
+++ b/src/core/cpuinfo.cc
@@ -589,7 +589,7 @@ bool scan_cpuinfo(hwNode & n)
if (core)
{
char buffer[1024];
- size_t count;
+ ssize_t count;
string cpuinfo_str = "";
string description = "", version = "";
string plat = platform();
diff --git a/src/core/osutils.cc b/src/core/osutils.cc
index f023a46..a53ed89 100644
--- a/src/core/osutils.cc
+++ b/src/core/osutils.cc
@@ -148,7 +148,7 @@ vector < string > &list)
{
char buffer[1024];
string buffer_str = "";
- size_t count = 0;
+ ssize_t count = 0;
data_file fd = file_open(file);
if (file_open_error(fd))
@@ -174,7 +174,7 @@ const string & def)
if (fd >= 0)
{
char buffer[1024];
- size_t count = 0;
+ ssize_t count = 0;
memset(buffer, 0, sizeof(buffer));
result = "";

View File

@ -1,23 +0,0 @@
From 3775782808e8b9b8aa72ed2ce23e145433e193cf Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Wed, 27 May 2020 01:16:20 +0200
Subject: [PATCH] report product model on Power systems
Github PR #54
---
src/core/device-tree.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
index e7227e1..027ad16 100644
--- a/src/core/device-tree.cc
+++ b/src/core/device-tree.cc
@@ -1396,7 +1396,7 @@ static void get_ibm_model(hwNode & n)
{
if (ibm_model_defs[i].model == machinetype || ibm_model_defs[i].model == model)
{
- n.setProduct(ibm_model_defs[i].modelname);
+ n.setProduct(n.getProduct() + " (" + ibm_model_defs[i].modelname + ")");
n.addHint("icon", string(ibm_model_defs[i].icon));
n.setConfig("chassis", ibm_model_defs[i].chassis);
return;

View File

@ -1,28 +0,0 @@
From 82df4fa7d3705f2f61282ed5b22074d4e0a6efc4 Mon Sep 17 00:00:00 2001
From: Harry Mallon <hjmallon@gmail.com>
Date: Thu, 23 Apr 2020 21:18:47 +0100
Subject: [PATCH] volumes: fix segfault in apfs volume code
---
src/core/volumes.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
index e703523..6fce2ee 100644
--- a/src/core/volumes.cc
+++ b/src/core/volumes.cc
@@ -784,12 +784,13 @@ struct apfs_super_block {
static bool detect_apfs(hwNode & n, source & s)
{
- static char buffer[sizeof(apfs_super_block)];
+ static char buffer[APFS_STANDARD_BLOCK_SIZE];
source apfsvolume;
apfs_super_block *sb = (apfs_super_block*)buffer;
unsigned long block_size;
apfsvolume = s;
+ apfsvolume.blocksize = APFS_STANDARD_BLOCK_SIZE;
if(readlogicalblocks(apfsvolume, buffer, 0, 1)!=1)
return false;

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Wed May 26 09:43:10 UTC 2021 - Martin Pluskal <mpluskal@suse.com>
- Update to version B.02.19+git.20210429:
* Fix getting size of memory banks <32GiB
* devtree: Add UUID property
* code clean-up
* improve portability (esp. musl)
* fix potential crash
* add static target to Makefile
* Avoid crash on device-tree parsing
* Add JEDEC manufacturer
* Report correct memory size on SMBIOS < 2.7
* fix man page after previous update
- Drop no longer needed patches:
* lshw-fix-segfault-in-apfs-volume-code.patch
* lshw-fix-mmc.patch
* lshw-fix-ppc.patch
* lshw-devtree-Add-UUID-property.patch
-------------------------------------------------------------------
Tue Jan 26 15:38:36 UTC 2021 - Michal Suchanek <msuchanek@suse.de>

5
lshw.obsinfo Normal file
View File

@ -0,0 +1,5 @@
name: lshw
version: B.02.19+git.20210429
mtime: 1619707237
commit: 74e23540335254b8fca6a81cc891c52d96937d40

View File

@ -18,29 +18,21 @@
Name: lshw
Version: B.02.19.2
Version: B.02.19+git.20210429
Release: 0
Summary: HardWare LiSter
License: GPL-2.0-only
Group: Hardware/Other
URL: https://www.ezix.org/project/wiki/HardwareLiSter
Source: https://www.ezix.org/software/files/lshw-%{version}.tar.gz
Source: lshw-%{version}.tar.gz
Source1: lshw.desktop.in
Source2: lshw.png
# PATCH-FIX-UPSTREAM - https://ezix.org/src/pkg/lshw/pulls/32 - boo#1168865 and boo#1169668
Patch1: lshw-fix-segfault-in-apfs-volume-code.patch
# PATCH-FIX-UPSTREAM - https://github.com/lyonel/lshw/pull/52 - boo#1169668
Patch2: lshw-fix-mmc.patch
# PATCH-FIX-UPSTREAM - https://github.com/lyonel/lshw/commit/3775782808e8b9b8aa72ed2ce23e145433e193cf - boo#1172156
Patch3: lshw-fix-ppc.patch
# PATCH-FIX-UPSTREAM - https://ezix.org/src/pkg/lshw/commit/9c5c2f0706db330114ff4624e0931ac40c1d6fe2 - bsc#1181411
Patch4: lshw-devtree-Add-UUID-property.patch
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gtk+-2.0) >= 2.4
BuildRequires: pkgconfig(gtk+-3.0)
Recommends: hwdata
%lang_package
@ -82,7 +74,7 @@ included documentation or go to the lshw Web page,
http://www.ezix.org/software/lshw.html
%prep
%autosetup -p1
%autosetup
%build