From 3f32d07ac785e7c6e7ac1fab749213b1221ed8e2 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Tue, 6 Aug 2024 16:26:54 +0800 Subject: [PATCH] Release dmidecode-3.6-1 Resolves: RHEL-10389 Signed-off-by: Lichen Liu --- .gitignore | 1 + ...-processor-support-from-SMBIOS-3.6.0.patch | 72 ------------------- ...-read_file-when-reading-from-a-dump-.patch | 64 ----------------- ...xpand-list-of-recognized-CPU-sockets.patch | 45 ------------ dmidecode.spec | 19 ++--- sources | 1 + 6 files changed, 12 insertions(+), 190 deletions(-) delete mode 100644 0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch delete mode 100644 0002-Consistently-use-read_file-when-reading-from-a-dump-.patch delete mode 100644 0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch diff --git a/.gitignore b/.gitignore index fd59755..a6f1323 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /dmidecode-3.2.tar.xz /dmidecode-3.3.tar.xz /dmidecode-3.5.tar.xz +/dmidecode-3.6.tar.xz diff --git a/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch b/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch deleted file mode 100644 index f6c720c..0000000 --- a/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch +++ /dev/null @@ -1,72 +0,0 @@ -From ac65cf23af7cccecb4175d3c13460928e8e2f51d Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Fri, 26 May 2023 17:41:51 +0200 -Subject: [PATCH] dmidecode: Add processor support from SMBIOS 3.6.0 - -SMBIOS 3.6.0 adds the following to the Processor Information -structure (type 4): -* 9 socket types -* 1 processor family -* 1 field (Thread Enabled) - -Signed-off-by: Jean Delvare ---- - dmidecode.c | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index 75b58b1..0e8a98c 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -974,6 +974,7 @@ static const char *dmi_processor_family(const struct dmi_header *h, u16 ver) - - { 0x100, "ARMv7" }, - { 0x101, "ARMv8" }, -+ { 0x102, "ARMv9" }, - { 0x104, "SH-3" }, - { 0x105, "SH-4" }, - { 0x118, "ARM" }, -@@ -1073,7 +1074,7 @@ static enum cpuid_type dmi_get_cpuid_type(const struct dmi_header *h) - else - return cpuid_80486; - } -- else if ((type >= 0x100 && type <= 0x101) /* ARM */ -+ else if ((type >= 0x100 && type <= 0x102) /* ARM */ - || (type >= 0x118 && type <= 0x119)) /* ARM */ - { - /* -@@ -1415,10 +1416,19 @@ static const char *dmi_processor_upgrade(u8 code) - "Socket BGA1528", - "Socket LGA4189", - "Socket LGA1200", -- "Socket LGA4677" /* 0x3F */ -+ "Socket LGA4677", -+ "Socket LGA1700", -+ "Socket BGA1744", -+ "Socket BGA1781", -+ "Socket BGA1211", -+ "Socket BGA2422", -+ "Socket LGA1211", -+ "Socket LGA2422", -+ "Socket LGA5773", -+ "Socket BGA5773" /* 0x48 */ - }; - -- if (code >= 0x01 && code <= 0x3F) -+ if (code >= 0x01 && code <= 0x48) - return upgrade[code - 0x01]; - return out_of_spec; - } -@@ -4451,6 +4461,9 @@ static void dmi_decode(const struct dmi_header *h, u16 ver) - pr_attr("Thread Count", "%u", - h->length >= 0x30 && data[0x25] == 0xFF ? - WORD(data + 0x2E) : data[0x25]); -+ if (h->length >= 0x32 && WORD(data + 0x30) != 0) -+ pr_attr("Thread Enabled", "%u", -+ WORD(data + 0x30)); - dmi_processor_characteristics("Characteristics", - WORD(data + 0x26)); - break; --- -2.43.0 - diff --git a/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch b/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch deleted file mode 100644 index e1f41bd..0000000 --- a/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch +++ /dev/null @@ -1,64 +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 ---- - dmidecode.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index 54f59c1..52ddbf1 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) - { --- -2.43.0 - diff --git a/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch b/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch deleted file mode 100644 index a332064..0000000 --- a/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 93b819ef7805264dbd0f60015e4c24084ebb091d Mon Sep 17 00:00:00 2001 -From: Armin Wolf -Date: Tue, 19 Dec 2023 17:25:34 +0100 -Subject: [PATCH] dmidecode: Expand list of recognized CPU sockets - -On an AMD Ryzen 5 7600, the Processor Upgrade field -displays due to it not recognizing the -AM5 CPU socket. -Fix this by expanding the list of CPU sockets to match -the list specified in SMBIOS 3.7.0. - -Signed-off-by: Armin Wolf -Signed-off-by: Jean Delvare ---- - dmidecode.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index 77cb2fc..1261749 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -1453,10 +1453,18 @@ static const char *dmi_processor_upgrade(u8 code) - "Socket LGA1211", - "Socket LGA2422", - "Socket LGA5773", -- "Socket BGA5773" /* 0x48 */ -+ "Socket BGA5773", -+ "Socket AM5", -+ "Socket SP5", -+ "Socket SP6", -+ "Socket BGA883", -+ "Socket BGA1190", -+ "Socket BGA4129", -+ "Socket LGA4710", -+ "Socket LGA7529" /* 0x50 */ - }; - -- if (code >= 0x01 && code <= 0x48) -+ if (code >= 0x01 && code <= 0x50) - return upgrade[code - 0x01]; - return out_of_spec; - } --- -2.43.0 - diff --git a/dmidecode.spec b/dmidecode.spec index 4718172..1480e30 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,18 +1,15 @@ Summary: Tool to analyse BIOS DMI data Name: dmidecode -Version: 3.5 -Release: 3%{?dist} +Version: 3.6 +Release: 1%{?dist} Epoch: 1 License: GPLv2+ Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz URL: https://www.nongnu.org/dmidecode/ BuildRequires: gcc make +BuildRequires: pkgconfig(bash-completion) ExclusiveArch: %{ix86} x86_64 ia64 aarch64 -Patch0: 0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch -Patch1: 0002-Consistently-use-read_file-when-reading-from-a-dump-.patch -Patch2: 0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch - %description dmidecode reports information about x86 & ia64 hardware as described in the system BIOS according to the SMBIOS/DMI standard. This information @@ -26,9 +23,6 @@ I/O ports (e.g. serial, parallel, USB). %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build %make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" @@ -44,10 +38,17 @@ I/O ports (e.g. serial, parallel, USB). %{_sbindir}/vpddecode %{_sbindir}/ownership %{_sbindir}/biosdecode +%{_datadir}/bash-completion/completions/vpddecode +%{_datadir}/bash-completion/completions/ownership +%{_datadir}/bash-completion/completions/biosdecode %endif %{_mandir}/man8/* +%{_datadir}/bash-completion/completions/%{name} %changelog +* Mon Aug 05 2024 Lichen Liu - 1:3.6-1 +- updated to upstream v3.6 + * Tue Jan 09 2024 Lichen Liu - 1:3.5-3 - Expanding the list of CPU sockets to match the list specified in SMBIOS 3.7.0 diff --git a/sources b/sources index efb5936..e0485ce 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (dmidecode-3.5.tar.xz) = 690c9bea391f6bbfc8cd48e8db408a61d5b551a07a2823c29d03a09607fc2043cc1bea44ee9fd27fd0e7bc0b287bf9de9f22a1a66053f5b1e63d77c03d93e1ae +SHA512 (dmidecode-3.6.tar.xz) = b1e47a2121062581876ba2daf3ce80b1c39612d078718609b8bc97d4e7a4b47427200502468b5d71f0d0dcb5ba299fb2e808791b62dc5b50e67acac60c51a461