From 87dd0ee4adf3577665439bace94ec4696534d724 Mon Sep 17 00:00:00 2001
From: NoisyCoil <noisycoil@tutanota.com>
Date: Sat, 26 Jul 2025 02:21:28 +0200
Subject: [PATCH] re-add patch 1001 to accept newer branch of crate bindgen;
 relax (build-/autopkgtest-)dependencies for crate bindgen

---
 debian/control                    |  4 ++--
 debian/patches/1001_bindgen.patch | 17 +++++++++++++++++
 debian/patches/series             |  1 +
 debian/tests/control              |  6 +++---
 4 files changed, 23 insertions(+), 5 deletions(-)
 create mode 100644 debian/patches/1001_bindgen.patch

diff --git a/debian/control b/debian/control
index 2ce5e947..8a25a5d3 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends:
  librust-anyhow-1+default-dev,
  librust-assert-cmd-2+default-dev,
  librust-assert-fs-1+default-dev,
- librust-bindgen-dev (<< 0.72),
+ librust-bindgen-dev (<< 0.73),
  librust-bzip2-dev (<< 0.6),
  librust-cc-1+default-dev,
  librust-cc-1+parallel-dev,
@@ -329,7 +329,7 @@ Architecture: all
 Multi-Arch: foreign
 Depends:
  librocksdb-dev,
- librust-bindgen-dev (<< 0.72),
+ librust-bindgen-dev (<< 0.73),
  librust-cc-1+default-dev,
  librust-cc-1+parallel-dev,
  librust-libc-0.2+default-dev,
diff --git a/debian/patches/1001_bindgen.patch b/debian/patches/1001_bindgen.patch
new file mode 100644
index 00000000..21e7d89c
--- /dev/null
+++ b/debian/patches/1001_bindgen.patch
@@ -0,0 +1,17 @@
+Description: accept newer branch of crate bindgen
+Author: Jonas Smedegaard <dr@jones.dk>
+Bug-Debian: https://bugs.debian.org/1087350
+Last-Update: 2025-07-26
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -33,7 +33,7 @@
+ arbitrary = "1.3"
+ assert_cmd = "2.0"
+ assert_fs = "1.0"
+-bindgen = ">=0.62, <0.72"
++bindgen = ">=0.62, <=0.72"
+ bzip2 = ">=0.4, <0.6"
+ cc = "1.0.73"
+ clap = "4.0"
diff --git a/debian/patches/series b/debian/patches/series
index 03858de3..e7a483a2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+1001_bindgen.patch
 2001_quick-xml.patch
 2002_use_shared_rocksdb.patch
 2003_avoid_testsuite.patch
diff --git a/debian/tests/control b/debian/tests/control
index c4487af4..33106564 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -546,7 +546,7 @@ Test-Command: /usr/share/dh-rust/bin/cargo-auto-test oxrocksdb-sys 0.4.11
 Features: test-name=rust-oxrocksdb-sys:default
 Depends:
  dh-rust,
- librust-bindgen-dev (<< 0.72),
+ librust-bindgen-dev (<< 0.73),
  librust-cc-1+default-dev,
  librust-cc-1+parallel-dev,
  librust-oxrocksdb-sys-0.4+default-dev,
@@ -558,7 +558,7 @@ Test-Command: /usr/share/dh-rust/bin/cargo-auto-test oxrocksdb-sys 0.4.11
 Features: test-name=rust-oxrocksdb-sys:@
 Depends:
  dh-rust,
- librust-bindgen-dev (<< 0.72),
+ librust-bindgen-dev (<< 0.73),
  librust-cc-1+default-dev,
  librust-cc-1+parallel-dev,
  librust-oxrocksdb-sys-0.4-dev,
@@ -575,7 +575,7 @@ Test-Command: /usr/share/dh-rust/bin/cargo-auto-test oxrocksdb-sys 0.4.11
 Features: test-name=rust-oxrocksdb-sys:pkg-config
 Depends:
  dh-rust,
- librust-bindgen-dev (<< 0.72),
+ librust-bindgen-dev (<< 0.73),
  librust-cc-1+default-dev,
  librust-cc-1+parallel-dev,
  librust-oxrocksdb-sys-0.4+pkg-config-dev,
-- 
2.47.2

