From 7c0ae04e4e972b55f5bea96281272ad1aec151ce Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 6 Oct 2021 09:34:03 -0400 Subject: [PATCH] import lsscsi-0.32-3.el8 --- SOURCES/lsscsi-0.33-wwn-trunc.patch | 25 +++++++++++++++++++++++++ SPECS/lsscsi.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 SOURCES/lsscsi-0.33-wwn-trunc.patch diff --git a/SOURCES/lsscsi-0.33-wwn-trunc.patch b/SOURCES/lsscsi-0.33-wwn-trunc.patch new file mode 100644 index 0000000..c8c05e9 --- /dev/null +++ b/SOURCES/lsscsi-0.33-wwn-trunc.patch @@ -0,0 +1,25 @@ +From c13c9d3a90aec4779a0cbe484913f24bce947ab1 Mon Sep 17 00:00:00 2001 +From: Wenchao Hao +Date: Tue, 8 Jun 2021 16:26:04 +0800 +Subject: [PATCH] Fix lsscsi wwn number output error + +The true wwn number is from the sixth byte of scsi-* + +Signed-off-by: Wenchao Hao +--- + src/lsscsi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lsscsi.c b/src/lsscsi.c +index 6f6953f..2be3ab9 100644 +--- a/src/lsscsi.c ++++ b/src/lsscsi.c +@@ -1515,7 +1515,7 @@ collect_disk_wwn_nodes(void) + + cur_ent = &cur_list->nodes[cur_list->count]; + my_strcopy(cur_ent->wwn, "0x", 3); +- my_strcopy(cur_ent->wwn + 2, dep->d_name + 5, ++ my_strcopy(cur_ent->wwn + 2, dep->d_name + 6, + sizeof(cur_ent->wwn) - 2); + my_strcopy(cur_ent->disk_bname, basename(symlink_path), + sizeof(cur_ent->disk_bname)); diff --git a/SPECS/lsscsi.spec b/SPECS/lsscsi.spec index f8c2dcc..88ad289 100644 --- a/SPECS/lsscsi.spec +++ b/SPECS/lsscsi.spec @@ -1,13 +1,15 @@ Summary: List SCSI devices (or hosts) and associated information Name: lsscsi Version: 0.32 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System # official git repository: https://github.com/doug-gilbert/lsscsi Source0: http://sg.danny.cz/scsi/%{name}-%{version}.tgz URL: http://sg.danny.cz/scsi/lsscsi.html Patch0: lsscsi-0.32-fix-uninitialized-variable.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1981038 +Patch1: lsscsi-0.33-wwn-trunc.patch %description Uses information provided by the sysfs pseudo file system in Linux kernel @@ -38,6 +40,9 @@ make DESTDIR=%{buildroot} install %changelog +* Mon Aug 16 2021 Tomas Bzatek - 0.32-3 +- Fix WWN ID truncation (#1981038) + * Wed Nov 11 2020 Tomas Bzatek - 0.32-2 - Fix an unitialized variable (Covscan)