rebuilderd-common-0.22.1/.cargo_vcs_info.json0000644000000001440000000000100145240ustar { "git": { "sha1": "0df3e3f9cbdd02edd52d5a2bbde9e42718c2e268" }, "path_in_vcs": "common" }rebuilderd-common-0.22.1/Cargo.lock0000644000001332770000000000100125150ustar # 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.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[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.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", "once_cell", "windows-sys 0.59.0", ] [[package]] name = "anyhow" version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", "windows-targets", ] [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bumpalo" version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" version = "1.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" dependencies = [ "shlex", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[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.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", "windows-link", ] [[package]] name = "clap" version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", "clap_derive", ] [[package]] name = "clap_builder" version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", ] [[package]] name = "clap_derive" version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", "syn", ] [[package]] name = "clap_lex" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[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.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" 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 = "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 = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[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-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-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-core", "futures-io", "futures-macro", "futures-sink", "futures-task", "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", "libc", "wasi", "wasm-bindgen", ] [[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" 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.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", "http", "http-body", "pin-project-lite", ] [[package]] name = "httparse" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "hyper" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", "http", "http-body", "httparse", "itoa", "pin-project-lite", "smallvec", "tokio", "want", ] [[package]] name = "hyper-rustls" version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", "hyper", "hyper-util", "rustls", "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", ] [[package]] name = "hyper-util" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http", "http-body", "hyper", "pin-project-lite", "socket2", "tokio", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "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 = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_locid" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", "zerovec", ] [[package]] name = "icu_locid_transform" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", "icu_provider", "tinystr", "zerovec", ] [[package]] name = "icu_locid_transform_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" [[package]] name = "icu_normalizer" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", "utf16_iter", "utf8_iter", "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] name = "icu_properties" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", "icu_collections", "icu_locid_transform", "icu_properties_data", "icu_provider", "tinystr", "zerovec", ] [[package]] name = "icu_properties_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] name = "icu_provider" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ "displaydoc", "icu_locid", "icu_provider_macros", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_provider_macros" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", "syn", ] [[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.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ "icu_normalizer", "icu_properties", ] [[package]] name = "indexmap" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "ipnet" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[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.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[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.170" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" [[package]] name = "libredox" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags", "libc", ] [[package]] name = "litemap" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "log" version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] [[package]] name = "mio" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "wasi", "windows-sys 0.52.0", ] [[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.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "openssl-probe" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[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 = "ppv-lite86" version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ "zerocopy", ] [[package]] name = "proc-macro2" version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quinn" version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", "rustls", "socket2", "thiserror 2.0.11", "tokio", "tracing", ] [[package]] name = "quinn-proto" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", "getrandom", "rand", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", "thiserror 2.0.11", "tinyvec", "tracing", "web-time", ] [[package]] name = "quinn-udp" version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", "once_cell", "socket2", "tracing", "windows-sys 0.59.0", ] [[package]] name = "quote" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", ] [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "rebuilderd-common" version = "0.22.1" dependencies = [ "anyhow", "chrono", "clap", "colored", "dirs-next", "log", "reqwest", "serde", "toml", "url", ] [[package]] name = "redox_users" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", "thiserror 1.0.69", ] [[package]] name = "reqwest" version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64", "bytes", "futures-channel", "futures-core", "futures-util", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", "hyper-util", "ipnet", "js-sys", "log", "mime", "once_cell", "percent-encoding", "pin-project-lite", "quinn", "rustls", "rustls-native-certs", "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", "tokio-rustls", "tokio-util", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", "windows-registry", ] [[package]] name = "ring" version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" dependencies = [ "cc", "cfg-if", "getrandom", "libc", "untrusted", "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustls" version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" 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-pemfile" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ "rustls-pki-types", ] [[package]] name = "rustls-pki-types" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" dependencies = [ "web-time", ] [[package]] name = "rustls-webpki" version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", "untrusted", ] [[package]] name = "rustversion" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[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.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" 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.218" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "itoa", "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" 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 = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.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 = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" 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.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", "syn", ] [[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.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ "thiserror-impl 2.0.11", ] [[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.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tinystr" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", "zerovec", ] [[package]] name = "tinyvec" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" 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.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", "libc", "mio", "pin-project-lite", "socket2", "windows-sys 0.52.0", ] [[package]] name = "tokio-rustls" version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", "tokio", ] [[package]] name = "tokio-util" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", ] [[package]] name = "toml" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit", ] [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] [[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-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.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 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.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[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 = "utf16_iter" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" [[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 = "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.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[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-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.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ "windows-targets", ] [[package]] name = "windows-link" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" [[package]] name = "windows-registry" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", "windows-targets", ] [[package]] name = "windows-result" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ "windows-targets", ] [[package]] name = "windows-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", "windows-targets", ] [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] [[package]] name = "write16" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] name = "writeable" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "yoke" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerocopy" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 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 = "zerovec" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "yoke", "zerofrom", "zerovec-derive", ] [[package]] name = "zerovec-derive" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", "syn", ] rebuilderd-common-0.22.1/Cargo.toml0000644000000026540000000000100125320ustar # 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-common" version = "0.22.1" authors = ["kpcyrd "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "rebuilderd - common code" readme = false license = "GPL-3.0-or-later" repository = "https://github.com/kpcyrd/rebuilderd" [lib] name = "rebuilderd_common" path = "src/lib.rs" [dependencies.anyhow] version = "1.0.58" [dependencies.chrono] version = "0.4.19" features = ["serde"] [dependencies.clap] version = "4.5.21" features = ["derive"] [dependencies.colored] version = "3" [dependencies.dirs-next] version = "2.0.0" [dependencies.log] version = "0.4.17" [dependencies.reqwest] version = "0.12" features = [ "blocking", "json", "stream", "rustls-tls-native-roots", ] default-features = false [dependencies.serde] version = "1.0.137" features = ["derive"] [dependencies.toml] version = "0.8" [dependencies.url] version = "2.2.2" rebuilderd-common-0.22.1/Cargo.toml.orig000064400000000000000000000013261046102023000162060ustar 00000000000000[package] name = "rebuilderd-common" version = "0.22.1" description = "rebuilderd - common code" authors = ["kpcyrd "] license = "GPL-3.0-or-later" repository = "https://github.com/kpcyrd/rebuilderd" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] anyhow = "1.0.58" chrono = { version = "0.4.19", features = ["serde"] } clap = { version = "4.5.21", features = ["derive"] } colored = "3" dirs-next = "2.0.0" log = "0.4.17" reqwest = { version = "0.12", features = ["blocking", "json", "stream", "rustls-tls-native-roots"], default-features = false } serde = { version = "1.0.137", features = ["derive"] } toml = "0.8" url = "2.2.2" rebuilderd-common-0.22.1/src/api.rs000064400000000000000000000317731046102023000152360ustar 00000000000000use crate::config::ConfigFile; use crate::errors::*; use crate::{auth, http, PkgArtifact, PkgGroup, PkgRelease, Status}; use chrono::prelude::*; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::collections::HashMap; use std::env; use url::Url; pub const AUTH_COOKIE_HEADER: &str = "X-Auth-Cookie"; pub const WORKER_KEY_HEADER: &str = "X-Worker-Key"; pub const SIGNUP_SECRET_HEADER: &str = "X-Signup-Secret"; pub struct Client { endpoint: Url, client: http::Client, is_default_endpoint: bool, auth_cookie: Option, worker_key: Option, signup_secret: Option, } impl Client { pub fn new(config: ConfigFile, endpoint: Option) -> Result { let (endpoint, auth_cookie, is_default_endpoint) = if let Some(endpoint) = endpoint { let cookie = config .endpoints .get(&endpoint) .map(|e| e.cookie.to_string()); (endpoint, cookie, false) } else if let Some(endpoint) = config.http.endpoint { (endpoint, None, true) } else { ("http://127.0.0.1:8484".to_string(), None, true) }; let mut endpoint = endpoint .parse::() .with_context(|| anyhow!("Failed to parse endpoint as url: {:?}", endpoint))?; // If the url ends with a slash, remove it endpoint .path_segments_mut() .map_err(|_| anyhow!("Given endpoint url cannot be base"))? .pop_if_empty(); debug!("Setting rebuilderd endpoint to {:?}", endpoint.as_str()); let client = http::client()?; Ok(Client { endpoint, client, is_default_endpoint, auth_cookie, worker_key: None, signup_secret: None, }) } pub fn with_auth_cookie(&mut self) -> Result<&mut Self> { if let Ok(cookie_path) = env::var("REBUILDERD_COOKIE_PATH") { debug!("Found cookie path in environment: {:?}", cookie_path); let auth_cookie = auth::read_cookie_from_file(cookie_path).context("Failed to load auth cookie")?; Ok(self.auth_cookie(auth_cookie)) } else if self.is_default_endpoint { let auth_cookie = auth::find_auth_cookie().context("Failed to load auth cookie")?; Ok(self.auth_cookie(auth_cookie)) } else { Ok(self) } } pub fn auth_cookie>(&mut self, cookie: I) -> &mut Self { self.auth_cookie = Some(cookie.into()); self } pub fn worker_key>(&mut self, key: I) { self.worker_key = Some(key.into()); } pub fn signup_secret>(&mut self, secret: I) { self.signup_secret = Some(secret.into()); } fn url_join(&self, route: &str) -> Url { let mut url = self.endpoint.clone(); { // this unwrap is safe because we've called path_segments_mut in the constructor before let mut path = url.path_segments_mut().expect("Url cannot be base"); for segment in route.split('/') { path.push(segment); } } url } pub fn get(&self, path: Cow<'static, str>) -> http::RequestBuilder { let mut req = self.client.get(self.url_join(&path)); if let Some(auth_cookie) = &self.auth_cookie { req = req.header(AUTH_COOKIE_HEADER, auth_cookie); } if let Some(worker_key) = &self.worker_key { req = req.header(WORKER_KEY_HEADER, worker_key); } if let Some(signup_secret) = &self.signup_secret { req = req.header(SIGNUP_SECRET_HEADER, signup_secret); } req } pub fn post(&self, path: Cow<'static, str>) -> http::RequestBuilder { let mut req = self.client.post(self.url_join(&path)); if let Some(auth_cookie) = &self.auth_cookie { req = req.header(AUTH_COOKIE_HEADER, auth_cookie); } if let Some(worker_key) = &self.worker_key { req = req.header(WORKER_KEY_HEADER, worker_key); } if let Some(signup_secret) = &self.signup_secret { req = req.header(SIGNUP_SECRET_HEADER, signup_secret); } req } pub async fn list_workers(&self) -> Result> { let workers = self .get(Cow::Borrowed("api/v0/workers")) .send() .await? .error_for_status()? .json() .await?; Ok(workers) } pub async fn sync_suite(&self, import: &SuiteImport) -> Result<()> { self.post(Cow::Borrowed("api/v0/pkgs/sync")) .json(import) .send() .await? .error_for_status()?; Ok(()) } pub async fn list_pkgs(&self, list: &ListPkgs) -> Result> { let pkgs = self .get(Cow::Borrowed("api/v0/pkgs/list")) .query(list) .send() .await? .error_for_status()? .json() .await?; Ok(pkgs) } pub async fn match_one_pkg(&self, list: &ListPkgs) -> Result { let pkgs = self.list_pkgs(list).await?; if pkgs.len() > 1 { bail!("Filter matched too many packages: {}", pkgs.len()); } let pkg = pkgs .into_iter() .next() .context("Filter didn't match any packages on this rebuilder")?; Ok(pkg) } pub async fn fetch_log(&self, id: i32) -> Result> { let log = self .get(Cow::Owned(format!("api/v0/builds/{}/log", id))) .send() .await? .error_for_status()? .bytes() .await?; Ok(log.to_vec()) } pub async fn fetch_diffoscope(&self, id: i32) -> Result> { let log = self .get(Cow::Owned(format!("api/v0/builds/{}/diffoscope", id))) .send() .await? .error_for_status()? .bytes() .await?; Ok(log.to_vec()) } pub async fn fetch_attestation(&self, id: i32) -> Result> { let attestation = self .get(Cow::Owned(format!("api/v0/builds/{}/attestation", id))) .send() .await? .error_for_status()? .bytes() .await?; Ok(attestation.to_vec()) } pub async fn list_queue(&self, list: &ListQueue) -> Result { let pkgs = self .post(Cow::Borrowed("api/v0/queue/list")) .json(list) .send() .await? .error_for_status()? .json() .await?; Ok(pkgs) } pub async fn push_queue(&self, push: &PushQueue) -> Result<()> { self.post(Cow::Borrowed("api/v0/queue/push")) .json(push) .send() .await? .error_for_status()? .json() .await .map_err(Error::from) } pub async fn pop_queue(&self, query: &WorkQuery) -> Result { let assignment = self .post(Cow::Borrowed("api/v0/queue/pop")) .json(query) .send() .await? .error_for_status()? .json() .await?; Ok(assignment) } pub async fn drop_queue(&self, query: &DropQueueItem) -> Result<()> { self.post(Cow::Borrowed("api/v0/queue/drop")) .json(query) .send() .await? .error_for_status()? .json() .await .map_err(Error::from) } pub async fn requeue_pkgs(&self, requeue: &RequeueQuery) -> Result<()> { self.post(Cow::Borrowed("api/v0/pkg/requeue")) .json(requeue) .send() .await? .error_for_status()? .json() .await .map_err(Error::from) } pub async fn ping_build(&self, body: &PingRequest) -> Result<()> { self.post(Cow::Borrowed("api/v0/build/ping")) .json(body) .send() .await? .error_for_status()?; Ok(()) } pub async fn report_build(&self, ticket: &BuildReport) -> Result<()> { self.post(Cow::Borrowed("api/v0/build/report")) .json(ticket) .send() .await? .error_for_status()?; Ok(()) } } #[derive(Debug, Serialize, Deserialize)] pub enum Success { Ok, } #[derive(Debug, Serialize, Deserialize)] pub struct Worker { pub key: String, pub addr: String, pub status: Option, pub last_ping: NaiveDateTime, pub online: bool, } #[derive(Debug, Serialize, Deserialize)] pub struct WorkQuery { pub supported_backends: Vec, } #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum JobAssignment { Nothing, Rebuild(Box), } #[derive(Debug, Serialize, Deserialize)] pub struct SuiteImport { pub distro: String, pub suite: String, pub groups: Vec, } #[derive(Debug, Serialize, Deserialize)] pub struct ListPkgs { pub name: Option, pub status: Option, pub distro: Option, pub suite: Option, pub architecture: Option, } #[derive(Debug, Serialize, Deserialize)] pub struct QueueList { pub now: NaiveDateTime, pub queue: Vec, } #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct QueueItem { pub id: i32, pub pkgbase: PkgGroup, pub version: String, pub queued_at: NaiveDateTime, pub worker_id: Option, pub started_at: Option, pub last_ping: Option, } #[derive(Debug, Serialize, Deserialize)] pub struct ListQueue { pub limit: Option, } #[derive(Debug, Serialize, Deserialize)] pub struct PushQueue { pub name: String, pub version: Option, pub priority: i32, pub distro: String, pub suite: String, pub architecture: Option, } #[derive(Debug, Serialize, Deserialize)] pub struct DropQueueItem { pub name: String, pub version: Option, pub distro: String, pub suite: String, pub architecture: Option, } #[derive(Debug, Serialize, Deserialize)] pub struct RequeueQuery { pub name: Option, pub status: Option, pub priority: i32, pub distro: Option, pub suite: Option, pub architecture: Option, pub reset: bool, } #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum BuildStatus { Good, Bad, Fail, } #[derive(Debug, Serialize, Deserialize)] pub struct Rebuild { pub status: BuildStatus, pub diffoscope: Option, pub attestation: Option, } impl Rebuild { pub fn new(status: BuildStatus) -> Rebuild { Rebuild { status, diffoscope: None, attestation: None, } } } #[derive(Debug, Serialize, Deserialize)] pub struct BuildReport { pub queue: QueueItem, pub build_log: String, pub rebuilds: Vec<(PkgArtifact, Rebuild)>, } #[derive(Debug, Serialize, Deserialize)] pub struct DashboardResponse { pub suites: HashMap, pub active_builds: Vec, pub queue_length: usize, pub now: NaiveDateTime, } #[derive(Debug, Default, Serialize, Deserialize)] pub struct SuiteStats { pub good: usize, pub unknown: usize, pub bad: usize, } #[derive(Debug, Default, Serialize, Deserialize)] pub struct PingRequest { pub queue_id: i32, } #[cfg(test)] mod tests { use super::*; #[test] fn test_endpoint_format_default() { let client = Client::new(ConfigFile::default(), None).unwrap(); assert_eq!(client.endpoint, "http://127.0.0.1:8484".parse().unwrap()); } #[test] fn test_endpoint_format_example_com() { let client = Client::new(ConfigFile::default(), Some("https://example.com".into())).unwrap(); assert_eq!(client.endpoint, "https://example.com".parse().unwrap()); } #[test] fn test_endpoint_format_example_com_trailing_slash() { let client = Client::new(ConfigFile::default(), Some("https://example.com/".into())).unwrap(); assert_eq!(client.endpoint, "https://example.com".parse().unwrap()); } #[test] fn test_endpoint_format_example_com_with_path() { let client = Client::new( ConfigFile::default(), Some("https://example.com/re/build".into()), ) .unwrap(); assert_eq!( client.endpoint, "https://example.com/re/build".parse().unwrap() ); } #[test] fn test_endpoint_format_example_com_with_path_trailing_slash() { let client = Client::new( ConfigFile::default(), Some("https://example.com/re/build/".into()), ) .unwrap(); assert_eq!( client.endpoint, "https://example.com/re/build".parse().unwrap() ); } } rebuilderd-common-0.22.1/src/auth.rs000064400000000000000000000047271046102023000154250ustar 00000000000000use crate::errors::*; use serde::Deserialize; use std::env; use std::fs; use std::path::Path; const SYSTEM_CONFIG_PATH: &str = "/etc/rebuilderd.conf"; const SYSTEM_COOKIE_PATH: &str = "/var/lib/rebuilderd/auth-cookie"; #[derive(Debug, Default, Deserialize)] pub struct Config { #[serde(default)] pub auth: AuthConfig, } #[derive(Debug, Default, Clone, Deserialize)] pub struct AuthConfig { pub cookie: Option, } impl AuthConfig { pub fn update(&mut self, c: AuthConfig) { if c.cookie.is_some() { self.cookie = c.cookie; } } } fn read_cookie_from_config>(path: P) -> Result> { debug!("Attempting reading cookie from config: {:?}", path.as_ref()); if let Ok(buf) = fs::read_to_string(path.as_ref()) { let config = toml::from_str::(&buf)?; debug!("Found cookie in config {:?}", path.as_ref()); Ok(config.auth.cookie) } else { Ok(None) } } pub fn read_cookie_from_file>(path: P) -> Result { debug!("Attempting reading cookie from file: {:?}", path.as_ref()); let cookie = fs::read_to_string(path.as_ref())?; debug!("Found cookie in file {:?}", path.as_ref()); Ok(cookie.trim().to_string()) } pub fn find_auth_cookie() -> Result { if let Ok(cookie_path) = env::var("REBUILDERD_COOKIE_PATH") { debug!("Using auth cookie from cookie path env: {cookie_path:?}"); return read_cookie_from_file(cookie_path); } if let Some(config_dir) = dirs_next::config_dir() { let path = config_dir.join("rebuilderd.conf"); if let Some(cookie) = read_cookie_from_config(&path)? { debug!("Using auth cookie from user-config: {path:?}"); return Ok(cookie); } } if let Some(cookie) = read_cookie_from_config(SYSTEM_CONFIG_PATH)? { debug!("Using auth cookie from system-config: {SYSTEM_CONFIG_PATH:?}"); return Ok(cookie); } if let Ok(cookie) = read_cookie_from_file(SYSTEM_COOKIE_PATH) { debug!("Using auth cookie from system-daemon: {SYSTEM_COOKIE_PATH:?}"); return Ok(cookie); } if let Some(data_dir) = dirs_next::data_dir() { let path = data_dir.join("rebuilderd-auth-cookie"); if let Ok(cookie) = read_cookie_from_file(&path) { debug!("Using auth cookie from user-daemon: {path:?}"); return Ok(cookie); } } bail!("Failed to find auth cookie anywhere") } rebuilderd-common-0.22.1/src/config.rs000064400000000000000000000074531046102023000157300ustar 00000000000000use crate::auth::AuthConfig; use crate::errors::*; use serde::Deserialize; use std::collections::HashMap; use std::fs; use std::path::{Path, PathBuf}; pub const IDLE_DELAY: u64 = 180; pub const PING_DEADLINE: i64 = PING_INTERVAL as i64 * 9; pub const PING_INTERVAL: u64 = 60; pub const WORKER_DELAY: u64 = 3; pub const API_ERROR_DELAY: u64 = 30; pub const DEFAULT_RETRY_DELAY_BASE: i64 = 24; pub fn load>(path: Option

) -> Result { let mut config = ConfigFile::default(); if let Some(c) = load_from("/etc/rebuilderd.conf")? { config.update(c); } if let Ok(path) = config_path() { if let Some(c) = load_from(path)? { config.update(c); } } if let Some(path) = path { let c = load_from(path)?.ok_or_else(|| format_err!("Failed to read config file"))?; config.update(c); } Ok(config) } fn config_path() -> Result { let config_dir = dirs_next::config_dir().ok_or_else(|| format_err!("Failed to find config dir"))?; Ok(config_dir.join("rebuilderd.conf")) } fn load_from>(path: P) -> Result> { if let Ok(buf) = fs::read_to_string(path.as_ref()) { debug!("loading config file {:?}", path.as_ref()); let config = toml::from_str(&buf).context("Failed to load config")?; Ok(Some(config)) } else { Ok(None) } } #[derive(Debug, Default, Clone, Deserialize)] pub struct ConfigFile { #[serde(default)] pub http: HttpConfig, #[serde(default)] pub auth: AuthConfig, #[serde(default)] pub endpoints: HashMap, #[serde(default)] pub worker: WorkerConfig, #[serde(default)] pub schedule: ScheduleConfig, } impl ConfigFile { pub fn update(&mut self, c: ConfigFile) { self.http.update(c.http); self.auth.update(c.auth); for (k, v) in c.endpoints { if let Some(o) = self.endpoints.get_mut(&k) { o.update(v); } else { self.endpoints.insert(k, v); } } self.worker.update(c.worker); self.schedule.update(c.schedule); } } #[derive(Debug, Default, Clone, Deserialize)] pub struct HttpConfig { pub bind_addr: Option, pub real_ip_header: Option, pub post_body_size_limit: Option, pub endpoint: Option, } impl HttpConfig { pub fn update(&mut self, c: HttpConfig) { if c.bind_addr.is_some() { self.bind_addr = c.bind_addr; } if c.real_ip_header.is_some() { self.real_ip_header = c.real_ip_header; } if c.endpoint.is_some() { self.endpoint = c.endpoint; } } } #[derive(Debug, Default, Clone, Deserialize)] pub struct EndpointConfig { pub cookie: String, } impl EndpointConfig { pub fn update(&mut self, c: EndpointConfig) { self.cookie = c.cookie; } } #[derive(Debug, Default, Clone, Deserialize)] pub struct WorkerConfig { #[serde(default)] pub authorized_workers: Vec, pub signup_secret: Option, } impl WorkerConfig { pub fn update(&mut self, c: WorkerConfig) { if !c.authorized_workers.is_empty() { self.authorized_workers = c.authorized_workers; } if c.signup_secret.is_some() { self.signup_secret = c.signup_secret; } } } #[derive(Debug, Default, Clone, Deserialize)] pub struct ScheduleConfig { retry_delay_base: Option, } impl ScheduleConfig { pub fn update(&mut self, c: ScheduleConfig) { if c.retry_delay_base.is_some() { self.retry_delay_base = c.retry_delay_base; } } pub fn retry_delay_base(&self) -> i64 { self.retry_delay_base.unwrap_or(DEFAULT_RETRY_DELAY_BASE) } } rebuilderd-common-0.22.1/src/errors.rs000064400000000000000000000001641046102023000157670ustar 00000000000000pub use anyhow::{anyhow, bail, format_err, Context, Error, Result}; pub use log::{debug, error, info, trace, warn}; rebuilderd-common-0.22.1/src/http.rs000064400000000000000000000003651046102023000154350ustar 00000000000000use crate::errors::*; pub use reqwest::{Client, RequestBuilder}; use std::time::Duration; pub fn client() -> Result { Client::builder() .read_timeout(Duration::from_secs(60)) .build() .map_err(Error::from) } rebuilderd-common-0.22.1/src/lib.rs000064400000000000000000000073631046102023000152310ustar 00000000000000use crate::errors::*; use chrono::NaiveDateTime; use colored::*; use serde::{Deserialize, Serialize}; use std::iter::FromIterator; use std::ops::Deref; use std::str::FromStr; pub mod api; pub mod auth; pub mod config; pub mod errors; pub mod http; pub mod utils; #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct PkgRelease { pub name: String, pub version: String, pub status: Status, pub distro: String, pub suite: String, pub architecture: String, pub artifact_url: String, pub build_id: Option, pub built_at: Option, pub has_diffoscope: bool, pub has_attestation: bool, } impl PkgRelease { pub fn new( name: String, version: String, distro: String, suite: String, architecture: String, artifact_url: String, ) -> PkgRelease { PkgRelease { name, version, status: Status::Unknown, distro, suite, architecture, artifact_url, build_id: None, built_at: None, has_diffoscope: false, has_attestation: false, } } } #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct PkgGroup { pub name: String, pub version: String, pub distro: String, pub suite: String, pub architecture: String, pub input_url: Option, pub artifacts: Vec, } #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct PkgArtifact { pub name: String, pub version: String, pub url: String, } impl PkgGroup { pub fn new( name: String, version: String, distro: String, suite: String, architecture: String, input_url: Option, ) -> PkgGroup { PkgGroup { name, version, distro, suite, architecture, input_url, artifacts: Vec::new(), } } pub fn add_artifact(&mut self, artifact: PkgArtifact) { self.artifacts.push(artifact); } pub fn input_url(&self) -> Result<&str> { if let Some(input_url) = &self.input_url { Ok(input_url.as_str()) } else if !self.artifacts.is_empty() { let mut artifacts = Vec::from_iter(self.artifacts.iter().collect::>()); artifacts.sort_by_key(|a| &a.name); // we've checked that artifacts is not empty let input = artifacts.into_iter().next().unwrap(); Ok(&input.url) } else { bail!("Package group has no artifacts") } } } #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, clap::ValueEnum)] pub enum Status { #[serde(rename = "GOOD")] #[clap(name = "GOOD")] Good, #[serde(rename = "BAD")] #[clap(name = "BAD")] Bad, #[serde(rename = "UNKWN")] #[clap(name = "UNKWN")] Unknown, } impl Status { pub fn fancy(&self) -> String { match self { Status::Good => "GOOD ".green().to_string(), Status::Bad => "BAD ".red().to_string(), Status::Unknown => "UNKWN".yellow().to_string(), } } } impl Deref for Status { type Target = str; fn deref(&self) -> &'static str { match self { Status::Good => "GOOD", Status::Bad => "BAD", Status::Unknown => "UNKWN", } } } impl FromStr for Status { type Err = Error; fn from_str(s: &str) -> Result { match s { "GOOD" => Ok(Status::Good), "BAD" => Ok(Status::Bad), "UNKWN" => Ok(Status::Unknown), _ => bail!("Unknown status: {:?}", s), } } } rebuilderd-common-0.22.1/src/utils.rs000064400000000000000000000026701046102023000156170ustar 00000000000000pub fn secs_to_human(duration: i64) -> String { let secs = duration % 60; let mins = duration / 60; let hours = mins / 60; let mins = mins % 60; let mut out = Vec::new(); if hours > 0 { out.push(format!("{:2}h", hours)); } if mins > 0 || hours > 0 { out.push(format!("{:2}m", mins)); } out.push(format!("{:2}s", secs)); out.join(" ") } #[cfg(test)] mod tests { use super::*; #[test] fn test_secs_to_human_0s() { let x = secs_to_human(0); assert_eq!(x, " 0s"); } #[test] fn test_secs_to_human_1s() { let x = secs_to_human(1); assert_eq!(x, " 1s"); } #[test] fn test_secs_to_human_1m() { let x = secs_to_human(60); assert_eq!(x, " 1m 0s"); } #[test] fn test_secs_to_human_1m_30s() { let x = secs_to_human(90); assert_eq!(x, " 1m 30s"); } #[test] fn test_secs_to_human_10m_30s() { let x = secs_to_human(630); assert_eq!(x, "10m 30s"); } #[test] fn test_secs_to_human_1h() { let x = secs_to_human(3600); assert_eq!(x, " 1h 0m 0s"); } #[test] fn test_secs_to_human_12h_10m_30s() { let x = secs_to_human(3600 * 12 + 600 + 30); assert_eq!(x, "12h 10m 30s"); } #[test] fn test_secs_to_human_100h() { let x = secs_to_human(3600 * 100); assert_eq!(x, "100h 0m 0s"); } }