diff --git a/arm-use-alignment-workaround.patch b/arm-use-alignment-workaround.patch deleted file mode 100644 index 633e5ce..0000000 --- a/arm-use-alignment-workaround.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Jean Delvare -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 ---- - 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 - diff --git a/dmidecode-3.5.tar.xz b/dmidecode-3.5.tar.xz deleted file mode 100644 index 6d2397c..0000000 --- a/dmidecode-3.5.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79d76735ee8e25196e2a722964cf9683f5a09581503537884b256b01389cc073 -size 65068 diff --git a/dmidecode-3.5.tar.xz.sig b/dmidecode-3.5.tar.xz.sig deleted file mode 100644 index 5d34c96..0000000 Binary files a/dmidecode-3.5.tar.xz.sig and /dev/null differ diff --git a/dmidecode-3.6.tar.xz b/dmidecode-3.6.tar.xz new file mode 100644 index 0000000..9fd26c3 --- /dev/null +++ b/dmidecode-3.6.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e40c65f3ec3dafe31ad8349a4ef1a97122d38f65004ed66575e1a8d575dd8bae +size 69284 diff --git a/dmidecode-3.6.tar.xz.sig b/dmidecode-3.6.tar.xz.sig new file mode 100644 index 0000000..099960e Binary files /dev/null and b/dmidecode-3.6.tar.xz.sig differ diff --git a/dmidecode.changes b/dmidecode.changes index ab187bf..0a85f0c 100644 --- a/dmidecode.changes +++ b/dmidecode.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Sun May 19 15:19:23 UTC 2024 - Jean Delvare + +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 + +- 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 diff --git a/dmidecode.spec b/dmidecode.spec index 7c46386..c6aba2a 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,7 +1,7 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: dmidecode -Version: 3.5 +Version: 3.6 Release: 0 Summary: DMI table decoder 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 # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode Source2: %{name}.keyring -Patch1: arm-use-alignment-workaround.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 +Patch1: dmioem-update-hpe-oem-type-238.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: xz 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}%{_mandir}/man8 install -dm 755 %{buildroot}%{_docdir}/%{name} +install -dm 755 %{buildroot}%{_datadir}/bash-completion/completions/ %ifarch ia64 %arm aarch64 for i in dmidecode ; do %else @@ -67,6 +64,7 @@ for i in dmidecode vpddecode ownership biosdecode ; do %endif install -m 755 $i %{buildroot}%{_sbindir}/ install -m 644 man/$i.8 %{buildroot}%{_mandir}/man8/ +install -m 644 completion/$i.bash %{buildroot}%{_datadir}/bash-completion/completions/$i done %files @@ -75,6 +73,7 @@ done %dir %{_docdir}/%{name} %doc AUTHORS NEWS README %{_mandir}/man8/* +%{_datadir}/bash-completion/completions/* %license LICENSE %changelog diff --git a/dmioem-hpe-oem-record-237-firmware-change.patch b/dmioem-hpe-oem-record-237-firmware-change.patch deleted file mode 100644 index 53b28f1..0000000 --- a/dmioem-hpe-oem-record-237-firmware-change.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Jerry Hoemann -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 -Signed-off-by: Jean Delvare ---- - 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: diff --git a/dmioem-update-hpe-oem-type-238.patch b/dmioem-update-hpe-oem-type-238.patch new file mode 100644 index 0000000..1c0a7e0 --- /dev/null +++ b/dmioem-update-hpe-oem-type-238.patch @@ -0,0 +1,39 @@ +From: Jerry Hoemann +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 +Signed-off-by: Jean Delvare +--- + 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]); diff --git a/use-read_file-to-read-from-dump.patch b/use-read_file-to-read-from-dump.patch deleted file mode 100644 index cd1cb93..0000000 --- a/use-read_file-to-read-from-dump.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c76ddda0ba0aa99a55945e3290095c2ec493c892 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -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 -Tested-by: Jerry Hoemann - -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) - {