Skip to content

Commit

Permalink
(Linux) minor build script improvement: ability to skip GLIBC version…
Browse files Browse the repository at this point in the history
… check
  • Loading branch information
stenya committed Feb 23, 2023
1 parent 9fb202a commit 535aad5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cli/References/Linux/compile-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ echo "Commit : $COMMIT"
# ldd -r -v <binary_file> # check shared libraries dependencies
#
# Info: CLI does not use CGO directly (and can be easily disabled manually), but we use the same build environment as a for daemon (to be able to detect same errors as with daemon binary)
if [ ! -z "$GITHUB_ACTIONS" ];
if [ ! -z "$IVPN_BUILD_SKIP_GLIBC_VER_CHECK" ] || [ ! -z "$GITHUB_ACTIONS" ];
then
echo "[!] ! GITHUB_ACTIONS detected ! It is just a build test."
echo "[!] ! GLIBC version check skipped (according to env vars configuration) !"
else
GLIBC_VER_MAX_REQUIRED="2.31"
GLIBC_VER=$(ldd --version | grep "ldd (" | awk '{print $(NF)}')
if [[ "${GLIBC_VER}" > "${GLIBC_VER_MAX_REQUIRED}" ]];
then
echo "[!] GLIBC version '${GLIBC_VER}' is greater than reqired '${GLIBC_VER_MAX_REQUIRED}'"
echo "[!] Compiling with the new GLIBC version will not allow the program to start on systems with the old GLIBC."
echo "[ ] (you can define env var 'IVPN_BUILD_SKIP_GLIBC_VER_CHECK' to skip this check"
read -p "[?] Do you want to continue? [y\n] (N - default): " yn
case $yn in
[Yy]* ) ;;
Expand Down
5 changes: 3 additions & 2 deletions daemon/References/Linux/scripts/build-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# ldd -r -v <binary_file> # check shared libraries dependencies
#
# TODO: think how to avoid using CGO
if [ ! -z "$GITHUB_ACTIONS" ];
if [ ! -z "$IVPN_BUILD_SKIP_GLIBC_VER_CHECK" ] || [ ! -z "$GITHUB_ACTIONS" ];
then
echo "[!] ! GITHUB_ACTIONS detected ! It is just a build test."
echo "[!] ! GLIBC version check skipped (according to env vars configuration) !"
else
GLIBC_VER_MAX_REQUIRED="2.31"
GLIBC_VER=$(ldd --version | grep "ldd (" | awk '{print $(NF)}')
if [[ "${GLIBC_VER}" > "${GLIBC_VER_MAX_REQUIRED}" ]];
then
echo "[!] GLIBC version '${GLIBC_VER}' is greater than reqired '${GLIBC_VER_MAX_REQUIRED}'"
echo "[!] Compiling with the new GLIBC version will not allow the program to start on systems with the old GLIBC."
echo "[ ] (you can define env var 'IVPN_BUILD_SKIP_GLIBC_VER_CHECK' to skip this check"
read -p "[?] Do you want to continue? [y\n] (N - default): " yn
case $yn in
[Yy]* ) ;;
Expand Down

0 comments on commit 535aad5

Please sign in to comment.