fix deadlock on install (#2667)

* fix deadlock on install

* improve pruning script

* bump tokio
This commit is contained in:
Aiden McClelland
2024-07-11 14:55:13 -06:00
committed by GitHub
parent 87322744d4
commit 6def083b4f
20 changed files with 273 additions and 154 deletions

View File

@@ -1,5 +1,6 @@
avahi-daemon avahi-daemon
avahi-utils avahi-utils
b3sum
bash-completion bash-completion
beep beep
bmon bmon

View File

@@ -85,7 +85,7 @@ if [ "$CHROOT_RES" -eq 0 ]; then
echo 'Upgrading...' echo 'Upgrading...'
time mksquashfs /media/startos/next /media/startos/images/next.squashfs -b 4096 -comp gzip time mksquashfs /media/startos/next /media/startos/images/next.squashfs -b 4096 -comp gzip
hash=$(start-cli util b3sum /media/startos/images/next.squashfs | head -c 32) hash=$(b3sum /media/startos/images/next.squashfs | head -c 32)
mv /media/startos/images/next.squashfs /media/startos/images/${hash}.rootfs mv /media/startos/images/next.squashfs /media/startos/images/${hash}.rootfs
ln -rsf /media/startos/images/${hash}.rootfs /media/startos/config/current.rootfs ln -rsf /media/startos/images/${hash}.rootfs /media/startos/config/current.rootfs

View File

@@ -33,7 +33,7 @@ if [ -h /media/startos/config/current.rootfs ] && [ -e /media/startos/config/cur
echo 'Pruning...' echo 'Pruning...'
current="$(readlink -f /media/startos/config/current.rootfs)" current="$(readlink -f /media/startos/config/current.rootfs)"
while [[ "$(df -B1 --output=avail --sync /media/startos/images | tail -n1)" -lt "$needed" ]]; do while [[ "$(df -B1 --output=avail --sync /media/startos/images | tail -n1)" -lt "$needed" ]]; do
to_prune="$(ls -t1 /media/startos/images/*.rootfs | grep -v "$current" | tail -n1)" to_prune="$(ls -t1 /media/startos/images/*.rootfs /media/startos/images/*.squashfs | grep -v "$current" | tail -n1)"
if [ -e "$to_prune" ]; then if [ -e "$to_prune" ]; then
echo " Pruning $to_prune" echo " Pruning $to_prune"
rm -rf "$to_prune" rm -rf "$to_prune"

344
core/Cargo.lock generated
View File

@@ -260,23 +260,39 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi 0.1.19",
"libc",
"winapi",
]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.3.0" version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "aws-lc-rs"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8a47f2fb521b70c11ce7369a6c5fa4bd6af7e5d62ec06303875bafe7c6ba245"
dependencies = [
"aws-lc-sys",
"mirai-annotations",
"paste",
"zeroize",
]
[[package]]
name = "aws-lc-sys"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2927c7af777b460b7ccd95f8b67acd7b4c04ec8896bf0c8e80ba30523cffc057"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
"libc",
"paste",
]
[[package]] [[package]]
name = "axum" name = "axum"
version = "0.6.20" version = "0.6.20"
@@ -335,7 +351,7 @@ dependencies = [
"sha1", "sha1",
"sync_wrapper 1.0.1", "sync_wrapper 1.0.1",
"tokio", "tokio",
"tokio-tungstenite", "tokio-tungstenite 0.21.0",
"tower", "tower",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
@@ -453,6 +469,12 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
[[package]]
name = "base32"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1ce0365f4d5fb6646220bb52fe547afd51796d90f914d4063cb0b032ebee088"
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.21.7" version = "0.21.7"
@@ -491,6 +513,29 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "bindgen"
version = "0.69.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
dependencies = [
"bitflags 2.6.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"lazy_static",
"lazycell",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn 2.0.68",
"which",
]
[[package]] [[package]]
name = "bit-set" name = "bit-set"
version = "0.5.3" version = "0.5.3"
@@ -651,12 +696,27 @@ dependencies = [
"once_cell", "once_cell",
] ]
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom 7.1.3",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "1.0.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.38" version = "0.4.38"
@@ -727,6 +787,17 @@ dependencies = [
"inout", "inout",
] ]
[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.7" version = "4.5.7"
@@ -767,6 +838,15 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70"
[[package]]
name = "cmake"
version = "0.1.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "color-eyre" name = "color-eyre"
version = "0.6.3" version = "0.6.3"
@@ -833,9 +913,9 @@ dependencies = [
[[package]] [[package]]
name = "console-api" name = "console-api"
version = "0.6.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" checksum = "a257c22cd7e487dd4a13d413beabc512c5052f0bc048db0da6a84c3d8a6142fd"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"prost", "prost",
@@ -846,9 +926,9 @@ dependencies = [
[[package]] [[package]]
name = "console-subscriber" name = "console-subscriber"
version = "0.2.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" checksum = "31c4cc54bae66f7d9188996404abdf7fdfa23034ef8e43478c8810828abad758"
dependencies = [ dependencies = [
"console-api", "console-api",
"crossbeam-channel", "crossbeam-channel",
@@ -856,6 +936,7 @@ dependencies = [
"futures-task", "futures-task",
"hdrhistogram", "hdrhistogram",
"humantime", "humantime",
"prost",
"prost-types", "prost-types",
"serde", "serde",
"serde_json", "serde_json",
@@ -915,17 +996,6 @@ dependencies = [
"unicode-segmentation", "unicode-segmentation",
] ]
[[package]]
name = "cookie"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
dependencies = [
"percent-encoding",
"time",
"version_check",
]
[[package]] [[package]]
name = "cookie" name = "cookie"
version = "0.18.1" version = "0.18.1"
@@ -937,30 +1007,13 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "cookie_store"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6"
dependencies = [
"cookie 0.17.0",
"idna 0.3.0",
"log",
"publicsuffix",
"serde",
"serde_derive",
"serde_json",
"time",
"url",
]
[[package]] [[package]]
name = "cookie_store" name = "cookie_store"
version = "0.21.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa" checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa"
dependencies = [ dependencies = [
"cookie 0.18.1", "cookie",
"idna 0.5.0", "idna 0.5.0",
"log", "log",
"publicsuffix", "publicsuffix",
@@ -1362,6 +1415,12 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "dunce"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
[[package]] [[package]]
name = "dyn-clone" name = "dyn-clone"
version = "1.0.17" version = "1.0.17"
@@ -1685,6 +1744,12 @@ dependencies = [
"itertools 0.8.2", "itertools 0.8.2",
] ]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]] [[package]]
name = "funty" name = "funty"
version = "1.1.0" version = "1.1.0"
@@ -1836,6 +1901,12 @@ version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "glob"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]] [[package]]
name = "gpt" name = "gpt"
version = "3.1.0" version = "3.1.0"
@@ -1992,15 +2063,6 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.3.9" version = "0.3.9"
@@ -2178,7 +2240,7 @@ dependencies = [
"rustls 0.23.10", "rustls 0.23.10",
"rustls-pki-types", "rustls-pki-types",
"tokio", "tokio",
"tokio-rustls 0.26.0", "tokio-rustls",
"tower-service", "tower-service",
] ]
@@ -2447,7 +2509,7 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
dependencies = [ dependencies = [
"hermit-abi 0.3.9", "hermit-abi",
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@@ -2689,6 +2751,12 @@ dependencies = [
"spin", "spin",
] ]
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]] [[package]]
name = "lexical-core" name = "lexical-core"
version = "0.7.6" version = "0.7.6"
@@ -2708,6 +2776,16 @@ version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libloading"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d"
dependencies = [
"cfg-if",
"windows-targets 0.52.5",
]
[[package]] [[package]]
name = "libm" name = "libm"
version = "0.2.8" version = "0.2.8"
@@ -2878,6 +2956,12 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]]
name = "mirai-annotations"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1"
[[package]] [[package]]
name = "models" name = "models"
version = "0.1.0" version = "0.1.0"
@@ -2969,12 +3053,13 @@ dependencies = [
[[package]] [[package]]
name = "nix" name = "nix"
version = "0.27.1" version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"cfg-if", "cfg-if",
"cfg_aliases",
"libc", "libc",
] ]
@@ -3123,7 +3208,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [ dependencies = [
"hermit-abi 0.3.9", "hermit-abi",
"libc", "libc",
] ]
@@ -3540,6 +3625,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "prettyplease"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
dependencies = [
"proc-macro2",
"syn 2.0.68",
]
[[package]] [[package]]
name = "prettytable-rs" name = "prettytable-rs"
version = "0.10.0" version = "0.10.0"
@@ -3603,13 +3698,13 @@ dependencies = [
[[package]] [[package]]
name = "proptest-derive" name = "proptest-derive"
version = "0.4.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.109", "syn 2.0.68",
] ]
[[package]] [[package]]
@@ -3892,8 +3987,8 @@ checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
"cookie 0.18.1", "cookie",
"cookie_store 0.21.0", "cookie_store",
"encoding_rs", "encoding_rs",
"futures-core", "futures-core",
"futures-util", "futures-util",
@@ -3934,12 +4029,12 @@ dependencies = [
[[package]] [[package]]
name = "reqwest_cookie_store" name = "reqwest_cookie_store"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93ea5c6f30c19d766efe8d823c88f9abd1c56516648a0d4264ab2dc04cc19472" checksum = "a0b36498c7452f11b1833900f31fbb01fc46be20992a50269c88cf59d79f54e9"
dependencies = [ dependencies = [
"bytes", "bytes",
"cookie_store 0.20.0", "cookie_store",
"reqwest", "reqwest",
"url", "url",
] ]
@@ -4095,26 +4190,14 @@ dependencies = [
"sct", "sct",
] ]
[[package]]
name = "rustls"
version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
dependencies = [
"log",
"ring",
"rustls-pki-types",
"rustls-webpki 0.102.4",
"subtle",
"zeroize",
]
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.23.10" version = "0.23.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402"
dependencies = [ dependencies = [
"aws-lc-rs",
"log",
"once_cell", "once_cell",
"rustls-pki-types", "rustls-pki-types",
"rustls-webpki 0.102.4", "rustls-webpki 0.102.4",
@@ -4163,6 +4246,7 @@ version = "0.102.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
dependencies = [ dependencies = [
"aws-lc-rs",
"ring", "ring",
"rustls-pki-types", "rustls-pki-types",
"untrusted", "untrusted",
@@ -4475,6 +4559,12 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]] [[package]]
name = "signal-hook" name = "signal-hook"
version = "0.3.17" version = "0.3.17"
@@ -4874,8 +4964,8 @@ dependencies = [
"axum-server", "axum-server",
"backhand", "backhand",
"barrage", "barrage",
"base32", "base32 0.5.0",
"base64 0.21.7", "base64 0.22.1",
"base64ct", "base64ct",
"basic-cookies", "basic-cookies",
"blake3", "blake3",
@@ -4886,8 +4976,8 @@ dependencies = [
"color-eyre", "color-eyre",
"console", "console",
"console-subscriber", "console-subscriber",
"cookie 0.18.1", "cookie",
"cookie_store 0.20.0", "cookie_store",
"der", "der",
"digest 0.10.7", "digest 0.10.7",
"divrem", "divrem",
@@ -4914,7 +5004,7 @@ dependencies = [
"ipnet", "ipnet",
"iprange", "iprange",
"isocountry", "isocountry",
"itertools 0.12.1", "itertools 0.13.0",
"jaq-core", "jaq-core",
"jaq-std", "jaq-std",
"josekit", "josekit",
@@ -4927,7 +5017,7 @@ dependencies = [
"mbrman", "mbrman",
"models", "models",
"new_mime_guess", "new_mime_guess",
"nix 0.27.1", "nix 0.29.0",
"nom 7.1.3", "nom 7.1.3",
"num", "num",
"num_enum", "num_enum",
@@ -4963,15 +5053,14 @@ dependencies = [
"sqlx", "sqlx",
"sscanf", "sscanf",
"ssh-key", "ssh-key",
"stderrlog",
"tar", "tar",
"thiserror", "thiserror",
"tokio", "tokio",
"tokio-rustls 0.25.0", "tokio-rustls",
"tokio-socks", "tokio-socks",
"tokio-stream", "tokio-stream",
"tokio-tar", "tokio-tar",
"tokio-tungstenite", "tokio-tungstenite 0.23.1",
"tokio-util", "tokio-util",
"toml 0.8.14", "toml 0.8.14",
"torut", "torut",
@@ -4996,19 +5085,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stderrlog"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69a26bbf6de627d389164afa9783739b56746c6c72c4ed16539f4ff54170327b"
dependencies = [
"atty",
"chrono",
"log",
"termcolor",
"thread_local",
]
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.8.7" version = "0.8.7"
@@ -5312,17 +5388,6 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "tokio-rustls"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
dependencies = [
"rustls 0.22.4",
"rustls-pki-types",
"tokio",
]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.26.0" version = "0.26.0"
@@ -5377,13 +5442,25 @@ name = "tokio-tungstenite"
version = "0.21.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
dependencies = [
"futures-util",
"log",
"tokio",
"tungstenite 0.21.0",
]
[[package]]
name = "tokio-tungstenite"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"log", "log",
"native-tls", "native-tls",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
"tungstenite", "tungstenite 0.23.0",
] ]
[[package]] [[package]]
@@ -5471,9 +5548,9 @@ dependencies = [
[[package]] [[package]]
name = "tonic" name = "tonic"
version = "0.10.2" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13"
dependencies = [ dependencies = [
"async-stream", "async-stream",
"async-trait", "async-trait",
@@ -5501,7 +5578,7 @@ name = "torut"
version = "0.2.1" version = "0.2.1"
source = "git+https://github.com/Start9Labs/torut.git?branch=update/dependencies#cc7a1425a01214465e106975e6690794d8551bdb" source = "git+https://github.com/Start9Labs/torut.git?branch=update/dependencies#cc7a1425a01214465e106975e6690794d8551bdb"
dependencies = [ dependencies = [
"base32", "base32 0.4.0",
"base64 0.21.7", "base64 0.21.7",
"derive_more", "derive_more",
"ed25519-dalek 1.0.1", "ed25519-dalek 1.0.1",
@@ -5728,6 +5805,25 @@ name = "tungstenite"
version = "0.21.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
dependencies = [
"byteorder",
"bytes",
"data-encoding",
"http 1.1.0",
"httparse",
"log",
"rand 0.8.5",
"sha1",
"thiserror",
"url",
"utf-8",
]
[[package]]
name = "tungstenite"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"bytes", "bytes",
@@ -6045,6 +6141,18 @@ version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
"home",
"once_cell",
"rustix",
]
[[package]] [[package]]
name = "whoami" name = "whoami"
version = "1.5.1" version = "1.5.1"

View File

@@ -61,8 +61,8 @@ axum = { version = "0.7.3", features = ["ws"] }
axum-server = "0.6.0" axum-server = "0.6.0"
barrage = "0.2.3" barrage = "0.2.3"
backhand = "0.18.0" backhand = "0.18.0"
base32 = "0.4.0" base32 = "0.5.0"
base64 = "0.21.4" base64 = "0.22.1"
base64ct = "1.6.0" base64ct = "1.6.0"
basic-cookies = "0.1.4" basic-cookies = "0.1.4"
blake3 = { version = "1.5.0", features = ["mmap", "rayon"] } blake3 = { version = "1.5.0", features = ["mmap", "rayon"] }
@@ -71,9 +71,9 @@ chrono = { version = "0.4.31", features = ["serde"] }
clap = "4.4.12" clap = "4.4.12"
color-eyre = "0.6.2" color-eyre = "0.6.2"
console = "0.15.7" console = "0.15.7"
console-subscriber = { version = "0.2", optional = true } console-subscriber = { version = "0.3.0", optional = true }
cookie = "0.18.0" cookie = "0.18.0"
cookie_store = "0.20.0" cookie_store = "0.21.0"
der = { version = "0.7.9", features = ["derive", "pem"] } der = { version = "0.7.9", features = ["derive", "pem"] }
digest = "0.10.7" digest = "0.10.7"
divrem = "1.0.0" divrem = "1.0.0"
@@ -102,7 +102,7 @@ id-pool = { version = "0.2.2", default-features = false, features = [
"serde", "serde",
"u16", "u16",
] } ] }
imbl = "2.0.2" imbl = "2.0.3"
imbl-value = { git = "https://github.com/Start9Labs/imbl-value.git" } imbl-value = { git = "https://github.com/Start9Labs/imbl-value.git" }
include_dir = { version = "0.7.3", features = ["metadata"] } include_dir = { version = "0.7.3", features = ["metadata"] }
indexmap = { version = "2.0.2", features = ["serde"] } indexmap = { version = "2.0.2", features = ["serde"] }
@@ -111,7 +111,7 @@ integer-encoding = { version = "4.0.0", features = ["tokio_async"] }
ipnet = { version = "2.8.0", features = ["serde"] } ipnet = { version = "2.8.0", features = ["serde"] }
iprange = { version = "0.6.7", features = ["serde"] } iprange = { version = "0.6.7", features = ["serde"] }
isocountry = "0.3.2" isocountry = "0.3.2"
itertools = "0.12.0" itertools = "0.13.0"
jaq-core = "0.10.1" jaq-core = "0.10.1"
jaq-std = "0.10.0" jaq-std = "0.10.0"
josekit = "0.8.4" josekit = "0.8.4"
@@ -124,7 +124,7 @@ log = "0.4.20"
mbrman = "0.5.2" mbrman = "0.5.2"
models = { version = "*", path = "../models" } models = { version = "*", path = "../models" }
new_mime_guess = "4" new_mime_guess = "4"
nix = { version = "0.27.1", features = ["user", "process", "signal", "fs"] } nix = { version = "0.29.0", features = ["user", "process", "signal", "fs"] }
nom = "7.1.3" nom = "7.1.3"
num = "0.4.1" num = "0.4.1"
num_enum = "0.7.0" num_enum = "0.7.0"
@@ -140,11 +140,11 @@ pin-project = "1.1.3"
pkcs8 = { version = "0.10.2", features = ["std"] } pkcs8 = { version = "0.10.2", features = ["std"] }
prettytable-rs = "0.10.0" prettytable-rs = "0.10.0"
proptest = "1.3.1" proptest = "1.3.1"
proptest-derive = "0.4.0" proptest-derive = "0.5.0"
rand = { version = "0.8.5", features = ["std"] } rand = { version = "0.8.5", features = ["std"] }
regex = "1.10.2" regex = "1.10.2"
reqwest = { version = "0.12.4", features = ["stream", "json", "socks"] } reqwest = { version = "0.12.4", features = ["stream", "json", "socks"] }
reqwest_cookie_store = "0.7.0" reqwest_cookie_store = "0.8.0"
rpassword = "7.2.0" rpassword = "7.2.0"
rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = "refactor/no-dyn-ctx" } rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = "refactor/no-dyn-ctx" }
rust-argon2 = "2.0.0" rust-argon2 = "2.0.0"
@@ -168,15 +168,14 @@ sqlx = { version = "0.7.2", features = [
] } ] }
sscanf = "0.4.1" sscanf = "0.4.1"
ssh-key = { version = "0.6.2", features = ["ed25519"] } ssh-key = { version = "0.6.2", features = ["ed25519"] }
stderrlog = "0.5.4"
tar = "0.4.40" tar = "0.4.40"
thiserror = "1.0.49" thiserror = "1.0.49"
tokio = { version = "1.37", features = ["full"] } tokio = { version = "1.38.0", features = ["full"] }
tokio-rustls = "0.25.0" tokio-rustls = "0.26.0"
tokio-socks = "0.5.1" tokio-socks = "0.5.1"
tokio-stream = { version = "0.1.14", features = ["io-util", "sync", "net"] } tokio-stream = { version = "0.1.14", features = ["io-util", "sync", "net"] }
tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" } tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" }
tokio-tungstenite = { version = "0.21.0", features = ["native-tls"] } tokio-tungstenite = { version = "0.23.1", features = ["native-tls", "url"] }
tokio-util = { version = "0.7.9", features = ["io"] } tokio-util = { version = "0.7.9", features = ["io"] }
torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies", features = [ torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies", features = [
"serialize", "serialize",

View File

@@ -66,7 +66,7 @@ where
let mut guid = format!( let mut guid = format!(
"STARTOS_{}", "STARTOS_{}",
base32::encode( base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&rand::random::<[u8; 20]>(), &rand::random::<[u8; 20]>(),
) )
); );

View File

@@ -65,7 +65,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
unencrypted_metadata.wrapped_key.as_ref(), unencrypted_metadata.wrapped_key.as_ref(),
) { ) {
let wrapped_key = let wrapped_key =
base32::decode(base32::Alphabet::RFC4648 { padding: true }, wrapped_key) base32::decode(base32::Alphabet::Rfc4648 { padding: true }, wrapped_key)
.ok_or_else(|| { .ok_or_else(|| {
Error::new( Error::new(
eyre!("failed to decode wrapped key"), eyre!("failed to decode wrapped key"),
@@ -76,7 +76,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
String::from_utf8(decrypt_slice(wrapped_key, password))? String::from_utf8(decrypt_slice(wrapped_key, password))?
} else { } else {
base32::encode( base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&rand::random::<[u8; 32]>()[..], &rand::random::<[u8; 32]>()[..],
) )
}; };
@@ -93,7 +93,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
} }
if unencrypted_metadata.wrapped_key.is_none() { if unencrypted_metadata.wrapped_key.is_none() {
unencrypted_metadata.wrapped_key = Some(base32::encode( unencrypted_metadata.wrapped_key = Some(base32::encode(
base32::Alphabet::RFC4648 { padding: true }, base32::Alphabet::Rfc4648 { padding: true },
&encrypt_slice(&enc_key, password), &encrypt_slice(&enc_key, password),
)); ));
} }
@@ -141,7 +141,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
.with_kind(crate::ErrorKind::PasswordHashGeneration)?, .with_kind(crate::ErrorKind::PasswordHashGeneration)?,
); );
self.unencrypted_metadata.wrapped_key = Some(base32::encode( self.unencrypted_metadata.wrapped_key = Some(base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&encrypt_slice(&self.enc_key, new_password), &encrypt_slice(&self.enc_key, new_password),
)); ));
Ok(()) Ok(())

View File

@@ -111,7 +111,7 @@ impl GenericMountGuard for MountGuard {
async fn tmp_mountpoint(source: &impl FileSystem) -> Result<PathBuf, Error> { async fn tmp_mountpoint(source: &impl FileSystem) -> Result<PathBuf, Error> {
Ok(Path::new(TMP_MOUNTPOINT).join(base32::encode( Ok(Path::new(TMP_MOUNTPOINT).join(base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&source.source_hash().await?[0..20], &source.source_hash().await?[0..20],
))) )))
} }

View File

@@ -30,6 +30,7 @@ use crate::progress::{
FullProgress, FullProgressTracker, PhaseProgressTrackerHandle, PhasedProgressBar, FullProgress, FullProgressTracker, PhaseProgressTrackerHandle, PhasedProgressBar,
}; };
use crate::rpc_continuations::{Guid, RpcContinuation}; use crate::rpc_continuations::{Guid, RpcContinuation};
use crate::s9pk::v2::pack::{CONTAINER_DATADIR, CONTAINER_TOOL};
use crate::ssh::SSH_AUTHORIZED_KEYS_FILE; use crate::ssh::SSH_AUTHORIZED_KEYS_FILE;
use crate::util::io::{create_file, IOHook}; use crate::util::io::{create_file, IOHook};
use crate::util::net::WebSocketExt; use crate::util::net::WebSocketExt;
@@ -421,6 +422,10 @@ pub async fn init(
tokio::fs::remove_dir_all(&tmp_var).await?; tokio::fs::remove_dir_all(&tmp_var).await?;
} }
crate::disk::mount::util::bind(&tmp_var, "/var/tmp", false).await?; crate::disk::mount::util::bind(&tmp_var, "/var/tmp", false).await?;
let tmp_docker = cfg
.datadir()
.join(format!("package-data/tmp/{CONTAINER_TOOL}"));
crate::disk::mount::util::bind(&tmp_docker, CONTAINER_DATADIR, false).await?;
init_tmp.complete(); init_tmp.complete();
set_governor.start(); set_governor.start();

View File

@@ -151,7 +151,7 @@ impl HashSessionToken {
pub fn new() -> Self { pub fn new() -> Self {
Self::from_token(InternedString::intern( Self::from_token(InternedString::intern(
base32::encode( base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&rand::random::<[u8; 16]>(), &rand::random::<[u8; 16]>(),
) )
.to_lowercase(), .to_lowercase(),
@@ -200,7 +200,7 @@ impl HashSessionToken {
hasher.update(token.as_bytes()); hasher.update(token.as_bytes());
InternedString::intern( InternedString::intern(
base32::encode( base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
hasher.finalize().as_slice(), hasher.finalize().as_slice(),
) )
.to_lowercase(), .to_lowercase(),

View File

@@ -253,7 +253,7 @@ fn cert_send(cert: &X509, hostname: &Hostname) -> Result<Response, Error> {
.header( .header(
http::header::ETAG, http::header::ETAG,
base32::encode( base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&*cert.digest(MessageDigest::sha256())?, &*cert.digest(MessageDigest::sha256())?,
) )
.to_lowercase(), .to_lowercase(),
@@ -338,8 +338,7 @@ impl FileData {
.any(|e| e == "gzip") .any(|e| e == "gzip")
.then_some("gzip"); .then_some("gzip");
let file = open_file(path) let file = open_file(path).await?;
.await?;
let metadata = file let metadata = file
.metadata() .metadata()
.await .await
@@ -439,6 +438,6 @@ fn e_tag(path: &Path, modified: impl AsRef<[u8]>) -> String {
let res = hasher.finalize(); let res = hasher.finalize();
format!( format!(
"\"{}\"", "\"{}\"",
base32::encode(base32::Alphabet::RFC4648 { padding: false }, res.as_slice()).to_lowercase() base32::encode(base32::Alphabet::Rfc4648 { padding: false }, res.as_slice()).to_lowercase()
) )
} }

View File

@@ -279,7 +279,7 @@ impl FullProgressTracker {
.mutate(|v| { .mutate(|v| {
if let Some(p) = deref(v) { if let Some(p) = deref(v) {
p.ser(&progress)?; p.ser(&progress)?;
Ok(false) Ok(progress.overall.is_complete())
} else { } else {
Ok(true) Ok(true)
} }

View File

@@ -206,7 +206,7 @@ impl<R: AsyncRead + AsyncSeek + Unpin + Send + Sync> S9pkReader<R> {
( (
Some(hash), Some(hash),
Some(base32::encode( Some(base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
hash.as_slice(), hash.as_slice(),
)), )),
) )

View File

@@ -32,10 +32,14 @@ use crate::util::Invoke;
#[cfg(not(feature = "docker"))] #[cfg(not(feature = "docker"))]
pub const CONTAINER_TOOL: &str = "podman"; pub const CONTAINER_TOOL: &str = "podman";
#[cfg(feature = "docker")] #[cfg(feature = "docker")]
pub const CONTAINER_TOOL: &str = "docker"; pub const CONTAINER_TOOL: &str = "docker";
#[cfg(feature = "docker")]
pub const CONTAINER_DATADIR: &str = "/var/lib/docker";
#[cfg(not(feature = "docker"))]
pub const CONTAINER_DATADIR: &str = "/var/lib/containers";
pub struct SqfsDir { pub struct SqfsDir {
path: PathBuf, path: PathBuf,
tmpdir: Arc<TmpDir>, tmpdir: Arc<TmpDir>,

View File

@@ -374,9 +374,11 @@ impl Service {
entry.as_icon_mut().ser(&icon)?; entry.as_icon_mut().ser(&icon)?;
// TODO: marketplace url // TODO: marketplace url
// TODO: dependency info // TODO: dependency info
Ok(()) Ok(())
}) })
.await?; .await?;
Ok(service) Ok(service)
} }

View File

@@ -294,9 +294,12 @@ impl ServiceMap {
.into(), .into(),
); );
} }
drop(service);
sync_progress_task.await.map_err(|_| { sync_progress_task.await.map_err(|_| {
Error::new(eyre!("progress sync task panicked"), ErrorKind::Unknown) Error::new(eyre!("progress sync task panicked"), ErrorKind::Unknown)
})??; })??;
Ok(()) Ok(())
}) })
.boxed()) .boxed())

View File

@@ -20,7 +20,6 @@ impl Handler<Restart> for ServiceActor {
.except::<DependencyConfig>() .except::<DependencyConfig>()
} }
async fn handle(&mut self, _: Guid, _: Restart, jobs: &BackgroundJobQueue) -> Self::Response { async fn handle(&mut self, _: Guid, _: Restart, jobs: &BackgroundJobQueue) -> Self::Response {
dbg!("here");
// So Need a handle to just a single field in the state // So Need a handle to just a single field in the state
let temp = TempDesiredRestore::new(&self.0.persistent_container.state); let temp = TempDesiredRestore::new(&self.0.persistent_container.state);
let mut current = self.0.persistent_container.state.subscribe(); let mut current = self.0.persistent_container.state.subscribe();
@@ -77,7 +76,6 @@ impl Handler<Restart> for ServiceActor {
impl Service { impl Service {
#[instrument(skip_all)] #[instrument(skip_all)]
pub async fn restart(&self, id: Guid) -> Result<(), Error> { pub async fn restart(&self, id: Guid) -> Result<(), Error> {
dbg!("here");
self.actor.send(id, Restart).await self.actor.send(id, Restart).await
} }
} }

View File

@@ -781,7 +781,7 @@ pub struct TmpDir {
impl TmpDir { impl TmpDir {
pub async fn new() -> Result<Self, Error> { pub async fn new() -> Result<Self, Error> {
let path = Path::new("/var/tmp/startos").join(base32::encode( let path = Path::new("/var/tmp/startos").join(base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&rand::random::<[u8; 8]>(), &rand::random::<[u8; 8]>(),
)); ));
if tokio::fs::metadata(&path).await.is_ok() { if tokio::fs::metadata(&path).await.is_ok() {

View File

@@ -644,7 +644,7 @@ pub fn new_guid() -> InternedString {
let mut buf = [0; 20]; let mut buf = [0; 20];
rand::thread_rng().fill_bytes(&mut buf); rand::thread_rng().fill_bytes(&mut buf);
InternedString::intern(base32::encode( InternedString::intern(base32::encode(
base32::Alphabet::RFC4648 { padding: false }, base32::Alphabet::Rfc4648 { padding: false },
&buf, &buf,
)) ))
} }

View File

@@ -958,7 +958,7 @@ impl<T: AsRef<[u8]>> std::fmt::Display for Base16<T> {
pub struct Base32<T>(pub T); pub struct Base32<T>(pub T);
impl<T: AsRef<[u8]>> std::fmt::Display for Base32<T> { impl<T: AsRef<[u8]>> std::fmt::Display for Base32<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
base32::encode(base32::Alphabet::RFC4648 { padding: true }, self.0.as_ref()).fmt(f) base32::encode(base32::Alphabet::Rfc4648 { padding: true }, self.0.as_ref()).fmt(f)
} }
} }
impl<'de, T: TryFrom<Vec<u8>>> Deserialize<'de> for Base32<T> { impl<'de, T: TryFrom<Vec<u8>>> Deserialize<'de> for Base32<T> {
@@ -967,7 +967,7 @@ impl<'de, T: TryFrom<Vec<u8>>> Deserialize<'de> for Base32<T> {
D: Deserializer<'de>, D: Deserializer<'de>,
{ {
let s = String::deserialize(deserializer)?; let s = String::deserialize(deserializer)?;
base32::decode(base32::Alphabet::RFC4648 { padding: true }, &s) base32::decode(base32::Alphabet::Rfc4648 { padding: true }, &s)
.ok_or_else(|| { .ok_or_else(|| {
serde::de::Error::invalid_value( serde::de::Error::invalid_value(
serde::de::Unexpected::Str(&s), serde::de::Unexpected::Str(&s),