tags 1142699 +patch
thanks

the last upload of lazyregex has broken autopkgtests, which in turn cause other
packages to be blocked from migrating (debcargo, though probably not only it).

I guess it's a matter of adding some feature guards in the right places, but
haven't taken a closer look.
I took a closer look and there are two issues.

Firstly the codebase simply doesn't support building with no features at
all. The user must enable at least one feature to select a backend
(either regular or lite). I dealt with this by removing the no-features
configuration from debian/tests/control.

Secondly there are some tests that need the "unicode-perl" feature but
are not gated behind it. I added feature gates.

A debdiff is attatched, if I get no response I will NMU in a week or so.

diff -Nru rust-lazy-regex-3.6.0+20260211+ds/debian/changelog 
rust-lazy-regex-3.6.0+20260211+ds/debian/changelog
--- rust-lazy-regex-3.6.0+20260211+ds/debian/changelog  2026-07-23 
00:44:33.000000000 +0000
+++ rust-lazy-regex-3.6.0+20260211+ds/debian/changelog  2026-08-09 
10:01:55.000000000 +0000
@@ -1,3 +1,13 @@
+rust-lazy-regex (3.6.0+20260211+ds-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix autopkgtests (Closes: #1142699)
+    + Extend 1001_fence_features.patch to cover a few more tests.
+    + Don't test with no features at all, upstream does not support
+      that configuration.
+
+ -- Peter Michael Green <[email protected]>  Sun, 09 Aug 2026 10:01:55 +0000
+
 rust-lazy-regex (3.6.0+20260211+ds-1) unstable; urgency=medium
 
   [ upstream ]
diff -Nru 
rust-lazy-regex-3.6.0+20260211+ds/debian/patches/1001_fence_features.patch 
rust-lazy-regex-3.6.0+20260211+ds/debian/patches/1001_fence_features.patch
--- rust-lazy-regex-3.6.0+20260211+ds/debian/patches/1001_fence_features.patch  
2026-07-23 00:29:16.000000000 +0000
+++ rust-lazy-regex-3.6.0+20260211+ds/debian/patches/1001_fence_features.patch  
2026-08-09 10:01:07.000000000 +0000
@@ -7,9 +7,11 @@
 Last-Update: 2024-12-14
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -309,7 +309,7 @@
+Index: rust-lazy-regex-3.6.0+20260211+ds/src/lib.rs
+===================================================================
+--- rust-lazy-regex-3.6.0+20260211+ds.orig/src/lib.rs
++++ rust-lazy-regex-3.6.0+20260211+ds/src/lib.rs
+@@ -309,7 +309,7 @@ pub use {
      },
  };
  
@@ -18,8 +20,10 @@
  pub use {
      regex::{
          self,
---- a/tests/replace.rs
-+++ b/tests/replace.rs
+Index: rust-lazy-regex-3.6.0+20260211+ds/tests/replace.rs
+===================================================================
+--- rust-lazy-regex-3.6.0+20260211+ds.orig/tests/replace.rs
++++ rust-lazy-regex-3.6.0+20260211+ds/tests/replace.rs
 @@ -2,6 +2,7 @@
  /// check replacement with a mut closure
  /// See https://github.com/Canop/lazy-regex/issues/27
@@ -28,9 +32,11 @@
  fn replace_with_mut_closure() {
      let input = "5+183/32";
      let mut last_digits: Vec<u8> = Vec::new();
---- a/tests/regex_if.rs
-+++ b/tests/regex_if.rs
-@@ -6,6 +6,7 @@
+Index: rust-lazy-regex-3.6.0+20260211+ds/tests/regex_if.rs
+===================================================================
+--- rust-lazy-regex-3.6.0+20260211+ds.orig/tests/regex_if.rs
++++ rust-lazy-regex-3.6.0+20260211+ds/tests/regex_if.rs
+@@ -6,6 +6,7 @@ use {
  };
  
  #[test]
@@ -38,7 +44,7 @@
  fn test_regex_if() {
      fn extract_grey_level(s: &str) -> Option<u16> {
          regex_if!(
-@@ -21,6 +22,7 @@
+@@ -21,6 +22,7 @@ fn test_regex_if() {
  }
  
  #[test]
@@ -46,7 +52,7 @@
  fn test_regex_if_with_error_handling() {
      fn extract_grey_level(s: &str) -> Result<Option<u8>, ParseIntError> {
          let v = regex_if!(r#"^gr(a|e)y\((?<level>\d{1,3})\)$"#, s, 
level.parse()?);
-@@ -32,7 +34,7 @@
+@@ -32,7 +34,7 @@ fn test_regex_if_with_error_handling() {
  }
  
  #[test]
@@ -55,9 +61,11 @@
  fn test_bytes_regex_if() {
      fn extract_grey_level(s: &[u8]) -> Option<u16> {
          lazy_regex::bytes_regex_if!(
---- a/tests/regex_switch.rs
-+++ b/tests/regex_switch.rs
-@@ -4,6 +4,7 @@
+Index: rust-lazy-regex-3.6.0+20260211+ds/tests/regex_switch.rs
+===================================================================
+--- rust-lazy-regex-3.6.0+20260211+ds.orig/tests/regex_switch.rs
++++ rust-lazy-regex-3.6.0+20260211+ds/tests/regex_switch.rs
+@@ -4,6 +4,7 @@ use {
  };
  
  #[test]
@@ -65,7 +73,7 @@
  fn test_regex_switch() {
      #[derive(Debug, PartialEq, Eq)]
      enum Color {
-@@ -32,6 +33,7 @@
+@@ -32,6 +33,7 @@ fn test_regex_switch() {
  }
  
  #[test]
@@ -73,7 +81,7 @@
  fn test_regex_switch_with_error_handling() -> Result<(), ParseIntError> {
      #[derive(Debug, PartialEq)]
      enum Color {
-@@ -56,7 +58,7 @@
+@@ -56,7 +58,7 @@ fn test_regex_switch_with_error_handling
  }
  
  #[test]
@@ -82,3 +90,41 @@
  fn test_bytes_regex_switch() {
      #[derive(Debug, PartialEq, Eq)]
      enum Color {
+Index: rust-lazy-regex-3.6.0+20260211+ds/tests/remove.rs
+===================================================================
+--- rust-lazy-regex-3.6.0+20260211+ds.orig/tests/remove.rs
++++ rust-lazy-regex-3.6.0+20260211+ds/tests/remove.rs
+@@ -3,6 +3,7 @@ use {
+ };
+ 
+ #[test]
++#[cfg(feature = "unicode-perl")]
+ fn test_regex_remove() {
+     let input = "154681string63731";
+ 
+@@ -22,7 +23,7 @@ fn test_regex_remove() {
+ }
+ 
+ #[test]
+-#[cfg(not(feature = "lite"))]
++#[cfg(all(not(feature = "lite"), feature = "unicode-perl"))]
+ fn test_bytes_regex_remove() {
+     let input = b"154681string63731";
+ 
+@@ -34,6 +35,7 @@ fn test_bytes_regex_remove() {
+ }
+ 
+ #[test]
++#[cfg(feature = "unicode-perl")]
+ fn test_regex_remove_all() {
+     let input = "154681string63731";
+ 
+@@ -89,7 +91,7 @@ fn test_regex_remove_all() {
+ }
+ 
+ #[test]
+-#[cfg(not(feature = "lite"))]
++#[cfg(all(not(feature = "lite"), feature = "unicode-perl"))]
+ fn test_bytes_regex_remove_all() {
+     let input = b"154681string63731";
+ 
diff -Nru rust-lazy-regex-3.6.0+20260211+ds/debian/tests/control 
rust-lazy-regex-3.6.0+20260211+ds/debian/tests/control
--- rust-lazy-regex-3.6.0+20260211+ds/debian/tests/control      2026-07-23 
00:44:16.000000000 +0000
+++ rust-lazy-regex-3.6.0+20260211+ds/debian/tests/control      2026-08-09 
09:48:42.000000000 +0000
@@ -9,14 +9,6 @@
 Restrictions: allow-stderr
 
 Test-Command: /usr/share/dh-rust/bin/cargo-auto-test lazy-regex 3.6.0
- --all-targets --no-default-features
-Features: test-name=rust-lazy-regex:
-Depends:
- dh-rust,
- librust-lazy-regex-3-dev,
-Restrictions: allow-stderr
-
-Test-Command: /usr/share/dh-rust/bin/cargo-auto-test lazy-regex 3.6.0
  --all-targets
 Features: test-name=rust-lazy-regex:default
 Depends:

Reply via email to