]> git.proxmox.com Git - debcargo-conf.git/commitdiff
sequoia-openpgp: work around #985729 and #985730
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 22 Mar 2021 22:47:55 +0000 (18:47 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 22 Mar 2021 23:41:08 +0000 (19:41 -0400)
src/sequoia-openpgp/debian/patches/Avoid-tests-with-empty-subexpressions.patch [new file with mode: 0644]
src/sequoia-openpgp/debian/patches/series

diff --git a/src/sequoia-openpgp/debian/patches/Avoid-tests-with-empty-subexpressions.patch b/src/sequoia-openpgp/debian/patches/Avoid-tests-with-empty-subexpressions.patch
new file mode 100644 (file)
index 0000000..79cba9c
--- /dev/null
@@ -0,0 +1,90 @@
+From 79463aef6c954104d8368eee32c3418696a7f6d6 Mon Sep 17 00:00:00 2001
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Mon, 22 Mar 2021 18:44:11 -0400
+Subject: [PATCH] Avoid tests with empty subexpressions (work around #985729,
+ #985730)
+
+The better fix would be to update rust-regex-syntax to 0.6.18 and
+rust-regex to 1.3.8
+---
+ src/regex/mod.rs | 57 ----------------------------------------
+ 1 file changed, 57 deletions(-)
+
+diff --git a/src/regex/mod.rs b/src/regex/mod.rs
+index c61878a1..6c5edeeb 100644
+--- a/src/regex/mod.rs
++++ b/src/regex/mod.rs
+@@ -1143,60 +1143,6 @@ mod tests {
+             (false, "d"),
+             (true, "xxxaxxxbxxx"),
+         ]);
+-        // This should match anything.
+-        a("|a", &[
+-            (true, "a"),
+-            (true, "b"),
+-        ]);
+-        a("a|", &[
+-            (true, "a"),
+-            (true, "b"),
+-        ]);
+-        a("|a|b", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-        ]);
+-        a("|a|b|c|d", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-            (true, "d"),
+-            (true, "eeee"),
+-        ]);
+-        a("a|b|", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-        ]);
+-        a("a|b|c|", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-            (true, "d"),
+-            (true, "eeee"),
+-        ]);
+-        a("|", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-            (true, "d"),
+-            (true, "eeee"),
+-        ]);
+-        a("|a|", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-            (true, "d"),
+-            (true, "eeee"),
+-        ]);
+-        a("|a|b|", &[
+-            (true, "a"),
+-            (true, "b"),
+-            (true, "c"),
+-            (true, "d"),
+-            (true, "eeee"),
+-        ]);
+         // This is: "ab" or "cd", not a followed by b or c followed by d:
+         //
+         //   A regular expression is zero or more branches, separated by '|'.
+@@ -1343,9 +1289,6 @@ mod tests {
+             (false, "xyu"),
+             (false, "ccc"),
+         ]);
+-        a("a*|a+|ab+cd+|", &[
+-            (true, ""),
+-        ]);
+         a("()", &[
+             (true, ""),
+-- 
+2.30.2
+
index 7b84379c94b72ff106705aa5a22cb8dcd5832d66..8839eb28a2b859cf466a719494b9e1afc479757f 100644 (file)
@@ -1 +1,2 @@
 cleanup-deps.patch
+Avoid-tests-with-empty-subexpressions.patch