fix gs_sshexkey创建互信失败
This commit is contained in:
parent
8cfdb19a08
commit
2e9959da5a
@ -51,43 +51,8 @@ else:
|
||||
check_os_and_package_arch()
|
||||
check_python_version()
|
||||
check_python_compiler_option()
|
||||
source = os.path.join(sys.path[0], '../lib/bcrypt/lib3.' + \
|
||||
str(sys.version_info[1]), '_bcrypt.abi3.so')
|
||||
dest = os.path.join(sys.path[0], '../lib/bcrypt/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
GaussLog.exitWithError("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
source = os.path.join(sys.path[0], '../lib/_cffi_backend_3.' + \
|
||||
str(sys.version_info[1]), '_cffi_backend.so')
|
||||
dest = os.path.join(sys.path[0], '../lib/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
GaussLog.exitWithError("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
|
||||
source = os.path.join(sys.path[0], '../lib/cryptography/hazmat/bindings/lib3.' + \
|
||||
str(sys.version_info[1]), '*.so')
|
||||
dest = os.path.join(sys.path[0], '../lib/cryptography/hazmat/bindings/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
GaussLog.exitWithError("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
|
||||
source = os.path.join(sys.path[0], '../lib/nacl/lib3.' + \
|
||||
str(sys.version_info[1]), '_sodium.abi3.so')
|
||||
dest = os.path.join(sys.path[0], '../lib/nacl/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
GaussLog.exitWithError("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
from gspylib.common.copy_python_lib import copy_lib
|
||||
copy_lib()
|
||||
|
||||
from gspylib.common.Common import DefaultValue
|
||||
from gspylib.common.ErrorCode import ErrorCode
|
||||
|
@ -49,8 +49,10 @@ from base_utils.os.password_util import PasswordUtil
|
||||
from base_utils.os.net_util import NetUtil
|
||||
from subprocess import PIPE
|
||||
from base_utils.common.fast_popen import FastPopen
|
||||
from gspylib.common.copy_python_lib import copy_lib
|
||||
|
||||
DefaultValue.doConfigForParamiko()
|
||||
copy_lib()
|
||||
|
||||
try:
|
||||
import paramiko
|
||||
|
42
script/gspylib/common/copy_python_lib.py
Normal file
42
script/gspylib/common/copy_python_lib.py
Normal file
@ -0,0 +1,42 @@
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def copy_lib():
|
||||
current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
source = os.path.join(current_path, '../../../lib/bcrypt/lib3.' + \
|
||||
str(sys.version_info[1]), '_bcrypt.abi3.so')
|
||||
dest = os.path.join(current_path, '../../../lib/bcrypt/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
raise Exception("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
source = os.path.join(current_path, '../../../lib/_cffi_backend_3.' + \
|
||||
str(sys.version_info[1]), '_cffi_backend.so')
|
||||
dest = os.path.join(current_path, '../../../lib/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
raise Exception("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
source = os.path.join(current_path, '../../../lib/cryptography/hazmat/bindings/lib3.' + \
|
||||
str(sys.version_info[1]), '*.so')
|
||||
dest = os.path.join(current_path, '../../../lib/cryptography/hazmat/bindings/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
raise Exception("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
||||
|
||||
source = os.path.join(current_path, '../../../lib/nacl/lib3.' + \
|
||||
str(sys.version_info[1]), '_sodium.abi3.so')
|
||||
dest = os.path.join(current_path, '../../../lib/nacl/')
|
||||
cmd = f"cp {source} {dest}"
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
raise Exception("cp file failed.\nError:%s\nThe cmd is: %s\n" %
|
||||
(output, cmd))
|
Loading…
x
Reference in New Issue
Block a user