From e73ab10b54b013a40db225cdbd728497ffa80b08 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 13 Mar 2025 14:02:37 +0000 Subject: [PATCH] import CS maven-shared-utils-3.4.2-19.module_el9+1171+eb38a622 --- .gitignore | 2 +- .maven-shared-utils.metadata | 2 +- ...-POSIX-attributes-for-symbolic-links.patch | 28 ++ ...ore-compatibility-with-current-maven.patch | 82 ----- SOURCES/0002-Port-to-hamcrest-2.1.patch | 79 ----- ...single-quote-executable-and-argument.patch | 319 ------------------ SPECS/maven-shared-utils.spec | 132 ++++++-- 7 files changed, 135 insertions(+), 509 deletions(-) create mode 100644 SOURCES/0001-Avoid-setting-POSIX-attributes-for-symbolic-links.patch delete mode 100644 SOURCES/0001-Restore-compatibility-with-current-maven.patch delete mode 100644 SOURCES/0002-Port-to-hamcrest-2.1.patch delete mode 100644 SOURCES/0003-Unconditionally-single-quote-executable-and-argument.patch diff --git a/.gitignore b/.gitignore index 0fe1524..5b75497 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/maven-shared-utils-3.2.1-source-release.zip +SOURCES/maven-shared-utils-3.4.2-source-release.zip diff --git a/.maven-shared-utils.metadata b/.maven-shared-utils.metadata index 0fe940c..fbc498f 100644 --- a/.maven-shared-utils.metadata +++ b/.maven-shared-utils.metadata @@ -1 +1 @@ -015559e466938c7e9053603d37b96ef3e03b802b SOURCES/maven-shared-utils-3.2.1-source-release.zip +e17b4406948be2df82bdd91271e270d394314951 SOURCES/maven-shared-utils-3.4.2-source-release.zip diff --git a/SOURCES/0001-Avoid-setting-POSIX-attributes-for-symbolic-links.patch b/SOURCES/0001-Avoid-setting-POSIX-attributes-for-symbolic-links.patch new file mode 100644 index 0000000..0180300 --- /dev/null +++ b/SOURCES/0001-Avoid-setting-POSIX-attributes-for-symbolic-links.patch @@ -0,0 +1,28 @@ +From 932f9b15bd62255f81c66b564f748fff6ec84c86 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 24 Sep 2020 20:17:56 +0200 +Subject: [PATCH 3/3] Avoid setting POSIX attributes for symbolic links + +--- + src/main/java/org/apache/maven/shared/utils/io/FileUtils.java | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java +index 1ce26eb..2a5b561 100644 +--- a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java ++++ b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java +@@ -1774,9 +1774,9 @@ public class FileUtils { + } + } + } +- } + +- copyFilePermissions(from, to); ++ copyFilePermissions(from, to); ++ } + } + + /** +-- +2.41.0 + diff --git a/SOURCES/0001-Restore-compatibility-with-current-maven.patch b/SOURCES/0001-Restore-compatibility-with-current-maven.patch deleted file mode 100644 index 0051408..0000000 --- a/SOURCES/0001-Restore-compatibility-with-current-maven.patch +++ /dev/null @@ -1,82 +0,0 @@ -From e3d2a29743e1b36beaf1063567da9dfd2e5a8aa8 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Mon, 26 Feb 2018 16:21:04 +0100 -Subject: [PATCH] Restore compatibility with current maven - ---- - .../maven/shared/utils/logging/AnsiMessageBuilder.java | 18 ++++++++++++++++++ - .../maven/shared/utils/logging/MessageBuilder.java | 3 +++ - .../shared/utils/logging/PlainMessageBuilder.java | 18 ++++++++++++++++++ - 3 files changed, 39 insertions(+) - -diff --git a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java -index 0103a6b..23b6d14 100644 ---- a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java -+++ b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java -@@ -153,4 +153,22 @@ class AnsiMessageBuilder - { - return ansi.toString(); - } -+ -+ @Override -+ public MessageBuilder debug(Object message) { -+ a(message); -+ return this; -+ } -+ -+ @Override -+ public MessageBuilder info(Object message) { -+ a(message); -+ return this; -+ } -+ -+ @Override -+ public MessageBuilder error(Object message) { -+ a(message); -+ return this; -+ } - } -diff --git a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java -index b60bb4e..1dc2624 100644 ---- a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java -+++ b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java -@@ -26,6 +26,9 @@ package org.apache.maven.shared.utils.logging; - */ - public interface MessageBuilder - { -+ MessageBuilder debug( Object message ); -+ MessageBuilder info( Object message ); -+ MessageBuilder error( Object message ); - /** - * Append message content in success style. - * By default, bold green -diff --git a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java -index 2eec001..5236e99 100644 ---- a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java -+++ b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java -@@ -139,4 +139,22 @@ class PlainMessageBuilder - { - return buffer.toString(); - } -+ -+ @Override -+ public MessageBuilder debug(Object message) { -+ a(message); -+ return this; -+ } -+ -+ @Override -+ public MessageBuilder info(Object message) { -+ a(message); -+ return this; -+ } -+ -+ @Override -+ public MessageBuilder error(Object message) { -+ a(message); -+ return this; -+ } - } --- -2.14.3 - diff --git a/SOURCES/0002-Port-to-hamcrest-2.1.patch b/SOURCES/0002-Port-to-hamcrest-2.1.patch deleted file mode 100644 index f975bac..0000000 --- a/SOURCES/0002-Port-to-hamcrest-2.1.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 613f27fe7ff4a89c21689a16f6f6b9b3e0b7c347 Mon Sep 17 00:00:00 2001 -From: Marian Koncek -Date: Thu, 29 Aug 2019 15:04:46 +0200 -Subject: [PATCH] Port to hamcrest 2.1 - ---- - .../shared/utils/reflection/ReflectorTest.java | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java -index 0088361..09f6048 100644 ---- a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java -+++ b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java -@@ -50,7 +50,7 @@ public class ReflectorTest - public void newInstanceClassNull() - throws Exception - { -- assertThat( reflector.newInstance( Object.class, null ), is( Object.class ) ); -+ assertThat( reflector.newInstance( Object.class, null ), isA( Object.class ) ); - } - - @Test( expected = NullPointerException.class ) -@@ -64,7 +64,7 @@ public class ReflectorTest - public void newInstanceClassEmptyArray() - throws Exception - { -- assertThat( reflector.newInstance( Object.class, new Object[0] ), is( Object.class ) ); -+ assertThat( reflector.newInstance( Object.class, new Object[0] ), isA( Object.class ) ); - } - - @Test( expected = ReflectorException.class ) -@@ -156,7 +156,7 @@ public class ReflectorTest - public void getSingletonClassNull() - throws Exception - { -- assertThat( reflector.getSingleton( (Class)Object.class, (Object)null ), is( Object.class ) ); -+ assertThat( reflector.getSingleton( (Class)Object.class, (Object)null ), isA( Object.class ) ); - } - - @Test( expected = NullPointerException.class ) -@@ -170,7 +170,7 @@ public class ReflectorTest - public void getSingletonClassEmptyArray() - throws Exception - { -- assertThat( reflector.getSingleton( Object.class, new Object[0] ), is( Object.class ) ); -+ assertThat( reflector.getSingleton( Object.class, new Object[0] ), isA( Object.class ) ); - } - - @Test( expected = ReflectorException.class ) -@@ -787,7 +787,7 @@ public class ReflectorTest - public void invokeStaticClassNullNull() - throws Exception - { -- assertThat( reflector.invokeStatic( Object.class, (String)null, (Object)null ), is( Object.class ) ); -+ assertThat( reflector.invokeStatic( Object.class, (String)null, (Object)null ), isA( Object.class ) ); - } - - @Test( expected = NullPointerException.class ) -@@ -801,7 +801,7 @@ public class ReflectorTest - public void invokeStaticClassNullEmptyArray() - throws Exception - { -- assertThat( reflector.invokeStatic( Object.class, null, new Object[0] ), is( Object.class ) ); -+ assertThat( reflector.invokeStatic( Object.class, null, new Object[0] ), isA( Object.class ) ); - } - - @Test( expected = NullPointerException.class ) -@@ -829,7 +829,7 @@ public class ReflectorTest - public void invokeStaticClassEmptyEmptyArray() - throws Exception - { -- assertThat( reflector.invokeStatic( Object.class, "", new Object[0] ), is( Object.class ) ); -+ assertThat( reflector.invokeStatic( Object.class, "", new Object[0] ), isA( Object.class ) ); - } - - @Test( expected = IllegalArgumentException.class ) --- -2.21.0 - diff --git a/SOURCES/0003-Unconditionally-single-quote-executable-and-argument.patch b/SOURCES/0003-Unconditionally-single-quote-executable-and-argument.patch deleted file mode 100644 index 2093617..0000000 --- a/SOURCES/0003-Unconditionally-single-quote-executable-and-argument.patch +++ /dev/null @@ -1,319 +0,0 @@ -From c0b225b90d1056e29d681258a2008ae8aff2b508 Mon Sep 17 00:00:00 2001 -From: Marian Koncek -Date: Tue, 5 Apr 2022 13:56:20 +0200 -Subject: [PATCH] Unconditionally single quote executable and arguments - -Upstream: https://github.com/apache/maven-shared-utils/pull/40/commits ---- - .../shared/utils/cli/shell/BourneShell.java | 48 ++++++++----------- - .../maven/shared/utils/cli/shell/Shell.java | 39 ++++++++++----- - .../utils/cli/shell/BourneShellTest.java | 35 ++++++++++---- - 3 files changed, 72 insertions(+), 50 deletions(-) - -diff --git a/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java b/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java -index 11a447a..f0de631 100644 ---- a/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java -+++ b/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java -@@ -23,7 +23,6 @@ package org.apache.maven.shared.utils.cli.shell; - import java.util.ArrayList; - import java.util.List; - import org.apache.maven.shared.utils.Os; --import org.apache.maven.shared.utils.StringUtils; - - /** - * @author Jason van Zyl -@@ -31,17 +30,15 @@ import org.apache.maven.shared.utils.StringUtils; - public class BourneShell - extends Shell - { -- private static final char[] BASH_QUOTING_TRIGGER_CHARS = -- { ' ', '$', ';', '&', '|', '<', '>', '*', '?', '(', ')', '[', ']', '{', '}', '`' }; -- - /** -- * Create instance of BournShell. -+ * Create instance of BourneShell. - */ - public BourneShell() - { -+ setUnconditionalQuoting( true ); - setShellCommand( "/bin/sh" ); - setArgumentQuoteDelimiter( '\'' ); -- setExecutableQuoteDelimiter( '\"' ); -+ setExecutableQuoteDelimiter( '\'' ); - setSingleQuotedArgumentEscaped( true ); - setSingleQuotedExecutableEscaped( false ); - setQuotedExecutableEnabled( true ); -@@ -57,7 +54,7 @@ public class BourneShell - return super.getExecutable(); - } - -- return unifyQuotes( super.getExecutable() ); -+ return quoteOneItem( super.getExecutable(), true ); - } - - /** {@inheritDoc} */ -@@ -110,47 +107,40 @@ public class BourneShell - StringBuilder sb = new StringBuilder(); - sb.append( "cd " ); - -- sb.append( unifyQuotes( dir ) ); -+ sb.append( quoteOneItem( dir, false ) ); - sb.append( " && " ); - - return sb.toString(); - } - -- /** {@inheritDoc} */ -- protected char[] getQuotingTriggerChars() -- { -- return BASH_QUOTING_TRIGGER_CHARS; -- } -- - /** - *

Unify quotes in a path for the Bourne Shell.

- *

- *

--     * BourneShell.unifyQuotes(null)                       = null
--     * BourneShell.unifyQuotes("")                         = (empty)
--     * BourneShell.unifyQuotes("/test/quotedpath'abc")     = /test/quotedpath\'abc
--     * BourneShell.unifyQuotes("/test/quoted path'abc")    = "/test/quoted path'abc"
--     * BourneShell.unifyQuotes("/test/quotedpath\"abc")    = "/test/quotedpath\"abc"
--     * BourneShell.unifyQuotes("/test/quoted path\"abc")   = "/test/quoted path\"abc"
--     * BourneShell.unifyQuotes("/test/quotedpath\"'abc")   = "/test/quotedpath\"'abc"
--     * BourneShell.unifyQuotes("/test/quoted path\"'abc")  = "/test/quoted path\"'abc"
-+     * BourneShell.quoteOneItem(null)                       = null
-+     * BourneShell.quoteOneItem("")                         = ''
-+     * BourneShell.quoteOneItem("/test/quotedpath'abc")     = '/test/quotedpath'"'"'abc'
-+     * BourneShell.quoteOneItem("/test/quoted path'abc")    = '/test/quoted pat'"'"'habc'
-+     * BourneShell.quoteOneItem("/test/quotedpath\"abc")    = '/test/quotedpath"abc'
-+     * BourneShell.quoteOneItem("/test/quoted path\"abc")   = '/test/quoted path"abc'
-+     * BourneShell.quoteOneItem("/test/quotedpath\"'abc")   = '/test/quotedpath"'"'"'abc'
-+     * BourneShell.quoteOneItem("/test/quoted path\"'abc")  = '/test/quoted path"'"'"'abc'
-      * 
- * - * @param path not null path. - * @return the path unified correctly for the Bourne shell. - */ -- private static String unifyQuotes( String path ) -+ protected String quoteOneItem( String path, boolean isExecutable ) - { - if ( path == null ) - { - return null; - } - -- if ( path.indexOf( ' ' ) == -1 && path.indexOf( '\'' ) != -1 && path.indexOf( '"' ) == -1 ) -- { -- return StringUtils.escape( path ); -- } -- -- return StringUtils.quoteAndEscape( path, '\"', BASH_QUOTING_TRIGGER_CHARS ); -+ StringBuilder sb = new StringBuilder(); -+ sb.append( "'" ); -+ sb.append( path.replace( "'", "'\"'\"'" ) ); -+ sb.append( "'" ); -+ return sb.toString(); - } - } -diff --git a/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java b/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java -index 6fa2f73..96904cb 100644 ---- a/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java -+++ b/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java -@@ -50,6 +50,8 @@ public class Shell - - private boolean quotedArgumentsEnabled = true; - -+ private boolean unconditionalQuoting = false; -+ - private String executable; - - private String workingDir; -@@ -113,6 +115,19 @@ public class Shell - } - } - -+ protected String quoteOneItem( String inputString, boolean isExecutable ) -+ { -+ char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); -+ return StringUtils.quoteAndEscape( -+ inputString, -+ isExecutable ? getExecutableQuoteDelimiter() : getArgumentQuoteDelimiter(), -+ escapeChars, -+ getQuotingTriggerChars(), -+ '\\', -+ unconditionalQuoting -+ ); -+ } -+ - /** - * Get the command line for the provided executable and arguments in this shell - * -@@ -145,15 +160,11 @@ public class Shell - - if ( isQuotedExecutableEnabled() ) - { -- char[] escapeChars = -- getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); -- -- sb.append( StringUtils.quoteAndEscape( getExecutable(), getExecutableQuoteDelimiter(), escapeChars, -- getQuotingTriggerChars(), '\\', false ) ); -+ sb.append( quoteOneItem( executableParameter, true ) ); - } - else - { -- sb.append( getExecutable() ); -+ sb.append( executableParameter ); - } - } - for ( String argument : argumentsParameter ) -@@ -165,10 +176,7 @@ public class Shell - - if ( isQuotedArgumentsEnabled() ) - { -- char[] escapeChars = getEscapeChars( isSingleQuotedArgumentEscaped(), isDoubleQuotedArgumentEscaped() ); -- -- sb.append( StringUtils.quoteAndEscape( argument, getArgumentQuoteDelimiter(), escapeChars, -- getQuotingTriggerChars(), '\\', false ) ); -+ sb.append( quoteOneItem( argument, false ) ); - } - else - { -@@ -285,7 +293,7 @@ public class Shell - commandLine.addAll( getShellArgsList() ); - } - -- commandLine.addAll( getCommandLine( getExecutable(), arguments ) ); -+ commandLine.addAll( getCommandLine( executable, arguments ) ); - - return commandLine; - -@@ -398,4 +406,13 @@ public class Shell - this.singleQuotedExecutableEscaped = singleQuotedExecutableEscaped; - } - -+ public boolean isUnconditionalQuoting() -+ { -+ return unconditionalQuoting; -+ } -+ -+ public void setUnconditionalQuoting( boolean unconditionalQuoting ) -+ { -+ this.unconditionalQuoting = unconditionalQuoting; -+ } - } -diff --git a/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java b/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java -index b5f23d9..f5143c1 100644 ---- a/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java -+++ b/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java -@@ -44,7 +44,7 @@ public class BourneShellTest - - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); - -- assertEquals( "/bin/sh -c cd /usr/local/bin && chmod", executable ); -+ assertEquals( "/bin/sh -c cd '/usr/local/bin' && 'chmod'", executable ); - } - - public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes() -@@ -56,7 +56,7 @@ public class BourneShellTest - - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); - -- assertEquals( "/bin/sh -c cd \"/usr/local/\'something else\'\" && chmod", executable ); -+ assertEquals( "/bin/sh -c cd '/usr/local/'\"'\"'something else'\"'\"'' && 'chmod'", executable ); - } - - public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes_BackslashFileSep() -@@ -68,7 +68,7 @@ public class BourneShellTest - - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); - -- assertEquals( "/bin/sh -c cd \"\\usr\\local\\\'something else\'\" && chmod", executable ); -+ assertEquals( "/bin/sh -c cd '\\usr\\local\\'\"'\"'something else'\"'\"'' && 'chmod'", executable ); - } - - public void testPreserveSingleQuotesOnArgument() -@@ -78,13 +78,13 @@ public class BourneShellTest - sh.setWorkingDirectory( "/usr/bin" ); - sh.setExecutable( "chmod" ); - -- String[] args = { "\'some arg with spaces\'" }; -+ String[] args = { "\"some arg with spaces\"" }; - - List shellCommandLine = sh.getShellCommandLine( args ); - - String cli = StringUtils.join( shellCommandLine.iterator(), " " ); - System.out.println( cli ); -- assertTrue( cli.endsWith( args[0] ) ); -+ assertTrue( cli.endsWith( "'\"some arg with spaces\"'" ) ); - } - - public void testAddSingleQuotesOnArgumentWithSpaces() -@@ -100,7 +100,21 @@ public class BourneShellTest - - String cli = StringUtils.join( shellCommandLine.iterator(), " " ); - System.out.println( cli ); -- assertTrue( cli.endsWith( "\'" + args[0] + "\'" ) ); -+ assertTrue( cli.endsWith("'some arg with spaces'")); -+ } -+ -+ public void testAddArgumentWithSingleQuote() -+ { -+ Shell sh = newShell(); -+ -+ sh.setWorkingDirectory( "/usr/bin" ); -+ sh.setExecutable( "chmod" ); -+ -+ String[] args = { "arg'withquote" }; -+ -+ List shellCommandLine = sh.getShellCommandLine( args ); -+ -+ assertEquals("cd '/usr/bin' && 'chmod' 'arg'\"'\"'withquote'", shellCommandLine.get(shellCommandLine.size() - 1)); - } - - public void testArgumentsWithsemicolon() -@@ -119,7 +133,7 @@ public class BourneShellTest - - String cli = StringUtils.join( shellCommandLine.iterator(), " " ); - System.out.println( cli ); -- assertTrue( cli.endsWith( "\'" + args[0] + "\'" ) ); -+ assertTrue( cli.endsWith( "';some&argwithunix$chars'" ) ); - - Commandline commandline = new Commandline( newShell() ); - commandline.setExecutable( "chmod" ); -@@ -132,7 +146,7 @@ public class BourneShellTest - - assertEquals( "/bin/sh", lines.get( 0 ) ); - assertEquals( "-c", lines.get( 1 ) ); -- assertEquals( "chmod --password ';password'", lines.get( 2 ) ); -+ assertEquals( "'chmod' '--password' ';password'", lines.get( 2 ) ); - - commandline = new Commandline( newShell() ); - commandline.setExecutable( "chmod" ); -@@ -144,7 +158,7 @@ public class BourneShellTest - - assertEquals( "/bin/sh", lines.get( 0) ); - assertEquals( "-c", lines.get( 1 ) ); -- assertEquals( "chmod --password ';password'", lines.get( 2 ) ); -+ assertEquals( "'chmod' '--password' ';password'", lines.get( 2 ) ); - - commandline = new Commandline( new CmdShell() ); - commandline.getShell().setQuotedArgumentsEnabled( true ); -@@ -186,13 +200,14 @@ public class BourneShellTest - commandline.createArg().setValue( "{" ); - commandline.createArg().setValue( "}" ); - commandline.createArg().setValue( "`" ); -+ commandline.createArg().setValue( "#" ); - - List lines = commandline.getShell().getShellCommandLine( commandline.getArguments() ); - System.out.println( lines ); - - assertEquals( "/bin/sh", lines.get( 0 ) ); - assertEquals( "-c", lines.get( 1 ) ); -- assertEquals( "chmod ' ' '|' '&&' '||' ';' ';;' '&' '()' '<' '<<' '>' '>>' '*' '?' '[' ']' '{' '}' '`'", -+ assertEquals( "'chmod' ' ' '|' '&&' '||' ';' ';;' '&' '()' '<' '<<' '>' '>>' '*' '?' '[' ']' '{' '}' '`' '#'", - lines.get( 2 ) ); - } - --- -2.35.1 - diff --git a/SPECS/maven-shared-utils.spec b/SPECS/maven-shared-utils.spec index e6b0566..ddef41a 100644 --- a/SPECS/maven-shared-utils.spec +++ b/SPECS/maven-shared-utils.spec @@ -1,29 +1,31 @@ +%bcond_with bootstrap + Name: maven-shared-utils -Version: 3.2.1 -Release: 0.5%{?dist} +Version: 3.4.2 +Release: 19%{?dist} Summary: Maven shared utility classes -License: ASL 2.0 -URL: http://maven.apache.org/shared/maven-shared-utils +License: Apache-2.0 +URL: https://maven.apache.org/shared/maven-shared-utils BuildArch: noarch +ExclusiveArch: %{java_arches} noarch -Source0: http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip -# XXX temporary for maven upgrade -Patch1: 0001-Restore-compatibility-with-current-maven.patch +Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip -Patch2: 0002-Port-to-hamcrest-2.1.patch -Patch3: 0003-Unconditionally-single-quote-executable-and-argument.patch +Patch: 0001-Avoid-setting-POSIX-attributes-for-symbolic-links.patch -BuildRequires: maven-local-openjdk8 +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else +BuildRequires: maven-local BuildRequires: mvn(com.google.code.findbugs:jsr305) -BuildRequires: %{?module_prefix}mvn(commons-io:commons-io) +BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.apache.commons:commons-lang3) -BuildRequires: mvn(org.apache.maven:maven-core) -BuildRequires: mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness) BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:) -BuildRequires: mvn(org.codehaus.plexus:plexus-container-default) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.fusesource.jansi:jansi) BuildRequires: mvn(org.hamcrest:hamcrest-core) +BuildRequires: mvn(org.slf4j:slf4j-api) +%endif %description This project aims to be a functional replacement for plexus-utils in Maven. @@ -32,17 +34,20 @@ It is not a 100% API compatible replacement though but a replacement with improvements: lots of methods got cleaned up, generics got added and we dropped a lot of unused code. -%{?module_package} -%{?javadoc_package} +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +API documentation for %{name}. %prep -%setup -q +%autosetup -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +find -name '*.java' -exec sed -i 's/\r//' {} + -%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin + +%pom_remove_dep org.apache.commons:commons-text +rm src/test/java/org/apache/maven/shared/utils/CaseTest.java %build %mvn_build @@ -50,13 +55,78 @@ a lot of unused code. %install %mvn_install -%files -n %{?module_prefix}%{name} -f .mfiles +%files -f .mfiles %license LICENSE NOTICE +%files javadoc -f .mfiles-javadoc + %changelog -* Tue Apr 05 2022 Marián Konček - 3.2.1-0.5 -- Fix commandline injection vulnerability -- Resolves: CVE-2022-29599 +* Fri Nov 29 2024 Mikolaj Izdebski - 3.4.2-17 +- Update javapackages test plan to f42 + +* Thu Jul 18 2024 Fedora Release Engineering - 3.4.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Feb 27 2024 Jiri Vanek - 3.4.2-7 +- Rebuilt for java-21-openjdk as system jdk + +* Fri Feb 23 2024 Jiri Vanek - 3.4.2-6 +- bump of release for for java-21-openjdk as system jdk + +* Thu Jan 25 2024 Fedora Release Engineering - 3.4.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 3.4.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Sep 20 2023 Mikolaj Izdebski - 3.4.2-3 +- Rebuild to regenerate auto-Requires on java + +* Fri Sep 01 2023 Mikolaj Izdebski - 3.4.2-2 +- Rebuild + +* Wed Aug 16 2023 Marian Koncek - 3.4.2-1 +- Update to upstream version 3.4.2 + +* Thu Jul 20 2023 Fedora Release Engineering - 3.3.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 3.3.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 3.3.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Feb 05 2022 Jiri Vanek - 3.3.4-4 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 3.3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 3.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 25 2021 Marian Koncek - 3.3.4-1 +- Update to upstream version 3.3.4 + +* Mon May 17 2021 Mikolaj Izdebski - 3.3.3-2 +- Bootstrap build +- Non-bootstrap build + +* Tue Jan 26 2021 Fedora Release Engineering - 3.2.1-0.8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Sep 11 2020 Marian Koncek - 3.3.3-1 +- Update to upstream version 3.3.3 + +* Tue Jul 28 2020 Fedora Release Engineering - 3.2.1-0.7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 3.2.1-0.6 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Wed Jan 29 2020 Fedora Release Engineering - 3.2.1-0.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Jan 25 2020 Mikolaj Izdebski - 3.2.1-0.4 - Build with OpenJDK 8 @@ -64,9 +134,18 @@ a lot of unused code. * Tue Nov 05 2019 Mikolaj Izdebski - 3.2.1-0.3 - Mass rebuild for javapackages-tools 201902 +* Thu Jul 25 2019 Fedora Release Engineering - 3.2.1-0.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri May 24 2019 Mikolaj Izdebski - 3.2.1-0.2 - Mass rebuild for javapackages-tools 201901 +* Fri Feb 01 2019 Fedora Release Engineering - 3.2.1-0.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.2.1-0.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Feb 26 2018 Michael Simacek - 3.2.1-0.1 - Update to upstream version 3.2.1 (patched temporary) @@ -157,4 +236,3 @@ a lot of unused code. * Wed Jan 16 2013 Tomas Radej - 0.2-1 - Initial version -