Accepting request 1175720 from home:jdelvare:branches:Base:System

- Update to upstream version 3.6:
  * Support for SMBIOS 3.6.0. This includes new memory device types, new
    processor upgrades, and Loongarch support.
  * Support for SMBIOS 3.7.0. This includes new port types, new processor
    upgrades, new slot characteristics and new fields for memory modules.
  * Add bash completion.
  * Decode HPE OEM records 197, 239 and 245.
  * Implement options --list-strings and --list-types.
  * Update HPE OEM records 203, 212, 216, 221, 233, 236, 238 and 242.
  * Update Redfish support.
  * Bug fixes:
    Fix enabled slot characteristics not being printed
  * Minor improvements:
    Print slot width on its own line
    Use standard strings for slot width
  * Obsoletes arm-use-alignment-workaround.patch,
    dmioem-hpe-oem-record-237-firmware-change.patch and
    use-read_file-to-read-from-dump.patch.
- dmioem-update-hpe-oem-type-238.patch: Decode PCI bus segment in
  HPE type 238 records.
- Drop legacy Provides: and Obsoletes: tags. The split from the
  pmtools package happened 15 years ago so they are no longer
  relevant.

OBS-URL: https://build.opensuse.org/request/show/1175720
OBS-URL: https://build.opensuse.org/package/show/Base:System/dmidecode?expand=0&rev=75
This commit is contained in:
Jean Delvare 2024-05-24 11:59:11 +00:00 committed by Git OBS Bridge
parent f649c1b70b
commit 43a9af660e
10 changed files with 81 additions and 132 deletions

View File

@ -1,25 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: Use -DALIGNMENT_WORKAROUND on arm as well
Git-commit: a85ed8540993f4cba831e1d1d0224ba6640d9c4b
The arm build log shows a lot warnings about casts increasing the
required alignment of target type. This suggests that this
architecture needs to use the slower byte access which is enabled by
-DALIGNMENT_WORKAROUND.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- dmidecode-3.5.orig/config.h
+++ dmidecode-3.5/config.h
@@ -22,7 +22,7 @@
#endif
/* Use memory alignment workaround or not */
-#ifdef __ia64__
+#if defined(__ia64__) || defined(__arm__)
#define ALIGNMENT_WORKAROUND
#endif

BIN
dmidecode-3.5.tar.xz (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

3
dmidecode-3.6.tar.xz Normal file
View File

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

BIN
dmidecode-3.6.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Sun May 19 15:19:23 UTC 2024 - Jean Delvare <jdelvare@suse.com>
Update for HPE servers from upstream:
- dmioem-update-hpe-oem-type-238.patch: Decode PCI bus segment in
HPE type 238 records.
- Drop legacy Provides: and Obsoletes: tags. The split from the
pmtools package happened 15 years ago so they are no longer
relevant.
-------------------------------------------------------------------
Thu Apr 25 12:41:17 UTC 2024 - Jean Delvare <jdelvare@suse.com>
- Update to upstream version 3.6:
* Support for SMBIOS 3.6.0. This includes new memory device types, new
processor upgrades, and Loongarch support.
* Support for SMBIOS 3.7.0. This includes new port types, new processor
upgrades, new slot characteristics and new fields for memory modules.
* Add bash completion.
* Decode HPE OEM records 197, 239 and 245.
* Implement options --list-strings and --list-types.
* Update HPE OEM records 203, 212, 216, 221, 233, 236, 238 and 242.
* Update Redfish support.
* Bug fixes:
Fix enabled slot characteristics not being printed
* Minor improvements:
Print slot width on its own line
Use standard strings for slot width
* Obsoletes arm-use-alignment-workaround.patch,
dmioem-hpe-oem-record-237-firmware-change.patch and
use-read_file-to-read-from-dump.patch.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 26 07:51:57 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org> Mon Feb 26 07:51:57 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
# #
# spec file for package dmidecode # spec file for package dmidecode
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: dmidecode Name: dmidecode
Version: 3.5 Version: 3.6
Release: 0 Release: 0
Summary: DMI table decoder Summary: DMI table decoder
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -27,11 +27,7 @@ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{vers
Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.sig Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.sig
# https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode
Source2: %{name}.keyring Source2: %{name}.keyring
Patch1: arm-use-alignment-workaround.patch Patch1: dmioem-update-hpe-oem-type-238.patch
Patch2: dmioem-hpe-oem-record-237-firmware-change.patch
Patch3: use-read_file-to-read-from-dump.patch
Provides: pmtools:%{_sbindir}/dmidecode
Obsoletes: pmtools < 20071117
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: xz BuildRequires: xz
ExclusiveArch: %ix86 ia64 x86_64 %arm aarch64 ExclusiveArch: %ix86 ia64 x86_64 %arm aarch64
@ -60,6 +56,7 @@ CFLAGS="%{optflags}" make %{?_smp_mflags}
install -dm 755 %{buildroot}%{_sbindir} install -dm 755 %{buildroot}%{_sbindir}
install -dm 755 %{buildroot}%{_mandir}/man8 install -dm 755 %{buildroot}%{_mandir}/man8
install -dm 755 %{buildroot}%{_docdir}/%{name} install -dm 755 %{buildroot}%{_docdir}/%{name}
install -dm 755 %{buildroot}%{_datadir}/bash-completion/completions/
%ifarch ia64 %arm aarch64 %ifarch ia64 %arm aarch64
for i in dmidecode ; do for i in dmidecode ; do
%else %else
@ -67,6 +64,7 @@ for i in dmidecode vpddecode ownership biosdecode ; do
%endif %endif
install -m 755 $i %{buildroot}%{_sbindir}/ install -m 755 $i %{buildroot}%{_sbindir}/
install -m 644 man/$i.8 %{buildroot}%{_mandir}/man8/ install -m 644 man/$i.8 %{buildroot}%{_mandir}/man8/
install -m 644 completion/$i.bash %{buildroot}%{_datadir}/bash-completion/completions/$i
done done
%files %files
@ -75,6 +73,7 @@ done
%dir %{_docdir}/%{name} %dir %{_docdir}/%{name}
%doc AUTHORS NEWS README %doc AUTHORS NEWS README
%{_mandir}/man8/* %{_mandir}/man8/*
%{_datadir}/bash-completion/completions/*
%license LICENSE %license LICENSE
%changelog %changelog

View File

@ -1,39 +0,0 @@
From: Jerry Hoemann <jerry.hoemann@hpe.com>
Date: Mon, 3 Apr 2023 10:15:12 +0200
Subject: dmioem: HPE OEM Record 237 Firmware change
Git-ommit: 80de376231e903d2cbea95e51ffea31860502159
HPE OEM record type 237 offset 0x09 field was changed from a single
byte STRING to a two byte WORD representing date.
Fixes: cdab638dabb7 ("dmioem: Decode HPE OEM Record 237")
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmioem.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- dmidecode-3.5.orig/dmioem.c
+++ dmidecode-3.5/dmioem.c
@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dm
* 0x06 | Manufacture|STRING | DIMM Manufacturer
* 0x07 | Part Number|STRING | DIMM Manufacturer's Part Number
* 0x08 | Serial Num |STRING | DIMM Vendor Serial Number
- * 0x09 | Spare Part |STRING | DIMM Spare Part Number
+ * 0x09 | Man Date | BYTE | DIMM Manufacture Date (YEAR) in BCD
+ * 0x0A | Man Date | BYTE | DIMM Manufacture Date (WEEK) in BCD
*/
if (gen < G9) return 0;
pr_handle_name("%s DIMM Vendor Information", company);
@@ -1105,8 +1106,9 @@ static int dmi_decode_hp(const struct dm
pr_attr("DIMM Manufacturer Part Number", "%s", dmi_string(h, data[0x07]));
if (h->length < 0x09) break;
pr_attr("DIMM Vendor Serial Number", "%s", dmi_string(h, data[0x08]));
- if (h->length < 0x0A) break;
- pr_attr("DIMM Spare Part Number", "%s", dmi_string(h, data[0x09]));
+ if (h->length < 0x0B) break;
+ if (WORD(data + 0x09))
+ pr_attr("DIMM Manufacture Date", "20%02x-W%02x", data[0x09], data[0x0A]);
break;
case 238:

View File

@ -0,0 +1,39 @@
From: Jerry Hoemann <jerry.hoemann@hpe.com>
Date: Thu, 16 May 2024 13:12:43 +0200
Subject: dmioem: Update HPE OEM Type 238
Git-commit: 190a23ecfd6d743cb6efbc04bb4d95f0584fd68d
Patch-mainline: yes
New field: PCI Segment Number.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmioem.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- dmidecode-3.6.orig/dmioem.c
+++ dmidecode-3.6/dmioem.c
@@ -1346,14 +1346,20 @@ static int dmi_decode_hp(const struct dm
* 0x0C | Parent Hub | BYTE | Instance number of internal Hub
* 0x0D | Port Speed | BYTE | Enumerated value of speed configured by BIOS
* 0x0E | Device Path| STRING| UEFI Device Path of USB endpoint
+ * 0x0F | PCI Seg | WORD | PCI Segment number of the USB controller
*/
if (gen < G9) return 0;
pr_handle_name("%s Proliant USB Port Connector Correlation Record", company);
if (h->length < 0x0F) break;
if (!(opt.flags & FLAG_QUIET))
pr_attr("Associated Handle", "0x%04X", WORD(data + 0x4));
- pr_attr("PCI Device", "%02x:%02x.%x", data[0x6],
- data[0x7] >> 3, data[0x7] & 0x7);
+ if (h->length < 0x11)
+ pr_attr("PCI Device", "%02x:%02x.%x", data[0x6],
+ data[0x7] >> 3, data[0x7] & 0x7);
+ else
+ pr_attr("PCI Device", "%04x:%02x:%02x.%x",
+ WORD(data + 0xF), data[0x6],
+ data[0x7] >> 3, data[0x7] & 0x7);
dmi_hp_238_loc("Location", data[0x8]);
dmi_hp_238_flags("Management Port", WORD(data + 0x9));
pr_attr("Port Instance", "%d", data[0xB]);

View File

@ -1,58 +0,0 @@
From c76ddda0ba0aa99a55945e3290095c2ec493c892 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Wed, 26 Apr 2023 15:44:27 +0200
Subject: [PATCH] Consistently use read_file() when reading from a dump file
Use read_file() instead of mem_chunk() to read the entry point from a
dump file. This is faster, and consistent with how we then read the
actual DMI table from that dump file.
This made no functional difference so far, which is why it went
unnoticed for years. But now that a file type check was added to the
mem_chunk() function, we must stop using it to read from regular
files.
This will again allow root to use the --from-dump option.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jerry Hoemann <jerry.hoemann@hpe.com>
diff --git a/dmidecode.c b/dmidecode.c
index 54f59c163daf..52ddbf1a51bd 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -6025,17 +6025,25 @@ int main(int argc, char * const argv[])
pr_comment("dmidecode %s", VERSION);
/* Read from dump if so instructed */
+ size = 0x20;
if (opt.flags & FLAG_FROM_DUMP)
{
if (!(opt.flags & FLAG_QUIET))
pr_info("Reading SMBIOS/DMI data from file %s.",
opt.dumpfile);
- if ((buf = mem_chunk(0, 0x20, opt.dumpfile)) == NULL)
+ if ((buf = read_file(0, &size, opt.dumpfile)) == NULL)
{
ret = 1;
goto exit_free;
}
+ /* Truncated entry point can't be processed */
+ if (size < 0x20)
+ {
+ ret = 1;
+ goto done;
+ }
+
if (memcmp(buf, "_SM3_", 5) == 0)
{
if (smbios3_decode(buf, opt.dumpfile, 0))
@@ -6059,7 +6067,6 @@ int main(int argc, char * const argv[])
* contain one of several types of entry points, so read enough for
* the largest one, then determine what type it contains.
*/
- size = 0x20;
if (!(opt.flags & FLAG_NO_SYSFS)
&& (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL)
{