diff --git a/extra/rust/build b/extra/rust/build index 9f0bf3e1..1acbb91b 100755 --- a/extra/rust/build +++ b/extra/rust/build @@ -1,20 +1,19 @@ #!/bin/sh -e +patch -p1 < musl.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. { - cache_dir=build/cache/2019-12-19 - mkdir -p "$cache_dir" + mkdir -p "${cache_dir:=build/cache/2019-12-19}" for tarball in *.tar.xz\?no-extract; do mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}" done } -patch -p1 < musl.patch - -# 'rust' checksums files in 'vendor/', but we patch a few files. +# 'rust' checksums files in 'vendor/', but we patch a few. for vendor in libc openssl-sys; do sed -i 's/\("files":{\)[^}]*/\1/' "vendor/$vendor/.cargo-checksum.json" done @@ -24,32 +23,41 @@ cat > config.toml <