1
1
# Prevent librustc_driver from inadvertently being listed as a requirement
2
2
%global __requires_exclude ^librustc_driver-
3
3
4
- # Release date and version of stage 0 compiler can be found in "src/stage0.json " inside the extracted "Source0".
4
+ # Release date and version of stage 0 compiler can be found in "src/stage0" inside the extracted "Source0".
5
5
# Look for "date:" and "rustc:".
6
- %define release_date 2023-11-16
7
- %define stage0_version 1.74 .0
6
+ %define release_date 2025-01-09
7
+ %define stage0_version 1.84 .0
8
8
9
9
Summary: Rust Programming Language
10
10
Name: rust
11
- Version: 1.75 .0
12
- Release: 12 %{?dist }
11
+ Version: 1.85 .0
12
+ Release: 1 %{?dist }
13
13
License: (ASL 2.0 OR MIT ) AND BSD AND CC-BY-3.0
14
14
Vendor: Microsoft Corporation
15
15
Distribution: Azure Linux
@@ -41,10 +41,10 @@ Source4: https://static.rust-lang.org/dist/%{release_date}/rust-std-%{sta
41
41
Source5: https://static.rust-lang.org/dist/%{release_date }/cargo-%{stage0_version }-aarch64 -unknown-linux-gnu.tar.xz
42
42
Source6: https://static.rust-lang.org/dist/%{release_date }/rustc-%{stage0_version }-aarch64 -unknown-linux-gnu.tar.xz
43
43
Source7: https://static.rust-lang.org/dist/%{release_date }/rust-std-%{stage0_version }-aarch64 -unknown-linux-gnu.tar.xz
44
- Patch0: CVE-2023-45853.patch
45
- Patch1: CVE-2024-32884.patch
46
- Patch2: CVE-2024-31852 .patch
47
-
44
+ # These ci tests are expecting rust source to be git repository, since we are using a tarball
45
+ # we are missing git metadata so these tests are failing, hence ignoring these tests
46
+ Patch0: Ignore_failing_ci_tests .patch
47
+ Patch100: CVE-2024-9681.patch
48
48
BuildRequires: binutils
49
49
BuildRequires: cmake
50
50
# make sure rust relies on curl from CBL-Mariner (instead of using its vendored flavor)
@@ -61,6 +61,7 @@ BuildRequires: openssl-devel
61
61
BuildRequires: python3
62
62
%if 0%{?with_check }
63
63
BuildRequires: glibc-static >= 2.38-9%{?dist }
64
+ BuildRequires: sudo
64
65
%endif
65
66
# rustc uses a C compiler to invoke the linker, and links to glibc in most cases
66
67
Requires: binutils
@@ -113,7 +114,7 @@ sh ./configure \
113
114
--prefix= %{_prefix } \
114
115
--enable-extended \
115
116
--enable-profiler \
116
- --tools= "cargo,clippy,rustfmt,rust-analyzer-proc-macro-srv,rust-demangler " \
117
+ --tools= "cargo,clippy,rustfmt,rust-analyzer-proc-macro-srv" \
117
118
--release-channel= "stable" \
118
119
--release-description= "Azure Linux %{version }-%{release }"
119
120
@@ -125,21 +126,25 @@ USER=root SUDO_USER=root %make_build
125
126
# We expect to generate dynamic CI contents in this folder, but it will fail since the .github folder is not included
126
127
# with the published sources.
127
128
mkdir -p .github/workflows
128
- ./x.py run src/tools/expand-yaml-anchors
129
129
130
130
ln -s %{_topdir }/BUILD/rustc-%{version }-src/build/x86_64 -unknown-linux-gnu/stage2-tools-bin/rustfmt %{_topdir }/BUILD/rustc-%{version }-src/build/x86_64 -unknown-linux-gnu/stage0/bin/
131
131
ln -s %{_topdir }/BUILD/rustc-%{version }-src/vendor/ /root/vendor
132
+ # Since mariner has `aarch64-unknown-linux-gnu-gcc` as native compiler in arm64 and a ptest is expecting `aarch64-linux-gnu-gcc`
133
+ ln -s /usr/bin/aarch64 -unknown-linux-gnu-gcc /usr/bin/aarch64 -linux-gnu-gcc
132
134
# remove rustdoc ui flaky test issue-98690.rs (which is tagged with 'unstable-options')
133
- rm -v ./tests/rustdoc-ui/issue-98690.*
134
- %make_build check
135
-
135
+ rm -v ./tests/rustdoc-ui/issues/issue-98690.*
136
+ useradd -m -d /home/test test
137
+ chown -R test:test .
138
+ sudo -u test %make_build check
139
+ userdel -r test
136
140
%install
137
141
USER=root SUDO_USER=root %make_install
138
- mv %{buildroot }%{_docdir }/%{name }/LICENSE-THIRD-PARTY .
139
- rm %{buildroot }%{_docdir }/%{name }/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT }
140
- rm %{buildroot }%{_docdir }/%{name }/html/.lock
141
- rm %{buildroot }%{_docdir }/%{name }/* .old
142
- rm %{buildroot }%{_bindir }/* .old
142
+ mv %{buildroot }%{_docdir }/cargo/LICENSE-THIRD-PARTY .
143
+ rm %{buildroot }%{_docdir }/rustc/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT }
144
+ rm %{buildroot }%{_docdir }/cargo/{LICENSE-APACHE,LICENSE-MIT }
145
+ rm %{buildroot }%{_docdir }/clippy/{LICENSE-APACHE,LICENSE-MIT }
146
+ rm %{buildroot }%{_docdir }/rustfmt/{LICENSE-APACHE,LICENSE-MIT }
147
+ rm %{buildroot }%{_docdir }/docs/html/.lock
143
148
144
149
%ldconfig_scriptlets
145
150
@@ -153,7 +158,6 @@ rm %{buildroot}%{_bindir}/*.old
153
158
%{_libexecdir }/rust-analyzer-proc-macro-srv
154
159
%{_bindir }/rust-gdb
155
160
%{_bindir }/rust-gdbgui
156
- %{_bindir }/rust-demangler
157
161
%{_bindir }/cargo
158
162
%{_bindir }/cargo-clippy
159
163
%{_bindir }/cargo-fmt
@@ -164,14 +168,25 @@ rm %{buildroot}%{_bindir}/*.old
164
168
165
169
%files doc
166
170
%license LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY COPYRIGHT
167
- %doc %{_docdir }/%{name }/html/*
168
- %doc %{_docdir }/%{name }/README.md
171
+ %doc %{_docdir }/rustc/README.md
172
+ %doc %{_docdir }/cargo/*
173
+ %doc %{_docdir }/rustfmt/*
174
+ %doc %{_docdir }/clippy/*
175
+ %doc %{_docdir }/docs/html/*
169
176
%doc CONTRIBUTING.md README.md RELEASES.md
170
177
%doc src/tools/clippy/CHANGELOG.md
171
178
%doc src/tools/rustfmt/Configurations.md
172
179
%{_mandir }/man1/*
173
180
174
181
%changelog
182
+ * Thu Feb 27 2025 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 1.85.0-1
183
+ - Upgrade to 1.85.0
184
+ - Drop patches
185
+ - Remove expand-yaml-anchors tool in %check
186
+ - Remove rust-demangler tool
187
+ - Update generate_source_tarball script
188
+ - Run %check as test user
189
+
175
190
* Thu Feb 27 2025 Chris Co <chrco@microsoft.com> - 1.75.0-12
176
191
- Bump to rebuild with updated glibc
177
192
0 commit comments