Fix server.py variable conflict issues in some system environment

(cherry picked from commit b50fe7b1b2b20ced260f397b1d76a71e2a333bdc)
This commit is contained in:
zhangzikang 2022-08-17 11:17:29 +08:00 committed by openeuler-sync-bot
parent 81ad87f948
commit dc81ac86d3
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -Naur rpm/server/server.py oech/server/server.py
--- rpm/server/server.py 2022-07-27 14:07:40.000000000 +0800
+++ oech/server/server.py 2022-08-17 10:12:57.721707038 +0800
@@ -275,8 +275,8 @@
with open(tar_job, 'wb') as file_content:
file_content.write(base64.b64decode(filetext))
- exec = subprocess.getstatusoutput("tar xf '%s' -C '%s'" % (tar_job, os.path.dirname(dir_job)))
- if exec[0] != 0:
+ res = subprocess.getstatusoutput("tar xf '%s' -C '%s'" % (tar_job, os.path.dirname(dir_job)))
+ if res[0] != 0:
sys.stderr.write("Decompress log file failed.")
return render_template('upload.html', host=host, id=oec_id, job=job,

View File

@ -5,7 +5,7 @@
Name: oec-hardware
Summary: openEuler Hardware Compatibility Test Suite
Version: 1.1.1
Release: 4
Release: 5
Group: Development/Tools
License: Mulan PSL v2
URL: https://gitee.com/openeuler/oec-hardware
@ -16,6 +16,7 @@ Patch0001: oec-hardware-1.1.1-fix-vesion.patch
Patch0002: oec-hardware-1.1.1-fix-fc-raid.patch
Patch0003: oec-hardware-1.1.1-fix-network-infiniband-system.patch
patch0004: oec-hardware-1.1.1-fix-rebootup_oech.service_issues.patch
patch0005: oec-hardware-1.1.1-fix-server.py_variable_conflict.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gcc
@ -42,6 +43,7 @@ openEuler Hardware Compatibility Test Server
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
@ -83,6 +85,9 @@ DESTDIR=$RPM_BUILD_ROOT make install
rm -rf /var/lock/oech.lock
%changelog
* Wed Aug 17 2022 zhangzikang <zhangzikang@kylinos.cn> - 1.1.1-5
- Fix server.py variable conflict issues in some system environment
* Wed Aug 10 2022 ylzhangah <1194926515@qq.com> - 1.1.1-4
- Fix rebootup issues
- Fix the issue that oech.service cannot be started