From cdb5ac2b9a71f146fb3e5a1d9ae10f97856e728a Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 13 Dec 2018 20:48:18 +0100 Subject: [PATCH] rustup: update to 1.16.0. also symlink rustup into $CARGO_HOME/bin/rustup instead of copying it. Otherwise we can't update it via xbps fixes #5398 --- srcpkgs/rustup/INSTALL.msg | 1 + srcpkgs/rustup/files/rustup.sh | 2 -- srcpkgs/rustup/patches/dont-copy-rustup-bin.patch | 14 ++++++++++++++ srcpkgs/rustup/template | 8 +++----- 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/rustup/INSTALL.msg delete mode 100644 srcpkgs/rustup/files/rustup.sh create mode 100644 srcpkgs/rustup/patches/dont-copy-rustup-bin.patch diff --git a/srcpkgs/rustup/INSTALL.msg b/srcpkgs/rustup/INSTALL.msg new file mode 100644 index 00000000000..45e8be341e5 --- /dev/null +++ b/srcpkgs/rustup/INSTALL.msg @@ -0,0 +1 @@ +Please run rustup-init after initial install to use rustup. diff --git a/srcpkgs/rustup/files/rustup.sh b/srcpkgs/rustup/files/rustup.sh deleted file mode 100644 index 6a00aac7355..00000000000 --- a/srcpkgs/rustup/files/rustup.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Export PATH ourselves so we don't need to run rustup-init -export PATH="$PATH:$HOME/.cargo/bin" diff --git a/srcpkgs/rustup/patches/dont-copy-rustup-bin.patch b/srcpkgs/rustup/patches/dont-copy-rustup-bin.patch new file mode 100644 index 00000000000..d76404ee118 --- /dev/null +++ b/srcpkgs/rustup/patches/dont-copy-rustup-bin.patch @@ -0,0 +1,14 @@ +Upstream: No, not upstreamable like this +Reason: We want the rustup binary in $CARGO_HOME/bin to be of the +same version as the one we distribute in this rustup package. +--- src/rustup-cli/self_update.rs.1 2018-12-13 21:56:55.211778812 +0100 ++++ src/rustup-cli/self_update.rs 2018-12-13 21:56:42.763779768 +0100 +@@ -671,8 +671,7 @@ + if rustup_path.exists() { + utils::remove_file("rustup-bin", rustup_path)?; + } +- utils::copy_file(this_exe_path, rustup_path)?; +- utils::make_executable(rustup_path)?; ++ utils::symlink_file(this_exe_path, rustup_path)?; + install_proxies() + } diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template index f5c24394836..72ac5722d5e 100644 --- a/srcpkgs/rustup/template +++ b/srcpkgs/rustup/template @@ -1,6 +1,6 @@ # Template file for 'rustup' pkgname=rustup -version=1.15.0 +version=1.16.0 revision=1 wrksrc="${pkgname}.rs-${version}" build_style=cargo @@ -12,10 +12,10 @@ maintainer="Daniel Lee Ramírez " license="Apache-2.0, MIT" homepage="https://www.rustup.rs" distfiles="https://github.com/rust-lang-nursery/${pkgname}.rs/archive/${version}.tar.gz" -checksum=470441d59dbb33f4e3e52e3f7420734dae0066598802c2b3b4f89f5b3a6a9e45 +checksum=8c4ffeda2088dbdd5ea2eac8acef5ddd57dfcfe1f06a503e3da790f93161e1a6 do_install() { - vbin target/${RUST_TARGET}/release/rustup-init rustup + vbin target/${RUST_TARGET}/release/rustup-init if ! [ "$CROSS_BUILD" ]; then # generate shell completions @@ -29,8 +29,6 @@ do_install() { vinstall rustup.fish 0644 usr/share/fish/completions/ fi - vinstall ${FILESDIR}/rustup.sh 0644 etc/profile.d/ - vdoc README.md vlicense LICENSE-APACHE vlicense LICENSE-MIT