deps: build against the crates packaged in Debian
The audit of the lock against Debian's archive (qa.debian.org madison, sid/trixie/bookworm) showed 255 of 291 crates packaged, the 36 missing ones all Windows/wasm/apple/redox-only. Making the tree build against the Debian-packaged crates — the difference between a vendored source package and a thin debcargo one — needed: - sha1/sha2/md-5 bumped to the digest 0.11 line (sid moved, 0.10 is trixie-only): finalize() now returns hybrid-array Output without LowerHex (hex::encode it) and no io::Write impl (sha256_file reads chunks into update()). The digest outputs are unchanged; the full suite including the checksums tests passes. - crossterm 0.28 -> 0.29: Debian skipped 0.28 entirely. - reqwest 0.12 -> 0.13: the blocking/json/stream usages carried over unchanged. - suppaftp behind an opt-out 'ftp' feature: the one dependency absent from the archive, used only by the plain-FTP upload fallback of 'pkh put' — the Debian build drops it and the SFTP failure path reports the transport as unavailable instead. - every patch-level requirement pin relaxed to the minor level (4.5.51 -> 4.5, 1.0.228 -> 1.0, ...) — semver-compatible, and what lets trixie's slightly older crates satisfy the manifest. Result: 30 of 32 direct dependencies resolve from sid as-is; the remaining two are indicatif 0.18 (sitting in experimental, migrating) and the feature-gated suppaftp. No vendoring on sid.
This commit is contained in:
1 parent
537bf52656
commit
d0b5ce65a4
6 files changed
+493
-211
No files matched your search
@@ -284,7 +284,7 @@ pub(crate) fn chroot_tarball_filename(
|
||||
Some(m) => {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(m.as_bytes());
|
||||
let hash = format!("{:x}", hasher.finalize());
|
||||
let hash = hex::encode(hasher.finalize());
|
||||
format!("{target}-{}-buildd.tar.xz", &hash[..12])
|
||||
}
|
||||
}
|
||||
|
||||
+10
-2
@@ -44,7 +44,7 @@
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::fs;
|
||||
use std::io::{self, Seek, Write};
|
||||
use std::io::{self, Read, Seek, Write};
|
||||
use std::os::unix::fs::{FileTypeExt, MetadataExt};
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -806,7 +806,15 @@ fn hex(digest: &[u8]) -> String {
|
||||
pub(crate) fn sha256_file(path: &Path) -> io::Result<String> {
|
||||
let mut file = fs::File::open(path)?;
|
||||
let mut hasher = Sha256::new();
|
||||
io::copy(&mut file, &mut hasher)?;
|
||||
// digest 0.11 no longer implements io::Write for hashers
|
||||
let mut buf = [0u8; 64 * 1024];
|
||||
loop {
|
||||
let read = file.read(&mut buf)?;
|
||||
if read == 0 {
|
||||
break;
|
||||
}
|
||||
hasher.update(&buf[..read]);
|
||||
}
|
||||
Ok(hex(&hasher.finalize()))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user