[Git][java-team/fop][master] 4 commits: Fix the empty fop-hyph.jar, Java 25 support and the test suite

Simon Quigley (@tsimonq2) gitlab at salsa.debian.org
Tue Nov 3 00:47:28 GMT 2026



Simon Quigley pushed to branch master at Debian Java Maintainers / fop


Commits:
0953bdc3 by Juan Manuel Méndez Rey at 2026-11-02T22:35:34+01:00
Fix the empty fop-hyph.jar, Java 25 support and the test suite

- - - - -
1503dc25 by Juan Manuel Méndez Rey at 2026-11-03T01:00:01+01:00
fop: run through java-wrappers again, as fop(1) documents

Suggested by Simon Quigley on the merge request.

- - - - -
53b53573 by Juan Manuel Méndez Rey at 2026-11-03T01:16:31+01:00
changelog: do not mention trixie

Requested by Simon Quigley on the merge request.

- - - - -
39d3331e by Simon Quigley at 2026-11-02T18:47:25-06:00
Merge branch 'fix-test-failures' into 'master'

Restore hyphenation, support Java 25 and fix the test suite

See merge request java-team/fop!4
- - - - -


12 changed files:

- debian/changelog
- debian/copyright
- debian/fop.sh
- + debian/keystore-renewed.pkcs12
- debian/maven.properties
- + debian/patches/FOP-3236-xmp-test-namespaces.patch
- + debian/patches/FOP-3275-java25-event-model.patch
- + debian/patches/renewed-signing-keystore.patch
- debian/patches/series
- + debian/patches/skip-AdobeStandardEncodingTestCase.patch
- debian/rules
- debian/source/include-binaries


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,20 @@
+fop (1:2.10+dfsg1-4) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Restore hyphenation, lost in 2.10:
+    - build fop-hyph.jar with the patterns again (it was empty, a
+      regression of #932734);
+    - run fop through java-wrappers again, so that the jar,
+      FOP_HYPHENATION_PATH and the java-wrappers(7) variables work, as
+      fop(1) documents.
+  * Backport FOP-3275: with Java 25, FOP embedded through a JAXP
+    Transformer fails with FWK005 while reading event-model.xml.
+  * Fix the test suite and stop ignoring test failures: hyphenation
+    patterns on the test classpath, FOP-3236 test update, renewed
+    signing keystore, skip the test whose data is excluded.
+
+ -- Juan Manuel Méndez Rey <juan.mendezr at proton.me>  Mon, 02 Nov 2026 22:27:12 +0100
+
 fop (1:2.10+dfsg1-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/copyright
=====================================
@@ -16,6 +16,12 @@ Files: debian/*
 Copyright: 2001-2010, Ola Lundqvist <opal at debian.org>
 License: Apache-2.0
 
+Files: debian/keystore-renewed.pkcs12
+Copyright: The Apache Software Foundation
+License: Apache-2.0
+Comment: Upstream fop-core/src/test/resources/org/apache/fop/pdf/keystore.pkcs12
+ from commit a60713e84626571ed0a3fc007d44bccb99542141.
+
 Files: debian/offo-hyphenation_v2.2.zip
 Copyright: Copyright © 2004–2010 OFFO,
  Copyright 2004-2005 Janis Vilims, jvilims at apollo.lv,


=====================================
debian/fop.sh
=====================================
@@ -46,4 +46,13 @@ if [ -f "$HOME/.foprc" ]; then
     . "$HOME/.foprc"
 fi
 
-java $HEADLESS $LOGCHOICE $LOGLEVEL -jar /usr/share/java/fop-core.jar "$@"
+find_java_runtime
+
+# We load the hyphenation jar at the request of the user.
+if [ -n "$FOP_HYPHENATION_PATH" ]; then
+    find_jars "$FOP_HYPHENATION_PATH"
+fi
+find_jars /usr/share/fop/fop-hyph.jar
+find_jar_classpath fop-core
+
+run_java $HEADLESS $LOGCHOICE $LOGLEVEL org.apache.fop.cli.Main "$@"


=====================================
debian/keystore-renewed.pkcs12
=====================================
Binary files /dev/null and b/debian/keystore-renewed.pkcs12 differ


=====================================
debian/maven.properties
=====================================
@@ -1,3 +1,2 @@
-maven.test.failure.ignore=true
 maven.compiler.source=1.7
 maven.compiler.target=1.7


=====================================
debian/patches/FOP-3236-xmp-test-namespaces.patch
=====================================
@@ -0,0 +1,58 @@
+Description: Update PDFPageXMPTestCase for xmlgraphics-commons 2.11
+ xmlgraphics-commons 2.11 writes the namespaces on the parent element.
+Author: Joao Goncalves <jgoncalves at smartcommunications.com>
+Origin: upstream, https://github.com/apache/xmlgraphics-fop/commit/77cab4884a8a337f23ee7341b69aab62b6880750
+Bug: https://issues.apache.org/jira/browse/FOP-3236
+Last-Update: 2026-11-02
+
+diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFPageXMPTestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFPageXMPTestCase.java
+index bd3886aa6e2..f22707befde 100644
+--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFPageXMPTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFPageXMPTestCase.java
+@@ -46,25 +46,27 @@
+ 
+ public class PDFPageXMPTestCase {
+     private static final String XMP = "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n"
+-        + "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
+-        + "<rdf:Description xmlns:abc=\"http://www.abc.de/abc/\" abc:def=\"val\" rdf:about=\"\"/>\n"
+-        + "<rdf:Description xmlns:pdfaExtension=\"http://www.aiim.org/pdfa/ns/extension/\" rdf:about=\"\">\n"
+-        + "<pdfaExtension:schemas>\n"
+-        + "<rdf:Bag>\n"
+-        + "<rdf:li rdf:parseType=\"Resource\">\n"
+-        + "<pdfaSchema:property xmlns:pdfaSchema=\"http://www.aiim.org/pdfa/ns/schema#\">\n"
+-        + "<rdf:Seq>\n"
+-        + "<rdf:li rdf:parseType=\"Resource\">\n"
+-        + "<pdfaProperty:name xmlns:pdfaProperty=\"http://www.aiim.org/pdfa/ns/property#\">split</pdfaProperty:name>\n"
+-        + "</rdf:li>\n"
+-        + "</rdf:Seq>\n"
+-        + "</pdfaSchema:property>\n"
+-        + "</rdf:li>\n"
+-        + "</rdf:Bag>\n"
+-        + "</pdfaExtension:schemas>\n"
+-        + "</rdf:Description>\n"
+-        + "</rdf:RDF>\n"
+-        + "</x:xmpmeta>";
++            + "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
++            + "<rdf:Description xmlns:abc=\"http://www.abc.de/abc/\" abc:def=\"val\" rdf:about=\"\"/>\n"
++            + "<rdf:Description xmlns:pdfaExtension=\"http://www.aiim.org/pdfa/ns/extension/\" "
++            + "xmlns:pdfaProperty=\"http://www.aiim.org/pdfa/ns/property#\" "
++            + "xmlns:pdfaSchema=\"http://www.aiim.org/pdfa/ns/schema#\" rdf:about=\"\">\n"
++            + "<pdfaExtension:schemas>\n"
++            + "<rdf:Bag>\n"
++            + "<rdf:li rdf:parseType=\"Resource\">\n"
++            + "<pdfaSchema:property>\n"
++            + "<rdf:Seq>\n"
++            + "<rdf:li rdf:parseType=\"Resource\">\n"
++            + "<pdfaProperty:name>split</pdfaProperty:name>\n"
++            + "</rdf:li>\n"
++            + "</rdf:Seq>\n"
++            + "</pdfaSchema:property>\n"
++            + "</rdf:li>\n"
++            + "</rdf:Bag>\n"
++            + "</pdfaExtension:schemas>\n"
++            + "</rdf:Description>\n"
++            + "</rdf:RDF>\n"
++            + "</x:xmpmeta>";
+ 
+     @Test
+     public void textFO() throws Exception {


=====================================
debian/patches/FOP-3275-java25-event-model.patch
=====================================
@@ -0,0 +1,131 @@
+Description: Parse the event model without a nested Transformer
+ With Java 25, loading event-model.xml while an FO document is being parsed
+ fails with "FWK005 parse may not be called while parsing".
+Author: Simon Steiner <ssteiner at apache.org>
+Origin: upstream, https://github.com/apache/xmlgraphics-fop/commit/ab5d6eba6acd564132a806b00e4ed0383a054a36
+Bug: https://issues.apache.org/jira/browse/FOP-3275
+Last-Update: 2026-11-02
+
+diff --git a/fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java b/fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java
+index 7d3b7a03c4e..adeb2495555 100644
+--- a/fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java
++++ b/fop-events/src/main/java/org/apache/fop/events/model/EventModelParser.java
+@@ -19,24 +19,21 @@
+ 
+ package org.apache.fop.events.model;
+ 
++import java.io.IOException;
+ import java.util.Stack;
+ 
++import javax.xml.parsers.ParserConfigurationException;
++import javax.xml.parsers.SAXParserFactory;
+ import javax.xml.transform.Source;
+-import javax.xml.transform.Transformer;
+ import javax.xml.transform.TransformerException;
+-import javax.xml.transform.sax.SAXResult;
+-import javax.xml.transform.sax.SAXTransformerFactory;
++import javax.xml.transform.sax.SAXSource;
+ 
+ import org.xml.sax.Attributes;
+ import org.xml.sax.ContentHandler;
+ import org.xml.sax.SAXException;
++import org.xml.sax.XMLReader;
+ import org.xml.sax.helpers.DefaultHandler;
+ 
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
+-
+-import org.apache.fop.utils.DefaultErrorListener;
+-
+ /**
+  * This is a parser for the event model XML.
+  */
+@@ -45,27 +42,23 @@ public final class EventModelParser {
+     private EventModelParser() {
+     }
+ 
+-    /** Logger instance */
+-    private static final Log LOG = LogFactory.getLog(EventModelParser.class);
+-
+-    private static SAXTransformerFactory tFactory
+-        = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+-
+     /**
+      * Parses an event model file into an EventModel instance.
+      * @param src the Source instance pointing to the XML file
+      * @return the created event model structure
+      * @throws TransformerException if an error occurs while parsing the XML file
+      */
+-    public static EventModel parse(Source src)
+-            throws TransformerException {
+-        Transformer transformer = tFactory.newTransformer();
+-        transformer.setErrorListener(new DefaultErrorListener(LOG));
+-
++    public static EventModel parse(Source src) throws TransformerException {
+         EventModel model = new EventModel();
+-        SAXResult res = new SAXResult(getContentHandler(model));
+-
+-        transformer.transform(src, res);
++        try {
++            SAXParserFactory factory = SAXParserFactory.newInstance();
++            factory.setNamespaceAware(true);
++            XMLReader reader = factory.newSAXParser().getXMLReader();
++            reader.setContentHandler(getContentHandler(model));
++            reader.parse(SAXSource.sourceToInputSource(src));
++        } catch (ParserConfigurationException | IOException | SAXException e) {
++            throw new TransformerException(e);
++        }
+         return model;
+     }
+ 
+diff --git a/fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java b/fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java
+index 747284ec4ad..d9f917701ab 100644
+--- a/fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java
++++ b/fop-util/src/main/java/org/apache/fop/utils/XMLResourceBundle.java
+@@ -32,14 +32,13 @@
+ import java.util.ResourceBundle;
+ import java.util.Stack;
+ 
+-import javax.xml.transform.Transformer;
+-import javax.xml.transform.TransformerException;
+-import javax.xml.transform.sax.SAXResult;
+-import javax.xml.transform.sax.SAXTransformerFactory;
+-import javax.xml.transform.stream.StreamSource;
++import javax.xml.parsers.ParserConfigurationException;
++import javax.xml.parsers.SAXParserFactory;
+ 
+ import org.xml.sax.Attributes;
++import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
++import org.xml.sax.XMLReader;
+ import org.xml.sax.helpers.DefaultHandler;
+ 
+ import org.apache.xmlgraphics.util.QName;
+@@ -66,9 +65,6 @@ public class XMLResourceBundle extends ResourceBundle {
+ 
+     private Locale locale;
+ 
+-    private static SAXTransformerFactory tFactory
+-        = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+-
+     /**
+      * Creates a resource bundle from an InputStream.
+      * @param in the stream to read from
+@@ -76,11 +72,12 @@ public class XMLResourceBundle extends ResourceBundle {
+      */
+     public XMLResourceBundle(InputStream in) throws IOException {
+         try {
+-            Transformer transformer = tFactory.newTransformer();
+-            StreamSource src = new StreamSource(in);
+-            SAXResult res = new SAXResult(new CatalogueHandler());
+-            transformer.transform(src, res);
+-        } catch (TransformerException e) {
++            SAXParserFactory factory = SAXParserFactory.newInstance();
++            factory.setNamespaceAware(true);
++            XMLReader reader = factory.newSAXParser().getXMLReader();
++            reader.setContentHandler(new CatalogueHandler());
++            reader.parse(new InputSource(in));
++        } catch (ParserConfigurationException | SAXException e) {
+             throw new IOException("Error while parsing XML resource bundle: " + e.getMessage());
+         }
+     }


=====================================
debian/patches/renewed-signing-keystore.patch
=====================================
@@ -0,0 +1,18 @@
+Description: Use the renewed test keystore for PDFSigningTestCase
+ The certificate in keystore.pkcs12 expired on 2025-01-30. Upstream replaced
+ it in a60713e8; debian/rules copies that file in as keystore-renewed.pkcs12.
+Author: Juan Manuel Méndez Rey <juan.mendezr at proton.me>
+Origin: backport, https://github.com/apache/xmlgraphics-fop/commit/a60713e84626571ed0a3fc007d44bccb99542141
+Last-Update: 2026-11-02
+
+--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFSigningTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFSigningTestCase.java
+@@ -82,7 +82,7 @@ public class PDFSigningTestCase {
+     }
+ 
+     private FopFactory getFopFactory() throws Exception {
+-        String pkcs = PDFSigningTestCase.class.getResource("keystore.pkcs12").toString();
++        String pkcs = PDFSigningTestCase.class.getResource("keystore-renewed.pkcs12").toString();
+         String fopxconf = "<fop version=\"1.0\">\n"
+                 + "  <renderers>\n"
+                 + "    <renderer mime=\"application/pdf\">\n"


=====================================
debian/patches/series
=====================================
@@ -9,3 +9,7 @@ jar-hyph.patch
 avalon-framework.patch
 0001-PDFInfo.java-Support-SOURCE_DATE_EPOCH-environment-v.patch
 Exception_never_thrown.patch
+FOP-3275-java25-event-model.patch
+FOP-3236-xmp-test-namespaces.patch
+skip-AdobeStandardEncodingTestCase.patch
+renewed-signing-keystore.patch


=====================================
debian/patches/skip-AdobeStandardEncodingTestCase.patch
=====================================
@@ -0,0 +1,19 @@
+Description: Skip AdobeStandardEncodingTestCase
+ Its data file, AdobeStandardEncoding.txt, is removed from the Debian source
+ for licence reasons (see Files-Excluded in debian/copyright).
+Author: Juan Manuel Méndez Rey <juan.mendezr at proton.me>
+Forwarded: not-needed
+Last-Update: 2026-11-02
+
+--- a/fop-core/pom.xml
++++ b/fop-core/pom.xml
+@@ -326,6 +326,9 @@
+           <includes>
+             <include>**/*TestCase.java</include>
+           </includes>
++          <excludes>
++            <exclude>**/AdobeStandardEncodingTestCase.java</exclude>
++          </excludes>
+           <redirectTestOutputToFile>true</redirectTestOutputToFile>
+           <workingDirectory>../fop</workingDirectory>
+         </configuration>


=====================================
debian/rules
=====================================
@@ -28,9 +28,17 @@ override_dh_auto_install:
 override_dh_auto_build:
 	dh_auto_build -- -X package
 	mkdir -p fop/lib/build
+	# compile-hyphenation needs SerializeHyphPattern from fop-core
+	cp fop-core/target/fop-core-*.jar fop/lib/
 	# While the README mention those are deprecated build instructions it
 	# seems those targets have not been moved to the new maven build system
 	ant -f fop/build.xml -lib /usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/batik-libs.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/fontbox2.jar:/usr/share/java/servlet-api-3.1.jar jar-hyphenation
+	# ant only warns when the patterns fail to compile
+	unzip -l fop/build/fop-hyph.jar | grep -q '\.hyp$$'
+
+override_dh_auto_test:
+	cp debian/keystore-renewed.pkcs12 fop-core/src/test/resources/org/apache/fop/pdf/
+	dh_auto_test -- -Dmaven.test.additionalClasspath=$(CURDIR)/fop/build/fop-hyph.jar test
 
 debian/fop.1: debian/fop.1.in
 	help2man --no-info --version-option=-version --no-discard-stderr \
@@ -49,6 +57,7 @@ override_dh_auto_clean:
 	dh_clean fop/build/
 	dh_clean fop/lib/
 	dh_clean fop/hyph/*.xml
+	dh_clean fop-core/src/test/resources/org/apache/fop/pdf/keystore-renewed.pkcs12
 	dh_clean org/
 	dh_clean javac.sh
 	dh_auto_clean


=====================================
debian/source/include-binaries
=====================================
@@ -1 +1,2 @@
 debian/offo-hyphenation_v2.2.zip
+debian/keystore-renewed.pkcs12



View it on GitLab: https://salsa.debian.org/java-team/fop/-/compare/ce9dd2764dc4285ea2302e079f35aec9df7223c9...39d3331e934233df333b9bdabc44395b65340d04

-- 
View it on GitLab: https://salsa.debian.org/java-team/fop/-/compare/ce9dd2764dc4285ea2302e079f35aec9df7223c9...39d3331e934233df333b9bdabc44395b65340d04
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261103/8c629fca/attachment.htm>


More information about the pkg-java-commits mailing list