unpack assets

This commit is contained in:
Aiden McClelland
2021-09-08 17:47:21 -06:00
committed by Aiden McClelland
parent 8f362e7d1e
commit 2f8e71d459
5 changed files with 237 additions and 277 deletions

343
appmgr/Cargo.lock generated
View File

@@ -10,7 +10,7 @@ checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cipher", "cipher",
"cpufeatures 0.2.1", "cpufeatures",
"ctr", "ctr",
"opaque-debug", "opaque-debug",
] ]
@@ -77,9 +77,9 @@ version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -168,7 +168,7 @@ dependencies = [
"lazycell", "lazycell",
"log", "log",
"peeking_take_while", "peeking_take_while",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"regex", "regex",
"rustc-hash", "rustc-hash",
@@ -260,7 +260,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"thiserror", "thiserror",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-util", "tokio-util",
"url", "url",
"winapi", "winapi",
@@ -315,9 +315,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.69" version = "1.0.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0"
[[package]] [[package]]
name = "cexpr" name = "cexpr"
@@ -375,9 +375,9 @@ dependencies = [
[[package]] [[package]]
name = "clang-sys" name = "clang-sys"
version = "1.2.1" version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cf2cc85830eae84823884db23c5306442a6c3d5bfd3beb2f2a2c829faa1816" checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee"
dependencies = [ dependencies = [
"glob", "glob",
"libc", "libc",
@@ -487,15 +487,6 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
[[package]]
name = "cpufeatures"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "cpufeatures" name = "cpufeatures"
version = "0.2.1" version = "0.2.1"
@@ -666,10 +657,10 @@ checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3"
dependencies = [ dependencies = [
"fnv", "fnv",
"ident_case", "ident_case",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"strsim 0.10.0", "strsim 0.10.0",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -680,7 +671,7 @@ checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -690,10 +681,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"rustc_version 0.3.3", "rustc_version 0.3.3",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -859,7 +850,7 @@ dependencies = [
"sqlx", "sqlx",
"tar", "tar",
"thiserror", "thiserror",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-compat-02", "tokio-compat-02",
"tokio-stream", "tokio-stream",
"tokio-tar", "tokio-tar",
@@ -1008,9 +999,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@@ -1023,9 +1014,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
@@ -1033,15 +1024,15 @@ dependencies = [
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d"
[[package]] [[package]]
name = "futures-executor" name = "futures-executor"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
@@ -1061,40 +1052,40 @@ dependencies = [
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377"
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.16" version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"futures-channel", "futures-channel",
@@ -1160,9 +1151,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f" checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -1185,7 +1176,7 @@ dependencies = [
"http", "http",
"indexmap", "indexmap",
"slab", "slab",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-util", "tokio-util",
"tracing", "tracing",
] ]
@@ -1315,7 +1306,7 @@ dependencies = [
"itoa", "itoa",
"pin-project-lite 0.2.7", "pin-project-lite 0.2.7",
"socket2", "socket2",
"tokio 1.10.1", "tokio 1.11.0",
"tower-service", "tower-service",
"tracing", "tracing",
"want", "want",
@@ -1330,7 +1321,7 @@ dependencies = [
"bytes 1.1.0", "bytes 1.1.0",
"hyper", "hyper",
"native-tls", "native-tls",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-native-tls", "tokio-native-tls",
] ]
@@ -1346,7 +1337,7 @@ dependencies = [
"hyper", "hyper",
"log", "log",
"sha-1", "sha-1",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-tungstenite", "tokio-tungstenite",
] ]
@@ -1360,7 +1351,7 @@ dependencies = [
"hex", "hex",
"hyper", "hyper",
"pin-project", "pin-project",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -1451,9 +1442,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.53" version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" checksum = "1866b355d9c878e5e607473cbe3f63282c0b7aad2db1dbebf55076c686918254"
dependencies = [ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
@@ -1586,9 +1577,9 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.4" version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
dependencies = [ dependencies = [
"scopeguard", "scopeguard",
] ]
@@ -1646,6 +1637,12 @@ version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]]
name = "minimal-lexical"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c835948974f68e0bd58636fc6c5b1fbff7b297e3046f11b3b3c18bbac012c6d"
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.7.13" version = "0.7.13"
@@ -1753,6 +1750,17 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "nom"
version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1"
dependencies = [
"memchr",
"minimal-lexical",
"version_check",
]
[[package]] [[package]]
name = "ntapi" name = "ntapi"
version = "0.3.6" version = "0.3.6"
@@ -1861,9 +1869,9 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
version = "0.11.1" version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [ dependencies = [
"instant", "instant",
"lock_api", "lock_api",
@@ -1872,9 +1880,9 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot_core" name = "parking_lot_core"
version = "0.8.3" version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"instant", "instant",
@@ -1913,7 +1921,7 @@ dependencies = [
"serde_cbor 0.11.1", "serde_cbor 0.11.1",
"serde_json", "serde_json",
"thiserror", "thiserror",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -1921,8 +1929,8 @@ name = "patch-db-macro"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"patch-db-macro-internals", "patch-db-macro-internals",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -1930,9 +1938,9 @@ name = "patch-db-macro-internals"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -2008,9 +2016,9 @@ version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -2086,9 +2094,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.28" version = "1.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d"
dependencies = [ dependencies = [
"unicode-xid 0.2.2", "unicode-xid 0.2.2",
] ]
@@ -2179,7 +2187,7 @@ version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
] ]
[[package]] [[package]]
@@ -2383,7 +2391,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"time 0.2.27", "time 0.2.27",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-native-tls", "tokio-native-tls",
"tokio-socks", "tokio-socks",
"url", "url",
@@ -2445,7 +2453,7 @@ dependencies = [
"serde_cbor 0.11.2", "serde_cbor 0.11.2",
"serde_json", "serde_json",
"thiserror", "thiserror",
"tokio 1.10.1", "tokio 1.11.0",
"url", "url",
"yajrc", "yajrc",
] ]
@@ -2454,18 +2462,18 @@ dependencies = [
name = "rpc-toolkit-macro" name = "rpc-toolkit-macro"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"rpc-toolkit-macro-internals", "rpc-toolkit-macro-internals",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
name = "rpc-toolkit-macro-internals" name = "rpc-toolkit-macro-internals"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -2582,9 +2590,9 @@ dependencies = [
[[package]] [[package]]
name = "security-framework-sys" name = "security-framework-sys"
version = "2.3.0" version = "2.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284" checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e"
dependencies = [ dependencies = [
"core-foundation-sys", "core-foundation-sys",
"libc", "libc",
@@ -2625,9 +2633,9 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.129" version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1f72836d2aa753853178eda473a3b9d8e4eefdaf20523b919677e6de489f8f1" checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@@ -2661,20 +2669,20 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.129" version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e57ae87ad533d9a56427558b516d0adac283614e347abf85b0dc0cbbf0a249f3" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.66" version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"itoa", "itoa",
@@ -2696,9 +2704,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_with" name = "serde_with"
version = "1.9.4" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ad9fdbb69badc8916db738c25efd04f0a65297d26c2f8de4b62e57b8c12bc72" checksum = "062b87e45d8f26714eacfaef0ed9a583e2bfd50ebd96bdd3c200733bd5758e2c"
dependencies = [ dependencies = [
"rustversion", "rustversion",
"serde", "serde",
@@ -2707,21 +2715,21 @@ dependencies = [
[[package]] [[package]]
name = "serde_with_macros" name = "serde_with_macros"
version = "1.4.2" version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1569374bd54623ec8bd592cf22ba6e03c0f177ff55fbc8c29a49e296e7adecf" checksum = "98c1fcca18d55d1763e1c16873c4bde0ac3ef75179a28c7b372917e0494625be"
dependencies = [ dependencies = [
"darling", "darling",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
name = "serde_yaml" name = "serde_yaml"
version = "0.8.19" version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6375dbd828ed6964c3748e4ef6d18e7a175d408ffe184bca01698d0c73f915a9" checksum = "ad104641f3c958dab30eb3010e834c2622d1f3f4c530fef1dee20ad9485f3c09"
dependencies = [ dependencies = [
"dtoa", "dtoa",
"indexmap", "indexmap",
@@ -2731,13 +2739,13 @@ dependencies = [
[[package]] [[package]]
name = "sha-1" name = "sha-1"
version = "0.9.7" version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
dependencies = [ dependencies = [
"block-buffer", "block-buffer",
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cpufeatures 0.1.5", "cpufeatures",
"digest", "digest",
"opaque-debug", "opaque-debug",
] ]
@@ -2750,13 +2758,13 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.9.5" version = "0.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" checksum = "91e36fa7752016a6c4483706d634fd82c48860dd2df17a0cfaaebc714f23b2dd"
dependencies = [ dependencies = [
"block-buffer", "block-buffer",
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cpufeatures 0.1.5", "cpufeatures",
"digest", "digest",
"opaque-debug", "opaque-debug",
] ]
@@ -2807,9 +2815,9 @@ dependencies = [
[[package]] [[package]]
name = "siphasher" name = "siphasher"
version = "0.3.6" version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "729a25c17d72b06c68cb47955d44fda88ad2d3e7d77e025663fdd69b93dd71a1" checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b"
[[package]] [[package]]
name = "slab" name = "slab"
@@ -2841,13 +2849,13 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]] [[package]]
name = "sqlformat" name = "sqlformat"
version = "0.1.6" version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d86e3c77ff882a828346ba401a7ef4b8e440df804491c6064fe8295765de71c" checksum = "684001e7985ec1a9a66963b77ed151ef22a7876b3fdd7e37a57ec774f54b7d96"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"maplit", "maplit",
"nom 6.1.2", "nom 7.0.0",
"regex", "regex",
"unicode_categories", "unicode_categories",
] ]
@@ -2920,14 +2928,14 @@ dependencies = [
"heck", "heck",
"hex", "hex",
"once_cell", "once_cell",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"sqlx-core", "sqlx-core",
"sqlx-rt", "sqlx-rt",
"syn 1.0.75", "syn 1.0.76",
"url", "url",
] ]
@@ -2938,7 +2946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14302b678d9c76b28f2e60115211e25e0aabc938269991745a169753dc00e35c" checksum = "14302b678d9c76b28f2e60115211e25e0aabc938269991745a169753dc00e35c"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-rustls", "tokio-rustls",
] ]
@@ -2977,11 +2985,11 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"serde", "serde",
"serde_derive", "serde_derive",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -2991,13 +2999,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
dependencies = [ dependencies = [
"base-x", "base-x",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"sha1", "sha1",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -3059,11 +3067,11 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.75" version = "1.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"unicode-xid 0.2.2", "unicode-xid 0.2.2",
] ]
@@ -3074,9 +3082,9 @@ version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
"unicode-xid 0.2.2", "unicode-xid 0.2.2",
] ]
@@ -3153,22 +3161,22 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.26" version = "1.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.26" version = "1.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -3225,10 +3233,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"standback", "standback",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -3269,9 +3277,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.10.1" version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92036be488bb6594459f2e03b60e42df6f937fe6ca5c5ffdcb539c6b84dc40f5" checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"bytes 1.1.0", "bytes 1.1.0",
@@ -3297,7 +3305,7 @@ dependencies = [
"once_cell", "once_cell",
"pin-project-lite 0.2.7", "pin-project-lite 0.2.7",
"tokio 0.2.25", "tokio 0.2.25",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-stream", "tokio-stream",
] ]
@@ -3307,9 +3315,9 @@ 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 = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
@@ -3319,7 +3327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [ dependencies = [
"native-tls", "native-tls",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -3329,7 +3337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [ dependencies = [
"rustls", "rustls",
"tokio 1.10.1", "tokio 1.11.0",
"webpki", "webpki",
] ]
@@ -3342,7 +3350,7 @@ dependencies = [
"either", "either",
"futures-util", "futures-util",
"thiserror", "thiserror",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -3353,21 +3361,20 @@ checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"pin-project-lite 0.2.7", "pin-project-lite 0.2.7",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-util", "tokio-util",
] ]
[[package]] [[package]]
name = "tokio-tar" name = "tokio-tar"
version = "0.3.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/dr-bonez/tokio-tar.git#071db00962a66f8552d418d60be7bdf1c8ed8216"
checksum = "a50188549787c32c1c3d9c8c71ad7e003ccf2f102489c5a96e385c84760477f4"
dependencies = [ dependencies = [
"filetime", "filetime",
"futures-core", "futures-core",
"libc", "libc",
"redox_syscall 0.2.10", "redox_syscall 0.2.10",
"tokio 1.10.1", "tokio 1.11.0",
"tokio-stream", "tokio-stream",
"xattr", "xattr",
] ]
@@ -3381,22 +3388,22 @@ dependencies = [
"futures-util", "futures-util",
"log", "log",
"pin-project", "pin-project",
"tokio 1.10.1", "tokio 1.11.0",
"tungstenite", "tungstenite",
] ]
[[package]] [[package]]
name = "tokio-util" name = "tokio-util"
version = "0.6.7" version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd"
dependencies = [ dependencies = [
"bytes 1.1.0", "bytes 1.1.0",
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"log", "log",
"pin-project-lite 0.2.7", "pin-project-lite 0.2.7",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -3411,7 +3418,7 @@ dependencies = [
[[package]] [[package]]
name = "torut" name = "torut"
version = "0.1.10" version = "0.1.10"
source = "git+https://github.com/Start9Labs/torut.git?branch=update/dependencies#001cb18a1a2651d8b12dbf02afaaa80297eb8ec7" source = "git+https://github.com/Start9Labs/torut.git?branch=update/dependencies#d5156c6740ce8d720e0c17a6dfe5c756c2867abb"
dependencies = [ dependencies = [
"base32", "base32",
"base64", "base64",
@@ -3426,7 +3433,7 @@ dependencies = [
"sha1", "sha1",
"sha2", "sha2",
"sha3", "sha3",
"tokio 1.10.1", "tokio 1.11.0",
] ]
[[package]] [[package]]
@@ -3492,20 +3499,20 @@ dependencies = [
[[package]] [[package]]
name = "typed-builder" name = "typed-builder"
version = "0.9.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "345426c7406aa355b60c5007c79a2d1f5b605540072795222f17f6443e6a9c6f" checksum = "a46ee5bd706ff79131be9c94e7edcb82b703c487766a114434e5790361cf08c5"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
] ]
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.13.0" version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec"
[[package]] [[package]]
name = "ucd-trie" name = "ucd-trie"
@@ -3634,9 +3641,9 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.76" version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" checksum = "5e68338db6becec24d3c7977b5bf8a48be992c934b5d07177e3931f5dc9b076c"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"serde", "serde",
@@ -3646,24 +3653,24 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.76" version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" checksum = "f34c405b4f0658583dba0c1c7c9b694f3cac32655db463b56c254a1c75269523"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log", "log",
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
[[package]] [[package]]
name = "wasm-bindgen-futures" name = "wasm-bindgen-futures"
version = "0.4.26" version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95fded345a6559c2cfee778d562300c581f7d4ff3edb9b0d230d69800d213972" checksum = "a87d738d4abc4cf22f6eb142f5b9a81301331ee3c767f2fef2fda4e325492060"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"js-sys", "js-sys",
@@ -3673,9 +3680,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.76" version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" checksum = "b9d5a6580be83b19dc570a8f9c324251687ab2184e57086f71625feb57ec77c8"
dependencies = [ dependencies = [
"quote 1.0.9", "quote 1.0.9",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@@ -3683,28 +3690,28 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.76" version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" checksum = "e3775a030dc6f5a0afd8a84981a21cc92a781eb429acef9ecce476d0c9113e92"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.76" version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" checksum = "c279e376c7a8e8752a8f1eaa35b7b0bee6bb9fb0cdacfa97cc3f1f289c87e2b4"
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.53" version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c" checksum = "0a84d70d1ec7d2da2d26a5bd78f4bca1b8c3254805363ce743b7a05bc30d195a"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",
@@ -3837,8 +3844,8 @@ 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 = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1"
dependencies = [ dependencies = [
"proc-macro2 1.0.28", "proc-macro2 1.0.29",
"quote 1.0.9", "quote 1.0.9",
"syn 1.0.75", "syn 1.0.76",
"synstructure", "synstructure",
] ]

View File

@@ -108,7 +108,7 @@ thiserror = "1.0.24"
tokio = { version = "1.8.1", features = ["full"] } tokio = { version = "1.8.1", features = ["full"] }
tokio-compat-02 = "0.2.0" tokio-compat-02 = "0.2.0"
tokio-stream = { version = "0.1.5", features = ["io-util", "sync"] } tokio-stream = { version = "0.1.5", features = ["io-util", "sync"] }
tokio-tar = "0.3.0" tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" }
tokio-tungstenite = "0.14.0" tokio-tungstenite = "0.14.0"
tokio-util = { version = "0.6.6", features = ["io"] } tokio-util = { version = "0.6.6", features = ["io"] }
torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" } torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" }

View File

@@ -31,6 +31,7 @@ use crate::s9pk::manifest::{Manifest, PackageId};
use crate::s9pk::reader::S9pkReader; use crate::s9pk::reader::S9pkReader;
use crate::status::{DependencyErrors, MainStatus, Status}; use crate::status::{DependencyErrors, MainStatus, Status};
use crate::util::{display_none, AsyncFileExt, Version}; use crate::util::{display_none, AsyncFileExt, Version};
use crate::volume::asset_dir;
use crate::{Error, ResultExt}; use crate::{Error, ResultExt};
pub mod cleanup; pub mod cleanup;
@@ -186,108 +187,47 @@ pub async fn download_install_s9pk(
let progress = InstallProgress::new(s9pk.content_length()); let progress = InstallProgress::new(s9pk.content_length());
let progress_model = pkg_data_entry.and_then(|pde| pde.install_progress()); let progress_model = pkg_data_entry.and_then(|pde| pde.install_progress());
async fn check_cache( File::delete(&pkg_cache).await?;
pkg_id: &PackageId, let mut dst = OpenOptions::new()
version: &Version, .create(true)
pkg_cache: &Path, .write(true)
headers: &HeaderMap, .read(true)
progress: &Arc<InstallProgress>, .open(&pkg_cache)
model: OptionModel<InstallProgress>, .await?;
ctx: &RpcContext,
) -> Option<S9pkReader<InstallProgressTracker<File>>> {
fn warn_ok<T, E: Display>(
pkg_id: &PackageId,
version: &Version,
res: Result<T, E>,
) -> Option<T> {
match res {
Ok(a) => Some(a),
Err(e) => {
log::warn!(
"Install {}@{}: Could not open cache: {}",
pkg_id,
version,
e
);
None
}
}
}
let hash = headers.get("x-s9pk-hash")?;
let file = warn_ok(pkg_id, version, File::maybe_open(&pkg_cache).await)??;
let progress_reader = InstallProgressTracker::new(file, progress.clone());
let rdr = warn_ok(
pkg_id,
version,
progress
.track_read_during(model, &ctx.db, || S9pkReader::from_reader(progress_reader))
.await,
)?;
if hash.as_bytes() == rdr.hash_str().as_bytes() {
Some(rdr)
} else {
None
}
}
let cached = check_cache(
pkg_id,
version,
&pkg_cache,
s9pk.headers(),
&progress,
progress_model.clone(),
&ctx,
)
.await;
let mut s9pk_reader = if let Some(cached) = cached { progress
progress.download_complete(); .track_download_during(progress_model.clone(), &ctx.db, || async {
progress_model.put(&mut ctx.db.handle(), &progress).await?; let mut progress_writer = InstallProgressTracker::new(&mut dst, progress.clone());
cached tokio::io::copy(
} else { &mut tokio_util::io::StreamReader::new(s9pk.bytes_stream().map_err(|e| {
File::delete(&pkg_cache).await?; std::io::Error::new(
let mut dst = OpenOptions::new() if e.is_connect() {
.create(true) std::io::ErrorKind::ConnectionRefused
.write(true) } else if e.is_timeout() {
.read(true) std::io::ErrorKind::TimedOut
.open(&pkg_cache) } else {
std::io::ErrorKind::Other
},
e,
)
})),
&mut progress_writer,
)
.await?; .await?;
progress.download_complete();
Ok(())
})
.await?;
progress dst.seek(SeekFrom::Start(0)).await?;
.track_download_during(progress_model.clone(), &ctx.db, || async {
let mut progress_writer =
InstallProgressTracker::new(&mut dst, progress.clone());
tokio::io::copy(
&mut tokio_util::io::StreamReader::new(s9pk.bytes_stream().map_err(|e| {
std::io::Error::new(
if e.is_connect() {
std::io::ErrorKind::ConnectionRefused
} else if e.is_timeout() {
std::io::ErrorKind::TimedOut
} else {
std::io::ErrorKind::Other
},
e,
)
})),
&mut progress_writer,
)
.await?;
progress.download_complete();
Ok(())
})
.await?;
dst.seek(SeekFrom::Start(0)).await?; let progress_reader = InstallProgressTracker::new(dst, progress.clone());
let mut s9pk_reader = progress
.track_read_during(progress_model.clone(), &ctx.db, || {
S9pkReader::from_reader(progress_reader)
})
.await?;
let progress_reader = InstallProgressTracker::new(dst, progress.clone());
let rdr = progress
.track_read_during(progress_model.clone(), &ctx.db, || {
S9pkReader::from_reader(progress_reader)
})
.await?;
rdr
};
install_s9pk(&ctx, pkg_id, version, &mut s9pk_reader, progress).await?; install_s9pk(&ctx, pkg_id, version, &mut s9pk_reader, progress).await?;
Ok(()) Ok(())
@@ -512,7 +452,18 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
log::info!("Install {}@{}: Unpacked Docker Images", pkg_id, version,); log::info!("Install {}@{}: Unpacked Docker Images", pkg_id, version,);
log::info!("Install {}@{}: Unpacking Assets", pkg_id, version); log::info!("Install {}@{}: Unpacking Assets", pkg_id, version);
// TODO progress
.track_read_during(progress_model.clone(), &ctx.db, || async {
let asset_dir = asset_dir(ctx, pkg_id, version);
if tokio::fs::metadata(&asset_dir).await.is_err() {
tokio::fs::create_dir_all(&asset_dir).await?;
}
let mut tar = tokio_tar::Archive::new(rdr.assets().await?);
tar.unpack(asset_dir).await?;
Ok(())
})
.await?;
log::info!("Install {}@{}: Unpacked Assets", pkg_id, version); log::info!("Install {}@{}: Unpacked Assets", pkg_id, version);
progress.unpack_complete.store(true, Ordering::SeqCst); progress.unpack_complete.store(true, Ordering::SeqCst);

View File

@@ -103,7 +103,7 @@ impl<
length: new_pos - position, length: new_pos - position,
}; };
position = new_pos; position = new_pos;
// docker_images // assets
std::io::copy(&mut self.assets, &mut writer) std::io::copy(&mut self.assets, &mut writer)
.with_ctx(|_| (crate::ErrorKind::Filesystem, "Copying Assets"))?; .with_ctx(|_| (crate::ErrorKind::Filesystem, "Copying Assets"))?;
let new_pos = writer.stream_position()?; let new_pos = writer.stream_position()?;

View File

@@ -132,6 +132,14 @@ impl HasModel for Volumes {
type Model = MapModel<Self>; type Model = MapModel<Self>;
} }
pub fn asset_dir(ctx: &RpcContext, pkg_id: &PackageId, version: &Version) -> PathBuf {
ctx.datadir
.join(PKG_VOLUME_DIR)
.join(pkg_id)
.join("assets")
.join(version.as_str())
}
#[derive(Clone, Debug, Deserialize, Serialize, HasModel)] #[derive(Clone, Debug, Deserialize, Serialize, HasModel)]
#[serde(tag = "type")] #[serde(tag = "type")]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
@@ -184,15 +192,9 @@ impl Volume {
.datadir .datadir
.join(PKG_VOLUME_DIR) .join(PKG_VOLUME_DIR)
.join(pkg_id) .join(pkg_id)
.join("volumes") .join("data")
.join(volume_id),
Volume::Assets {} => ctx
.datadir
.join(PKG_VOLUME_DIR)
.join(pkg_id)
.join("assets")
.join(version.as_str())
.join(volume_id), .join(volume_id),
Volume::Assets {} => asset_dir(ctx, pkg_id, version).join(volume_id),
Volume::Pointer { Volume::Pointer {
package_id, package_id,
volume_id, volume_id,
@@ -202,7 +204,7 @@ impl Volume {
.datadir .datadir
.join(PKG_VOLUME_DIR) .join(PKG_VOLUME_DIR)
.join(package_id) .join(package_id)
.join("volumes") .join("data")
.join(volume_id) .join(volume_id)
.join(if path.is_absolute() { .join(if path.is_absolute() {
path.strip_prefix("/").unwrap() path.strip_prefix("/").unwrap()