From deaa2242caea82d5a125e9e3b67a4066ccb32b78 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 7 Jun 2021 14:09:54 -0700 Subject: [PATCH] feat: add npm_config_build_from_source to build scripts This is necessary due to argon2 being added and an upstream issue where it uses a Linux build that is too new for CentOS 7. --- ci/build/build-standalone-release.sh | 4 ++++ ci/build/npm-postinstall.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh index e85678a29..a8072a5a5 100755 --- a/ci/build/build-standalone-release.sh +++ b/ci/build/build-standalone-release.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 +# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 +npm_config_build_from_source=true + main() { cd "$(dirname "${0}")/../.." source ./ci/lib.sh diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 05c936815..ae1be016a 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -18,6 +18,9 @@ detect_arch() { } ARCH="${NPM_CONFIG_ARCH:-$(detect_arch)}" +# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 +# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 +npm_config_build_from_source=true main() { # Grabs the major version of node from $npm_config_user_agent which looks like