Bug#906375: libitext5-java: FTBFS in buster/sid (method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature cannot be applied to given types)

2018-09-18 Thread Jochen Sprickerhof

Hi,

* Emmanuel Bourg  [2018-08-29 11:51]:

On 28/08/2018 21:31, Jochen Sprickerhof wrote:


As a quick fix we could probably hack around the visibility modifiers of
Marshaller, but I guess that would be rather ugly. Just mentioning it
for completeness.


+1 for adjusting the xml-security API.


I opened merge requests for this:

https://salsa.debian.org/java-team/libxml-security-java/merge_requests/1
https://salsa.debian.org/java-team/libitext5-java/merge_requests/1

Note that the new libitext5 version has runtime errors still, but I have 
patches for the current Debian version to at lest fix this RC:


https://salsa.debian.org/jspricke/libitext5-java/tree/5.5.6

Would be great if one of you could review them.

Cheers Jochen


signature.asc
Description: PGP signature


Bug#906375: libitext5-java: FTBFS in buster/sid (method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature cannot be applied to given types)

2018-08-29 Thread Emmanuel Bourg
On 28/08/2018 21:31, Jochen Sprickerhof wrote:

> As a quick fix we could probably hack around the visibility modifiers of
> Marshaller, but I guess that would be rather ugly. Just mentioning it
> for completeness.

+1 for adjusting the xml-security API.

Emmanuel Bourg



Bug#906375: libitext5-java: FTBFS in buster/sid (method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature cannot be applied to given types)

2018-08-28 Thread Jochen Sprickerhof

Hi,

I looked into this, but haven't found an easy solution.

* Santiago Vila  [2018-08-17 11:20]:

[ERROR] 
/<>/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java:[443,22]
 method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature cannot be 
applied to given types;
 required: 
org.apache.jcp.xml.dsig.internal.dom.XmlWriter,java.lang.String,javax.xml.crypto.XMLCryptoContext
 found: 
org.w3c.dom.Node,org.w3c.dom.Node,java.lang.String,javax.xml.crypto.dsig.dom.DOMSignContext
 reason: actual and formal argument lists differ in length


The problem is that libitext5-java is using an internal API of 
libxml-security-java here which was reworked in version 2. Discussion 
and patch can be found here:


https://issues.apache.org/jira/browse/SANTUARIO-349

Problem is that it introduces a new class Marshaller, used to generate 
the same result as needed by libitext5-java but it's not public, so we 
can't access it easily.


Itext has moved on to version 7 in the meantime, not use the internal 
API, as far as I've seen. But it has a different API itself, so we would 
have to port all depending packages to it (which are figtree, hibiscus 
and umlet).


I'm not sure if I will find time for this soon, so help would be very 
welcome here.


As a quick fix we could probably hack around the visibility modifiers of 
Marshaller, but I guess that would be rather ugly. Just mentioning it 
for completeness.


* Andreas Tille  [2018-08-25 17:44]:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.itextpdf:itextpdf:5.5.13: Cannot 
access central (https://repo.maven.apache.org/maven2) in offline mode and the 
artifact com.itextpdf:itext-parent:pom:1.0.0 has not been downloaded from it 
before. and 'parent.relativePath' points at no local POM @ line 5, column 11
[FATAL] Non-resolvable parent POM for com.itextpdf:itext-pdfa:5.5.13: Cannot 
access central (https://repo.maven.apache.org/maven2) in offline mode and the 
artifact com.itextpdf:itext-parent:pom:1.0.0 has not been downloaded from it 
before. and 'parent.relativePath' points at no local POM @ line 5, column 11
[FATAL] Non-resolvable parent POM for com.itextpdf:itext-xtra:5.5.13: Cannot 
access central (https://repo.maven.apache.org/maven2) in offline mode and the 
artifact com.itextpdf:itext-parent:pom:1.0.0 has not been downloaded from it 
before. and 'parent.relativePath' points at no local POM @ line 5, column 11
[FATAL] Non-resolvable parent POM for com.itextpdf.tool:xmlworker:5.5.13: 
Cannot access central (https://repo.maven.apache.org/maven2) in offline mode 
and the artifact com.itextpdf:itext-parent:pom:1.0.0 has not been downloaded 
from it before. and 'parent.relativePath' points at no local POM @ line 5, 
column 11
@
[ERROR] The build could not read 4 projects -> [Help 1]


I've looked into this as well and have some patches to make it work up 
to the same error this bug is about. If you still want to have them, I 
can send a pull request.


Cheers Jochen


signature.asc
Description: PGP signature


Bug#906375: libitext5-java: FTBFS in buster/sid (method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature cannot be applied to given types)

2018-08-17 Thread Santiago Vila
Package: src:libitext5-java
Version: 5.5.6-4
Severity: serious
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster but it failed:


[...]
 debian/rules build-indep
dh build-indep --buildsystem=maven
   dh_update_autotools_config -i -O--buildsystem=maven
   dh_autoreconf -i -O--buildsystem=maven
   dh_auto_configure -i -O--buildsystem=maven
mh_patchpoms -plibitext5-java --debian-build --keep-pom-version 
--maven-repo=/<>/debian/maven-repo
   dh_auto_build -i -O--buildsystem=maven
/usr/lib/jvm/default-java/bin/java -noverify -cp 
/usr/share/maven/boot/plexus-classworlds-2.x.jar -Dmaven.home=/usr/share/maven 
-Dmaven.multiModuleProjectDirectory=/<> 
-Dclassworlds.conf=/etc/maven/m2-debian.conf 
-Dproperties.file.manual=/<>/debian/maven.properties 
org.codehaus.plexus.classworlds.launcher.Launcher 
-s/etc/maven/settings-debian.xml -Ddebian.dir=/<>/debian 
-Dmaven.repo.local=/<>/debian/maven-repo --batch-mode package 
javadoc:jar javadoc:aggregate -DskipTests -Dnotimestamp=true -Dlocale=en_US
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
com.google.inject.internal.cglib.core.$ReflectUtils$1 
(file:/usr/share/maven/lib/guice.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of 
com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...

[... snipped ...]

[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ 
itextpdf ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 24 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ itextpdf ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 622 source files to /<>/target/classes
[INFO] 
/<>/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java:
 Some input files use or override a deprecated API.
[INFO] 
/<>/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java:
 Recompile with -Xlint:deprecation for details.
[INFO] 
/<>/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java: 
Some input files use unchecked or unsafe operations.
[INFO] 
/<>/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java: 
Recompile with -Xlint:unchecked for details.
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/<>/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java:[443,22]
 method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature 
cannot be applied to given types;
  required: 
org.apache.jcp.xml.dsig.internal.dom.XmlWriter,java.lang.String,javax.xml.crypto.XMLCryptoContext
  found: 
org.w3c.dom.Node,org.w3c.dom.Node,java.lang.String,javax.xml.crypto.dsig.dom.DOMSignContext
  reason: actual and formal argument lists differ in length
[INFO] 1 error
[INFO] -
[INFO] 
[INFO] 
[INFO] Skipping iText, a Free Java-PDF library
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 12.567 s
[INFO] Finished at: 2018-08-10T03:56:01Z
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) 
on project itextpdf: Compilation failure
[ERROR] 
/<>/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java:[443,22]
 method marshal in class org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature 
cannot be applied to given types;
[ERROR]   required: 
org.apache.jcp.xml.dsig.internal.dom.XmlWriter,java.lang.String,javax.xml.crypto.XMLCryptoContext
[ERROR]   found: 
org.w3c.dom.Node,org.w3c.dom.Node,java.lang.String,javax.xml.crypto.dsig.dom.DOMSignContext
[ERROR]   reason: actual and formal argument lists differ in length
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1]