From 7031c39064a9363799c65a509b77a278116c4f7a Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Tue, 22 Mar 2022 17:27:07 +0530 Subject: [PATCH 1/4] rust-bootstrap: update to 1.59.0 --- srcpkgs/rust-bootstrap/template | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template index bbedb66430b6..ffd17a91ab26 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.57.0 +version=1.59.0 revision=1 create_wrksrc=yes short_desc="Rust programming language bootstrap toolchain" @@ -29,38 +29,38 @@ distfiles=" case "$XBPS_TARGET_MACHINE" in i686) checksum=" - 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e - 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db" + 47f5702e5cc3414585e60d572bfeca85cd6d834d6705b509de1d4c8285b02a3a + 26e91818a36184998039aeaabbf0972a8610d0d250e4bc03de6f27a7843971b5" ;; x86_64) checksum=" - c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86 - ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c" + 838de1fef855ef7733a87862c2575e8da9f3fa11fd0a8ce05c293038ea92356e + c854a9ee3dd8e5be9522c1581f75838c1cbae6dece3934b0004f138c4a5024a3" ;; x86_64-musl) checksum=" - 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c - 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94" + e0b543b36f8b3471975e5982f7c93894947af315932dd3305d1cf5763c4f5d4e + 473b6ddf598418db49efc21c3d2702cdaf9c78ee4ae00611c7d9e384a2d4dad7" ;; ppc64le) checksum=" - f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc - fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a" + e5458f55e51f8baecab4ff1e43fae5c6e1c40d8171098ab633747ee0684b37bb + 15dee7705967e3351aff11c64ada30c4957b54066c7ee49b87be4b8155bd0a7d" ;; ppc64le-musl) checksum=" - 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8 - d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e" + f2b7e87c5f7fbab96c008374049ba1019c3503cf3c5b7742e536375c2a11f584 + f2b7e87c5f7fbab96c008374049ba1019c3503cf3c5b7742e536375c2a11f584" ;; ppc64) checksum=" - 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982 - e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0" + 22380d50ca30793e00e4688bcc06180b7ce3e2badeae8320a2aae25f65966f52 + 1217290e951ae84998d2d04a88d154b1da205e2638a3449c02c8e9256bff589c" ;; ppc) checksum=" - a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150 - bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44" + fe847f49ad4afa42858e6f712da3c7d8a3e502d9104eed84db440fdc53cc6f96 + 5ead471b53d290960d49a7cec0ba01a082f5e6cfa18825366990d46797dc7161" ;; *) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";; esac From db9cdf70fc354edb06d2425b7a0c6e72116641e0 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Mon, 21 Mar 2022 18:23:35 +0530 Subject: [PATCH 2/4] rust: update to 1.59.0 --- .../rust/patches/0001-musl-void-setup.patch | 79 ++++++------------- ...007-fix-rustdoc-when-cross-compiling.patch | 12 +-- ... 0010-do-not-export-LD_LIBRARY_PATH.patch} | 0 ...kage-of-musl-libc-for-the-libc-crate.patch | 8 +- srcpkgs/rust/patches/native-sysroot.patch | 22 +++--- srcpkgs/rust/template | 12 +-- 6 files changed, 49 insertions(+), 84 deletions(-) rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%) diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch index 427581c48f54..384f9e0c0dc2 100644 --- a/srcpkgs/rust/patches/0001-musl-void-setup.patch +++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch @@ -133,9 +133,9 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index e9cc7662e63..4971534ba0e 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -199,36 +199,7 @@ fn copy_self_contained_objects( +@@ -200,36 +200,7 @@ fn copy_self_contained_objects( - // Copies the CRT objects. + // Copies the libc and CRT objects. // - // rustc historically provides a more self-contained installation for musl targets - // not requiring the presence of a native musl toolchain. For example, it can fall back @@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644 - let srcdir = builder.musl_libdir(target).unwrap_or_else(|| { - panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple) - }); -- for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { +- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { - copy_and_stamp( - builder, - &libdir_self_contained, @@ -171,7 +171,7 @@ index e9cc7662e63..4971534ba0e 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -313,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/test/Cargo.toml")); @@ -199,7 +199,7 @@ index e658d958d0a..914b1390b37 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -298,8 +297,6 @@ pub struct Target { +@@ -299,8 +298,6 @@ pub struct Target { pub sanitizers: Option, pub profiler: Option, pub crt_static: Option, @@ -208,24 +208,24 @@ index e658d958d0a..914b1390b37 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -493,7 +490,6 @@ struct Rust { - default_linker: Option, - channel: Option, - description: Option, -- musl_root: Option, - rpath: Option, - verbose_tests: Option, - optimize_tests: Option, -@@ -536,8 +532,6 @@ struct TomlTarget { - sanitizers: Option, - profiler: Option, - crt_static: Option, -- musl_root: Option, -- musl_libdir: Option, - wasi_root: Option, - qemu_rootfs: Option, - no_std: Option, -@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config { +@@ -531,7 +528,6 @@ derive_merge! { + default_linker: Option, + channel: Option, + description: Option, +- musl_root: Option, + rpath: Option, + verbose_tests: Option, + optimize_tests: Option, +@@ -577,8 +573,6 @@ derive_merge! { + sanitizers: Option, + profiler: Option, + crt_static: Option, +- musl_root: Option, +- musl_libdir: Option, + wasi_root: Option, + qemu_rootfs: Option, + no_std: Option, +@@ -938,7 +932,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; @@ -233,7 +233,7 @@ index e658d958d0a..914b1390b37 100644 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); -@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config { +@@ -984,8 +977,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -285,15 +285,7 @@ diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 2d4e1527897..3abe9f4a143 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -277,7 +277,6 @@ pub struct Build { - struct Crate { - name: Interned, - deps: HashSet>, -- id: String, - path: PathBuf, - } - -@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option { +@@ -1050,25 +1051,6 @@ impl Build { } } @@ -319,27 +311,6 @@ index 2d4e1527897..3abe9f4a143 100644 /// Returns the sysroot for the wasi target, if defined 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/metadata.rs b/src/bootstrap/metadata.rs -index a38391c7b88..65e229697dc 100644 ---- a/src/bootstrap/metadata.rs -+++ b/src/bootstrap/metadata.rs -@@ -14,7 +14,6 @@ struct Output { - - #[derive(Deserialize)] - struct Package { -- id: String, - name: String, - source: Option, - manifest_path: String, -@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) { - .filter(|dep| dep.source.is_none()) - .map(|dep| INTERNER.intern_string(dep.name)) - .collect(); -- build.crates.insert(name, Crate { name, id: package.id, deps, path }); -+ build.crates.insert(name, Crate { name, deps, path }); - } - } - } diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index d7db2cef24f..a791177956d 100644 --- a/src/bootstrap/sanity.rs diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch index adaf86f2f451..2cc1f6b900d3 100644 --- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch +++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch @@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index e4396d530..cb2312028 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs -@@ -20,14 +20,11 @@ fn main() { +@@ -22,14 +22,11 @@ fn main() { Err(_) => 0, }; -- let mut dylib_path = bootstrap::util::dylib_path(); +- let mut dylib_path = dylib_path(); - dylib_path.insert(0, PathBuf::from(libdir.clone())); - let mut cmd = Command::new(rustdoc); cmd.args(&args) .arg("--sysroot") .arg(&sysroot) -- .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap()); -+ .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone())); +- .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap()); ++ .env(dylib_path_var(), PathBuf::from(libdir.clone())); // Force all crates compiled by this compiler to (a) be unstable and (b) // allow the `rustc_private` feature to link to other unstable crates -@@ -60,7 +57,7 @@ fn main() { +@@ -62,7 +59,7 @@ fn main() { eprintln!( "rustdoc command: {:?}={:?} {:?}", - bootstrap::util::dylib_path_var(), + dylib_path_var(), - env::join_paths(&dylib_path).unwrap(), + PathBuf::from(libdir.clone()), cmd, diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch similarity index 100% rename from srcpkgs/rust/patches/ld-library-path.patch rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch index a9ca5f6c7bba..8a18e414e209 100644 --- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch +++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch @@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs index 238da24b..ffb05ee7 100644 --- a/vendor/libc/src/unix/mod.rs +++ b/vendor/libc/src/unix/mod.rs -@@ -299,11 +299,11 @@ cfg_if! { - // cargo build, don't pull in anything extra as the libstd dep - // already pulls in all libs. +@@ -329,11 +329,11 @@ cfg_if! { + #[link(name = "c", cfg(not(target_feature = "crt-static")))] + extern {} } else if #[cfg(target_env = "musl")] { + #[link(name = "c")] + extern {} #[cfg_attr(feature = "rustc-dep-of-std", -- link(name = "c", kind = "static", +- link(name = "c", kind = "static", modifiers = "-bundle", + link(name = "gcc", kind = "static-nobundle", cfg(target_feature = "crt-static")))] - #[cfg_attr(feature = "rustc-dep-of-std", diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch index a23046220e9c..a8ff034e7370 100644 --- a/srcpkgs/rust/patches/native-sysroot.patch +++ b/srcpkgs/rust/patches/native-sysroot.patch @@ -26,23 +26,23 @@ diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 06b7a8c55..d8e9275ad 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -292,6 +292,7 @@ pub struct Target { - pub ar: Option, +@@ -294,6 +294,7 @@ pub struct Target { pub ranlib: Option, + pub default_linker: Option, pub linker: Option, + pub sysroot: Option, pub ndk: Option, pub sanitizers: Option, pub profiler: Option, -@@ -525,6 +526,7 @@ struct TomlTarget { - ar: Option, - ranlib: Option, - linker: Option, -+ sysroot: Option, - llvm_config: Option, - llvm_filecheck: Option, - android_ndk: Option, -@@ -909,6 +911,7 @@ impl Config { +@@ -567,6 +568,7 @@ derive_merge! { + ranlib: Option, + default_linker: Option, + linker: Option, ++ sysroot: Option, + llvm_config: Option, + llvm_filecheck: Option, + android_ndk: Option, +@@ -976,6 +978,7 @@ impl Config { target.ar = cfg.ar.map(PathBuf::from); target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 560a629f3da2..49de23df8acd 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,7 +8,7 @@ # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/ # pkgname=rust -version=1.57.0 +version=1.59.0 revision=1 wrksrc="rustc-${version}-src" hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap" @@ -19,7 +19,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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a +checksum=a7c8eeaee85bfcef84c96b02b3171d1e6540d15179ff83dddd9eafba185f85f9 lib32disabled=yes make_check=no # CBA for now @@ -216,14 +216,8 @@ do_install() { cd ${DESTDIR}/usr/lib # symlinks instead of copies - mv *.so rustlib/${RUST_TARGET}/lib + rm *.so ln -sf rustlib/${RUST_TARGET}/lib/*.so . - - # executable used for split dwarf, currently unstable on linux. - # it's copied directly from the local llvm package, but - # FIXME: cross builds are installing the version from the build machine, - # it shouldn't be necessary to remove it - rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp } rust-doc_package() { From 5fed97111fbee25f5525ffcf291397fa672c6c68 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Tue, 22 Mar 2022 17:31:31 +0530 Subject: [PATCH 3/4] cargo-bootstrap: update to 1.59.0 --- srcpkgs/cargo-bootstrap/template | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template index e75f8763b5b8..bb7490566a4f 100644 --- a/srcpkgs/cargo-bootstrap/template +++ b/srcpkgs/cargo-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'cargo-bootstrap' pkgname=cargo-bootstrap -version=0.58.0 +version=1.59.0 revision=1 short_desc="Bootstrap binaries of Rust package manager" maintainer="q66 " @@ -11,43 +11,39 @@ lib32disabled=yes nostrip=yes _bootstrap_url="https://static.rust-lang.org/dist" -_bootver=1.57.0 # we don't use upstream cargo binaries for ppc32, as they are busted (probably # a dependency is wrong, which results in failed signature verification when # updating the crates.io index) case "$XBPS_TARGET_MACHINE" in x86_64*|i686|ppc64le) ;; - *) - _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" - _bootver=${version} - ;; + *) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;; esac -wrksrc="cargo-${_bootver}-${RUST_TARGET}" -distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz" +wrksrc="cargo-${version}-${RUST_TARGET}" +distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz" case "$XBPS_TARGET_MACHINE" in i686) - checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7" + checksum="4f282b8a4dadf53ba3f8784cefe0c2be908179ba81b7b29a0db4a11b6a3f8849" ;; x86_64) - checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d" + checksum="f56ebfb333ea46e4429377bf4b16a2ec889d61640a41c3093577cdd8f3c80b96" ;; x86_64-musl) - checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932" + checksum="95f2727f22f40d7a294f08d24dc7b5f4fb4fe3991854becceffa75bf8f049745" ;; ppc64le) - checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e" + checksum="fdab44481286db3ea8f4b6d409e648355009ef458188352d5e2c5799f7614fbd" ;; ppc64le-musl) - checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9" + checksum="f2b7e87c5f7fbab96c008374049ba1019c3503cf3c5b7742e536375c2a11f584" ;; ppc64) - checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473" + checksum="8535bc99aa88daa8f7fc001a9a7588f1d024a8d2aa38462532745d5327233cae" ;; ppc) - checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2" + checksum="377942d80eade23684a2dc4fa89782e782ae7f90038b7d56bf1bb48afc822c8f" ;; *) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";; esac From 7eece84c54837792bf3c80df7c9aa8e2f42ecc4f Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Tue, 22 Mar 2022 09:15:03 +0530 Subject: [PATCH 4/4] cargo: update to 1.59.0 --- srcpkgs/cargo/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index c512e7005833..b541c3611a42 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,6 +1,6 @@ # Template file for 'cargo' pkgname=cargo -version=0.58.0 +version=1.59.0 revision=1 wrksrc="cargo-${version}" build_helper=rust @@ -11,10 +11,10 @@ short_desc="Rust package manager" maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://crates.io/" -distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz - https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz" -checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f - 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079" +distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz + https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.7.tar.gz" +checksum="e3bcc26be1a07ecd6eaa07a46a6343558924c39db862ffe1adffca90feb9371f + 560fa9a67019d3b3db7c4b887cbc35cc8e87a436b04d5943d5cdf844b4275229" replaces="cargo-tree>=0" build_options="static bindist"