Skip to content

Commit

Permalink
automation: remove Rust installation on workers from setup-host.sh
Browse files Browse the repository at this point in the history
setup-local-ssd.sh already has code to install Rust.  It doesn’t need to
be done in setup-host.sh.  Furthermore, for easier interactive use, make
sure CARGO_HOST and RUSTUP_HOME are properly setup when logging onto the
machine as nayduck user.
  • Loading branch information
mina86 committed Oct 7, 2022
1 parent 076fafd commit 6d4b33c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 3 additions & 8 deletions automation/setup-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,9 @@ if [ "$type" = frontend ]; then
# different on different machines so this needs to be done manually.
# This also needs to be added as a service to systemd so it’s run on
# each boot.
else
curl https://sh.rustup.rs -sSf | sudo -u nayduck sh -s -- -y
sudo -u nayduck .cargo/bin/rustup target add wasm32-unknown-unknown
if [ "$type" = worker ]; then
apt-get -y install docker.io
usermod -aGdocker nayduck
sudo -u nayduck .cargo/bin/cargo install cargo-fuzz
fi
elif [ "$type" = worker ]; then
apt-get -y install docker.io
usermod -aGdocker nayduck
fi

case $type in
Expand Down
3 changes: 3 additions & 0 deletions systemd/setup-local-ssd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ if ! [ -d "$dir/home" ]; then
"$CARGO_HOME/bin/rustup" target add wasm32-unknown-unknown
"$CARGO_HOME/bin/cargo" install cargo-fuzz
'
printf "%s='%s'\\n" >>"$dir/home/cargo/env" \
CARGO_HOME "$dir/home/cargo" \
RUSTUP_HOME "$dir/home/rustup"
fi

if ! [ -d "$dir/docker" ]; then
Expand Down

0 comments on commit 6d4b33c

Please sign in to comment.