From 9e841d83eb06e8717eadecc8b836369eea4d04fa Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Wed, 1 Oct 2025 16:06:51 +0100 Subject: [PATCH] testing/stalwart-mail: upgrade to 0.14.1 --- .../0001-Bump-ring-to-0.17.5.patch | 307 ------------------ testing/stalwart-mail/APKBUILD | 18 +- testing/stalwart-mail/nix-s390x.patch | 108 ++++++ 3 files changed, 117 insertions(+), 316 deletions(-) delete mode 100644 testing/stalwart-mail/0001-Bump-ring-to-0.17.5.patch create mode 100644 testing/stalwart-mail/nix-s390x.patch diff --git a/testing/stalwart-mail/0001-Bump-ring-to-0.17.5.patch b/testing/stalwart-mail/0001-Bump-ring-to-0.17.5.patch deleted file mode 100644 index a251d68d0da..00000000000 --- a/testing/stalwart-mail/0001-Bump-ring-to-0.17.5.patch +++ /dev/null @@ -1,307 +0,0 @@ -From 688420ccc57508111fd6785afc514d47122316a4 Mon Sep 17 00:00:00 2001 -From: 33KK -Date: Wed, 22 Nov 2023 01:04:23 +0100 -Subject: [PATCH] Bump ring to 0.17.5 - ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index f2da243..45a2bce 100644 ---- a/vendored-ldap3/Cargo.toml -+++ b/vendored-ldap3/Cargo.toml -@@ -29,7 +29,7 @@ rustls = { version = "0.21.0", optional = true } - tokio-rustls = { version = "0.24.0", optional = true, features = ["dangerous_configuration"] } - rustls-native-certs = { version = "0.6.2", optional = true } - x509-parser = { version = "0.15.0", optional = true } --ring = { version = "0.16.20", optional = true } -+ring = { version = "0.17.5", optional = true } - cross-krb5 = { version = "0.4.0", optional = true } - libgssapi = { version = "0.7.1", optional = true } - async-trait = "0.1.60" ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -70,3 +70,6 @@ - debug-assertions = false - overflow-checks = false - rpath = false -+ -+[patch.crates-io] -+ldap3 = { path = "vendored-ldap3" } ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -392,7 +392,7 @@ - "portable-atomic", - "rand 0.8.5", - "regex", -- "ring 0.17.14", -+ "ring", - "rustls-native-certs 0.7.3", - "rustls-pemfile 2.2.0", - "rustls-webpki 0.102.8", -@@ -749,7 +749,7 @@ - "num-bigint", - "num-traits", - "once_cell", -- "ring 0.17.14", -+ "ring", - "serde", - "serde_json", - ] -@@ -1310,7 +1310,7 @@ - "rcgen 0.12.1", - "regex", - "reqwest 0.12.23", -- "ring 0.17.14", -+ "ring", - "rkyv", - "rsa", - "rustls 0.23.27", -@@ -3028,7 +3028,7 @@ - "ipnet", - "once_cell", - "rand 0.8.5", -- "ring 0.17.14", -+ "ring", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "thiserror 1.0.69", -@@ -3058,7 +3058,7 @@ - "ipnet", - "once_cell", - "rand 0.9.2", -- "ring 0.17.14", -+ "ring", - "rustls 0.23.31", - "rustls-pki-types", - "thiserror 2.0.16", -@@ -4074,8 +4074,6 @@ - [[package]] - name = "lber" - version = "0.4.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" - dependencies = [ - "bytes", - "nom", -@@ -4084,8 +4082,6 @@ - [[package]] - name = "ldap3" - version = "0.11.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "166199a8207874a275144c8a94ff6eed5fcbf5c52303e4d9b4d53a0c7ac76554" - dependencies = [ - "async-trait", - "bytes", -@@ -4096,7 +4092,7 @@ - "log", - "nom", - "percent-encoding", -- "ring 0.16.20", -+ "ring", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "thiserror 1.0.69", -@@ -4336,7 +4332,7 @@ - "quick-xml 0.37.5", - "quick_cache", - "rand 0.8.5", -- "ring 0.17.14", -+ "ring", - "rkyv", - "rsa", - "rustls-pemfile 2.2.0", -@@ -5793,7 +5789,7 @@ - "getrandom 0.3.3", - "lru-slab", - "rand 0.9.2", -- "ring 0.17.14", -+ "ring", - "rustc-hash 2.1.1", - "rustls 0.23.31", - "rustls-pki-types", -@@ -6053,7 +6049,7 @@ - checksum = "48406db8ac1f3cbc7dcdb56ec355343817958a356ff430259bb07baf7607e1e1" - dependencies = [ - "pem", -- "ring 0.17.14", -+ "ring", - "time", - "yasna", - ] -@@ -6065,7 +6061,7 @@ - checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" - dependencies = [ - "pem", -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", - "time", - "yasna", -@@ -6355,21 +6351,6 @@ - - [[package]] - name = "ring" --version = "0.16.20" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" --dependencies = [ -- "cc", -- "libc", -- "once_cell", -- "spin 0.5.2", -- "untrusted 0.7.1", -- "web-sys", -- "winapi", --] -- --[[package]] --name = "ring" - version = "0.17.14" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -@@ -6378,7 +6359,7 @@ - "cfg-if", - "getrandom 0.2.16", - "libc", -- "untrusted 0.9.0", -+ "untrusted", - "windows-sys 0.52.0", - ] - -@@ -6653,7 +6634,7 @@ - checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" - dependencies = [ - "log", -- "ring 0.17.14", -+ "ring", - "rustls-webpki 0.101.7", - "sct", - ] -@@ -6665,7 +6646,7 @@ - checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" - dependencies = [ - "log", -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", - "rustls-webpki 0.102.8", - "subtle", -@@ -6680,7 +6661,7 @@ - dependencies = [ - "log", - "once_cell", -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", - "rustls-webpki 0.103.3", - "subtle", -@@ -6785,8 +6766,8 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" - dependencies = [ -- "ring 0.17.14", -- "untrusted 0.9.0", -+ "ring", -+ "untrusted", - ] - - [[package]] -@@ -6795,9 +6776,9 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" - dependencies = [ -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", -- "untrusted 0.9.0", -+ "untrusted", - ] - - [[package]] -@@ -6806,9 +6787,9 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" - dependencies = [ -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", -- "untrusted 0.9.0", -+ "untrusted", - ] - - [[package]] -@@ -6938,8 +6919,8 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" - dependencies = [ -- "ring 0.17.14", -- "untrusted 0.9.0", -+ "ring", -+ "untrusted", - ] - - [[package]] -@@ -7600,12 +7581,6 @@ - - [[package]] - name = "spin" --version = "0.5.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -- --[[package]] --name = "spin" - version = "0.9.8" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -@@ -7728,7 +7703,7 @@ - "redis", - "regex", - "reqwest 0.12.23", -- "ring 0.17.14", -+ "ring", - "rkyv", - "roaring", - "rocksdb", -@@ -7946,7 +7921,7 @@ - "quick-xml 0.38.3", - "rayon", - "reqwest 0.12.23", -- "ring 0.17.14", -+ "ring", - "rkyv", - "rustls 0.23.31", - "rustls-pemfile 2.2.0", -@@ -8257,7 +8232,7 @@ - "http 1.3.1", - "httparse", - "rand 0.8.5", -- "ring 0.17.14", -+ "ring", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.2", -@@ -8691,12 +8666,6 @@ - - [[package]] - name = "untrusted" --version = "0.7.1" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -- --[[package]] --name = "untrusted" - version = "0.9.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -@@ -8780,7 +8749,7 @@ - "rcgen 0.13.2", - "regex", - "reqwest 0.12.23", -- "ring 0.17.14", -+ "ring", - "rkyv", - "rustls 0.23.31", - "rustls-pemfile 2.2.0", diff --git a/testing/stalwart-mail/APKBUILD b/testing/stalwart-mail/APKBUILD index ac1c74295be..8b0b18dbd35 100644 --- a/testing/stalwart-mail/APKBUILD +++ b/testing/stalwart-mail/APKBUILD @@ -1,9 +1,9 @@ # Contributor: Carlo Landmeter maintainer="Matthias Ahouansou " pkgname=stalwart-mail -pkgver=0.13.3 -_ldap3ver=0.11.5 -pkgrel=1 +pkgver=0.14.1 +_nixver=0.30.1 +pkgrel=0 pkgdesc="Secure & Modern All-in-One Mail Server" url="https://github.com/stalwartlabs/stalwart" arch="all" @@ -22,8 +22,8 @@ pkggroups="stalwart" subpackages="$pkgname-openrc stalwart-cli:cli" source=" https://github.com/stalwartlabs/stalwart/archive/v$pkgver/stalwart-$pkgver.tar.gz - https://github.com/inejge/ldap3/archive/v$_ldap3ver/ldap3-$_ldap3ver.tar.gz - 0001-Bump-ring-to-0.17.5.patch + nix-$_nixver.tar.gz::https://github.com/nix-rust/nix/archive/refs/tags/v$_nixver.tar.gz + nix-s390x.patch $pkgname.initd $pkgname.confd " @@ -37,7 +37,7 @@ export CARGO_PROFILE_RELEASE_LTO="false" export ROCKSDB_LIB_DIR="/usr/lib/" prepare() { - mv "$srcdir/ldap3-$_ldap3ver" vendored-ldap3 + mv "$srcdir/nix-$_nixver" vendored-nix default_prepare cargo fetch --target="$CTARGET" --locked @@ -72,9 +72,9 @@ package() { } sha512sums=" -0da59440cad9ed1d79660ae0cef689ea53ab5a6a919c0b610dcf2660da4f91bd8b9de5064ecbe7015e7a82c229b6de2662e01a87163a1457b6e897502d7c77be stalwart-0.13.3.tar.gz -ae65ce1d088c3bf71db268b98b44a334dea099b240576fd37d8190acfb9a6f90450a574de14e06099fee002f7f8fba3330fbba79bdacb3bfc852ac7493d43111 ldap3-0.11.5.tar.gz -dbc6ef68435a11c89bdf89b9129aa768a89be8468979509d19260b8654741710a085b8bdf8fa5281d8f9da51a258abd8a6b48505f8e997666efb4a52bdf9b0ae 0001-Bump-ring-to-0.17.5.patch +844db6c54a4b5d20facc97a675ec7ff3a565bb0936e53e6f14661bdfd4dc248879657f0d71e842aa8f0d569af014261111c210a4267cc4102bb02dd61ae3a686 stalwart-0.14.1.tar.gz +94f5a72f099fbe488b2f09a9bbe33d63ad08308ee3c12999b8ad0743a3d9567b759799a32120575abdfb1ab6891cf83951acf7145408b27d3368b5c0f1e35d0a nix-0.30.1.tar.gz +164f7cf2a5af19ac7abb824bc8639b643b05bd6a14f4121c00e2bdbd15cd44a5fe9f00198237ff67260950c2877defc42e6058333f1b418a00b10afe49843bc5 nix-s390x.patch de1bd0a938f8e4ac14e03717e72a9bee9b7630f1d124138afb6ec83b5832c30e5b4406a8f7575ae3dd83a8f6019bd8ef53cc80af4b9713cdbc03eacc887a5ec9 stalwart-mail.initd d61a79d874424c32916758d576861c00208233229b6c7e39302ed55d242a96571c41d8adccc9575dbe5524695bb9b18da46def16f6d57f2877470441d458498e stalwart-mail.confd " diff --git a/testing/stalwart-mail/nix-s390x.patch b/testing/stalwart-mail/nix-s390x.patch new file mode 100644 index 00000000000..2a8be7277dc --- /dev/null +++ b/testing/stalwart-mail/nix-s390x.patch @@ -0,0 +1,108 @@ +From fd18ec27cf6ae7cdea2166efa6451a2fa36de759 Mon Sep 17 00:00:00 2001 +From: Jens Reidel +Date: Tue, 23 Sep 2025 12:59:12 +0000 +Subject: [PATCH] statfs: Fix definitions for s390x musl with libc 0.2.176 + +Signed-off-by: Jens Reidel +--- + vendored-nix/src/sys/statfs.rs | 20 ++++++++------------ + 1 file changed, 8 insertions(+), 12 deletions(-) + +diff --git a/vendored-nix/src/sys/statfs.rs b/vendored-nix/src/sys/statfs.rs +index c0a9f6c993..72958633fa 100644 +--- a/vendored-nix/src/sys/statfs.rs ++++ b/vendored-nix/src/sys/statfs.rs +@@ -56,11 +56,10 @@ type fs_type_t = u32; + type fs_type_t = libc::c_ulong; + #[cfg(all( + target_os = "linux", +- target_arch = "s390x", +- not(target_env = "musl") ++ target_arch = "s390x" + ))] + type fs_type_t = libc::c_uint; +-#[cfg(all(target_os = "linux", any(target_env = "musl", target_env = "ohos")))] ++#[cfg(all(target_os = "linux", any(target_env = "musl", target_env = "ohos"), not(target_arch = "s390x")))] + type fs_type_t = libc::c_ulong; + #[cfg(all(target_os = "linux", target_env = "uclibc"))] + type fs_type_t = libc::c_int; +@@ -328,8 +327,7 @@ impl Statfs { + /// Optimal transfer block size + #[cfg(all( + target_os = "linux", +- target_arch = "s390x", +- not(target_env = "musl") ++ target_arch = "s390x" + ))] + pub fn optimal_transfer_size(&self) -> u32 { + self.0.f_bsize +@@ -338,7 +336,7 @@ impl Statfs { + /// Optimal transfer block size + #[cfg(any( + target_os = "android", +- all(target_os = "linux", target_env = "musl"), ++ all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")), + all(target_os = "linux", target_env = "ohos") + ))] + pub fn optimal_transfer_size(&self) -> libc::c_ulong { +@@ -387,8 +385,7 @@ impl Statfs { + // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471 + #[cfg(all( + target_os = "linux", +- target_arch = "s390x", +- not(target_env = "musl") ++ target_arch = "s390x" + ))] + pub fn block_size(&self) -> u32 { + self.0.f_bsize +@@ -396,7 +393,7 @@ impl Statfs { + + /// Size of a block + // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471 +- #[cfg(all(target_os = "linux", target_env = "musl"))] ++ #[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))] + pub fn block_size(&self) -> libc::c_ulong { + self.0.f_bsize + } +@@ -472,15 +469,14 @@ impl Statfs { + /// Maximum length of filenames + #[cfg(all( + target_os = "linux", +- target_arch = "s390x", +- not(target_env = "musl") ++ target_arch = "s390x" + ))] + pub fn maximum_name_length(&self) -> u32 { + self.0.f_namelen + } + + /// Maximum length of filenames +- #[cfg(all(target_os = "linux", target_env = "musl"))] ++ #[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))] + pub fn maximum_name_length(&self) -> libc::c_ulong { + self.0.f_namelen + } +diff --git a/Cargo.lock b/Cargo.lock +index c3b8bd3a..1911aa67 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -4684,8 +4684,6 @@ dependencies = [ + [[package]] + name = "nix" + version = "0.30.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" + dependencies = [ + "bitflags 2.10.0", + "cfg-if", +diff --git a/Cargo.toml b/Cargo.toml +index 916a24cf..129fafdc 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -71,3 +71,6 @@ incremental = false + debug-assertions = false + overflow-checks = false + rpath = false ++ ++[patch.crates-io] ++nix = { path = "vendored-nix" }