diff --git a/build/builder/build-external.py b/build/builder/build-external.py index aecb5d5..4e5d92d 100644 --- a/build/builder/build-external.py +++ b/build/builder/build-external.py @@ -18,6 +18,7 @@ OPENSSL_VER = utils.cfg.ver.openssl LIBUV_VER = utils.cfg.ver.libuv MBEDTLS_VER = utils.cfg.ver.mbedtls SQLITE_VER = utils.cfg.ver.sqlite +LIBSSH_VER = utils.cfg.ver.libssh class BuilderBase: @@ -59,8 +60,8 @@ class BuilderBase: cc.e("this is a pure-virtual function.") def build_libssh(self): - file_name = 'libssh-master.zip' - if not self._download_file('mbedtls source tarball', 'https://git.libssh.org/projects/libssh.git/snapshot/master.zip', file_name): + file_name = 'libssh-{}.zip'.format(LIBSSH_VER) + if not self._download_file('mbedtls source tarball', 'https://git.libssh.org/projects/libssh.git/snapshot/libssh-{}.zip'.format(LIBSSH_VER), file_name): return self._build_libssh(file_name) @@ -117,7 +118,7 @@ class BuilderLinux(BuilderBase): self.OPENSSL_PATH_SRC = os.path.join(self.PATH_TMP, 'openssl-{}'.format(OPENSSL_VER)) self.LIBUV_PATH_SRC = os.path.join(self.PATH_TMP, 'libuv-{}'.format(LIBUV_VER)) self.MBEDTLS_PATH_SRC = os.path.join(self.PATH_TMP, 'mbedtls-mbedtls-{}'.format(MBEDTLS_VER)) - self.LIBSSH_PATH_SRC = os.path.join(self.PATH_TMP, 'libssh-master') + self.LIBSSH_PATH_SRC = os.path.join(self.PATH_TMP, 'libssh-{}'.format(LIBSSH_VER)) self.SQLITE_PATH_SRC = os.path.join(self.PATH_TMP, 'sqlite-autoconf-{}'.format(SQLITE_VER)) if not os.path.exists(self.PATH_TMP): @@ -246,7 +247,7 @@ class BuilderLinux(BuilderBase): if not os.path.exists(self.LIBSSH_PATH_SRC): # os.system('tar -zxvf "{}/{}" -C "{}"'.format(PATH_DOWNLOAD, file_name, PATH_TMP)) os.system('unzip "{}/{}" -d "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP)) - os.rename(os.path.join(self.PATH_TMP, 'master'), os.path.join(self.PATH_TMP, 'libssh-master')) + # os.rename(os.path.join(self.PATH_TMP, 'master'), os.path.join(self.PATH_TMP, 'libssh-master')) cc.n('build libssh...') if os.path.exists(os.path.join(self.PATH_RELEASE, 'lib', 'libssh.a')): @@ -299,7 +300,10 @@ class BuilderLinux(BuilderBase): ' -DWITH_BENCHMARKS=OFF' \ ' -DWITH_NACL=OFF' \ ' ..'.format(self.PATH_RELEASE, OPENSSL_VER, self.PATH_RELEASE, self.PATH_RELEASE) - utils.cmake(build_path, 'Release', False, cmake_define) + try: + utils.cmake(build_path, 'Release', False, cmake_define) + except: + pass # because make install will fail because we can not disable ssh_shared target, # so we copy necessary files ourselves. diff --git a/config.ini.in b/config.ini.in index 020324f..16d0c51 100644 --- a/config.ini.in +++ b/config.ini.in @@ -21,6 +21,7 @@ cmake = /opt/cmake/bin/cmake [external_ver] openssl = 1.0.2h libuv = 1.9.1 +libssh = 0.7.4 mbedtls = 2.3.0 sqlite = 3160200 diff --git a/server/.idea/encodings.xml b/server/.idea/encodings.xml index 4a26c41..e0aac22 100644 --- a/server/.idea/encodings.xml +++ b/server/.idea/encodings.xml @@ -8,6 +8,7 @@ + diff --git a/server/.idea/server.iml b/server/.idea/server.iml index eaf1873..57328bc 100644 --- a/server/.idea/server.iml +++ b/server/.idea/server.iml @@ -46,7 +46,6 @@ - @@ -54,12 +53,13 @@ - + - + + @@ -73,9 +73,9 @@ - - + +