Hello community, here is the log from the commit of package apache-pdfbox for openSUSE:Factory checked in at 2017-09-15 22:31:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/apache-pdfbox (Old) and /work/SRC/openSUSE:Factory/.apache-pdfbox.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache-pdfbox" Fri Sep 15 22:31:30 2017 rev:6 rq:526277 version:1.8.12 Changes: -------- --- /work/SRC/openSUSE:Factory/apache-pdfbox/apache-pdfbox.changes 2017-05-22 10:48:31.608091044 +0200 +++ /work/SRC/openSUSE:Factory/.apache-pdfbox.new/apache-pdfbox.changes 2017-09-15 22:31:33.369396204 +0200 @@ -1,0 +2,12 @@ +Fri Sep 15 07:16:49 UTC 2017 - fst...@suse.com + +- Added patches: + * pdfbox-1.8.12-bouncycastle.patch + + Fix build of javadoc against bouncycastle API >= 1.4.7 + * pdfbox-1.8.12-sourcetarget.patch + + Make java source and target level ant properties + + Leave the default 1.5 +- Specify java source and target level 1.6 in order to allow + building with jdk9 + +------------------------------------------------------------------- New: ---- pdfbox-1.8.12-bouncycastle.patch pdfbox-1.8.12-sourcetarget.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apache-pdfbox.spec ++++++ --- /var/tmp/diff_new_pack.KgAqap/_old 2017-09-15 22:31:34.313263248 +0200 +++ /var/tmp/diff_new_pack.KgAqap/_new 2017-09-15 22:31:34.317262684 +0200 @@ -1,7 +1,7 @@ # # spec file for package apache-pdfbox # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,6 @@ # Only fontbox and jempbox are built as pdfbox itself depends on Adobe's pcif. - Name: apache-pdfbox Version: 1.8.12 Release: 0 @@ -29,20 +28,23 @@ Source1: http://central.maven.org/maven2/org/apache/pdfbox/pdfbox/%{version}/pdfbox-%{version}.pom Source2: http://central.maven.org/maven2/org/apache/pdfbox/fontbox/%{version}/fontbox-%{version}.pom Source3: http://central.maven.org/maven2/org/apache/pdfbox/jempbox/%{version}/jempbox-%{version}.pom +Patch0: pdfbox-1.8.12-bouncycastle.patch +Patch1: disable-downloads.patch +Patch2: fix-javadoc-dep.patch +Patch3: pdfbox-1.8.12-sourcetarget.patch BuildRequires: ant BuildRequires: apache-commons-logging +BuildRequires: bouncycastle +BuildRequires: fdupes BuildRequires: icu4j -BuildRequires: java-devel >= 1.5 +BuildRequires: java-devel >= 1.6 BuildRequires: javapackages-local BuildRequires: javapackages-tools BuildRequires: junit BuildRequires: unzip Requires: apache-commons-logging Requires: icu4j -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -Patch1: disable-downloads.patch -Patch2: fix-javadoc-dep.patch %description The Apache PDFBox library is an open source Java tool for working with PDF documents. @@ -60,22 +62,18 @@ %prep %setup -q -n pdfbox-%{version} +%patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build -# Link dependencies -mkdir -p pdfbox/external -DEPS="junit4 icu4j commons-logging" -build-jar-repository -s -p pdfbox/external $DEPS -# build.xml uses hardcoded version numbers, so it doesn't find the jars... -for dep in $DEPS; do - CLASSPATH="$PWD/pdfbox/external/${dep}.jar:$CLASSPATH" -done -export CLASSPATH - # Build -ant -buildfile pdfbox/build.xml -Dbuild.sysclasspath=first fontbox.package jempbox.package javadoc +ant -buildfile pdfbox/build.xml \ + -Dbcprov.jar=$(build-classpath bcprov) -Djunit.jar=$(build-classpath junit4) \ + -Dicu4j.jar=$(build-classpath icu4j) -Dlogging.jar=$(build-classpath commons-logging) \ + -Dbuild.sysclasspath=first -Dcompile.source=1.6 -Dcompile.target=1.6 \ + fontbox.package jempbox.package javadoc %install # Code @@ -94,21 +92,20 @@ # JavaDoc install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version} cp -pr pdfbox/target/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version} +%fdupes %{buildroot}%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} %files javadoc -%defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} %files -%defattr(-,root,root,-) %doc RELEASE-NOTES.txt LICENSE.txt NOTICE.txt README.txt %{_javadir}/fontbox.jar %{_javadir}/jempbox.jar %{_mavenpomdir}/JPP-fontbox.pom %{_mavenpomdir}/JPP-jempbox.pom -%if %suse_version >= 1330 +%if 0%{?suse_version} >= 1330 %{_datadir}/maven-metadata/%{name}.xml* %else %{_mavendepmapfragdir}/%{name} ++++++ pdfbox-1.8.12-bouncycastle.patch ++++++ --- pdfbox-1.8.12/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java 2017-09-15 07:55:42.552501155 +0200 +++ pdfbox-1.8.12/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java 2017-09-15 08:21:29.621212330 +0200 @@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory; import org.bouncycastle.asn1.ASN1InputStream; -import org.bouncycastle.asn1.DERObject; +import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.DERObjectIdentifier; import org.bouncycastle.asn1.DEROctetString; import org.bouncycastle.asn1.DEROutputStream; @@ -53,9 +53,6 @@ import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.asn1.x509.TBSCertificateStructure; -import org.bouncycastle.cms.CMSEnvelopedData; -import org.bouncycastle.cms.CMSException; -import org.bouncycastle.cms.RecipientInformation; import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSString; import org.apache.pdfbox.exceptions.CryptographyException; @@ -311,7 +308,7 @@ pkcs7input[22] = two; pkcs7input[23] = one; - DERObject obj = createDERForRecipient(pkcs7input, certificate); + ASN1Primitive obj = createDERForRecipient(pkcs7input, certificate); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -378,7 +375,7 @@ } - private DERObject createDERForRecipient(byte[] in, X509Certificate cert) + private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert) throws IOException, GeneralSecurityException { @@ -389,7 +386,7 @@ AlgorithmParameters algorithmparameters = algorithmparametergenerator.generateParameters(); ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(algorithmparameters.getEncoded("ASN.1")); ASN1InputStream asn1inputstream = new ASN1InputStream(bytearrayinputstream); - DERObject derobject = asn1inputstream.readObject(); + ASN1Primitive derobject = asn1inputstream.readObject(); KeyGenerator keygenerator = KeyGenerator.getInstance(s); keygenerator.init(128); SecretKey secretkey = keygenerator.generateKey(); ++++++ pdfbox-1.8.12-sourcetarget.patch ++++++ --- pdfbox-1.8.12/pdfbox/build.xml 2017-09-15 07:55:42.584501156 +0200 +++ pdfbox-1.8.12/pdfbox/build.xml 2017-09-15 08:46:31.257902337 +0200 @@ -23,6 +23,9 @@ <property name="build.compiler" value="modern" /> + <property name="compile.source" value="1.5" /> + <property name="compile.target" value="1.5" /> + <property name="download.dir" value="download" /> <property name="jar.dir" value="external" /> <property name="tool.dir" value="tools" /> @@ -175,10 +178,10 @@ description="Compile Java source files"> <!-- required encoding flag to be able to build using ibm-jdk on redhat ES--> <javac srcdir="${pdfbox.src.dir}" destdir="${pdfbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="pdfbox.build.classpath" encoding="ISO-8859-1"/> <javac srcdir="${pdfbox.test.dir}" destdir="${pdfbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="pdfbox.build.classpath" encoding="ISO-8859-1"/> </target> @@ -186,10 +189,10 @@ description="Compile Java source files"> <!-- required encoding flag to be able to build using ibm-jdk on redhat ES--> <javac srcdir="${fontbox.src.dir}" destdir="${fontbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="fontbox.build.classpath" encoding="ISO-8859-1"/> <javac srcdir="${fontbox.test.dir}" destdir="${fontbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="fontbox.build.classpath" encoding="ISO-8859-1"/> </target> @@ -197,10 +200,10 @@ description="Compile Java source files"> <!-- required encoding flag to be able to build using ibm-jdk on redhat ES--> <javac srcdir="${jempbox.src.dir}" destdir="${jempbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="jempbox.build.classpath" encoding="ISO-8859-1"/> <javac srcdir="${jempbox.test.dir}" destdir="${jempbox.dest.dir}" - target="1.5" source="1.5" debug="on" deprecation="on" + target="${compile.target}" source="${compile.source}" debug="on" deprecation="on" classpathref="jempbox.build.classpath" encoding="ISO-8859-1"/> </target> @@ -809,6 +812,7 @@ doctitle="${project.name}" verbose="no" classpathref="pdfbox.build.classpath" + source="${compile.source}" encoding="ISO-8859-1" breakiterator="yes"> <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>