!79 [sync] PR-75: Fix server.py variable conflict issues in some system environment

From: @openeuler-sync-bot 
Reviewed-by: @meitingli 
Signed-off-by: @meitingli
This commit is contained in:
openeuler-ci-bot 2022-08-18 01:40:58 +00:00 committed by Gitee
commit 7a17193da5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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