Reviewed-by: Adolf Belka adolf.belka@ipfire.org
On 02/06/2021 20:00, Peter Müller wrote:
Notable changes as per https://git.savannah.gnu.org/cgit/dmidecode.git/plain/NEWS:
Version 3.3 (Wed Oct 14 2020)
- [BUILD] Allow overriding build settings from the environment.
- [COMPATIBILITY] Document how the UUID fields are interpreted.
- [PORTABILITY] Don't use memcpy on /dev/mem on arm64.
- [PORTABILITY] Only scan /dev/mem for entry point on x86.
- Support for SMBIOS 3.3.0. This includes new processor names, new port connector types, and new memory device form factors, types and technologies.
- Add bios-revision, firmware-revision and system-sku-number to -s option.
- Use the most appropriate unit for cache size.
- Decode system slot base bus width and peers.
- Important bug fixes: Fix Redfish Hostname print length Fix formatting of TPM table output Fix System Slot Information for PCIe SSD Don't choke on invalid processor voltage
- Use the most appropriate unit for cache size.
Version 3.2 (Wed Sep 14 2018)
- [COMPATIBILITY] The UUID is now displayed using lowercase letters, per RFC 4122 (#53569). You must ensure that any code parsing it is case-insensitive.
- Support for SMBIOS 3.2.0. This includes new processor names, new socket and port connector types, new system slot state and property, and support for non-volatile memory (NVDIMM).
- Support for Redfish management controllers.
- A new command line option to query a specific structure by its handle.
- A new command line option to query the system family string.
- Support for 3 ThinkPad-specific structures (patch #9642).
- Support for HPE's new company name.
- Support UEFI on FreeBSD.
- Important bug fixes: Fix firmware version of TPM device Fix the HPE UEFI feature flag check
- (biosdecode) A new command line option to fully decode PIR information (support request #109339).
This patch also features two new patches recommended by upstream, whose online version can be retrieved at https://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=1117390ccd9cea139... https://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=11e134e54d15e67a6....
Signed-off-by: Peter Müller peter.mueller@ipfire.org
config/rootfiles/common/i586/dmidecode | 1 + config/rootfiles/common/x86_64/dmidecode | 1 + lfs/dmidecode | 13 +++---- ...ort_for_structure_type_43_tpm_device.patch | 30 ---------------- ...midecode-3.3-fix_crash_with_u_option.patch | 34 +++++++++++++++++++ ..._the_condition_error_in_ascii_filter.patch | 30 ++++++++++++++++ 6 files changed, 73 insertions(+), 36 deletions(-) delete mode 100644 src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch create mode 100644 src/patches/dmidecode/dmidecode-3.3-fix_crash_with_u_option.patch create mode 100644 src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch
diff --git a/config/rootfiles/common/i586/dmidecode b/config/rootfiles/common/i586/dmidecode index 888395856..5b2ba45ed 100644 --- a/config/rootfiles/common/i586/dmidecode +++ b/config/rootfiles/common/i586/dmidecode @@ -5,6 +5,7 @@ usr/sbin/vpddecode #usr/share/doc/dmidecode #usr/share/doc/dmidecode/AUTHORS #usr/share/doc/dmidecode/CHANGELOG +#usr/share/doc/dmidecode/NEWS #usr/share/doc/dmidecode/README #usr/share/man/man8/biosdecode.8 #usr/share/man/man8/dmidecode.8 diff --git a/config/rootfiles/common/x86_64/dmidecode b/config/rootfiles/common/x86_64/dmidecode index 888395856..5b2ba45ed 100644 --- a/config/rootfiles/common/x86_64/dmidecode +++ b/config/rootfiles/common/x86_64/dmidecode @@ -5,6 +5,7 @@ usr/sbin/vpddecode #usr/share/doc/dmidecode #usr/share/doc/dmidecode/AUTHORS #usr/share/doc/dmidecode/CHANGELOG +#usr/share/doc/dmidecode/NEWS #usr/share/doc/dmidecode/README #usr/share/man/man8/biosdecode.8 #usr/share/man/man8/dmidecode.8 diff --git a/lfs/dmidecode b/lfs/dmidecode index 03a702c07..c90f0726a 100644 --- a/lfs/dmidecode +++ b/lfs/dmidecode @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2021 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,10 +24,10 @@
include Config
-VER = 3.1 +VER = 3.3
THISAPP = dmidecode-$(VER) -DL_FILE = $(THISAPP).tar.gz +DL_FILE = $(THISAPP).tar.xz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) @@ -41,7 +41,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 7798f68a02b82358c44af913da3b6b42 +$(DL_FILE)_MD5 = afca949fd71a23dd39c4a3c9cd946dc0
install : $(TARGET) check : $(patsubst %,$(DIR_CHK)/%,$(objects)) @@ -69,9 +69,10 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/0005-nothing-should-go-into-usr-local.patch
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/dmidecode-3.3-fix_crash_with_u_option.patch cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make install @rm -rf $(DIR_APP)
diff --git a/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch b/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch deleted file mode 100644 index 07f4f7ed7..000000000 --- a/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 174387405e98cd94c627832ae23abcb9be7e5623 Mon Sep 17 00:00:00 2001 -From: Jean Delvare jdelvare@suse.de -Date: Wed, 31 Jan 2018 18:52:47 +0100 -Subject: dmidecode: Fix firmware version of TPM device
-Both the operator (detected by clang, reported by Xorg) and the mask -for the minor firmware version field of TPM devices were wrong.
-Signed-off-by: Jean Delvare jdelvare@suse.de
-Fixes: 48a8132058a0 ("dmidecode: Add support for structure type 43 (TPM Device)")
- dmidecode.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/dmidecode.c b/dmidecode.c -index 87faaa9..a593170 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4511,7 +4511,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
case 0x02:
printf("\tFirmware Revision: %u.%u\n",
DWORD(data + 0x0A) >> 16,
-- DWORD(data + 0x0A) && 0xFF); -+ DWORD(data + 0x0A) & 0xFFFF);
/*
* We skip the next 4 bytes, as their
* format is not standardized and their
-cgit v1.0-41-gc330
diff --git a/src/patches/dmidecode/dmidecode-3.3-fix_crash_with_u_option.patch b/src/patches/dmidecode/dmidecode-3.3-fix_crash_with_u_option.patch new file mode 100644 index 000000000..497768add --- /dev/null +++ b/src/patches/dmidecode/dmidecode-3.3-fix_crash_with_u_option.patch @@ -0,0 +1,34 @@ +From 11e134e54d15e67a64c39a623f492a28df922517 Mon Sep 17 00:00:00 2001 +From: Jean Delvare jdelvare@suse.de +Date: Tue, 19 Jan 2021 16:26:01 +0100 +Subject: 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 jerry.hoemann@hpe.com +Fixes: da06888d08b9 ("dmidecode: Use the print helpers in dump mode too") +Signed-off-by: Jean Delvare jdelvare@suse.de +---
- 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",
+-- +cgit v1.2.1
diff --git a/src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch b/src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch new file mode 100644 index 000000000..e5f99b477 --- /dev/null +++ b/src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch @@ -0,0 +1,30 @@ +From 1117390ccd9cea139638db6f460bb6de70e28f94 Mon Sep 17 00:00:00 2001 +From: Tianjia Zhang tianjia.zhang@linux.alibaba.com +Date: Tue, 5 Jan 2021 10:36:29 +0100 +Subject: dmidecode: Fix the condition error in ascii_filter
+The normal printable ASCII range is 32 to 127 (not included), +so fix the error in this if condition.
+Signed-off-by: Tianjia Zhang tianjia.zhang@linux.alibaba.com +Signed-off-by: Jean Delvare jdelvare@suse.de +---
- dmidecode.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/dmidecode.c b/dmidecode.c +index 27d5494..864a193 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -116,7 +116,7 @@ static void ascii_filter(char *bp, size_t len)
- size_t i;
- for (i = 0; i < len; i++)
+- if (bp[i] < 32 || bp[i] == 127) ++ if (bp[i] < 32 || bp[i] >= 127)
bp[i] = '.';
- }
+-- +cgit v1.2.1