mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Downgrade Rust for kernel 5.4
This commit is contained in:
parent
1013739703
commit
aa3db5a62e
10 changed files with 130 additions and 305 deletions
|
@ -11,7 +11,7 @@ Subject: [PATCH] Update xz2 and use it static
|
|||
|
||||
--- a/src/bootstrap/Cargo.lock
|
||||
+++ b/src/bootstrap/Cargo.lock
|
||||
@@ -391,9 +391,9 @@ dependencies = [
|
||||
@@ -443,9 +443,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lzma-sys"
|
||||
|
@ -23,7 +23,7 @@ Subject: [PATCH] Update xz2 and use it static
|
|||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@@ -834,9 +834,9 @@ dependencies = [
|
||||
@@ -912,9 +912,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "xz2"
|
||||
|
@ -37,12 +37,12 @@ Subject: [PATCH] Update xz2 and use it static
|
|||
]
|
||||
--- a/src/bootstrap/Cargo.toml
|
||||
+++ b/src/bootstrap/Cargo.toml
|
||||
@@ -57,7 +57,7 @@ tar = "0.4"
|
||||
termcolor = "1.2.0"
|
||||
toml = "0.5"
|
||||
walkdir = "2"
|
||||
@@ -50,7 +50,7 @@ toml = "0.5"
|
||||
ignore = "0.4.10"
|
||||
opener = "0.5"
|
||||
once_cell = "1.7.2"
|
||||
-xz2 = "0.1"
|
||||
+xz2 = { version = "0.1", features = ["static"] }
|
||||
walkdir = "2"
|
||||
|
||||
# Dependencies needed by the build-metrics feature
|
||||
sysinfo = { version = "0.26.0", optional = true }
|
||||
|
|
35
rust/patches/0002-Bumped-libc-version.patch
Normal file
35
rust/patches/0002-Bumped-libc-version.patch
Normal file
|
@ -0,0 +1,35 @@
|
|||
From 032857e7e403f654129c45dc7e6718a9ad49e377 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Arhipov <n@arhipov.net>
|
||||
Date: Tue, 6 Jun 2023 16:09:05 +0300
|
||||
Subject: [PATCH] Bumped libc version
|
||||
|
||||
---
|
||||
Cargo.lock | 4 ++--
|
||||
library/std/Cargo.toml | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1988,9 +1988,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0e
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.143"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "edc207893e85c5d6be840e969b496b53d94cec8be2d501b214f50daa97fa8024"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
dependencies = [
|
||||
"rustc-std-workspace-core",
|
||||
]
|
||||
--- a/library/std/Cargo.toml
|
||||
+++ b/library/std/Cargo.toml
|
||||
@@ -15,7 +15,7 @@ cfg-if = { version = "1.0", features = [
|
||||
panic_unwind = { path = "../panic_unwind", optional = true }
|
||||
panic_abort = { path = "../panic_abort" }
|
||||
core = { path = "../core" }
|
||||
-libc = { version = "0.2.143", default-features = false, features = ['rustc-dep-of-std'] }
|
||||
+libc = { version = "0.2.146", default-features = false, features = ['rustc-dep-of-std'] }
|
||||
compiler_builtins = { version = "0.1.92" }
|
||||
profiler_builtins = { path = "../profiler_builtins", optional = true }
|
||||
unwind = { path = "../unwind" }
|
|
@ -1,52 +0,0 @@
|
|||
--- a/src/bootstrap/bootstrap.py
|
||||
+++ b/src/bootstrap/bootstrap.py
|
||||
@@ -557,7 +557,7 @@ class RustBuild(object):
|
||||
shutil.rmtree(bin_root)
|
||||
|
||||
key = self.stage0_compiler.date
|
||||
- cache_dst = os.path.join(self.build_dir, "cache")
|
||||
+ cache_dst = os.getenv('OPENWRT_RUSTC_BOOTSTRAP_CACHE', os.path.join(self.build_dir, "cache"))
|
||||
rustc_cache = os.path.join(cache_dst, key)
|
||||
if not os.path.exists(rustc_cache):
|
||||
os.makedirs(rustc_cache)
|
||||
--- a/src/bootstrap/src/core/download.rs
|
||||
+++ b/src/bootstrap/src/core/download.rs
|
||||
@@ -208,7 +208,13 @@ impl Config {
|
||||
Some(other) => panic!("unsupported protocol {other} in {url}"),
|
||||
None => panic!("no protocol in {url}"),
|
||||
}
|
||||
- t!(std::fs::rename(&tempfile, dest_path));
|
||||
+ match std::fs::rename(&tempfile, dest_path) {
|
||||
+ Ok(v) => v,
|
||||
+ Err(_) => {
|
||||
+ t!(std::fs::copy(&tempfile, dest_path));
|
||||
+ t!(std::fs::remove_file(&tempfile));
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
fn download_http_with_retries(&self, tempfile: &Path, url: &str, help_on_error: &str) {
|
||||
@@ -544,7 +550,10 @@ impl Config {
|
||||
key: &str,
|
||||
destination: &str,
|
||||
) {
|
||||
- let cache_dst = self.out.join("cache");
|
||||
+ let cache_dst = match env::var_os("OPENWRT_RUSTC_BOOTSTRAP_CACHE") {
|
||||
+ Some(v) => PathBuf::from(v),
|
||||
+ None => self.out.join("cache"),
|
||||
+ };
|
||||
let cache_dir = cache_dst.join(key);
|
||||
if !cache_dir.exists() {
|
||||
t!(fs::create_dir_all(&cache_dir));
|
||||
@@ -671,7 +680,10 @@ download-rustc = false
|
||||
let llvm_assertions = self.llvm_assertions;
|
||||
|
||||
let cache_prefix = format!("llvm-{llvm_sha}-{llvm_assertions}");
|
||||
- let cache_dst = self.out.join("cache");
|
||||
+ let cache_dst = match env::var_os("OPENWRT_RUSTC_BOOTSTRAP_CACHE") {
|
||||
+ Some(v) => PathBuf::from(v),
|
||||
+ None => self.out.join("cache"),
|
||||
+ };
|
||||
let rustc_cache = cache_dst.join(cache_prefix);
|
||||
if !rustc_cache.exists() {
|
||||
t!(fs::create_dir_all(&rustc_cache));
|
|
@ -1,100 +0,0 @@
|
|||
This patch bumps all libc dependencies and checksums to 0.2.147, which includes the fix for musl 1.2.4.
|
||||
|
||||
--- a/vendor/addr2line-0.19.0/Cargo.lock
|
||||
+++ b/vendor/addr2line-0.19.0/Cargo.lock
|
||||
@@ -235,9 +235,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.126"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
--- a/vendor/backtrace-0.3.67/Cargo.lock
|
||||
+++ b/vendor/backtrace-0.3.67/Cargo.lock
|
||||
@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.138"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
--- a/vendor/crossbeam-channel/Cargo.lock
|
||||
+++ b/vendor/crossbeam-channel/Cargo.lock
|
||||
@@ -50,9 +50,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
--- a/vendor/elasticlunr-rs/Cargo.lock
|
||||
+++ b/vendor/elasticlunr-rs/Cargo.lock
|
||||
@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "lindera"
|
||||
--- a/vendor/handlebars/Cargo.lock
|
||||
+++ b/vendor/handlebars/Cargo.lock
|
||||
@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
--- a/vendor/libffi/Cargo.lock
|
||||
+++ b/vendor/libffi/Cargo.lock
|
||||
@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "libffi"
|
||||
--- a/vendor/tracing-tree/Cargo.lock
|
||||
+++ b/vendor/tracing-tree/Cargo.lock
|
||||
@@ -296,9 +296,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
Loading…
Add table
Add a link
Reference in a new issue