Release B.02.20-3

Update lshw to upstream latest(af7c69e1b6e)

Resolves: RHEL-114950

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2025-10-22 10:38:19 +13:00
parent 8fe917f771
commit a2f7326461
4 changed files with 124 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From c17d8837aa2387207c353529c0910d9cfbc81bb1 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Mon, 28 Jul 2025 22:27:57 +0200
Subject: [PATCH 1/3] fix not closing fd during framebuffer detection
patch from Rafi Wiener (github PR#106)
---
src/core/fb.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index d198982..465c899 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -233,6 +233,7 @@ bool scan_fb(hwNode & n)
if (fd[i] >= 0)
{
+ fbdevs++;
hwNode *fbdev = NULL;
struct fb_fix_screeninfo fbi;
@@ -335,7 +336,8 @@ bool scan_fb(hwNode & n)
for (unsigned int j = 0; j < fbdevs; j++)
{
- close(fd[j]);
+ if (fd[j] >= 0)
+ close(fd[j]);
}
return false;
--
2.47.0

View File

@ -0,0 +1,56 @@
From 8798c9f1a2f62b02188be155badacffb229c69a6 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Mon, 28 Jul 2025 23:16:15 +0200
Subject: [PATCH 2/3] improve fb detection
based on github PR#106
---
src/core/fb.cc | 7 +++++++
src/core/sysfs.cc | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index 465c899..85c2d17 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -6,6 +6,8 @@
#include "version.h"
#include "fb.h"
+#include "sysfs.h"
+#include "osutils.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -239,11 +241,16 @@ bool scan_fb(hwNode & n)
if (ioctl(fd[i], FBIOGET_FSCREENINFO, &fbi) == 0)
{
+ fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)).businfo());
+
+ if(!fbdev)
+ {
fbdev =
n.
findChildByResource(hw::resource::
iomem((unsigned long) fbi.smem_start,
fbi.smem_len));
+ }
if (fbdev)
{
diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc
index fda1e9b..f7296a3 100644
--- a/src/core/sysfs.cc
+++ b/src/core/sysfs.cc
@@ -189,6 +189,7 @@ static string sysfstobusinfo(const string & path)
string entry::businfo() const
{
+ if(!This) return "";
string result = sysfstobusinfo(This->devpath);
if (result.empty())
result = sysfstobusinfo(dirname(This->devpath));
--
2.47.0

View File

@ -0,0 +1,26 @@
From af7c69e1b6e9bfc81aef1c167f18d1515f413963 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Tue, 9 Sep 2025 23:30:06 +0200
Subject: [PATCH 3/3] another try at fixing the Github fbdev issue
cf. previous commit
---
src/core/fb.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index 85c2d17..d32434c 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -241,7 +241,7 @@ bool scan_fb(hwNode & n)
if (ioctl(fd[i], FBIOGET_FSCREENINFO, &fbi) == 0)
{
- fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)).businfo());
+ fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)+"/device").businfo());
if(!fbdev)
{
--
2.47.0

View File

@ -2,7 +2,7 @@
Summary: Hardware lister
Name: lshw
Version: B.02.20
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2
URL: http://ezix.org/project/wiki/HardwareLiSter
Source0: http://www.ezix.org/software/files/lshw-%{version}.tar.gz
@ -15,6 +15,9 @@ Patch11: 0003-update-changelog.patch
Patch12: 0004-escape-in-JSON-output.patch
Patch13: 0005-merge-Github-PR-101.patch
Patch14: 0001-merge-Github-PR-103.patch
Patch15: 0001-fix-not-closing-fd-during-framebuffer-detection.patch
Patch16: 0002-improve-fb-detection.patch
Patch17: 0003-another-try-at-fixing-the-Github-fbdev-issue.patch
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc
@ -94,6 +97,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
%changelog
* Wed Oct 22 2025 Tao Liu <ltao@redhat.com> - B.02.20-3
- Release B.02.20-3 update to upstream latest(af7c69e1b6e)
* Mon May 5 2025 Tao Liu <ltao@redhat.com> - B.02.20-2
- Release B.02.20-2 update to upstream latest(98b74f64e76)