From e42d8406c93c61a22edfbb99fa376609faf5baf1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 10 Oct 2025 15:33:55 +0200 Subject: [PATCH] Update to upstream version 1.10.0 --- .gitignore | 1 + 0001-Port-tests-to-commons-lang3.patch | 67 ++++++++++++++++++++++++++ apache-commons-cli.spec | 4 +- sources | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 0001-Port-tests-to-commons-lang3.patch diff --git a/.gitignore b/.gitignore index 9c9dd53..6fc0a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /commons-cli-1.6.0-src.tar.gz /commons-cli-1.8.0-src.tar.gz /commons-cli-1.9.0-src.tar.gz +/commons-cli-1.10.0-src.tar.gz diff --git a/0001-Port-tests-to-commons-lang3.patch b/0001-Port-tests-to-commons-lang3.patch new file mode 100644 index 0000000..4096341 --- /dev/null +++ b/0001-Port-tests-to-commons-lang3.patch @@ -0,0 +1,67 @@ +From 92fcda0792a631eebef413a6608bd9c91794158d Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Fri, 10 Oct 2025 16:50:15 +0200 +Subject: [PATCH] Port tests to commons-lang3 + +We want to avoid dependency on commons-text for now. +--- + pom.xml | 4 ++-- + .../org/apache/commons/cli/example/AptHelpAppendable.java | 6 +++--- + .../org/apache/commons/cli/example/XhtmlHelpAppendable.java | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 2663f3f..95ac48c 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -69,8 +69,8 @@ + + + org.apache.commons +- commons-text +- 1.14.0 ++ commons-lang3 ++ 3.18.0 + test + + +diff --git a/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java b/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java +index cbedfe2..7e275c1 100644 +--- a/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java ++++ b/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java +@@ -25,8 +25,8 @@ import org.apache.commons.cli.help.FilterHelpAppendable; + import org.apache.commons.cli.help.TableDefinition; + import org.apache.commons.cli.help.TextStyle; + import org.apache.commons.lang3.StringUtils; +-import org.apache.commons.text.translate.CharSequenceTranslator; +-import org.apache.commons.text.translate.LookupTranslator; ++import org.apache.commons.lang3.text.translate.CharSequenceTranslator; ++import org.apache.commons.lang3.text.translate.LookupTranslator; + + /** + * Appends APT formatted text to an {@link Appendable}. +@@ -45,7 +45,7 @@ public class AptHelpAppendable extends FilterHelpAppendable { + escapeAptMap.put("*", "\\*"); + escapeAptMap.put("+", "\\+"); + escapeAptMap.put("|", "\\|"); +- ESCAPE_APT = new LookupTranslator(escapeAptMap); ++ ESCAPE_APT = new LookupTranslator(escapeAptMap.entrySet().stream().map(e -> new CharSequence[]{ e.getKey(), e.getValue() }).toArray(CharSequence[][]::new)); + } + + /** +diff --git a/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java b/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java +index 51ae058..ee6f2b3 100644 +--- a/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java ++++ b/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java +@@ -24,7 +24,7 @@ import java.util.Objects; + import org.apache.commons.cli.help.FilterHelpAppendable; + import org.apache.commons.cli.help.TableDefinition; + import org.apache.commons.lang3.StringUtils; +-import org.apache.commons.text.StringEscapeUtils; ++import org.apache.commons.lang3.StringEscapeUtils; + + /** + * Appends XHTML formatted text to an {@link Appendable}. +-- +2.51.0 + diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec index a0a366a..27c557e 100644 --- a/apache-commons-cli.spec +++ b/apache-commons-cli.spec @@ -1,7 +1,7 @@ %bcond_with bootstrap Name: apache-commons-cli -Version: 1.9.0 +Version: 1.10.0 Release: %autorelease Summary: Command Line Interface Library for Java License: Apache-2.0 @@ -11,6 +11,8 @@ ExclusiveArch: %{java_arches} noarch Source0: https://www.apache.org/dist/commons/cli/source/commons-cli-%{version}-src.tar.gz +Patch: 0001-Port-tests-to-commons-lang3.patch + %if %{with bootstrap} BuildRequires: javapackages-bootstrap %else diff --git a/sources b/sources index ee08b7f..fc2fa2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (commons-cli-1.9.0-src.tar.gz) = d20df809e8e0ebed79c57af9c9b447b0068347ba0edfcdec3652cb00bd9575b24fc77093d735e827d9d02a6fe2681bf239fd01df5f7c682ae34ade0781c53e35 +SHA512 (commons-cli-1.10.0-src.tar.gz) = 245951919a88068f692fc4cab906cb210bbefd853d851167d5c34fd4aebab7370766458033c47cf8174d7a409c4364752770b573252d19746cbb9a0e2c8c255b