From 37505623790283b6ce6ad0a55d365af34ad5dc40 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 14 Jul 2023 14:12:23 +0200 Subject: [PATCH 1/4] rust-bootstrap: update to 1.71.0 --- srcpkgs/rust-bootstrap/template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template index d1025550e850..bb514c2f95b8 100644 --- a/srcpkgs/rust-bootstrap/template +++ b/srcpkgs/rust-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'rust-bootstrap' pkgname=rust-bootstrap -version=1.70.0 +version=1.71.0 revision=1 short_desc="Rust programming language bootstrap toolchain" maintainer="Orphaned " @@ -31,24 +31,24 @@ case "$XBPS_TARGET_MACHINE" in ${_bootstrap_url}/rustc-${version}-i686-unknown-linux-gnu.tar.xz ${_bootstrap_url}/rust-std-${version}-i686-unknown-linux-gnu.tar.xz" checksum=" - f89c90f80864f68e42b70d9c14984195629ed9894bb5cfe6c8a0f1140f7816ff - 0e5543c35196ca5b08f1b7e49fa3f3b671444d75648504cdbcfd854e2e7efd2d" + e7c9c943b727de4f978cc9366e5c42536992d52ad418ffb9015e836723fd75ca + 46976bf8297efc65556ccddfec395d5327fbe303f9dabffd104628a37cb1de6d" ;; x86_64) distfiles=" ${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-gnu.tar.xz ${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-gnu.tar.xz" checksum=" - 7d891d3e9bc4f1151545c83cbe3bc6af9ed234388c45ca2e19641262f48615e2 - 0c0129717da1e27ccf2c56da950d2fe56973f71beec9e80ae6904b282d2f0ee9" + c293d906769671d1cd18e945671bbd14e0b8a41df5075c47f33e6086fc8a1558 + 98ae6530c3a41167e9d93d11ea078be98a02f6d809a06d0d51af3ce0f73150d7" ;; x86_64-musl) distfiles=" ${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-musl.tar.xz ${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-musl.tar.xz" checksum=" - 69a3ba1273aedaf7aadc91f6ccf59061eb00205c9c523f0b1f91ca14cfa2058c - 7ebaba08385d1ec87d0a27ca8b4e1eb454374da18ffa12621bd1578973754101" + abe1453c35d604a073e67ffc8c467b84dc0eca5c3a742d21b94794a047945197 + c91408683fe0918732525ec1e70263d3fc871ec8d15ae98768a1c6d7b9e3bff1" ;; # placeholders for user-supplied distfiles ppc64le) From f2a1e35a29c8bb161ddec31803c46fb38fe768fb Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 14 Jul 2023 14:13:11 +0200 Subject: [PATCH 2/4] cargo-bootstrap: update to 1.71.0 --- srcpkgs/cargo-bootstrap/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template index d591e4233c57..dc49303c3ba1 100644 --- a/srcpkgs/cargo-bootstrap/template +++ b/srcpkgs/cargo-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'cargo-bootstrap' pkgname=cargo-bootstrap -version=1.70.0 +version=1.71.0 revision=1 short_desc="Bootstrap binaries of Rust package manager" maintainer="Orphaned " @@ -24,15 +24,15 @@ esac case "$XBPS_TARGET_MACHINE" in i686) distfiles="${_bootstrap_url}/cargo-${version}-i686-unknown-linux-gnu.tar.xz" - checksum="5d20e9b8e56f641c3ef4aef965563806aa220044397485ec56f784657451a329" + checksum="ee836c079c53e8e2ed5b2cbad849f991f2142b0b47b593a29b5cb39a76ee910e" ;; x86_64) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-gnu.tar.xz" - checksum="650e7a890a52869cd14e2305652bff775aec7fc2cf47fc62cf4a89ff07242333" + checksum="fe6fb520f59966300ee661d18b37c36cb3e614877c4c01dfedf987b8a9c577e9" ;; x86_64-musl) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-musl.tar.xz" - checksum="4d7513e23b8710ebacb01ed333d00692331295e45191f5c0795aada00f291d19" + checksum="91c80f1912cc1efaa7101ebf50e5222e91a29ccb05febe6fdd53e2504cfdc3c8" ;; # placeholders for user-supplied distfiles ppc64le) From 5f6ea237774d71ecb4e3adc0c27279366038da96 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 14 Jul 2023 14:16:35 +0200 Subject: [PATCH 3/4] rust: update to 1.71.0 --- ...dlib-and-musl_root-from-musl-targets.patch | 46 +++++++++---------- srcpkgs/rust/patches/0015-fix-lint-doc.patch | 45 ++++++++++++++++++ srcpkgs/rust/template | 4 +- 3 files changed, 70 insertions(+), 25 deletions(-) create mode 100644 srcpkgs/rust/patches/0015-fix-lint-doc.patch diff --git a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch index 07c24412f6d9..ef3154a84cda 100644 --- a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch +++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch @@ -60,7 +60,7 @@ index 61553e71b..88f807a58 100644 base } diff --git a/config.example.toml b/config.example.toml -index 6d9c762ce..7a1375d8a 100644 +index d0eaa9fd7..b92f9488e 100644 --- a/config.example.toml +++ b/config.example.toml @@ -556,14 +556,6 @@ changelog-seen = 2 @@ -136,10 +136,10 @@ index 65c882fb8..f35a92821 100644 } } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 4a4e7adcb..f2cdc4a07 100644 +index 33addb90d..fb6c97d82 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -246,39 +246,7 @@ fn copy_self_contained_objects( +@@ -237,39 +237,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -180,9 +180,9 @@ index 4a4e7adcb..f2cdc4a07 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -375,15 +343,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -366,15 +334,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") - .arg(builder.src.join("library/test/Cargo.toml")); + .arg(builder.src.join("library/sysroot/Cargo.toml")); - // Help the libc crate compile by assisting it in finding various - // sysroot native libraries. @@ -197,10 +197,10 @@ index 4a4e7adcb..f2cdc4a07 100644 if let Some(p) = builder.wasi_root(target) { let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap()); diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index cc3b3bc25..eb472c5e8 100644 +index e192cda9a..a7c39c40e 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -210,7 +210,6 @@ pub struct Config { +@@ -211,7 +211,6 @@ pub struct Config { pub missing_tools: bool, // Fallback musl-root for all targets @@ -208,16 +208,16 @@ index cc3b3bc25..eb472c5e8 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -456,8 +455,6 @@ pub struct Target { - pub sanitizers: Option, +@@ -470,8 +469,6 @@ pub struct Target { pub profiler: Option, + pub rpath: Option, pub crt_static: Option, - pub musl_root: Option, - pub musl_libdir: Option, pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -753,7 +750,6 @@ define_config! { +@@ -834,7 +831,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -225,24 +225,24 @@ index cc3b3bc25..eb472c5e8 100644 rpath: Option = "rpath", verbose_tests: Option = "verbose-tests", optimize_tests: Option = "optimize-tests", -@@ -801,8 +797,6 @@ define_config! { - sanitizers: Option = "sanitizers", +@@ -883,8 +879,6 @@ define_config! { profiler: Option = "profiler", + rpath: Option = "rpath", crt_static: Option = "crt-static", - musl_root: Option = "musl-root", - musl_libdir: Option = "musl-libdir", wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1133,7 +1127,6 @@ impl Config { +@@ -1247,7 +1241,6 @@ impl Config { set(&mut config.llvm_tools_enabled, rust.llvm_tools); config.rustc_parallel = rust.parallel_compiler.unwrap_or(false); config.rustc_default_linker = rust.default_linker; - config.musl_root = rust.musl_root.map(PathBuf::from); config.save_toolstates = rust.save_toolstates.map(PathBuf::from); - set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings)); - set(&mut config.backtrace_on_ice, rust.backtrace_on_ice); -@@ -1293,8 +1286,6 @@ impl Config { + set( + &mut config.deny_warnings, +@@ -1414,8 +1407,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -252,7 +252,7 @@ index cc3b3bc25..eb472c5e8 100644 target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); target.sanitizers = cfg.sanitizers; diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py -index abd28b400..6f0f8d879 100755 +index 571062a3a..a6fe35975 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -111,34 +111,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", @@ -287,14 +287,14 @@ index abd28b400..6f0f8d879 100755 - "mips64-unknown-linux-muslabi64 install directory") -v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root", - "mips64el-unknown-linux-muslabi64 install directory") - v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs", - "rootfs in qemu testing, you probably don't want to use this") - v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs", + v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root", + "riscv32gc-unknown-linux-musl install directory") + v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root", diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 419bcbc63..dc98f5197 100644 +index 943f51341..688e64296 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -1139,25 +1139,6 @@ impl Build { +@@ -1219,25 +1219,6 @@ impl Build { } } @@ -321,7 +321,7 @@ index 419bcbc63..dc98f5197 100644 fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p) diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs -index 8a40b0f64..59e11d304 100644 +index 140259b02..24bfb6019 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -11,7 +11,6 @@ diff --git a/srcpkgs/rust/patches/0015-fix-lint-doc.patch b/srcpkgs/rust/patches/0015-fix-lint-doc.patch new file mode 100644 index 000000000000..e36e17275365 --- /dev/null +++ b/srcpkgs/rust/patches/0015-fix-lint-doc.patch @@ -0,0 +1,45 @@ +From 67b5990472e3cac643d8cf90f45fe42201ddec3c Mon Sep 17 00:00:00 2001 +From: jyn +Date: Mon, 10 Jul 2023 15:59:30 -0500 +Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is + enabled" + +This was not the correct fix. The problem was two-fold: +- `download-rustc` didn't respect `llvm.assertions` +- `rust-dev` was missing a bump to `download-ci-llvm-stamp` + +The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`. +--- + src/tools/lint-docs/src/groups.rs | 1 - + src/tools/lint-docs/src/lib.rs | 6 ------ + 2 files changed, 7 deletions(-) + +diff --git a/src/tools/lint-docs/src/groups.rs b/src/tools/lint-docs/src/groups.rs +index b11fb287cf4dd..5be8ef7996bb2 100644 +--- a/src/tools/lint-docs/src/groups.rs ++++ b/src/tools/lint-docs/src/groups.rs +@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> { + fn collect_groups(&self) -> Result> { + let mut result = BTreeMap::new(); + let mut cmd = Command::new(self.rustc_path); +- cmd.env_remove("LD_LIBRARY_PATH"); + cmd.arg("-Whelp"); + let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?; + if !output.status.success() { +diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs +index fe29b9abda39a..b7c8b9ed2e318 100644 +--- a/src/tools/lint-docs/src/lib.rs ++++ b/src/tools/lint-docs/src/lib.rs +@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> { + fs::write(&tempfile, source) + .map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?; + let mut cmd = Command::new(self.rustc_path); +- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself. +- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source, +- // and sometimes the paths conflict. In particular, when using `download-rustc`, +- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`. +- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler. +- cmd.env_remove("LD_LIBRARY_PATH"); + if options.contains(&"edition2015") { + cmd.arg("--edition=2015"); + } else { diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 523f2ccfe58c..3331675ac250 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,7 +8,7 @@ # uploaded to https://repo-default.voidlinux.org/distfiles/ # pkgname=rust -version=1.70.0 +version=1.71.0 revision=1 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap" makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm15" @@ -18,7 +18,7 @@ maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://www.rust-lang.org/" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=b2bfae000b7a5040e4ec4bbc50a09f21548190cb7570b0ed77358368413bd27c +checksum=a667e4abdc5588ebfea35c381e319d840ffbf8d2dbfb79771730573642034c96 lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src From 58a1a98f3b5887b2f66bb167036d3d331e64ce4b Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 14 Jul 2023 14:20:28 +0200 Subject: [PATCH 4/4] cargo: update to 1.71.0 --- srcpkgs/cargo/patches/link-static.patch | 8 -------- srcpkgs/cargo/template | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 srcpkgs/cargo/patches/link-static.patch diff --git a/srcpkgs/cargo/patches/link-static.patch b/srcpkgs/cargo/patches/link-static.patch deleted file mode 100644 index 6f38b77ce95c..000000000000 --- a/srcpkgs/cargo/patches/link-static.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/Cargo.toml 2019-01-02 22:49:06.000000000 +0100 -+++ b/Cargo.toml 2019-02-13 15:12:44.616810828 +0100 -@@ -116,3 +116,5 @@ doc = false - deny-warnings = [] - vendored-openssl = ["openssl/vendored"] - pretty-env-logger = ["pretty_env_logger"] -+ -+all-static = ['curl-sys/static-curl'] diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 5c610b2bcf83..ee450343b127 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,8 +1,8 @@ # Template file for 'cargo' pkgname=cargo -version=1.70.0 -revision=2 -_cargo_revision=0.71.0 +version=1.71.0 +revision=1 +_cargo_revision=0.72.0 build_helper=rust hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel" makedepends="rust libcurl-devel openssl-devel" @@ -12,7 +12,7 @@ maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://crates.io/" distfiles="https://github.com/rust-lang/cargo/archive/refs/tags/${_cargo_revision}.tar.gz" -checksum=43ddf8be33d0f9d2514a75ae0df57ed95c8e99a9869deddf49e6eeee5d56e940 +checksum=c0c15a35852c114859cfe11c5c76ee12105d66d7c90e650af83ac7b8a6a856fc replaces="cargo-tree>=0" build_options="static bindist"