diff --git a/build/azure-pipelines/common/publish.js b/build/azure-pipelines/common/publish.js index e2f3a2e0e6f..28f60dc71c2 100644 --- a/build/azure-pipelines/common/publish.js +++ b/build/azure-pipelines/common/publish.js @@ -421,12 +421,12 @@ function getPlatform(product, os, arch, type, isLegacy) { case 'client': return `linux-${arch}`; case 'server': - return isLegacy ? `legacy-server-linux-${arch}` : `server-linux-${arch}`; + return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`; case 'web': if (arch === 'standalone') { return 'web-standalone'; } - return isLegacy ? `legacy-server-linux-${arch}-web` : `server-linux-${arch}-web`; + return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`; default: throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`); } diff --git a/build/azure-pipelines/common/publish.ts b/build/azure-pipelines/common/publish.ts index bd9b0cb1037..02b50d405cf 100644 --- a/build/azure-pipelines/common/publish.ts +++ b/build/azure-pipelines/common/publish.ts @@ -582,12 +582,12 @@ function getPlatform(product: string, os: string, arch: string, type: string, is case 'client': return `linux-${arch}`; case 'server': - return isLegacy ? `legacy-server-linux-${arch}` : `server-linux-${arch}`; + return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`; case 'web': if (arch === 'standalone') { return 'web-standalone'; } - return isLegacy ? `legacy-server-linux-${arch}-web` : `server-linux-${arch}-web`; + return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`; default: throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`); } diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index a85cf60cf5e..13edfccdb55 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -223,7 +223,6 @@ steps: - script: | set -e - export VSCODE_NODE_GLIBC='-glibc-2.17' yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz" @@ -236,7 +235,6 @@ steps: - script: | set -e - export VSCODE_NODE_GLIBC='-glibc-2.17' yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno ARCHIVE_PATH=".build/linux/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz" diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js index 32daed28146..5a7d4cfb4e8 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -373,7 +373,13 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa ); } - if (platform === 'linux' || platform === 'alpine') { + if (platform === 'linux' && process.env['VSCODE_NODE_GLIBC'] === '-glibc-2.17') { + result = es.merge(result, + gulp.src(`resources/server/bin/helpers/check-requirements-linux-legacy.sh`, { base: '.' }) + .pipe(rename(`bin/helpers/check-requirements.sh`)) + .pipe(util.setExecutableBit()) + ); + } else if (platform === 'linux' || platform === 'alpine') { result = es.merge(result, gulp.src(`resources/server/bin/helpers/check-requirements-linux.sh`, { base: '.' }) .pipe(replace('@@SERVER_APPLICATION_NAME@@', product.serverApplicationName)) diff --git a/resources/server/bin/code-server-linux.sh b/resources/server/bin/code-server-linux.sh index e3d96bdadf2..3df32dfd43c 100644 --- a/resources/server/bin/code-server-linux.sh +++ b/resources/server/bin/code-server-linux.sh @@ -9,24 +9,4 @@ esac ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")" -# Do not remove this check. -# Provides a way to skip the server requirements check from -# outside the install flow. A system process can create this -# file before the server is downloaded and installed. -skip_check=0 -if [ -f "/tmp/vscode-skip-server-requirements-check" ]; then - echo "!!! WARNING: Skipping server pre-requisite check !!!" - echo "!!! Server stability is not guaranteed. Proceed at your own risk. !!!" - skip_check=1 -fi - -# Check platform requirements -if [ "$(echo "$@" | grep -c -- "--skip-requirements-check")" -eq 0 ] && [ $skip_check -eq 0 ]; then - $ROOT/bin/helpers/check-requirements.sh - exit_code=$? - if [ $exit_code -ne 0 ]; then - exit $exit_code - fi -fi - "$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@" diff --git a/resources/server/bin/helpers/check-requirements-linux-legacy.sh b/resources/server/bin/helpers/check-requirements-linux-legacy.sh new file mode 100755 index 00000000000..0db77676965 --- /dev/null +++ b/resources/server/bin/helpers/check-requirements-linux-legacy.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# + +set -e + +echo "!!! WARNING: Using legacy server, please check https://aka.ms/vscode-remote/faq/old-linux for additional information !!!" +exit 0