Bootstrap

This commit is contained in:
eabdullin 2025-11-17 16:30:57 +03:00
parent 99f4ccf53d
commit 107117eedb
3 changed files with 44 additions and 7 deletions

12
.gitignore vendored
View File

@ -458,3 +458,15 @@
/rustc-1.89.0-src.tar.xz
/rustc-1.90.0-src.tar.xz
/rustc-1.91.0-src.tar.xz
/cargo-1.90.0-aarch64-unknown-linux-gnu.tar.xz
/cargo-1.90.0-i686-unknown-linux-gnu.tar.xz
/cargo-1.90.0-s390x-unknown-linux-gnu.tar.xz
/cargo-1.90.0-x86_64-unknown-linux-gnu.tar.xz
/rust-std-1.90.0-aarch64-unknown-linux-gnu.tar.xz
/rust-std-1.90.0-i686-unknown-linux-gnu.tar.xz
/rust-std-1.90.0-s390x-unknown-linux-gnu.tar.xz
/rust-std-1.90.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.90.0-aarch64-unknown-linux-gnu.tar.xz
/rustc-1.90.0-i686-unknown-linux-gnu.tar.xz
/rustc-1.90.0-s390x-unknown-linux-gnu.tar.xz
/rustc-1.90.0-x86_64-unknown-linux-gnu.tar.xz

View File

@ -23,7 +23,7 @@ ExclusiveArch: %{rust_arches}
# a waste of lookaside cache space when they're most often unused.
# Run "spectool -g rust.spec" after changing this and then "fedpkg upload" to
# add them to sources. Remember to remove them again after the bootstrap build!
#global bootstrap_arches %%{rust_arches}
%global bootstrap_arches i686
# We need CRT files for *-wasi targets, at least as new as the commit in
# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
@ -88,7 +88,7 @@ ExclusiveArch: %{rust_arches}
# Reduce rustc's own debuginfo and optimizations to conserve 32-bit memory.
# e.g. https://github.com/rust-lang/rust/issues/45854
%global reduced_debuginfo 0
%global reduced_debuginfo 1
%if 0%{?__isa_bits} == 32
%global reduced_debuginfo 1
%endif
@ -377,6 +377,7 @@ Obsoletes: %{name}-analysis < 1.69.0~
# Experimenting with a fine-grained version of %%cargo_vendor_manifest,
# so we can have different bundled provides for each tool subpackage.
%ifnarch %{bootstrap_arches}
%define cargo_tree_manifest(n:m:f:t:) ( \
%{!-n:%{error:must specify a tool name}} \
set -euo pipefail \
@ -400,6 +401,7 @@ Obsoletes: %{name}-analysis < 1.69.0~
%{?fedora:BuildRequires: cargo-rpm-macros}
%{?rhel:BuildRequires: rust-toolset}
%endif
%endif
%description
Rust is a systems programming language that runs blazingly fast, prevents
@ -912,9 +914,7 @@ mkdir -p "%{profraw}"
# We normally use `x.py`, but in this case we invoke the stage 2 compiler and libs
# directly to ensure we use the instrumented compiler.
env LLVM_PROFILE_FILE="%{profraw}/default_%%m_%%p.profraw" \
LD_LIBRARY_PATH=$PWD/build/host/stage2/lib \
RUSTC=$PWD/build/host/stage2/bin/rustc \
cargo build --manifest-path=src/tools/cargo/Cargo.toml
%{__x} --keep-stage=0 --keep-stage=1 build cargo
# Finalize the profile data and clean up the raw files
llvm-profdata merge -o "%{profdata}" "%{profraw}"
rm -r "%{profraw}" build/%{rust_triple}/stage2*/
@ -933,6 +933,7 @@ for triple in %{?all_targets} ; do
%{__x} build --target=$triple std
done
%ifnarch %{bootstrap_arches}
# Collect cargo-vendor.txt for each tool and std
%{cargo_tree_manifest -n rustc -- -p rustc-main -p rustdoc}
%{cargo_tree_manifest -n cargo -m src/tools/cargo}
@ -947,6 +948,7 @@ for triple in %{?all_targets} ; do
*) %{cargo_tree_manifest -n std-$triple -m library -f backtrace -t $triple} ;;
esac
done
%endif
%install
%if 0%{?rhel} && 0%{?rhel} <= 9
@ -1089,7 +1091,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%{_libexecdir}/rust-analyzer-proc-macro-srv
%{_mandir}/man1/rustc.1*
%{_mandir}/man1/rustdoc.1*
%ifnarch %{bootstrap_arches}
%license build/manifests/rustc/cargo-vendor.txt
%endif
%license %{_pkgdocdir}/COPYRIGHT.html
%license %{_pkgdocdir}/licenses/
%exclude %{_sysconfdir}/target-spec-json-schema.json
@ -1101,7 +1105,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.rlib
%{rustlibdir}/%{rust_triple}/lib/*.so
%ifnarch %{bootstrap_arches}
%license build/manifests/std/cargo-vendor.txt
%endif
%license %{_pkgdocdir}/COPYRIGHT-library.html
%global target_files() \
@ -1109,8 +1115,7 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%dir %{rustlibdir} \
%dir %{rustlibdir}/%1 \
%dir %{rustlibdir}/%1/lib \
%{rustlibdir}/%1/lib/*.rlib \
%license build/manifests/std-%1/cargo-vendor.txt
%{rustlibdir}/%1/lib/*.rlib
%if %target_enabled i686-pc-windows-gnu
%target_files i686-pc-windows-gnu
@ -1192,7 +1197,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%{_datadir}/zsh/site-functions/_cargo
%dir %{_datadir}/cargo
%dir %{_datadir}/cargo/registry
%ifnarch %{bootstrap_arches}
%license build/manifests/cargo/cargo-vendor.txt
%endif
%files -n rustfmt
@ -1200,14 +1207,18 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%{_bindir}/cargo-fmt
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
%license src/tools/rustfmt/LICENSE-{APACHE,MIT}
%ifnarch %{bootstrap_arches}
%license build/manifests/rustfmt/cargo-vendor.txt
%endif
%files analyzer
%{_bindir}/rust-analyzer
%doc src/tools/rust-analyzer/README.md
%license src/tools/rust-analyzer/LICENSE-{APACHE,MIT}
%ifnarch %{bootstrap_arches}
%license build/manifests/rust-analyzer/cargo-vendor.txt
%endif
%files -n clippy
@ -1215,7 +1226,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%{_bindir}/clippy-driver
%doc src/tools/clippy/{README.md,CHANGELOG.md}
%license src/tools/clippy/LICENSE-{APACHE,MIT}
%ifnarch %{bootstrap_arches}
%license build/manifests/clippy/cargo-vendor.txt
%endif
%files src

12
sources
View File

@ -1,2 +1,14 @@
SHA512 (wasi-libc-wasi-sdk-27.tar.gz) = dfc2c36fabf32f465fc833ed0b10efffc9a35c68162ecc3e8d656d1d684d170b734d55e790614d12d925d17f49d60f0d2d01c46cecac941cf62d68eda84df13e
SHA512 (rustc-1.91.0-src.tar.xz) = 1e4c7a2435dc5bccfc63f34f5d210f7cafb0113787a4b5069d61f03528a32cd0a29ac516673cbc0eb564089f1dc5e13b962e6c3714bd0109de664c22ed340fb3
778399048bc76c00be0be3d175548661c28cca90f81877b70bdd2914531a0e1b76bb09d28c9cadfd5d6ce394287054e1fe967deadc29e754b390519eab110758 cargo-1.90.0-aarch64-unknown-linux-gnu.tar.xz
7d70ed916c56432642e05cea67c1684db49d2b8b349334946e2c10ad1528065ec560d4858deb3c9e9195b3d9599fc96476cdef3f50475fa25942d753fbf2a652 cargo-1.90.0-i686-unknown-linux-gnu.tar.xz
44758a4a3095c2e4845b229fba5d67716a085537eb0e377e807d5884982fc29149f580f679aa819bcfc0a3c8b1fd412ec99cca5b7ccebdab02edcb14a957f84f cargo-1.90.0-s390x-unknown-linux-gnu.tar.xz
6d5848b18488bb0395be853976e9659aeac62879779754170386ba407258eb41b3f92d9cdb8e01350969c947b1bc60cccb2a3eff527b1c520361bcad8cc691c3 cargo-1.90.0-x86_64-unknown-linux-gnu.tar.xz
0396ab769566975a8bd4a2c276699c9cd4f026d32aa37c9cd7e21e5decbce7c6d1acb5a800069652fe01826fd16dc4dbd2f1921ee0c5be1f57dc69f5bb425fc0 rust-std-1.90.0-aarch64-unknown-linux-gnu.tar.xz
2126915ba56448fd2792f679b13fb8b4f24ad88267d43a49ed0df993f46b6d7bc0e6339b2db855cdc3ffc01acb7b0de589674589d880ea24447b7e1313ab954c rust-std-1.90.0-i686-unknown-linux-gnu.tar.xz
3efab24d77e74199c51dc40da508481e5d794fcd0f018b96545036efaad6b38f8c51a8d0b0f54ee3fe6659fe80d6b6058020b4c84b235d2d1848ed64d687f8f7 rust-std-1.90.0-s390x-unknown-linux-gnu.tar.xz
9fc34729a8649b44e3c0e3af05148c71a570aa154ecbfc84a8f1d34741ca5da43be3c863f1f732d73388c666bfbb23155fb8825fd10e65d8916455eb6050cdad rust-std-1.90.0-x86_64-unknown-linux-gnu.tar.xz
a39d41b6e55622bcfa48c180651b923a13f8ac5116bd80eda5cb1d29004fec19bf82a70c1dff6ceda8d214eda414af6c88f024c9d7c4cb03d1999924a2ab1b77 rustc-1.90.0-aarch64-unknown-linux-gnu.tar.xz
8b3e43ceb69af6ba05835dcc4a817a12d9675c7ffa098166e6ee00466c266a8c866618defa0c1c4bc98f087ab89b9e2585b205101ef9069582e21bbd0cd72088 rustc-1.90.0-i686-unknown-linux-gnu.tar.xz
d62f5cf4ab56940044f2fc266120f24ae74bc2a3c9e7bbf8a7b52dbefe7c9d6142ab58689ec8c8e0daac3ceefc43235e52472214469576156052054b7b22318d rustc-1.90.0-s390x-unknown-linux-gnu.tar.xz
ebbe86c677bc6a1b286114b020175b289b439754b19c82eec1f955ca3507b3bdb8c0feefa945dabd8c56ccb26d089d5b17dbf2de8cf9d51a596e72b337d8196a rustc-1.90.0-x86_64-unknown-linux-gnu.tar.xz