diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-10-07 11:42:08 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-10-07 11:42:08 +0200 |
| commit | e8ea2448b50d52026f3ccae7e84535911ea7b06b (patch) | |
| tree | 462e53c16cba19c58101cec411ff9886eaf04411 | |
| parent | fc57836b0579f44ad477cc028fedc88f7884c8e7 (diff) | |
| parent | fac4f3b19d47999537e56655ab70f10c520a213e (diff) | |
| download | mullvadvpn-e8ea2448b50d52026f3ccae7e84535911ea7b06b.tar.xz mullvadvpn-e8ea2448b50d52026f3ccae7e84535911ea7b06b.zip | |
Merge branch 'update-grpc-tools-with-m1-support'
| -rw-r--r-- | BuildInstructions.md | 8 | ||||
| -rw-r--r-- | gui/package-lock.json | 14 | ||||
| -rw-r--r-- | gui/package.json | 2 | ||||
| -rwxr-xr-x | gui/scripts/build-proto.sh | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/BuildInstructions.md b/BuildInstructions.md index fd7aacd6b7..47b64f906c 100644 --- a/BuildInstructions.md +++ b/BuildInstructions.md @@ -139,18 +139,18 @@ variable to `aarch64-unknown-linux-gnu`: TARGETS="aarch64-unknown-linux-gnu" ./build.sh ``` -## Notes on building on ARM64 hosts +## Notes on building on ARM64 Linux hosts Due to inability to build the management interface proto files on ARM64 (see [this](https://github.com/grpc/grpc-node/issues/1497) issue), building on ARM64 must be done in 2 stages: -1. Build management interface proto files on a non-ARM64 platform +1. Build management interface proto files on another platform than arm64 Linux 2. Use the built proto files during the main build by setting the `MANAGEMENT_INTERFACE_PROTO_BUILD_DIR` environment variable to the path the proto files -To build the management interface proto files there is a script (execute it on a non-ARM64 -platform): +To build the management interface proto files there is a script (execute it on another platform than +ARM64 Linux): ```bash cd gui/scripts diff --git a/gui/package-lock.json b/gui/package-lock.json index 9a39e38347..fd394e5e0c 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -86,7 +86,7 @@ "npm": ">=8.3" }, "optionalDependencies": { - "grpc-tools": "^1.11.2", + "grpc-tools": "^1.11.3", "nseventmonitor": "^1.0.2" } }, @@ -7339,9 +7339,9 @@ "dev": true }, "node_modules/grpc-tools": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.2.tgz", - "integrity": "sha512-4+EgpnnkJraamY++oyBCw5Hp9huRYfgakjNVKbiE3PgO9Tv5ydVlRo7ZyGJ0C0SEiA7HhbVc1sNNtIyK7FiEtg==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.3.tgz", + "integrity": "sha512-cRSK2uhDKHtZ9hLRM35HxaMAMxyh/L7C96Ojt58DhQBdwTOQlV1VIJHSK6X/pDeSQKhaQqWMFfebt8tIcvRfjQ==", "hasInstallScript": true, "optional": true, "dependencies": { @@ -20274,9 +20274,9 @@ } }, "grpc-tools": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.2.tgz", - "integrity": "sha512-4+EgpnnkJraamY++oyBCw5Hp9huRYfgakjNVKbiE3PgO9Tv5ydVlRo7ZyGJ0C0SEiA7HhbVc1sNNtIyK7FiEtg==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.3.tgz", + "integrity": "sha512-cRSK2uhDKHtZ9hLRM35HxaMAMxyh/L7C96Ojt58DhQBdwTOQlV1VIJHSK6X/pDeSQKhaQqWMFfebt8tIcvRfjQ==", "optional": true, "requires": { "@mapbox/node-pre-gyp": "^1.0.5" diff --git a/gui/package.json b/gui/package.json index e27dd52131..70d1ba8b49 100644 --- a/gui/package.json +++ b/gui/package.json @@ -29,7 +29,7 @@ "styled-components": "^5.1.1" }, "optionalDependencies": { - "grpc-tools": "^1.11.2", + "grpc-tools": "^1.11.3", "nseventmonitor": "^1.0.2" }, "devDependencies": { diff --git a/gui/scripts/build-proto.sh b/gui/scripts/build-proto.sh index 5f8724a68c..7cb0d989c4 100755 --- a/gui/scripts/build-proto.sh +++ b/gui/scripts/build-proto.sh @@ -6,7 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" ARCH="$(uname -m)" -PLATFORM="$(uname -s)-${ARCH}" +PLATFORM="$(uname -s)" MANAGEMENT_INTERFACE_PROTO_BUILD_DIR=${MANAGEMENT_INTERFACE_PROTO_BUILD_DIR:-} NODE_MODULES_DIR="$(cd ../node_modules/.bin && pwd)" PROTO_DIR="../../mullvad-management-interface/proto" @@ -22,7 +22,7 @@ fi mkdir -p $DESTINATION_DIR mkdir -p $TYPES_DESTINATION_DIR -if [[ "${ARCH,,}" == "arm64" || "${ARCH,,}" == "aarch64" ]]; then +if [[ "$PLATFORM" == "Linux" && ("${ARCH,,}" == "arm64" || "${ARCH,,}" == "aarch64") ]]; then if [[ -n "${MANAGEMENT_INTERFACE_PROTO_BUILD_DIR}" ]]; then cp $MANAGEMENT_INTERFACE_PROTO_BUILD_DIR/*.js $DESTINATION_DIR cp $MANAGEMENT_INTERFACE_PROTO_BUILD_DIR/*.ts $TYPES_DESTINATION_DIR |
