oss-fuzz/infra/base-images/base-builder/install_rust.sh

23 lines
996 B
Bash
Raw Normal View History

#!/bin/bash -eux
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
infra: downgrade rust (#11681) Downgrades Rust to nightly at 28th Dec 2023. The version that is build is: ```sh > [2/2] RUN install_rust.sh: 0.210 + curl https://sh.rustup.rs 0.210 + sh -s -- -y --default-toolchain=nightly-2023-12-28 --profile=minimal 0.217 % Total % Received % Xferd Average Speed Time Time Time Current 0.217 Dload Upload Total Spent Left Speed 100 26495 100 26495 0 0 205k 0 --:--:-- --:--:-- --:--:-- 206k 0.348 info: downloading installer 1.603 warning: it looks like you have an existing installation of Rust at: 1.603 warning: /usr/local/bin 1.603 warning: It is recommended that rustup be the primary Rust installation. 1.603 warning: Otherwise you may have confusion unless you are careful with your PATH 1.603 warning: If you are sure that you want both rustup and your already installed Rust 1.603 warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes 1.603 warning: or pass `-y' to ignore all ignorable checks. 1.603 error: cannot install while Rust is installed 1.603 warning: continuing (because the -y flag is set and the error is ignorable) 1.622 info: profile set to 'minimal' 1.622 info: default host triple is x86_64-unknown-linux-gnu 1.622 info: syncing channel updates for 'nightly-2023-12-28-x86_64-unknown-linux-gnu' 2.595 info: latest update on 2023-12-28, rust version 1.77.0-nightly (89e2160c4 2023-12-27) 2.595 info: downloading component 'cargo' 3.274 info: downloading component 'rust-std' ``` --------- Signed-off-by: David Korczynski <david@adalogics.com>
2024-03-13 13:12:26 +00:00
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly-2023-12-28 --profile=minimal
cargo install cargo-fuzz && rm -rf /rust/registry
# Needed to recompile rust std library for MSAN
infra: downgrade rust (#11681) Downgrades Rust to nightly at 28th Dec 2023. The version that is build is: ```sh > [2/2] RUN install_rust.sh: 0.210 + curl https://sh.rustup.rs 0.210 + sh -s -- -y --default-toolchain=nightly-2023-12-28 --profile=minimal 0.217 % Total % Received % Xferd Average Speed Time Time Time Current 0.217 Dload Upload Total Spent Left Speed 100 26495 100 26495 0 0 205k 0 --:--:-- --:--:-- --:--:-- 206k 0.348 info: downloading installer 1.603 warning: it looks like you have an existing installation of Rust at: 1.603 warning: /usr/local/bin 1.603 warning: It is recommended that rustup be the primary Rust installation. 1.603 warning: Otherwise you may have confusion unless you are careful with your PATH 1.603 warning: If you are sure that you want both rustup and your already installed Rust 1.603 warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes 1.603 warning: or pass `-y' to ignore all ignorable checks. 1.603 error: cannot install while Rust is installed 1.603 warning: continuing (because the -y flag is set and the error is ignorable) 1.622 info: profile set to 'minimal' 1.622 info: default host triple is x86_64-unknown-linux-gnu 1.622 info: syncing channel updates for 'nightly-2023-12-28-x86_64-unknown-linux-gnu' 2.595 info: latest update on 2023-12-28, rust version 1.77.0-nightly (89e2160c4 2023-12-27) 2.595 info: downloading component 'cargo' 3.274 info: downloading component 'rust-std' ``` --------- Signed-off-by: David Korczynski <david@adalogics.com>
2024-03-13 13:12:26 +00:00
rustup component add rust-src --toolchain nightly-2023-12-28
cp -r /usr/local/lib/x86_64-unknown-linux-gnu/* /usr/local/lib/