From 0b735d9e664fc43a82033259525391901226e830 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 20 Nov 2020 12:57:42 +0200 Subject: [PATCH] rust [testing]: 1.48.0 --- testing/rust/build | 71 +++++++++++++++++++++++++++++ testing/rust/checksums | 5 ++ testing/rust/depends | 8 ++++ testing/rust/patches/libressl.patch | 13 ++++++ testing/rust/sources | 5 ++ testing/rust/version | 1 + 6 files changed, 103 insertions(+) create mode 100755 testing/rust/build create mode 100644 testing/rust/checksums create mode 100644 testing/rust/depends create mode 100644 testing/rust/patches/libressl.patch create mode 100644 testing/rust/sources create mode 100644 testing/rust/version 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