diff --git a/.github/workflows/insider-linux.yml b/.github/workflows/insider-linux.yml index c0ab61a..cda0e76 100644 --- a/.github/workflows/insider-linux.yml +++ b/.github/workflows/insider-linux.yml @@ -333,7 +333,7 @@ jobs: node-version-file: '.nvmrc' if: env.DISABLED != 'yes' && matrix.npm_arch != 'x64' - - name: Install Unofficial Node.js + - name: Install unofficial Node.js run: ./build/linux/install_nodejs.sh env: NODEJS_ARCH: ${{ matrix.npm_arch }} diff --git a/build/linux/package_reh.sh b/build/linux/package_reh.sh index f687726..4400583 100755 --- a/build/linux/package_reh.sh +++ b/build/linux/package_reh.sh @@ -173,7 +173,7 @@ done if [[ "${VSCODE_ARCH}" == "x64" ]]; then pushd "remote" - for LIB in @parcel/watcher @vscode/spdlog kerberos + for LIB in @parcel/watcher @vscode/spdlog kerberos node-pty do pushd "node_modules/${LIB}" @@ -183,6 +183,8 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then done popd + + VERIFY_CXX11=1 fi mv .npmrc.bak .npmrc @@ -198,6 +200,10 @@ if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh + if [[ -n "${VERIFY_CX11}" ]]; then + SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ../build/linux/verify_cxx11_requirements.sh + fi + pushd "../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then @@ -217,6 +223,10 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh + if [[ -n "${VERIFY_CXX11}" ]]; then + SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ../build/linux/verify_cxx11_requirements.sh + fi + pushd "../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}" if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then diff --git a/build/linux/verify_abi_requirements.sh b/build/linux/verify_abi_requirements.sh new file mode 100755 index 0000000..299f2fd --- /dev/null +++ b/build/linux/verify_abi_requirements.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e + +FILES=$( + find "${SEARCH_PATH}" -type f -executable -name "node" + find "${SEARCH_PATH}" -name "*.node" -not -path "*prebuilds*" -not -path "*extensions/node_modules/@parcel/watcher*" +) + +echo "Verifying requirements for files: ${FILES}" + +for FILE in ${FILES}; do + CXXABI_VERSION="0.0.0" + + while IFS= read -r LINE; do + VERSION=${LINE#*_} + + if [[ $( printf "%s\n%s" "${VERSION}" "${CXXABI_VERSION}" | sort -V | tail -n1 ) == "${VERSION}" ]]; then + CXXABI_VERSION="${VERSION}" + fi + done < <( strings "${FILE}" | grep -i ^CXXABI ) + + if [[ $( printf "%s\n%s" "${EXPECTED_CXXABI_VERSION}" "${CXXABI_VERSION}" | sort -V | tail -n1 ) == "${EXPECTED_CXXABI_VERSION}" ]]; then + echo "File ${FILE} has dependency on ABI ${CXXABI_VERSION} <= ${EXPECTED_CXXABI_VERSION}" + else + echo "Error: File ${FILE} has dependency on ABI ${CXXABI_VERSION} > ${EXPECTED_CXXABI_VERSION}" + exit 1 + fi +done diff --git a/build/linux/verify_cxx11_requirements.sh b/build/linux/verify_cxx11_requirements.sh new file mode 100755 index 0000000..7e6d357 --- /dev/null +++ b/build/linux/verify_cxx11_requirements.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +FILES=$( find "${SEARCH_PATH}" -name "*.node" -not -path "*prebuilds*" -not -path "*extensions/node_modules/@parcel/watcher*" ) + +echo "Verifying requirements for files: ${FILES}" + +for FILE in ${FILES}; do + if [[ -n "$( strings "${FILE}" | grep cxx11 | tail -n1 )" ]]; then + echo "Error: File ${FILE} has dependency on ABI ${CXXABI_VERSION} > ${EXPECTED_CXXABI_VERSION}" + exit 1 + fi +done