Sync from SUSE:ALP:Source:Standard:1.0 apache-ivy revision bfff57b8f203788cd74fed97de31de7b

This commit is contained in:
Adrian Schröter 2023-12-18 16:57:25 +01:00
commit ae1416a313
9 changed files with 967 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
apache-ivy-2.5.2-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java
+++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -345,7 +345,7 @@ public class IvyAntSettings extends DataType {
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()) {

21
apache-ivy-pack200.patch Normal file
View File

@ -0,0 +1,21 @@
--- apache-ivy-2.5.2/build.xml 2023-10-30 16:09:23.892302634 +0100
+++ apache-ivy-2.5.2/build.xml 2023-10-30 16:12:01.143389848 +0100
@@ -185,6 +185,7 @@
<javac srcdir="${src.dir}"
destdir="${core.classes.build.dir}"
sourcepath=""
+ classpathref="lib.classpath"
source="${ivy.minimum.javaversion}"
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
--- apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java 2023-10-30 16:09:23.928969555 +0100
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java 2023-10-30 16:13:35.547375897 +0100
@@ -46,7 +46,7 @@
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipInputStream;
-import static java.util.jar.Pack200.newUnpacker;
+import static io.pack200.Pack200.newUnpacker;
/**
* Utility class used to deal with file related operations, like copy, full reading, symlink, ...

View File

@ -0,0 +1,192 @@
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java 2023-09-19 08:19:56.002999512 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java 2023-09-19 09:00:48.163799846 +0200
@@ -197,7 +197,7 @@
throw new RuntimeException("Unsupported file path : " + artifactFile, e);
}
- res.add(new DefaultArtifact(md.getModuleRevisionId(), new Date(), name, type, ext,
+ res.add(new DefaultArtifact(md.getModuleRevisionId(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), name, type, ext,
url, null));
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyDeliver.java 2023-09-19 08:19:56.002999512 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyDeliver.java 2023-09-19 09:01:57.027624096 +0200
@@ -374,7 +374,7 @@
if (revision == null) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyPublish.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyPublish.java 2023-09-19 09:02:18.827779503 +0200
@@ -273,7 +273,7 @@
if ("working".equals(revision)) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyTask.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyTask.java 2023-09-19 09:01:36.900813938 +0200
@@ -177,7 +177,7 @@
return def;
}
if ("now".equals(date.toLowerCase(Locale.US))) {
- return new Date();
+ return System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
try {
return DateUtil.parse(date);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java 2023-09-19 08:20:15.856475360 +0200
@@ -1472,7 +1472,7 @@
}
private Artifact getDefaultMetadataArtifact(ModuleRevisionId mrid) {
- return new DefaultArtifact(mrid, new Date(), "metadata", "metadata", "ivy", true);
+ return new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), "metadata", "metadata", "ivy", true);
}
// not used any more, but may be useful for finer grained locking when downloading artifacts
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/deliver/DeliverOptions.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/deliver/DeliverOptions.java 2023-09-19 09:02:47.901319704 +0200
@@ -61,7 +61,7 @@
* @return a DeliverOptions instance ready to be used or customized
*/
public static DeliverOptions newInstance(IvySettings settings) {
- return new DeliverOptions(null, new Date(), new DefaultPublishingDRResolver(),
+ return new DeliverOptions(null, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), new DefaultPublishingDRResolver(),
settings.doValidate(), true, null);
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/install/InstallEngine.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/install/InstallEngine.java 2023-09-19 09:04:45.372153072 +0200
@@ -86,7 +86,7 @@
DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
"apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
- new Date());
+ System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String resolveId = ResolveOptions.getDefaultResolveId(md);
md.addConfiguration(new Configuration("default"));
md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java 2023-09-19 08:20:27.823227936 +0200
@@ -100,7 +100,7 @@
throw new NullPointerException("null arid not allowed");
}
if (publicationDate == null) {
- publicationDate = new Date();
+ publicationDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
this.publicationDate = publicationDate;
this.arid = arid;
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java 2023-09-19 08:21:12.330214087 +0200
@@ -272,7 +272,7 @@
this.resolvedRevId = id;
this.status = status;
this.publicationDate = pubDate;
- this.resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ this.resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
this.isDefault = isDefault;
this.parser = XmlModuleDescriptorParser.getInstance();
}
@@ -308,7 +308,7 @@
public void setPublicationDate(Date publicationDate) {
this.publicationDate = publicationDate;
if (resolvedPublicationDate == null) {
- resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
}
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/publish/PublishEngine.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/publish/PublishEngine.java 2023-09-19 09:03:21.054888232 +0200
@@ -102,7 +102,7 @@
ModuleDescriptor md = null;
if (options.getSrcIvyPattern() != null) {
File ivyFile = settings.resolveFile(IvyPatternHelper.substitute(
- options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, new Date())));
+ options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())));
if (!ivyFile.exists()) {
throw new IllegalArgumentException("ivy file to publish not found for " + mrid
+ ": call deliver before (" + ivyFile + ")");
@@ -132,7 +132,7 @@
: options.getStatus())
.setRevision(options.getPubrevision())
.setBranch(options.getPubBranch())
- .setPubdate(options.getPubdate() == null ? new Date()
+ .setPubdate(options.getPubdate() == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())
: options.getPubdate())
.setMerge(options.isMerge())
.setMergedDescriptor(md)
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/report/ResolveReport.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/report/ResolveReport.java 2023-09-19 09:04:29.478706979 +0200
@@ -360,7 +360,7 @@
public ModuleDescriptor toFixedModuleDescriptor(IvySettings settings, List<ModuleId> midToKeep) {
DefaultModuleDescriptor fixedmd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
- md.getStatus(), new Date());
+ md.getStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
// copy namespaces
for (Map.Entry<String, String> ns : md.getExtraAttributesNamespaces().entrySet()) {
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/resolve/ResolveEngine.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/resolve/ResolveEngine.java 2023-09-19 09:04:13.531927183 +0200
@@ -572,7 +572,7 @@
try {
options.setConfs(confs);
- Date reportDate = new Date();
+ Date reportDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
ResolveData data = context.getResolveData();
if (data == null) {
data = new ResolveData(this, options);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java 2023-09-19 08:19:56.012999584 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java 2023-09-19 09:06:16.799468326 +0200
@@ -93,7 +93,7 @@
md.addExtraAttributeNamespace("o", Ivy.getIvyHomeURL() + "osgi");
ModuleRevisionId mrid = asMrid(BundleInfo.BUNDLE_TYPE, bundle.getSymbolicName(),
bundle.getVersion());
- md.setResolvedPublicationDate(new Date());
+ md.setResolvedPublicationDate(System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
md.setModuleRevisionId(mrid);
md.addConfiguration(CONF_DEFAULT);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java 2023-09-19 08:19:56.012999584 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java 2023-09-19 09:06:27.589544872 +0200
@@ -201,7 +201,7 @@
Collections.singletonMap(CAPABILITY_EXTRA_ATTR, md.getModuleRevisionId().toString()));
DefaultModuleDescriptor capabilityMd = new DefaultModuleDescriptor(capabilityRev,
- getSettings().getStatusManager().getDefaultStatus(), new Date());
+ getSettings().getStatusManager().getDefaultStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String useConf = BundleInfoAdapter.CONF_USE_PREFIX + dd.getDependencyRevisionId().getName();
--- apache-ivy-2.5.2/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java 2023-09-19 08:19:56.016332941 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java 2023-09-19 09:05:45.949249470 +0200
@@ -249,7 +249,7 @@
DependencyResolver resolver = parserSettings.getResolver(mrid);
if (resolver != null) {
- DefaultArtifact artifact = new DefaultArtifact(mrid, new Date(), artifactId, "jar",
+ DefaultArtifact artifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, "jar",
"jar");
ArtifactOrigin artifactOrigin = resolver.locate(artifact);
@@ -268,7 +268,7 @@
ext = packaging;
}
- mainArtifact = new DefaultArtifact(mrid, new Date(), artifactId, packaging, ext);
+ mainArtifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, packaging, ext);
ivyModuleDescriptor.addArtifact("master", mainArtifact);
}

178
apache-ivy.changes Normal file
View File

@ -0,0 +1,178 @@
-------------------------------------------------------------------
Mon Oct 30 15:24:39 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* apache-ivy-pack200.patch
+ conditionally apply to allow building against standalone
pack200 implementation
-------------------------------------------------------------------
Tue Sep 19 11:31:58 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* apache-ivy-publication-date.patch
+ Use SOURCE_DATE_EPOCH for publication date in ivy artifacts
-------------------------------------------------------------------
Mon Aug 21 23:30:17 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 2.5.2 (bsc#1214422)
* Fixes:
+ ivy:retrieve could fail because of a 'NullPointerException'
(jira:IVY-1641[])
+ reading POMs may loose dependencies when multiple Maven
dependencies only differ in 'classifier' (jira:IVY-1642[])
+ CVE-2022-46751: Apache Ivy Is Vulnerable to XML External
Entity Injections
-------------------------------------------------------------------
Mon Nov 7 08:10:54 UTC 2022 - David Anes <david.anes@suse.com>
- Upgrade to version 2.5.1 (bsc#1205142, bsc#1205138)
* Breaking:
+ Removed old fr\jayasoft\ivy\ant\antlib.xml AntLib definition
file.
* Fixes:
+ CVE-2022-37865 allow create/overwrite any file on the system.
(see https://ant.apache.org/ivy/security.html)
+ CVE-2022-37866 Path traversal in patterns.
(see https://ant.apache.org/ivy/security.html)
+ ResolveEngine resets dictator resolver to null in the global
configuration.
+ ConcurrentModificationException in
MessageLoggerHelper.sumupProblems.
+ useOrigin="true" fails with file-based ibiblio.
+ ivy:retrieve Ant task didnt create an empty fileset when no
files were retrieved to a non-empty directory.
+ ivy:retrieve Ant task relied on the default HTTP header
"Accept" which caused problems with servers that interpret it
strictly (e.g. AWS CodeArtifact).
* Improvements:
+ Ivy command now accepts a URL for the -settings option.
-------------------------------------------------------------------
Sat Mar 19 13:22:59 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 2.5.0
- Force building with JDK < 14, since it imports statically a class
removed in JDK14
- Change dependencies for the httpclient to httpcomponents-client
instead of apache-commons-httpclient
- Modified patch:
* apache-ivy-global-settings.patch
+ implement the same functionality with a bit of less code
- Removed patches:
* apache-ivy-2.4.0-jdk9.patch
* port-to-bc-1.52.patch
+ not needed with this version
-------------------------------------------------------------------
Tue Dec 10 22:39:53 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Specify bundle.version in order to avoid unexpanded macro
-------------------------------------------------------------------
Tue Sep 24 16:08:31 UTC 2019 - Fridrich Strba <fstrba@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 <fstrba@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 <fstrba@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 <fstrba@suse.com>
- Add apache-ivy/ivy.jar symlink
-------------------------------------------------------------------
Mon Nov 26 10:25:21 UTC 2018 - Fridrich Strba <fstrba@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 - fstrba@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
-------------------------------------------------------------------
Thu Sep 7 17:10:15 UTC 2017 - fstrba@suse.com
- Added patch:
* apache-ivy-2.3.0-jdk9.patch
+ Use source and target version 1.6 to enable build with jdk9
-------------------------------------------------------------------
Sun May 21 08:01:08 UTC 2017 - tchvatal@suse.com
- Reduce deps a bit
-------------------------------------------------------------------
Fri May 19 10:07:03 UTC 2017 - pcervinka@suse.com
- New build dependency: javapackages-local
-------------------------------------------------------------------
Wed Mar 18 09:46:01 UTC 2015 - tchvatal@suse.com
- Fix build with new javapackages-tools
-------------------------------------------------------------------
Tue Jul 8 11:01:30 UTC 2014 - tchvatal@suse.com
- Do not depend on ant-nodeps.
-------------------------------------------------------------------
Wed Nov 6 10:58:10 UTC 2013 - mvyskocil@suse.com
- Remove jakarta-commons-httpclient3, we do no longer provide it
- Add ant.d config snippet for ivy
- call add_maven_depmap
-------------------------------------------------------------------
Mon Sep 9 11:04:12 UTC 2013 - tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
-------------------------------------------------------------------
Fri Jan 25 15:03:33 UTC 2013 - archie@dellroad.org
- Upgrade to release 2.3.0
* improved Ant support with some new Ant tasks and enhancements to existing tasks
* improved Maven2 compatibility
* some new resolvers
* numerous bug fixes as documented in Jira and in the release notes
-------------------------------------------------------------------
Wed Jan 2 17:08:16 UTC 2013 - archie@dellroad.org
- Define ${target.ivy.version} during build
- Include an ivy(1) command line script and man page
-------------------------------------------------------------------
Mon Jan 16 14:55:55 UTC 2012 - mvyskocil@suse.cz
- Initial SUSE packaging of apache-ivy 2.2.0
(without signing support)

200
apache-ivy.spec Normal file
View File

@ -0,0 +1,200 @@
#
# spec file for package apache-ivy
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without httpclient
%bcond_without oro
%bcond_without sftp
%bcond_without vfs
%bcond_with pack200
Name: apache-ivy
Version: 2.5.2
Release: 0
Summary: Java-based dependency manager
License: Apache-2.0
Group: Development/Tools/Building
URL: https://ant.apache.org/ivy/
Source0: https://archive.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz
Source1: ivy.1
Source2: https://repo1.maven.org/maven2/org/apache/ivy/ivy/%{version}/ivy-%{version}.pom
Patch0: apache-ivy-global-settings.patch
Patch1: apache-ivy-publication-date.patch
Patch2: apache-ivy-pack200.patch
BuildRequires: ant
BuildRequires: bouncycastle-pg
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
BuildRequires: jsch
BuildRequires: oro
Provides: ivy = %{version}-%{release}
Obsoletes: ivy < %{version}-%{release}
BuildArch: noarch
%if %{with pack200}
BuildRequires: pack200
%else
BuildConflicts: java-devel >= 14
%endif
%if %{with vfs}
BuildRequires: apache-commons-vfs2
%endif
%if %{with sftp}
BuildRequires: jsch-agent-proxy-connector-factory
BuildRequires: jsch-agent-proxy-core
BuildRequires: jsch-agent-proxy-jsch
%endif
%if %{with httpclient}
BuildRequires: httpcomponents-client
%endif
%if %{with oro}
BuildRequires: oro
%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
Group: Documentation/HTML
%description javadoc
JavaDoc documentation for %{name}
%prep
%setup -q
%patch0 -p1
%patch1 -p1
cp %{SOURCE2} pom.xml
%pom_remove_dep :jsch.agentproxy
%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.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
%if %{with pack200}
%pom_add_dep io.pack200:pack200:14:provided
%patch2 -p1
%endif
%build
# Craft class path
mkdir -p lib
build-jar-repository -s lib ant ant/ant-nodeps jsch bcprov bcpg
export CLASSPATH=$(build-classpath ant ant/ant-nodeps jsch httpcomponents bcprov bcpg)
%if %{with httpclient}
build-jar-repository -s lib httpcomponents
export CLASSPATH=${CLASSPATH}:$(build-classpath httpcomponents)
%endif
%if %{with oro}
build-jar-repository -s lib oro
export CLASSPATH=${CLASSPATH}:$(build-classpath oro)
%endif
%if %{with vfs}
build-jar-repository -s lib commons-vfs2
export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2)
%endif
%if %{with sftp}
build-jar-repository -s 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
%if %{with pack200}
build-jar-repository -s lib pack200
export CLASSPATH=${CLASSPATH}:$(build-classpath pack200)
%endif
# Build
%{ant} -v -Dtarget.ivy.version=%{version} -Dbundle.version=%{version} /localivy /offline jar javadoc
%install
# Code
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}/
%{mvn_install_pom} 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/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'`
%jpackage_script "${MAIN_CLASS}" "" "" ant:ant/ant-nodeps:ivy:oro:jsch:commons-httpclient ivy
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
echo "ivy" > %{buildroot}%{_sysconfdir}/ant.d/%{name}
# Man page
install -d %{buildroot}%{_mandir}/man1
install %{SOURCE1} %{buildroot}%{_mandir}/man1/ivy.1
%files -f .mfiles
%license LICENSE NOTICE
%doc README.adoc
%config %{_sysconfdir}/ant.d/%{name}
%{_javadir}/%{name}
%attr(755,root,root) %{_bindir}/*
%attr(644,root,root) %{_mandir}/man1/*
%files javadoc
%{_javadocdir}/*
%changelog

211
ivy-2.5.2.pom Normal file
View File

@ -0,0 +1,211 @@
<?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
https://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.5.2</version>
<name>Apache Ivy</name>
<url>http://ant.apache.org/ivy/</url>
<scm>
<connection>scm:svn:https://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>https://svn.apache.org/repos/asf/ant/ivy/core/trunk</url>
</scm>
<mailingLists>
<mailingList>
<name>Ant/Ivy Developers List</name>
<subscribe>dev-subscribe@ant.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@ant.apache.org</unsubscribe>
<post>dev@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-dev</archive>
</mailingList>
<mailingList>
<name>Ivy Users List</name>
<subscribe>ivy-user-subscribe@ant.apache.org</subscribe>
<unsubscribe>ivy-user-unsubscribe@ant.apache.org</unsubscribe>
<post>ivy-user@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/IVY</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.16</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.connector-factory</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.jsch</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit4</artifactId>
<version>1.9.16</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>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

128
ivy.1 Normal file
View File

@ -0,0 +1,128 @@
.\" -*- nroff -*-
.\"
.Dd January 2, 2013
.Dt IVY 1
.Os
.Sh NAME
.Nm ivy
.Nd Ivy depedency manager
.Sh SYNOPSIS
.Nm ivy
.Bk -words
.Op options ...
.Ek
.Sh DESCRIPTION
.Nm
invokes the Ivy dependency manager from the command line.
.Sh OPTIONS
.Ss Settings Options
.Bl -tag -width Ds
.It Fl settings Ar settingsfile
Use given file for settings.
.It Fl cache Ar cachedir
Use given directory for cache.
.It Fl novalidate
Do not validate ivy files against xsd.
.It Fl m2compatible
Use maven2 compatibility.
.El
.Ss Resolve Options
.Bl -tag -width Ds
.It Fl ivy Ar ivyfile
Use given file as ivy file.
.It Fl refresh
Refresh dynamic resolved revisions.
.It Fl dependency Ar organisation Ar module Ar revision
Use this instead of ivy file to do the rest of the
work with this as a dependency.
.It Fl confs Ar configurations
Resolve given configurations.
.It Fl types Ar types
Comma separated list of accepted artifact types.
.It Fl mode Ar resolvemode
The resolve mode to use.
.It Fl notransitive
Do not resolve dependencies transitively.
.El
.Ss Retrieve Options
.Bl -tag -width Ds
.It Fl retrieve Ar retrievepattern
Use given pattern as retrieve pattern.
.It Fl ivypattern Ar pattern
Use given pattern to copy the ivy files.
.It Fl sync
Use sync mode for retrieve.
.It Fl symlink
Create symbolic links.
.El
.Ss Cache Path Options
.Bl -tag -width Ds
.It Fl cachepath Ar cachepathfile
Outputs a classpath consisting of all dependencies
in cache (including transitive ones) of the given
ivy file to the given
.Ar cachepathfile .
.El
.Ss Deliver Options
.Bl -tag -width Ds
.It Fl deliverto Ar ivypattern
Use given pattern as resolved ivy file pattern.
.El
.Ss Publish Options
.Bl -tag -width Ds
.It Fl publish Ar resolvername
Use given resolver to publish to.
.It Fl publishpattern Ar artpattern
Use given pattern to find artifacts to publish.
.It Fl revision Ar revision
Use given revision to publish the module.
.It Fl status Ar status
Use given status to publish the module.
.It Fl overwrite
Overwrite files in the repository if they exist.
.El
.Ss HTTP Auth Options
.Bl -tag -width Ds
.It Fl realm Ar realm
Use given realm for HTTP AUTH.
.It Fl host Ar host
Use given host for HTTP AUTH.
.It Fl username Ar username
Use given username for HTTP AUTH.
.It Fl passwd Ar passwd
Use given password for HTTP AUTH.
.El
.Ss Launcher Options
.Bl -tag -width Ds
.It Fl main Ar main
The FQCN of the main class to launch.
.It Fl args Ar args
The arguments to give to the launched process.
.It Fl cp Ar cp
Extra classpath to use when launching process.
.El
.Ss Message Options
.Bl -tag -width Ds
.It Fl debug
Set message level to debug.
.It Fl verbose
Set message level to verbose.
.It Fl warn
Set message level to warn.
.It Fl error
Set message level to error.
.El
.Ss Help Options
.Bl -tag -width Ds
.It Fl ?
Display this help.
.It Fl deprecated
Show deprecated options.
.It Fl version
Displays version information.
.El
.Sh SEE ALSO
.Rs
.%T "Ivy: The agile dependency manager"
.%O http://ant.apache.org/ivy/
.Re