public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <filiperosset@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/apache-ivy] rawhide: - moved to jdk25, patched ivy to use pack200 from org.apache.commons.compress
Date: Mon, 29 Jun 2026 13:30:59 GMT	[thread overview]
Message-ID: <178273985957.1.9999759991007069770.rpms-apache-ivy-057eed45f1c2@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-06-29 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178273985957.1.9999759991007069770.rpms-apache-ivy-057eed45f1c2@fedoraproject.org \
    --to=filiperosset@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox