From 47501469fd9d56ffad3100734275a267e0d0ddc4 Mon Sep 17 00:00:00 2001 From: schristoff <28318173+schristoff@users.noreply.github.com> Date: Wed, 15 May 2024 15:13:08 -0600 Subject: [PATCH 1/2] bug: fix rust injector Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com> --- .github/actions/k3d/action.yaml | 4 +- .github/workflows/build-rust-injector.yml | 3 +- src/injector/.cargo/config.toml | 5 + src/injector/Cargo.lock | 1033 ++++++++++----------- src/injector/Cargo.toml | 12 +- src/injector/Makefile | 23 + src/injector/README.md | 86 ++ src/injector/src/main.rs | 210 +++-- src/pkg/cluster/injector.go | 11 +- zarf-config.toml | 7 +- 10 files changed, 784 insertions(+), 610 deletions(-) create mode 100644 src/injector/.cargo/config.toml diff --git a/.github/actions/k3d/action.yaml b/.github/actions/k3d/action.yaml index c6bfb5e92a..951caf7756 100644 --- a/.github/actions/k3d/action.yaml +++ b/.github/actions/k3d/action.yaml @@ -7,5 +7,5 @@ runs: - run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash" shell: bash - - run: k3d cluster delete && k3d cluster create --k3s-arg="--disable=traefik@server:0" --image="rancher/k3s:v1.28.4-k3s2" - shell: bash + - run: k3d cluster delete && k3d cluster create --k3s-arg="--disable=traefik@server:0" + shell: bash \ No newline at end of file diff --git a/.github/workflows/build-rust-injector.yml b/.github/workflows/build-rust-injector.yml index 375dc62bb3..270a091fcf 100644 --- a/.github/workflows/build-rust-injector.yml +++ b/.github/workflows/build-rust-injector.yml @@ -27,8 +27,9 @@ jobs: - name: "Build Rust Binary for x86_64 and arm64" run: | + cd src/injector make build-injector-linux - cd src/injector/target + cd target mkdir -p ../dist cp x86_64-unknown-linux-musl/release/zarf-injector ../dist/zarf-injector-amd64 cp aarch64-unknown-linux-musl/release/zarf-injector ../dist/zarf-injector-arm64 diff --git a/src/injector/.cargo/config.toml b/src/injector/.cargo/config.toml new file mode 100644 index 0000000000..d5bd8214f3 --- /dev/null +++ b/src/injector/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.x86_64-unknown-linux-musl] +rustflags = ["-C", "relocation-model=static", "-C", "strip=symbols"] + +[target.aarch64-unknown-linux-musl] +rustflags = ["-C", "relocation-model=static", "-C", "strip=symbols"] diff --git a/src/injector/Cargo.lock b/src/injector/Cargo.lock index 04aa2408f3..4915654980 100644 --- a/src/injector/Cargo.lock +++ b/src/injector/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -9,53 +18,86 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "adler32" -version = "1.2.0" +name = "async-trait" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "alloc-no-stdlib" -version = "2.0.4" +name = "axum" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] [[package]] -name = "alloc-stdlib" -version = "0.2.2" +name = "axum-core" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ - "alloc-no-stdlib", + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "android_system_properties" -version = "0.1.5" +name = "backtrace" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] -[[package]] -name = "ascii" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "bitflags" version = "1.3.2" @@ -63,56 +105,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.2" +name = "bitflags" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] -name = "buf_redux" -version = "0.8.4" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "memchr", - "safemem", + "generic-array", ] [[package]] -name = "bumpalo" -version = "3.11.1" +name = "bytes" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cfg-if" @@ -120,122 +137,34 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" -dependencies = [ - "iana-time-zone", - "num-integer", - "num-traits", - "winapi", -] - -[[package]] -name = "chunked_transfer" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] -[[package]] -name = "cxx" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.103", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.103", -] - -[[package]] -name = "deflate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" -dependencies = [ - "adler32", - "gzip-header", -] - [[package]] name = "digest" version = "0.10.7" @@ -247,24 +176,25 @@ dependencies = [ ] [[package]] -name = "fastrand" -version = "1.8.0" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "instant", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "filetime" -version = "0.2.15" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", "redox_syscall", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -277,404 +207,373 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] -name = "generic-array" -version = "0.14.5" +name = "futures-channel" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ - "typenum", - "version_check", + "futures-core", ] [[package]] -name = "getrandom" -version = "0.2.8" +name = "futures-core" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "glob" -version = "0.3.1" +name = "futures-sink" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] -name = "gzip-header" -version = "1.0.0" +name = "futures-task" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ - "crc32fast", + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "libc", + "typenum", + "version_check", ] [[package]] -name = "hex" -version = "0.4.3" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] -name = "httparse" -version = "1.8.0" +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "httpdate" -version = "1.0.2" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "iana-time-zone" -version = "0.1.51" +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ - "cxx", - "cxx-build", + "bytes", + "http", ] [[package]] -name = "idna" -version = "0.3.0" +name = "http-body-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", ] [[package]] -name = "instant" -version = "0.1.12" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "itoa" -version = "1.0.4" +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "js-sys" -version = "0.3.60" +name = "hyper" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ - "wasm-bindgen", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", ] [[package]] -name = "libc" -version = "0.2.148" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" - -[[package]] -name = "link-cplusplus" -version = "1.0.7" +name = "hyper-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ - "cc", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", ] [[package]] -name = "log" -version = "0.4.17" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] -name = "memchr" -version = "2.5.0" +name = "libc" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "mime" -version = "0.3.16" +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] -name = "mime_guess" -version = "2.0.4" +name = "log" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "matchit" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] -name = "multipart" -version = "0.18.0" +name = "memchr" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" -dependencies = [ - "buf_redux", - "httparse", - "log", - "mime", - "mime_guess", - "quick-error", - "rand", - "safemem", - "tempfile", - "twoway", -] +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] -name = "num-integer" -version = "0.1.45" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "num-traits" -version = "0.2.15" +name = "miniz_oxide" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ - "autocfg", + "adler", ] [[package]] -name = "num_cpus" -version = "1.13.1" +name = "mio" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ - "hermit-abi", "libc", + "wasi", + "windows-sys 0.48.0", ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "libc", + "memchr", ] [[package]] name = "once_cell" -version = "1.15.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "ppv-lite86" -version = "0.2.16" +name = "pin-project" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] [[package]] -name = "proc-macro2" -version = "1.0.78" +name = "pin-project-internal" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ - "unicode-ident", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "quick-error" -version = "1.2.3" +name = "pin-project-lite" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] -name = "quote" -version = "1.0.35" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "rand" -version = "0.8.5" +name = "proc-macro2" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ - "libc", - "rand_chacha", - "rand_core", + "unicode-ident", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "quote" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "ppv-lite86", - "rand_core", + "proc-macro2", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "redox_syscall" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "getrandom", + "bitflags 1.3.2", ] [[package]] -name = "redox_syscall" -version = "0.2.10" +name = "regex-lite" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] -name = "rouille" -version = "3.6.2" +name = "rustix" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3716fbf57fc1084d7a706adf4e445298d123e4a44294c4e8213caf1b85fcc921" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "base64", - "brotli", - "chrono", - "deflate", - "filetime", - "multipart", - "percent-encoding", - "rand", - "serde", - "serde_derive", - "serde_json", - "sha1_smol", - "threadpool", - "time", - "tiny_http", - "url", + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] -name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] -name = "safemem" -version = "0.3.3" +name = "rustversion" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] -name = "scratch" -version = "1.0.2" +name = "ryu" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -682,10 +581,26 @@ dependencies = [ ] [[package]] -name = "sha1_smol" -version = "1.0.0" +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] [[package]] name = "sha2" @@ -699,27 +614,44 @@ dependencies = [ ] [[package]] -name = "syn" -version = "1.0.103" +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "syn" -version = "2.0.48" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "tar" version = "0.4.40" @@ -732,259 +664,278 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.3.0" +name = "tokio" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ - "cfg-if", - "fastrand", + "backtrace", "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", ] [[package]] -name = "termcolor" -version = "1.1.3" +name = "tokio-macros" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "winapi-util", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "threadpool" -version = "1.8.1" +name = "tokio-util" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "num_cpus", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] -name = "time" -version = "0.3.16" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "libc", - "num_threads", - "serde", - "time-core", + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "time-core" -version = "0.1.0" +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "tiny_http" -version = "0.12.0" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "ascii", - "chunked_transfer", - "httpdate", "log", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "tinyvec_macros", + "once_cell", ] [[package]] -name = "tinyvec_macros" -version = "0.1.0" +name = "typenum" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] -name = "twoway" -version = "0.1.8" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" -dependencies = [ - "memchr", -] +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "typenum" -version = "1.15.0" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "unicase" -version = "2.6.0" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "version_check", + "windows-targets 0.48.5", ] [[package]] -name = "unicode-bidi" -version = "0.3.8" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] [[package]] -name = "unicode-ident" -version = "1.0.5" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] [[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "windows-targets" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "tinyvec", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] -name = "unicode-width" -version = "0.1.10" +name = "windows_aarch64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "url" -version = "2.3.1" +name = "windows_aarch64_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] -name = "version_check" -version = "0.9.4" +name = "windows_aarch64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "windows_aarch64_msvc" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] -name = "wasm-bindgen" -version = "0.2.83" +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" +name = "windows_i686_gnu" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.103", - "wasm-bindgen-shared", -] +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" +name = "windows_i686_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.103", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" +name = "windows_i686_msvc" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] -name = "winapi" -version = "0.3.9" +name = "windows_x86_64_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_gnu" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] -name = "winapi-util" -version = "0.1.5" +name = "windows_x86_64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "xattr" -version = "1.0.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] name = "zarf-injector" version = "0.5.0" dependencies = [ + "axum", "flate2", "glob", "hex", - "rouille", + "regex-lite", "serde_json", "sha2", "tar", + "tokio", + "tokio-util", ] diff --git a/src/injector/Cargo.toml b/src/injector/Cargo.toml index fb671ca2d5..050f6e314a 100644 --- a/src/injector/Cargo.toml +++ b/src/injector/Cargo.toml @@ -1,6 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: 2021-Present The Zarf Authors + [profile.release] opt-level = "z" # Optimize for size. lto = true @@ -8,6 +9,8 @@ codegen-units = 1 panic = "abort" strip = true + + [package] name = "zarf-injector" version = "0.5.0" @@ -20,6 +23,9 @@ glob = "0.3.1" flate2 = "1.0.28" tar = "0.4.40" sha2 = "0.10.8" -hex = "0.4.3" -rouille = "3.6.2" -serde_json = "1.0.113" +hex = {version = "0.4.3", default-features = false} +serde_json = { version = "1.0.113", default-features = false, features = ["alloc"] } +axum = {version = "0.7.5", features = ["tokio"]} +tokio = { version = "1.35.0", features = ["fs", "rt"] } +tokio-util = { version = "0.7.10", features = ["io"]} +regex-lite = "0.1.5" diff --git a/src/injector/Makefile b/src/injector/Makefile index a0ba3f467e..19e47d5869 100644 --- a/src/injector/Makefile +++ b/src/injector/Makefile @@ -10,6 +10,29 @@ help: ## Display this help information clean: ## Clean the build directory rm -rf target +cross-injector-linux: cross-injector-amd cross-injector-arm + +cross-injector-amd: + rustup target add x86_64-unknown-linux-musl + test -s x86_64-linux-musl-cross || curl https://zarf-public.s3-us-gov-west-1.amazonaws.com/pipelines/x86_64-linux-musl-cross.tgz | tar -xz + export PATH="$$PWD/x86_64-linux-musl-cross/bin:$$PATH" + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-cc + + cargo install cross --git https://github.com/cross-rs/cross + + cross build --target x86_64-unknown-linux-musl --release + + +cross-injector-arm: + rustup target add aarch64-unknown-linux-musl + test -s aarch64-linux-musl-cross || curl https://zarf-public.s3-us-gov-west-1.amazonaws.com/pipelines/aarch64-linux-musl-cross.tgz | tar -xz + export PATH="$$PWD/aarch64-linux-musl-cross/bin:$$PATH" + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-cc + + cross build --target aarch64-unknown-linux-musl --release + + + build-injector-linux: build-injector-linux-amd build-injector-linux-arm ## Build the Zarf injector for AMD64 and ARM64 build-injector-linux-amd: ## Build the Zarf injector for AMD64 diff --git a/src/injector/README.md b/src/injector/README.md index 0310ef0467..56ba9c51f2 100644 --- a/src/injector/README.md +++ b/src/injector/README.md @@ -1,3 +1,4 @@ + # zarf-injector > If using VSCode w/ the official Rust extension, make sure to open a new window in the `src/injector` directory to make `rust-analyzer` happy. @@ -37,6 +38,38 @@ Install [Rust](https://rustup.rs/) and `build-essential`. make build-injector-linux list-sizes ``` +## Building on Debian-based Systems + +Install [Rust](https://rustup.rs/) and `build-essential`. + +```bash +make build-injector-linux list-sizes +``` + +## Building on Apple Silicon + +* Install Cross +* Install Docker & have it running +* Rust must be installed via Rustup (Check `which rustc` if you're unsure) + +``` +cargo install cross --git https://github.com/cross-rs/cross +``` + +Whichever arch. of `musl` used, add to toolchain +``` +rustup toolchain install --force-non-host stable-x86_64-unknown-linux-musl +``` +``` +cross build --target x86_64-unknown-linux-musl --release + +cross build --target aarch64-unknown-linux-musl --release +``` + +This will build into `target/*--unknown-linux-musl/release` + + + ## Checking Binary Size Due to the ConfigMap size limit (1MiB for binary data), we need to make sure the binary is small enough to fit. @@ -54,3 +87,56 @@ Size of Zarf injector binaries: 840k target/x86_64-unknown-linux-musl/release/zarf-injector 713k target/aarch64-unknown-linux-musl/release/zarf-injector ``` + +```sh +$ make build-with-docker +... + +Size of Zarf injector binaries: + +840k target/x86_64-unknown-linux-musl/release/zarf-injector +713k target/aarch64-unknown-linux-musl/release/zarf-injector +``` + +## Testing your injector + +Build your injector by following the steps above, or running one of the following: +``` +make build-injector-linux + +## OR +## works on apple silicon +make cross-injector-linux + +``` + +Point the [zarf-registry/zarf.yaml](../../packages/zarf-registry/zarf.yaml) to +the locally built injector image. + +``` + files: + # Rust Injector Binary + - source: ../../src/injector/target/x86_64-unknown-linux-musl/release/zarf-injector + target: "###ZARF_TEMP###/zarf-injector" + + executable: true + + files: + # Rust Injector Binary + - source: ../../src/injector/target/aarch64-unknown-linux-musl/release/zarf-injector + target: "###ZARF_TEMP###/zarf-injector" + + executable: true +``` + +In Zarf Root Directory, run: +``` +zarf tools clear-cache +make clean +make && make init-package +``` + +If you are running on an Apple Silicon, add the `ARCH` flag: `make init-package ARCH=arm64` + +This builds all artifacts within the `/build` directory. Running `zarf init` would look like: +`.build/zarf-mac-apple init --components git-server -l trace` diff --git a/src/injector/src/main.rs b/src/injector/src/main.rs index cf8526e5bb..19187484d8 100644 --- a/src/injector/src/main.rs +++ b/src/injector/src/main.rs @@ -7,16 +7,28 @@ use std::fs::File; use std::io; use std::io::Read; use std::io::Write; -use std::path::{Path, PathBuf}; - +use std::path::PathBuf; + +use axum::{ + body::Body, + extract::Path, + http::StatusCode, + response::{IntoResponse, Response}, + routing::get, + Router, +}; use flate2::read::GzDecoder; use glob::glob; use hex::ToHex; -use rouille::{accept, router, Request, Response}; +use regex_lite::Regex; use serde_json::Value; use sha2::{Digest, Sha256}; use tar::Archive; +<<<<<<< HEAD +======= +use tokio_util::io::ReaderStream; +>>>>>>> c0b58b2b (bug: fix rust injector) const OCI_MIME_TYPE: &str = "application/vnd.oci.image.manifest.v1+json"; // Reads the binary contents of a file @@ -93,33 +105,44 @@ fn unpack(sha_sum: &String) { /// index.json - the image index /// blobs/sha256/ - the image layers /// oci-layout - the OCI image layout -fn start_seed_registry() { - let root = PathBuf::from("/zarf-seed"); - println!("Starting seed registry at {} on port 5000", root.display()); - rouille::start_server("0.0.0.0:5000", move |request| { - rouille::log(request, io::stdout(), || { - router!(request, - (GET) (/v2/) => { - // returns empty json w/ Docker-Distribution-Api-Version header set - Response::text("{}") - .with_unique_header("Content-Type", "application/json; charset=utf-8") - .with_additional_header("Docker-Distribution-Api-Version", "registry/2.0") - .with_additional_header("X-Content-Type-Options", "nosniff") - }, - - _ => { - handle_request(&root, &request) - } - ) - }) - }); +fn start_seed_registry() -> Router { + // The name and reference parameter identify the image + // The reference may include a tag or digest. + Router::new() + .route("/v2/*path", get(handler)) + .route( + "/v2/", + get(|| async { + Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json; charset=utf-8") + .header("Docker-Distribution-Api-Version", "registry/2.0") + .header("X-Content-Type-Options", "nosniff") + .body(Body::empty()) + .unwrap() + }), + ) + .route( + "/v2", + get(|| async { + Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json; charset=utf-8") + .header("Docker-Distribution-Api-Version", "registry/2.0") + .header("X-Content-Type-Options", "nosniff") + .body(Body::empty()) + .unwrap() + }), + ) } -fn handle_request(root: &Path, request: &Request) -> Response { - let url = request.url(); - let url_segments: Vec<_> = url.split("/").collect(); - let url_seg_len = url_segments.len(); +async fn handler(Path(path): Path) -> Response { + println!("request: {}", path); + let path = &path; + let manifest = Regex::new("(.+)/manifests/(.+)").unwrap(); + let blob = Regex::new(".+/([^/]+)").unwrap(); +<<<<<<< HEAD if url_seg_len >= 4 && url_segments[1] == "v2" { let tag_index = url_seg_len - 1; let object_index = url_seg_len - 2; @@ -151,25 +174,42 @@ fn handle_request(root: &Path, request: &Request) -> Response { let digest = url_segments[tag_index].to_owned(); return handle_get_digest(&root, &digest); } +======= + if manifest.is_match(path) { + let caps = manifest.captures(path).unwrap(); + let name = caps.get(1).unwrap().as_str().to_string(); + let reference = caps.get(2).unwrap().as_str().to_string(); + handle_get_manifest(name, reference).await + } else if blob.is_match(&path) { + let caps = blob.captures(path).unwrap(); + let tag = caps.get(1).unwrap().as_str().to_string(); + handle_get_digest(tag).await + } else { + Response::builder() + .status(StatusCode::NOT_FOUND) + .body(format!("Not Found")) + .unwrap() + .into_response() +>>>>>>> c0b58b2b (bug: fix rust injector) } - - Response::empty_404() } /// Handles the GET request for the manifest (only returns a OCI manifest regardless of Accept header) -fn handle_get_manifest(root: &Path, name: &String, tag: &String) -> Response { - let index = fs::read_to_string(root.join("index.json")).expect("read index.json"); +async fn handle_get_manifest(name: String, reference: String) -> Response { + let index = fs::read_to_string(PathBuf::from("/zarf-seed").join("index.json")) + .expect("index.json is read"); let json: Value = serde_json::from_str(&index).expect("unable to parse index.json"); - let mut sha_manifest = "".to_owned(); - if tag.starts_with("sha256:") { - sha_manifest = tag.strip_prefix("sha256:").unwrap().to_owned(); + let mut sha_manifest: String = "".to_owned(); + + if reference.starts_with("sha256:") { + sha_manifest = reference.strip_prefix("sha256:").unwrap().to_owned(); } else { for manifest in json["manifests"].as_array().unwrap() { let image_base_name = manifest["annotations"]["org.opencontainers.image.base.name"] .as_str() .unwrap(); - let requested_reference = name.to_owned() + ":" + tag; + let requested_reference = name.to_owned() + ":" + &reference; if requested_reference == image_base_name { sha_manifest = manifest["digest"] .as_str() @@ -180,6 +220,7 @@ fn handle_get_manifest(root: &Path, name: &String, tag: &String) -> Response { } } } +<<<<<<< HEAD if sha_manifest != "" { let file = File::open(&root.join("blobs").join("sha256").join(&sha_manifest)).unwrap(); @@ -190,36 +231,91 @@ fn handle_get_manifest(root: &Path, name: &String, tag: &String) -> Response { ) .with_additional_header("Etag", format!("sha256:{}", sha_manifest)) .with_additional_header("Docker-Distribution-Api-Version", "registry/2.0") +======= + if sha_manifest.is_empty() { + Response::builder() + .status(StatusCode::NOT_FOUND) + .body(format!("Not Found")) + .unwrap() + .into_response() +>>>>>>> c0b58b2b (bug: fix rust injector) } else { - Response::empty_404() + let file_path = PathBuf::from("/zarf-seed") + .to_owned() + .join("blobs") + .join("sha256") + .join(&sha_manifest); + match tokio::fs::File::open(&file_path).await { + Ok(file) => { + let metadata = match file.metadata().await { + Ok(meta) => meta, + Err(_) => { + return Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body("Failed to get file metadata".into()) + .unwrap() + } + }; + let stream = ReaderStream::new(file); + Response::builder() + .status(StatusCode::OK) + .header("Content-Type", OCI_MIME_TYPE) + .header("Content-Length", metadata.len()) + .header( + "Docker-Content-Digest", + format!("sha256:{}", sha_manifest.clone()), + ) + .header("Etag", format!("sha256:{}", sha_manifest)) + .header("Docker-Distribution-Api-Version", "registry/2.0") + .body(Body::from_stream(stream)) + .unwrap() + } + Err(err) => Response::builder() + .status(StatusCode::NOT_FOUND) + .body(format!("File not found: {}", err)) + .unwrap() + .into_response(), + } } } /// Handles the GET request for a blob -fn handle_get_digest(root: &Path, digest: &String) -> Response { - let blob_root = root.join("blobs").join("sha256"); - let path = blob_root.join(digest.strip_prefix("sha256:").unwrap()); - - let file = File::open(&path).unwrap(); - Response::from_file("application/octet-stream", file) - .with_additional_header("Docker-Content-Digest", digest.to_owned()) - .with_additional_header("Etag", digest.to_owned()) - .with_additional_header("Docker-Distribution-Api-Version", "registry/2.0") - .with_additional_header("Cache-Control", "max-age=31536000") +async fn handle_get_digest(tag: String) -> Response { + let blob_root = PathBuf::from("/zarf-seed").join("blobs").join("sha256"); + let path = blob_root.join(tag.strip_prefix("sha256:").unwrap()); + + match tokio::fs::File::open(&path).await { + Ok(file) => { + let stream = ReaderStream::new(file); + Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/octet-stream") + .header("Docker-Content-Digest", tag.to_owned()) + .header("Etag", tag.to_owned()) + .header("Docker-Distribution-Api-Version", "registry/2.0") + .header("Cache-Control", "max-age=31536000") + .body(Body::from_stream(stream)) + .unwrap() + } + Err(err) => Response::builder() + .status(StatusCode::NOT_FOUND) + .body(format!("File not found: {}", err)) + .unwrap() + .into_response(), + } } -fn main() { +#[tokio::main(flavor = "current_thread")] +async fn main() { let args: Vec = env::args().collect(); - match args.len() { - 2 => { - let payload_sha = &args[1]; - unpack(payload_sha); + println!("unpacking: {}", args[1]); + let payload_sha = &args[1]; - start_seed_registry(); - } - _ => { - println!("Usage: {} ", args[0]); - } - } + unpack(payload_sha); + + let listener = tokio::net::TcpListener::bind("0.0.0.0:5000").await.unwrap(); + println!("listening on {}", listener.local_addr().unwrap()); + axum::serve(listener, start_seed_registry()).await.unwrap(); + println!("Usage: {} ", args[1]); } diff --git a/src/pkg/cluster/injector.go b/src/pkg/cluster/injector.go index dd2a918f98..264a39648e 100644 --- a/src/pkg/cluster/injector.go +++ b/src/pkg/cluster/injector.go @@ -107,13 +107,17 @@ func (c *Cluster) StartInjectionMadness(ctx context.Context, tmpDir string, imag spinner.Updatef("Attempting to bootstrap with the %s/%s", node, image) // Make sure the pod is not there first - _ = c.DeletePod(ctx, ZarfNamespaceName, "injector") + err = c.DeletePod(ctx, ZarfNamespaceName, "injector") + if err != nil { + message.Debug("could not delete pod injector:", err) + } // Update the podspec image path and use the first node found + pod, err := c.buildInjectionPod(node[0], image, payloadConfigmaps, sha256sum) if err != nil { // Just debug log the output because failures just result in trying the next image - message.Debug(err) + message.Debug("error making injection pod:", err) continue } @@ -121,7 +125,7 @@ func (c *Cluster) StartInjectionMadness(ctx context.Context, tmpDir string, imag pod, err = c.CreatePod(ctx, pod) if err != nil { // Just debug log the output because failures just result in trying the next image - message.Debug(pod, err) + message.Debug("error creating pod in cluster:", pod, err) continue } @@ -265,6 +269,7 @@ func (c *Cluster) injectorIsReady(ctx context.Context, seedImages []transform.Im var resp *http.Response var err error err = tunnel.Wrap(func() error { + message.Debug("getting seed registry %v", seedRegistry) resp, err = http.Get(seedRegistry) return err }) diff --git a/zarf-config.toml b/zarf-config.toml index 19cefd4686..eb549dac54 100644 --- a/zarf-config.toml +++ b/zarf-config.toml @@ -5,9 +5,10 @@ agent_image = 'defenseunicorns/zarf/agent' agent_image_tag = 'local' # Tag for the zarf injector binary to use -injector_version = '2024-05-03' -injector_amd64_shasum = 'e5a3d380bac4bf6c68ba18275d6a92bb002e86c116eb364f960d393fd2f44da8' -injector_arm64_shasum = '866b5b1911dd920618be55164c4f95abe05753932ac6d0f2270d26e569d797a2' +injector_version = '2024-05-15' +injector_amd64_shasum = '1b34519ac30daf0e5a4a2f0a0766dbcd0852c0b5364b35576eea4ac9e22d9e82' +injector_arm64_shasum = 'ca20f427f9cf91ff42646a785c4772be5892a6752fa14924c5085b2d0109b008' + # The image reference to use for the registry that Zarf deploys into the cluster registry_image_domain = '' From fd6f64728456bf03af6e265da38c22504080c16c Mon Sep 17 00:00:00 2001 From: schristoff <28318173+schristoff@users.noreply.github.com> Date: Wed, 15 May 2024 15:27:27 -0600 Subject: [PATCH 2/2] clean up rebase Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com> --- src/injector/src/main.rs | 51 ---------------------------------------- 1 file changed, 51 deletions(-) diff --git a/src/injector/src/main.rs b/src/injector/src/main.rs index 19187484d8..e1b9cc3dc5 100644 --- a/src/injector/src/main.rs +++ b/src/injector/src/main.rs @@ -24,11 +24,7 @@ use regex_lite::Regex; use serde_json::Value; use sha2::{Digest, Sha256}; use tar::Archive; -<<<<<<< HEAD - -======= use tokio_util::io::ReaderStream; ->>>>>>> c0b58b2b (bug: fix rust injector) const OCI_MIME_TYPE: &str = "application/vnd.oci.image.manifest.v1+json"; // Reads the binary contents of a file @@ -142,39 +138,6 @@ async fn handler(Path(path): Path) -> Response { let manifest = Regex::new("(.+)/manifests/(.+)").unwrap(); let blob = Regex::new(".+/([^/]+)").unwrap(); -<<<<<<< HEAD - if url_seg_len >= 4 && url_segments[1] == "v2" { - let tag_index = url_seg_len - 1; - let object_index = url_seg_len - 2; - - let object_type = url_segments[object_index]; - - if object_type == "manifests" { - let tag_or_digest = url_segments[tag_index].to_owned(); - - let namespaced_name = url_segments[2..object_index].join("/"); - - // this route handles (GET) (/v2/**/manifests/) - if request.method() == "GET" { - return handle_get_manifest(&root, &namespaced_name, &tag_or_digest); - // this route handles (HEAD) (/v2/**/manifests/) - } else if request.method() == "HEAD" { - // a normal HEAD response has an empty body, but due to rouille not allowing for an override - // on Content-Length, we respond the same as a GET - return accept!( - request, - OCI_MIME_TYPE => { - handle_get_manifest(&root, &namespaced_name, &tag_or_digest) - }, - "*/*" => Response::empty_406() - ); - } - // this route handles (GET) (/v2/**/blobs/) - } else if object_type == "blobs" && request.method() == "GET" { - let digest = url_segments[tag_index].to_owned(); - return handle_get_digest(&root, &digest); - } -======= if manifest.is_match(path) { let caps = manifest.captures(path).unwrap(); let name = caps.get(1).unwrap().as_str().to_string(); @@ -190,7 +153,6 @@ async fn handler(Path(path): Path) -> Response { .body(format!("Not Found")) .unwrap() .into_response() ->>>>>>> c0b58b2b (bug: fix rust injector) } } @@ -220,25 +182,12 @@ async fn handle_get_manifest(name: String, reference: String) -> Response { } } } -<<<<<<< HEAD - - if sha_manifest != "" { - let file = File::open(&root.join("blobs").join("sha256").join(&sha_manifest)).unwrap(); - Response::from_file(OCI_MIME_TYPE, file) - .with_additional_header( - "Docker-Content-Digest", - format!("sha256:{}", sha_manifest.to_owned()), - ) - .with_additional_header("Etag", format!("sha256:{}", sha_manifest)) - .with_additional_header("Docker-Distribution-Api-Version", "registry/2.0") -======= if sha_manifest.is_empty() { Response::builder() .status(StatusCode::NOT_FOUND) .body(format!("Not Found")) .unwrap() .into_response() ->>>>>>> c0b58b2b (bug: fix rust injector) } else { let file_path = PathBuf::from("/zarf-seed") .to_owned()