Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions srcpkgs/arti/patches/fix-32bit-tests.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,30 @@ thread 'time_store::test::system_time_conversions' panicked at crates/tor-hsserv
2038-01-19T03:14:08Z: OutOfRange

diff --git a/crates/tor-hsservice/src/time_store.rs b/crates/tor-hsservice/src/time_store.rs
index d63d6f015..fafe806d0 100644
index 54be02664..ebe4cb904 100644
--- a/crates/tor-hsservice/src/time_store.rs
+++ b/crates/tor-hsservice/src/time_store.rs
@@ -515,6 +515,7 @@ mod test {
@@ -518,6 +518,7 @@ mod test {
assert_eq!(e, FutureTimestamp::from_str("T+23kg"));
}

+ #[cfg(target_pointer_width = "64")]
#[test]
#[allow(clippy::unusual_byte_groupings)] // we want them to line up, dammit!
fn system_time_conversions() {

--------------------------------------------------------------------------------
causes compile time overflows on pure 32bit builders

diff --git a/crates/tor-memquota/src/config.rs b/crates/tor-memquota/src/config.rs
index 0ed1241b1..05d33d2ce 100644
--- a/crates/tor-memquota/src/config.rs
+++ b/crates/tor-memquota/src/config.rs
@@ -457,6 +457,7 @@ mod test {
}

/// Test the logic that computes the `max` when configured as "auto".
+ #[cfg(target_pointer_width = "64")]
#[test]
// We do some `1 * X` operations below for readability.
#[allow(clippy::identity_op)]
16 changes: 16 additions & 0 deletions srcpkgs/arti/patches/fix-test-on-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
musl uses different capitalization for the error message
to_lowercase() covers both glibc and musl

diff --git a/crates/fs-mistrust/src/dir.rs b/crates/fs-mistrust/src/dir.rs
index d422820df..af81c19b0 100644
--- a/crates/fs-mistrust/src/dir.rs
+++ b/crates/fs-mistrust/src/dir.rs
@@ -590,7 +590,7 @@ mod test {
.open("f1-link", OpenOptions::new().read(true))
.unwrap_err();
assert!(
- matches!(e, Error::Io { ref err, .. } if err.to_string().contains("symbolic")), // Error is ELOOP.
+ matches!(e, Error::Io { ref err, .. } if err.to_string().to_lowercase().contains("symbolic")), // Error is ELOOP.
"{e:?}"
);
}
20 changes: 12 additions & 8 deletions srcpkgs/arti/patches/fix-tests-on-machines-below-4GiB.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
Lower system memory requirements for tests to support ci runners <4GiB

diff --git a/crates/arti/src/arti-example-config.toml b/crates/arti/src/arti-example-config.toml
index 16e2d6ac2..33e9870c5 100644
index 5b53cb2f1..691f0fe7f 100644
--- a/crates/arti/src/arti-example-config.toml
+++ b/crates/arti/src/arti-example-config.toml
@@ -451,11 +451,11 @@
# The default is unlimited.
@@ -549,7 +549,7 @@
# If `system.memory.low_water` is given as an explicit value,
# `system.memory.max` must also be given as an explicit value.
#
# Maximum memory use, after which reclamation starts:
-# memory.max = "8 GiB"
+# memory.max = "3 GiB"
# (If anything is specified in `[system.memory]`, this value is mandatory.)

# Low-water mark for tracked memory:
# When reclaiming memory, we stop when we reach this amount.
@@ -558,7 +558,7 @@
# assumed that the value used for "auto" will remain stable across different
# versions of arti.
#
# When reclaiming memory, we stop when we reach this amount:
-# memory.low_water = "6 GiB"
+# memory.low_water = "2 GiB"
# (The default is 3/4 of `system.memory.max`.)
+# memory.low_water = "2.25 GiB"

##### ONION SERVICES
#
4 changes: 2 additions & 2 deletions srcpkgs/arti/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'arti'
pkgname=arti
version=1.4.0
version=2.0.0
revision=1
archs="x86_64* i686* aarch64* arm*" # ring
build_style=cargo
Expand All @@ -13,7 +13,7 @@ license="Apache-2.0, MIT"
homepage="https://gitlab.torproject.org/tpo/core/arti"
changelog="https://gitlab.torproject.org/tpo/core/arti/-/raw/main/CHANGELOG.md"
distfiles="https://gitlab.torproject.org/tpo/core/arti/-/archive/arti-v${version}/arti-arti-v${version}.tar.gz"
checksum=404e79e1f33c3dfdf8290c1f2b2c651c0b00ed5dd66fc78e08d92621b7ff660e
checksum=19106e4706222de65f8e735193ec50ba4c312abc2a28b48cca7e13d01fdeacab

post_install() {
vlicense LICENSE-MIT
Expand Down