summaryrefslogtreecommitdiff
path: root/rust.spec
diff options
context:
space:
mode:
Diffstat (limited to 'rust.spec')
-rw-r--r--rust.spec146
1 files changed, 56 insertions, 90 deletions
diff --git a/rust.spec b/rust.spec
index d73c5d0..77e5a9e 100644
--- a/rust.spec
+++ b/rust.spec
@@ -1,11 +1,10 @@
-%define _lto_cflags %{nil}
-%global bootstrap_rust 1.92.0
-%global bootstrap_cargo 1.92.0
-%global bootstrap_channel 1.92.0
-%global bootstrap_date 2025-12-12
+%global bootstrap_rust 1.82.0
+%global bootstrap_cargo 1.82.0
+%global bootstrap_channel 1.82.0
+%global bootstrap_date 2024-10-17
%global bootstrap_arches x86_64 aarch64 riscv64 loongarch64
%bcond_with llvm_static
-%ifarch x86_64 aarch64 riscv64
+%ifarch x86_64 aarch64 riscv64 loongarch64
%bcond_with bundled_llvm
%else
%bcond_without bundled_llvm
@@ -25,8 +24,8 @@
%endif
Name: rust
-Version: 1.92.0
-Release: 1
+Version: 1.82.0
+Release: 16
Summary: The Rust Programming Language
License: Apache-2.0 OR MIT
URL: https://www.rust-lang.org
@@ -37,16 +36,18 @@ Source2: https://static.rust-lang.org/rust-key.gpg.ascii
Source3: cargo-config
Source4: cargo-config.sh
Source5: cargo-config.csh
-# Simple rpm macros for rust-toolset
-Source102: cargo_vendor.attr
-Source103: cargo_vendor.prov
-Patch0000: rustc-1.90.0-disable-libssh2.patch
+Patch0000: rustc-1.82.0-disable-libssh2.patch
# By default, rust tries to use "rust-lld" as a linker for some targets.
Patch0001: 0001-Use-lld-provided-by-system.patch
# Set a substitute-path in rust-gdb for standard library sources.
Patch0002: rustc-1.70.0-rust-gdb-substitute-path.patch
Patch0003: 0001-add-support-for-ppc64le.patch
+# https://github.com/rust-lang/rust/pull/130034 (from 1.83)
+Patch0004: 0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch
+Patch0005: 0001-fix-build-error-for-loongarch64.patch
+Patch0006: 0001-add-support-for-sw64.patch
+Patch0007: 0001-compiler-rt-Support-HARDCODE_NO_LSE-to-disable-lse-a.patch
%{lua: function rust_triple(arch)
local abi = "gnu"
@@ -116,28 +117,27 @@ BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.
%global python python3
BuildRequires: %{python}
%if %with bundled_llvm
-BuildRequires: cmake3 >= 3.20.3
-Provides: bundled(llvm) = 20.1.8
+BuildRequires: cmake3 >= 3.13.4
+Provides: bundled(llvm) = 19.1.1
%else
-BuildRequires: cmake >= 3.5.1
+BuildRequires: cmake >= 2.8.11
%if %defined llvm
%global llvm_root %{_libdir}/%{llvm}
%else
+# default llvm is decent enough on riscv64
%ifarch x86_64 aarch64 riscv64 loongarch64
-%global llvm_toolset llvm-toolset-20
-%global llvm %{llvm_toolset}-llvm
-%global llvm_root /opt/%{_vendor}/%{llvm_toolset}/root%{_prefix}
-%global clang_maj_ver %(echo "%{llvm_toolset}" | cut -d '-' -f3)
+%global llvm llvm-toolset-18-llvm
+%global llvm_root /opt/%{_vendor}/llvm-toolset-18/root%{_prefix}
+%global clang_maj_ver 18
%else
%global llvm llvm
%global llvm_root %{_prefix}
%global clang_maj_ver 17
%endif
%endif
-# Minimum external LLVM for rust 1.92
-# https://github.com/rust-lang/rust/pull/139275
-BuildRequires: %{llvm} >= 20.0.0
-BuildRequires: %{llvm}-devel >= 20.0.0
+# Minimum external LLVM for rust 1.82
+BuildRequires: %{llvm} >= 17.0.0
+BuildRequires: %{llvm}-devel >= 17.0.0
%if %with llvm_static
BuildRequires: %{llvm}-static libffi-devel
%endif
@@ -145,8 +145,8 @@ BuildRequires: %{llvm}-static libffi-devel
BuildRequires: procps-ng
BuildRequires: ninja-build
%ifarch x86_64 aarch64 riscv64 loongarch64
-BuildRequires: %{llvm_toolset}-compiler-rt
-BuildRequires: %{llvm_toolset}-clang
+BuildRequires: llvm-toolset-18-compiler-rt
+BuildRequires: llvm-toolset-18-clang
%else
BuildRequires: compiler-rt
BuildRequires: clang
@@ -211,13 +211,12 @@ programs.
%package -n cargo
Summary: Rust's package manager and build tool
%if %with bundled_libgit2
-Provides: bundled(libgit2) = 1.9.1
+Provides: bundled(libgit2) = 1.1.0
%endif
BuildRequires: git
-Requires: %{name} = %{version}-%{release}
+Requires: rust
Obsoletes: cargo-vendor <= 0.1.23
Provides: cargo-vendor = %{version}-%{release}
-Conflicts: cargo-rpm-macros < 1:23
%description -n cargo
Cargo is a tool that allows Rust projects to declare their various dependencies
and ensure that you'll always get a repeatable build.
@@ -294,6 +293,10 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch -P 0001 -p1
%patch -P 0002 -p1
%patch -P 0003 -p1
+%patch -P 0004 -p1
+%patch -P 0005 -p1
+%patch -P 0006 -p1
+%patch -P 0007 -p1
rm -rf vendor/curl-sys*/curl/
rm -rf vendor/jemalloc-sys/jemalloc/
rm -rf vendor/libffi-sys*/libffi/
@@ -382,7 +385,7 @@ test -r "%{profiler}"
--disable-rpath \
%{enable_debuginfo} \
--enable-extended \
- --tools=cargo,clippy,rust-analyzer,rustdoc,rustfmt,src \
+ --tools=cargo,clippy,rust-analyzer,rustfmt,src \
--enable-vendor \
--enable-verbose-tests \
%{?codegen_units_std} \
@@ -438,10 +441,6 @@ install -m 0644 -D -p %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.cargo/config.t
install -m 0644 -D -p %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/cargo-config.sh
install -m 0644 -D -p %{SOURCE5} %{buildroot}%{_sysconfdir}/profile.d/cargo-config.csh
-# This allows users to build packages using Rust Toolset.
-%{__install} -D -m 644 %{S:102} %{buildroot}%{_fileattrsdir}/cargo_vendor.attr
-%{__install} -D -m 755 %{S:103} %{buildroot}%{_rpmconfigdir}/cargo_vendor.prov
-
%if %without lldb
rm -f %{buildroot}%{_bindir}/rust-lldb
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
@@ -464,9 +463,6 @@ export %{rust_env}
%files
%license COPYRIGHT LICENSE-APACHE LICENSE-MIT
%license %{_pkgdocdir}/html/*.txt
-%license %{_pkgdocdir}/COPYRIGHT.html
-%license %{_pkgdocdir}/licenses/
-%exclude %{_sysconfdir}/target-spec-json-schema.json
%doc README.md
%{_bindir}/rustc
%{_bindir}/rustdoc
@@ -482,12 +478,10 @@ export %{rust_env}
%endif
%files std-static
-%license %{_pkgdocdir}/COPYRIGHT-library.html
%dir %{rustlibdir}
%dir %{rustlibdir}/%{rust_triple}
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.rlib
-%{rustlibdir}/%{rust_triple}/bin/rust-objcopy
%if %{with musl_target}
%dir %{rustlibdir}/%{rust_musl_triple}
%dir %{rustlibdir}/%{rust_musl_triple}/lib
@@ -523,8 +517,6 @@ export %{rust_env}
%{_datadir}/zsh/site-functions/_cargo
%dir %{_datadir}/cargo
%dir %{_datadir}/cargo/registry
-%{_fileattrsdir}/cargo_vendor.attr
-%{_rpmconfigdir}/cargo_vendor.prov
%files -n rustfmt
%{_bindir}/rustfmt
@@ -559,75 +551,49 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1*
%changelog
-* Fri Dec 12 2025 Funda Wang <fundawang@yeah.net> - 1.92.0-1
-- update to 1.92.0
-
-* Tue Nov 11 2025 Funda Wang <fundawang@yeah.net> - 1.91.1-1
-- update to 1.91.1
-
-* Tue Nov 04 2025 wangkai <13474090681@163.com> - 1.91.0-2
+* Tue Nov 04 2025 wangkai <13474090681@163.com> - 1.82.0-16
- Fix syntax error for rust
-* Fri Oct 31 2025 Funda Wang <fundawang@yeah.net> - 1.91.0-1
-- update to 1.91.0
-
-* Thu Oct 23 2025 Funda Wang <fundawang@yeah.net> - 1.90.0-2
-- add conflicts on older version of cargo-rpm-macros
-
-* Thu Sep 25 2025 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.90.0-1
-- Update to 1.90.0
-
-* Wed Sep 24 2025 wangkai <13474090681@163.com> - 1.89.0-2
+* Wed Sep 24 2025 wangkai <13474090681@163.com> - 1.82.0-15
- Remove rls command
- Cleanup spec
-* Sun Aug 10 2025 Funda Wang <fundawang@yeah.net> - 1.89.0-1
-- update to 1.89.0
-
-* Wed Jul 09 2025 wangkai <13474090681@163.com> - 1.88.0-1
-- Update to 1.88.0
-
-* Wed Jun 11 2025 Peng Haitao <htpengc@isoftstone.com> - 1.87.0-2
-- Modify openEuler to %{vendor}
+* Tue Sep 23 2025 eshiner <zengfuliangjx@sina.cn> - 1.82.0-14
+- Support HARDCODE_NO to disable lse atomic
-* Fri May 16 2025 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.87.0-1
-- Update to 1.87.0
-
-* Mon Apr 07 2025 wangkai <13474090681@163.com> - 1.86.0-1
-- Update to 1.86.0
+* Tue Aug 19 2025 xiaochn <xiaochuannan@inspur.com> - 1.82.0-13
+- Modify openEuler to vendor
-* Tue Apr 01 2025 wangkai <13474090681@163.com> - 1.85.1-1
-- Update to 1.85.1
+* Fri May 23 2025 swcompiler <lc@wxiat.com> - 1.82.0-12
+- Add support for Sw64
-* Fri Mar 07 2025 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.85.0-1
-- Update to 1.85.0
+* Wed May 07 2025 wangkai <13474090681@163.com> - 1.82.0-11
+- Include all sources in the source package
-* Fri Feb 21 2025 laokz <zhangkai@iscas.ac.cn> - 1.84.0-3
+* Wed Feb 26 2025 laokz <zhangkai@iscas.ac.cn> - 1.82.0-10
- Switch to unbundled llvm for riscv64 building
-* Mon Feb 17 2025 wangkai <13474090681@163.com> - 1.84.0-2
+* Wed Jan 15 2025 wangkai <13474090681@163.com> - 1.82.0-9
- Switch to unbundled llvm for x86_64 aarch64 building
-* Wed Jan 15 2025 wangkai <13474090681@163.com> - 1.84.0-1
-- Update to 1.84.0
+* Fri Jan 03 2025 laokz <zhangkai@iscas.ac.cn> - 1.82.0-8
+- fix the error out of memory for riscv64
-* Mon Dec 09 2024 wangkai <13474090681@163.com> - 1.83.0-1
-- Update to 1.83.0
-- Switch loongarch64 arch to bootstrap
-
-* Fri Dec 06 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.82.0-6
-- Co-authored-by: misaka00251 <liuxin@iscas.ac.cn>
-- Add a switch for the musl target & disable it for loongarch64 & riscv64
+* Fri Dec 20 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.82.0-7
+- fix the error out of memory for loongarch64
-* Fri Nov 29 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.82.0-5
-- fix build error for loongarch64
+* Sun Dec 08 2024 misaka00251 <liuxin@iscas.ac.cn> - 1.82.0-6
+- Fix rpm macros
-* Fri Nov 29 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.82.0-4
-- Fix a minor unpackaged file issue
+* Fri Dec 06 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.82.0-5
+- Add a switch for the musl target & disable it for loongarch64 & riscv64
-* Wed Nov 20 2024 Wenl4ng <wenlang1@h-partners.com> - 1.82.0-3
+* Fri Nov 22 2024 Wenl4ng <wenlang1@h-partners.com> - 1.82.0-4
- use lfs-server
+* Fri Nov 22 2024 Wenlong Zhang<zhangwenlong@loongson.cn> - 1.82.0-3
+- fix build error for loongarch64
+
* Wed Nov 13 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.82.0-2
- Switch to bundled llvm for building, halve the 'max_cpus' in this case