diff --git a/0001-Update-bouncycastle-to-1.52.patch b/0001-Update-bouncycastle-to-1.52.patch deleted file mode 100644 index 0bdddab3c8d7211c0be80d39218b5c989e577cb7..0000000000000000000000000000000000000000 --- a/0001-Update-bouncycastle-to-1.52.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/ivy.xml b/ivy.xml -index d448897..7d8896a 100644 ---- a/ivy.xml -+++ b/ivy.xml -@@ -50,8 +50,8 @@ - - - -- -- -+ -+ - - - -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();) { diff --git a/apache-ivy-2.4.0-src.tar.gz b/apache-ivy-2.4.0-src.tar.gz deleted file mode 100644 index c4464feb9b2001022f7e5f4579ea3e260c8b8a90..0000000000000000000000000000000000000000 Binary files a/apache-ivy-2.4.0-src.tar.gz and /dev/null differ diff --git a/apache-ivy-2.5.3-src.tar.gz b/apache-ivy-2.5.3-src.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9181201fdb1fdb0f468451b5c8198f7ba8e4ce5c Binary files /dev/null and b/apache-ivy-2.5.3-src.tar.gz differ diff --git a/apache-ivy-global-settings.patch b/apache-ivy-global-settings.patch index 9d0cefb4dc431f30b7e7d10e6f4cefc51d7a062c..caca1c6e24899383fc0595ff2957e5d13d3bd5db 100644 --- a/apache-ivy-global-settings.patch +++ b/apache-ivy-global-settings.patch @@ -1,11 +1,11 @@ ---- apache-ivy-2.4.0/src/java/org/apache/ivy/ant/IvyAntSettings.java~ 2014-05-23 19:56:50.000000000 +0200 -+++ apache-ivy-2.4.0/src/java/org/apache/ivy/ant/IvyAntSettings.java 2015-04-01 12:37:37.537520590 +0200 -@@ -346,7 +346,7 @@ - File[] settingsLocations = new File[] { - new File(getProject().getBaseDir(), settingsFileName), - new File(getProject().getBaseDir(), "ivyconf.xml"), new File(settingsFileName), -- new File("ivyconf.xml")}; -+ new File("ivyconf.xml"), new File("/etc/ivy/ivysettings.xml")}; - for (int i = 0; i < settingsLocations.length; i++) { - file = settingsLocations[i]; - task.log("searching settings file: trying " + file, Project.MSG_VERBOSE); +--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java ++++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java +@@ -345,7 +345,7 @@ + File[] settingsLocations = new File[] { + new File(getProject().getBaseDir(), settingsFileName), + new File(getProject().getBaseDir(), "ivyconf.xml"), new File(settingsFileName), +- new File("ivyconf.xml")}; ++ new File("ivyconf.xml"), new File("/etc/ivy/ivysettings.xml")}; + for (File settingsFile : settingsLocations) { + task.log("searching settings file: trying " + settingsFile, Project.MSG_VERBOSE); + if (settingsFile.exists()) { diff --git a/apache-ivy.spec b/apache-ivy.spec index 1389b9e9efbc03b060eb1e93c637ae14380a30fd..1638f1611920af828f8c5b930e2b69ea58cbeb98 100644 --- a/apache-ivy.spec +++ b/apache-ivy.spec @@ -1,18 +1,46 @@ +%bcond_without httpclient +%bcond_without oro +%bcond_without vfs +%bcond_without sftp + Name: apache-ivy -Version: 2.4.0 -Release: 18 +Version: 2.5.3 +Release: 1 Summary: Java-based dependency manager -License: ASL 2.0 +License: Apache-2.0 URL: https://ant.apache.org/ivy/ Source0: http://archive.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz -Patch0: 0001-Update-bouncycastle-to-1.52.patch Patch1: apache-ivy-global-settings.patch BuildArch: noarch -BuildRequires: ant ant-contrib ant-testutil apache-commons-lang jakarta-commons-httpclient jsch -BuildRequires: jakarta-oro apache-commons-parent sonatype-oss-parent apache-parent ivy-local >= 4 -BuildRequires: jsch-agent-proxy-jsch jsch-agent-proxy-core jsch-agent-proxy-connector-factory -BuildRequires: apache-commons-vfs bouncycastle bouncycastle-pg +BuildRequires: gnupg2 +BuildRequires: ant +BuildRequires: ivy-local +BuildRequires: java-11-openjdk-devel +BuildRequires: mvn(org.apache.ant:ant) +BuildRequires: mvn(org.bouncycastle:bcpg-jdk15on) +BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) +Requires: java-11-openjdk javapackages-tools + +%if %{with httpclient} +BuildRequires: mvn(org.apache.httpcomponents:httpclient) +%endif + +%if %{with oro} +BuildRequires: mvn(oro:oro) +%endif + +%if %{with vfs} +BuildRequires: mvn(org.apache.commons:commons-vfs2) +%endif + +%if %{with sftp} +BuildRequires: mvn(com.jcraft:jsch) +BuildRequires: mvn(com.jcraft:jsch.agentproxy.connector-factory) +BuildRequires: mvn(com.jcraft:jsch.agentproxy.jsch) +%endif + +Provides: ivy = %{version}-%{release} Provides: %{name}-javadoc = %{version}-%{release} Obsoletes: %{name}-javadoc < %{version}-%{release} @@ -26,16 +54,58 @@ Apache Ivy is a popular dependency manager focusing on flexibility and simplicit %autosetup -n %{name}-%{version} -p1 sed -i 's:/etc/ivy/:%{_sysconfdir}/ivy/:' src/java/org/apache/ivy/ant/IvyAntSettings.java +%pom_remove_dep :jsch.agentproxy +%pom_remove_dep junit:junit +%pom_remove_dep org.hamcrest:hamcrest-core +%pom_remove_dep org.hamcrest:hamcrest-library +%pom_remove_dep org.apache.ant:ant-testutil +%pom_remove_dep org.apache.ant:ant-junit +%pom_remove_dep org.apache.ant:ant-junit4 +%pom_remove_dep ant-contrib:ant-contrib +%pom_remove_dep xmlunit:xmlunit + +%if %{without httpclient} +%pom_remove_dep :httpclient +rm src/java/org/apache/ivy/util/url/HttpClientHandler.java +%endif + +%if %{without oro} +%pom_remove_dep :oro +rm src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java +%endif + +%if %{without vfs} +%pom_remove_dep :commons-vfs2 +rm src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java +rm src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java +rm src/java/org/apache/ivy/plugins/repository/vfs/ivy_vfs.xml +rm src/java/org/apache/ivy/plugins/resolver/VfsResolver.java +%endif + +%if %{without sftp} +%pom_remove_dep :jsch +%pom_remove_dep :jsch.agentproxy +%pom_remove_dep :jsch.agentproxy.connector-factory +%pom_remove_dep :jsch.agentproxy.jsch +rm src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java +rm src/java/org/apache/ivy/plugins/repository/sftp/SFTPResource.java +rm src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java +rm src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java +rm src/java/org/apache/ivy/plugins/repository/ssh/Scp.java +rm src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java +rm src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java +rm src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java +rm src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java +rm src/java/org/apache/ivy/plugins/resolver/SFTPResolver.java +rm src/java/org/apache/ivy/plugins/resolver/SshResolver.java +%endif -%mvn_alias : jayasoft:ivy %mvn_file : %{name}/ivy ivy - -sed -i s/ant-trax/ant/ ivy.xml -sed -i /bouncycastle/s/jdk14/jdk16/ ivy.xml -sed -i "s/commons.vfs/&2/" src/java/org/apache/ivy/plugins/repository/vfs/* -sed -i /ivy:publish/s/local/xmvn/ build.xml +rm -rf asciidoc +%pom_xpath_set ivy:publish/@resolver xmvn build.xml %build +export JAVA_HOME=%{_jvmdir}/java-11-openjdk %ant -Divy.mode=local -Dtarget.ivy.bundle.version=%{version} -Dtarget.ivy.bundle.version.qualifier= -Dtarget.ivy.version=%{version} jar javadoc publish-local %install @@ -50,15 +120,22 @@ echo "apache-ivy/ivy" > %{buildroot}%{_sysconfdir}/ant.d/%{name} %{_sysconfdir}/ant.d/apache-ivy %{_datadir}/java/* %{_datadir}/ivy-xmls -%{_datadir}/javadoc/* %{_datadir}/maven-poms/* %{_datadir}/maven-metadata/* %files help %defattr(-,root,root) -%doc README NOTICE +%doc README.adoc NOTICE %changelog +* Fri May 23 2025 yaoxin <1024769339@qq.com> - 2.5.3-1 +- Update to 2.5.3: + * trying to set safe XML features causes SAXExceptions when + used with certain XML parsers (jira:IVY-1647[]) + * some unit tests failed on Java 8 (jira:IVY-1648[]) + * cached Ivy files were not valid in some scenarios + (jira:IVY-1649[], jira:IVY-1650[]) + * Thu Nov 10 2022 liyanan - 2.4.0-18 - Change source