Bug 1100445 - FTBFS: pdfbox fails to build with bouncycastle 1.50
Summary: FTBFS: pdfbox fails to build with bouncycastle 1.50
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pdfbox
Version: rawhide
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: gil cattaneo
QA Contact: Fedora Extras Quality Assurance
URL: https://issues.apache.org/jira/browse...
Whiteboard:
: 1105938 (view as bug list)
Depends On:
Blocks: F21FTBFS
TreeView+ depends on / blocked
 
Reported: 2014-05-22 19:52 UTC by Orion Poplawski
Modified: 2014-10-01 04:22 UTC (History)
4 users (show)

Fixed In Version: pdfbox-1.8.5-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-01 04:22:13 UTC
Type: Bug


Attachments (Terms of Use)
port to bouncycastle 1.50 (4.01 KB, patch)
2014-09-25 23:20 UTC, gil cattaneo
no flags Details | Diff
pdfbox 1.8.7 port to bouncycastle 1.50 (4.08 KB, patch)
2014-09-25 23:41 UTC, gil cattaneo
no flags Details | Diff

Description Orion Poplawski 2014-05-22 19:52:22 UTC
Description of problem:

bouncycastle 1.50 had API change, pdfbox does not support it.  Reported upstream, but no movement yet.

http://koji.fedoraproject.org/koji/taskinfo?taskID=6877902

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project pdfbox: Compilation failure: Compilation failure:
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[40,29] cannot find symbol
[ERROR] symbol:   class DERObject
[ERROR] location: package org.bouncycastle.asn1
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[379,13] cannot find symbol
[ERROR] symbol:   class DERObject
[ERROR] location: class org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[186,49] method getContent in class org.bouncycastle.cms.RecipientInformation cannot be applied to given types;
[ERROR] required: org.bouncycastle.cms.Recipient
[ERROR] found: java.security.Key,java.lang.String
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[312,17] cannot find symbol
[ERROR] symbol:   class DERObject
[ERROR] location: class org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[390,9] cannot find symbol
[ERROR] symbol:   class DERObject
[ERROR] location: class org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[403,29] reference to EnvelopedData is ambiguous
[ERROR] both constructor EnvelopedData(org.bouncycastle.asn1.cms.OriginatorInfo,org.bouncycastle.asn1.ASN1Set,org.bouncycastle.asn1.cms.EncryptedContentInfo,org.bouncycastle.asn1.ASN1Set) in org.bouncycastle.asn1.cms.EnvelopedData and constructor EnvelopedData(org.bouncycastle.asn1.cms.OriginatorInfo,org.bouncycastle.asn1.ASN1Set,org.bouncycastle.asn1.cms.EncryptedContentInfo,org.bouncycastle.asn1.cms.Attributes) in org.bouncycastle.asn1.cms.EnvelopedData match
[ERROR] /builddir/build/BUILD/pdfbox-1.8.5/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java:[406,27] cannot find symbol
[ERROR] symbol:   method getDERObject()
[ERROR] location: variable contentinfo of type org.bouncycastle.asn1.cms.ContentInfo

Version-Release number of selected component (if applicable):
1.8.5

Comment 1 Orion Poplawski 2014-09-25 21:15:04 UTC
*** Bug 1105938 has been marked as a duplicate of this bug. ***

Comment 2 gil cattaneo 2014-09-25 23:20:35 UTC
Created attachment 941292 [details]
port to bouncycastle 1.50

The patch should fix compatibility with bouncycastle 1.50

add also this to spec file

%pom_xpath_inject "pom:dependencies" '
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpkix-jdk15on</artifactId>
    <version>1.50</version>
    <optional>true</optional>
</dependency>'  pdfbox

Comment 3 gil cattaneo 2014-09-25 23:41:22 UTC
Created attachment 941293 [details]
pdfbox 1.8.7 port to bouncycastle 1.50

Some test fails, i used
%pom_remove_dep net.java.dev.jai-imageio:jai-imageio-core-standalone pdfbox
%pom_remove_dep com.levigo.jbig2:levigo-jbig2-imageio pdfbox
rm -rf pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java \
 pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDJpegTest.java \
 pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcittTest.java
sed -i -e /PDJpegTest/d pdfbox/src/test/java/org/apache/pdfbox/TestAll.java
sed -i -e /PDCcittTest/d pdfbox/src/test/java/org/apache/pdfbox/TestAll.java
sed -i -e /TestImageIOUtils/d pdfbox/src/test/java/org/apache/pdfbox/TestAll.java

Comment 4 Fedora Update System 2014-09-26 17:47:54 UTC
pdfbox-1.8.5-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/pdfbox-1.8.5-3.fc21

Comment 5 Fedora Update System 2014-09-27 09:50:38 UTC
Package pdfbox-1.8.5-3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pdfbox-1.8.5-3.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11618/pdfbox-1.8.5-3.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-10-01 04:22:13 UTC
pdfbox-1.8.5-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.