Description: Use the bzip2 crate instead of bzip2-rs
 Replace the bzip2-rs pure-Rust bzip2 implementation with the bzip2 crate
 (C bindings to libbz2 via bzip2-sys), which is already packaged in Debian
 as librust-bzip2-dev. The API is a drop-in replacement: bzip2::read::BzDecoder
 is equivalent to bzip2_rs::DecoderReader for streaming decompression.
Forwarded: no
Last-Update: 2026-06-01

Index: stgit/Cargo.toml
===================================================================
--- stgit.orig/Cargo.toml
+++ stgit/Cargo.toml
@@ -30,7 +30,7 @@ name = "stg"
 anyhow = "1.0"
 anstyle = { version = "1.0", features = ["std"] }
 bstr = { version = "1.11", default-features = false, features = ["std"] }
-bzip2-rs = "0.1"
+bzip2 = "0.6"
 clap = { version = "~4.6", default-features = false, features = [
   "color",
   "help",
Index: stgit/src/cmd/import.rs
===================================================================
--- stgit.orig/src/cmd/import.rs
+++ stgit/src/cmd/import.rs
@@ -326,7 +326,7 @@ fn import_tgz_series(stack: Stack, match
 
 fn import_tbz2_series(stack: Stack, matches: &clap::ArgMatches, source_path: &Path) -> Result<()> {
     let source_file = std::fs::File::open(source_path)?;
-    let mut archive = tar::Archive::new(bzip2_rs::DecoderReader::new(source_file));
+    let mut archive = tar::Archive::new(bzip2::read::BzDecoder::new(source_file));
     let temp_dir = tempfile::tempdir()?;
     archive.unpack(temp_dir.path())?;
     let series_path = find_series_path(temp_dir.path())?;
@@ -463,7 +463,7 @@ fn read_gz(source_file: std::fs::File, c
 }
 
 fn read_bz2(source_file: std::fs::File, content: &mut Vec<u8>) -> Result<()> {
-    bzip2_rs::DecoderReader::new(source_file).read_to_end(content)?;
+    bzip2::read::BzDecoder::new(source_file).read_to_end(content)?;
     Ok(())
 }
 
