From 7935b10b24b2e98d8dcc5002edbeae7e2cb22a69 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 12 Feb 2024 15:31:36 +0100 Subject: [PATCH] Really fix Rust for kernel 5.4 --- openmptcprouter-full/Makefile | 2 +- rust/Makefile | 4 +-- .../0003-bump-libc-deps-to-0.2.146.patch | 28 +++++++++---------- rust/rust-values.mk | 3 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index a3aec2279..9422b75a6 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -87,7 +87,7 @@ MY_DEPENDS := \ (TARGET_x86||TARGET_x86_64):kmod-mlx4-core \ !(TARGET_ips40xx||TARGET_ramips):iptables-mod-ndpi !(TARGET_ips40xx||TARGET_ramips):kmod-ipt-ndpi libip4tc libip6tc \ xray-core LINUX_5_4:xray-config !LINUX_5_4:xray-config-nft (LINUX_5_4&&(TARGET_x86_64||aarch64)):kmod-tcp-bbr2 kmod-ovpn-dco-v2 \ - !LINUX_5_4:shadowsocks-rust-sslocal !LINUX_5_4:shadowsocks-rust-ssservice !LINUX_5_4:shadowsocks-rust-config-nft !LINUX_5_4:luci-app-shadowsocks-rust \ + shadowsocks-rust-sslocal shadowsocks-rust-ssservice LINUX_5_4:shadowsocks-rust-config !LINUX_5_4:shadowsocks-rust-config-nft luci-app-shadowsocks-rust \ luci-proto-external omr-schedule jq luci-app-ddns # shadowsocks-rust-sslocal shadowsocks-rust-ssservice LINUX_5_4:shadowsocks-rust-config !LINUX_5_4:shadowsocks-rust-config-nft luci-app-shadowsocks-rust \ diff --git a/rust/Makefile b/rust/Makefile index 1555d10b7..1b400409e 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -100,9 +100,7 @@ endef define Host/Install ( \ cd $(HOST_BUILD_DIR)/build/dist ; \ - for targz in *.tar.gz; do \ - $(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc "$$$$targz" | tar -xf - ; \ - done ; \ + find -iname "*.tar.gz" -exec tar -xzf {} \; ; \ find . -mindepth 2 -maxdepth 2 -type f -name install.sh \ -execdir bash '{}' --prefix=$(STAGING_DIR)/host --disable-ldconfig \; ; \ ) diff --git a/rust/patches/0003-bump-libc-deps-to-0.2.146.patch b/rust/patches/0003-bump-libc-deps-to-0.2.146.patch index bb131d23f..a1a46ddfe 100644 --- a/rust/patches/0003-bump-libc-deps-to-0.2.146.patch +++ b/rust/patches/0003-bump-libc-deps-to-0.2.146.patch @@ -7,10 +7,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.126" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "memchr" @@ -21,10 +21,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.138" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -35,10 +35,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.141" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "num_cpus" @@ -49,10 +49,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.140" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "lindera" @@ -63,10 +63,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.140" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "lock_api" @@ -77,10 +77,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.140" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libffi" @@ -91,10 +91,10 @@ This patch bumps all libc dependencies and checksums to 0.2.147, which includes [[package]] name = "libc" -version = "0.2.141" -+version = "0.2.147" ++version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" -+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" ++checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" diff --git a/rust/rust-values.mk b/rust/rust-values.mk index 534aaa02a..749286776 100644 --- a/rust/rust-values.mk +++ b/rust/rust-values.mk @@ -11,7 +11,8 @@ unexport RUSTC_WRAPPER # Rust Environmental Vars RUSTC_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME))) RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(RUSTC_HOST_SUFFIX) -CARGO_HOME:=$(DL_DIR)/cargo +#CARGO_HOME:=$(DL_DIR)/cargo +CARGO_HOME:=$(STAGING_DIR)/cargo ifeq ($(CONFIG_USE_MUSL),y) # Force linking of the SSP library for musl