Source: testng7
Version: 7.5-2
Severity: important
Tags: ftbfs patch
User: [email protected]
Usertags: ftbfs-snakeyaml2

Dear Maintainer,

testng7 7.5-2 FTBFS against snakeyaml/2.5+ds-1 currently in experimental. I solved this with the enclosed patch.

I am planning to upload snakeyaml/2.5+ds-2 to unstable on the 27th of October or a bit later. Then I will team-upload openhft-chronicle-wire to unstable with the attached patch.

Best regards,

--
Pierre
diff -Nru testng7-7.5/debian/changelog testng7-7.5/debian/changelog
--- testng7-7.5/debian/changelog	2023-06-15 20:21:39.000000000 +0200
+++ testng7-7.5/debian/changelog	2025-10-08 22:57:41.000000000 +0200
@@ -1,3 +1,9 @@
+testng7 (7.5-3) UNRELEASED; urgency=medium
+
+  * Building against snakeyaml 2.x
+
+ -- Pierre Gruet <[email protected]>  Wed, 08 Oct 2025 22:57:41 +0200
+
 testng7 (7.5-2) unstable; urgency=medium
 
   * Source-only upload.
diff -Nru testng7-7.5/debian/control testng7-7.5/debian/control
--- testng7-7.5/debian/control	2023-06-13 07:59:43.000000000 +0200
+++ testng7-7.5/debian/control	2025-10-08 22:57:41.000000000 +0200
@@ -13,7 +13,7 @@
  libguice-java,
  libjcommander-java,
  libmaven-bundle-plugin-java,
- libyaml-snake-java,
+ libyaml-snake-java (>= 2.5+ds),
  maven-repo-helper,
  gradle-debian-helper,
  libassertj-core-java
diff -Nru testng7-7.5/debian/maven.rules testng7-7.5/debian/maven.rules
--- testng7-7.5/debian/maven.rules	2023-03-22 04:42:42.000000000 +0100
+++ testng7-7.5/debian/maven.rules	2025-10-08 22:57:37.000000000 +0200
@@ -1,7 +1,7 @@
 
 com.google.inject guice jar s/.*/debian/ s/no_aop// *
 junit junit jar s/4\..*/4.x/ * *
-org.yaml snakeyaml bundle s/1\..*/1.x/ * *
-org.yaml snakeyaml s/jar/bundle/ s/1\..*/1.x/ * *
+org.yaml snakeyaml bundle s/1\..*/2.x/ * *
+org.yaml snakeyaml s/jar/bundle/ s/1\..*/2.x/ * *
 s/ant/org.apache.ant/ * * s/.*/debian/ * *
 org.assertj assertj-core jar s/.*/debian/ * *
diff -Nru testng7-7.5/debian/patches/series testng7-7.5/debian/patches/series
--- testng7-7.5/debian/patches/series	2023-03-22 04:42:42.000000000 +0100
+++ testng7-7.5/debian/patches/series	2025-10-08 22:57:41.000000000 +0200
@@ -1 +1,2 @@
 build-with-gradle.patch
+snakeyaml2.patch
diff -Nru testng7-7.5/debian/patches/snakeyaml2.patch testng7-7.5/debian/patches/snakeyaml2.patch
--- testng7-7.5/debian/patches/snakeyaml2.patch	1970-01-01 01:00:00.000000000 +0100
+++ testng7-7.5/debian/patches/snakeyaml2.patch	2025-10-08 22:57:41.000000000 +0200
@@ -0,0 +1,25 @@
+Description: constructing Constructor with default LoaderOptions to comply
+ with the interface of snakeyaml 2.x
+Author: Pierre Gruet <[email protected]>
+Forwarded: no
+Last-Update: 2025-10-08
+
+--- a/testng-core/src/main/java/org/testng/internal/Yaml.java
++++ b/testng-core/src/main/java/org/testng/internal/Yaml.java
+@@ -16,6 +16,7 @@
+ import org.testng.xml.XmlScript;
+ import org.testng.xml.XmlSuite;
+ import org.testng.xml.XmlTest;
++import org.yaml.snakeyaml.LoaderOptions;
+ import org.yaml.snakeyaml.TypeDescription;
+ import org.yaml.snakeyaml.constructor.Constructor;
+ import org.yaml.snakeyaml.nodes.MappingNode;
+@@ -301,7 +302,7 @@
+   private static class TestNGConstructor extends Constructor {
+ 
+     public TestNGConstructor(Class<?> theRoot) {
+-      super(theRoot);
++      super(theRoot, new LoaderOptions());
+       yamlClassConstructors.put(NodeId.scalar, new ConstructParallelMode());
+       yamlClassConstructors.put(NodeId.mapping, new ConstructXmlScript());
+     }

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to