rust [testing]: 1.48.0

This commit is contained in:
Dylan Araps 2020-11-20 12:57:42 +02:00
parent 5e34cb06b8
commit 0b735d9e66
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
6 changed files with 103 additions and 0 deletions

71
testing/rust/build Executable file
View File

@ -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 <<EOF
[llvm]
link-shared = true
[build]
build = "x86_64-unknown-linux-musl"
host = [ "x86_64-unknown-linux-musl" ]
target = [ "x86_64-unknown-linux-musl" ]
docs = false
compiler-docs = false
extended = true
submodules = false
python = "python3"
locked-deps = true
vendor = true
sanitizers = false
profiler = false
full-bootstrap = false
[install]
prefix = "/usr"
[rust]
channel = "stable"
rpath = false
debuginfo-level = 0
debug = false
backtrace = false
jemalloc = false
debug-assertions = false
codegen-tests = false
codegen-units-std = 1
[target.x86_64-unknown-linux-musl]
llvm-config = "/usr/bin/llvm-config"
crt-static = false
EOF
export DESTDIR="$1"
python3 ./x.py build -j "$(nproc)"
python3 ./x.py install
rm -rf "$1/usr/lib/rustlib/src/"
rm -f "$1/usr/lib/rustlib/uninstall.sh"

5
testing/rust/checksums Normal file
View File

@ -0,0 +1,5 @@
ff0a242392a1865d7b2d08eb5ca6c1b3fd0820741d4c13a51a4b2d5d2bb53908
11a181846bbc56b42f2142cc5517dc084e12b9147b215a55056fc70274f643da
9fb8267d7ed0adc9bf591c00c0dc4ed4542b399312c753affddc5e87d3bedadc
94c00f074453019ab5847b1a1194287a3bc35af00540f3a6608341e0a13127f9
5e00f619c609d03fba09f0c44d8f667d3ab16b7ea2ef7935a1656a8845a930ec

8
testing/rust/depends Normal file
View File

@ -0,0 +1,8 @@
cmake make
curl make
libressl
llvm
pkgconf make
python make
xz
zlib

View File

@ -0,0 +1,13 @@
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
index 49f26d2b7..27deb1f36 100644
--- a/vendor/openssl-sys/build/main.rs
+++ b/vendor/openssl-sys/build/main.rs
@@ -221,6 +221,8 @@ See rust-openssl README for more information:
(3, 1, 0) => ('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(),
};

5
testing/rust/sources Normal file
View File

@ -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

1
testing/rust/version Normal file
View File

@ -0,0 +1 @@
1.48.0 1