mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 04:06:38 +08:00
Make Arti work on Redox
Several steps were required to get Arti to work on Redox: - Disable harden feature to resolve secmem-proc issue - Static link sqlite inside Arti - Patch to resolve "try_lock() not supported" With these changes Arti can be used on Redox. If it's called with argument `--disable-fs-permission-checks` since `/home` permissions do not restrict groups to write. TODOs added to revisit later: - Check if `redox.patch` is still required after planned Rust toolchain update. - Instead of `static-sqlite` use our own linked `sqlite3` once that is fully functional.
This commit is contained in:
parent
524b220ef2
commit
1e106d5155
@ -29,6 +29,7 @@ xfce4-full = {}
|
|||||||
|
|
||||||
acid = {}
|
acid = {}
|
||||||
adwaita-icon-theme = {}
|
adwaita-icon-theme = {}
|
||||||
|
arti = {}
|
||||||
atk = {}
|
atk = {}
|
||||||
autoconf = {}
|
autoconf = {}
|
||||||
automake = {}
|
automake = {}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#TODO add script for gnu make: https://github.com/ip7z/7zip/blob/main/DOC/readme.txt#L110
|
#TODO add script for gnu make: https://github.com/ip7z/7zip/blob/main/DOC/readme.txt#L110
|
||||||
[source]
|
[source]
|
||||||
tar = "https://7-zip.org/a/7z2605-src.tar.xz"
|
tar = "https://github.com/ip7z/7zip/releases/download/26.05/7z2605-src.tar.xz"
|
||||||
[build]
|
[build]
|
||||||
template = "cmake"
|
template = "cmake"
|
||||||
|
|||||||
@ -1,9 +1,17 @@
|
|||||||
#TODO fix secmem-proc crate
|
|
||||||
[source]
|
[source]
|
||||||
git = "https://gitlab.torproject.org/tpo/core/arti"
|
git = "https://gitlab.torproject.org/tpo/core/arti"
|
||||||
|
rev = "arti-v2.7.0"
|
||||||
shallow_clone = true
|
shallow_clone = true
|
||||||
|
# TODO: Check if this patch is still necessary after
|
||||||
|
# we've updated our Rust toolchains on Redox.
|
||||||
|
patches = ["redox.patch"]
|
||||||
[build]
|
[build]
|
||||||
template = "cargo"
|
template = "cargo"
|
||||||
|
# TODO: Remove `static-sqlite` feature once Redox' sqlite3-package is fully functional.
|
||||||
|
cargoflags = [
|
||||||
|
"--no-default-features",
|
||||||
|
"--features=default-runtime,dns-proxy,compression,bridge-client,pt-client,onion-service-client,vanguards,flowctl-cc,static-sqlite",
|
||||||
|
]
|
||||||
cargopackages = ["arti"]
|
cargopackages = ["arti"]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"openssl3",
|
"openssl3",
|
||||||
|
|||||||
38
recipes/wip/net/onion-routing/arti/redox.patch
Normal file
38
recipes/wip/net/onion-routing/arti/redox.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff --git a/crates/fslock-guard/Cargo.toml b/crates/fslock-guard/Cargo.toml
|
||||||
|
index 9cbffb2c..2fd42d35 100644
|
||||||
|
--- a/crates/fslock-guard/Cargo.toml
|
||||||
|
+++ b/crates/fslock-guard/Cargo.toml
|
||||||
|
@@ -24,2 +24,2 @@
|
||||||
|
-[target.'cfg(target_os = "android")'.dependencies]
|
||||||
|
+[target.'cfg(any(target_os = "android", target_os = "redox"))'.dependencies]
|
||||||
|
libc = "0.2"
|
||||||
|
diff --git a/crates/fslock-guard/src/lib.rs b/crates/fslock-guard/src/lib.rs
|
||||||
|
index b5e938bb..7c32168c 100644
|
||||||
|
--- a/crates/fslock-guard/src/lib.rs
|
||||||
|
+++ b/crates/fslock-guard/src/lib.rs
|
||||||
|
@@ -177,7 +177,7 @@ impl Drop for LockFileGuard {
|
||||||
|
/// Try to lock `f`, blocking if need be.
|
||||||
|
///
|
||||||
|
/// On non-android, this just calls [`fs::File::lock`].
|
||||||
|
-#[cfg(not(target_os = "android"))]
|
||||||
|
+#[cfg(not(any(target_os = "android", target_os = "redox")))]
|
||||||
|
fn do_lock(f: &fs::File) -> std::io::Result<()> {
|
||||||
|
f.lock()
|
||||||
|
}
|
||||||
|
@@ -185,7 +185,7 @@ fn do_lock(f: &fs::File) -> std::io::Result<()> {
|
||||||
|
/// Try to lock `f`, without blocking.
|
||||||
|
///
|
||||||
|
/// On non-android, this just calls [`fs::File::try_lock`].
|
||||||
|
-#[cfg(not(target_os = "android"))]
|
||||||
|
+#[cfg(not(any(target_os = "android", target_os = "redox")))]
|
||||||
|
fn do_try_lock(f: &fs::File) -> Result<(), std::fs::TryLockError> {
|
||||||
|
f.try_lock()
|
||||||
|
}
|
||||||
|
@@ -207,2 +207,2 @@
|
||||||
|
-#[cfg(target_os = "android")]
|
||||||
|
+#[cfg(any(target_os = "android", target_os = "redox"))]
|
||||||
|
fn do_lock(f: &fs::File) -> std::io::Result<()> {
|
||||||
|
@@ -234,2 +234,2 @@
|
||||||
|
-#[cfg(target_os = "android")]
|
||||||
|
+#[cfg(any(target_os = "android", target_os = "redox"))]
|
||||||
|
fn do_try_lock(f: &fs::File) -> Result<(), std::fs::TryLockError> {
|
||||||
Loading…
Reference in New Issue
Block a user