From 8e6a1c3aa4f0f3a403600abd9c72613676f9420a Mon Sep 17 00:00:00 2001 From: Wildan M Date: Wed, 1 Oct 2025 21:41:02 +0700 Subject: [PATCH] Bump pkgar and rand --- Cargo.lock | 99 +++++++++++++++++++++++++++++----------- Cargo.toml | 10 ++-- src/bin/installer_tui.rs | 3 +- src/lib.rs | 4 +- 4 files changed, 81 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8492c473a9..38aee5fa7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,6 +301,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "bstr" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "bumpalo" version = "3.19.0" @@ -851,6 +861,19 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +[[package]] +name = "globset" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + [[package]] name = "gpt" version = "3.1.0" @@ -1120,6 +1143,22 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "ignore" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "indexmap" version = "2.11.4" @@ -1523,7 +1562,7 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.2", + "rand", "ring", "rustc-hash", "rustls", @@ -1564,37 +1603,16 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha 0.9.0", + "rand_chacha", "rand_core 0.9.3", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -1657,11 +1675,12 @@ checksum = "436d45c2b6a5b159d43da708e62b25be3a4a3d5550d654b72216ade4c4bfd717" [[package]] name = "redox-pkg" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f49b2c29ae3c72ff3a8dbc1c5eefba9093a8c5ceaa8ca5292833816fe931e2" +checksum = "6d50a7ed267e236ce8bfa178bfd3fb7a39765689d037e51c57f36bad46f474fd" dependencies = [ "anyhow", + "ignore", "indicatif", "pkgar", "pkgar-core", @@ -1698,7 +1717,7 @@ dependencies = [ "pkgar", "pkgar-core", "pkgar-keys", - "rand 0.8.5", + "rand", "redox-pkg", "redox_liner", "redox_syscall", @@ -1953,6 +1972,15 @@ dependencies = [ "cipher", ] +[[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 = "seahash" version = "4.1.0" @@ -2484,6 +2512,16 @@ dependencies = [ "memchr", ] +[[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" @@ -2640,6 +2678,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.60.2", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index f73c7bd1fc..003cb7f5d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,12 +32,12 @@ fatfs = "0.3.0" fscommon = "0.1.1" gpt = "3.0.0" libc = "0.2.70" -pkgar = "0.1.17" -pkgar-core = "0.1.17" -pkgar-keys = "0.1.17" -rand = "0.8" +pkgar = "0.1.19" +pkgar-core = "0.1.19" +pkgar-keys = "0.1.19" +rand = "0.9" redox_liner = "0.5" -redox-pkg = { version = "0.2.5", features = ["indicatif"] } +redox-pkg = { version = "0.2.8", features = ["indicatif"] } redox_syscall = "0.5.2" redoxfs = "0.8.0" rust-argon2 = "0.8.2" diff --git a/src/bin/installer_tui.rs b/src/bin/installer_tui.rs index 1383c2624a..851637febe 100644 --- a/src/bin/installer_tui.rs +++ b/src/bin/installer_tui.rs @@ -1,10 +1,9 @@ -use anyhow::{anyhow, bail, Context, Result}; +use anyhow::{anyhow, bail, Result}; use pkgar::{ext::EntryExt, PackageHead}; use pkgar_core::PackageSrc; use pkgar_keys::PublicKeyFile; use redox_installer::{try_fast_install, with_redoxfs_mount, with_whole_disk, Config, DiskOption}; use std::{ - env, ffi::OsStr, fs, io::{self, Read, Write}, diff --git a/src/lib.rs b/src/lib.rs index 35e669cb13..ccd77fff6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ use crate::disk_wrapper::DiskWrapper; use anyhow::{anyhow, bail, Context, Result}; use pkg::Library; -use rand::{rngs::OsRng, RngCore}; +use rand::{rngs::OsRng, TryRngCore}; use redoxfs::{unmount_path, Disk, DiskIo, FileSystem}; use termion::input::TermRead; @@ -46,7 +46,7 @@ fn get_target() -> String { /// by redox_users. If the password is blank, the hash is blank. fn hash_password(password: &str) -> Result { if !password.is_empty() { - let salt = format!("{:X}", OsRng.next_u64()); + let salt = format!("{:X}", OsRng.try_next_u64()?); let config = argon2::Config::default(); let hash = argon2::hash_encoded(password.as_bytes(), salt.as_bytes(), &config)?; Ok(hash)