Package: rust-nanorand Version: 0.7.0-13 We hope to update rust-getrandom to version 0.4 soon, rust-nanorand needs a small patch for the new version.
diff -Nru rust-nanorand-0.7.0/debian/changelog rust-nanorand-0.7.0/debian/changelog --- rust-nanorand-0.7.0/debian/changelog 2025-08-17 20:15:41.000000000 +0000 +++ rust-nanorand-0.7.0/debian/changelog 2026-03-05 04:00:28.000000000 +0000 @@ -1,3 +1,11 @@ +rust-nanorand (0.7.0-13.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Add patch for getrandom 0.4, inspired by upstream patch for getrandom 0.3. + * Update (build-)dependencies for getrandom 0.4. + + -- Peter Michael Green <[email protected]> Thu, 05 Mar 2026 04:00:28 +0000 + rust-nanorand (0.7.0-13) unstable; urgency=medium * drop patch 2001 obsoleted by Debian packaging changes; diff -Nru rust-nanorand-0.7.0/debian/control rust-nanorand-0.7.0/debian/control --- rust-nanorand-0.7.0/debian/control 2025-08-17 20:15:20.000000000 +0000 +++ rust-nanorand-0.7.0/debian/control 2026-03-05 04:00:28.000000000 +0000 @@ -4,9 +4,8 @@ Build-Depends: debhelper-compat (= 13), dh-sequence-rust, - librust-getrandom-0.2+default-dev, - librust-getrandom-0.2+js-dev, - librust-getrandom-0.2+rdrand-dev, + librust-getrandom-0.4+default-dev, + librust-getrandom-0.4+wasm-js-dev, librust-hex-0.4+default-dev, librust-zeroize-1+default-dev, librust-zeroize-1+zeroize-derive-dev, @@ -21,9 +20,8 @@ Architecture: all Multi-Arch: foreign Depends: - librust-getrandom-0.2+default-dev, - librust-getrandom-0.2+js-dev, - librust-getrandom-0.2+rdrand-dev, + librust-getrandom-0.4+default-dev, + librust-getrandom-0.4+wasm-js-dev, librust-zeroize-1+default-dev, librust-zeroize-1+zeroize-derive-dev, ${misc:Depends}, diff -Nru rust-nanorand-0.7.0/debian/patches/0001_getrandom.patch rust-nanorand-0.7.0/debian/patches/0001_getrandom.patch --- rust-nanorand-0.7.0/debian/patches/0001_getrandom.patch 1970-01-01 00:00:00.000000000 +0000 +++ rust-nanorand-0.7.0/debian/patches/0001_getrandom.patch 2026-03-05 04:00:28.000000000 +0000 @@ -0,0 +1,34 @@ +Description: Update getrandom to 0.3 (#54) + This patch was inspired by upstream commit + 8570492ea964652c749890f3754853c499884087 +Author: Peter Michael Green <[email protected]> +Last-Update: 2026-03-05 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +Index: rust-nanorand-0.7.0/Cargo.toml +=================================================================== +--- rust-nanorand-0.7.0.orig/Cargo.toml ++++ rust-nanorand-0.7.0/Cargo.toml +@@ -22,7 +22,7 @@ rdseed = ["std"] + + [dependencies] + zeroize = { version = "1.5.3", optional = true, features = ["zeroize_derive"] } +-getrandom = { version = "0.2.5", optional = true, features = ["rdrand", "js"] } ++getrandom = { version = "0.4", optional = true, features = ["wasm_js"] } + + [dev-dependencies] + hex = "0.4.3" +Index: rust-nanorand-0.7.0/src/entropy.rs +=================================================================== +--- rust-nanorand-0.7.0.orig/src/entropy.rs ++++ rust-nanorand-0.7.0/src/entropy.rs +@@ -33,7 +33,7 @@ pub mod windows; + /// Pull in system entropy using the [`getrandom`](https://crates.io/crates/getrandom) crate. + /// Uses backup entropy (rdseed and system time) if it fails. + pub fn system(out: &mut [u8]) { +- match getrandom::getrandom(out) { ++ match getrandom::fill(out) { + Ok(_) => (), + Err(_) => backup(out), + } diff -Nru rust-nanorand-0.7.0/debian/patches/1002_avoid_feature_rdseed.patch rust-nanorand-0.7.0/debian/patches/1002_avoid_feature_rdseed.patch --- rust-nanorand-0.7.0/debian/patches/1002_avoid_feature_rdseed.patch 2023-08-14 09:58:32.000000000 +0000 +++ rust-nanorand-0.7.0/debian/patches/1002_avoid_feature_rdseed.patch 2026-03-05 04:00:28.000000000 +0000 @@ -7,9 +7,11 @@ Last-Update: 2023-08-14 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -18,7 +18,6 @@ +Index: rust-nanorand-0.7.0/Cargo.toml +=================================================================== +--- rust-nanorand-0.7.0.orig/Cargo.toml ++++ rust-nanorand-0.7.0/Cargo.toml +@@ -18,7 +18,6 @@ tls = ["std", "wyrand"] wyrand = [] pcg64 = [] chacha = [] diff -Nru rust-nanorand-0.7.0/debian/patches/series rust-nanorand-0.7.0/debian/patches/series --- rust-nanorand-0.7.0/debian/patches/series 2025-08-17 20:13:43.000000000 +0000 +++ rust-nanorand-0.7.0/debian/patches/series 2026-03-05 04:00:20.000000000 +0000 @@ -1,2 +1,3 @@ +0001_getrandom.patch 1001_feature_constraints.patch 1002_avoid_feature_rdseed.patch

