[med-svn] [Git][med-team/sourmash][master] 4 commits: Apply patch by Peter Green to upgrade to twox-hash version 2

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Feb 22 11:31:44 GMT 2026



Andreas Tille pushed to branch master at Debian Med / sourmash


Commits:
96fc2b74 by Andreas Tille at 2026-02-22T12:08:35+01:00
Apply patch by Peter Green to upgrade to twox-hash version 2

- - - - -
e97c0280 by Andreas Tille at 2026-02-22T12:27:39+01:00
More generic Build-Depends

- - - - -
74a9e442 by Andreas Tille at 2026-02-22T12:29:26+01:00
Update Homepage

- - - - -
4912a139 by Andreas Tille at 2026-02-22T12:31:28+01:00
d/watch: version=5

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/patches/series
- debian/patches/soften-deps
- + debian/patches/twox-hash-2
- debian/watch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,18 @@
 sourmash (4.9.4-5) UNRELEASED; urgency=medium
 
   * Team upload.
+
+  [ Andreas Tille ]
   * Updated Build-Depends using
      debcargo deb-dependencies src/core/Cargo.toml
+  * More generic Build-Depends
+  * Update Homepage
+  * d/watch: version=5
+
+  [ Peter Michael Green ]
+  * Use thiserror 2, thiserror 1 is legacy.
+    Closes: #1119017
+  * Relax cargo dependencies on itertools, md5 and roaring.
 
  -- Andreas Tille <tille at debian.org>  Tue, 09 Dec 2025 16:19:59 +0100
 


=====================================
debian/control
=====================================
@@ -24,7 +24,7 @@ Build-Depends: debhelper-compat (= 13),
                librust-fixedbitset-0.4+default-dev,
                librust-getset-0.1+default-dev,
                librust-histogram-0.11+default-dev,
-               librust-itertools-0.13+default-dev,
+               librust-itertools-dev,
                librust-log-0.4+default-dev (>= 0.4.27-~~),
                librust-md5-0.7+default-dev,
                librust-memmap2-0.9+default-dev,
@@ -53,10 +53,9 @@ Build-Depends: debhelper-compat (= 13),
                librust-statrs-0.18+default-dev,
                librust-streaming-stats-0.2+default-dev (>= 0.2.3-~~),
                librust-streaming-stats-dev,
-               librust-thiserror-1+default-dev,
-#               librust-twox-hash-1+default-dev (>= 1.6.0-~~),
-               librust-twox-hash-dev,
-               librust-typed-builder-0.21+default-dev,
+               librust-thiserror-dev,
+               librust-twox-hash-2-dev,
+               librust-typed-builder-dev,
                librust-vec-collections-0.4+default-dev (>= 0.4.3-~~),
                libstd-rust-dev,
                pandoc <!nodoc>,
@@ -88,7 +87,7 @@ Build-Depends: debhelper-compat (= 13),
 Standards-Version: 4.7.2
 Vcs-Browser: https://salsa.debian.org/med-team/sourmash
 Vcs-Git: https://salsa.debian.org/med-team/sourmash.git
-Homepage: https://github.com/dib-lab/sourmash
+Homepage: https://github.com/sourmash-bio/sourmash
 Testsuite: autopkgtest-pkg-pybuild
 
 Package: sourmash


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ pytest-auto-parallel
 soften-deps
 older-md5
 tests-no-timeout
+twox-hash-2


=====================================
debian/patches/soften-deps
=====================================
@@ -2,9 +2,11 @@ Author: Michael R. Crusoe <crusoe at debian.org>
 Author: Peter Michael Greem <plugwash at debian.org>
 Description: soften some dependencies to match what is packaged in Debian
 Forwarded: not-needed
---- sourmash.orig/src/core/Cargo.toml
-+++ sourmash/src/core/Cargo.toml
-@@ -31,43 +31,40 @@
+Index: sourmash-4.9.4/src/core/Cargo.toml
+===================================================================
+--- sourmash-4.9.4.orig/src/core/Cargo.toml
++++ sourmash-4.9.4/src/core/Cargo.toml
+@@ -31,29 +31,27 @@ byteorder = "1.4.3"
  camino = { version = "1.1.10", features = ["serde1"] }
  cfg-if = "1.0"
  counter = "0.6.0"
@@ -17,11 +19,11 @@ Forwarded: not-needed
 -itertools = "0.14.0"
 +getset = "0.1"
 +histogram = "0.11"
-+itertools = "0.13"
++itertools = ">= 0.13"
  log = "0.4.27"
 -md5 = "0.8.0"
 -memmap2 = "0.9.7"
-+md5 = "0.7"
++md5 = ">= 0.7"
 +memmap2 = "0.9"
  murmurhash3 = "0.0.5"
 -needletail = { version = "0.6.3", default-features = false }
@@ -41,17 +43,16 @@ Forwarded: not-needed
 -rkyv = { version = "0.7.45", optional = true }
 -roaring = "0.11.0"
 +rkyv = { version = "0.8", optional = true }
-+roaring = "0.10"
++roaring = ">= 0.10"
  roots = "0.0.8"
  serde = { version = "1.0.219", features = ["derive"] }
  serde_json = "1.0.141"
- statrs = "0.18.0"
+@@ -61,13 +59,12 @@ statrs = "0.18.0"
  streaming-stats = "0.2.3"
--thiserror = "2.0"
-+thiserror = "1"
+ thiserror = "2.0"
  twox-hash = "1.6.0"
 -typed-builder = "0.20.0"
-+typed-builder = "0.21"
++typed-builder = ">= 0.21"
  vec-collections = "0.4.3"
  
  [dev-dependencies]
@@ -63,7 +64,7 @@ Forwarded: not-needed
  tempfile = "3.20.0"
  
  [[bench]]
-@@ -93,26 +90,9 @@
+@@ -93,26 +90,9 @@ skip_feature_sets = [
      ["branchwater", "parallel"], # branchwater implies parallel
  ]
  


=====================================
debian/patches/twox-hash-2
=====================================
@@ -0,0 +1,73 @@
+Author: Peter Green <plugwash at debian.org>
+Bug-Debian: https://bugs.debian.org/1119017
+Last-Update: 2026-01-24
+Description: Upgrade to twox-hash version 2
+
+Index: sourmash-4.9.4/src/core/Cargo.toml
+===================================================================
+--- sourmash-4.9.4.orig/src/core/Cargo.toml
++++ sourmash-4.9.4/src/core/Cargo.toml
+@@ -58,7 +58,7 @@ serde_json = "1.0.141"
+ statrs = "0.18.0"
+ streaming-stats = "0.2.3"
+ thiserror = "2.0"
+-twox-hash = "1.6.0"
++twox-hash = "2"
+ typed-builder = ">= 0.21"
+ vec-collections = "0.4.3"
+ 
+Index: sourmash-4.9.4/src/core/src/encodings.rs
+===================================================================
+--- sourmash-4.9.4.orig/src/core/src/encodings.rs
++++ sourmash-4.9.4/src/core/src/encodings.rs
+@@ -470,7 +470,7 @@ impl Colors {
+     }
+ 
+     fn compute_color(idxs: &IdxTracker) -> Color {
+-        let s = BuildHasherDefault::<twox_hash::Xxh3Hash128>::default();
++        let s = BuildHasherDefault::<crate::Xxh3Hash128>::default();
+         s.hash_one(&idxs.0)
+     }
+ 
+Index: sourmash-4.9.4/src/core/src/index/revindex/disk_revindex.rs
+===================================================================
+--- sourmash-4.9.4.orig/src/core/src/index/revindex/disk_revindex.rs
++++ sourmash-4.9.4/src/core/src/index/revindex/disk_revindex.rs
+@@ -36,7 +36,7 @@ const VERSION: &str = "version";
+ const PROCESSED: &str = "processed";
+ 
+ fn compute_color(idxs: &Datasets) -> Color {
+-    let s = BuildHasherDefault::<twox_hash::Xxh3Hash128>::default();
++    let s = BuildHasherDefault::<crate::Xxh3Hash128>::default();
+     s.hash_one(idxs)
+ }
+ 
+Index: sourmash-4.9.4/src/core/src/lib.rs
+===================================================================
+--- sourmash-4.9.4.orig/src/core/src/lib.rs
++++ sourmash-4.9.4/src/core/src/lib.rs
+@@ -40,6 +40,24 @@ pub mod storage;
+ use cfg_if::cfg_if;
+ use murmurhash3::murmurhash3_x64_128;
+ 
++//compatibility struct to support twox_hash version 2
++#[derive(Default)]
++struct Xxh3Hash128(twox_hash::XxHash3_128);
++
++impl std::hash::Hasher for Xxh3Hash128 {
++    #[inline(always)]
++    fn finish(&self) -> u64 {
++        // this truncates the 128-bit value to 64-bits,
++        // which reflects what xxhash 1.x did.
++        self.0.finish_128() as u64
++    }
++
++    #[inline(always)]
++    fn write(&mut self, bytes: &[u8]) {
++        self.0.write(bytes)
++    }
++}
++
+ cfg_if! {
+     if #[cfg(all(target_arch = "wasm32", target_os = "unknown"))] {
+         // Explicitly keeping emscripten and wasi out of this


=====================================
debian/watch
=====================================
@@ -1,4 +1,5 @@
-version=4
-opts="uversionmangle=s/(rc|a|b|c)/~$1/,filenamemangle=s%.*/@ANY_VERSION@%@PACKAGE at -$1.tar.gz%,searchmode=plain" \
-	https://api.github.com/repos/sourmash-bio/sourmash/releases?per_page=100 \
-	https://api.github.com/repos/sourmash-bio/sourmash/tarball/@ANY_VERSION@
+Version: 5
+
+Source: https://github.com/sourmash-bio/@PACKAGE@/tags
+Matching-Pattern: (?:.*?/)?v?(\d[\d.]+)@ARCHIVE_EXT@
+Uversion-Mangle: s/(rc|a|b|c)/~$1/



View it on GitLab: https://salsa.debian.org/med-team/sourmash/-/compare/ef9dce7ec824cf8b69d7ff0fdf43dc9d9b7312ea...4912a13970c7ab9d0bd9615c5dbaea7a0cba4218

-- 
View it on GitLab: https://salsa.debian.org/med-team/sourmash/-/compare/ef9dce7ec824cf8b69d7ff0fdf43dc9d9b7312ea...4912a13970c7ab9d0bd9615c5dbaea7a0cba4218
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260222/e2f5bc10/attachment-0001.htm>


More information about the debian-med-commit mailing list