diff --git a/testing/rust/build b/testing/rust/build new file mode 100755 index 00000000..b5e5279f --- /dev/null +++ b/testing/rust/build @@ -0,0 +1,71 @@ +#!/bin/sh -e + +patch -p1 < libressl.patch + +# This package mimics the download process of rust's 'x.py' +# bootstrap library to allow for the removal of the internet +# connection requirement per build. +{ + mkdir -p "${cache_dir:=build/cache/2020-10-08}" + + for tarball in *.tar.xz\?no-extract; do + mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}" + done +} + +# Disable static by default. +sed -i 's/\(base.crt_static_default =\) true/\1 false/' \ + compiler/rustc_target/src/spec/linux_musl_base.rs \ + vendor/rustc-ap-rustc_target/src/spec/linux_musl_base.rs + +# We modified these crates. +sed -i 's/\("files":{\)[^}]*/\1/' \ + vendor/openssl-sys/.cargo-checksum.json \ + vendor/rustc-ap-rustc_target/.cargo-checksum.json + +cat > config.toml < ('3', '1', '0'), + (3, 1, _) => ('3', '1', 'x'), + (3, 2, 0) => ('3', '2', '0'), ++ (3, 2, 1) => ('3', '2', '1'), ++ (3, 2, _) => ('3', '2', 'x'), + _ => version_error(), + }; + diff --git a/testing/rust/sources b/testing/rust/sources new file mode 100644 index 00000000..d7112ece --- /dev/null +++ b/testing/rust/sources @@ -0,0 +1,5 @@ +https://static.rust-lang.org/dist/rustc-1.48.0-src.tar.xz +https://static.rust-lang.org/dist/2020-10-08/rust-std-1.47.0-x86_64-unknown-linux-musl.tar.xz?no-extract +https://static.rust-lang.org/dist/2020-10-08/rustc-1.47.0-x86_64-unknown-linux-musl.tar.xz?no-extract +https://static.rust-lang.org/dist/2020-10-08/cargo-0.48.0-x86_64-unknown-linux-musl.tar.xz?no-extract +patches/libressl.patch diff --git a/testing/rust/version b/testing/rust/version new file mode 100644 index 00000000..dd56abe8 --- /dev/null +++ b/testing/rust/version @@ -0,0 +1 @@ +1.48.0 1