diff --git a/srcpkgs/rustup/patches/0001-Symlink-rustup-instead-of-copying-it.patch b/srcpkgs/rustup/patches/0001-Symlink-rustup-instead-of-copying-it.patch index 7f57e6fe0f1..27d1caddf20 100644 --- a/srcpkgs/rustup/patches/0001-Symlink-rustup-instead-of-copying-it.patch +++ b/srcpkgs/rustup/patches/0001-Symlink-rustup-instead-of-copying-it.patch @@ -8,30 +8,26 @@ To make sure that we can update rustup using xbps, we need to symlink rustup into $CARGO_HOME/bin instead of copying it. Upstream doesn't want the patch as it is right now. ---- - src/cli/self_update.rs | 3 +-- - src/utils/utils.rs | 2 +- - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cli/self_update.rs b/src/cli/self_update.rs -index a4c00d57..82a4d67a 100644 +index 89ee515..26a98cd 100644 --- a/src/cli/self_update.rs +++ b/src/cli/self_update.rs -@@ -729,8 +729,7 @@ fn install_bins() -> Result<()> { +@@ -731,8 +731,7 @@ fn install_bins(process: &Process) -> Result<()> { 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() + install_proxies(process) } -diff --git a/src/utils/utils.rs b/src/utils/utils.rs -index 0362372b..9e5a5fe2 100644 ---- a/src/utils/utils.rs -+++ b/src/utils/utils.rs -@@ -306,7 +306,7 @@ pub fn hardlink_file(src: &Path, dest: &Path) -> Result<()> { +diff --git a/src/utils/mod.rs b/src/utils/mod.rs +index 52c76ac..fc40ae4 100644 +--- a/src/utils/mod.rs ++++ b/src/utils/mod.rs +@@ -397,7 +397,7 @@ pub fn hardlink_file(src: &Path, dest: &Path) -> Result<()> { } #[cfg(unix)] @@ -40,6 +36,3 @@ index 0362372b..9e5a5fe2 100644 std::os::unix::fs::symlink(src, dest).with_context(|| RustupError::LinkingFile { src: PathBuf::from(src), dest: PathBuf::from(dest), --- -2.37.0 - diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template index 978787fcaa1..5395c2d6392 100644 --- a/srcpkgs/rustup/template +++ b/srcpkgs/rustup/template @@ -1,47 +1,32 @@ # Template file for 'rustup' pkgname=rustup -version=1.27.1 +version=1.28.1 revision=1 # rustup doesn't recognize this target archs="~armv*-musl" build_style=cargo build_helper=qemu configure_args="--bin rustup-init --no-default-features - --features curl-backend,reqwest-backend,reqwest-default-tls,no-self-update" + --features curl-backend,reqwest-native-tls,no-self-update" hostmakedepends="pkg-config" -makedepends="openssl-devel zlib-devel libcurl-devel" +makedepends="openssl-devel zlib-devel libcurl-devel liblzma-devel libzstd-devel" short_desc="Rust toolchain installer" maintainer="tranzystorekk " license="Apache-2.0 OR MIT" homepage="https://www.rustup.rs" changelog="https://raw.githubusercontent.com/rust-lang/rustup/master/CHANGELOG.md" distfiles="https://github.com/rust-lang/rustup/archive/refs/tags/${version}.tar.gz" -checksum=f5ba37f2ba68efec101198dca1585e6e7dd7640ca9c526441b729a79062d3b77 - -case "$XBPS_TARGET_MACHINE" in - x86_64*|i686*|arm*|aarch64*) - configure_args+=" --features reqwest-rustls-tls" - ;; -esac - -post_build() { - RUSTUP="target/${RUST_TARGET}/release/rustup-init" - ln -sf "$RUSTUP" rustup - - # generate shell completions - vtargetrun ./rustup completions zsh >rustup.zsh - vtargetrun ./rustup completions bash >rustup.bash - vtargetrun ./rustup completions fish >rustup.fish -} +checksum=2def2f9a0a4a21c80f862c0797c2d76e765e0e7237e1e41f28324722ab912bac do_install() { vbin target/${RUST_TARGET}/release/rustup-init - - vcompletion rustup.bash bash - vcompletion rustup.fish fish - vcompletion rustup.zsh zsh - vdoc README.md vlicense LICENSE-APACHE vlicense LICENSE-MIT + + ln -s ${DESTDIR}/usr/bin/rustup-init rustup + for _shell in bash fish zsh; do + vtargetrun ./rustup completions ${_shell} > rustup.${_shell} + vcompletion rustup.${_shell} ${_shell} + done }