public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/apache-ivy] rawhide: - moved to jdk25, patched ivy to use pack200 from org.apache.commons.compress
@ 2026-06-29 13:30 Filipe Rosset
0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-29 13:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/apache-ivy
Branch : rawhide
Commit : 057eed45f1c24c278ad31bd4350c5bcd0a7b0538
Author : Filipe Rosset <filiperosset@fedoraproject.org>
Date : 2026-06-27T17:47:26-03:00
Stats : +49/-9 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/apache-ivy/c/057eed45f1c24c278ad31bd4350c5bcd0a7b0538?branch=rawhide
Log:
- moved to jdk25, patched ivy to use pack200 from org.apache.commons.compress
- spec cleanup and modernization fixes rhbz#2335066
Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>
---
diff --git a/01-fix-pack200-java25.patch b/01-fix-pack200-java25.patch
new file mode 100644
index 0000000..9b98679
--- /dev/null
+++ b/01-fix-pack200-java25.patch
@@ -0,0 +1,28 @@
+--- a/src/java/org/apache/ivy/util/FileUtil.java 2026-06-27 16:27:05.578214435 -0300
++++ a/src/java/org/apache/ivy/util/FileUtil.java 2026-06-27 16:27:11.045593978 -0300
+@@ -46,8 +46,6 @@
+ import java.util.zip.GZIPInputStream;
+ import java.util.zip.ZipInputStream;
+
+-import static java.util.jar.Pack200.newUnpacker;
+-
+ /**
+ * Utility class used to deal with file related operations, like copy, full reading, symlink, ...
+ */
+@@ -709,7 +707,15 @@
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ JarOutputStream jar = new JarOutputStream(baos);
+- newUnpacker().unpack(new UncloseInputStream(in), jar);
++ try {
++ Class<?> pack200Class = Class.forName("org.apache.commons.compress.harmony.pack200.Pack200");
++ Object unpacker = pack200Class.getMethod("newUnpacker").invoke(null);
++ unpacker.getClass()
++ .getMethod("unpack", InputStream.class, JarOutputStream.class)
++ .invoke(unpacker, new UncloseInputStream(in), jar);
++ } catch (Exception e) {
++ throw new IOException("Failed to unpack Pack200 archive: Apache Commons Compress Pack200 is not available on the classpath", e);
++ }
+ jar.close();
+ return new ByteArrayInputStream(baos.toByteArray());
+ }
diff --git a/apache-ivy.spec b/apache-ivy.spec
index ed91be2..c9e4269 100644
--- a/apache-ivy.spec
+++ b/apache-ivy.spec
@@ -7,7 +7,7 @@
Name: apache-%{jarname}
Version: 2.5.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Java-based dependency manager
License: Apache-2.0
URL: https://ant.apache.org/ivy
@@ -21,10 +21,12 @@ Source2: https://archive.apache.org/dist/ant/KEYS
# 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.
-Source3: 00-global-settings.patch
+Patch0: 00-global-settings.patch
+Patch1: 01-fix-pack200-java25.patch
BuildRequires: gnupg2
-BuildRequires: ant-openjdk21
+BuildRequires: mvn(org.apache.commons:commons-compress)
+BuildRequires: ant-openjdk25
BuildRequires: ivy-local
BuildRequires: dos2unix
BuildRequires: mvn(org.apache.ant:ant)
@@ -62,10 +64,10 @@ reporting and publication.
%{?javadoc_package}
%prep
-%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
-%autosetup
-dos2unix src/java/org/apache/ivy/ant/IvyAntSettings.java
-patch -p1 -l < %{SOURCE3}
+%autosetup -N
+dos2unix src/java/org/apache/ivy/ant/IvyAntSettings.java README.adoc src/java/org/apache/ivy/util/FileUtil.java
+%autopatch -p1
+
# Don't hardcode sysconfdir path
sed -i 's:/etc/ivy/:%{_sysconfdir}/ivy/:' src/java/org/apache/ivy/ant/IvyAntSettings.java
# remove BOM
@@ -137,7 +139,7 @@ rm -rf asciidoc
# create custom ant configuration
mkdir -p ~/.ant
cp /etc/ant.conf ~/.ant
-sed -i '$a JAVA_HOME=/usr/lib/jvm/java-21-openjdk' ~/.ant/ant.conf
+sed -i '$a JAVA_HOME=/usr/lib/jvm/java-25-openjdk' ~/.ant/ant.conf
ant -Divy.mode=local \
-f build-release.xml \
@@ -149,12 +151,22 @@ ant -Divy.mode=local \
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
echo "apache-ivy/ivy" > %{buildroot}%{_sysconfdir}/ant.d/%{name}
+# Remove duplicate and problematic javadoc legal files
+rm -rf %{buildroot}%{_javadocdir}/%{name}/legal
+
+%check
+# Test suite is disabled as it requires network access and is broken
+
%files -f .mfiles
%license LICENSE NOTICE
%doc README.adoc
-%{_sysconfdir}/ant.d/%{name}
+%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%changelog
+* Sat Jun 27 2026 Filipe Rosset <filiperosset@fedoraproject.org> - 2.5.3-4
+- moved to jdk25, patched ivy to use pack200 from org.apache.commons.compress
+- spec cleanup and modernization
+
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-29 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 13:30 [rpms/apache-ivy] rawhide: - moved to jdk25, patched ivy to use pack200 from org.apache.commons.compress Filipe Rosset
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox