From 92e097acf385a9516322e80b04f6a53fb71d3e48 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 17 May 2022 06:11:37 -0400 Subject: [PATCH] import redfish-finder-0.4-9.el9 --- .gitignore | 1 + .redfish-finder.metadata | 1 + SOURCES/hostconfig-dhcp-parse.patch | 27 +++++++ SOURCES/redfish-finder-python3.patch | 20 +++++ SPECS/redfish-finder.spec | 107 +++++++++++++++++++++++++++ 5 files changed, 156 insertions(+) create mode 100644 .gitignore create mode 100644 .redfish-finder.metadata create mode 100644 SOURCES/hostconfig-dhcp-parse.patch create mode 100644 SOURCES/redfish-finder-python3.patch create mode 100644 SPECS/redfish-finder.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3205b42 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/redfish-finder-0.4.tar.gz diff --git a/.redfish-finder.metadata b/.redfish-finder.metadata new file mode 100644 index 0000000..51a5567 --- /dev/null +++ b/.redfish-finder.metadata @@ -0,0 +1 @@ +f8fd320b6d50c06de5de6bc779a89fda3b7a1870 SOURCES/redfish-finder-0.4.tar.gz diff --git a/SOURCES/hostconfig-dhcp-parse.patch b/SOURCES/hostconfig-dhcp-parse.patch new file mode 100644 index 0000000..ed61f65 --- /dev/null +++ b/SOURCES/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/SOURCES/redfish-finder-python3.patch b/SOURCES/redfish-finder-python3.patch new file mode 100644 index 0000000..85ee85c --- /dev/null +++ b/SOURCES/redfish-finder-python3.patch @@ -0,0 +1,20 @@ +commit 59fc5f964bf6971da552d059520d7798fccbd4fc +Author: Neil Horman +Date: Tue Nov 12 08:53:50 2019 -0500 + + fixup interpreter to be python3 + + This should never have been there, platform-python is an old distro-ism. + + Signed-off-by: Neil Horman + +diff --git a/redfish-finder b/redfish-finder +index 6637d92..9a185b3 100644 +--- a/redfish-finder ++++ b/redfish-finder +@@ -1,4 +1,4 @@ +-#!/usr/libexec/platform-python ++#!/usr/bin/python3 + + import sys + import os diff --git a/SPECS/redfish-finder.spec b/SPECS/redfish-finder.spec new file mode 100644 index 0000000..3d8fc81 --- /dev/null +++ b/SPECS/redfish-finder.spec @@ -0,0 +1,107 @@ +Name: redfish-finder +Version: 0.4 +Release: 9%{?dist} +Summary: Utility for parsing SMBIOS information and configuring canonical BMC access +BuildArch: noarch + +License: GPLv2 +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 + +Requires: python3 NetworkManager dmidecode + +%description +Scans Smbios information for type 42 management controller information, and uses +that to configure the appropriate network interface so that the BMC is +canonically accessible via the host name redfish-localhost + +%prep +%autosetup + + +%build +#noop here + +%install +install -D -p -m 0755 redfish-finder %{buildroot}/%{_bindir}/redfish-finder +install -D -p -m 0644 redfish-finder.1 %{buildroot}/%{_mandir}/man1/redfish-finder.1 +install -D -p -m 0644 ./redfish-finder.service %{buildroot}/%{_unitdir}/redfish-finder.service + +%post +%systemd_post redfish-finder.service + +%preun +%systemd_preun redfish-finder.service + +%postun +%systemd_postun_with_restart redfish-finder.service + + +%files +%doc README.md +%license COPYING +%{_bindir}/redfish-finder +%{_mandir}/man1/redfish-finder.1.* +%{_unitdir}/redfish-finder.service + +%changelog +* Tue Aug 10 2021 Mohan Boddu - 0.4-9 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Mon Apr 19 2021 Joel Savitz - 0.4-8 +- Fix missing bz number in spec file (bz1951095) + +* Fri Apr 16 2021 Mohan Boddu - 0.4-7 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Fri Mar 26 2021 Joel Savitz - 0.4-6 +- Fix parsing HostConfig for DHCP (bz1944243) + +* Wed Jan 27 2021 Fedora Release Engineering - 0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 12 2019 Neil Horman - 0.4-2 +-Fixup interpreter (bz 1770861) + +* Thu Oct 17 2019 Neil Horman - 0.4-1 +- Update to latest upstream (bz1730589) + +* Fri Jul 26 2019 Fedora Release Engineering - 0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Mar 06 2019 Neil Horman - 0.3-1 +- Update to latest upstream release + +* Sat Feb 02 2019 Fedora Release Engineering - 0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Oct 19 2018 Neil Horman - 0.2-1 +- Update to new upstream release + +* Thu Oct 04 2018 Neil Horman - 0.1-3 +- Fixed missing BuildRequires/Requires +- Fixed missing dist tag +- Fixed Source url + +* Wed Oct 03 2018 Neil Horman - 0.1-2 +- Updated requires for python3 +- Removed unneeded BuildRequires +- Globed the inclusion of man page +- Fixed license file tagging + +* Mon Oct 01 2018 Neil Horman - 0.1-1 +- Initial import +