diff --git a/.gitmodules b/.gitmodules index 58b8f04..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "ipxe/ipxe"] - path = ipxe/ipxe - url = git@github.com:rkubes/ipxe diff --git a/Cargo.lock b/Cargo.lock index 0cac29c..45b927e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anstream" version = "1.0.0" @@ -47,7 +53,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -58,7 +64,16 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "arc-swap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e" +dependencies = [ + "rustversion", ] [[package]] @@ -124,6 +139,29 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "aws-lc-rs" +version = "1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + [[package]] name = "axum" version = "0.8.9" @@ -188,6 +226,12 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64" version = "0.23.1" @@ -230,12 +274,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "build-print" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e6738dfb11354886f890621b4a34c0b177f75538023f7100b608ab9adbd66b" - [[package]] name = "bumpalo" version = "3.20.3" @@ -272,6 +310,23 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core", +] + [[package]] name = "clap" version = "4.6.7" @@ -321,12 +376,40 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" +[[package]] +name = "clru" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197fd99cb113a8d5d9b6376f3aa817f32c1078f2343b714fff7d2ca44fdf67d5" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -352,6 +435,30 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +dependencies = [ + "cfg-if", +] + [[package]] name = "crete" version = "0.1.3" @@ -362,7 +469,7 @@ dependencies = [ "clap", "clap_complete", "futures", - "gix-discover", + "gix-discover 0.56.0", "ipxe", "minijinja", "netascii", @@ -381,12 +488,76 @@ dependencies = [ "tokio", ] +[[package]] +name = "crossbeam" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e71406cd8807725f7ac2f999a4cdd32e98f829fdf65f528343cebf945e41df1e" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" +[[package]] +name = "dashmap" +version = "6.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "defmt" version = "0.3.100" @@ -427,6 +598,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "diffy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3dc2f773b6aaa63b1a7684b8589f670a8a0146a510b74d23a401c882364b49" +dependencies = [ + "hashbrown 0.17.1", +] + [[package]] name = "displaydoc" version = "0.2.7" @@ -438,6 +618,17 @@ dependencies = [ "syn 3.0.6", ] +[[package]] +name = "dua-core" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d687862f3206e7c660daeb6ab0200c65e58fccd7e508819e4bd9949304c640a8" +dependencies = [ + "crossbeam", + "libc", + "windows-sys 0.61.2", +] + [[package]] name = "dunce" version = "1.0.5" @@ -450,6 +641,20 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -463,7 +668,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -504,12 +709,34 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + [[package]] name = "find-msvc-tools" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "foreign-types" version = "0.3.2" @@ -534,6 +761,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.34" @@ -635,6 +868,19 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + [[package]] name = "getrandom" version = "0.4.3" @@ -642,8 +888,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", + "rand_core", + "wasm-bindgen", +] + +[[package]] +name = "gix" +version = "0.89.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2156d2e07fc3afa7632a82bf3cb0db91f995645a2852f642105c9ac9b52e1cb2" +dependencies = [ + "gix-actor 0.44.0", + "gix-attributes", + "gix-command", + "gix-commitgraph", + "gix-config", + "gix-credentials", + "gix-date 0.18.0", + "gix-diff", + "gix-dir", + "gix-discover 0.57.0", + "gix-error 0.5.1", + "gix-filter", + "gix-fs 0.24.0", + "gix-glob", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-ignore", + "gix-index", + "gix-lock 26.0.0", + "gix-negotiate", + "gix-note", + "gix-object 0.66.0", + "gix-odb", + "gix-pack", + "gix-parallel", + "gix-path 0.14.0", + "gix-pathspec", + "gix-prompt", + "gix-protocol", + "gix-quote", + "gix-ref 0.69.0", + "gix-refspec", + "gix-revision", + "gix-revwalk", + "gix-sec 0.16.0", + "gix-shallow", + "gix-status", + "gix-submodule", + "gix-tempfile 26.0.0", + "gix-trace 0.3.0", + "gix-transport", + "gix-traverse", + "gix-url", + "gix-utils 0.5.1", + "gix-validate 0.13.0", + "gix-worktree", + "gix-worktree-state", + "gix-worktree-stream", + "gix-zlib", + "nonempty", + "smallvec", ] [[package]] @@ -653,8 +961,135 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e046e9a929e8e1f40f9a34f736408c4c079f9cf004429f3e718d270e847be96" dependencies = [ "bstr", - "gix-date", - "gix-error", + "gix-date 0.17.0", + "gix-error 0.4.0", +] + +[[package]] +name = "gix-actor" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2127da41042965ed205568a52443465806944f71c8acd73f48ec94b8cd8e798e" +dependencies = [ + "bstr", + "gix-date 0.18.0", + "gix-error 0.5.1", +] + +[[package]] +name = "gix-attributes" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0feca0b8919aba9f123b75de54062dd61eb37d2a2130f34be520da6ed8b8ef72" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-glob", + "gix-parallel", + "gix-path 0.14.0", + "gix-quote", + "gix-trace 0.3.0", + "smallvec", + "unicode-bom", +] + +[[package]] +name = "gix-bitmap" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "408cb9e482e0dcc5fc481850556348dda6981ec054a4a8e81a8e1bbf84f85eef" +dependencies = [ + "gix-error 0.5.1", +] + +[[package]] +name = "gix-chunk" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626335faf30ed235744642c2309aa370683b8bb2757f1c22a807e274dff60074" +dependencies = [ + "gix-error 0.5.1", +] + +[[package]] +name = "gix-command" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac560c05e19455016a4a94b33a77debe59aaed8783da32a73d31c9975947152e" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-path 0.14.0", + "gix-quote", + "gix-trace 0.3.0", +] + +[[package]] +name = "gix-commitgraph" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfede9936d4b789867c09722576aea4ceb0e3aacf962eef035ebab0686b41a80" +dependencies = [ + "bstr", + "gix-chunk", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "memmap2", + "nonempty", +] + +[[package]] +name = "gix-config" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65a9c000fa9a9154f22ffc8f8d74426e9300d759c2029e8701e2ba39d5d464ea" +dependencies = [ + "bstr", + "gix-config-value", + "gix-error 0.5.1", + "gix-glob", + "gix-parallel", + "gix-path 0.14.0", + "gix-ref 0.69.0", + "gix-sec 0.16.0", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "smallvec", + "unicode-bom", +] + +[[package]] +name = "gix-config-value" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab206c2fccfd35e0de7fb1b424997cfd42912062c66dae024e08a06e22d46674" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-error 0.5.1", + "gix-path 0.14.0", + "gix-utils 0.5.1", + "libc", +] + +[[package]] +name = "gix-credentials" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba790d296ded4bcfe485f761a65b8659fcccad825ff59a3acc38578a86f812de" +dependencies = [ + "bstr", + "gix-command", + "gix-config-value", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-path 0.14.0", + "gix-prompt", + "gix-quote", + "gix-sec 0.16.0", + "gix-trace 0.3.0", + "gix-url", + "percent-encoding", ] [[package]] @@ -664,11 +1099,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb8beceb16a77fb222923592864b94beb4ad4c2b175a7055c2cac6815ee0370a" dependencies = [ "bstr", - "gix-error", + "gix-error 0.4.0", "itoa", "jiff", ] +[[package]] +name = "gix-date" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f7eeeecc599082f32b5ea6a8c4c734e38be9730e2c09e3fe2851bb4692393e9" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "itoa", + "jiff", +] + +[[package]] +name = "gix-diff" +version = "0.69.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa640963fdcbc6b4718e48593c3917f5ae764b59fb5a96313cb5a757246d041d" +dependencies = [ + "bstr", + "gix-attributes", + "gix-command", + "gix-error 0.5.1", + "gix-filter", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-imara-diff", + "gix-index", + "gix-object 0.66.0", + "gix-path 0.14.0", + "gix-pathspec", + "gix-tempfile 26.0.0", + "gix-trace 0.3.0", + "gix-traverse", + "gix-worktree", +] + +[[package]] +name = "gix-dir" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e916ef77f19161b738ae9913662bc36fed1e48256a943f40277b3a585841da" +dependencies = [ + "bstr", + "gix-discover 0.57.0", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-ignore", + "gix-index", + "gix-object 0.66.0", + "gix-path 0.14.0", + "gix-pathspec", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-worktree", +] + [[package]] name = "gix-discover" version = "0.56.0" @@ -677,11 +1168,26 @@ checksum = "4476ba055ec5fbb05f59dd98380b596428da060beac5f9dccd7374302ad1fbfb" dependencies = [ "bstr", "dunce", - "gix-error", - "gix-fs", - "gix-path", - "gix-ref", - "gix-sec", + "gix-error 0.4.0", + "gix-fs 0.23.0", + "gix-path 0.13.0", + "gix-ref 0.68.0", + "gix-sec 0.15.0", +] + +[[package]] +name = "gix-discover" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d0f8fd2c7e4b458eb3081362d49b54bd0131d23ecd49be802085a11f0d3cee" +dependencies = [ + "bstr", + "dunce", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-path 0.14.0", + "gix-ref 0.69.0", + "gix-sec 0.16.0", ] [[package]] @@ -693,20 +1199,50 @@ dependencies = [ "bstr", ] +[[package]] +name = "gix-error" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb3308a948a01b94ef13d9ee7a9b28c1303d8d9a9dc33b401ff40c2184d9e04a" +dependencies = [ + "bstr", +] + [[package]] name = "gix-features" version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb3a430dbc02d6c5e30a9f92083459593495ea22a476e837d248b22d800eed80" dependencies = [ - "gix-path", - "gix-trace", - "gix-utils", + "gix-path 0.13.0", + "gix-trace 0.2.0", + "gix-utils 0.4.0", "libc", "prodash", "walkdir", ] +[[package]] +name = "gix-filter" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d8d932ee4043f7d77d15ee58d2be2bc95accea5dd1d77fd145de1b7c504551b" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-object 0.66.0", + "gix-packetline", + "gix-path 0.14.0", + "gix-quote", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "smallvec", +] + [[package]] name = "gix-fs" version = "0.23.0" @@ -714,10 +1250,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0105ab1cef4542d092c27766d2daf1548fcbad7e460dc2208642c120bb19b3ad" dependencies = [ "bstr", - "gix-error", + "gix-error 0.4.0", "gix-features", - "gix-path", - "gix-utils", + "gix-path 0.13.0", + "gix-utils 0.4.0", +] + +[[package]] +name = "gix-fs" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a05d043e670c055cd8b53d078562dc0bc1e322bff6b0376b407d37cf72dcc5" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-parallel", + "gix-path 0.14.0", + "gix-utils 0.5.1", + "libc", + "walkdir", +] + +[[package]] +name = "gix-glob" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0d03ab50fa841621031960679caf7fe94940968d9a0736d12a580f2c03e525" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-fs 0.24.0", + "gix-path 0.14.0", + "gix-trace 0.3.0", + "gix-utils 0.5.1", ] [[package]] @@ -727,31 +1292,155 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a22b6febaaee8546eb0c9dd21ecdd93aca269a6cb3897e1250f0f60933c0174" dependencies = [ "faster-hex", - "gix-error", + "gix-error 0.4.0", "gix-features", "sha1dc", ] +[[package]] +name = "gix-hash" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ca156064e378d8c657084365846cedb8dc498c6ea4500965a64d74f12af2be" +dependencies = [ + "faster-hex", + "gix-error 0.5.1", + "gix-utils 0.5.1", + "sha1dc", +] + [[package]] name = "gix-hashtable" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55bff2f32f6f5a95bdd43e5e5e01b0656250cffbc48eda19db0afa3d73adf2f" dependencies = [ - "gix-hash", - "hashbrown", + "gix-hash 0.27.0", + "hashbrown 0.17.1", "parking_lot", ] +[[package]] +name = "gix-hashtable" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916cb6b2ec42ffaca624e7867bb382a4673015cb4ffcd7330b48085d02e4c615" +dependencies = [ + "gix-hash 0.28.0", + "hashbrown 0.17.1", + "parking_lot", +] + +[[package]] +name = "gix-ignore" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1c93f60845d493a72fde38ae237498bc4e4464f45afa4af23e53f8295a3ba1" +dependencies = [ + "bstr", + "gix-glob", + "gix-path 0.14.0", + "gix-trace 0.3.0", + "unicode-bom", +] + +[[package]] +name = "gix-imara-diff" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c48eccd894bd15555b0346470e63491ded94aefe76b3fcb1052084b5a393238" +dependencies = [ + "bstr", + "hashbrown 0.17.1", +] + +[[package]] +name = "gix-index" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6db8b20a3dba8836daf90b24199600bb27dcfce3a127ec24ae61e15a7c5b68" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "filetime", + "fnv", + "gix-bitmap", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-lock 26.0.0", + "gix-object 0.66.0", + "gix-parallel", + "gix-trace 0.3.0", + "gix-traverse", + "gix-utils 0.5.1", + "gix-validate 0.13.0", + "hashbrown 0.17.1", + "itoa", + "libc", + "memmap2", + "rustix", + "smallvec", +] + [[package]] name = "gix-lock" version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fd5ddfd0cc476fef744ac544783b96a9ff5d49f8de541e6e9d6d6002aa90720" dependencies = [ - "gix-error", - "gix-tempfile", - "gix-utils", + "gix-error 0.4.0", + "gix-tempfile 25.0.0", + "gix-utils 0.4.0", +] + +[[package]] +name = "gix-lock" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2f7f5bd6b9fcd0b0dc58b0e6a708f3a47c3313876571dfe800c926c069aa5c" +dependencies = [ + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-tempfile 26.0.0", + "gix-utils 0.5.1", +] + +[[package]] +name = "gix-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11f5429ca73cc3758c9f53af56a9fba100a8701c5b4bc30e29b8b0b15288991" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gix-negotiate" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ddfb0d6da849bd938d929336e07c1f26970d9f6ec59621df74ec3f79c128ea" +dependencies = [ + "bitflags 2.13.2", + "gix-commitgraph", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-object 0.66.0", + "gix-revwalk", +] + +[[package]] +name = "gix-note" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd364f8bdceaed9e7f3ae40f324b16e39f20e9c7e6a6a058f7c6ec66c3e6205c" +dependencies = [ + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-object 0.66.0", ] [[package]] @@ -761,18 +1450,112 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a72909eeeed845721a143ef3dbeb4d6cd5df79c839fe7eefc138cb4f982eba3e" dependencies = [ "bstr", - "gix-actor", - "gix-date", - "gix-error", + "gix-actor 0.43.0", + "gix-date 0.17.0", + "gix-error 0.4.0", "gix-features", - "gix-hash", - "gix-hashtable", - "gix-utils", - "gix-validate", + "gix-hash 0.27.0", + "gix-hashtable 0.17.0", + "gix-utils 0.4.0", + "gix-validate 0.12.0", "itoa", "smallvec", ] +[[package]] +name = "gix-object" +version = "0.66.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e38f50177e211642af154f9a7f710b7a3a637e635f9b6adb9d51973b0f9209" +dependencies = [ + "bstr", + "gix-actor 0.44.0", + "gix-command", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-path 0.14.0", + "gix-tempfile 26.0.0", + "gix-utils 0.5.1", + "gix-validate 0.13.0", + "itoa", + "smallvec", +] + +[[package]] +name = "gix-odb" +version = "0.86.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca444f33f2140876ed6b5313c2b550b4af699008193c96f3bff5023afa9ef4ea" +dependencies = [ + "arc-swap", + "crc32fast", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-object 0.66.0", + "gix-pack", + "gix-parallel", + "gix-path 0.14.0", + "gix-quote", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-zlib", + "memmap2", + "parking_lot", + "tempfile", +] + +[[package]] +name = "gix-pack" +version = "0.76.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5024cc503cd29461a705ae90b9eae772fa8f0e6fafc1c48513877dc374de05" +dependencies = [ + "clru", + "crc32fast", + "gix-chunk", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-object 0.66.0", + "gix-parallel", + "gix-path 0.14.0", + "gix-tempfile 26.0.0", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-zlib", + "memmap2", + "parking_lot", + "smallvec", +] + +[[package]] +name = "gix-packetline" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830e51b227f6a925fe9308858ac91170dd00fa2880f5480fc81e8a4594fe2c35" +dependencies = [ + "bstr", + "faster-hex", + "gix-error 0.5.1", + "gix-trace 0.3.0", +] + +[[package]] +name = "gix-parallel" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e994cf1eec247ba4be7f9e7c0d58cc73f83eecb5fcb9feb595df5ba3d2078546" +dependencies = [ + "crossbeam-channel", + "gix-trace 0.3.0", + "once_cell", + "parking_lot", +] + [[package]] name = "gix-path" version = "0.13.0" @@ -780,9 +1563,85 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd051ac60c5dbce2228daabf25b6a76408ac732d416c678cfa0a4914d13f60b8" dependencies = [ "bstr", - "gix-error", - "gix-trace", - "gix-validate", + "gix-error 0.4.0", + "gix-trace 0.2.0", + "gix-validate 0.12.0", +] + +[[package]] +name = "gix-path" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6d563d4d0c975ed0df4e853f9ec962a2ba46633b1d324e1a5582541fcae0c6b" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-trace 0.3.0", + "gix-validate 0.13.0", +] + +[[package]] +name = "gix-pathspec" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3b7f03e516a8435d18c3cc2d446925940c81d409145ac21edb5a576f0625e4" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-attributes", + "gix-config-value", + "gix-error 0.5.1", + "gix-glob", + "gix-path 0.14.0", +] + +[[package]] +name = "gix-prompt" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f26063489b415c40bd960ec488251d77d4cfe3cf5ca4331e2122c0c726bcc2d" +dependencies = [ + "gix-command", + "gix-config-value", + "gix-error 0.5.1", + "parking_lot", + "rustix", +] + +[[package]] +name = "gix-protocol" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "832b5dc46a3c0a6f6fa8f8e571c11074add4b545c6789799ae6d6c36ae1a294e" +dependencies = [ + "bstr", + "gix-credentials", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-lock 26.0.0", + "gix-macros", + "gix-negotiate", + "gix-object 0.66.0", + "gix-ref 0.69.0", + "gix-refspec", + "gix-revwalk", + "gix-shallow", + "gix-trace 0.3.0", + "gix-transport", + "gix-utils 0.5.1", + "nonempty", +] + +[[package]] +name = "gix-quote" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f92bc1b13c09e88388578e8aa1e987ec35f28fca158c13b1baa7ab1a85b124" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-utils 0.5.1", ] [[package]] @@ -791,20 +1650,84 @@ version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c90ceeec67de03b737c30b1b69116ca56fec803edde022f3d25181f0f597083d" dependencies = [ - "gix-actor", - "gix-error", + "gix-actor 0.43.0", + "gix-error 0.4.0", "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-utils", - "gix-validate", + "gix-fs 0.23.0", + "gix-hash 0.27.0", + "gix-lock 25.0.0", + "gix-object 0.65.0", + "gix-path 0.13.0", + "gix-tempfile 25.0.0", + "gix-utils 0.4.0", + "gix-validate 0.12.0", "memmap2", ] +[[package]] +name = "gix-ref" +version = "0.69.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "073bc0928e1f747823b1eaed94918119dacef4c616532bc3d17e5b7457863471" +dependencies = [ + "gix-actor 0.44.0", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-lock 26.0.0", + "gix-object 0.66.0", + "gix-parallel", + "gix-path 0.14.0", + "gix-tempfile 26.0.0", + "gix-utils 0.5.1", + "gix-validate 0.13.0", + "memmap2", +] + +[[package]] +name = "gix-refspec" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccc7010dae0df2900aa77cc67f8aca042cd80e35938ccc179010d863b1d42a0c" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-validate 0.13.0", + "smallvec", +] + +[[package]] +name = "gix-revision" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63210c1943b67fa700806c3c3486fc16a92b3ea871f5cf092340b8eec10a0ca1" +dependencies = [ + "bstr", + "gix-commitgraph", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-object 0.66.0", + "gix-revwalk", + "nonempty", +] + +[[package]] +name = "gix-revwalk" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "800479fbbf1e7f94f663e07943a91add5499343e7aac611a81e6a0460fd44af6" +dependencies = [ + "gix-commitgraph", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-object 0.66.0", + "smallvec", +] + [[package]] name = "gix-sec" version = "0.15.0" @@ -812,9 +1735,76 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8eb983a830ba586b61f7005deaf44609e1a4186cbf13a0e8668154ca910461" dependencies = [ "bitflags 2.13.2", - "gix-path", + "gix-path 0.13.0", "libc", - "windows-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-sec" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5640f642a1b471616d48230b1def7ca743cb30903441ff84800cafbab3c0fddf" +dependencies = [ + "bitflags 2.13.2", + "gix-path 0.14.0", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-shallow" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94bc0720a3d6b10f18e3ac382a7780bcfc4c6bee94a8b5857b8e4ec94c50d754" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-lock 26.0.0", + "nonempty", +] + +[[package]] +name = "gix-status" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3174a9f3fb991cf25a7a609ab6c50f19baa7d5f8ce05a48c202f7db4ce3ba" +dependencies = [ + "bstr", + "filetime", + "gix-diff", + "gix-dir", + "gix-error 0.5.1", + "gix-filter", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-index", + "gix-object 0.66.0", + "gix-parallel", + "gix-path 0.14.0", + "gix-pathspec", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-worktree", + "hashbrown 0.16.1", + "portable-atomic", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-submodule" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d945257bd0d624ca844a5a36c79d748df080f355b0ac92d68793875aa529a3f" +dependencies = [ + "bstr", + "gix-config", + "gix-error 0.5.1", + "gix-path 0.14.0", + "gix-pathspec", + "gix-refspec", + "gix-url", ] [[package]] @@ -823,11 +1813,25 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dd7dd8df3345933caddd6ce67821c9eec17192564f1011cf0bd0b8cb0d07ffb" dependencies = [ - "gix-fs", + "gix-fs 0.23.0", "libc", "parking_lot", "tempfile", - "windows-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-tempfile" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9275c8ae0646d840ae0156d3f90d39b7beea6e31a398afb9ee72feb293a269c" +dependencies = [ + "dashmap", + "gix-fs 0.24.0", + "libc", + "parking_lot", + "tempfile", + "windows-sys 0.61.2", ] [[package]] @@ -836,6 +1840,64 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df45b2cf6052d9e52681130c17d67505b023e8933ad974f94a2be0b0d24f636a" +[[package]] +name = "gix-trace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133f2de116104d637541831b6acb157898556d5eeec363ab2eb1c583adc6bb56" + +[[package]] +name = "gix-transport" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e43d6b0097ea9f2f266d5d6c43b8f615ed3da7c686ec8771cd17c1cb33cb0de" +dependencies = [ + "base64 0.22.1", + "bstr", + "gix-command", + "gix-credentials", + "gix-error 0.5.1", + "gix-packetline", + "gix-path 0.14.0", + "gix-quote", + "gix-sec 0.16.0", + "gix-trace 0.3.0", + "gix-url", + "gix-utils 0.5.1", + "parking_lot", + "reqwest", +] + +[[package]] +name = "gix-traverse" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668a6e7f7688e5a43eaf161f1471ffc559de1a5fd8471e861c64d59d1699e1e" +dependencies = [ + "bitflags 2.13.2", + "gix-commitgraph", + "gix-date 0.18.0", + "gix-error 0.5.1", + "gix-hash 0.28.0", + "gix-hashtable 0.18.0", + "gix-object 0.66.0", + "gix-revwalk", + "smallvec", +] + +[[package]] +name = "gix-url" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04317dea7a5dd5253bbcab060c230f3de6a57d17cc9600c6cd7030bf4795b414" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-path 0.14.0", + "gix-utils 0.5.1", + "percent-encoding", +] + [[package]] name = "gix-utils" version = "0.4.0" @@ -843,7 +1905,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70525766f53426ca4cd2ea4d58b0b31488dfedb416b3254e2efdd9dc184cc880" dependencies = [ "fastrand", - "getrandom", + "getrandom 0.4.3", + "unicode-normalization", +] + +[[package]] +name = "gix-utils" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8e770b8c34311044d1addc7b18957db0ac27183707e1140dc90e6f674a6354e" +dependencies = [ + "bstr", + "bytes", + "fastrand", + "getrandom 0.4.3", + "gix-error 0.5.1", + "prodash", "unicode-normalization", ] @@ -854,7 +1931,108 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30574f81fc41b2ca3582ece2bdf8696bdfe9c170aa7e8bcafb81199c86b1ceea" dependencies = [ "bstr", - "gix-error", + "gix-error 0.4.0", +] + +[[package]] +name = "gix-validate" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbcd59cc52742468bc5c8a0e7123390d154f45e6cbd37461b0dcecdc681f2179" +dependencies = [ + "bstr", + "gix-error 0.5.1", +] + +[[package]] +name = "gix-worktree" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a285c0f6b41e504e8bb81ca3f861c4da00cb3d5ced3210a4591112f22da6d38f" +dependencies = [ + "bstr", + "dua-core", + "gix-attributes", + "gix-error 0.5.1", + "gix-fs 0.24.0", + "gix-glob", + "gix-hash 0.28.0", + "gix-ignore", + "gix-index", + "gix-object 0.66.0", + "gix-path 0.14.0", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-validate 0.13.0", +] + +[[package]] +name = "gix-worktree-state" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003c1162556d4ebf51b8140b955cb04c2458d5ecbdffe50262dbbb270635208c" +dependencies = [ + "bstr", + "gix-error 0.5.1", + "gix-filter", + "gix-fs 0.24.0", + "gix-index", + "gix-object 0.66.0", + "gix-parallel", + "gix-path 0.14.0", + "gix-trace 0.3.0", + "gix-utils 0.5.1", + "gix-worktree", + "io-close", +] + +[[package]] +name = "gix-worktree-stream" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d2789610e8179d4e0e8e51170a52a66483c103a8ad3c7db4d075b571856cb6" +dependencies = [ + "gix-attributes", + "gix-error 0.5.1", + "gix-filter", + "gix-fs 0.24.0", + "gix-hash 0.28.0", + "gix-object 0.66.0", + "gix-parallel", + "gix-path 0.14.0", + "gix-trace 0.3.0", + "gix-traverse", + "gix-utils 0.5.1", + "parking_lot", +] + +[[package]] +name = "gix-zlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2edb206bf06f3c801f4f6789c696396171558ab9b4c7f1fe3ba4d39b00b0f4" +dependencies = [ + "gix-error 0.5.1", + "zlib-rs", +] + +[[package]] +name = "h2" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -866,11 +2044,33 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "heapless" @@ -943,6 +2143,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", + "h2", "http", "http-body", "httparse", @@ -954,6 +2155,21 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -976,7 +2192,7 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "futures-channel", "futures-util", @@ -1124,7 +2340,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", +] + +[[package]] +name = "io-close" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" +dependencies = [ + "libc", + "winapi", ] [[package]] @@ -1137,7 +2363,8 @@ checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" name = "ipxe" version = "0.1.0" dependencies = [ - "build-print", + "diffy", + "gix", "include_dir", ] @@ -1207,13 +2434,62 @@ dependencies = [ "jiff-tzdb", ] +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + [[package]] name = "jobserver" version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom", + "getrandom 0.4.3", "libc", ] @@ -1285,6 +2561,12 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + [[package]] name = "matchit" version = "0.8.4" @@ -1337,9 +2619,15 @@ checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.61.2", ] +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + [[package]] name = "native-tls" version = "0.2.18" @@ -1363,6 +2651,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "205c45083b6725eb4671392c7c399510ad1498dd0275f1a2e68a70a34ebdf1b1" +[[package]] +name = "nonempty" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6" + [[package]] name = "num_enum" version = "0.7.6" @@ -1570,6 +2864,63 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + [[package]] name = "quote" version = "1.0.47" @@ -1585,6 +2936,32 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -1678,24 +3055,34 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64", + "base64 0.23.1", "bytes", + "encoding_rs", + "futures-channel", "futures-core", + "futures-util", + "h2", "http", "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-tls", "hyper-util", "js-sys", "log", + "mime", "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pki-types", + "rustls-platform-verifier", "sync_wrapper", "tokio", "tokio-native-tls", + "tokio-rustls", "tower", "tower-http", "tower-service", @@ -1705,6 +3092,35 @@ dependencies = [ "web-sys", ] +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "1.1.5" @@ -1715,7 +3131,33 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", ] [[package]] @@ -1724,9 +3166,49 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ + "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" + +[[package]] +name = "rustls-webpki" +version = "0.103.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.23" @@ -1754,7 +3236,7 @@ version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1934,6 +3416,22 @@ dependencies = [ "libc", ] +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "slab" version = "0.4.12" @@ -1954,7 +3452,7 @@ checksum = "612942246d0cc239cfd83af1dfd39be47f649208a3524e5e9da651910128e0ac" dependencies = [ "libc", "socket2", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1964,7 +3462,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1979,6 +3477,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "2.0.119" @@ -2028,10 +3532,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom", + "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -2084,7 +3588,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -2108,6 +3612,30 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml_datetime" version = "1.1.1+spec-1.1.0" @@ -2210,6 +3738,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "unicode-bom" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" + [[package]] name = "unicode-ident" version = "1.0.26" @@ -2231,6 +3765,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.8" @@ -2352,21 +3892,71 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ec80e73fd8baf57bf0d9615554c75348bda990d6d5bbeab964dd068319fecb" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -2376,6 +3966,70 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "1.0.4" @@ -2484,6 +4138,12 @@ dependencies = [ "syn 3.0.6", ] +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + [[package]] name = "zmij" version = "1.0.23" diff --git a/ipxe/Cargo.toml b/ipxe/Cargo.toml index 2220d92..b5e2434 100644 --- a/ipxe/Cargo.toml +++ b/ipxe/Cargo.toml @@ -4,7 +4,13 @@ version = "0.1.0" edition = "2024" [build-dependencies] -build-print = "1.0.1" +diffy = "0.5.2" +gix = { version = "0.89.0", default-features = false, features = [ + "blocking-network-client", + "worktree-mutation", + "sha1", + "blocking-http-transport-reqwest-rust-tls", +] } [dependencies] include_dir = "0.7.4" diff --git a/ipxe/build.rs b/ipxe/build.rs index 720fbe3..aefb8f3 100644 --- a/ipxe/build.rs +++ b/ipxe/build.rs @@ -1,57 +1,180 @@ -use std::env; -use std::path::PathBuf; -use std::process::{Command, Stdio}; +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use std::process::Command; +use std::sync::atomic::AtomicBool; -use build_print::error; +use diffy::apply; +use diffy::patch_set::{FileOperation, ParseOptions, PatchSet}; +use gix::Repository; +use gix::progress::Discard; + +const URL: &str = "https://github.com/ipxe/ipxe"; +const REVISION: &str = "fe159d0910cac1cd49bab8d4b9296dbe2d9d3cc2"; +const FILES: &[&str] = &["bin/ipxe.pxe", "bin-x86_64-efi/ipxe.efi"]; + +const SRC_DIR: &str = "src"; fn main() { - let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()) + let manifest_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()) .canonicalize() .unwrap(); - let src_dir = manifest_dir.join("ipxe").join("src"); + let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap()) + .canonicalize() + .unwrap(); + let repo_dir = out_dir.join("repo"); + + let repo = checkout(&out_dir, &repo_dir); + + apply_patches(&repo, &manifest_dir, &repo_dir); + println!("cargo::rerun-if-changed=patches"); + + build(&manifest_dir, &repo_dir); + println!("cargo::rerun-if-changed=src/embed.ipxe"); + + copy_files(&repo_dir, &out_dir); +} + +fn checkout(out_dir: &Path, repo_dir: &Path) -> Repository { + // Stamp file is used instead of comparing against HEAD to guard against incomplete clones + let stamp = out_dir.join("checkout.stamp"); + if std::fs::read_to_string(&stamp).is_ok_and(|stamp| stamp == REVISION) + && let Ok(repo) = gix::open(repo_dir) + { + return repo; + } + + // Cleanup any left-overs + std::fs::remove_file(&stamp).ok(); + std::fs::remove_dir_all(repo_dir).ok(); + + std::fs::create_dir_all(repo_dir).unwrap(); + + let mut prepare = gix::prepare_clone(URL, repo_dir) + .unwrap() + .with_revision(Some(REVISION)) + .unwrap(); + + let interrupt = AtomicBool::new(false); + let (mut checkout, _) = prepare.fetch_then_checkout(Discard, &interrupt).unwrap(); + let (repo, _) = checkout.main_worktree(Discard, &interrupt).unwrap(); + + std::fs::write(&stamp, REVISION).unwrap(); + + repo +} + +fn apply_patches(repo: &Repository, manifest_dir: &Path, repo_dir: &Path) { + let commit_id = gix::ObjectId::from_hex(REVISION.as_bytes()).unwrap(); + let tree = repo.find_commit(commit_id).unwrap().tree().unwrap(); + + // Get all the patches and sort them based on name + let mut patch_files: Vec = std::fs::read_dir(manifest_dir.join("patches")) + .unwrap() + .map(|e| e.unwrap().path()) + .filter(|e| e.extension().is_some_and(|e| e == "patch")) + .collect(); + patch_files.sort(); + + let mut patched = HashMap::new(); + for path in patch_files { + let text = std::fs::read_to_string(&path).unwrap(); + let patch_set = PatchSet::parse(&text, ParseOptions::gitdiff()); + + for patch in patch_set { + let patch = patch.unwrap(); + + match patch.operation().strip_prefix(1) { + FileOperation::Modify { original, modified } => { + assert_eq!(original, modified); + let path = original.to_string(); + + // Either get the current in-memory patched file, otherwise get the prisine file + let current = patched + .remove(&path) + .unwrap_or_else(|| pristine(&tree, &path)); + + let new = apply(¤t, patch.patch().as_text().unwrap()).unwrap(); + patched.insert(path, new); + } + _ => todo!(), + } + } + } + + // If the file was previously patched, but now isn't restore the pristine file + for path in modified_files(repo) { + if !patched.contains_key(&path) { + std::fs::write(repo_dir.join(&path), pristine(&tree, &path)).unwrap(); + } + } + + // Write all the patched files + for (path, content) in &patched { + let path = repo_dir.join(path); + let content = content.as_bytes(); + + // But only if the file is actually different from the one on disk + // This prevents changing the mtime unnecessarily + if std::fs::read(&path).ok().as_deref() != Some(content) { + std::fs::write(path, content).unwrap(); + } + } +} + +fn pristine(tree: &gix::Tree<'_>, path: &str) -> String { + let entry = tree.lookup_entry_by_path(path).unwrap().unwrap(); + + String::from_utf8(entry.object().unwrap().data.clone()).unwrap() +} + +fn modified_files(repo: &gix::Repository) -> Vec { + repo.status(Discard) + .unwrap() + .untracked_files(gix::status::UntrackedFiles::None) + .into_index_worktree_iter(Vec::::new()) + .unwrap() + .map(|item| item.unwrap().rela_path().to_string()) + .collect() +} + +fn build(manifest_dir: &Path, repo_dir: &Path) { + let src_dir = repo_dir.join(SRC_DIR); let mut command = Command::new("make"); command - .stdout(Stdio::piped()) .current_dir(&src_dir) .env_remove("DEBUG") .env_remove("PROFILE") - .args([ - "-j", - &std::thread::available_parallelism() - .unwrap() - .get() - .to_string(), - ]) .arg(format!( "EMBED={}", manifest_dir .join("src") .join("embed.ipxe") - .to_string_lossy(), - )); + .to_string_lossy() + )) + .args(FILES); - let files = ["bin/ipxe.pxe", "bin-x86_64-efi/ipxe.efi"].map(PathBuf::from); - for file in &files { - command.arg(file); + if let Ok(flags) = std::env::var("CARGO_MAKEFLAGS") { + command.env("MAKEFLAGS", flags); } let output = command.output().unwrap(); + if !output.status.success() { - error!("{}", String::from_utf8_lossy(&output.stderr)); + panic!("make failed:\n{}", String::from_utf8_lossy(&output.stderr)); } +} - let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()) - .canonicalize() - .unwrap() - .join("ipxe"); +fn copy_files(repo_dir: &Path, out_dir: &Path) { + let src_dir = repo_dir.join(SRC_DIR); + let bin_dir = out_dir.join("bin"); - std::fs::remove_dir_all(&out_dir).ok(); - for file in &files { + std::fs::create_dir_all(&bin_dir).unwrap(); + for file in FILES { + let file = Path::new(file); let input = src_dir.join(file); - let output = out_dir.join(file.file_name().unwrap()); + let output = bin_dir.join(file.file_name().unwrap()); - std::fs::create_dir_all(output.parent().unwrap()).unwrap(); std::fs::copy(input, output).unwrap(); } } diff --git a/ipxe/ipxe b/ipxe/ipxe deleted file mode 160000 index 8892af6..0000000 --- a/ipxe/ipxe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8892af68a254d36f778345d5324ec74fb8adbab8 diff --git a/ipxe/patches/.gitkeep b/ipxe/patches/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ipxe/src/lib.rs b/ipxe/src/lib.rs index 8b8b128..a74d02b 100644 --- a/ipxe/src/lib.rs +++ b/ipxe/src/lib.rs @@ -1,3 +1,3 @@ use include_dir::{Dir, include_dir}; -pub static IPXE_DIR: Dir<'_> = include_dir!("$OUT_DIR/ipxe"); +pub static IPXE_DIR: Dir<'_> = include_dir!("$OUT_DIR/bin"); diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000..8ee3a4b --- /dev/null +++ b/typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +rela = "rela"