rebuilderd-worker-0.25.0/.cargo_vcs_info.json0000644000000001440000000000100145470ustar { "git": { "sha1": "81b3a8db8fe9f98e9eb1421c1a37cbdc1a637a60" }, "path_in_vcs": "worker" }rebuilderd-worker-0.25.0/.dockerignore000064400000000000000000000000531046102023000160120ustar 00000000000000build cache rebuilder.key rebuilder.v2.key rebuilderd-worker-0.25.0/Cargo.lock0000644000001644330000000000100125360ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "addr2line" version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "android-tzdata" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] [[package]] name = "anstream" version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", "windows-sys 0.60.2", ] [[package]] name = "anyhow" version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "async-trait" version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", ] [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" version = "1.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" dependencies = [ "shlex", ] [[package]] name = "cfg-if" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", "windows-link", ] [[package]] name = "clap" version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" dependencies = [ "clap_builder", "clap_derive", ] [[package]] name = "clap_builder" version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", ] [[package]] name = "clap_derive" version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" dependencies = [ "heck", "proc-macro2", "quote", "syn", ] [[package]] name = "clap_lex" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "colorchoice" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ "windows-sys 0.59.0", ] [[package]] name = "core-foundation" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "data-encoding" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "derp" version = "0.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9b84cfd9b6fa437e498215e5625e9e3ae3bf9bb54d623028a181c40820db169" dependencies = [ "untrusted 0.7.1", ] [[package]] name = "dirs-next" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ "cfg-if", "dirs-sys-next", ] [[package]] name = "dirs-sys-next" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", "winapi", ] [[package]] name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "env_filter" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", ] [[package]] name = "env_logger" version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", "jiff", "log", ] [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", "windows-sys 0.60.2", ] [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[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.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", "futures-executor", "futures-io", "futures-sink", "futures-task", "futures-util", ] [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "futures-sink" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-macro", "futures-sink", "futures-task", "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "getrandom" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] name = "getrandom" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", "wasm-bindgen", ] [[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "hashbrown" version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", "itoa", ] [[package]] name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", ] [[package]] name = "http-body-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", "http", "http-body", "pin-project-lite", ] [[package]] name = "httparse" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "http", "http-body", "httparse", "itoa", "pin-project-lite", "pin-utils", "smallvec", "tokio", "want", ] [[package]] name = "hyper-rustls" version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http", "hyper", "hyper-util", "rustls", "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", ] [[package]] name = "hyper-util" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64", "bytes", "futures-channel", "futures-core", "futures-util", "http", "http-body", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", "socket2 0.6.0", "tokio", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "log", "wasm-bindgen", "windows-core", ] [[package]] name = "iana-time-zone-haiku" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ "cc", ] [[package]] name = "icu_collections" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_locale_core" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", "zerovec", ] [[package]] name = "icu_normalizer" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", "zerovec", ] [[package]] name = "icu_normalizer_data" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", "zerotrie", "zerovec", ] [[package]] name = "idna" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", "smallvec", "utf8_iter", ] [[package]] name = "idna_adapter" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", ] [[package]] name = "in-toto" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34037907a12187df805f8581f4542ba3dd838794dca025adbbabbfc4d161eac7" dependencies = [ "chrono", "data-encoding", "derp", "glob", "itoa", "log", "path-clean", "pem", "ring", "serde", "serde_json", "strum", "strum_macros", "thiserror 2.0.15", "untrusted 0.7.1", "walkdir", ] [[package]] name = "indexmap" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "io-uring" version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ "bitflags", "cfg-if", "libc", ] [[package]] name = "ipnet" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" dependencies = [ "memchr", "serde", ] [[package]] name = "is_terminal_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jiff" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" dependencies = [ "jiff-static", "log", "portable-atomic", "portable-atomic-util", "serde", ] [[package]] name = "jiff-static" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "js-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", ] [[package]] name = "libc" version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libredox" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags", "libc", ] [[package]] name = "linux-raw-sys" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru-slab" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "miniz_oxide" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] [[package]] name = "nix" version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags", "cfg-if", "cfg_aliases", "libc", ] [[package]] name = "num-traits" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "openssl-probe" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "path-clean" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" [[package]] name = "pem" version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" dependencies = [ "base64", "serde", ] [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "portable-atomic" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "portable-atomic-util" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ "portable-atomic", ] [[package]] name = "potential_utf" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" dependencies = [ "zerovec", ] [[package]] name = "ppv-lite86" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] [[package]] name = "proc-macro2" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "quinn" version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" dependencies = [ "bytes", "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", "rustls", "socket2 0.5.10", "thiserror 2.0.15", "tokio", "tracing", "web-time", ] [[package]] name = "quinn-proto" version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", "rand", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", "thiserror 2.0.15", "tinyvec", "tracing", "web-time", ] [[package]] name = "quinn-udp" version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" dependencies = [ "cfg_aliases", "libc", "once_cell", "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] [[package]] name = "quote" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", ] [[package]] name = "rand_core" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom 0.3.3", ] [[package]] name = "rebuilderd-common" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd41892a8688896c79dd8d8a0a674170c844c5b7e8b84d9c7e6deb08e49a2f90" dependencies = [ "anyhow", "chrono", "clap", "colored", "dirs-next", "log", "reqwest", "serde", "toml", "url", ] [[package]] name = "rebuilderd-worker" version = "0.25.0" dependencies = [ "async-trait", "clap", "data-encoding", "env_logger", "futures", "futures-util", "in-toto", "nix", "rebuilderd-common", "serde", "serde_json", "tempfile", "tokio", "toml", "url", ] [[package]] name = "redox_users" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.16", "libredox", "thiserror 1.0.69", ] [[package]] name = "regex" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64", "bytes", "futures-channel", "futures-core", "futures-util", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", "hyper-util", "js-sys", "log", "percent-encoding", "pin-project-lite", "quinn", "rustls", "rustls-native-certs", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", "tokio-rustls", "tokio-util", "tower", "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "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.16", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.60.2", ] [[package]] name = "rustls" version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "once_cell", "ring", "rustls-pki-types", "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pki-types" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ "web-time", "zeroize", ] [[package]] name = "rustls-webpki" version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring", "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustversion" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ "winapi-util", ] [[package]] name = "schannel" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] [[package]] name = "security-framework" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" dependencies = [ "bitflags", "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "serde" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" dependencies = [ "serde", ] [[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", "ryu", "serde", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] [[package]] name = "slab" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] name = "socket2" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", "windows-sys 0.59.0", ] [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", "syn", ] [[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.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] [[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tempfile" version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.59.0", ] [[package]] name = "thiserror" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850" dependencies = [ "thiserror-impl 2.0.15", ] [[package]] name = "thiserror-impl" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "thiserror-impl" version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tinystr" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", ] [[package]] name = "tinyvec" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", "io-uring", "libc", "mio", "pin-project-lite", "signal-hook-registry", "slab", "socket2 0.6.0", "tokio-macros", "windows-sys 0.59.0", ] [[package]] name = "tokio-macros" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tokio-rustls" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ "rustls", "tokio", ] [[package]] name = "tokio-util" version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", ] [[package]] name = "toml" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "toml_parser", "toml_writer", "winnow", ] [[package]] name = "toml_datetime" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" dependencies = [ "serde", ] [[package]] name = "toml_parser" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" dependencies = [ "winnow", ] [[package]] name = "toml_writer" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "tower" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", "sync_wrapper", "tokio", "tower-layer", "tower-service", ] [[package]] name = "tower-http" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", ] [[package]] name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] [[package]] name = "utf8_iter" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "walkdir" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", ] [[package]] name = "want" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ "try-lock", ] [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] [[package]] name = "wasm-bindgen" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-streams" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] [[package]] name = "web-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "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 = "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.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ "windows-sys 0.59.0", ] [[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-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", "windows-link", "windows-result", "windows-strings", ] [[package]] name = "windows-implement" version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "windows-interface" version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "windows-link" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-result" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets 0.53.3", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows-targets" version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", "windows_i686_gnullvm 0.53.0", "windows_i686_msvc 0.53.0", "windows_x86_64_gnu 0.53.0", "windows_x86_64_gnullvm 0.53.0", "windows_x86_64_msvc 0.53.0", ] [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[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_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[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_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags", ] [[package]] name = "writeable" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yoke" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerocopy" version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "zerofrom" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zerotrie" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" dependencies = [ "displaydoc", "yoke", "zerofrom", ] [[package]] name = "zerovec" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", "zerovec-derive", ] [[package]] name = "zerovec-derive" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", "syn", ] rebuilderd-worker-0.25.0/Cargo.toml0000644000000042670000000000100125570ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "rebuilderd-worker" version = "0.25.0" authors = ["kpcyrd "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "rebuilderd - rebuild worker" readme = "README.md" license = "GPL-3.0-or-later" repository = "https://github.com/kpcyrd/rebuilderd" [package.metadata.deb] assets = [ [ "target/release/rebuilderd-worker", "usr/bin/", "755", ], [ "rebuilder-archlinux.sh", "usr/libexec/rebuilderd/", "755", ], [ "rebuilder-debian.sh", "usr/libexec/rebuilderd/", "755", ], [ "../contrib/confs/rebuilderd-worker.conf", "etc/", "640", ], [ "../contrib/systemd/rebuilderd-worker@.service", "usr/lib/systemd/system/", "640", ], ] depends = "$auto, rebuilderd" [[bin]] name = "rebuilderd-worker" path = "src/main.rs" [dependencies.async-trait] version = "0.1.56" [dependencies.clap] version = "4" features = [ "derive", "env", ] [dependencies.data-encoding] version = "2" [dependencies.env_logger] version = "0.11" [dependencies.futures] version = "0.3.21" [dependencies.futures-util] version = "0.3.21" [dependencies.in-toto] version = "0.4" [dependencies.nix] version = "0.30" features = [ "process", "signal", ] [dependencies.rebuilderd-common] version = "=0.25.0" [dependencies.serde] version = "1.0.137" features = ["derive"] [dependencies.serde_json] version = "1.0.81" [dependencies.tempfile] version = "3.3.0" [dependencies.tokio] version = "1.19.2" features = [ "macros", "rt-multi-thread", "fs", "io-util", "process", "io-std", "time", ] [dependencies.toml] version = "0.9" [dependencies.url] version = "2.2.2" rebuilderd-worker-0.25.0/Cargo.toml.orig000064400000000000000000000022471046102023000162340ustar 00000000000000[package] name = "rebuilderd-worker" version = "0.25.0" description = "rebuilderd - rebuild worker" authors = ["kpcyrd "] license = "GPL-3.0-or-later" repository = "https://github.com/kpcyrd/rebuilderd" edition = "2021" [package.metadata.deb] depends = "$auto, rebuilderd" assets = [ ["target/release/rebuilderd-worker", "usr/bin/", "755"], ["rebuilder-archlinux.sh", "usr/libexec/rebuilderd/", "755"], ["rebuilder-debian.sh", "usr/libexec/rebuilderd/", "755"], ["../contrib/confs/rebuilderd-worker.conf", "etc/", "640"], ["../contrib/systemd/rebuilderd-worker@.service", "usr/lib/systemd/system/", "640"], ] [dependencies] async-trait = "0.1.56" clap = { version = "4", features = ["derive", "env"] } data-encoding = "2" env_logger = "0.11" futures = "0.3.21" futures-util = "0.3.21" in-toto = "0.4" nix = { version = "0.30", features = ["process", "signal"] } rebuilderd-common = { version= "=0.25.0", path="../common" } serde = { version="1.0.137", features=["derive"] } serde_json = "1.0.81" tempfile = "3.3.0" tokio = { version="1.19.2", features=["macros", "rt-multi-thread", "fs", "io-util", "process", "io-std", "time"] } toml = "0.9" url = "2.2.2" rebuilderd-worker-0.25.0/Dockerfile.alpine000064400000000000000000000012101046102023000165730ustar 00000000000000FROM rust:alpine3.21 ENV RUSTFLAGS="-C target-feature=-crt-static" WORKDIR /usr/src/rebuilderd RUN apk add --no-cache musl-dev pkgconfig COPY . . RUN --mount=type=cache,target=/var/cache/buildkit \ CARGO_HOME=/var/cache/buildkit/cargo \ CARGO_TARGET_DIR=/var/cache/buildkit/alpine/target \ cargo build --release --locked -p rebuilderd-worker && \ cp -v /var/cache/buildkit/alpine/target/release/rebuilderd-worker / FROM alpine:3.21 RUN apk add --no-cache libgcc COPY --from=0 /rebuilderd-worker /usr/local/bin/ ENV REBUILDERD_WORKER_BACKEND=alpine=/usr/local/libexec/rebuilderd/rebuilder-alpine.sh ENTRYPOINT ["rebuilderd-worker"] rebuilderd-worker-0.25.0/Dockerfile.archlinux000064400000000000000000000013331046102023000173260ustar 00000000000000FROM archlinux WORKDIR /usr/src/rebuilderd RUN pacman -Suy --noconfirm gcc pkgconf cargo COPY . . RUN --mount=type=cache,target=/var/cache/buildkit \ CARGO_HOME=/var/cache/buildkit/cargo \ CARGO_TARGET_DIR=/var/cache/buildkit/archlinux/target \ cargo build --release --locked -p rebuilderd-worker && \ cp -v /var/cache/buildkit/archlinux/target/release/rebuilderd-worker / FROM archlinux RUN pacman -Suy --noconfirm archlinux-repro COPY --from=0 \ /usr/src/rebuilderd/worker/rebuilder-archlinux.sh \ /usr/local/libexec/rebuilderd/ COPY --from=0 /rebuilderd-worker /usr/local/bin/ ENV REBUILDERD_WORKER_BACKEND=archlinux=/usr/local/libexec/rebuilderd/rebuilder-archlinux.sh ENTRYPOINT ["rebuilderd-worker"] rebuilderd-worker-0.25.0/Dockerfile.debian000064400000000000000000000013601046102023000165530ustar 00000000000000FROM rust:bookworm WORKDIR /usr/src/rebuilderd COPY . . RUN --mount=type=cache,target=/var/cache/buildkit \ CARGO_HOME=/var/cache/buildkit/cargo \ CARGO_TARGET_DIR=/var/cache/buildkit/debian/target \ cargo build --release --locked -p rebuilderd-worker && \ cp -v /var/cache/buildkit/debian/target/release/rebuilderd-worker / FROM debian:trixie RUN apt-get update && apt install -y apt-utils debian-keyring devscripts diffoscope dpkg-dev mmdebstrap sbuild uidmap COPY --from=0 \ /usr/src/rebuilderd/worker/rebuilder-debian.sh \ /usr/local/libexec/rebuilderd/ COPY --from=0 /rebuilderd-worker /usr/local/bin/ ENV REBUILDERD_WORKER_BACKEND=debian=/usr/local/libexec/rebuilderd/rebuilder-debian.sh ENTRYPOINT ["rebuilderd-worker"] rebuilderd-worker-0.25.0/Dockerfile.fedora000064400000000000000000000012121046102023000165650ustar 00000000000000FROM fedora WORKDIR /usr/src/rebuilderd RUN dnf -y install cargo rust COPY . . RUN --mount=type=cache,target=/var/cache/buildkit \ CARGO_HOME=/var/cache/buildkit/cargo \ CARGO_TARGET_DIR=/var/cache/buildkit/fedora/target \ cargo build --release --locked -p rebuilderd-worker && \ cp -v /var/cache/buildkit/fedora/target/release/rebuilderd-worker / FROM fedora COPY --from=0 \ /usr/src/rebuilderd/worker/rebuilder-fedora.sh \ /usr/local/libexec/rebuilderd/ COPY --from=0 /rebuilderd-worker /usr/local/bin/ ENV REBUILDERD_WORKER_BACKEND=fedora=/usr/local/libexec/rebuilderd/rebuilder-fedora.sh ENTRYPOINT ["rebuilderd-worker"] rebuilderd-worker-0.25.0/Dockerfile.tails000064400000000000000000000014711046102023000164500ustar 00000000000000FROM rust:bookworm WORKDIR /usr/src/rebuilderd COPY . . RUN --mount=type=cache,target=/var/cache/buildkit \ CARGO_HOME=/var/cache/buildkit/cargo \ CARGO_TARGET_DIR=/var/cache/buildkit/debian/target \ cargo build --release --locked -p rebuilderd-worker && \ cp -v /var/cache/buildkit/debian/target/release/rebuilderd-worker / FROM debian:bookworm RUN apt-get update && apt-get install -y dpkg-dev sudo \ psmisc git rake libvirt-daemon-system dnsmasq-base ebtables faketime pigz qemu-system-x86 qemu-utils vagrant vagrant-libvirt vmdb2 COPY --from=0 \ /usr/src/rebuilderd/worker/rebuilder-tails.sh \ /usr/local/libexec/rebuilderd/ COPY --from=0 /rebuilderd-worker /usr/local/bin/ ENV REBUILDERD_WORKER_BACKEND=tails=/usr/local/libexec/rebuilderd/rebuilder-tails.sh ENTRYPOINT ["rebuilderd-worker"] rebuilderd-worker-0.25.0/README.md000064400000000000000000000024201046102023000146150ustar 00000000000000# Rebuilderd Workers Workers are tasked with, in short, carrying out the actual rebuild. Here you'll find: 1. The rust codebase for the worker daemon (that listens in for rebuild commands) under src/ 2. A series of entrypoints needed by the workers (i.e., rebuilder-{archlinux,debian}) to instantiate new build environments. 3. A series of dockerfiles to build dockerized worker workloads (e.g., in case you would want to use an [autoscaling group in a k8s cluster](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) or in case you just want to keep workers separated). You can test workers individually by (for example) building a container and scheduling a build (for a debian worker): ```bash $ docker build -t rebuilderd-worker-debian worker/Dockerfile.debian $ docker run --cap-add=SYS_ADMIN --rm \ rebuilderd-worker-debian build debian \ https://buildinfos.debian.net/buildinfo-pool/r/rust-sniffglue/rust-sniffglue_0.11.1-6+b1_amd64.buildinfo ``` | :memo: WARNING | |:---------------------------| | note these commands are run in the root of the repo, not here| | :warning: WARNING | |:---------------------------| | Running Debian workers as containers requires SYS\_ADMIN capabilities which could be dangerous! | rebuilderd-worker-0.25.0/rebuilder-archlinux.sh000075500000000000000000000001201046102023000176400ustar 00000000000000#!/bin/sh set -xe NOCHECK=1 archlinux-repro -o "${REBUILDERD_OUTDIR}" -- "${1}" rebuilderd-worker-0.25.0/rebuilder-debian.sh000075500000000000000000000003041046102023000170710ustar 00000000000000#!/bin/sh set -xe cd "$(dirname "$1")" # for production it's useful to call debrebuild with --cache="$directory" debrebuild --buildresult="${REBUILDERD_OUTDIR}" --builder=sbuild+unshare -- "${1}" rebuilderd-worker-0.25.0/rebuilder-fedora.sh000075500000000000000000000000251046102023000171070ustar 00000000000000#!/bin/sh echo hello rebuilderd-worker-0.25.0/rebuilder-tails.sh000075500000000000000000000026301046102023000167670ustar 00000000000000#!/bin/sh set -eux IMG_PATH="$1" TAG=$(basename "$IMG_PATH" | sed -nr 's/tails-amd64-([0-9a-z~\.]+)\.[^\]+/\1/p' | sed 's/~/-/g') REPO_URL='https://gitlab.tails.boum.org/tails/tails.git' export TAILS_BUILD_OPTIONS="nomergebasebranch forcecleanup" # cleanup possible leftovers virsh vol-list default | awk '{print $1}' | grep ^tails-builder- | xargs -rL1 virsh vol-delete --pool default # setup temporary directory WORK_DIR=$(mktemp -d -t tails.XXXXXX) trap '{ rm -rf -- "$WORK_DIR"; }' EXIT # set the folder public so libvirt user can access it chmod 0711 "$WORK_DIR" # import gpg keys to authenticate source code export HOME="$WORK_DIR/home" mkdir -m 0700 -- "$HOME" # Fetch the latest key over https curl -sSf https://tails.boum.org/tails-signing.key | gpg --import # clone repo REPO_DEST="$WORK_DIR/tails" # doesn't work even with nomergebasebranch #git clone --depth=1 --branch "$TAG" -- "$REPO_URL" "$REPO_DEST" git clone --branch "$TAG" -- "$REPO_URL" "$REPO_DEST" cd "$REPO_DEST" git verify-tag -v -- "$TAG" git submodule update --init # read and export SOURCE_DATE_EPOCH to normalize the build time SOURCE_DATE_EPOCH=$(date --utc --date="$(dpkg-parsechangelog --show-field=Date)" '+%s') export SOURCE_DATE_EPOCH # build the image # libvirtd needs to be started, /var/run/libvirt needs to be mounted if run inside a container ARTIFACTS="$REBUILDERD_OUTDIR" rake build # list build outputs ls -la "$REBUILDERD_OUTDIR" rebuilderd-worker-0.25.0/src/args.rs000064400000000000000000000031121046102023000154260ustar 00000000000000use clap::{ArgAction, Parser}; use std::path::PathBuf; #[derive(Debug, Parser)] #[command(version)] pub struct Args { /// Verbose logging #[arg(short, long, global = true, action(ArgAction::Count))] pub verbose: u8, #[command(subcommand)] pub subcommand: SubCommand, #[arg(short, long)] pub name: Option, #[arg(short, long, global = true, env = "REBUILDERD_WORKER_CONFIG")] pub config: Option, #[arg(long = "backend", global = true, env = "REBUILDERD_WORKER_BACKEND")] pub backends: Vec, } #[derive(Debug, Parser)] pub enum SubCommand { /// Rebuild an individual package Build(Build), /// Connect to a central rebuilderd daemon for work Connect(Connect), /// Invoke diffoscope similar to how a rebuilder would invoke it Diffoscope(Diffoscope), /// Load and print a config CheckConfig, } #[derive(Debug, Parser)] pub struct Build { /// Selects the right build profile from the configuration pub distro: String, /// The pre-built artifact that should be reproduced pub artifact_url: String, /// Pass a different input file to the rebuilder backend #[arg(long)] pub input_url: Option, /// Use a specific rebuilder script instead of the default #[arg(long)] pub script_location: Option, /// Use diffoscope to generate a diff #[arg(long)] pub gen_diffoscope: bool, } #[derive(Debug, Parser)] pub struct Connect { pub endpoint: Option, } #[derive(Debug, Parser)] pub struct Diffoscope { pub a: PathBuf, pub b: PathBuf, } rebuilderd-worker-0.25.0/src/auth.rs000064400000000000000000000031251046102023000154370ustar 00000000000000use data_encoding::BASE64; use in_toto::crypto::{KeyType, PrivateKey, SignatureScheme}; use rebuilderd_common::api::Client; use rebuilderd_common::config::ConfigFile; use rebuilderd_common::errors::*; use rebuilderd_common::utils; use std::fs; use std::io::ErrorKind; use std::path::Path; pub struct Profile { pub pubkey: String, pub privkey: PrivateKey, } impl Profile { pub fn new_client( &self, config: ConfigFile, endpoint: String, signup_secret: Option, auth_cookie: Option, ) -> Result { let mut client = Client::new(config, Some(endpoint))?; client.worker_key(self.pubkey.clone()); if let Some(signup_secret) = signup_secret { client.signup_secret(signup_secret); } else if let Some(auth_cookie) = auth_cookie { client.auth_cookie(auth_cookie); } Ok(client) } } #[inline] pub fn load() -> Result { match fs::remove_file("rebuilder.key") { Ok(_) => info!("Deleted old v1 worker key"), Err(err) if err.kind() == ErrorKind::NotFound => (), Err(err) => warn!("Failed to delete old v1 worker key: {:#}", err), } load_key("rebuilder.v2.key") } fn load_key>(path: P) -> Result { let privkey = utils::load_or_create(path.as_ref(), || { PrivateKey::new(KeyType::Ed25519).map_err(Error::from) })?; let privkey = PrivateKey::from_pkcs8(&privkey, SignatureScheme::Ed25519)?; let pubkey = BASE64.encode(privkey.public().as_bytes()); Ok(Profile { pubkey, privkey }) } rebuilderd-worker-0.25.0/src/config.rs000064400000000000000000000042201046102023000157400ustar 00000000000000use crate::args::Args; use rebuilderd_common::errors::*; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fs; use std::path::PathBuf; #[derive(Debug, Default, Serialize, Deserialize)] pub struct ConfigFile { pub endpoint: Option, pub signup_secret: Option, #[serde(default)] pub build: Build, #[serde(default)] pub diffoscope: Diffoscope, #[serde(default, rename = "backend")] pub backends: HashMap, } #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct Build { pub timeout: Option, pub max_bytes: Option, #[serde(default)] pub silent: bool, } #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct Diffoscope { #[serde(default)] pub enabled: bool, #[serde(default)] pub args: Vec, pub timeout: Option, pub max_bytes: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Backend { pub path: PathBuf, } pub fn load(args: &Args) -> Result { let path = if let Some(path) = args.config.as_ref() { Some(path.to_owned()) } else { let path = PathBuf::from("/etc/rebuilderd-worker.conf"); if path.exists() { warn!("Using the implicit `-c /etc/rebuilderd-worker.conf` is going to be removed in the future"); Some(path) } else { None } }; let mut conf = if let Some(path) = path { info!("Loading configuration from {:?}", path); let buf = fs::read_to_string(&path).with_context(|| anyhow!("Failed to open {:?}", path))?; toml::from_str::(&buf)? } else { info!("Using default configuration"); ConfigFile::default() }; for backend in &args.backends { debug!("Adding to list of supported backends: {:?}", backend); let (key, path) = backend.split_once('=').ok_or_else(|| { anyhow!("Invalid argument, expected format is --backend distro=/path/to/script") })?; conf.backends .insert(key.into(), Backend { path: path.into() }); } Ok(conf) } rebuilderd-worker-0.25.0/src/diffoscope.rs000064400000000000000000000016171046102023000166230ustar 00000000000000use crate::config; use crate::proc; use rebuilderd_common::errors::*; use std::collections::HashMap; use std::ffi::OsString; use std::path::Path; use std::time::Duration; pub async fn diffoscope(a: &Path, b: &Path, settings: &config::Diffoscope) -> Result { let mut args = settings.args.iter().map(OsString::from).collect::>(); args.push("--".into()); args.push(a.into()); args.push(b.into()); let timeout = settings.timeout.unwrap_or(3600); // 1h let opts = proc::Options { timeout: Duration::from_secs(timeout), size_limit: settings.max_bytes, kill_at_size_limit: true, passthrough: false, envs: HashMap::new(), }; let bin = Path::new("diffoscope"); let mut output = Vec::new(); proc::run(bin, &args, opts, &mut output).await?; let output = String::from_utf8_lossy(&output); Ok(output.into_owned()) } rebuilderd-worker-0.25.0/src/download.rs000064400000000000000000000024201046102023000163020ustar 00000000000000use futures_util::StreamExt; use rebuilderd_common::errors::*; use rebuilderd_common::http; use std::path::{Path, PathBuf}; use tokio::fs::File; use tokio::io::AsyncWriteExt; use url::Url; pub async fn download(url_str: &str, path: &Path) -> Result { let url = url_str .parse::() .context("Failed to parse input as url")?; let filename = url .path_segments() .ok_or_else(|| format_err!("Url doesn't seem to have a path"))? .next_back() .ok_or_else(|| format_err!("Failed to get filename from path"))? .to_owned(); if filename.is_empty() { bail!("Filename detected from url is empty"); } let target = path.join(&filename); info!("Downloading {:?} to {:?}", url_str, target); let client = http::client()?; let mut stream = client .get(url) .send() .await? .error_for_status()? .bytes_stream(); let mut f = File::create(&target) .await .context("Failed to create output file")?; let mut bytes = 0; while let Some(item) = stream.next().await { let item = item?; f.write_all(&item).await?; bytes += item.len(); } info!("Downloaded {} bytes", bytes); Ok(PathBuf::from(filename)) } rebuilderd-worker-0.25.0/src/heartbeat.rs000064400000000000000000000003161046102023000164340ustar 00000000000000use async_trait::async_trait; use rebuilderd_common::errors::*; use std::time::Duration; #[async_trait] pub trait HeartBeat { fn interval(&self) -> Duration; async fn ping(&self) -> Result<()>; } rebuilderd-worker-0.25.0/src/main.rs000064400000000000000000000201341046102023000154210ustar 00000000000000#![recursion_limit = "256"] use crate::args::{Args, SubCommand}; use crate::rebuild::Context; use async_trait::async_trait; use clap::Parser; use env_logger::Env; use in_toto::crypto::PrivateKey; use rebuilderd_common::api::*; use rebuilderd_common::auth::find_auth_cookie; use rebuilderd_common::config::*; use rebuilderd_common::errors::Context as _; use rebuilderd_common::errors::*; use rebuilderd_common::PkgArtifact; use std::fs; use std::io::{self, Write}; use std::path::Path; use std::time::Duration; use tokio::time; pub mod args; pub mod auth; pub mod config; pub mod diffoscope; pub mod download; pub mod heartbeat; pub mod proc; pub mod rebuild; pub mod setup; pub struct HttpHeartBeat<'a> { client: &'a Client, queue_id: i32, } #[async_trait] impl heartbeat::HeartBeat for HttpHeartBeat<'_> { fn interval(&self) -> Duration { Duration::from_secs(PING_INTERVAL) } async fn ping(&self) -> Result<()> { if let Err(err) = self .client .ping_build(&PingRequest { queue_id: self.queue_id, }) .await { warn!("Failed to ping: {}", err); } Ok(()) } } async fn rebuild(client: &Client, privkey: &PrivateKey, config: &config::ConfigFile) -> Result<()> { info!("Requesting work from rebuilderd..."); let supported_backends = config.backends.keys().map(String::from).collect::>(); match client.pop_queue(&WorkQuery { supported_backends }).await? { JobAssignment::Nothing => { info!("No pending tasks, sleeping for {}s...", IDLE_DELAY); time::sleep(Duration::from_secs(IDLE_DELAY)).await; } JobAssignment::Rebuild(rb) => { info!( "Starting rebuild of {:?} {:?}", rb.pkgbase.name, rb.pkgbase.version ); let backend = config .backends .get(&rb.pkgbase.distro) .cloned() .ok_or_else(|| anyhow!("No backend for {:?} configured", rb.pkgbase.distro))?; let ctx = Context { artifacts: rb.pkgbase.artifacts.clone(), input_url: rb.pkgbase.input_url.clone(), backend, build: config.build.clone(), diffoscope: config.diffoscope.clone(), privkey, }; let hb = HttpHeartBeat { client, queue_id: rb.id, }; let mut log = Vec::new(); let rebuilds = match rebuild::rebuild_with_heartbeat(&ctx, &mut log, &hb).await { Ok(res) => res, Err(err) => { error!( "Unexpected error while rebuilding package package: {:#}", err ); let msg = format!( "rebuilderd: unexpected error while rebuilding package: {:#}\n", err ); if !log.is_empty() { log.extend(b"\n\n"); } log.extend(msg.as_bytes()); let mut res = vec![]; for artifact in &rb.pkgbase.artifacts { res.push((artifact.clone(), Rebuild::new(BuildStatus::Fail))); } res } }; let build_log = String::from_utf8_lossy(&log).into_owned(); let report = BuildReport { queue: *rb, build_log, rebuilds, }; info!("Sending build report to rebuilderd..."); client .report_build(&report) .await .context("Failed to POST to rebuilderd")?; } } Ok(()) } async fn run_worker_loop( client: &Client, privkey: &PrivateKey, config: &config::ConfigFile, ) -> Result<()> { loop { if let Err(err) = rebuild(client, privkey, config).await { error!( "Unexpected error, sleeping for {}s: {:#}", API_ERROR_DELAY, err ); time::sleep(Duration::from_secs(API_ERROR_DELAY)).await; } let restart_flag = Path::new("rebuilderd.restart"); if restart_flag.exists() { info!("Restart flag exists, initiating shutdown"); if let Err(err) = fs::remove_file(restart_flag) { error!("Failed to remove restart flag: {:#}", err); } return Ok(()); } time::sleep(Duration::from_secs(WORKER_DELAY)).await; } } #[tokio::main] async fn main() -> Result<()> { let args = Args::parse(); let logging = match args.verbose { 0 => "info", 1 => "debug", _ => "trace", }; env_logger::init_from_env(Env::default().default_filter_or(logging)); let config = config::load(&args).context("Failed to load config file")?; let cookie = find_auth_cookie().ok(); if cookie.is_some() { debug!("Successfully loaded auth cookie"); } if let Some(name) = args.name { setup::run(&name).context("Failed to setup worker")?; } let profile = auth::load()?; match args.subcommand { SubCommand::Connect(connect) => { let system_config = rebuilderd_common::config::load(None::) .context("Failed to load system config")?; let endpoint = if let Some(endpoint) = connect.endpoint { endpoint } else { config .endpoint .clone() .ok_or_else(|| format_err!("No endpoint configured"))? }; let client = profile.new_client( system_config, endpoint, config.signup_secret.clone(), cookie, )?; run_worker_loop(&client, &profile.privkey, &config).await?; } // this is only really for debugging SubCommand::Build(build) => { let backend = if let Some(script_location) = build.script_location { config::Backend { path: script_location, } } else { config .backends .get(&build.distro) .cloned() .ok_or_else(|| anyhow!("No backend configured in config file"))? }; let diffoscope = config::Diffoscope { enabled: build.gen_diffoscope, ..Default::default() }; let mut log = Vec::new(); let res = rebuild::rebuild( &Context { artifacts: vec![PkgArtifact { name: "anonymous".to_string(), version: "0.0.0".to_string(), url: build.artifact_url, }], input_url: build.input_url, backend, build: config.build, diffoscope, privkey: &profile.privkey, }, &mut log, ) .await?; for (artifact, res) in res { trace!("rebuild result object for {:?} is {:?}", artifact, res); if res.status == BuildStatus::Good { info!("Package verified successfully"); } else { error!("Package failed to verify"); if let Some(diffoscope) = res.diffoscope { io::stdout().write_all(diffoscope.as_bytes()).ok(); } } } } SubCommand::Diffoscope(diffoscope) => { let output = diffoscope::diffoscope(&diffoscope.a, &diffoscope.b, &config.diffoscope).await?; print!("{}", output); } SubCommand::CheckConfig => { let json = serde_json::to_string_pretty(&config)?; println!("{}", json); } } Ok(()) } rebuilderd-worker-0.25.0/src/proc.rs000064400000000000000000000261211046102023000154420ustar 00000000000000use futures_util::FutureExt; use nix::sys::signal::{self, Signal}; use nix::unistd::Pid; use rebuilderd_common::errors::*; use std::cmp; use std::collections::HashMap; use std::ffi::OsStr; use std::fmt; use std::path::Path; use std::process::Stdio; use std::time::{Duration, Instant}; use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::process::{Child, Command}; use tokio::select; use tokio::time; const SIGKILL_DELAY: u64 = 10; pub struct Options { pub timeout: Duration, pub size_limit: Option, pub kill_at_size_limit: bool, pub passthrough: bool, pub envs: HashMap, } pub struct Capture<'a> { output: &'a mut Vec, timeout: Duration, size_limit: Option, kill_at_size_limit: bool, start: Instant, sigterm_sent: Option, truncated: bool, } pub fn capture(output: &mut Vec, opts: Options) -> Capture<'_> { let start = Instant::now(); Capture { output, timeout: opts.timeout, size_limit: opts.size_limit, kill_at_size_limit: opts.kill_at_size_limit, start, sigterm_sent: None, truncated: false, } } impl Capture<'_> { pub async fn push_bytes(&mut self, child: &mut Child, mut slice: &[u8]) -> Result<()> { if !self.truncated { if let Some(size_limit) = &self.size_limit { let n = cmp::min(size_limit - self.output.len(), slice.len()); if n < 1 { warn!( "Exceeding output limit: output={}, slice={}, limit={}", self.output.len(), slice.len(), size_limit ); let msg = format!("TRUNCATED DUE TO SIZE LIMIT: {} bytes", size_limit); self.truncate(child, &msg, self.kill_at_size_limit).await?; return Ok(()); } else { // truncate to stay within the limit slice = &slice[..n]; } } self.output.extend(slice); } Ok(()) } fn kill(pid: u32, signal: Signal) -> Result<()> { // convert 1234 to -1234 to kill grand-children too let pid = -(pid as i32); info!("Sending {} to child(pid={})", signal, pid); signal::kill(Pid::from_raw(pid), signal)?; Ok(()) } async fn truncate(&mut self, child: &mut Child, reason: &str, kill: bool) -> Result<()> { if kill { if let Some(pid) = child.id() { Self::kill(pid, Signal::SIGTERM)?; } self.sigterm_sent = Some(Instant::now()); } self.output.extend(format!("\n\n{}\n\n", reason).as_bytes()); self.truncated = true; Ok(()) } pub async fn next_wakeup( &mut self, child: &mut Child, stdout_open: &mut bool, stderr_open: &mut bool, ) -> Result { // check if we need to SIGKILL due to SIGTERM timeout if let Some(sigterm_sent) = self.sigterm_sent { if sigterm_sent.elapsed() > Duration::from_secs(SIGKILL_DELAY) { if let Some(pid) = child.id() { warn!( "child(pid={}) didn't terminate {}s after SIGTERM, sending SIGKILL", pid, SIGKILL_DELAY ); // child.id is going to return None after this Self::kill(pid, Signal::SIGKILL)?; *stdout_open = false; *stderr_open = false; } } } // check if the process timed out and we need to SIGTERM if let Some(remaining) = self.timeout.checked_sub(self.start.elapsed()) { return Ok(remaining); } else if self.sigterm_sent.is_none() { // the process has timed out, sending SIGTERM warn!("child timed out, killing..."); let msg = format!( "TRUNCATED DUE TO TIMEOUT: {} seconds", self.timeout.as_secs() ); self.truncate(child, &msg, true).await?; } // if we don't need any timeouts anymore we just return any value Ok(Duration::from_secs(SIGKILL_DELAY)) } } pub async fn run(bin: &Path, args: I, opts: Options, log: &mut Vec) -> Result where I: IntoIterator + fmt::Debug, S: AsRef, { info!("Running {:?} {:?}", bin, args); let mut cmd = Command::new(bin); cmd.args(args) .stdin(Stdio::null()) .stdout(Stdio::piped()) .stderr(Stdio::piped()) .envs(&opts.envs); unsafe { cmd.pre_exec(|| { // create a new process group let pid = nix::unistd::getpid(); if let Err(err) = nix::unistd::setpgid(pid, Pid::from_raw(0)) { warn!("Failed to create new process group: {:#?}", err); } Ok(()) }); } let mut child = cmd.spawn()?; let mut child_stdout = child.stdout.take().unwrap(); let mut child_stderr = child.stderr.take().unwrap(); let mut buf_stdout = [0u8; 4096]; let mut buf_stderr = [0u8; 4096]; let mut stdout = tokio::io::stdout(); let mut stderr = tokio::io::stderr(); let passthrough = opts.passthrough; let mut stdout_open = true; let mut stderr_open = true; let mut cap = capture(log, opts); let success = loop { let remaining = cap .next_wakeup(&mut child, &mut stdout_open, &mut stderr_open) .await?; if stdout_open || stderr_open { select! { n = child_stdout.read(&mut buf_stdout).fuse() => { let n = n?; trace!("read stdout: {}", n); if n == 0 { stdout_open = false; } else { cap.push_bytes(&mut child, &buf_stdout[..n]).await?; if passthrough { stdout.write_all(&buf_stdout[..n]).await?; } } }, n = child_stderr.read(&mut buf_stderr).fuse() => { let n = n?; trace!("read stderr: {}", n); if n == 0 { stderr_open = false; } else { cap.push_bytes(&mut child, &buf_stderr[..n]).await?; if passthrough { stderr.write_all(&buf_stderr[..n]).await?; } } }, _ = time::sleep(remaining).fuse() => continue, } } else { select! { status = child.wait().fuse() => { let status = status?; info!("{:?} exited with exit={}, captured {} bytes", bin, status, log.len()); break status.success(); } _ = time::sleep(remaining).fuse() => continue, } } }; Ok(success) } #[cfg(test)] mod tests { use super::*; async fn script(script: &str, opts: Options) -> Result<(bool, String, Duration)> { let start = Instant::now(); let path = Path::new("sh"); let mut output = Vec::new(); let success = run(path, &["-c", script], opts, &mut output).await?; let duration = start.elapsed(); let output = String::from_utf8_lossy(&output).into_owned(); Ok((success, output, duration)) } #[tokio::test] async fn hello_world() { let (success, output, _) = script( "/bin/echo hello world", Options { timeout: Duration::from_secs(600), size_limit: None, kill_at_size_limit: false, passthrough: false, envs: HashMap::new(), }, ) .await .unwrap(); assert!(success); assert_eq!(output, "hello world\n"); } #[tokio::test] async fn size_limit_no_kill() { let (success, output, _) = script( " for x in `seq 100`; do /bin/echo AAAAAAAAAAAAAAAAAAAAAAAA done ", Options { timeout: Duration::from_secs(600), size_limit: Some(50), kill_at_size_limit: false, passthrough: false, envs: HashMap::new(), }, ) .await .unwrap(); assert!(success); assert_eq!(output, "AAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAA\n\n\nTRUNCATED DUE TO SIZE LIMIT: 50 bytes\n\n"); } #[tokio::test] async fn size_limit_kill() { let (success, output, duration) = script( " for x in `seq 100`; do /bin/echo AAAAAAAAAAAAAAAAAAAAAAAA sleep 0.5 done ", Options { timeout: Duration::from_secs(600), size_limit: Some(50), kill_at_size_limit: true, passthrough: false, envs: HashMap::new(), }, ) .await .unwrap(); assert!(!success); assert_eq!(output, "AAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAA\n\n\nTRUNCATED DUE TO SIZE LIMIT: 50 bytes\n\n"); assert!(duration > Duration::from_secs(1)); assert!(duration < Duration::from_secs(5)); } #[tokio::test] async fn timeout() { let (success, output, duration) = script( " for x in `seq 100`; do /bin/echo AAAAAAAAAAAAAAAAAAAAAAAA sleep 1 done ", Options { timeout: Duration::from_millis(1500), size_limit: None, kill_at_size_limit: false, passthrough: false, envs: HashMap::new(), }, ) .await .unwrap(); assert!(!success); assert_eq!(output, "AAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAA\n\n\nTRUNCATED DUE TO TIMEOUT: 1 seconds\n\n"); assert!(duration > Duration::from_secs(1)); assert!(duration < Duration::from_secs(3)); } #[tokio::test] async fn size_limit_no_kill_but_timeout() { let (success, output, duration) = script( " for x in `seq 100`; do /bin/echo AAAAAAAAAAAAAAAAAAAAAAAA sleep 0.1 done ", Options { timeout: Duration::from_millis(1500), size_limit: Some(50), kill_at_size_limit: false, passthrough: false, envs: HashMap::new(), }, ) .await .unwrap(); assert!(!success); assert_eq!(output, "AAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAA\n\n\nTRUNCATED DUE TO SIZE LIMIT: 50 bytes\n\n\n\nTRUNCATED DUE TO TIMEOUT: 1 seconds\n\n"); assert!(duration > Duration::from_secs(1)); assert!(duration < Duration::from_secs(2)); } } rebuilderd-worker-0.25.0/src/rebuild.rs000064400000000000000000000221261046102023000161260ustar 00000000000000use crate::config; use crate::diffoscope::diffoscope; use crate::download::download; use crate::heartbeat::HeartBeat; use crate::proc; use in_toto::crypto::PrivateKey; use in_toto::runlib::in_toto_run; use rebuilderd_common::api::{BuildStatus, Rebuild}; use rebuilderd_common::errors::Context as _; use rebuilderd_common::errors::*; use rebuilderd_common::PkgArtifact; use std::collections::HashMap; use std::fs; use std::io::ErrorKind; use std::path::Path; use std::time::Duration; use tokio::fs::File; use tokio::io::AsyncReadExt; use tokio::select; use tokio::time; pub struct Context<'a> { pub artifacts: Vec, pub input_url: Option, pub backend: config::Backend, pub build: config::Build, pub diffoscope: config::Diffoscope, pub privkey: &'a PrivateKey, } fn path_to_string(path: &Path) -> Result { let s = path .to_str() .with_context(|| anyhow!("Path contains invalid characters: {:?}", path))?; Ok(s.to_string()) } pub async fn compare_files(a: &Path, b: &Path) -> Result { let mut buf1 = [0u8; 4096]; let mut buf2 = [0u8; 4096]; info!("Comparing {:?} with {:?}", a, b); let mut f1 = File::open(a) .await .with_context(|| anyhow!("Failed to open {:?}", a))?; let mut f2 = File::open(b) .await .with_context(|| anyhow!("Failed to open {:?}", b))?; let mut pos = 0; loop { // read up to 4k bytes from the first file let n = f1.read_buf(&mut &mut buf1[..]).await?; // check if the first file is end-of-file if n == 0 { debug!("First file is at end-of-file"); // check if other file is eof too let n = f2.read_buf(&mut &mut buf2[..]).await?; if n > 0 { info!("Files are not identical, {:?} is longer", b); return Ok(false); } else { return Ok(true); } } // check the same chunk in the other file match f2.read_exact(&mut buf2[..n]).await { Ok(n) => n, Err(err) if err.kind() == ErrorKind::UnexpectedEof => { info!("Files are not identical, {:?} is shorter", b); return Ok(false); } err => err?, }; if buf1[..n] != buf2[..n] { // get the exact position // this can't panic because we've already checked the slices are not equal let pos = pos + buf1[..n] .iter() .zip(buf2[..n].iter()) .position(|(a, b)| a != b) .unwrap(); info!("Files {:?} and {:?} differ at position {}", a, b, pos); return Ok(false); } // advance the number of bytes that are equal pos += n; } } pub async fn rebuild_with_heartbeat( ctx: &Context<'_>, log: &mut Vec, hb: &dyn HeartBeat, ) -> Result> { let mut rebuild = Box::pin(rebuild(ctx, log)); loop { select! { res = &mut rebuild => { return res; }, _ = time::sleep(hb.interval()) => hb.ping().await?, } } } pub async fn rebuild(ctx: &Context<'_>, log: &mut Vec) -> Result> { // setup let tmp = tempfile::Builder::new().prefix("rebuilderd").tempdir()?; let inputs_dir = tmp.path().join("inputs"); fs::create_dir(&inputs_dir).context("Failed to create inputs/ temp dir")?; let out_dir = tmp.path().join("out"); fs::create_dir(&out_dir).context("Failed to create out/ temp dir")?; // download let mut artifacts = Vec::new(); for artifact in &ctx.artifacts { let artifact_filename = download(&artifact.url, &inputs_dir) .await .with_context(|| { anyhow!( "Failed to download original package from {:?}", artifact.url ) })?; let artifact_path = inputs_dir.join(&artifact_filename); artifacts.push((artifact.clone(), artifact_filename, artifact_path)); } let input_filename = if let Some(input_url) = &ctx.input_url { download(input_url, &inputs_dir) .await .with_context(|| anyhow!("Failed to download build input from {:?}", input_url))? } else { artifacts .first() .context("Failed to use first artifact as build input")? .1 .to_owned() }; let input_path = inputs_dir.join(&input_filename); // rebuild verify(ctx, log, &out_dir, &input_path).await?; // process results let mut results = Vec::new(); for (artifact, artifact_filename, artifact_path) in artifacts { let output_path = out_dir.join(&artifact_filename); let result = if !output_path.exists() { info!( "No output artifact found, marking as BAD: {:?}", output_path ); Rebuild::new(BuildStatus::Bad) } else if compare_files(&artifact_path, &output_path).await? { info!( "Output artifacts is identical, marking as GOOD: {:?}", output_path ); let mut res = Rebuild::new(BuildStatus::Good); info!("Generating signed link"); match in_toto_run( &format!("rebuild {}", artifact_filename.to_str().unwrap()), None, &[input_path .to_str() .ok_or_else(|| anyhow!("Input path contains invalid characters"))?], &[output_path .to_str() .ok_or_else(|| anyhow!("Output path contains invalid characters"))?], &[], Some(ctx.privkey), Some(&["sha512", "sha256"]), Some(&[ &format!("{}/", inputs_dir.to_str().unwrap()), &format!("{}/", out_dir.to_str().unwrap()), ]), ) { Ok(signed_link) => { info!("Signed link generated"); let attestation = serde_json::to_string(&signed_link) .context("Failed to serialize attestation")?; res.attestation = Some(attestation); } Err(err) => warn!("Failed to generate in-toto attestation: {:#?}", err), } res } else { info!("Output artifact differs, marking as BAD: {:?}", output_path); let mut res = Rebuild::new(BuildStatus::Bad); // generate diffoscope diff if enabled if ctx.diffoscope.enabled { let diff = diffoscope(&artifact_path, &output_path, &ctx.diffoscope) .await .context("Failed to run diffoscope")?; res.diffoscope = Some(diff); } res }; results.push((artifact, result)); } Ok(results) } async fn verify( ctx: &Context<'_>, log: &mut Vec, out_dir: &Path, input_path: &Path, ) -> Result<()> { let bin = &ctx.backend.path; let timeout = ctx.build.timeout.unwrap_or(3600 * 24); // 24h let mut envs = HashMap::new(); envs.insert("REBUILDERD_OUTDIR".into(), path_to_string(out_dir)?); let opts = proc::Options { timeout: Duration::from_secs(timeout), size_limit: ctx.build.max_bytes, kill_at_size_limit: false, passthrough: !ctx.build.silent, envs, }; proc::run(bin.as_ref(), &[input_path], opts, log).await?; Ok(()) } #[cfg(test)] mod tests { use super::*; #[tokio::test] async fn compare_files_equal() { let equal = compare_files(Path::new("src/main.rs"), Path::new("src/main.rs")) .await .unwrap(); assert!(equal); } #[tokio::test] async fn compare_files_not_equal1() { let equal = compare_files(Path::new("src/main.rs"), Path::new("Cargo.toml")) .await .unwrap(); assert!(!equal); } #[tokio::test] async fn compare_files_not_equal2() { let equal = compare_files(Path::new("Cargo.toml"), Path::new("src/main.rs")) .await .unwrap(); assert!(!equal); } #[tokio::test] async fn compare_large_files_equal() { let dir = tempfile::tempdir().unwrap(); fs::write(dir.path().join("a"), [0u8; 4096 * 100]).unwrap(); fs::write(dir.path().join("b"), [0u8; 4096 * 100]).unwrap(); let equal = compare_files(&dir.path().join("a"), &dir.path().join("b")) .await .unwrap(); assert!(equal); } #[tokio::test] async fn compare_large_files_not_equal() { let dir = tempfile::tempdir().unwrap(); fs::write(dir.path().join("a"), [0u8; 4096 * 100]).unwrap(); fs::write(dir.path().join("b"), [1u8; 4096 * 100]).unwrap(); let equal = compare_files(&dir.path().join("a"), &dir.path().join("b")) .await .unwrap(); assert!(!equal); } } rebuilderd-worker-0.25.0/src/setup.rs000064400000000000000000000004731046102023000156410ustar 00000000000000use rebuilderd_common::errors::*; use std::env; use std::fs; pub fn run(name: &str) -> Result<()> { let work_dir = format!("/var/lib/rebuilderd-worker/{}", name); info!("switching into work directory: {}", work_dir); fs::create_dir_all(&work_dir)?; env::set_current_dir(&work_dir)?; Ok(()) }