summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrorka900 <rorka900@gmail.com>2026-03-19 11:44:27 +0000
committerrorka900 <rorka900@gmail.com>2026-03-19 11:44:27 +0000
commit693f5143adb352b9fa1ee262b3537f6e429678f9 (patch)
treeb8c9bc10fc0901bcbfd3c1d5990b70d601a08828
downloadror-693f5143adb352b9fa1ee262b3537f6e429678f9.tar.gz
ror-693f5143adb352b9fa1ee262b3537f6e429678f9.zip
Initial commitmaster
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock2538
-rw-r--r--Cargo.toml37
-rw-r--r--src/.cnofig.rs.swpbin0 -> 4096 bytes
-rw-r--r--src/.delete.rs.swobin0 -> 12288 bytes
-rw-r--r--src/.group.rs.swpbin0 -> 12288 bytes
-rw-r--r--src/.groups.rs.swpbin0 -> 4096 bytes
-rw-r--r--src/.install.rc.swpbin0 -> 4096 bytes
-rw-r--r--src/.install.rs.swmbin0 -> 16384 bytes
-rw-r--r--src/.install.rs.swnbin0 -> 20480 bytes
-rw-r--r--src/.install.rs.swobin0 -> 20480 bytes
-rw-r--r--src/.rootfs.rs.swobin0 -> 16384 bytes
-rw-r--r--src/.rootfs.rs.swpbin0 -> 16384 bytes
-rw-r--r--src/.rootfs.rsr.swpbin0 -> 4096 bytes
-rw-r--r--src/.search-rs.swpbin0 -> 4096 bytes
-rw-r--r--src/.search.rs.swlbin0 -> 4096 bytes
-rw-r--r--src/.search.rs.swmbin0 -> 4096 bytes
-rw-r--r--src/.search.rs.swnbin0 -> 4096 bytes
-rw-r--r--src/.search.rs.swobin0 -> 4096 bytes
-rw-r--r--src/.sync.rs.swpbin0 -> 12288 bytes
-rw-r--r--src/.sync.s.swpbin0 -> 4096 bytes
-rw-r--r--src/config.rs88
-rw-r--r--src/debug.rs14
-rw-r--r--src/delete.rs102
-rw-r--r--src/group.rs66
-rw-r--r--src/info.rs119
-rw-r--r--src/install.rs503
-rw-r--r--src/listinstalled.rs31
-rw-r--r--src/main.rs218
-rw-r--r--src/parallel.rs305
-rw-r--r--src/repo.rs56
-rw-r--r--src/rootfs.rs307
-rw-r--r--src/search.rs92
-rw-r--r--src/sync.rs69
-rw-r--r--src/update.rs99
35 files changed, 4645 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea8c4bf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..45e2888
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,2538 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
+[[package]]
+name = "ahash"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
+dependencies = [
+ "getrandom 0.2.17",
+ "once_cell",
+ "version_check",
+]
+
+[[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.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
+
+[[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.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+dependencies = [
+ "anstyle",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.102"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
+
+[[package]]
+name = "ar"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d67af77d68a931ecd5cbd8a3b5987d63a1d1d1278f7f6a60ae33db485cdebb69"
+
+[[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 = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
+
+[[package]]
+name = "bytes"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
+
+[[package]]
+name = "cc"
+version = "1.2.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2"
+dependencies = [
+ "find-msvc-tools",
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+
+[[package]]
+name = "chrono"
+version = "0.4.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link",
+]
+
+[[package]]
+name = "clap"
+version = "4.5.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.55"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+
+[[package]]
+name = "colored"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
+dependencies = [
+ "lazy_static",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "config"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca"
+dependencies = [
+ "async-trait",
+ "json5",
+ "lazy_static",
+ "nom",
+ "pathdiff",
+ "ron",
+ "rust-ini",
+ "serde",
+ "serde_json",
+ "toml",
+ "yaml-rust",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[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 = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[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 = "dlv-list"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
+dependencies = [
+ "cfg-if",
+]
+
+[[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.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+
+[[package]]
+name = "filetime"
+version = "0.2.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "libredox",
+]
+
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+
+[[package]]
+name = "flate2"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foldhash"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
+
+[[package]]
+name = "futures-io"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
+
+[[package]]
+name = "futures-task"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
+
+[[package]]
+name = "futures-util"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
+dependencies = [
+ "futures-core",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+ "wasip2",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+ "wasip2",
+ "wasip3",
+]
+
+[[package]]
+name = "git2"
+version = "0.20.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b"
+dependencies = [
+ "bitflags 2.11.0",
+ "libc",
+ "libgit2-sys",
+ "log",
+ "openssl-probe 0.1.6",
+ "openssl-sys",
+ "url",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
+dependencies = [
+ "foldhash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.16.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "http"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
+dependencies = [
+ "bytes",
+ "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.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "h2",
+ "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-pki-types",
+ "tokio",
+ "tokio-rustls",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
+dependencies = [
+ "bytes",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "ipnet",
+ "libc",
+ "percent-encoding",
+ "pin-project-lite",
+ "socket2",
+ "system-configuration",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "windows-registry",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
+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.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
+dependencies = [
+ "displaydoc",
+ "potential_utf",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locale_core"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
+dependencies = [
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
+
+[[package]]
+name = "icu_properties"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
+dependencies = [
+ "icu_collections",
+ "icu_locale_core",
+ "icu_properties_data",
+ "icu_provider",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
+
+[[package]]
+name = "icu_provider"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
+dependencies = [
+ "displaydoc",
+ "icu_locale_core",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "id-arena"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
+
+[[package]]
+name = "idna"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+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 = "indexmap"
+version = "2.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.16.1",
+ "serde",
+ "serde_core",
+]
+
+[[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.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a"
+dependencies = [
+ "memchr",
+ "serde",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
+[[package]]
+name = "itoa"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
+
+[[package]]
+name = "jobserver"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
+dependencies = [
+ "getrandom 0.3.4",
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.88"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7e709f3e3d22866f9c25b3aff01af289b18422cc8b4262fb19103ee80fe513d"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "json5"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1"
+dependencies = [
+ "pest",
+ "pest_derive",
+ "serde",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "leb128fmt"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
+
+[[package]]
+name = "libc"
+version = "0.2.182"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112"
+
+[[package]]
+name = "libgit2-sys"
+version = "0.18.3+1.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487"
+dependencies = [
+ "cc",
+ "libc",
+ "libssh2-sys",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616"
+dependencies = [
+ "bitflags 2.11.0",
+ "libc",
+ "redox_syscall",
+]
+
+[[package]]
+name = "libssh2-sys"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9"
+dependencies = [
+ "cc",
+ "libc",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "libz-sys"
+version = "1.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "linked-hash-map"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+
+[[package]]
+name = "litemap"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+
+[[package]]
+name = "log"
+version = "0.4.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+
+[[package]]
+name = "lzma-sys"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "memchr"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
+dependencies = [
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe 0.2.1",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[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.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
+[[package]]
+name = "openssl"
+version = "0.10.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328"
+dependencies = [
+ "bitflags 2.11.0",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
+
+[[package]]
+name = "openssl-probe"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.111"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "ordered-multimap"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a"
+dependencies = [
+ "dlv-list",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "pathdiff"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+
+[[package]]
+name = "pest"
+version = "2.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662"
+dependencies = [
+ "memchr",
+ "ucd-trie",
+]
+
+[[package]]
+name = "pest_derive"
+version = "2.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77"
+dependencies = [
+ "pest",
+ "pest_generator",
+]
+
+[[package]]
+name = "pest_generator"
+version = "2.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f"
+dependencies = [
+ "pest",
+ "pest_meta",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pest_meta"
+version = "2.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220"
+dependencies = [
+ "pest",
+ "sha2",
+]
+
+[[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 = "pkg-config"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
+
+[[package]]
+name = "potential_utf"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
+dependencies = [
+ "zerovec",
+]
+
+[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
+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 = "redox_syscall"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b"
+dependencies = [
+ "bitflags 2.11.0",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "encoding_rs",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-rustls",
+ "hyper-tls",
+ "hyper-util",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "tokio",
+ "tokio-native-tls",
+ "tower",
+ "tower-http",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "ring"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "getrandom 0.2.17",
+ "libc",
+ "untrusted",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "ron"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a"
+dependencies = [
+ "base64 0.13.1",
+ "bitflags 1.3.2",
+ "serde",
+]
+
+[[package]]
+name = "ror"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "ar",
+ "chrono",
+ "clap",
+ "colored",
+ "config",
+ "flate2",
+ "git2",
+ "reqwest",
+ "semver",
+ "serde",
+ "serde_json",
+ "serde_yaml",
+ "sha2",
+ "tar",
+ "thiserror",
+ "walkdir",
+ "xz2",
+]
+
+[[package]]
+name = "rust-ini"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df"
+dependencies = [
+ "cfg-if",
+ "ordered-multimap",
+]
+
+[[package]]
+name = "rustix"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
+dependencies = [
+ "bitflags 2.11.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
+dependencies = [
+ "once_cell",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
+dependencies = [
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.103.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
+[[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.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
+[[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.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "security-framework"
+version = "3.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
+dependencies = [
+ "bitflags 2.11.0",
+ "core-foundation 0.10.1",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+
+[[package]]
+name = "serde"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.149"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[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 = "serde_yaml"
+version = "0.9.34+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
+
+[[package]]
+name = "socket2"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
+dependencies = [
+ "libc",
+ "windows-sys 0.60.2",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+
+[[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.117"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+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 = "system-configuration"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
+dependencies = [
+ "bitflags 2.11.0",
+ "core-foundation 0.9.4",
+ "system-configuration-sys",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "tar"
+version = "0.4.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a"
+dependencies = [
+ "filetime",
+ "libc",
+ "xattr",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1"
+dependencies = [
+ "fastrand",
+ "getrandom 0.4.1",
+ "once_cell",
+ "rustix",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[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 = "tinystr"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tokio"
+version = "1.49.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
+dependencies = [
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "socket2",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
+dependencies = [
+ "rustls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
+dependencies = [
+ "bitflags 2.11.0",
+ "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.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+dependencies = [
+ "pin-project-lite",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+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 = "typenum"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
+
+[[package]]
+name = "ucd-trie"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
+
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
+[[package]]
+name = "url"
+version = "2.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[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 = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[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 = "wasip2"
+version = "1.0.2+wasi-0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasip3"
+version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.111"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec1adf1535672f5b7824f817792b1afd731d7e843d2d04ec8f27e8cb51edd8ac"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe88540d1c934c4ec8e6db0afa536876c5441289d7f9f9123d4f065ac1250a6b"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "js-sys",
+ "once_cell",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.111"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19e638317c08b21663aed4d2b9a2091450548954695ff4efa75bff5fa546b3b1"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.111"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c64760850114d03d5f65457e96fc988f11f01d38fbaa51b254e4ab5809102af"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.111"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60eecd4fe26177cfa3339eb00b4a36445889ba3ad37080c2429879718e20ca41"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "wasm-encoder"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
+dependencies = [
+ "leb128fmt",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasm-metadata"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
+dependencies = [
+ "anyhow",
+ "indexmap",
+ "wasm-encoder",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasmparser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
+dependencies = [
+ "bitflags 2.11.0",
+ "hashbrown 0.15.5",
+ "indexmap",
+ "semver",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.88"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d6bb20ed2d9572df8584f6dc81d68a41a625cadc6f15999d649a70ce7e3597a"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi-util"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-registry"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"
+dependencies = [
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
+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.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm 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.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
+dependencies = [
+ "windows-link",
+ "windows_aarch64_gnullvm 0.53.1",
+ "windows_aarch64_msvc 0.53.1",
+ "windows_i686_gnu 0.53.1",
+ "windows_i686_gnullvm 0.53.1",
+ "windows_i686_msvc 0.53.1",
+ "windows_x86_64_gnu 0.53.1",
+ "windows_x86_64_gnullvm 0.53.1",
+ "windows_x86_64_msvc 0.53.1",
+]
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
+
+[[package]]
+name = "wit-bindgen"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+dependencies = [
+ "wit-bindgen-rust-macro",
+]
+
+[[package]]
+name = "wit-bindgen-core"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
+dependencies = [
+ "anyhow",
+ "heck",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-bindgen-rust"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
+dependencies = [
+ "anyhow",
+ "heck",
+ "indexmap",
+ "prettyplease",
+ "syn",
+ "wasm-metadata",
+ "wit-bindgen-core",
+ "wit-component",
+]
+
+[[package]]
+name = "wit-bindgen-rust-macro"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
+dependencies = [
+ "anyhow",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wit-bindgen-core",
+ "wit-bindgen-rust",
+]
+
+[[package]]
+name = "wit-component"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
+dependencies = [
+ "anyhow",
+ "bitflags 2.11.0",
+ "indexmap",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "wasm-encoder",
+ "wasm-metadata",
+ "wasmparser",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-parser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
+dependencies = [
+ "anyhow",
+ "id-arena",
+ "indexmap",
+ "log",
+ "semver",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "unicode-xid",
+ "wasmparser",
+]
+
+[[package]]
+name = "writeable"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
+
+[[package]]
+name = "xattr"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
+dependencies = [
+ "libc",
+ "rustix",
+]
+
+[[package]]
+name = "xz2"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
+dependencies = [
+ "lzma-sys",
+]
+
+[[package]]
+name = "yaml-rust"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
+dependencies = [
+ "linked-hash-map",
+]
+
+[[package]]
+name = "yoke"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
+dependencies = [
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[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.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
+
+[[package]]
+name = "zerotrie"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zmij"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..73f1c17
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,37 @@
+[package]
+name = "ror"
+version = "0.1.0"
+edition = "2021"
+authors = ["rorka900"]
+description = "RorkOS package manager"
+license = "GPL-3.0"
+
+[dependencies]
+clap = { version = "4.5", features = ["derive"] }
+colored = "2.1"
+serde = { version = "1.0", features = ["derive"] }
+serde_yaml = "0.9"
+serde_json = "1.0"
+git2 = "0.20"
+reqwest = { version = "0.12", features = ["blocking"] }
+xz2 = "0.1"
+tar = "0.4"
+flate2 = "1.0"
+sha2 = "0.10"
+walkdir = "2"
+chrono = "0.4"
+config = "0.13"
+semver = "1.0"
+anyhow = "1.0"
+thiserror = "1.0"
+ar = "0.9"
+
+[profile.release]
+opt-level = 3
+lto = true
+codegen-units = 1
+strip = true
+
+[features]
+default = []
+arm64 = []
diff --git a/src/.cnofig.rs.swp b/src/.cnofig.rs.swp
new file mode 100644
index 0000000..3ec942c
--- /dev/null
+++ b/src/.cnofig.rs.swp
Binary files differ
diff --git a/src/.delete.rs.swo b/src/.delete.rs.swo
new file mode 100644
index 0000000..16e6504
--- /dev/null
+++ b/src/.delete.rs.swo
Binary files differ
diff --git a/src/.group.rs.swp b/src/.group.rs.swp
new file mode 100644
index 0000000..362497a
--- /dev/null
+++ b/src/.group.rs.swp
Binary files differ
diff --git a/src/.groups.rs.swp b/src/.groups.rs.swp
new file mode 100644
index 0000000..c38e177
--- /dev/null
+++ b/src/.groups.rs.swp
Binary files differ
diff --git a/src/.install.rc.swp b/src/.install.rc.swp
new file mode 100644
index 0000000..986a1da
--- /dev/null
+++ b/src/.install.rc.swp
Binary files differ
diff --git a/src/.install.rs.swm b/src/.install.rs.swm
new file mode 100644
index 0000000..ca037b0
--- /dev/null
+++ b/src/.install.rs.swm
Binary files differ
diff --git a/src/.install.rs.swn b/src/.install.rs.swn
new file mode 100644
index 0000000..e716249
--- /dev/null
+++ b/src/.install.rs.swn
Binary files differ
diff --git a/src/.install.rs.swo b/src/.install.rs.swo
new file mode 100644
index 0000000..4b936c2
--- /dev/null
+++ b/src/.install.rs.swo
Binary files differ
diff --git a/src/.rootfs.rs.swo b/src/.rootfs.rs.swo
new file mode 100644
index 0000000..0662b03
--- /dev/null
+++ b/src/.rootfs.rs.swo
Binary files differ
diff --git a/src/.rootfs.rs.swp b/src/.rootfs.rs.swp
new file mode 100644
index 0000000..1d7dd77
--- /dev/null
+++ b/src/.rootfs.rs.swp
Binary files differ
diff --git a/src/.rootfs.rsr.swp b/src/.rootfs.rsr.swp
new file mode 100644
index 0000000..964405b
--- /dev/null
+++ b/src/.rootfs.rsr.swp
Binary files differ
diff --git a/src/.search-rs.swp b/src/.search-rs.swp
new file mode 100644
index 0000000..1d1ceb6
--- /dev/null
+++ b/src/.search-rs.swp
Binary files differ
diff --git a/src/.search.rs.swl b/src/.search.rs.swl
new file mode 100644
index 0000000..0c25979
--- /dev/null
+++ b/src/.search.rs.swl
Binary files differ
diff --git a/src/.search.rs.swm b/src/.search.rs.swm
new file mode 100644
index 0000000..a807ccf
--- /dev/null
+++ b/src/.search.rs.swm
Binary files differ
diff --git a/src/.search.rs.swn b/src/.search.rs.swn
new file mode 100644
index 0000000..2e478ac
--- /dev/null
+++ b/src/.search.rs.swn
Binary files differ
diff --git a/src/.search.rs.swo b/src/.search.rs.swo
new file mode 100644
index 0000000..248d9f0
--- /dev/null
+++ b/src/.search.rs.swo
Binary files differ
diff --git a/src/.sync.rs.swp b/src/.sync.rs.swp
new file mode 100644
index 0000000..0f6869c
--- /dev/null
+++ b/src/.sync.rs.swp
Binary files differ
diff --git a/src/.sync.s.swp b/src/.sync.s.swp
new file mode 100644
index 0000000..7a6f6aa
--- /dev/null
+++ b/src/.sync.s.swp
Binary files differ
diff --git a/src/config.rs b/src/config.rs
new file mode 100644
index 0000000..d79ad28
--- /dev/null
+++ b/src/config.rs
@@ -0,0 +1,88 @@
+use serde::{Deserialize, Serialize};
+use std::collections::HashMap;
+use std::fs;
+use std::path::Path;
+use colored::Colorize;
+
+#[derive(Debug, Deserialize, Serialize, Clone)]
+pub struct RepositoryConfig {
+ pub url: String,
+ #[serde(default)]
+ pub mirror: Option<String>,
+}
+
+#[derive(Debug, Deserialize, Serialize, Default)]
+pub struct GlobalConfig {
+ #[serde(default = "default_ignore_speed")]
+ pub ignore_speed: bool,
+ #[serde(default = "default_strict_gpg")]
+ pub strict_gpg: bool,
+ #[serde(default)]
+ pub allow_external_binaries: bool,
+}
+
+fn default_ignore_speed() -> bool { false }
+fn default_strict_gpg() -> bool { false }
+
+#[derive(Debug, Deserialize, Serialize, Default)]
+pub struct Config {
+ #[serde(default)]
+ pub global: GlobalConfig,
+ #[serde(default)]
+ pub repositories: HashMap<String, RepositoryConfig>,
+}
+
+impl Config {
+ pub fn load() -> Self {
+ let path = Path::new("/var/ror/ror.conf");
+ if path.exists() {
+ let content = fs::read_to_string(path).unwrap_or_default();
+ Self::from_ini(&content).unwrap_or_else(|e| {
+ eprintln!(
+ "{} Failed to parse config: {}, using defaults",
+ "[ror]".red().bold(),
+ e
+ );
+ Config::default()
+ })
+ } else {
+ Config::default()
+ }
+ }
+ pub fn to_ini(&self) -> Result<String, config::ConfigError> {
+ let mut lines = vec!["[global]".to_string()];
+ lines.push(format!("ignore_speed = {}", self.global.ignore_speed));
+ lines.push(format!("strict_gpg = {}", self.global.strict_gpg));
+ lines.push("".to_string());
+ for (name, repo) in &self.repositories {
+ lines.push(format!("[repositories.{}]", name));
+ lines.push(format!("url = \"{}\"", repo.url));
+ if let Some(m) = &repo.mirror {
+ lines.push(format!("mirror = \"{}\"", m));
+ }
+ lines.push("".to_string());
+ }
+ Ok(lines.join("\n"))
+ }
+
+ pub fn from_ini(ini: &str) -> Result<Self, config::ConfigError> {
+ let builder = config::Config::builder()
+ .add_source(config::File::from_str(ini, config::FileFormat::Ini));
+ let cfg = builder.build()?;
+ cfg.try_deserialize()
+ }
+
+ pub fn create_default_config(path: &Path) -> std::io::Result<()> {
+ let ini = r#"[global]
+ignore_speed = false
+strict_gpg = false
+
+[repositories.rorkos]
+url = "https:
+mirror = "https:
+"#;
+ fs::create_dir_all(path.parent().unwrap())?;
+ fs::write(path, ini)
+ }
+}
+
diff --git a/src/debug.rs b/src/debug.rs
new file mode 100644
index 0000000..2f7da4e
--- /dev/null
+++ b/src/debug.rs
@@ -0,0 +1,14 @@
+use std::env;
+
+pub fn debug(msg: &str) {
+ if env::var("ROR_DEBUG").unwrap_or_default() == "1" {
+ eprintln!("[DEBUG] {}", msg);
+ }
+}
+
+#[macro_export]
+macro_rules! debug {
+ ($($arg:tt)*) => {
+ $crate::debug::debug(&format!($($arg)*));
+ };
+}
diff --git a/src/delete.rs b/src/delete.rs
new file mode 100644
index 0000000..c95d661
--- /dev/null
+++ b/src/delete.rs
@@ -0,0 +1,102 @@
+use std::fs;
+use std::path::Path;
+use colored::Colorize;
+use std::process::Command;
+use crate::install::{load_package, InstalledDB, Package, find_package_file};
+
+fn has_role(pkg_name: &str, role: &str) -> bool {
+ if let Some(pkg) = load_package(pkg_name) {
+ return pkg.provides.contains(&role.to_string());
+ }
+ false
+}
+
+pub fn check_critical_removal(pkg_name: &str, db: &InstalledDB) -> Result<(), String> {
+ let pkg = load_package(pkg_name).ok_or("Package info not found in repository")?;
+
+ if pkg.provides.contains(&"init-system".to_string()) {
+ let other_inits_count = db.packages.values()
+ .filter(|p| p.name != pkg_name && has_role(&p.name, "init-system"))
+ .count();
+
+ if other_inits_count == 0 {
+ return Err(format!(
+ "{} CRITICAL ERROR: '{}' is your last init-system! Removing it will break RorkOS. Install an alternative first.",
+ "[ror]".red().bold(),
+ pkg_name
+ ));
+ }
+ }
+ Ok(())
+}
+
+pub fn remove_package(pkg_name: &str) {
+ let mut db = InstalledDB::load();
+
+ let record = match db.packages.get(pkg_name) {
+ Some(r) => r,
+ None => {
+ eprintln!("{} Package '{}' is not installed.", "[ror]".red().bold(), pkg_name);
+ return;
+ }
+ };
+
+ if let Err(e) = check_critical_removal(pkg_name, &db) {
+ eprintln!("{}", e);
+ return;
+ }
+
+ println!("{} Removing package '{}'...", "[ror]".blue().bold(), pkg_name);
+
+ let mut failed = false;
+
+ for rel_path in &record.files {
+ let full_path = Path::new("/").join(rel_path);
+ if full_path.exists() {
+ if let Err(e) = fs::remove_file(&full_path) {
+ eprintln!("{} Failed to remove {}: {}", "[ror]".red().bold(), full_path.display(), e);
+ failed = true;
+ } else {
+ println!("{} Removed {}", ">>>".green(), full_path.display());
+ }
+ } else {
+ println!("{} File {} already missing", ">>>".yellow(), full_path.display());
+ }
+ }
+
+ if let Some(pkg_path) = find_package_file(pkg_name) {
+ if let Ok(content) = fs::read_to_string(pkg_path) {
+ if let Ok(pkg) = serde_yaml::from_str::<Package>(&content) {
+ if !pkg.delete_steps.trim().is_empty() {
+ println!("{} Running delete steps...", ">>>".yellow());
+ let status = Command::new("sh")
+ .arg("-c")
+ .arg(&pkg.delete_steps)
+ .status()
+ .expect("Failed to execute delete steps");
+ if !status.success() {
+ eprintln!("{} Delete steps failed with exit code {:?}", "[ror]".red().bold(), status.code());
+ failed = true;
+ } else {
+ println!("{} Delete steps completed", ">>>".green());
+ }
+ }
+ }
+ }
+ } else {
+ println!("{} Package recipe not found, skipping delete steps", ">>>".yellow());
+ }
+ db.packages.remove(pkg_name);
+ if let Err(e) = db.save() {
+ eprintln!("{} Failed to update installed DB: {}", "[ror]".red().bold(), e);
+ failed = true;
+ } else {
+ println!("{} Package '{}' removed from database.", "[ror]".green(), pkg_name);
+ }
+
+ if failed {
+ eprintln!("{} Some errors occurred during removal.", "[ror]".red().bold());
+ } else {
+ println!("{} Package '{}' successfully removed.", "[ror]".green().bold(), pkg_name);
+ }
+}
diff --git a/src/group.rs b/src/group.rs
new file mode 100644
index 0000000..a3e5fde
--- /dev/null
+++ b/src/group.rs
@@ -0,0 +1,66 @@
+use serde::Deserialize;
+use std::fs;
+use std::path::Path;
+use colored::Colorize;
+use crate::config;
+use crate::install;
+
+#[derive(Debug, Deserialize)]
+pub struct Group {
+ #[allow(dead_code)]
+ pub name: String,
+ pub description: Option<String>,
+ pub packages: Vec<String>,
+}
+
+#[allow(dead_code)]
+pub fn install_group(group_name: &str, cfg: &config::Config) {
+ let group_file = format!("/var/ror/packages/groups/{}.yaml", group_name);
+ if !Path::new(&group_file).exists() {
+ eprintln!("{} Group '{}' not found!", "[ror]".red().bold(), group_name);
+ return;
+ }
+
+ let content = match fs::read_to_string(&group_file) {
+ Ok(c) => c,
+ Err(e) => {
+ eprintln!("{} Failed to read group file: {}", "[ror]".red().bold(), e);
+ return;
+ }
+ };
+
+ let group: Group = match serde_yaml::from_str(&content) {
+ Ok(g) => g,
+ Err(e) => {
+ eprintln!("{} Group YAML error: {}", "[ror]".red().bold(), e);
+ return;
+ }
+ };
+
+ println!(
+ "{} {} Installing group '{}' ({} packages)",
+ "[ror]".blue().bold(),
+ ">>>".green(),
+ group.name,
+ group.packages.len()
+ );
+ if let Some(desc) = &group.description {
+ println!("{} {}", "Description:".yellow(), desc);
+ }
+
+ for pkg in &group.packages {
+ println!("{} Installing package: {}", ">>>".cyan(), pkg);
+ install::install_package(pkg, cfg);
+ }
+
+ println!("{} Group '{}' installation completed.", "[ror]".blue().bold(), group.name);
+}
+
+pub fn load_group(group_name: &str) -> Result<Group, String> {
+ let group_file = format!("/var/ror/packages/groups/{}.yaml", group_name);
+ let content = fs::read_to_string(&group_file)
+ .map_err(|e| format!("Failed to read group file: {}", e))?;
+ let group: Group = serde_yaml::from_str(&content)
+ .map_err(|e| format!("Group YAML error: {}", e))?;
+ Ok(group)
+}
diff --git a/src/info.rs b/src/info.rs
new file mode 100644
index 0000000..8b07daf
--- /dev/null
+++ b/src/info.rs
@@ -0,0 +1,119 @@
+use serde::{Deserialize, Serialize};
+use std::fs;
+use std::path::{Path, PathBuf};
+use colored::Colorize;
+
+const REPO_ROOT: &str = "/var/ror/packages";
+
+fn find_package_file(pkg_name: &str) -> Option<PathBuf> {
+ let repo = Path::new(REPO_ROOT);
+ for entry in fs::read_dir(repo).ok()? {
+ let entry = entry.ok()?;
+ let cat_path = entry.path();
+ if !cat_path.is_dir() {
+ continue;
+ }
+ let pkg_path = cat_path.join(pkg_name).join(format!("{}.yaml", pkg_name));
+ if pkg_path.exists() && pkg_path.is_file() {
+ return Some(pkg_path);
+ }
+ }
+ None
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+struct Package {
+ name: String,
+ version: String,
+ #[serde(default)]
+ release: Option<String>,
+ #[serde(default)]
+ license: Option<String>,
+ #[serde(default)]
+ homepage: Option<String>,
+ #[serde(default)]
+ description: Option<String>,
+ #[serde(default)]
+ binaries: Vec<BinaryPackage>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+struct BinaryPackage {
+ #[serde(rename = "type", default)]
+ pkg_type: Option<String>,
+ arch: String,
+ filename: String,
+ mirrors: Vec<String>,
+ sha256: String,
+}
+pub fn print_package_info(pkg_name: &str) {
+ let pkg_path = match find_package_file(pkg_name) {
+ Some(p) => p,
+ None => {
+ eprintln!(
+ "{} Package '{}' not found!",
+ "[ror]".red().bold(),
+ pkg_name
+ );
+ return;
+ }
+ };
+
+ let content = match fs::read_to_string(&pkg_path) {
+ Ok(c) => c,
+ Err(e) => {
+ eprintln!(
+ "{} Failed to read package file: {}",
+ "[ror]".red().bold(),
+ e
+ );
+ return;
+ }
+ };
+
+ let pkg: Package = match serde_yaml::from_str(&content) {
+ Ok(p) => p,
+ Err(e) => {
+ eprintln!(
+ "{} YAML structure error: {}",
+ "[ror]".red().bold(),
+ e
+ );
+ return;
+ }
+ };
+
+ println!("\n{} {}", "[ Package Info ]".cyan().bold(), "=".repeat(50).cyan());
+
+ println!("{} {}{}",
+ "Name:".yellow().bold(),
+ pkg.name,
+ if let Some(rel) = &pkg.release { format!("-{}", rel) } else { String::new() }
+ );
+ println!("{} {}", "Version:".yellow().bold(), pkg.version);
+
+ if let Some(lic) = &pkg.license {
+ println!("{} {}", "License:".yellow().bold(), lic);
+ }
+ if let Some(home) = &pkg.homepage {
+ println!("{} {}", "Homepage:".yellow().bold(), home);
+ }
+ if let Some(desc) = &pkg.description {
+ println!("{} {}", "Description:".yellow().bold(), desc);
+ }
+
+ if !pkg.binaries.is_empty() {
+ println!("\n{}", "[ Binaries ]".green().bold());
+ for bin in &pkg.binaries {
+ if let Some(t) = &bin.pkg_type {
+ println!(" {} [{}]", "Type:".white(), t);
+ }
+ println!(" {} {}", "Arch:".white(), bin.arch);
+ println!(" {} {}", "Filename:".white(), bin.filename);
+ println!(" {} {}...", "SHA256:".white(), &bin.sha256[..16]);
+ println!(" {} {} mirrors", "Mirrors:".white(), bin.mirrors.len());
+ println!();
+ }
+}
+ println!("{}", "=".repeat(60).cyan());
+}
diff --git a/src/install.rs b/src/install.rs
new file mode 100644
index 0000000..2785180
--- /dev/null
+++ b/src/install.rs
@@ -0,0 +1,503 @@
+use serde::{Deserialize, Serialize};
+use std::fs;
+use std::path::{Path, PathBuf};
+use colored::Colorize;
+use std::process::Command;
+use reqwest::blocking::Client;
+use sha2::{Sha256, Digest};
+use walkdir::WalkDir;
+use chrono::Local;
+use std::collections::HashMap;
+use std::os::unix::fs::symlink;
+use crate::config;
+
+const REPO_ROOT: &str = "/var/ror/packages";
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum Dependency {
+ Single(String),
+ Any(Vec<String>),
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Package {
+ pub name: String,
+ pub version: String,
+ #[serde(default)]
+ pub release: Option<String>,
+ #[serde(default)]
+ pub arch: Option<String>,
+ #[serde(default)]
+ pub description: Option<String>,
+ #[serde(default)]
+ pub license: Option<String>,
+ #[serde(default)]
+ pub homepage: Option<String>,
+ #[serde(default)]
+ pub binaries: Vec<BinaryPackage>,
+ #[serde(default)]
+ pub provides: Vec<String>,
+ #[serde(default)]
+ pub install_steps: String,
+ #[serde(default)]
+ pub delete_steps: String,
+ #[serde(default)]
+ pub depends: Vec<Dependency>,
+ #[serde(default)]
+ pub conflicts: Vec<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BinaryPackage {
+ pub arch: String,
+ #[serde(default)]
+ pub filename: String,
+ #[serde(default)]
+ pub mirrors: Vec<String>,
+ #[serde(rename = "type", default)]
+ pub pkg_type: Option<String>,
+ #[serde(default)]
+ pub url: String,
+ #[serde(default)]
+ pub sha256: String,
+ #[serde(default = "default_install_prefix")]
+ pub install_prefix: String,
+ #[serde(default)]
+ pub files: Vec<String>,
+}
+
+fn default_install_prefix() -> String {
+ "/".to_string()
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct InstalledPackage {
+ pub name: String,
+ pub version: String,
+ pub build_type: String,
+ pub files: Vec<String>,
+ pub installed_at: String,
+}
+
+#[derive(Debug, Serialize, Deserialize, Default)]
+pub struct InstalledDB {
+ pub packages: HashMap<String, InstalledPackage>,
+}
+
+impl InstalledDB {
+ pub const PATH: &'static str = "/var/ror/installed.json";
+
+ pub fn load() -> Self {
+ if Path::new(Self::PATH).exists() {
+ let content = fs::read_to_string(Self::PATH).unwrap_or_default();
+ serde_json::from_str(&content).unwrap_or_default()
+ } else {
+ Self::default()
+ }
+ }
+
+ pub fn save(&self) -> std::io::Result<()> {
+ let json = serde_json::to_string_pretty(self)
+ .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;
+ let path = Path::new(Self::PATH);
+ if let Some(parent) = path.parent() {
+ fs::create_dir_all(parent)?;
+ }
+ fs::write(path, json)
+ }
+
+ pub fn add_package(&mut self, pkg: InstalledPackage) {
+ self.packages.insert(pkg.name.clone(), pkg);
+ }
+
+ pub fn is_installed(&self, name: &str) -> bool {
+ self.packages.contains_key(name)
+ }
+}
+
+
+pub fn extract_deb(archive_path: &Path, dest_root: &Path) -> Result<Vec<String>, String> {
+ let file = fs::File::open(archive_path).map_err(|e| e.to_string())?;
+ let mut archive = ar::Archive::new(file);
+ let mut installed_files = Vec::new();
+
+ while let Some(entry_result) = archive.next_entry() {
+ let entry = entry_result.map_err(|e| format!("Failed to read ar entry: {}", e))?;
+ let identifier = std::str::from_utf8(entry.header().identifier()).unwrap_or("");
+
+ if identifier.contains("data.tar") {
+ let reader: Box<dyn std::io::Read> = if identifier.ends_with(".xz") {
+ Box::new(xz2::read::XzDecoder::new(entry))
+ } else {
+ Box::new(entry)
+ };
+
+ let mut tar_archive = tar::Archive::new(reader);
+ let entries = tar_archive.entries().map_err(|e: std::io::Error| e.to_string())?;
+
+ for file_result in entries {
+ let mut f = file_result.map_err(|e: std::io::Error| e.to_string())?;
+ let path = f.path().map_err(|e: std::io::Error| e.to_string())?.to_path_buf();
+
+ f.unpack_in(dest_root).map_err(|e: std::io::Error| e.to_string())?;
+ installed_files.push(path.to_string_lossy().to_string());
+ }
+ }
+ }
+ Ok(installed_files)
+}
+
+pub fn select_binary_for_arch<'a>(pkg: &'a Package, arch: &str) -> Result<&'a BinaryPackage, String> {
+ let target_arch = match arch {
+ "native" => match std::env::consts::ARCH {
+ "x86_64" => "amd64",
+ "aarch64" => "arm64",
+ other => other,
+ },
+ other => other,
+ };
+ pkg.binaries.iter().find(|b| b.arch == target_arch || b.arch == "all" || b.arch == "x86_64")
+ .ok_or_else(|| format!("No binary package for architecture {}", arch))
+}
+
+pub fn find_package_file(pkg_name: &str) -> Option<PathBuf> {
+ let repo = Path::new(REPO_ROOT);
+ let read_dir = fs::read_dir(repo).ok()?;
+
+ for entry in read_dir.flatten() {
+ let cat_path = entry.path();
+ if !cat_path.is_dir() { continue; }
+
+ let pkg_path = cat_path.join(pkg_name).join(format!("{}.yaml", pkg_name));
+ if pkg_path.exists() && pkg_path.is_file() {
+ return Some(pkg_path);
+ }
+ }
+ None
+}
+
+pub fn install_package(pkg_name: &str, cfg: &config::Config) {
+ match install_package_with_result(pkg_name, cfg) {
+ Ok(installed_pkg) => {
+ let mut db = InstalledDB::load();
+ db.add_package(installed_pkg);
+ if let Err(e) = db.save() {
+ eprintln!("{} Failed to save installed DB: {}", "[ror]".red().bold(), e);
+ } else {
+ println!("{} Package registered in database", "[ror]".green());
+ }
+ println!("{} {} Package installed successfully.", "[ror]".blue().bold(), ">>>".green());
+ }
+ Err(e) => {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ }
+}
+
+
+pub fn install_package_with_result(pkg_name: &str, cfg: &config::Config) -> Result<InstalledPackage, String> {
+ let pkg_path = find_package_file(pkg_name)
+ .ok_or_else(|| format!("Package '{}' not found", pkg_name))?;
+
+ let content = fs::read_to_string(&pkg_path)
+ .map_err(|e| format!("Failed to read package file: {}", e))?;
+
+ let pkg: Package = serde_yaml::from_str(&content)
+ .map_err(|e| format!("YAML structure error: {}", e))?;
+
+ if pkg.binaries.is_empty() {
+ return Err("No binary packages defined".to_string());
+ }
+
+ let binary = select_binary_for_arch(&pkg, "native")?;
+ let db = InstalledDB::load();
+
+ for conflict in &pkg.conflicts {
+ if db.is_installed(conflict) {
+ return Err(format!("Package '{}' conflicts with installed package '{}'", pkg_name, conflict));
+ }
+ }
+
+ let urls_to_try: Vec<String> = if !binary.url.is_empty() {
+ vec![binary.url.clone()]
+ } else if !binary.mirrors.is_empty() {
+ binary.mirrors.iter().map(|m| m.replace("{filename}", &binary.filename)).collect()
+ } else {
+ return Err(format!("No URL or mirrors provided for package {}", pkg_name));
+ };
+
+ let mut last_err = None;
+ let mut all_installed_files = Vec::new();
+ let mut downloaded = false;
+
+ for url in urls_to_try {
+ println!("{} Trying source: {}", ">>>".yellow(), url);
+
+ let archive_path = match download_and_verify(&url, &binary.sha256, cfg) {
+ Ok(p) => p,
+ Err(e) => {
+ last_err = Some(e);
+ continue;
+ }
+ };
+
+ let work_dir = Path::new("/tmp/ror-install").join(&pkg.name);
+ let _ = fs::remove_dir_all(&work_dir);
+ fs::create_dir_all(&work_dir).map_err(|e| format!("Failed to create temp dir: {}", e))?;
+
+ let pkg_type = binary.pkg_type.as_deref().unwrap_or("tar.xz");
+
+ if pkg_type == "deb" {
+ println!("{} Processing external .deb for {}", ">>>".green(), pkg.name);
+ let mut files = extract_deb(&archive_path, Path::new("/"))?;
+ all_installed_files.append(&mut files);
+ } else {
+ let files = extract_native(&archive_path, &work_dir)
+ .map_err(|e| format!("Extraction failed: {}", e))?;
+ let file_list = if binary.files.is_empty() { files } else { binary.files.clone() };
+ let mut installed = install_files(&work_dir, &binary.install_prefix, &file_list)
+ .map_err(|e| format!("Failed to install files: {}", e))?;
+ all_installed_files.append(&mut installed);
+ }
+
+ let _ = fs::remove_dir_all(&work_dir);
+ let _ = fs::remove_file(&archive_path);
+ downloaded = true;
+ break;
+ }
+
+ if !downloaded {
+ return Err(last_err.unwrap_or_else(|| "All mirrors/URLs failed".to_string()));
+ }
+
+ if !pkg.install_steps.is_empty() {
+ run_commands(&pkg.install_steps, Path::new("/"))?;
+ }
+
+ Ok(InstalledPackage {
+ name: pkg.name.clone(),
+ version: pkg.version.clone(),
+ build_type: "binary".to_string(),
+ files: all_installed_files,
+ installed_at: Local::now().to_rfc3339(),
+ })
+}
+
+
+pub fn download_and_verify(url: &str, expected_sha: &str, cfg: &config::Config) -> Result<PathBuf, String> {
+
+ let client = Client::builder()
+ .connect_timeout(std::time::Duration::from_secs(30))
+ .build()
+ .map_err(|e| format!("Failed to build HTTP client: {}", e))?;
+
+ let response = client.get(url).send()
+ .map_err(|e| format!("Download failed: {}", e))?;
+
+ if !response.status().is_success() {
+ return Err(format!("HTTP error: {}", response.status()));
+ }
+
+ let tmp_dir = Path::new("/tmp/ror-download");
+ fs::create_dir_all(tmp_dir).map_err(|e| format!("Failed to create tmp dir: {}", e))?;
+
+ let file_name = url.split('/').last().unwrap_or("archive.tmp");
+ let file_path = tmp_dir.join(file_name);
+
+
+ {
+ use std::io::Write;
+ let mut file = fs::File::create(&file_path)
+ .map_err(|e| format!("Failed to create temp file: {}", e))?;
+ let mut hasher = Sha256::new();
+ let mut reader = response;
+ let mut buf = [0u8; 65536];
+ loop {
+ use std::io::Read;
+ let n = reader.read(&mut buf)
+ .map_err(|e| format!("Failed to read response body: {}", e))?;
+ if n == 0 { break; }
+ hasher.update(&buf[..n]);
+ file.write_all(&buf[..n])
+ .map_err(|e| format!("Failed to write to temp file: {}", e))?;
+ }
+ if !expected_sha.is_empty() {
+ let hash = format!("{:x}", hasher.finalize());
+ if hash != expected_sha {
+ let _ = fs::remove_file(&file_path);
+ return Err(format!("SHA256 mismatch: expected {}, got {}", expected_sha, hash));
+ }
+ }
+ }
+
+ if let Err(e) = verify_gpg_signature(&file_path, url, cfg.global.strict_gpg) {
+ if cfg.global.strict_gpg {
+ let _ = fs::remove_file(&file_path);
+ return Err(format!("GPG ERROR: {}", e));
+ } else {
+ eprintln!("{} GPG warning: {}", "[ror]".yellow(), e);
+ }
+ }
+
+ Ok(file_path)
+}
+
+
+fn verify_gpg_signature(file_path: &Path, original_url: &str, _strict_mode: bool) -> Result<(), String> {
+ let sig_url = format!("{}.sig", original_url);
+ let client = Client::builder().timeout(std::time::Duration::from_secs(10)).build()
+ .map_err(|e| format!("Failed to build HTTP client: {}", e))?;
+
+ let response = match client.get(&sig_url).send() {
+ Ok(r) => r,
+ Err(_) => return Err("Failed to reach server for .sig file".to_string())
+ };
+
+ if !response.status().is_success() {
+ return Err(format!("Signature file not found on server (HTTP {})", response.status()));
+ }
+
+ let sig_bytes = response.bytes()
+ .map_err(|e| format!("Failed to download signature: {}", e))?.to_vec();
+
+ let sig_path = file_path.with_extension("sig");
+ fs::write(&sig_path, &sig_bytes).map_err(|e| format!("Failed to save signature: {}", e))?;
+
+ println!("{} Verifying GPG signature...", ">>>".cyan());
+ let status = Command::new("gpg")
+ .arg("--verify")
+ .arg(&sig_path)
+ .arg(file_path)
+ .status()
+ .map_err(|e| format!("Failed to execute 'gpg' (is it installed?): {}", e))?;
+
+ let _ = fs::remove_file(&sig_path);
+
+ if status.success() {
+ Ok(())
+ } else {
+ Err("GPG Signature mismatch! File might be tampered with.".to_string())
+ }
+}
+
+pub fn extract_native(archive_path: &Path, target_dir: &Path) -> Result<Vec<String>, String> {
+
+ let status = Command::new("tar")
+ .arg("-xf")
+ .arg(archive_path)
+ .arg("-C")
+ .arg(target_dir)
+ .status()
+ .map_err(|e| format!("Failed to execute tar: {}", e))?;
+
+ if !status.success() {
+ return Err(format!("tar failed with exit code {:?}", status.code()));
+ }
+
+ let mut files = Vec::new();
+ for entry in WalkDir::new(target_dir).into_iter().filter_map(|e| e.ok()) {
+ if entry.file_type().is_file() || entry.file_type().is_symlink() {
+ let rel_path = entry.path().strip_prefix(target_dir).unwrap();
+ files.push(rel_path.to_string_lossy().to_string());
+ }
+ }
+ Ok(files)
+}
+fn install_files(source_dir: &Path, prefix: &str, files: &[String]) -> Result<Vec<String>, String> {
+ let prefix_path = Path::new(prefix);
+ let mut installed = Vec::new();
+
+ for rel_path in files {
+ let src = source_dir.join(rel_path);
+ let dst = prefix_path.join(rel_path);
+
+
+ let meta = fs::symlink_metadata(&src)
+ .map_err(|_| format!("File {} not found in package", rel_path))?;
+
+ if let Some(parent) = dst.parent() {
+ fs::create_dir_all(parent)
+ .map_err(|e| format!("Failed to create dir {}: {}", parent.display(), e))?;
+ }
+
+
+ if meta.is_symlink() {
+ let target = fs::read_link(&src)
+ .map_err(|e| format!("Failed to read link {}: {}", src.display(), e))?;
+ let _ = fs::remove_file(&dst);
+ symlink(&target, &dst)
+ .map_err(|e| format!("Failed to create symlink {}: {}", dst.display(), e))?;
+ } else {
+ fs::copy(&src, &dst)
+ .map_err(|e| format!("Failed to copy {}: {}", src.display(), e))?;
+ }
+ installed.push(rel_path.clone());
+ }
+ Ok(installed)
+}
+
+pub fn install_files_with_root(source_dir: &Path, root: &Path, files: &[String]) -> Result<Vec<String>, String> {
+ let mut installed = Vec::new();
+ for rel_path in files {
+ let src = source_dir.join(rel_path);
+ let dst = root.join(rel_path);
+
+ let meta = fs::symlink_metadata(&src)
+ .map_err(|_| format!("File {} not found in package", rel_path))?;
+
+ if let Some(parent) = dst.parent() {
+ fs::create_dir_all(parent)
+ .map_err(|e| format!("Failed to create dir {}: {}", parent.display(), e))?;
+ }
+
+
+ if meta.is_symlink() {
+ let target = fs::read_link(&src)
+ .map_err(|e| format!("Failed to read link {}: {}", src.display(), e))?;
+ let _ = fs::remove_file(&dst);
+ symlink(&target, &dst)
+ .map_err(|e| format!("Failed to create symlink {}: {}", dst.display(), e))?;
+ } else {
+ fs::copy(&src, &dst)
+ .map_err(|e| format!("Failed to copy {}: {}", src.display(), e))?;
+ }
+ installed.push(rel_path.clone());
+ }
+ Ok(installed)
+}
+
+pub fn run_commands(steps: &str, work_dir: &Path) -> Result<(), String> {
+ if steps.trim().is_empty() {
+ return Ok(());
+ }
+ let status = Command::new("sh")
+ .current_dir(work_dir)
+ .arg("-c")
+ .arg(steps)
+ .status()
+ .map_err(|e| format!("Failed to execute 'sh -c': {}", e))?;
+ if status.success() {
+ Ok(())
+ } else {
+ Err(format!("Command failed with exit code {:?}", status.code()))
+ }
+}
+
+pub fn get_package_info(pkg_name: &str) -> Option<(String, String)> {
+ let pkg_path = find_package_file(pkg_name)?;
+ let content = fs::read_to_string(pkg_path).ok()?;
+ let name = pkg_name.to_string();
+ let version = content.lines()
+ .find(|l| l.starts_with("version:"))
+ .and_then(|l| l.split(':').nth(1))
+ .map(|s| s.trim().trim_matches('"').to_string())
+ .unwrap_or_default();
+ Some((name, version))
+}
+
+pub fn load_package(pkg_name: &str) -> Option<Package> {
+ let pkg_path = find_package_file(pkg_name)?;
+ let content = fs::read_to_string(pkg_path).ok()?;
+ serde_yaml::from_str(&content).ok()
+}
diff --git a/src/listinstalled.rs b/src/listinstalled.rs
new file mode 100644
index 0000000..d63e942
--- /dev/null
+++ b/src/listinstalled.rs
@@ -0,0 +1,31 @@
+use colored::Colorize;
+use crate::install::InstalledDB;
+
+pub fn print_installed() {
+ let db = InstalledDB::load();
+ let packages = db.packages;
+
+ if packages.is_empty() {
+ println!("{} No packages installed.", "[ror]".yellow());
+ return;
+ }
+
+ println!("{} Installed packages:", "[ror]".blue().bold());
+ println!("{:-<60}", "");
+ println!("{:<20} {:<15} {:<10}", "Name", "Version", "Type");
+ println!("{:-<60}", "");
+
+ let mut sorted: Vec<_> = packages.values().collect();
+ sorted.sort_by_key(|p| &p.name);
+
+ for pkg in sorted {
+ println!(
+ "{:<20} {:<15} {:<10}",
+ pkg.name.green(),
+ pkg.version.cyan(),
+ pkg.build_type.yellow()
+ );
+ }
+ println!("{:-<60}", "");
+ println!("{} Total: {} packages", ">>>".green(), packages.len());
+}
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..6df2cfc
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,218 @@
+use clap::Parser;
+use std::path::{Path, PathBuf};
+use std::sync::Arc;
+use colored::Colorize;
+
+mod sync;
+mod install;
+mod config;
+mod info;
+mod group;
+mod delete;
+mod listinstalled;
+mod update;
+mod rootfs;
+mod parallel;
+mod debug;
+mod search;
+mod repo;
+
+#[derive(Parser, Debug)]
+#[command(author, about, arg_required_else_help = true)]
+struct Args {
+ #[arg(long = "search", value_name = "QUERY")]
+ search: Option<String>,
+
+ #[arg(short = 's', long = "sync")]
+ sync: bool,
+
+ #[arg(short = 'd', long = "delete", value_name = "PACKAGE")]
+ delete: Option<String>,
+
+ #[arg(short = 'l', long = "list-installed")]
+ listinstalled: bool,
+
+ #[arg(long = "info", value_name = "PACKAGE")]
+ info: Option<String>,
+
+ #[arg(short = 'v', long = "version")]
+ version: bool,
+
+ #[arg(short = 'g', long = "gen-config")]
+ gen_config: bool,
+
+ #[arg(short = 'i', long = "install", value_name = "PACKAGE_OR_GROUP", num_args = 1..)]
+ install: Vec<String>,
+
+ #[arg(long = "update", value_name = "PACKAGE")]
+ update: Option<String>,
+
+ #[arg(long = "dry-run")]
+ dry_run: bool,
+
+ #[arg(short = 'u', long = "upgrade")]
+ upgrade: bool,
+
+ #[arg(long = "repo-add", value_names = ["NAME", "URL"])]
+ repo_add: Option<Vec<String>>,
+
+ #[arg(long = "repo-remove", value_name = "NAME")]
+ repo_remove: Option<String>,
+
+ #[arg(long = "repo-list")]
+ repo_list: bool,
+
+ #[arg(long = "build-rootfs")]
+ build_rootfs: bool,
+
+ #[arg(long = "rootfs-group", value_name = "GROUP")]
+ rootfs_group: Option<String>,
+
+ #[arg(long = "rootfs-target", value_name = "TARGET")]
+ rootfs_target: Option<PathBuf>,
+
+ #[arg(long = "rootfs-arch", default_value = "native")]
+ rootfs_arch: String,
+}
+
+fn main() {
+ let args = Args::parse();
+
+ if args.version {
+ println!("ror {}", env!("CARGO_PKG_VERSION"));
+ return;
+ }
+ if args.gen_config {
+ let config_path = Path::new("/var/ror/ror.conf");
+ match config::Config::create_default_config(config_path) {
+ Ok(()) => println!(
+ "{} Default config created at {:?}",
+ "[ror]".blue().bold(),
+ config_path
+ ),
+ Err(e) => eprintln!(
+ "{} Failed to create config: {}",
+ "[ror]".red().bold(),
+ e
+ ),
+ }
+ return;
+ }
+
+ let cfg = Arc::new(config::Config::load());
+
+
+ if let Some(pkg) = args.info {
+ info::print_package_info(&pkg);
+ return;
+ }
+ if args.sync {
+ sync::run_sync(&cfg);
+ return;
+ }
+ if args.listinstalled {
+ listinstalled::print_installed();
+ return;
+ }
+ if args.build_rootfs {
+ let arch = if args.rootfs_arch == "native" {
+ "native"
+ } else {
+ &args.rootfs_arch
+ };
+ if let (Some(group), Some(target)) = (args.rootfs_group, args.rootfs_target) {
+ if let Err(e) = rootfs::build_rootfs(&group, &target, &cfg, arch, true) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ } else {
+ eprintln!("{} --build-rootfs requires --rootfs-group and --rootfs-target", "[ror]".red().bold());
+ }
+ return;
+ }
+ if let Some(pkg) = args.delete {
+ delete::remove_package(&pkg);
+ return;
+ }
+ if let Some(query) = args.search {
+ search::search_packages(&query);
+ return;
+ }
+ if !args.install.is_empty() {
+ if args.install[0].starts_with('@') {
+ let group_name = &args.install[0][1..];
+ match group::load_group(group_name) {
+ Ok(group) => {
+ if let Err(e) = parallel::install_packages_parallel(&group.packages, Arc::clone(&cfg)) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ }
+ Err(e) => eprintln!("{} {}", "[ror]".red().bold(), e),
+ }
+ } else {
+ if let Err(e) = parallel::install_packages_parallel(&args.install, Arc::clone(&cfg)) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ }
+ return;
+ }
+
+ if args.upgrade {
+ if args.dry_run {
+ let upgradable = update::list_upgradable();
+ if upgradable.is_empty() {
+ println!("{} No packages to upgrade.", "[ror]".green());
+ } else {
+ println!("{} Packages that would be upgraded:", ">>>".yellow());
+ for pkg in upgradable {
+ println!(" - {}", pkg);
+ }
+ }
+ } else {
+ update::upgrade_all(&cfg, false);
+ }
+ return;
+ }
+ if args.repo_list {
+ repo::list_repositories();
+ return;
+ }
+ if args.build_rootfs {
+ let arch = if args.rootfs_arch == "native" {
+ "native"
+ } else {
+ &args.rootfs_arch
+ };
+ if let (Some(group), Some(target)) = (args.rootfs_group, args.rootfs_target) {
+ if let Err(e) = rootfs::build_rootfs(&group, &target, &cfg, arch, true) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ } else {
+ eprintln!("{} --build-rootfs requires --rootfs-group and --rootfs-target", "[ror]".red().bold());
+ }
+ return;
+ }
+ if let Some(args) = args.repo_remove {
+ if let Err(e) = repo::remove_repository(&args) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ return;
+ }
+
+ if let Some(args) = args.repo_add {
+ if args.len() < 2 {
+ eprintln!("{} Usage: --repo-add <name> <url> [mirror]", "[ror]".red().bold());
+ return;
+ }
+ let name = &args[0];
+ let url = &args[1];
+ let mirror = if args.len() > 2 { Some(args[2].as_str()) } else { None };
+ if let Err(e) = repo::add_repository(name, url, mirror) {
+ eprintln!("{} {}", "[ror]".red().bold(), e);
+ }
+ return;
+ }
+ if let Some(pkg) = args.update {
+ update::update_package(&pkg, &cfg, args.dry_run);
+ return;
+ }
+}
diff --git a/src/parallel.rs b/src/parallel.rs
new file mode 100644
index 0000000..ff11e79
--- /dev/null
+++ b/src/parallel.rs
@@ -0,0 +1,305 @@
+use std::collections::{HashMap, HashSet, VecDeque};
+use std::sync::{Arc, Mutex};
+use std::thread;
+use crate::config::Config;
+use crate::install::{self, Dependency, InstalledDB, load_package};
+use colored::Colorize;
+use crate::debug;
+
+type Result<T> = std::result::Result<T, String>;
+
+struct DependencyGraph {
+ edges: HashMap<String, Vec<String>>,
+ reverse: HashMap<String, Vec<String>>,
+}
+
+impl DependencyGraph {
+ fn new() -> Self {
+ debug!("DependencyGraph::new()");
+ Self { edges: HashMap::new(), reverse: HashMap::new() }
+ }
+
+ fn add_dep(&mut self, pkg: String, dep: String) {
+ debug!("DependencyGraph::add_dep: {} -> {}", pkg, dep);
+ self.edges.entry(pkg.clone()).or_insert_with(Vec::new).push(dep.clone());
+ self.reverse.entry(dep).or_insert_with(Vec::new).push(pkg);
+ }
+
+ fn compute_levels(&self) -> Vec<Vec<String>> {
+ debug!("DependencyGraph::compute_levels: start");
+ let mut in_degree: HashMap<String, usize> = HashMap::new();
+ for (pkg, deps) in &self.edges {
+ in_degree.entry(pkg.clone()).or_insert(0);
+ for dep in deps {
+ *in_degree.entry(dep.clone()).or_insert(0) += 1;
+ }
+ }
+ for (pkg, children) in &self.reverse {
+ in_degree.entry(pkg.clone()).or_insert(0);
+ for child in children {
+ in_degree.entry(child.clone()).or_insert(0);
+ }
+ }
+
+ let mut levels = Vec::new();
+ let mut queue: VecDeque<String> = in_degree.iter()
+ .filter(|(_, &deg)| deg == 0)
+ .map(|(pkg, _)| pkg.clone())
+ .collect();
+ debug!("compute_levels: initial queue: {:?}", queue);
+
+ while !queue.is_empty() {
+ let level_pkgs: Vec<String> = queue.drain(..).collect();
+ debug!("compute_levels: level {}: {:?}", levels.len(), level_pkgs);
+ levels.push(level_pkgs.clone());
+ for pkg in &level_pkgs {
+ if let Some(children) = self.reverse.get(pkg) {
+ for child in children {
+ if let Some(deg) = in_degree.get_mut(child) {
+ *deg -= 1;
+ if *deg == 0 {
+ queue.push_back(child.clone());
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if in_degree.values().any(|&d| d > 0) {
+ eprintln!("{} Circular dependency detected!", "[ror]".red().bold());
+ debug!("compute_levels: circular dependency detected");
+ }
+ debug!("compute_levels: levels count = {}", levels.len());
+ levels
+ }
+}
+
+fn collect_required_packages(packages: &[String], installed_db: &InstalledDB) -> Result<HashSet<String>> {
+ debug!("collect_required_packages: start with packages {:?}", packages);
+ let mut required = HashSet::new();
+ let mut stack: Vec<String> = packages.iter().cloned().collect();
+
+ while let Some(pkg_name) = stack.pop() {
+ debug!("collect_required_packages: processing {}", pkg_name);
+ if installed_db.is_installed(&pkg_name) || required.contains(&pkg_name) {
+ debug!("collect_required_packages: {} already installed or in required set", pkg_name);
+ continue;
+ }
+ required.insert(pkg_name.clone());
+
+ let pkg = match load_package(&pkg_name) {
+ Some(p) => p,
+ None => {
+ debug!("collect_required_packages: package {} not found", pkg_name);
+ return Err(format!("Package '{}' not found", pkg_name));
+ }
+ };
+
+ for dep in &pkg.depends {
+ match dep {
+ Dependency::Single(name) => {
+ debug!("collect_required_packages: single dependency {}", name);
+ if !installed_db.is_installed(name) && !required.contains(name) {
+ stack.push(name.clone());
+ }
+ }
+ Dependency::Any(alternatives) => {
+ debug!("collect_required_packages: any dependency {:?}", alternatives);
+ let installed_alt = alternatives.iter().find(|alt| installed_db.is_installed(*alt));
+ if installed_alt.is_some() {
+ debug!("collect_required_packages: an alternative already installed, skipping");
+ continue;
+ }
+ let chosen = alternatives.iter()
+ .find(|alt| required.contains(*alt))
+ .cloned()
+ .or_else(|| alternatives.first().cloned())
+ .ok_or_else(|| {
+ debug!("collect_required_packages: empty alternative list");
+ format!("Empty alternative list in package {}", pkg_name)
+ })?;
+ debug!("collect_required_packages: chosen alternative {}", chosen);
+ if !required.contains(&chosen) {
+ stack.push(chosen);
+ }
+ }
+ }
+ }
+ }
+ debug!("collect_required_packages: required set = {:?}", required);
+ Ok(required)
+}
+
+fn build_graph(packages: &HashSet<String>, installed_db: &InstalledDB) -> Result<DependencyGraph> {
+ debug!("build_graph: building graph for {} packages", packages.len());
+ let mut graph = DependencyGraph::new();
+ for pkg_name in packages {
+ debug!("build_graph: processing {}", pkg_name);
+ let pkg = match load_package(pkg_name) {
+ Some(p) => p,
+ None => {
+ debug!("build_graph: package {} not found", pkg_name);
+ return Err(format!("Package '{}' not found", pkg_name));
+ }
+ };
+ for dep in &pkg.depends {
+ match dep {
+ Dependency::Single(name) => {
+ if packages.contains(name) {
+ debug!("build_graph: adding edge {} -> {}", pkg_name, name);
+ graph.add_dep(pkg_name.clone(), name.clone());
+ } else if !installed_db.is_installed(name) {
+ debug!("build_graph: missing dependency {} for {}", name, pkg_name);
+ return Err(format!("Dependency '{}' of '{}' is missing", name, pkg_name));
+ }
+ }
+ Dependency::Any(alternatives) => {
+ debug!("build_graph: any dependency {:?} for {}", alternatives, pkg_name);
+ let found = alternatives.iter().find(|alt| packages.contains(*alt));
+ if let Some(chosen) = found {
+ debug!("build_graph: adding edge {} -> {}", pkg_name, chosen);
+ graph.add_dep(pkg_name.clone(), chosen.clone());
+ } else {
+ let installed = alternatives.iter().any(|alt| installed_db.is_installed(alt));
+ if !installed {
+ debug!("build_graph: no alternative available for {}", pkg_name);
+ return Err(format!("No alternative from {:?} for package '{}' is available", alternatives, pkg_name));
+ }
+ }
+ }
+ }
+ }
+ }
+ Ok(graph)
+}
+
+fn check_conflicts(required: &HashSet<String>, installed_db: &InstalledDB) -> Result<()> {
+ debug!("check_conflicts: checking {} packages", required.len());
+ let mut pkg_map = HashMap::new();
+ for pkg_name in required {
+ let pkg = match load_package(pkg_name) {
+ Some(p) => p,
+ None => {
+ debug!("check_conflicts: package {} not found", pkg_name);
+ return Err(format!("Package '{}' not found", pkg_name));
+ }
+ };
+ pkg_map.insert(pkg_name.clone(), pkg);
+ }
+
+ for (name, pkg) in &pkg_map {
+ for conflict in &pkg.conflicts {
+ if installed_db.is_installed(conflict) {
+ debug!("check_conflicts: {} conflicts with installed {}", name, conflict);
+ return Err(format!("Package '{}' conflicts with installed package '{}'", name, conflict));
+ }
+ }
+ }
+
+ let names: Vec<_> = pkg_map.keys().cloned().collect();
+ for i in 0..names.len() {
+ for j in i+1..names.len() {
+ let a = &names[i];
+ let b = &names[j];
+ let pkg_a = &pkg_map[a];
+ let pkg_b = &pkg_map[b];
+ if pkg_a.conflicts.contains(b) || pkg_b.conflicts.contains(a) {
+ debug!("check_conflicts: {} and {} conflict", a, b);
+ return Err(format!("Packages '{}' and '{}' conflict with each other", a, b));
+ }
+ }
+ }
+ debug!("check_conflicts: no conflicts found");
+ Ok(())
+}
+
+fn install_single_package(pkg_name: &str, cfg: Arc<Config>, db_mutex: &Mutex<InstalledDB>) -> Result<()> {
+ debug!("install_single_package: starting {}", pkg_name);
+ println!("{} Installing {}...", ">>>".cyan(), pkg_name);
+ let installed_pkg = match install::install_package_with_result(pkg_name, &*cfg) {
+ Ok(p) => {
+ debug!("install_single_package: install_package_with_result OK for {}", pkg_name);
+ p
+ }
+ Err(e) => {
+ debug!("install_single_package: install_package_with_result failed for {}: {}", pkg_name, e);
+ return Err(e);
+ }
+ };
+ let mut db = db_mutex.lock().unwrap();
+ db.add_package(installed_pkg);
+ debug!("install_single_package: added to memory DB, saving...");
+ if let Err(e) = db.save() {
+ eprintln!("{} Failed to save installed DB: {}", "[ror]".red().bold(), e);
+ debug!("install_single_package: save failed: {}", e);
+ return Err(format!("Failed to save installed DB: {}", e));
+ }
+ debug!("install_single_package: save successful for {}", pkg_name);
+ println!("{} Package registered in database", "[ror]".green());
+ Ok(())
+}
+pub fn install_packages_parallel(packages: &[String], cfg: Arc<Config>) -> Result<()> {
+ debug!("install_packages_parallel: called with {:?}", packages);
+ let installed_db = InstalledDB::load();
+ let required = collect_required_packages(packages, &installed_db)?;
+ if required.is_empty() {
+ println!("{} All packages already installed.", "[ror]".green());
+ debug!("install_packages_parallel: no packages required");
+ return Ok(());
+ }
+
+ check_conflicts(&required, &installed_db)?;
+
+ let graph = build_graph(&required, &installed_db)?;
+ let mut levels = graph.compute_levels();
+
+ if levels.is_empty() && !required.is_empty() {
+ debug!("install_packages_parallel: no dependencies, creating single level");
+ levels.push(required.iter().cloned().collect());
+ }
+
+ debug!("install_packages_parallel: levels: {:?}", levels);
+
+ let db_mutex = Arc::new(Mutex::new(InstalledDB::load()));
+
+ for (level_idx, level_pkgs) in levels.into_iter().enumerate() {
+ println!("{} Level {}: {} packages", ">>>".cyan(), level_idx, level_pkgs.len());
+ debug!("install_packages_parallel: starting level {} with {:?}", level_idx, level_pkgs);
+ let mut handles = Vec::new();
+ for pkg in level_pkgs {
+ let pkg_name = pkg.clone();
+ let cfg = Arc::clone(&cfg);
+ let db_mutex = Arc::clone(&db_mutex);
+ let handle = thread::spawn(move || {
+ install_single_package(&pkg_name, cfg, &db_mutex)
+ });
+ handles.push(handle);
+ }
+
+ let mut errors = Vec::new();
+ for handle in handles {
+ match handle.join() {
+ Ok(Ok(())) => {},
+ Ok(Err(e)) => {
+ debug!("install_packages_parallel: thread error: {}", e);
+ errors.push(e);
+ }
+ Err(_) => {
+ debug!("install_packages_parallel: thread panicked");
+ errors.push("Thread panicked".to_string());
+ }
+ }
+ }
+
+ if !errors.is_empty() {
+ eprintln!("{} Errors during level {}: {:?}", "[ror]".red().bold(), level_idx, errors);
+ debug!("install_packages_parallel: level {} failed with {} errors", level_idx, errors.len());
+ return Err(format!("Installation failed at level {}", level_idx));
+ }
+ }
+
+ println!("{} All packages installed successfully.", "[ror]".green().bold());
+ debug!("install_packages_parallel: completed successfully");
+ Ok(())
+}
diff --git a/src/repo.rs b/src/repo.rs
new file mode 100644
index 0000000..bd87ea5
--- /dev/null
+++ b/src/repo.rs
@@ -0,0 +1,56 @@
+
+use colored::Colorize;
+use std::fs;
+use std::path::Path;
+use crate::config::{Config, RepositoryConfig};
+
+pub fn add_repository(name: &str, url: &str, mirror: Option<&str>) -> Result<(), String> {
+ let mut cfg = Config::load();
+ if cfg.repositories.contains_key(name) {
+ return Err(format!("Repository '{}' already exists", name));
+ }
+ let repo = RepositoryConfig {
+ url: url.to_string(),
+ mirror: mirror.map(String::from),
+ };
+ cfg.repositories.insert(name.to_string(), repo);
+ save_config(&cfg)?;
+ println!("{} Repository '{}' added.", "[ror]".green().bold(), name);
+ Ok(())
+}
+
+pub fn remove_repository(name: &str) -> Result<(), String> {
+ let mut cfg = Config::load();
+ if !cfg.repositories.contains_key(name) {
+ return Err(format!("Repository '{}' not found", name));
+ }
+ cfg.repositories.remove(name);
+ save_config(&cfg)?;
+ println!("{} Repository '{}' removed.", "[ror]".green().bold(), name);
+ Ok(())
+}
+
+pub fn list_repositories() {
+ let cfg = Config::load();
+ if cfg.repositories.is_empty() {
+ println!("{} No repositories configured.", "[ror]".yellow());
+ return;
+ }
+ println!("{} Configured repositories:", "[ror]".blue().bold());
+ for (name, repo) in &cfg.repositories {
+ println!(" {} {}", name.green(), repo.url);
+ if let Some(m) = &repo.mirror {
+ println!(" mirror: {}", m);
+ }
+ }
+}
+
+fn save_config(cfg: &Config) -> Result<(), String> {
+ let path = Path::new("/var/ror/ror.conf");
+ let ini = cfg.to_ini().map_err(|e| format!("Failed to serialize config: {}", e))?;
+ fs::write(path, ini).map_err(|e| format!("Failed to write config: {}", e))?;
+ Ok(())
+}
+
+
+
diff --git a/src/rootfs.rs b/src/rootfs.rs
new file mode 100644
index 0000000..659032e
--- /dev/null
+++ b/src/rootfs.rs
@@ -0,0 +1,307 @@
+use std::fs;
+use std::path::Path;
+use std::collections::HashSet;
+use std::process::Command;
+use colored::Colorize;
+use crate::config;
+use crate::group::Group;
+use crate::install::{
+ Dependency, Package, load_package, download_and_verify,
+ extract_native, install_files_with_root, select_binary_for_arch,
+};
+
+
+
+
+
+fn mount_virtual_fs(root_dir: &Path) -> Result<(), String> {
+
+ let mounts: &[(&str, &str, &str, bool)] = &[
+ ("/dev", "dev", "devtmpfs", true),
+ ("/dev/pts", "dev/pts", "devpts", true),
+ ("/dev/shm", "dev/shm", "tmpfs", true),
+ ("proc", "proc", "proc", false),
+ ("sysfs", "sys", "sysfs", false),
+ ];
+
+ for (src, rel, fstype, bind) in mounts {
+ let target = root_dir.join(rel);
+ fs::create_dir_all(&target)
+ .map_err(|e| format!("Failed to create mountpoint {}: {}", rel, e))?;
+
+ let status = if *bind {
+ Command::new("mount")
+ .args(["--bind", src, target.to_str().unwrap()])
+ .status()
+ } else {
+ Command::new("mount")
+ .args(["-t", fstype, src, target.to_str().unwrap()])
+ .status()
+ };
+
+ match status {
+ Ok(s) if s.success() => {}
+ Ok(_) => eprintln!("{} Warning: failed to mount {} (non-fatal)", "[ror]".yellow(), rel),
+ Err(e) => eprintln!("{} Warning: mount {}: {} (non-fatal)", "[ror]".yellow(), rel, e),
+ }
+ }
+ Ok(())
+}
+
+
+fn umount_virtual_fs(root_dir: &Path) {
+ for rel in &["dev/pts", "dev/shm", "dev", "proc", "sys"] {
+ let target = root_dir.join(rel);
+ if target.exists() {
+ let _ = Command::new("umount").args(["-l", target.to_str().unwrap()]).status();
+ }
+ }
+}
+
+
+
+
+
+
+
+fn find_shell_in_rootfs(root_dir: &Path) -> Option<(&'static str, Option<&'static str>)> {
+ let candidates: &[(&str, Option<&str>)] = &[
+ ("/bin/sh", None),
+ ("/usr/bin/sh", None),
+ ("/bin/bash", None),
+ ("/usr/bin/bash", None),
+ ("/bin/busybox", Some("sh")),
+ ("/usr/bin/busybox", Some("sh")),
+ ];
+ candidates.iter()
+ .find(|(p, _)| root_dir.join(p.trim_start_matches('/')).exists())
+ .copied()
+}
+
+
+
+
+
+fn run_install_steps_in_chroot(pkg_name: &str, steps: &str, root_dir: &Path) -> Result<(), String> {
+ let (shell, subcmd) = find_shell_in_rootfs(root_dir)
+ .ok_or_else(|| format!(
+ "No shell found in rootfs for '{}'. Checked: /bin/sh, /bin/bash, /bin/busybox",
+ pkg_name
+ ))?;
+
+ println!("{} Using shell: {}{}", ">>>".cyan(), shell,
+ subcmd.map(|s| format!(" {}", s)).unwrap_or_default());
+
+ let script_rel = "/.ror-install-steps.sh";
+ let script_host = root_dir.join(script_rel.trim_start_matches('/'));
+
+ fs::write(&script_host, format!("#!/bin/sh\nset -e\n{}", steps))
+ .map_err(|e| format!("Failed to write install script: {}", e))?;
+
+ let mut cmd = Command::new("chroot");
+ cmd.arg(root_dir).arg(shell);
+ if let Some(sub) = subcmd { cmd.arg(sub); }
+ cmd.arg(script_rel);
+
+ let status = cmd.status()
+ .map_err(|e| format!("Failed to execute chroot for {}: {}", pkg_name, e))?;
+
+ let _ = fs::remove_file(&script_host);
+
+ if status.success() {
+ Ok(())
+ } else {
+ Err(format!(
+ "install_steps for '{}' failed with exit code {:?}",
+ pkg_name, status.code()
+ ))
+ }
+}
+
+
+
+
+
+fn process_dependencies_chroot(
+ pkg: &Package,
+ cfg: &config::Config,
+ root_dir: &Path,
+ installing: &mut HashSet<String>,
+ target_arch: &str,
+) -> Result<(), String> {
+ for dep in &pkg.depends {
+ match dep {
+ Dependency::Single(name) => {
+ if !installing.contains(name) {
+ install_package_in_chroot(name, cfg, root_dir, installing, target_arch)?;
+ }
+ }
+ Dependency::Any(alternatives) => {
+ if alternatives.iter().any(|alt| installing.contains(alt)) {
+ continue;
+ }
+ let chosen = alternatives.first()
+ .ok_or_else(|| format!("Empty alternative list in package {}", pkg.name))?;
+ install_package_in_chroot(chosen, cfg, root_dir, installing, target_arch)?;
+ }
+ }
+ }
+ Ok(())
+}
+
+pub fn install_package_in_chroot(
+ pkg_name: &str,
+ cfg: &config::Config,
+ root_dir: &Path,
+ installing: &mut HashSet<String>,
+ target_arch: &str,
+) -> Result<(), String> {
+ if installing.contains(pkg_name) {
+ eprintln!("{} Circular dependency detected: {}", "[ror]".red().bold(), pkg_name);
+ return Ok(());
+ }
+ installing.insert(pkg_name.to_string());
+
+ let pkg = load_package(pkg_name)
+ .ok_or_else(|| format!("Package '{}' not found", pkg_name))?;
+
+ process_dependencies_chroot(&pkg, cfg, root_dir, installing, target_arch)?;
+
+ let binary = select_binary_for_arch(&pkg, target_arch)
+ .map_err(|e| format!("Failed to select binary for {}: {}", pkg_name, e))?;
+
+ let mut last_err = None;
+ for mirror in &binary.mirrors {
+ let url = mirror.replace("{filename}", &binary.filename);
+ println!("{} Trying mirror: {}", ">>>".yellow(), url);
+
+ let archive_path = match download_and_verify(&url, &binary.sha256, cfg) {
+ Ok(p) => p,
+ Err(e) => { last_err = Some(e); continue; }
+ };
+
+ let work_dir = Path::new("/tmp/ror-install").join(&pkg.name);
+ if work_dir.exists() {
+ fs::remove_dir_all(&work_dir)
+ .map_err(|e| format!("Failed to clean temp dir: {}", e))?;
+ }
+ fs::create_dir_all(&work_dir)
+ .map_err(|e| format!("Failed to create temp dir: {}", e))?;
+
+ let files = extract_native(&archive_path, &work_dir)
+ .map_err(|e| format!("Extraction failed: {}", e))?;
+
+ let file_list = if binary.files.is_empty() { files } else { binary.files.clone() };
+
+ install_files_with_root(&work_dir, root_dir, &file_list)?;
+
+ let _ = fs::remove_dir_all(&work_dir);
+ let _ = fs::remove_file(&archive_path);
+
+ println!("{} Installed {} into {}", ">>>".green(), pkg_name, root_dir.display());
+ return Ok(());
+ }
+
+ Err(last_err.unwrap_or_else(|| "All mirrors failed".into()))
+}
+
+
+
+
+
+fn run_all_install_steps(
+ group_order: &[String],
+ all_installed: &HashSet<String>,
+ target_dir: &Path,
+) -> Result<(), String> {
+ let mut done: HashSet<String> = HashSet::new();
+
+
+ let mut queue: Vec<&str> = group_order.iter().map(|s| s.as_str()).collect();
+
+ let mut extras: Vec<String> = all_installed.iter()
+ .filter(|p| !group_order.contains(p))
+ .cloned()
+ .collect();
+ extras.sort();
+ for e in &extras { queue.push(e.as_str()); }
+
+ for pkg_name in queue {
+ if done.contains(pkg_name) || !all_installed.contains(pkg_name) { continue; }
+ done.insert(pkg_name.to_string());
+
+ if let Some(pkg) = load_package(pkg_name) {
+ if !pkg.install_steps.trim().is_empty() {
+ println!("{} install_steps: {}", ">>>".cyan(), pkg_name);
+ run_install_steps_in_chroot(pkg_name, &pkg.install_steps, target_dir)?;
+ }
+ }
+ }
+ Ok(())
+}
+
+
+
+
+
+pub fn build_rootfs(
+ group_name: &str,
+ target_dir: &Path,
+ cfg: &config::Config,
+ target_arch: &str,
+ run_ldconfig: bool,
+) -> Result<(), String> {
+ if !target_dir.exists() {
+ fs::create_dir_all(target_dir)
+ .map_err(|e| format!("Failed to create target directory: {}", e))?;
+ } else {
+ let mut entries = target_dir.read_dir()
+ .map_err(|e| format!("Failed to read target directory: {}", e))?;
+ if entries.next().is_some() {
+ return Err(format!("Target directory {} is not empty", target_dir.display()));
+ }
+ }
+
+ let group_file = format!("/var/ror/packages/groups/{}.yaml", group_name);
+ let content = fs::read_to_string(&group_file)
+ .map_err(|e| format!("Failed to read group file: {}", e))?;
+ let group: Group = serde_yaml::from_str(&content)
+ .map_err(|e| format!("Group YAML error: {}", e))?;
+
+ println!("{} Building rootfs in {} with group '{}'",
+ "[ror]".blue().bold(), target_dir.display(), group_name);
+ if let Some(desc) = &group.description {
+ println!("{} {}", "Description:".yellow(), desc);
+ }
+
+
+ println!("\n{} Phase 1: installing files...", ">>>".cyan().bold());
+ let mut installing: HashSet<String> = HashSet::new();
+ for pkg in &group.packages {
+ install_package_in_chroot(pkg, cfg, target_dir, &mut installing, target_arch)?;
+ }
+ println!("{} Phase 1 complete: {} packages.", ">>>".green(), installing.len());
+
+ if run_ldconfig {
+ println!("{} Running ldconfig...", ">>>".cyan());
+ match Command::new("ldconfig").arg("-r").arg(target_dir).status() {
+ Ok(s) if s.success() => println!("{} ldconfig done.", ">>>".green()),
+ _ => eprintln!("{} ldconfig failed (non-fatal)", "[ror]".yellow()),
+ }
+ }
+
+ println!("\n{} Phase 2: running install_steps in chroot...", ">>>".cyan().bold());
+ println!("{} Mounting /dev /proc /sys...", ">>>".cyan());
+ mount_virtual_fs(target_dir)?;
+
+ let result = run_all_install_steps(&group.packages, &installing, target_dir);
+
+ println!("{} Unmounting virtual filesystems...", ">>>".cyan());
+ umount_virtual_fs(target_dir);
+
+ result?;
+
+ println!("\n{} Rootfs created successfully at {}",
+ "[ror]".green().bold(), target_dir.display());
+ Ok(())
+}
diff --git a/src/search.rs b/src/search.rs
new file mode 100644
index 0000000..fabfb47
--- /dev/null
+++ b/src/search.rs
@@ -0,0 +1,92 @@
+use colored::Colorize;
+use std::fs;
+use std::path::Path;
+use crate::install::Package;
+
+const REPOS_ROOT: &str = "/var/ror/packages";
+
+fn load_package_from_path(path: &Path) -> Option<Package> {
+ let content = fs::read_to_string(path).ok()?;
+ serde_yaml::from_str(&content).ok()
+}
+
+fn find_all_package_files() -> Vec<String> {
+ let mut results = Vec::new();
+ let root = Path::new(REPOS_ROOT);
+ let Ok(level1) = fs::read_dir(root) else { return results };
+
+ for entry1 in level1.flatten() {
+ let path1 = entry1.path();
+ if !path1.is_dir() || path1.file_name().unwrap_or_default() == "groups" {
+ continue;
+ }
+
+
+ let Ok(level2) = fs::read_dir(&path1) else { continue };
+ for entry2 in level2.flatten() {
+ let path2 = entry2.path();
+ if !path2.is_dir() {
+ continue;
+ }
+
+
+ let yaml_path = path2.join(path2.file_name().unwrap()).with_extension("yaml");
+ if yaml_path.exists() {
+ if let Some(s) = yaml_path.to_str() {
+ results.push(s.to_string());
+ }
+ continue;
+ }
+
+
+ let Ok(level3) = fs::read_dir(&path2) else { continue };
+ for entry3 in level3.flatten() {
+ let path3 = entry3.path();
+ if !path3.is_dir() {
+ continue;
+ }
+ let yaml_path = path3.join(path3.file_name().unwrap()).with_extension("yaml");
+ if yaml_path.exists() {
+ if let Some(s) = yaml_path.to_str() {
+ results.push(s.to_string());
+ }
+ }
+ }
+ }
+ }
+ results
+}
+
+pub fn search_packages(query: &str) {
+ let query_lower = query.to_lowercase();
+ let files = find_all_package_files();
+
+ if files.is_empty() {
+ println!("{} No packages found in repositories.", "[ror]".yellow());
+ return;
+ }
+
+ let mut matches = Vec::new();
+ for file in files {
+ if let Some(pkg) = load_package_from_path(Path::new(&file)) {
+ let name_lower = pkg.name.to_lowercase();
+ let desc_lower = pkg.description.clone().unwrap_or_default().to_lowercase();
+ if name_lower.contains(&query_lower) || desc_lower.contains(&query_lower) {
+ matches.push(pkg);
+ }
+ }
+ }
+
+ if matches.is_empty() {
+ println!("{} No packages matching '{}'.", "[ror]".yellow(), query);
+ return;
+ }
+
+ println!("{} Packages matching '{}':", "[ror]".blue().bold(), query);
+ println!("{:-<60}", "");
+ for pkg in matches {
+ let name_ver = format!("{} {}", pkg.name, pkg.version).cyan();
+ let desc = pkg.description.unwrap_or_default();
+ println!(" {} {}", name_ver, desc);
+ }
+}
diff --git a/src/sync.rs b/src/sync.rs
new file mode 100644
index 0000000..3734a03
--- /dev/null
+++ b/src/sync.rs
@@ -0,0 +1,69 @@
+use colored::*;
+use std::path::Path;
+use std::process::Command;
+use crate::config::Config;
+
+const REPOS_DIR: &str = "/var/ror/packages";
+
+pub fn run_sync(cfg: &Config) {
+ if cfg.repositories.is_empty() {
+ eprintln!("{} No repositories configured.", "[ror]".red().bold());
+ return;
+ }
+
+ for (name, repo) in &cfg.repositories {
+ println!("{} Syncing repository '{}'...", "[ror]".blue().bold(), name);
+ let repo_path = Path::new(REPOS_DIR).join(name);
+
+ if repo_path.exists() {
+ println!("{} Updating {}...", ">>>".green(), name);
+ let status = Command::new("git")
+ .args(&["-C", repo_path.to_str().unwrap(), "pull"])
+ .status()
+ .expect("Failed to execute git pull");
+
+ if !status.success() && repo.mirror.is_some() {
+ eprintln!("{} Pull failed, trying mirror...", "[ror]".red());
+ let mirror_url = repo.mirror.as_ref().unwrap();
+ let mirror_status = Command::new("git")
+ .args(&["-C", repo_path.to_str().unwrap(), "pull", mirror_url])
+ .status()
+ .expect("Failed to execute git pull from mirror");
+ if mirror_status.success() {
+ println!("{} Updated from mirror.", ">>>".green());
+ } else {
+ eprintln!("{} Mirror also failed.", "[ror]".red());
+ }
+ } else if !status.success() {
+ eprintln!("{} Git pull failed, no mirror configured.", "[ror]".red());
+ } else {
+ println!("{} Repository updated.", ">>>".green());
+ }
+ } else {
+ println!("{} Cloning {}...", ">>>".green(), name);
+ let primary_url = &repo.url;
+ let mut status = Command::new("git")
+ .args(&["clone", primary_url, repo_path.to_str().unwrap()])
+ .status()
+ .expect("Failed to execute git clone");
+
+ if !status.success() && repo.mirror.is_some() {
+ eprintln!("{} Clone from primary failed, trying mirror...", "[ror]".red());
+ let mirror_url = repo.mirror.as_ref().unwrap();
+ status = Command::new("git")
+ .args(&["clone", mirror_url, repo_path.to_str().unwrap()])
+ .status()
+ .expect("Failed to execute git clone from mirror");
+ if status.success() {
+ println!("{} Cloned from mirror.", ">>>".green());
+ } else {
+ eprintln!("{} Mirror also failed.", "[ror]".red());
+ }
+ } else if !status.success() {
+ eprintln!("{} Git clone failed.", "[ror]".red());
+ } else {
+ println!("{} Repository cloned.", ">>>".green());
+ }
+ }
+ }
+}
diff --git a/src/update.rs b/src/update.rs
new file mode 100644
index 0000000..f5c2690
--- /dev/null
+++ b/src/update.rs
@@ -0,0 +1,99 @@
+use colored::Colorize;
+use crate::install::{self, InstalledDB, get_package_info};
+use crate::delete;
+use crate::config;
+use std::collections::HashSet;
+use semver::Version;
+
+fn is_newer(current: &str, available: &str) -> bool {
+ match (Version::parse(current), Version::parse(available)) {
+ (Ok(cur), Ok(ava)) => ava > cur,
+ _ => {
+
+ current != available && available > current
+ }
+ }
+}
+
+pub fn update_package(pkg_name: &str, cfg: &config::Config, dry_run: bool) -> bool {
+ let db = InstalledDB::load();
+ let installed = match db.packages.get(pkg_name) {
+ Some(p) => p,
+ None => {
+ eprintln!("{} Package '{}' is not installed.", "[ror]".red().bold(), pkg_name);
+ return false;
+ }
+ };
+
+ let info = match get_package_info(pkg_name) {
+ Some(info) => info,
+ None => {
+ eprintln!("{} Package '{}' not found in repository.", "[ror]".red().bold(), pkg_name);
+ return false;
+ }
+ };
+ let available_version = info.1;
+
+ if !is_newer(&installed.version, &available_version) {
+ println!("{} Package '{}' is already up-to-date (version {}).", "[ror]".green(), pkg_name, installed.version);
+ return false;
+ }
+
+ println!("{} Updating '{}' from {} to {}...", "[ror]".blue().bold(), pkg_name, installed.version, available_version);
+
+ if dry_run {
+ println!("{} DRY RUN: would remove and reinstall {}", ">>>".yellow(), pkg_name);
+ return true;
+ }
+
+ delete::remove_package(pkg_name);
+ install::install_package(pkg_name, cfg);
+ true
+}
+
+pub fn upgrade_all(cfg: &config::Config, dry_run: bool) {
+ let db = InstalledDB::load();
+ let installed: Vec<String> = db.packages.keys().cloned().collect();
+ if installed.is_empty() {
+ println!("{} No packages installed.", "[ror]".yellow());
+ return;
+ }
+
+ let mut updated = HashSet::new();
+ let mut failed = Vec::new();
+
+ for pkg in &installed {
+ if updated.contains(pkg) {
+ continue;
+ }
+ if update_package(pkg, cfg, dry_run) {
+ updated.insert(pkg.clone());
+ } else {
+ failed.push(pkg.clone());
+ }
+ }
+
+ if dry_run {
+ println!("{} DRY RUN: {} packages would be updated.", ">>>".yellow(), updated.len());
+ } else {
+ println!("{} Upgrade completed. Updated: {}, failed: {}.", "[ror]".green().bold(), updated.len(), failed.len());
+ if !failed.is_empty() {
+ println!("{} Failed packages: {:?}", "[ror]".red(), failed);
+ }
+ }
+}
+
+pub fn list_upgradable() -> Vec<String> {
+ let db = InstalledDB::load();
+ let mut upgradable = Vec::new();
+ for pkg_name in db.packages.keys() {
+ let installed_version = &db.packages[pkg_name].version;
+ if let Some(info) = get_package_info(pkg_name) {
+ let available_version = info.1;
+ if is_newer(installed_version, &available_version) {
+ upgradable.push(pkg_name.clone());
+ }
+ }
+ }
+ upgradable
+}