Hello community, here is the log from the commit of package apache-ivy for openSUSE:Leap:15.2 checked in at 2020-02-05 07:23:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/apache-ivy (Old) and /work/SRC/openSUSE:Leap:15.2/.apache-ivy.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache-ivy" Wed Feb 5 07:23:12 2020 rev:14 rq:762707 version:2.4.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/apache-ivy/apache-ivy.changes 2020-01-15 14:47:02.169279960 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.apache-ivy.new.26092/apache-ivy.changes 2020-02-05 07:23:19.554592753 +0100 @@ -1,0 +2,50 @@ +Tue Dec 10 22:39:53 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Specify bundle.version in order to avoid unexpanded macro + +------------------------------------------------------------------- +Tue Sep 24 16:08:31 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Build the bouncycastle signer plugin since bcpg is now present +- Added patch: + * port-to-bc-1.52.patch + + Allow building the signer plugin against bouncycastle >= 1.52 + +------------------------------------------------------------------- +Tue Jul 2 09:22:21 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Add possibility to build with ssh and vfs integration, since + we have all the dependencies in openSUSE. + +------------------------------------------------------------------- +Mon Apr 8 18:12:07 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Remove the reference to parent from pom file, since we are not + building using maven. + +------------------------------------------------------------------- +Thu Feb 7 14:48:24 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Add apache-ivy/ivy.jar symlink + +------------------------------------------------------------------- +Mon Nov 26 10:25:21 UTC 2018 - Fridrich Strba <fst...@suse.com> + +- Upgrade to version 2.4.0 +- Modified patch: + * apache-ivy-2.3.0-jdk9.patch -> apache-ivy-2.4.0-jdk9.patch + + rediff to changed context +- Added patch: + * apache-ivy-global-settings.patch + + change global settings + +------------------------------------------------------------------- +Tue May 15 13:26:55 UTC 2018 - fst...@suse.com + +- Modified patch: + * apache-ivy-2.3.0-jdk9.patch + + Build with source and target 8 to prepare for a possible + removal of 1.6 compatibility +- Run fdupes on documentation + +------------------------------------------------------------------- Old: ---- apache-ivy-2.3.0-jdk9.patch apache-ivy-2.3.0-src.tar.gz ivy-2.3.0.pom New: ---- apache-ivy-2.4.0-jdk9.patch apache-ivy-2.4.0-src.tar.gz apache-ivy-global-settings.patch ivy-2.4.0.pom port-to-bc-1.52.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apache-ivy.spec ++++++ --- /var/tmp/diff_new_pack.PMWqdr/_old 2020-02-05 07:23:20.086592977 +0100 +++ /var/tmp/diff_new_pack.PMWqdr/_new 2020-02-05 07:23:20.090592979 +0100 @@ -1,7 +1,7 @@ # # spec file for package apache-ivy # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,33 +12,44 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%bcond_without ssh +%bcond_without vfs Name: apache-ivy -Version: 2.3.0 +Version: 2.4.0 Release: 0 Summary: Java-based dependency manager License: Apache-2.0 Group: Development/Tools/Building -Url: http://ant.apache.org/ivy/ +URL: http://ant.apache.org/ivy/ Source0: %{name}-%{version}-src.tar.gz Source1: ivy.1 -Source2: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.pom -Patch0: apache-ivy-2.3.0-jdk9.patch +Source2: http://repo1.maven.org/maven2/org/apache/ivy/ivy/%{version}/ivy-%{version}.pom +Patch0: apache-ivy-2.4.0-jdk9.patch +Patch1: apache-ivy-global-settings.patch +Patch2: port-to-bc-1.52.patch BuildRequires: ant -BuildRequires: bouncycastle +BuildRequires: bouncycastle-pg BuildRequires: commons-httpclient -BuildRequires: dos2unix -BuildRequires: java-devel >= 1.6 +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local -BuildRequires: javapackages-tools BuildRequires: jsch BuildRequires: oro -Provides: ivy = %{version} -Obsoletes: ivy < %{version} +Provides: ivy = %{version}-%{release} +Obsoletes: ivy < %{version}-%{release} BuildArch: noarch +%if %{with vfs} +BuildRequires: apache-commons-vfs2 +%endif +%if %{with ssh} +BuildRequires: jsch-agent-proxy-connector-factory +BuildRequires: jsch-agent-proxy-core +BuildRequires: jsch-agent-proxy-jsch +%endif %description Apache Ivy is a tool for managing (recording, tracking, resolving and @@ -50,8 +61,7 @@ %package javadoc Summary: API Documentation for ivy -Group: Development/Tools/Building -Requires: %{name} = %{version}-%{release} +Group: Documentation/HTML %description javadoc JavaDoc documentation for %{name} @@ -59,45 +69,66 @@ %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 -# Fix messed-up encodings -dos2unix README LICENSE NOTICE RELEASE_NOTES CHANGES.txt +cp %{SOURCE2} pom.xml -#TODO: return back when bouncycastle-pgp will be available -rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle +%pom_remove_parent . # Remove prebuilt documentation rm -rf doc build/doc -# How to properly disable a plugin? -# we disable vfs plugin since commons-vfs is not available -rm -rf src/java/org/apache/ivy/plugins/repository/vfs \ - src/java/org/apache/ivy/plugins/resolver/VfsResolver.java +# Port from commons-vfs 1.x to 2.x +%if %{with vfs} +sed -i "s/commons.vfs/&2/" {src,test}/java/org/apache/ivy/plugins/repository/vfs/* +%else +sed -i /commons-vfs/d ivy.xml sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \ src/java/org/apache/ivy/core/settings/typedef.properties +rm -rf src/java/org/apache/ivy/plugins/repository/vfs +rm -rf src/java/org/apache/ivy/plugins/resolver/VfsResolver.java +%endif + +%if %{without ssh} +rm -r src/java/org/apache/ivy/plugins/repository/{ssh,sftp} +rm src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java +%endif %build # Craft class path mkdir -p lib -build-jar-repository lib ant ant/ant-nodeps oro jsch commons-httpclient +build-jar-repository lib ant ant/ant-nodeps oro jsch commons-httpclient bcprov bcpg +export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient bcprov bcpg) +%if %{with vfs} +build-jar-repository lib commons-vfs2 +export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2) +%endif +%if %{with ssh} +build-jar-repository lib jsch.agentproxy.core \ + jsch.agentproxy.connector-factory \ + jsch.agentproxy.jsch +export CLASSPATH=${CLASSPATH}:$(build-classpath jsch.agentproxy.core jsch.agentproxy.connector-factory jsch.agentproxy.jsch) +%endif # Build -export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient) -ant -Dtarget.ivy.version=%{version} /localivy /offline jar javadoc +ant -Dtarget.ivy.version=%{version} -Dbundle.version=%{version} /localivy /offline jar javadoc %install # Code -install -d %{buildroot}%{_javadir} +install -d %{buildroot}%{_javadir}/%{name} install -p -m644 build/artifact/jars/ivy.jar %{buildroot}%{_javadir}/ivy.jar +ln -sf ../ivy.jar %{buildroot}%{_javadir}/%{name}/ivy.jar install -d -m 0755 %{buildroot}/%{_mavenpomdir}/ -install -m 0644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-ivy.pom +install -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-ivy.pom # Maven depmap %add_maven_depmap JPP-ivy.pom ivy.jar # API Documentation install -d %{buildroot}%{_javadocdir}/%{name} cp -rp build/doc/reports/api/. %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir}/%{name} # Command line script MAIN_CLASS=`sed -rn 's/^Main-Class: (.*)$/\1/gp' META-INF/MANIFEST.MF | tr -d '\r'` @@ -110,18 +141,15 @@ install -d %{buildroot}%{_mandir}/man1 install %{SOURCE1} %{buildroot}%{_mandir}/man1/ivy.1 -%files -%defattr(-,root,root,-) -%doc RELEASE_NOTES CHANGES.txt LICENSE NOTICE README +%files -f .mfiles +%license LICENSE NOTICE +%doc README %config %{_sysconfdir}/ant.d/%{name} -%{_javadir}/ivy.jar +%{_javadir}/%{name} %attr(755,root,root) %{_bindir}/* %attr(644,root,root) %{_mandir}/man1/* -%{_mavenpomdir}/JPP-ivy.pom -%{_datadir}/maven-metadata/%{name}.xml %files javadoc -%defattr(-,root,root,-) %{_javadocdir}/* %changelog ++++++ apache-ivy-2.3.0-jdk9.patch -> apache-ivy-2.4.0-jdk9.patch ++++++ --- /work/SRC/openSUSE:Leap:15.2/apache-ivy/apache-ivy-2.3.0-jdk9.patch 2020-01-15 14:47:01.953279798 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.apache-ivy.new.26092/apache-ivy-2.4.0-jdk9.patch 2020-02-05 07:23:18.182592175 +0100 @@ -1,22 +1,22 @@ --- apache-ivy-2.3.0/build.properties 2012-04-02 23:11:30.000000000 +0200 +++ apache-ivy-2.3.0/build.properties 2017-09-07 14:13:28.647597540 +0200 @@ -42,7 +42,7 @@ - checkstyle.src.dir=${basedir}/src/etc/checkstyle - rat.report.dir=${reports.dir}/rat - --ivy.minimum.javaversion=1.4 -+ivy.minimum.javaversion=1.6 - debug.mode=on - ivy.install.version=1.4.1 - + checkstyle.src.dir=${basedir}/src/etc/checkstyle + rat.report.dir=${reports.dir}/rat + +-ivy.minimum.javaversion=1.5 ++ivy.minimum.javaversion=1.8 + debug.mode=on + ivy.install.version=1.4.1 + --- apache-ivy-2.3.0/build.xml 2012-04-09 08:58:36.000000000 +0200 +++ apache-ivy-2.3.0/build.xml 2017-09-07 14:46:13.128164218 +0200 @@ -517,7 +517,7 @@ - </target> - - <target name="javadoc" unless="skip.javadoc"> -- <javadoc destdir="${javadoc.build.dir}" useexternalfile="true"> -+ <javadoc destdir="${javadoc.build.dir}" useexternalfile="false" source="${ivy.minimum.javaversion}"> - <fileset dir="${src.dir}" includes="**/*.java" /> - </javadoc> - </target> + </target> + + <target name="javadoc" unless="skip.javadoc"> +- <javadoc destdir="${javadoc.build.dir}" useexternalfile="true"> ++ <javadoc destdir="${javadoc.build.dir}" useexternalfile="false" source="${ivy.minimum.javaversion}"> + <fileset dir="${src.dir}" includes="**/*.java" /> + </javadoc> + </target> ++++++ apache-ivy-2.3.0-src.tar.gz -> apache-ivy-2.4.0-src.tar.gz ++++++ ++++ 1043547 lines of diff (skipped) ++++++ apache-ivy-global-settings.patch ++++++ >From 27cf17a1eea310b8d75efc7fc9d4d733fffcbdc1 Mon Sep 17 00:00:00 2001 From: Marian Koncek <mkon...@redhat.com> Date: Fri, 19 Oct 2018 15:25:30 +0200 Subject: [PATCH] Change global settings --- src/java/org/apache/ivy/ant/IvyAntSettings.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java index 660ebbe..85cf97f 100644 --- a/src/java/org/apache/ivy/ant/IvyAntSettings.java +++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java @@ -354,6 +354,10 @@ public class IvyAntSettings extends DataType { break; } } + if (!file.exists() && task.getProject().getProperty("ivy.mode") != null) { + file = new File("/etc/ivy/ivysettings.xml"); + task.log("searching settings file: trying " + file, Project.MSG_VERBOSE); + } if (!file.exists()) { file = null; if (Boolean.valueOf(getProject().getProperty("ivy.14.compatible")).booleanValue()) { -- 2.17.2 ++++++ ivy-2.3.0.pom -> ivy-2.4.0.pom ++++++ --- /work/SRC/openSUSE:Leap:15.2/apache-ivy/ivy-2.3.0.pom 2020-01-15 14:47:02.201279983 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.apache-ivy.new.26092/ivy-2.4.0.pom 2020-02-05 07:23:19.626592783 +0100 @@ -1,157 +1,193 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache</groupId> - <artifactId>apache</artifactId> - <version>7</version> - </parent> - <groupId>org.apache.ivy</groupId> - <artifactId>ivy</artifactId> - <version>2.3.0</version> - <name>Apache Ivy</name> - <url>http://ant.apache.org/ivy/</url> - <scm> - <connection>scm:svn:http://svn.apache.org/repos/asf/ant/ivy/core/trunk/</connection> - <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk</developerConnection> - <url>http://svn.apache.org/repos/asf/ant/ivy/core/trunk</url> - </scm> - <mailingLists> - <mailingList> - <name>Ant/Ivy Developers List</name> - <subscribe>dev-subscr...@ant.apache.org</subscribe> - <unsubscribe>dev-unsubscr...@ant.apache.org</unsubscribe> - <post>d...@ant.apache.org</post> - <archive>http://mail-archives.apache.org/mod_mbox/ant-dev</archive> - </mailingList> - <mailingList> - <name>Ivy Users List</name> - <subscribe>ivy-user-subscr...@ant.apache.org</subscribe> - <unsubscribe>ivy-user-unsubscr...@ant.apache.org</unsubscribe> - <post>ivy-u...@ant.apache.org</post> - <archive>http://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive> - </mailingList> - </mailingLists> - <issueManagement> - <system>jira</system> - <url>http://issues.apache.org/jira/browse/IVY</url> - </issueManagement> - <dependencies> - <dependency> - <groupId>org.apache.ant</groupId> - <artifactId>ant</artifactId> - <version>1.7.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.apache.ant</groupId> - <artifactId>ant-nodeps</artifactId> - <version>1.7.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.apache.ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.7.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>3.0</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>oro</groupId> - <artifactId>oro</artifactId> - <version>2.0.8</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-vfs</groupId> - <artifactId>commons-vfs</artifactId> - <version>1.0</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch</artifactId> - <version>0.1.31</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcpg-jdk14</artifactId> - <version>1.45</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk14</artifactId> - <version>1.45</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.6</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.ant</groupId> - <artifactId>ant-testutil</artifactId> - <version>1.7.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-launcher</artifactId> - <version>1.6.2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ant-contrib</groupId> - <artifactId>ant-contrib</artifactId> - <version>1.0b3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.6.2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xmlParserAPIs</artifactId> - <version>2.6.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>7</version> + </parent> + <groupId>org.apache.ivy</groupId> + <artifactId>ivy</artifactId> + <version>2.4.0</version> + <name>Apache Ivy</name> + <url>http://ant.apache.org/ivy/</url> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ant/ivy/core/trunk/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk</developerConnection> + <url>http://svn.apache.org/repos/asf/ant/ivy/core/trunk</url> + </scm> + <mailingLists> + <mailingList> + <name>Ant/Ivy Developers List</name> + <subscribe>dev-subscr...@ant.apache.org</subscribe> + <unsubscribe>dev-unsubscr...@ant.apache.org</unsubscribe> + <post>d...@ant.apache.org</post> + <archive>http://mail-archives.apache.org/mod_mbox/ant-dev</archive> + </mailingList> + <mailingList> + <name>Ivy Users List</name> + <subscribe>ivy-user-subscr...@ant.apache.org</subscribe> + <unsubscribe>ivy-user-unsubscr...@ant.apache.org</unsubscribe> + <post>ivy-u...@ant.apache.org</post> + <archive>http://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive> + </mailingList> + </mailingLists> + <issueManagement> + <system>jira</system> + <url>http://issues.apache.org/jira/browse/IVY</url> + </issueManagement> + <dependencies> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant</artifactId> + <version>1.7.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-nodeps</artifactId> + <version>1.7.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-trax</artifactId> + <version>1.7.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.0</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>oro</groupId> + <artifactId>oro</artifactId> + <version>2.0.8</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-vfs</groupId> + <artifactId>commons-vfs</artifactId> + <version>1.0</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch</artifactId> + <version>0.1.50</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch.agentproxy</artifactId> + <version>0.0.6</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch.agentproxy.connector-factory</artifactId> + <version>0.0.6</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch.agentproxy.jsch</artifactId> + <version>0.0.6</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk14</artifactId> + <version>1.45</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk14</artifactId> + <version>1.45</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.6</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-testutil</artifactId> + <version>1.7.0</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>ant</groupId> + <artifactId>ant-launcher</artifactId> + <version>1.6.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>1.0b3</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.6.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xmlParserAPIs</artifactId> + <version>2.6.2</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> ++++++ port-to-bc-1.52.patch ++++++ diff --git a/ivy.xml b/ivy.xml index d448897..7d8896a 100644 --- a/ivy.xml +++ b/ivy.xml @@ -50,8 +50,8 @@ <dependency org="com.jcraft" name="jsch.agentproxy" rev="0.0.6" conf="default,sftp->default"/> <dependency org="com.jcraft" name="jsch.agentproxy.connector-factory" rev="0.0.6" conf="default,sftp->default"/> <dependency org="com.jcraft" name="jsch.agentproxy.jsch" rev="0.0.6" conf="default,sftp->default"/> - <dependency org="org.bouncycastle" name="bcpg-jdk14" rev="1.45" conf="default"/> - <dependency org="org.bouncycastle" name="bcprov-jdk14" rev="1.45" conf="default"/> + <dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.52" conf="default"/> + <dependency org="org.bouncycastle" name="bcprov-jdk15on" rev="1.52" conf="default"/> <!-- Test dependencies --> <dependency org="junit" name="junit" rev="3.8.2" conf="test->default"/> diff --git a/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java b/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java index af7beae..bec8ae4 100644 --- a/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java +++ b/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java @@ -23,16 +23,18 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; import java.security.Security; -import java.security.SignatureException; import java.util.Iterator; import org.apache.ivy.plugins.signer.SignatureGenerator; import org.bouncycastle.bcpg.ArmoredOutputStream; import org.bouncycastle.bcpg.BCPGOutputStream; import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor; +import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator; +import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder; +import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder; +import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPPrivateKey; import org.bouncycastle.openpgp.PGPSecretKey; @@ -101,11 +103,13 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator { pgpSec = readSecretKey(keyIn); } - PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey(password.toCharArray(), - BouncyCastleProvider.PROVIDER_NAME); - PGPSignatureGenerator sGen = new PGPSignatureGenerator(pgpSec.getPublicKey() - .getAlgorithm(), PGPUtil.SHA1, BouncyCastleProvider.PROVIDER_NAME); - sGen.initSign(PGPSignature.BINARY_DOCUMENT, pgpPrivKey); + PBESecretKeyDecryptor decryptor = new BcPBESecretKeyDecryptorBuilder( + new BcPGPDigestCalculatorProvider()).build(password.toCharArray()); + PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey(decryptor); + PGPSignatureGenerator sGen = new PGPSignatureGenerator( + new BcPGPContentSignerBuilder(pgpSec.getPublicKey() + .getAlgorithm(), PGPUtil.SHA1)); + sGen.init(PGPSignature.BINARY_DOCUMENT, pgpPrivKey); in = new FileInputStream(src); out = new BCPGOutputStream(new ArmoredOutputStream(new FileOutputStream(dest))); @@ -116,22 +120,10 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator { } sGen.generate().encode(out); - } catch (SignatureException e) { - IOException ioexc = new IOException(); - ioexc.initCause(e); - throw ioexc; } catch (PGPException e) { IOException ioexc = new IOException(); ioexc.initCause(e); throw ioexc; - } catch (NoSuchAlgorithmException e) { - IOException ioexc = new IOException(); - ioexc.initCause(e); - throw ioexc; - } catch (NoSuchProviderException e) { - IOException ioexc = new IOException(); - ioexc.initCause(e); - throw ioexc; } finally { if (out != null) { try { @@ -156,7 +148,8 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator { private PGPSecretKey readSecretKey(InputStream in) throws IOException, PGPException { in = PGPUtil.getDecoderStream(in); - PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(in); + PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(in, + new BcKeyFingerprintCalculator()); PGPSecretKey key = null; for (Iterator it = pgpSec.getKeyRings(); key == null && it.hasNext();) {