From 74f0b341a6e1141efa7a9636abf3a74a39c1e0a0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 24 2017 08:47:34 +0000 Subject: import rh-maven35-apache-ivy-2.4.0-8.2.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dabe173 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/apache-ivy-2.4.0-src.tar.gz diff --git a/.rh-maven35-apache-ivy.metadata b/.rh-maven35-apache-ivy.metadata new file mode 100644 index 0000000..42f1820 --- /dev/null +++ b/.rh-maven35-apache-ivy.metadata @@ -0,0 +1 @@ +1efa73e73b5fc14ef003ff2fcb182f039db33ce2 SOURCES/apache-ivy-2.4.0-src.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/apache-ivy-global-settings.patch b/SOURCES/apache-ivy-global-settings.patch new file mode 100644 index 0000000..29cf61e --- /dev/null +++ b/SOURCES/apache-ivy-global-settings.patch @@ -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 +@@ -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); diff --git a/SOURCES/port-to-bc-1.52.patch b/SOURCES/port-to-bc-1.52.patch new file mode 100644 index 0000000..0bdddab --- /dev/null +++ b/SOURCES/port-to-bc-1.52.patch @@ -0,0 +1,93 @@ +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/SPECS/apache-ivy.spec b/SPECS/apache-ivy.spec new file mode 100644 index 0000000..560d13d --- /dev/null +++ b/SPECS/apache-ivy.spec @@ -0,0 +1,234 @@ +%{?scl:%scl_package apache-ivy} +%{!?scl:%global pkg_name %{name}} + +%bcond_without ssh +%bcond_without bouncycastle + +Name: %{?scl_prefix}apache-ivy +Version: 2.4.0 +Release: 8.2%{?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}/%{pkg_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: %{pkg_name}-global-settings.patch +# sent upstream: IVY-1521 +Patch1: port-to-bc-1.52.patch + +Provides: %{?scl_prefix}ivy = %{version}-%{release} + +BuildRequires: %{?scl_prefix}ant +BuildRequires: %{?scl_prefix}ant-contrib +BuildRequires: %{?scl_prefix}ant-testutil +BuildRequires: %{?scl_prefix}apache-commons-vfs +BuildRequires: %{?scl_prefix}apache-commons-lang +%if %{with bouncycastle} +BuildRequires: bouncycastle +BuildRequires: bouncycastle-pg +%endif +BuildRequires: %{?scl_prefix}jakarta-commons-httpclient +BuildRequires: %{?scl_prefix}jsch +BuildRequires: %{?scl_prefix}jakarta-oro +BuildRequires: %{?scl_prefix}apache-commons-parent +BuildRequires: %{?scl_prefix}sonatype-oss-parent +BuildRequires: %{?scl_prefix}apache-parent +BuildRequires: %{?scl_prefix}ivy-local >= 4 +%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 +reporting) project dependencies. It is designed as process agnostic and is +not tied to any methodology or structure. while available as a standalone +tool, Apache Ivy works particularly well with Apache Ant providing a number +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 %{pkg_name} + +%prep +%setup -n %{pkg_name}-%{version} -q +%patch0 +%patch1 -p1 + +# Don't hardcode sysconfdir path +sed -i 's:/etc/ivy/:%{_sysconfdir}/ivy/:' src/java/org/apache/ivy/ant/IvyAntSettings.java + +%if %{without ssh} +%pom_remove_dep :jsch +%pom_remove_dep :jsch.agentproxy +%pom_remove_dep :jsch.agentproxy.connector-factory +%pom_remove_dep :jsch.agentproxy.jsch +rm -r src/java/org/apache/ivy/plugins/repository/{ssh,sftp} +rm src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java +%endif + +%if %{without bouncycastle} +%pom_remove_dep org.bouncycastle +rm src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java +%endif + +%mvn_alias : jayasoft:ivy +%mvn_file : %{pkg_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 +sed -i "s/commons.vfs/&2/" src/java/org/apache/ivy/plugins/repository/vfs/* + +# Remove prebuilt documentation +rm -rf doc build/doc + +# Publish artifacts through XMvn +sed -i /ivy:publish/s/local/xmvn/ build.xml + +%build +%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 + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d +echo "apache-ivy/ivy" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{pkg_name} + +%files -f .mfiles +%{_sysconfdir}/ant.d/%{pkg_name} +%doc README +%license LICENSE NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Thu Jun 22 2017 Michael Simacek - 2.4.0-8.2 +- Mass rebuild 2017-06-22 + +* Wed Jun 21 2017 Java Maintainers - 2.4.0-8.1 +- Automated package import and SCL-ization + +* Wed Mar 1 2017 Mikolaj Izdebski - 2.4.0-8 +- Don't hardcode sysconfdir path + +* Tue Feb 14 2017 Michael Simacek - 2.4.0-7 +- Add conditional for bouncycastle + +* Mon Feb 06 2017 Michael Simacek - 2.4.0-6 +- Add conditional for ssh + +* Wed Feb 03 2016 Fedora Release Engineering - 2.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2.4.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon May 04 2015 Michal Srb - 2.4.0-3 +- Update comment + +* Mon May 04 2015 Michal Srb - 2.4.0-2 +- Port to bouncycastle 1.52 + +* Wed Apr 1 2015 Mikolaj Izdebski - 2.4.0-1 +- Update to upstream version 2.4.0 + +* Fri Sep 19 2014 Mikolaj Izdebski - 2.3.0-17 +- Add compat symlink for ivy.jar + +* Mon Aug 11 2014 Mikolaj Izdebski - 2.3.0-16 +- Add alias for jayasoft:ivy + +* Thu Jun 26 2014 Michal Srb - 2.3.0-15 +- Drop workaround for broken apache-ivy + +* Thu Jun 26 2014 Michal Srb - 2.3.0-14 +- Fix /etc/ant.d/apache-ivy (Resolves: rhbz#1113275) + +* Mon Jun 23 2014 Michal Srb - 2.3.0-13 +- Add BR on missing parent POMs + +* Mon Jun 09 2014 Michal Srb - 2.3.0-12 +- Add missing BR: apache-commons-lang + +* Sat Jun 07 2014 Fedora Release Engineering - 2.3.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 29 2014 Mikolaj Izdebski - 2.3.0-10 +- Use features of XMvn 2.0.0 + +* Thu Jan 16 2014 Mikolaj Izdebski - 2.3.0-9 +- BuildRequire ivy-local >= 3.5.0-2 + +* Thu Jan 16 2014 Mikolaj Izdebski - 2.3.0-8 +- Build with ivy-local +- Add patch for global settings + +* Thu Jan 02 2014 Michal Srb - 2.3.0-7 +- Remove prebuilt documentation in %%prep +- Install NOTICE file with javadoc subpackage + +* Thu Jan 02 2014 Michal Srb - 2.3.0-6 +- Restore PGP signing ability +- Remove unneeded R + +* Thu Dec 12 2013 Mikolaj Izdebski - 2.3.0-5 +- Enable VFS resolver + +* Wed Dec 4 2013 Mikolaj Izdebski - 2.3.0-4 +- Install POM files, resolves: rhbz#1032258 +- Remove explicit requires; auto-requires are in effect now + +* Fri Nov 1 2013 Mikolaj Izdebski - 2.3.0-3 +- Add Maven depmap + +* Sat Aug 03 2013 Fedora Release Engineering - 2.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Mar 1 2013 Alexander Kurtakov 2.3.0-1 +- Update to latest upstream. + +* Wed Feb 13 2013 Fedora Release Engineering - 2.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jul 31 2012 Alexander Kurtakov 2.2.0-5 +- Fix osgi metadata. + +* Wed Jul 18 2012 Fedora Release Engineering - 2.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Jul 6 2011 Alexander Kurtakov 2.2.0-2 +- Fix ant integration. + +* Fri Feb 25 2011 Alexander Kurtakov 2.2.0-1 +- Update to 2.2.0. + +* Mon Feb 07 2011 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Nov 09 2009 Lubomir Rintel - 2.1.0-1 +- Initial Fedora packaging