From b28f0aefa84b3011776db5d966d91f1564c28833 Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Fri, 22 Nov 2024 13:04:49 -0800 Subject: [PATCH] No longer install rust on the jenkins-worker machines. (#130) ## Summary: fastly-ka-dev is gone, we don't need to run rust code anymore! Issue: none ## Test plan: none Subscribers: @MiguelCastillo Author: csilvers Reviewers: kevinb-khan Required Reviewers: Approved By: kevinb-khan Checks: Pull Request URL: https://github.com/Khan/khan-dotfiles/pull/130 --- bin/install-mac-rust.py | 14 -------------- bin/system_report.sh | 3 --- containers/kabuild/Dockerfile | 5 ----- linux-setup.sh | 14 -------------- mac-setup-normal.sh | 1 - 5 files changed, 37 deletions(-) delete mode 100755 bin/install-mac-rust.py diff --git a/bin/install-mac-rust.py b/bin/install-mac-rust.py deleted file mode 100755 index 90a76cf..0000000 --- a/bin/install-mac-rust.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 -"""Install rust & cargo on a mac.""" - -# TODO(ebrown): Make something that works on mac & linux -# TODO(ebrown): Install a specific version of rust/cargo -# TODO(ebrown): Tweak khan startup scripts instead of rustup-init doing it - -import subprocess - -# M1 requires we run under rosetta, thus /usr/local/bin/brew -# The same command works for both intel & M1 macs -subprocess.run(['brew', 'install', 'rustup-init'], check=True) -subprocess.run(['rustup-init', '-y', '-t', 'wasm32-wasi', '--no-modify-path'], - check=True) diff --git a/bin/system_report.sh b/bin/system_report.sh index ecf0a32..263ee0b 100755 --- a/bin/system_report.sh +++ b/bin/system_report.sh @@ -109,9 +109,6 @@ header "Go" tool_version go version kv_multiline "Go ENV" "$(go env)" -header "Rust" -tool_version cargo --version - # This is multi-line, but it's still pretty readable. Good enough for now. header "Fastly" tool_version fastly version diff --git a/containers/kabuild/Dockerfile b/containers/kabuild/Dockerfile index 5bf2f9f..61436f0 100644 --- a/containers/kabuild/Dockerfile +++ b/containers/kabuild/Dockerfile @@ -128,9 +128,4 @@ RUN cat bashrc.default .bashrc > .bashrc.new RUN mv .bashrc.new .bashrc RUN rm -f bashrc.default -RUN mkdir -p /tmp/rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output /tmp/rust/rustup-init.sh -RUN bash /tmp/rust/rustup-init.sh -y --profile default --no-modify-path -RUN rm -rf /tmp/rust - CMD tail -f /dev/null diff --git a/linux-setup.sh b/linux-setup.sh index 9130aba..6dc2b2d 100755 --- a/linux-setup.sh +++ b/linux-setup.sh @@ -301,19 +301,6 @@ install_postgresql() { sudo service postgresql restart } -install_rust() { - builddir=$(mktemp -d -t rustup.XXXXX) - - ( - cd "$builddir" - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup-init.sh - bash rustup-init.sh -y --profile default --no-modify-path - ) - - # cleanup temporary build directory - sudo rm -rf "$builddir" -} - install_fastly() { builddir=$(mktemp -d -t fastly.XXXXX) @@ -370,7 +357,6 @@ install_watchman setup_clock config_inotify install_postgresql -install_rust install_fastly # TODO (boris): Setup pyenv (see mac_setup:install_python_tools) # https://opencafe.readthedocs.io/en/latest/getting_started/pyenv/ diff --git a/mac-setup-normal.sh b/mac-setup-normal.sh index 925a1c9..1d88132 100755 --- a/mac-setup-normal.sh +++ b/mac-setup-normal.sh @@ -373,7 +373,6 @@ update_git install_node install_go -"$DEVTOOLS_DIR"/khan-dotfiles/bin/install-mac-rust.py "$DEVTOOLS_DIR"/khan-dotfiles/bin/mac-setup-postgres.py install_redis