Correct HBA Mode and Correct hashlib.md5-usage
This commit is contained in:
parent
8f11130352
commit
7a6a5c3ca5
41
0001-Correct-HBA-Mode-and-Correct-hashlib.md5-usage.patch
Normal file
41
0001-Correct-HBA-Mode-and-Correct-hashlib.md5-usage.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From b49d3f24c6916e7954869bc159eac4861c67f9b0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: tasleson tasleson@redhat.com
|
||||||
|
Date: Tue, 2 Apr 2024 16:21:03 +0800
|
||||||
|
Subject: [PATCH] Correct HBA-Mode and Correct hashlib.md5 usage
|
||||||
|
|
||||||
|
---
|
||||||
|
plugin/megaraid_plugin/megaraid.py | 2 +-
|
||||||
|
test/cmdtest.py.in | 4 ++++
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugin/megaraid_plugin/megaraid.py b/plugin/megaraid_plugin/megaraid.py
|
||||||
|
index eee7233..9004262 100644
|
||||||
|
--- a/plugin/megaraid_plugin/megaraid.py
|
||||||
|
+++ b/plugin/megaraid_plugin/megaraid.py
|
||||||
|
@@ -547,7 +547,7 @@ class MegaRAID(IPlugin):
|
||||||
|
if ctrl_show_all_output["Status"]["Current Personality"] == "HBA-Mode ":
|
||||||
|
mode = System.MODE_HBA
|
||||||
|
else:
|
||||||
|
- mode = System.MODE_HBA
|
||||||
|
+ mode = System.MODE_HARDWARE_RAID
|
||||||
|
else:
|
||||||
|
mode = System.MODE_UNKNOWN
|
||||||
|
|
||||||
|
diff --git a/test/cmdtest.py.in b/test/cmdtest.py.in
|
||||||
|
index 273f07d..46d3379 100755
|
||||||
|
--- a/test/cmdtest.py.in
|
||||||
|
+++ b/test/cmdtest.py.in
|
||||||
|
@@ -65,6 +65,10 @@ def random_iqn():
|
||||||
|
|
||||||
|
s = "iqn.1994-05.com.domain:01."
|
||||||
|
m = hashlib.md5()
|
||||||
|
+ try:
|
||||||
|
+ m = hashlib.md5(usedforsecurity=False)
|
||||||
|
+ except Exception:
|
||||||
|
+ m = hashlib.md5()
|
||||||
|
u = os.uname()
|
||||||
|
for i in u:
|
||||||
|
m.update(i.encode('utf-8'))
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -2,11 +2,12 @@
|
|||||||
%define with_python2 0
|
%define with_python2 0
|
||||||
Name: libstoragemgmt
|
Name: libstoragemgmt
|
||||||
Version: 1.9.8
|
Version: 1.9.8
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Storage array management library
|
Summary: Storage array management library
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/libstorage/libstoragemgmt
|
URL: https://github.com/libstorage/libstoragemgmt
|
||||||
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: 0001-Correct-HBA-Mode-and-Correct-hashlib.md5-usage.patch
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ autoconf automake libtool libxml2-devel check-devel perl-interpreter
|
BuildRequires: gcc gcc-c++ autoconf automake libtool libxml2-devel check-devel perl-interpreter
|
||||||
BuildRequires: glib2-devel systemd bash-completion libconfig-devel systemd-devel
|
BuildRequires: glib2-devel systemd bash-completion libconfig-devel systemd-devel
|
||||||
@ -403,6 +404,9 @@ fi
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 2 2024 wulei <baiguo@kylinos.cn> - 1.9.8-2
|
||||||
|
- Correct HBA Mode and Correct hashlib.md5 usage
|
||||||
|
|
||||||
* Wed Oct 11 2023 wulei <wu_lei@hoperun.com> - 1.9.8-1
|
* Wed Oct 11 2023 wulei <wu_lei@hoperun.com> - 1.9.8-1
|
||||||
- Update to 1.9.8
|
- Update to 1.9.8
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user