From 7275486f7022f91c30608bfc06cd14dd08ed6e9eba5757bf2d71656fc60f983c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 25 Feb 2025 19:15:10 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main apache-commons-cli revision 0b66742dbb883c6812213c07d94600fb --- CLI-253-workaround.patch | 32 +++++++++++++------------------- apache-commons-cli-build.xml | 2 +- apache-commons-cli.changes | 24 ++++++++++++++++++++++++ apache-commons-cli.spec | 2 +- commons-cli-1.7.0-src.tar.gz | 3 --- commons-cli-1.9.0-src.tar.gz | 3 +++ 6 files changed, 42 insertions(+), 24 deletions(-) delete mode 100644 commons-cli-1.7.0-src.tar.gz create mode 100644 commons-cli-1.9.0-src.tar.gz diff --git a/CLI-253-workaround.patch b/CLI-253-workaround.patch index 1876bcf..6cd252f 100644 --- a/CLI-253-workaround.patch +++ b/CLI-253-workaround.patch @@ -6,10 +6,8 @@ CommitDate: Mon Jun 22 15:04:05 2015 +0200 [CLI-253] Prevent "Unrecognized option: --null" when handling long opts in PosixParser -Index: commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/Options.java -=================================================================== ---- commons-cli-1.7.0-src.orig/src/main/java/org/apache/commons/cli/Options.java -+++ commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/Options.java +--- a/src/main/java/org/apache/commons/cli/Options.java ++++ b/src/main/java/org/apache/commons/cli/Options.java @@ -195,6 +195,20 @@ public class Options implements Serializ return this; } @@ -31,23 +29,19 @@ Index: commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/Options.java /** * Gets the options with a long name starting with the name specified. * -Index: commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/PosixParser.java -=================================================================== ---- commons-cli-1.7.0-src.orig/src/main/java/org/apache/commons/cli/PosixParser.java -+++ commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/PosixParser.java -@@ -145,7 +145,7 @@ public class PosixParser extends Parser - } else if (matchingOpts.size() > 1) { - throw new AmbiguousOptionException(opt, matchingOpts); - } else { -- currentOption = options.getOption(matchingOpts.get(0)); -+ currentOption = options.getLongOption(matchingOpts.get(0)); +--- a/src/main/java/org/apache/commons/cli/PosixParser.java ++++ b/src/main/java/org/apache/commons/cli/PosixParser.java +@@ -141,7 +141,7 @@ public class PosixParser extends Parser + } else if (matchingOpts.size() > 1) { + throw new AmbiguousOptionException(opt, matchingOpts); + } else { +- currentOption = options.getOption(matchingOpts.get(0)); ++ currentOption = options.getLongOption(matchingOpts.get(0)); - tokens.add("--" + currentOption.getLongOpt()); - if (pos != -1) { -Index: commons-cli-1.7.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java -=================================================================== + tokens.add("--" + currentOption.getLongOpt()); + if (pos != -1) { --- /dev/null -+++ commons-cli-1.7.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java ++++ b/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/apache-commons-cli-build.xml b/apache-commons-cli-build.xml index af4ba64..1488653 100644 --- a/apache-commons-cli-build.xml +++ b/apache-commons-cli-build.xml @@ -8,7 +8,7 @@ - + diff --git a/apache-commons-cli.changes b/apache-commons-cli.changes index 661120c..62652bb 100644 --- a/apache-commons-cli.changes +++ b/apache-commons-cli.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Thu Nov 7 09:47:59 UTC 2024 - Gus Kenion + +- Update to 1.9.0 + * New features + + Add OptionGroup.isSelected(). + + You can now extend HelpFormatter.Builder. + + Add 'since' attribute to Option to track when an Option was + introduced #292 + * Fixed bugs + + CLI-334: Fix Javadoc pathing #280. + + CLI-335: Updated properties documentation #285. + + CLI-336: Deprecation not always reported #284. + + Replace internal StringBuffer with StringBuilder. + * Updates + + Bump org.apache.commons:commons-parent from 70 to 72 #283. + +------------------------------------------------------------------- +Mon Aug 12 12:14:19 UTC 2024 - Gus Kenion + +- Update to 1.8.0 + * Fix Javadoc pathing #280. Fixes CLI-334. +- Revised CLI-253-workaround.patch for compatibility with 1.8.0 + ------------------------------------------------------------------- Mon Apr 29 11:36:14 UTC 2024 - Gus Kenion diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec index efa38cf..2c97d2d 100644 --- a/apache-commons-cli.spec +++ b/apache-commons-cli.spec @@ -19,7 +19,7 @@ %global base_name cli %global short_name commons-%{base_name} Name: apache-commons-cli -Version: 1.7.0 +Version: 1.9.0 Release: 0 Summary: Command Line Interface Library for Java License: Apache-2.0 diff --git a/commons-cli-1.7.0-src.tar.gz b/commons-cli-1.7.0-src.tar.gz deleted file mode 100644 index f19f76b..0000000 --- a/commons-cli-1.7.0-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34ff1d3f5a41c2d71734468e350b3d30642e75c504cdcd8a97ca7caaa4730cdf -size 177969 diff --git a/commons-cli-1.9.0-src.tar.gz b/commons-cli-1.9.0-src.tar.gz new file mode 100644 index 0000000..68ee264 --- /dev/null +++ b/commons-cli-1.9.0-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5164e2bb9784084b2cf29429ab3ff061ba9dfac72bb54d23128e0a51511f3da0 +size 187533