diff --git a/configs/components/dmidecode.rb b/configs/components/dmidecode.rb index e7ba5ee50..13e9ed43d 100644 --- a/configs/components/dmidecode.rb +++ b/configs/components/dmidecode.rb @@ -1,9 +1,10 @@ component 'dmidecode' do |pkg, settings, platform| - pkg.version '3.3' - pkg.md5sum 'afca949fd71a23dd39c4a3c9cd946dc0' + pkg.version '3.5' + pkg.sha256sum '79d76735ee8e25196e2a722964cf9683f5a09581503537884b256b01389cc073' - pkg.apply_patch 'resources/patches/dmidecode/1117390c.patch' - pkg.apply_patch 'resources/patches/dmidecode/11e134e5.patch' + pkg.apply_patch 'resources/patches/dmidecode/80de3762.patch' + pkg.apply_patch 'resources/patches/dmidecode/c76ddda0.patch' + pkg.apply_patch 'resources/patches/dmidecode/de392ff0.patch' pkg.apply_patch 'resources/patches/dmidecode/dmidecode-install-to-bin.patch' pkg.url "http://download.savannah.gnu.org/releases/dmidecode/dmidecode-#{pkg.get_version}.tar.xz" diff --git a/configs/components/libffi.rb b/configs/components/libffi.rb index 8517ad09e..f7d93bfb4 100644 --- a/configs/components/libffi.rb +++ b/configs/components/libffi.rb @@ -1,6 +1,6 @@ component 'libffi' do |pkg, settings, platform| - pkg.version '3.4.3' - pkg.md5sum 'b57b0ac1d1072681cee9148a417bd2ec' + pkg.version '3.4.6' + pkg.sha256sum 'b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e' pkg.url "https://github.com/libffi/libffi/releases/download/v#{pkg.get_version}/#{pkg.get_name}-#{pkg.get_version}.tar.gz" pkg.mirror "#{settings[:buildsources_url]}/#{pkg.get_name}-#{pkg.get_version}.tar.gz" diff --git a/configs/components/libxml2.rb b/configs/components/libxml2.rb index f4f7a7550..57f8f60db 100644 --- a/configs/components/libxml2.rb +++ b/configs/components/libxml2.rb @@ -1,6 +1,6 @@ component "libxml2" do |pkg, settings, platform| - pkg.version '2.10.3' - pkg.sha256sum '5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c' + pkg.version '2.12.6' + pkg.sha256sum '889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb' libxml2_version_y = pkg.get_version.gsub(/(\d+)\.(\d+)\.(\d+)/, '\1.\2') pkg.url "https://download.gnome.org/sources/libxml2/#{libxml2_version_y}/libxml2-#{pkg.get_version}.tar.xz" diff --git a/configs/components/libxslt.rb b/configs/components/libxslt.rb index 36674dfda..47fc061be 100644 --- a/configs/components/libxslt.rb +++ b/configs/components/libxslt.rb @@ -1,6 +1,6 @@ component "libxslt" do |pkg, settings, platform| - pkg.version '1.1.37' - pkg.sha256sum '3a4b27dc8027ccd6146725950336f1ec520928f320f144eb5fa7990ae6123ab4' + pkg.version '1.1.39' + pkg.sha256sum '2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0' libxslt_version_y = pkg.get_version.gsub(/(\d+)\.(\d+)\.(\d+)/, '\1.\2') pkg.url "https://download.gnome.org/sources/libxslt/#{libxslt_version_y}/libxslt-#{pkg.get_version}.tar.xz" diff --git a/configs/components/rubygem-highline.rb b/configs/components/rubygem-highline.rb index c857e25fd..9e9d14172 100644 --- a/configs/components/rubygem-highline.rb +++ b/configs/components/rubygem-highline.rb @@ -1,6 +1,15 @@ component 'rubygem-highline' do |pkg, settings, _platform| - pkg.version '2.1.0' - pkg.md5sum '4209083bda845d47dcc05b7ab23f25fd' + version = settings[:rubygem_highline_version] || '2.1.0' + pkg.version version + + case version + when '2.1.0' + pkg.md5sum '4209083bda845d47dcc05b7ab23f25fd' + when '3.0.1' + pkg.sha256sum 'ca18b218fd581b1fae832f89bfeaf2b34d3a93429c44fd4411042ffce286f009' + else + raise "rubygem-highline version #{version} has not been configured; Cannot continue." + end instance_eval File.read('configs/components/_base-rubygem.rb') diff --git a/configs/components/rubygem-net-ssh.rb b/configs/components/rubygem-net-ssh.rb index de6ce0301..a3dae6bdf 100644 --- a/configs/components/rubygem-net-ssh.rb +++ b/configs/components/rubygem-net-ssh.rb @@ -1,6 +1,12 @@ component "rubygem-net-ssh" do |pkg, settings, platform| - # Projects may define a :rubygem_net_ssh_version setting, or we use 4.2.0 by default: - version = settings[:rubygem_net_ssh_version] || '4.2.0' + # Projects may define a :rubygem_net_ssh_version setting, or we use 6.1.0 by default: + version = settings[:rubygem_net_ssh_version] || '6.1.0' + if platform.is_cross_compiled? && platform.is_solaris? + # Building agent-runtime-7.x on Solaris 10/11 SPARC fails with newer versions of net-ssh because those platforms + # use older (<= 2.1) versions of Ruby for cross-compiling. Pin to 4.2.0, the last version of net-ssh that supports + # those older Rubies, until we deprecate those platforms. + version = '4.2.0' + end pkg.version version case version @@ -8,12 +14,8 @@ pkg.md5sum "be25f70538cb8dcde68d924f001d75df" when "6.1.0" pkg.md5sum "383afadb1bd66a458a5d8d2d60736b3d" - when "5.2.0" - pkg.md5sum "341114b3bf34257abd3b11bd16b0c99d" when "4.2.0" pkg.md5sum "fec5b151d84110b95ec0056017804491" - when "4.1.0" - pkg.md5sum "6af1ff8c42a07b11203058c9b74cbaef" else raise "rubygem-net-ssh version #{version} has not been configured; Cannot continue." end diff --git a/configs/projects/agent-runtime-main.rb b/configs/projects/agent-runtime-main.rb index 4a7bf3557..355235cf6 100644 --- a/configs/projects/agent-runtime-main.rb +++ b/configs/projects/agent-runtime-main.rb @@ -3,7 +3,9 @@ # Set preferred component versions if they differ from defaults: proj.setting :ruby_version, '3.2.3' proj.setting :rubygem_deep_merge_version, '1.2.2' + proj.setting :rubygem_highline_version, '3.0.1' proj.setting :rubygem_hocon_version, '1.4.0' + proj.setting :rubygem_net_ssh_version, '7.2.3' # Solaris and AIX depend on libedit which breaks augeas compliation starting with 1.13.0 if platform.is_solaris? || platform.name == 'aix-7.1-ppc' diff --git a/resources/patches/dmidecode/1117390c.patch b/resources/patches/dmidecode/1117390c.patch deleted file mode 100644 index bfb1b0d61..000000000 --- a/resources/patches/dmidecode/1117390c.patch +++ /dev/null @@ -1,28 +0,0 @@ -author Tianjia Zhang 2021-01-05 10:36:29 +0100 -committer Jean Delvare 2021-01-05 10:36:29 +0100 -commit 1117390ccd9cea139638db6f460bb6de70e28f94 (patch) -tree 92d703ba6d96dbbc2f6963546ac93731e5cdf0be -parent 3c111e4f6134855580f20f8e01fee26eff455fff (diff) -download dmidecode-1117390ccd9cea139638db6f460bb6de70e28f94.tar.gz -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 -Signed-off-by: Jean Delvare -Diffstat --rw-r--r-- dmidecode.c 2 - -1 files changed, 1 insertions, 1 deletions -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] = '.'; - } diff --git a/resources/patches/dmidecode/11e134e5.patch b/resources/patches/dmidecode/11e134e5.patch deleted file mode 100644 index e2c00d8ee..000000000 --- a/resources/patches/dmidecode/11e134e5.patch +++ /dev/null @@ -1,33 +0,0 @@ -author Jean Delvare 2021-01-19 16:26:01 +0100 -committer Jean Delvare 2021-01-19 16:26:01 +0100 -commit 11e134e54d15e67a64c39a623f492a28df922517 (patch) -tree e93f12a63524c810eea8b1532886d1a59043d16c -parent bd8636e4b5e2fe95373b3ade1cdc5ec2d6578ca4 (diff) -download dmidecode-11e134e54d15e67a64c39a623f492a28df922517.tar.gz -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 -Diffstat --rw-r--r-- dmidecode.c 2 - -1 files changed, 1 insertions, 1 deletions -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", diff --git a/resources/patches/dmidecode/80de3762.patch b/resources/patches/dmidecode/80de3762.patch new file mode 100644 index 000000000..0b95ed695 --- /dev/null +++ b/resources/patches/dmidecode/80de3762.patch @@ -0,0 +1,44 @@ +From 80de376231e903d2cbea95e51ffea31860502159 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Mon, 3 Apr 2023 10:15:12 +0200 +Subject: dmioem: HPE OEM Record 237 Firmware change + +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(-) + +diff --git a/dmioem.c b/dmioem.c +index dc4b857..2746e15 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dmi_header *h) + * 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 dmi_header *h) + 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: +-- +cgit v1.1 + diff --git a/resources/patches/dmidecode/c76ddda0.patch b/resources/patches/dmidecode/c76ddda0.patch new file mode 100644 index 000000000..fcda49fd7 --- /dev/null +++ b/resources/patches/dmidecode/c76ddda0.patch @@ -0,0 +1,64 @@ +From c76ddda0ba0aa99a55945e3290095c2ec493c892 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Wed, 26 Apr 2023 15:44:27 +0200 +Subject: 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) + { +-- +cgit v1.1 + diff --git a/resources/patches/dmidecode/de392ff0.patch b/resources/patches/dmidecode/de392ff0.patch new file mode 100644 index 000000000..5294506cc --- /dev/null +++ b/resources/patches/dmidecode/de392ff0.patch @@ -0,0 +1,37 @@ +From de392ff0599f9737aad5656f13356cb14005eb22 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Fri, 29 Mar 2024 09:27:58 +0100 +Subject: dmidecode: Fix flag mask in dmi_slot_characteristics + +When slot characteristics flags were added, the mask to test if at +least one flag is set wasn't updated. This could result in slot +characteristics being listed as "None" for slots with only new flags +set. + +Fix this by dropping the mask for the second slot characteristics +byte completely. It seems safe to assume that all the remaining bits +of this byte will be used to future characteristic flags. + +Signed-off-by: Jean Delvare +Fixes: f7d236dd5c4d ("dmidecode: Remaining support for SMBIOS 3.2.0") +Fixes: 4304d3aca801 ("Add new slot characteristics2 from SMBIOS spec 3.4.0") +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index d79f294..78def4c 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -2255,7 +2255,7 @@ static void dmi_slot_characteristics(const char *attr, u8 code1, u8 code2) + + if (code1 & (1 << 0)) + pr_attr(attr, "Unknown"); +- else if ((code1 & 0xFE) == 0 && (code2 & 0x07) == 0) ++ else if ((code1 & 0xFE) == 0 && code2 == 0) + pr_attr(attr, "None"); + else + { +-- +cgit v1.1 +