Skip to content

Commit c831dad

Browse files
authored
Merge pull request #1 from sailfishos/jb50211_disable_statx
Disable statx for all builds.
2 parents 5501dfb + d9f57da commit c831dad

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

disable-statx.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Disable statx for all builds.
2+
3+
libstd implements statx using syscall and thus it will not work on
4+
scratchbox2. Moreover as it is supported only by Linux 4.11 and newer
5+
it's little use for us at the moment. It can be disabled and which means
6+
that optional extra information is set to None. Software should handle
7+
that gracefully without issues thanks to rust's type system.
8+
9+
---
10+
--- rustc-1.44.0-src/src/libstd/sys/unix/fs.rs.old 2020-06-01 18:44:16.000000000 +0300
11+
+++ rustc-1.44.0-src/src/libstd/sys/unix/fs.rs 2020-06-26 12:42:46.438070586 +0300
12+
@@ -58,20 +58,9 @@
13+
// https://github.com/rust-lang/rust/pull/67774
14+
macro_rules! cfg_has_statx {
15+
({ $($then_tt:tt)* } else { $($else_tt:tt)* }) => {
16+
- cfg_if::cfg_if! {
17+
- if #[cfg(all(target_os = "linux", target_env = "gnu"))] {
18+
- $($then_tt)*
19+
- } else {
20+
- $($else_tt)*
21+
- }
22+
- }
23+
- };
24+
- ($($block_inner:tt)*) => {
25+
- #[cfg(all(target_os = "linux", target_env = "gnu"))]
26+
- {
27+
- $($block_inner)*
28+
- }
29+
+ $($else_tt)*
30+
};
31+
+ ($($block_inner:tt)*) => {};
32+
}
33+
34+
cfg_has_statx! {{

rust.changes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
* Thu Jun 12 2020 Raine Makelainen <[email protected]> - 1.44.0+git1
1+
* Fri Jun 26 2020 Tomi Leppänen <[email protected]> - 1.44.0+git2
2+
- [rust] Disable statx for all builds. JB#50106
3+
4+
* Fri Jun 12 2020 Raine Makelainen <[email protected]> - 1.44.0+git1
25
- [rust] Packaging for 1.44.0 version. JB#50106

rust.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
Name: rust
1818
# TODO: Suffix version at the end with +git1
19-
Version: %{rust_version}+git1
19+
Version: %{rust_version}+git2
2020
Release: 1
2121
Summary: The Rust Programming Language
2222
License: (ASL 2.0 or MIT) and (BSD and MIT)
@@ -29,6 +29,7 @@ Source1: https://static.rust-lang.org/dist/rust-%{rust_version}-%{rust_tr
2929

3030
Patch1: 0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch
3131
Patch2: llvm-targets.patch
32+
Patch3: disable-statx.patch
3233

3334
%global bootstrap_root rust-%{rust_version}-%{rust_triple}
3435
%global local_rust_root %{_builddir}/%{bootstrap_root}/usr
@@ -155,6 +156,7 @@ test -f '%{local_rust_root}/bin/rustc'
155156

156157
%patch1 -p1
157158
%patch2 -p0
159+
%patch3 -p1
158160

159161
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
160162

0 commit comments

Comments
 (0)