From 0de5e49e40a042b95b03be95dc8ec9e24217464d Mon Sep 17 00:00:00 2001 From: Maksim Bondarenkov Date: Tue, 19 Aug 2025 09:08:09 +0300 Subject: [PATCH] Reapply "rust: rebuild with itself (#5574)" This reverts commit 3852bfa99eb84eccc270ae149ffb77713782ff66. now it's the time --- rust/PKGBUILD | 23 +++-------------------- rust/bootstrap.toml | 6 +++--- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/rust/PKGBUILD b/rust/PKGBUILD index ad6f12a7..688699de 100644 --- a/rust/PKGBUILD +++ b/rust/PKGBUILD @@ -7,7 +7,7 @@ rust_dist_server=https://static.rust-lang.org/dist pkgname=rust pkgver=1.89.0 -pkgrel=1 +pkgrel=2 pkgdesc="Systems programming language focused on safety, speed and concurrency" arch=('x86_64') url="https://www.rust-lang.org/" @@ -32,37 +32,22 @@ makedepends=('gcc' 'libzstd-devel' 'zlib-devel' 'libcurl-devel' - # TODO: rebuild with our Rust - #$([[ "$_bootstrapping" == "no" ]] && echo 'rust') -) + $([[ "$_bootstrapping" == "no" ]] && echo 'rust')) source=("${rust_dist_server}/${pkgname}c-${pkgver}-src.tar.gz"{,.asc} "bootstrap.toml") noextract=(${pkgname}c-${pkgver}-src.tar.gz) sha256sums=('2576f9f440dd99b0151bd28f59aa0ac6102d5c4f3ed4ef8a810c8dd05057250d' 'SKIP' - '66de9b211c5b5e4d211909ba127a57ed3fbf6b78dbaff266cbbb9e025ce72a3d') + 'b6e07703a723efa0e59ef2dac0fae62473d14d67afab606a514a9555ab45b56e') validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) '474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard 'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg -# temporarily download stage0 -if [[ ${_bootstrapping} == "no" ]]; then - _stage0_source="https://github.com/jeremyd2019/cygwin-rust-bootstrap/releases/download/rust-1.89.0-msys2" - source+=("${_stage0_source}/rust-1.89.0-x86_64-pc-cygwin.tar.xz") - sha256sums+=('448203e01a5bbe18e7f813dd5c029808ae4799330ef50d0791c94eb5a0220891') -fi prepare() { # workaround strange symlinking error during a build export MSYS=winsymlinks:nativestrict plain "Extracting ${pkgname}c-${pkgver}-src.tar.gz" tar -xzf ${pkgname}c-${pkgver}-src.tar.gz || true - - # copy binaries and library into a single location - if [[ ${_bootstrapping} == "no" ]]; then - mkdir -p stage0/{bin,lib} - cp -r rust-1.89.0-x86_64-pc-cygwin/{rustc,cargo,rustfmt-preview}/bin/* stage0/bin - cp -r rust-1.89.0-x86_64-pc-cygwin/{rustc,rust-std-x86_64-pc-cygwin}/lib/* stage0/lib - fi } build() { @@ -73,9 +58,7 @@ build() { cd "${pkgname}c-${pkgver}-src" # substitute the values in bootstrap.toml - #export USR="/usr" export PKGREL="${pkgrel}" - export SRCDIR="${srcdir}" envsubst < ../bootstrap.toml > bootstrap.toml if [ "${_bootstrapping}" = "no" ]; then diff --git a/rust/bootstrap.toml b/rust/bootstrap.toml index 178cd05c..61df9176 100644 --- a/rust/bootstrap.toml +++ b/rust/bootstrap.toml @@ -8,9 +8,9 @@ change-id = 142379 link-shared = true [build] -#cargo = "$SRCDIR/stage0/bin/cargo" -#rustc = "$SRCDIR/stage0/bin/rustc" -#rustfmt = "$SRCDIR/stage0/bin/rustfmt" +#cargo = "/usr/bin/cargo" +#rustc = "/usr/bin/rustc" +#rustfmt = "/usr/bin/rustfmt" description = "Rev$PKGREL, Built by MSYS2 project" submodules = false build = "x86_64-pc-cygwin"