From 07a566b7fb2829232e8428738b8f73ef55fcca89 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 12 Nov 2024 10:57:07 +0000 Subject: [PATCH] import UBI dmidecode-3.6-1.el9 --- .dmidecode.metadata | 2 +- .gitignore | 2 +- ...-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 ------------ SPECS/dmidecode.spec | 19 ++--- 6 files changed, 12 insertions(+), 192 deletions(-) delete mode 100644 SOURCES/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch delete mode 100644 SOURCES/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch delete mode 100644 SOURCES/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch diff --git a/.dmidecode.metadata b/.dmidecode.metadata index 3bc180d..b8ebd06 100644 --- a/.dmidecode.metadata +++ b/.dmidecode.metadata @@ -1 +1 @@ -80898f5e95d905080426fdff7899d81eb4f888c2 SOURCES/dmidecode-3.5.tar.xz +c74291da874589334483adac4c30a5c0a13bc91b SOURCES/dmidecode-3.6.tar.xz diff --git a/.gitignore b/.gitignore index 9e60609..28f43e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dmidecode-3.5.tar.xz +SOURCES/dmidecode-3.6.tar.xz diff --git a/SOURCES/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch b/SOURCES/0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch deleted file mode 100644 index f6c720c..0000000 --- a/SOURCES/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/SOURCES/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch b/SOURCES/0002-Consistently-use-read_file-when-reading-from-a-dump-.patch deleted file mode 100644 index e1f41bd..0000000 --- a/SOURCES/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/SOURCES/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch b/SOURCES/0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch deleted file mode 100644 index a332064..0000000 --- a/SOURCES/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/SPECS/dmidecode.spec b/SPECS/dmidecode.spec index 4718172..1480e30 100644 --- a/SPECS/dmidecode.spec +++ b/SPECS/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