From ac91b8df2d9262b3f730a65c07cbce70d47a50c6 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 11 May 2022 18:29:35 +0800 Subject: [PATCH] update to dmidecode-3.3-4.el8.src.rpm Signed-off-by: Liwei Ge --- ...ssor-upgrades-from-SMBIOS-spec-3.4.0.patch | 34 +++++++++++++++++++ ...-device-types-from-SMBIOS-spec-3.4.0.patch | 6 ++-- 0007-dmidecode-Fix-crash-with-u-option.patch | 34 +++++++++++++++++++ dmidecode.spec | 31 ++++++++--------- 4 files changed, 87 insertions(+), 18 deletions(-) create mode 100644 0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch rename 1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch => 0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch (85%) create mode 100644 0007-dmidecode-Fix-crash-with-u-option.patch diff --git a/0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch b/0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch new file mode 100644 index 0000000..94de9a6 --- /dev/null +++ b/0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch @@ -0,0 +1,34 @@ +From b3b4c29f38b29a6ac3779ff97363d42fd3061c4a Mon Sep 17 00:00:00 2001 +From: Prabhakar pujeri +Date: Mon, 19 Oct 2020 14:38:04 +0200 +Subject: [PATCH] Add new processor upgrades from SMBIOS spec 3.4.0 + +Added 2 more new values (0x3D and 0x3E). + +Signed-off-by: Coiby Xu +--- + dmidecode.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 97ba941..eb5a5af 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -1355,10 +1355,12 @@ static const char *dmi_processor_upgrade(u8 code) + "Socket LGA2066", + "Socket BGA1392", + "Socket BGA1510", +- "Socket BGA1528" /* 0x3C */ ++ "Socket BGA1528", ++ "Socket LGA4189", ++ "Socket LGA1200" /* 0x3E */ + }; + +- if (code >= 0x01 && code <= 0x3C) ++ if (code >= 0x01 && code <= 0x3E) + return upgrade[code - 0x01]; + return out_of_spec; + } +-- +2.31.1 + diff --git a/1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch b/0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch similarity index 85% rename from 1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch rename to 0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch index fda0684..3b630ce 100644 --- a/1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch +++ b/0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch @@ -1,9 +1,11 @@ From 7e25483a392e292c58cea67ba4d052856c2f35d0 Mon Sep 17 00:00:00 2001 From: Prabhakar pujeri Date: Mon, 19 Oct 2020 14:38:04 +0200 -Subject: Add new memory device types from SMBIOS spec 3.4.0 +Subject: [PATCH] Add new memory device types from SMBIOS spec 3.4.0 Added 2 more new values (0x22 and 0x23). + +Signed-off-by: Coiby Xu --- dmidecode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) @@ -28,5 +30,5 @@ index 8b6f5af..97ba941 100644 return out_of_spec; } -- -cgit v1.2.1 +2.31.1 diff --git a/0007-dmidecode-Fix-crash-with-u-option.patch b/0007-dmidecode-Fix-crash-with-u-option.patch new file mode 100644 index 0000000..a955edc --- /dev/null +++ b/0007-dmidecode-Fix-crash-with-u-option.patch @@ -0,0 +1,34 @@ +From 11e134e54d15e67a64c39a623f492a28df922517 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 19 Jan 2021 16:26:01 +0100 +Subject: [PATCH] dmidecode: Fix crash with -u option + +A segmentation fault was reported with option -u. Turns out to be a +stupid thinko where the buffer offset was reset at the wrong loop +depth. + +Reported-by: Jerry Hoemann +Fixes: da06888d08b9 ("dmidecode: Use the print helpers in dump mode too") +Signed-off-by: Jean Delvare +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 572cb1a..69ea0e8 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -248,9 +248,9 @@ static void dmi_dump(const struct dmi_header *h) + { + int j, l = strlen(s) + 1; + +- off = 0; + for (row = 0; row < ((l - 1) >> 4) + 1; row++) + { ++ off = 0; + for (j = 0; j < 16 && j < l - (row << 4); j++) + off += sprintf(raw_data + off, + j ? " %02X" : "%02X", +-- +2.31.0 + diff --git a/dmidecode.spec b/dmidecode.spec index 1cd59fd..e911b40 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,8 +1,7 @@ -%define anolis_release .0.1 Summary: Tool to analyse BIOS DMI data Name: dmidecode Version: 3.3 -Release: 1%{anolis_release}%{?dist} +Release: 4%{?dist} Epoch: 1 License: GPLv2+ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz @@ -12,13 +11,13 @@ Patch0: 0001-dmidecode-Add-new-system-slot-types-from-SMBIOS-spec.patch Patch1: 0002-dmidecode-Add-new-processor-characteristics-bits-from-SMBIOS-s.patch Patch2: 0003-dmidecode-Missing-comma-in-the-dmi_slot_type.patch Patch3: 0004-dmidecode-Skip-details-of-uninstalled-memory-modules.patch +Patch4: 0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch +Patch5: 0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch +Patch6: 0007-dmidecode-Fix-crash-with-u-option.patch -# http://git.savannah.nongnu.org/cgit/dmidecode.git/patch/?id=7e25483a392e292c58cea67ba4d052856c2f35d0 -Patch1000: 1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch BuildRequires: gcc make -ExclusiveArch: %{ix86} x86_64 ia64 aarch64 loongarch64 - +ExclusiveArch: %{ix86} x86_64 ia64 aarch64 %description dmidecode reports information about x86 & ia64 hardware as described in the @@ -32,12 +31,7 @@ slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB). %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch1000 -p1 +%autosetup %build make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" @@ -50,7 +44,7 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %{!?_licensedir:%global license %%doc} %license LICENSE %{_sbindir}/dmidecode -%ifnarch ia64 aarch64 loongarch64 +%ifnarch ia64 aarch64 %{_sbindir}/vpddecode %{_sbindir}/ownership %{_sbindir}/biosdecode @@ -58,9 +52,14 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %{_mandir}/man8/* %changelog -* Thu Apr 21 2022 Weitao Zhou - 1:3.3-1.0.1 -- Patch: dmidecode Add new memory device types from SMBIOS spec 3.4.0 -- Support loongarch64 +* Wed Jan 26 2022 Coiby Xu - 1:3.3-4 +- Resolves: rhbz#2042224 + +* Wed Jan 05 2022 Coiby Xu - 1:3.3-3 +- Resolves: rhbz#2027665 + +* Tue Nov 10 2021 Coiby Xu - 1:3.3-2 +- Resolves: rhbz#1996651 * Tue Nov 9 2021 Coiby Xu - 1:3.3-1 - Rebase to upsteam 3.3 -- Gitee