From 856ce599ef1448dfffaf38ce3bcb18d4fdb8d0db Mon Sep 17 00:00:00 2001 From: Joel Savitz Date: Fri, 26 Mar 2021 15:10:25 -0400 Subject: [PATCH] Resolves: bz1944243 --- hostconfig-dhcp-parse.patch | 27 +++++++++++++++++++++++++++ redfish-finder.spec | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 hostconfig-dhcp-parse.patch diff --git a/hostconfig-dhcp-parse.patch b/hostconfig-dhcp-parse.patch new file mode 100644 index 0000000..ed61f65 --- /dev/null +++ b/hostconfig-dhcp-parse.patch @@ -0,0 +1,27 @@ +commit 581327fd45351dd53c06a26517bb7f92e19d8f31 +Author: Charles Rose +Date: Mon Aug 31 17:40:08 2020 -0500 + + fix parsing HostConfig for DHCP + + assigntype.append(AssignType.DHCP) fails for DHCP because + assigntype [] is not set. + + Signed-off-by: Charles Rose + +diff --git a/redfish-finder b/redfish-finder +old mode 100644 +new mode 100755 +index 9a185b3..461eff9 +--- a/redfish-finder ++++ b/redfish-finder +@@ -123,8 +123,8 @@ class HostConfig(): + cursor = cursor_consume_next(cursor, "Host IP Assignment Type: ") + if cursor == None: + raise RuntimeError("redfish-finder: Unable to parse SMBIOS Host IP Assignment Type") ++ self.assigntype = [] + if cursor.split()[0] == "Static": +- self.assigntype = [] + self.assigntype.append(AssignType.STATIC) + cursor = cursor_consume_next(cursor, "Host IP Address Format: ") + if cursor.split()[0] == "IPv4": diff --git a/redfish-finder.spec b/redfish-finder.spec index 7cf0738..6b4280f 100644 --- a/redfish-finder.spec +++ b/redfish-finder.spec @@ -1,6 +1,6 @@ Name: redfish-finder Version: 0.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Utility for parsing SMBIOS information and configuring canonical BMC access BuildArch: noarch @@ -9,6 +9,7 @@ URL: https://github.com/nhorman/redfish-finder Source0: %url/archive/V%{version}/%{name}-%{version}.tar.gz Patch0: redfish-finder-python3.patch +Patch1: hostconfig-dhcp-parse.patch %{?systemd_requires} BuildRequires: systemd @@ -50,6 +51,9 @@ install -D -p -m 0644 ./redfish-finder.service %{buildroot}/%{_unitdir}/redfish- %{_unitdir}/redfish-finder.service %changelog +* Fri Mar 26 2021 Joel Savitz - 0.4-6 +- Fix parsing HostConfig for DHCP (bzXXXXXXX) + * Wed Jan 27 2021 Fedora Release Engineering - 0.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild