#5 update to version 2.5.0
Merged 3 years ago by decathorpe. Opened 3 years ago by decathorpe.
Unknown source master  into  master

file modified
+2
@@ -5,3 +5,5 @@

  /apache-ivy-2.2.0-src.tar.gz

  /apache-ivy-2.3.0-src.tar.gz

  /apache-ivy-2.4.0-src.tar.gz

+ /apache-ivy-2.5.0-rc1-src.tar.gz

+ /apache-ivy-2.5.0-src.tar.gz

@@ -0,0 +1,11 @@

+ --- src/java/org/apache/ivy/ant/IvyAntSettings.java~	2014-05-23 19:56:50.000000000 +0200

+ +++ src/java/org/apache/ivy/ant/IvyAntSettings.java	2015-04-01 12:37:37.537520590 +0200

+ @@ -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()) {

@@ -0,0 +1,91 @@

+ diff --git a/build.xml b/build.xml

+ index f914179..78e1b33 100644

+ --- a/build.xml

+ +++ b/build.xml

+ @@ -437,53 +437,41 @@

+          </jar>

+      </target>

+  

+ -    <target name="init-jacoco" depends="jar" unless="skip.test">

+ -        <ivy:cachepath organisation="org.jacoco" module="org.jacoco.ant" revision="0.8.3"

+ -                       inline="true" conf="default" pathid="jacoco.classpath" log="download-only"/>

+ -        <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"

+ -                 classpathref="jacoco.classpath"/>

+ -    </target>

+ -

+ -    <target name="test-internal" depends="build-test,init-tests,prepare-osgi-tests,prepare-test-jar-repositories,init-jacoco" unless="skip.test">

+ +    <target name="test-internal" depends="build-test,init-tests,prepare-osgi-tests,prepare-test-jar-repositories" unless="skip.test">

+          <mkdir dir="${test.xml.dir}"/>

+  

+ -        <!-- multiple runs into the same logfile let the later report generation fail -->

+ -        <delete file="${jacoco.log}"/>

+ -        <jacoco:coverage xmlns:jacoco="antlib:org.jacoco.ant" destfile="${jacoco.log}"

+ -                         exclclassloader="sun.reflect.DelegatingClassLoader:javassist.Loader">

+ -            <junit

+ -                haltonfailure="off"

+ -                haltonerror="off"

+ -                errorproperty="test.failed"

+ -                failureproperty="test.failed"

+ -                showoutput="no"

+ -                printsummary="yes"

+ -                includeantruntime="no"

+ -                dir="${basedir}"

+ -                tempdir="${build.dir}"

+ -                fork="true">

+ -                <classpath>

+ -                    <path refid="test.classpath"/>

+ -                </classpath>

+ -

+ -                <!-- pass the proxy properties to the forked junit process to use correct proxy -->

+ -                <syspropertyset>

+ -                    <propertyref prefix="http"/>

+ -                </syspropertyset>

+ -                <!-- We select specific HTTPS protocols, based on the Java version we are running

+ -                    on -->

+ -                <sysproperty key="https.protocols" value="${java.sysprop.https.protocols}"/>

+ -

+ -                <!-- Added this to test IVY-65 -->

+ -                <jvmarg value="-Duser.region=TR"/>

+ -                <jvmarg value="-Duser.language=tr"/>

+ -

+ -                <formatter type="xml"/>

+ -                <batchtest todir="${test.xml.dir}">

+ -                    <fileset refid="test.fileset"/>

+ -                </batchtest>

+ -            </junit>

+ -        </jacoco:coverage>

+ +        <junit

+ +            haltonfailure="off"

+ +            haltonerror="off"

+ +            errorproperty="test.failed"

+ +            failureproperty="test.failed"

+ +            showoutput="no"

+ +            printsummary="yes"

+ +            includeantruntime="no"

+ +            dir="${basedir}"

+ +            tempdir="${build.dir}"

+ +            fork="true">

+ +            <classpath>

+ +                <path refid="test.classpath"/>

+ +            </classpath>

+ +

+ +            <!-- pass the proxy properties to the forked junit process to use correct proxy -->

+ +            <syspropertyset>

+ +                <propertyref prefix="http"/>

+ +            </syspropertyset>

+ +            <!-- We select specific HTTPS protocols, based on the Java version we are running

+ +                on -->

+ +            <sysproperty key="https.protocols" value="${java.sysprop.https.protocols}"/>

+ +

+ +            <!-- Added this to test IVY-65 -->

+ +            <jvmarg value="-Duser.region=TR"/>

+ +            <jvmarg value="-Duser.language=tr"/>

+ +

+ +            <formatter type="xml"/>

+ +            <batchtest todir="${test.xml.dir}">

+ +                <fileset refid="test.fileset"/>

+ +            </batchtest>

+ +        </junit>

+      </target>

+  

+      <target name="test" depends="test-internal" description="Run the test">

@@ -1,27 +0,0 @@

- From 27cf17a1eea310b8d75efc7fc9d4d733fffcbdc1 Mon Sep 17 00:00:00 2001

- From: Marian Koncek <mkoncek@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

- 

file modified
+59 -70
@@ -3,47 +3,47 @@

  %bcond_with vfs

  

  Name:           apache-ivy

- Version:        2.4.0

- Release:        23%{?dist}

+ Version:        2.5.0

+ Release:        1%{?dist}

  Summary:        Java-based dependency manager

- 

  License:        ASL 2.0

- URL:            http://ant.apache.org/ivy

- Source0:        http://www.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz

+ 

+ URL:            https://ant.apache.org/ivy

+ Source0:        https://www.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz

+ 

  BuildArch:      noarch

  

  # Non-upstreamable.  Add /etc/ivy/ivysettings.xml at the end list of

  # settings files Ivy tries to load.  This file will be used only as

  # last resort, when no other setting files exist.

- Patch0:         %{name}-global-settings.patch

- # sent upstream: IVY-1521

- Patch1:         port-to-bc-1.52.patch

- Patch2:         bumpTojdk6.patch

+ Patch0:         00-global-settings.patch

  

- Provides:       ivy = %{version}-%{release}

+ # Disable generating a code coverage report during build.

+ Patch1:         01-disable-jacoco-coverage-report.patch

  

  BuildRequires:  ant

- BuildRequires:  ant-contrib

- BuildRequires:  ant-junit

- BuildRequires:  ant-testutil

+ BuildRequires:  httpcomponents-client

+ BuildRequires:  ivy-local >= 4

+ BuildRequires:  jakarta-oro

+ 

  %if %{with vfs}

  BuildRequires:  apache-commons-vfs

  %endif

- BuildRequires:  apache-commons-lang

+ 

  %if %{with bouncycastle}

  BuildRequires:  bouncycastle

  BuildRequires:  bouncycastle-pg

  %endif

- BuildRequires:  jakarta-commons-httpclient

- BuildRequires:  jsch

- BuildRequires:  jakarta-oro

- BuildRequires:  ivy-local >= 4

+ 

  %if %{with ssh}

+ BuildRequires:  jsch

  BuildRequires:  jsch-agent-proxy-connector-factory

  BuildRequires:  jsch-agent-proxy-core

  BuildRequires:  jsch-agent-proxy-jsch

  %endif

  

+ Provides:       ivy = %{version}-%{release}

+ 

  %description

  Apache Ivy is a tool for managing (recording, tracking, resolving and

  reporting) project dependencies.  It is designed as process agnostic and is
@@ -52,17 +52,20 @@

  of powerful Ant tasks ranging from dependency resolution to dependency

  reporting and publication.

  

+ 

  %package javadoc

  Summary:        API Documentation for ivy

  

  %description javadoc

  JavaDoc documentation for %{name}

  

+ 

  %prep

  %setup -q

- %patch0 -p1

+ %patch0

  %patch1 -p1

- %patch2 -p1

+ 

+ find -name '*.jar' -delete

  

  # Don't hardcode sysconfdir path

  sed -i 's:/etc/ivy/:%{_sysconfdir}/ivy/:' src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -81,80 +84,65 @@

  rm src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java

  %endif

  

- %mvn_alias : jayasoft:ivy

- %mvn_file : %{name}/ivy ivy

- 

- # Fix messed-up encodings

- for F in README LICENSE NOTICE

- do

-         sed 's/\r//' $F |iconv -f iso8859-1 -t utf8 >$F.utf8

-         touch -r $F $F.utf8

-         mv $F.utf8 $F

- done

- # ant-trax has been obsoleted, use main ant package

- sed -i s/ant-trax/ant/ ivy.xml

- 

- # Fedora bouncycastle packages provide -jdk16 artifacts only

- sed -i /bouncycastle/s/jdk14/jdk16/ ivy.xml

- 

- # 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

+ %if %{without vfs}

+ # Remove dependency on commons-vfs

  sed -i /commons-vfs/d ivy.xml

  rm -rf src/java/org/apache/ivy/plugins/repository/vfs

  rm -rf src/java/org/apache/ivy/plugins/resolver/VfsResolver.java

  %endif

  

+ # Remove test dependencies

+ %pom_remove_dep :junit

+ %pom_remove_dep :hamcrest-core

+ %pom_remove_dep :hamcrest-library

+ %pom_remove_dep :ant-testutil

+ %pom_remove_dep :ant-launcher

+ %pom_remove_dep :ant-junit

+ %pom_remove_dep :ant-junit4

+ %pom_remove_dep :ant-contrib

+ %pom_remove_dep :xmlunit 

+ 

+ %mvn_alias : jayasoft:ivy

+ %mvn_file : %{name}/ivy ivy

+ 

  # Remove prebuilt documentation

- rm -rf doc build/doc

+ rm -rf asciidoc

  

  # Publish artifacts through XMvn

  sed -i /ivy:publish/s/local/xmvn/ build.xml

  

- # Disable tests which fail due to networking being disabled during build

- sed -i 's/\(\s*public void\) \(testFixedMdMultipleExtends().*\)/\1 _disabled_\2/' test/java/org/apache/ivy/core/report/ResolveReportTest.java

- rm test/java/org/apache/ivy/plugins/resolver/BintrayResolverTest.java

- rm test/java/org/apache/ivy/plugins/resolver/MirroredURLResolverTest.java

- rm -rf test/java/org/apache/ivy/osgi/updatesite

- rm test/java/org/apache/ivy/core/settings/OnlineXmlSettingsParserTest.java

- rm test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java

- rm test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java

- rm test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java

- rm test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java

- 

- %if %{without vfs}

- rm test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java

- rm test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java

- rm test/java/org/apache/ivy/plugins/repository/vfs/VfsTestHelper.java

- rm test/java/org/apache/ivy/plugins/repository/vfs/VfsURI.java

- rm test/java/org/apache/ivy/plugins/resolver/VfsResolverTest.java

- %endif

- 

- # XXX Disable test which fails due to non-existing files

- rm test/java/org/apache/ivy/ant/IvyBuildListTest.java

- 

- # XXX Disable test which fails due to wrong ordering in the .xml file

- sed -i 's/\(\s*public void\) \(testExtraInfosFromMaven().*\)/\1 _disabled_\2/' test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java

  

  %build

- %ant -Divy.mode=local -Dtarget.ivy.bundle.version=%{version} -Dtarget.ivy.bundle.version.qualifier= -Dtarget.ivy.version=%{version} jar javadoc publish-local test

+ %ant \

+     -Divy.mode=local \

+     -Dtarget.ivy.bundle.version=%{version} \

+     -Dtarget.ivy.bundle.version.qualifier= \

+     -Dtarget.ivy.version=%{version} \

+     jar javadoc publish-local

+ 

  

  %install

- %mvn_install -J build/doc/reports/api

+ %mvn_install -J build/reports/api

  

  mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d

  echo "apache-ivy/ivy" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name}

  

+ 

  %files -f .mfiles

- %{_sysconfdir}/ant.d/%{name}

- %doc README

  %license LICENSE NOTICE

+ %doc README.adoc

  

- %files javadoc

+ %{_sysconfdir}/ant.d/%{name}

+ 

+ %files javadoc -f .mfiles-javadoc

  %license LICENSE NOTICE

  

+ 

  %changelog

+ * Thu Aug 13 2020 Fabio Valentini <decathorpe@gmail.com> - 2.5.0-1

+ - Update to version 2.5.0.

+ - Disable running the very very broken test suite.

+ 

  * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-23

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  
@@ -304,3 +292,4 @@

  

  * Mon Nov 09 2009 Lubomir Rintel <lkundrak@v3.sk> - 2.1.0-1

  - Initial Fedora packaging

+ 

file removed
-12
@@ -1,12 +0,0 @@

- --- apache-ivy-2.4.0/build.properties

- +++ apache-ivy-2.4.0/build.properties

- @@ -42,7 +42,7 @@

-  checkstyle.src.dir=${basedir}/src/etc/checkstyle

-  rat.report.dir=${reports.dir}/rat

-  

- -ivy.minimum.javaversion=1.5

- +ivy.minimum.javaversion=1.6

-  debug.mode=on

-  ivy.install.version=1.4.1

-  

- 

file removed
-93
@@ -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 @@

-  		<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();) {

file modified
+1 -1
@@ -1,1 +1,1 @@

- bd16ef9a402859522606ed9edd468f1f  apache-ivy-2.4.0-src.tar.gz

+ SHA512 (apache-ivy-2.5.0-src.tar.gz) = 59d9458345e3a51e8f527258ba26ebe2cf5cf257401c52fb5f75aced0da5f7bf36f8aa0f202bbc0cf029d1d49bd6634f7cb8b65ccc828eb55ff7084430879268

  • update to latest version (2.4.0 → 2.5.0)
  • disable running test suite (it's completely :poop:)

Basically, this PR merges the current state of the modular branches (2.5.0~RC1), but bumps to 2.5.0 final, and keeps the conditionals for enabling support for additional features (ssh, vfs, bouncycastle).

Test builds of dependent packages in COPR:
https://copr.fedorainfracloud.org/coprs/decathorpe/ivy-2.5.0-pr/monitor/

@mbooth since this affects some of your packages that get built with ivy-local, could you check if they are alright (freemarker, icu4j, lucene)?

Never mind, the built binary RPMs are almost bit-for-bit identical to the latest ones from rawhide.

Checking with diffoscope, the only differences are different build timestamps and unreproducible file order in zip files.

Pull-Request has been merged by decathorpe

3 years ago