Skip to content

Commit f559159

Browse files
authored
Fix RedisInsight#3568: Do not use system libssh2 on Linux (RedisInsight#3686)
1 parent 0d5be19 commit f559159

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

build/common_functions

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ function build_breakpad {
1414
make -j 2
1515
}
1616

17+
function build_libssh2 {
18+
cd $DEPS_DIR
19+
git clone https://github.com/libssh2/libssh2.git libssh2 || true
20+
cd libssh2
21+
mkdir bin || rm -fR ./bin && mkdir bin
22+
cd bin
23+
cmake -DCRYPTO_BACKEND=OpenSSL -DENABLE_ZLIB_COMPRESSION=ON ..
24+
cmake --build .
25+
sudo make install
26+
}
27+
1728
function print_line {
1829
echo "===================================================================="
1930
}

src/configure

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ if [ "$1" == "breakpad" ]; then
2020
exit 0
2121
fi
2222

23+
if [ "$1" == "libssh2" ]; then
24+
print_title "Build only libssh2"
25+
build_libssh2
26+
exit 0
27+
fi
28+
29+
2330
if [ "$os_VENDOR" == "Ubuntu" ]; then
2431
ubuntu_ver=${os_RELEASE:0:2}
2532
print_title "Build RDM on Ubuntu: $ubuntu_ver"
@@ -46,9 +53,10 @@ if [ "$os_VENDOR" == "Ubuntu" ]; then
4653

4754
print_title "Check deps"
4855
sudo apt-get install automake libtool libssl-dev \
49-
libssh2-1-dev g++ libgl1-mesa-dev -y
56+
libssh2-1-dev g++ libgl1-mesa-dev cmake -y
5057

5158
build_breakpad
59+
build_libssh2
5260

5361
print_title "Run: source /opt/qt${RDM_QT_VERSION:0:2}/bin/qt${RDM_QT_VERSION:0:2}-env.sh && qmake && make "
5462

@@ -58,7 +66,7 @@ elif [ "$os_VENDOR" == "Fedora" ] || [[ "$os_VENDOR" == "CentOS" && "$os_RELEAS
5866
print_title "Check deps"
5967
sudo yum install libssh2 libssh2-devel qt5-qtbase qt5-qtsvg-devel \
6068
qt5-qtdeclarative-devel qt5-qtgraphicaleffects qt5-qtquickcontrols \
61-
qt5-qttools gcc gcc-c++ libstdc++-static git rsync \
69+
qt5-qttools gcc gcc-c++ libstdc++-static git cmake rsync \
6270
redhat-rpm-config -y
6371

6472
if [[ $? == 1 && "$os_VENDOR" == "CentOS" ]]; then
@@ -68,6 +76,7 @@ elif [ "$os_VENDOR" == "Fedora" ] || [[ "$os_VENDOR" == "CentOS" && "$os_RELEAS
6876
fi
6977

7078
build_breakpad
79+
build_libssh2
7180

7281
print_title "Run: qmake-qt5 && make "
7382

@@ -76,9 +85,10 @@ elif [ "$os_VENDOR" == "openSUSE" ]; then
7685
sudo zypper install -y libopenssl-devel libssh2-devel \
7786
libX11-devel gcc gcc-c++ libstdc++-devel libqt5-qtbase-common-devel libqt5-qtquick1-devel \
7887
libqt5-qtdeclarative-devel libqt5-qtimageformats libqt5-qtquickcontrols \
79-
libQt5Concurrent-devel automake
88+
libQt5Concurrent-devel automake cmake \
8089

8190
build_breakpad
91+
build_libssh2
8292

8393
print_title "Run: qmake-qt5 && make "
8494

0 commit comments

Comments
 (0)