Bug#997580: libpicocontainer1-java: FTBFS in bullseye
Santiago Vila
sanvila at debian.org
Fri Dec 9 18:28:11 GMT 2022
reopen 997580
found 997580 1.3-2
fixed 997580 1.3-3
thanks
This is a FTBFS bug but it's still unfixed in stable.
Follows a proposal to fix it in stable. I believe it may be used "as
is". I merely took the patch from debian/patches in 1.3-3 and applied it
over the version in bullseye). I can confirm that the package builds
again in stable after that.
Thanks.
-------------- next part --------------
diff -Nru libpicocontainer1-java-1.3/debian/changelog libpicocontainer1-java-1.3/debian/changelog
--- libpicocontainer1-java-1.3/debian/changelog 2019-12-29 16:10:19.000000000 +0100
+++ libpicocontainer1-java-1.3/debian/changelog 2022-12-09 19:05:00.000000000 +0100
@@ -1,3 +1,11 @@
+libpicocontainer1-java (1.3-2+deb11u1) bullseye; urgency=medium
+
+ * Team upload.
+ * Extend the xstream whitelist to prevent a ForbiddenClassException.
+ (Closes: #997580)
+
+ -- Markus Koschany <apo at debian.org> Fri, 09 Dec 2022 19:05:00 +0100
+
libpicocontainer1-java (1.3-2) unstable; urgency=medium
* No change rebuild.
diff -Nru libpicocontainer1-java-1.3/debian/patches/extend-the-xstream-whitelist.patch libpicocontainer1-java-1.3/debian/patches/extend-the-xstream-whitelist.patch
--- libpicocontainer1-java-1.3/debian/patches/extend-the-xstream-whitelist.patch 1970-01-01 01:00:00.000000000 +0100
+++ libpicocontainer1-java-1.3/debian/patches/extend-the-xstream-whitelist.patch 2022-12-09 19:05:00.000000000 +0100
@@ -0,0 +1,85 @@
+From: Markus Koschany <apo at debian.org>
+Date: Sat, 13 Nov 2021 18:00:25 +0100
+Subject: extend the xstream whitelist
+
+Extend the xstream whitelist.
+
+Forwarded: not-needed
+---
+ .../org/picocontainer/defaults/XStreamSerialisationTestCase.java | 5 ++++-
+ .../org/picocontainer/doc/advanced/CollectionDemoClasses.java | 4 ++--
+ .../org/picocontainer/tck/AbstractComponentAdapterTestCase.java | 8 +++++---
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+--- a/container/src/test/org/picocontainer/defaults/XStreamSerialisationTestCase.java
++++ b/container/src/test/org/picocontainer/defaults/XStreamSerialisationTestCase.java
+@@ -19,6 +19,7 @@
+ public void testShouldBeAbleToSerialiseEmptyPico() {
+ if (JVM.is14()) {
+ MutablePicoContainer pico = new DefaultPicoContainer();
++ xStream.allowTypesByWildcard(new String[]{"org.picocontainer.**"});
+ String picoXml = xStream.toXML(pico);
+ PicoContainer serializedPico = (PicoContainer) xStream.fromXML(picoXml);
+
+@@ -31,6 +32,7 @@
+ MutablePicoContainer pico = new DefaultPicoContainer();
+ pico.registerComponentImplementation(SimpleTouchable.class);
+ pico.registerComponentImplementation(DependsOnTouchable.class);
++ xStream.allowTypesByWildcard(new String[]{"org.picocontainer.**"});
+ String picoXml = xStream.toXML(pico);
+ PicoContainer serializedPico = (PicoContainer) xStream.fromXML(picoXml);
+
+@@ -44,10 +46,11 @@
+ pico.registerComponentImplementation(SimpleTouchable.class);
+ pico.registerComponentImplementation(DependsOnTouchable.class);
+ pico.getComponentInstances();
++ xStream.allowTypesByWildcard(new String[]{"org.picocontainer.**"});
+ String picoXml = xStream.toXML(pico);
+ PicoContainer serializedPico = (PicoContainer) xStream.fromXML(picoXml);
+
+ assertEquals(2, serializedPico.getComponentInstances().size());
+ }
+ }
+-}
+\ No newline at end of file
++}
+--- a/container/src/test/org/picocontainer/doc/advanced/CollectionDemoClasses.java
++++ b/container/src/test/org/picocontainer/doc/advanced/CollectionDemoClasses.java
+@@ -1,6 +1,6 @@
+ /*
+- * Copyright (C) 2004 Jörg Schaible
+- * Created on 24.10.2004 by Jörg Schaible
++ * Copyright (C) 2004 Joerg Schaible
++ * Created on 24.10.2004 by Joerg Schaible
+ */
+ package org.picocontainer.doc.advanced;
+
+--- a/container/src/test/org/picocontainer/tck/AbstractComponentAdapterTestCase.java
++++ b/container/src/test/org/picocontainer/tck/AbstractComponentAdapterTestCase.java
+@@ -235,7 +235,8 @@
+ assertSame(getComponentAdapterType(), componentAdapter.getClass());
+ final Object instance = componentAdapter.getComponentInstance(picoContainer);
+ assertNotNull(instance);
+- final XStream xstream = new XStream(new PureJavaReflectionProvider(), new XppDriver());
++ XStream xstream = new XStream(new PureJavaReflectionProvider(), new XppDriver());
++ xstream.allowTypesByWildcard(new String[]{"org.picocontainer.**"});
+ final String xml = xstream.toXML(componentAdapter);
+ final ComponentAdapter serializedComponentAdapter = (ComponentAdapter)xstream.fromXML(xml);
+ assertEquals(componentAdapter.getComponentKey(), serializedComponentAdapter.getComponentKey());
+@@ -252,7 +253,8 @@
+ assertSame(getComponentAdapterType(), componentAdapter.getClass());
+ final Object instance = componentAdapter.getComponentInstance(picoContainer);
+ assertNotNull(instance);
+- final XStream xstream = new XStream(new XppDriver());
++ XStream xstream = new XStream(new XppDriver());
++ xstream.allowTypesByWildcard(new String[]{"org.picocontainer.**"});
+ final String xml = xstream.toXML(componentAdapter);
+ final ComponentAdapter serializedComponentAdapter = (ComponentAdapter)xstream.fromXML(xml);
+ assertEquals(componentAdapter.getComponentKey(), serializedComponentAdapter.getComponentKey());
+@@ -649,4 +651,4 @@
+ }
+ return hasParameters;
+ }
+-}
+\ No newline at end of file
++}
diff -Nru libpicocontainer1-java-1.3/debian/patches/series libpicocontainer1-java-1.3/debian/patches/series
--- libpicocontainer1-java-1.3/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ libpicocontainer1-java-1.3/debian/patches/series 2022-12-09 19:05:00.000000000 +0100
@@ -0,0 +1 @@
+extend-the-xstream-whitelist.patch
More information about the pkg-java-maintainers
mailing list