Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
9b1b94a760
!40 Recognize parameter separator for grape define command
From: @wang--ge 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
2024-03-14 07:46:28 +00:00
wang--ge
e41489bdfb add parameter check for grape define
Signed-off-by: 王歌 <wang__ge@126.com>
2024-03-14 11:21:55 +08:00
openeuler-ci-bot
1433468e9c
!39 [sync] PR-36: compatible adapter for version 1.8
From: @openeuler-sync-bot 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
2024-02-21 01:17:23 +00:00
wang--ge
f53a328473 compatible adapter for version 1.8
(cherry picked from commit 77dfd8bcf7876e996e3720635af7e73e56c9302c)
2024-02-20 16:13:05 +08:00
openeuler-ci-bot
8556715b42
!32 修改错误Source0和Source6地址
From: @lyn1001 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
2022-11-15 10:34:31 +00:00
lyn1001
9bd1240d8a fix source 2022-11-15 16:38:43 +08:00
openeuler-ci-bot
75be419fa2
!31 fix spec changelog date
From: @leeffo 
Reviewed-by: @luo-haibo 
Signed-off-by: @luo-haibo
2022-08-15 00:51:47 +00:00
loong_C
6318399e0d fix spec changelog date 2022-06-09 13:54:36 +08:00
openeuler-ci-bot
104c692d3b !12 Speed up class loading of groovy-all files
From: @ultra_planet
Reviewed-by: @wangchong1995924
Signed-off-by: @wangchong1995924
2021-08-09 02:48:48 +00:00
lingsheng
c8f7ca5805 Speed up class loading of groovy-all files 2021-08-09 10:07:38 +08:00
5 changed files with 933 additions and 769 deletions

View File

@ -0,0 +1,89 @@
From bfe732cf53ad19c9a8e6db3af595e728cf2bacfa Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Mon, 5 Feb 2024 09:56:34 +0800
Subject: [PATCH] compatible for version 1.8
---
src/bin/startGroovy | 45 +++++++++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 14 deletions(-)
diff --git a/src/bin/startGroovy b/src/bin/startGroovy
index 36d6edd..9fcccc4 100644
--- a/src/bin/startGroovy
+++ b/src/bin/startGroovy
@@ -28,7 +28,6 @@
## $Revision$
## $Date$
##
-
PROGNAME=`basename "$0"`
#DIRNAME=`dirname "$0"`
@@ -150,7 +149,6 @@ fi
if [ -z "$GROOVY_CONF" ] ; then
GROOVY_CONF="$GROOVY_HOME/conf/groovy-starter.conf"
fi
-STARTER_CLASSPATH="$GROOVY_HOME/lib/@GROOVYJAR@"
# Create the final classpath. Setting a classpath using the -cp or -classpath option means not to use the
# global classpath. Groovy behaves then the same as the java interpreter
@@ -162,6 +160,11 @@ else
CP=.
fi
+STARTER_CLASSPATH="$GROOVY_HOME/lib/@GROOVYJAR@"
+if [ ${GROOVY_VERSION} == "1.8" ];then
+ STARTER_CLASSPATH="/usr/share/java/groovy-1.8.jar:$CP"
+fi
+
# Determine the Java command to use to start the JVM.
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
@@ -283,18 +286,32 @@ startGroovy ( ) {
if $useprofiler ; then
runProfiler
else
- eval exec "\"\$JAVACMD\"" $JAVA_OPTS \
- -classpath "\"\$STARTER_CLASSPATH\"" \
- -Dscript.name="\"\$SCRIPT_PATH\"" \
- -Dprogram.name="\"\$PROGNAME\"" \
- -Dgroovy.starter.conf="\"\$GROOVY_CONF\"" \
- -Dgroovy.home="\"\$GROOVY_HOME\"" \
- -Dtools.jar="\"\$TOOLS_JAR\"" \
- $STARTER_MAIN_CLASS \
- --main $CLASS \
- --conf "\"\$GROOVY_CONF\"" \
- --classpath "\"\$CP\"" \
- "\"\$@\""
+ if [ ${GROOVY_VERSION} == "1.8" ];then
+ eval exec "\"\$JAVACMD\"" $JAVA_OPTS \
+ -classpath "\"\$STARTER_CLASSPATH\"" \
+ -Dscript.name="\"\$SCRIPT_PATH\"" \
+ -Dprogram.name="\"\$PROGNAME\"" \
+ -Dgroovy.starter.conf="\"\$GROOVY_CONF\"" \
+ -Dgroovy.home="\"\$GROOVY_HOME\"" \
+ -Dtools.jar="\"\$TOOLS_JAR\"" \
+ $STARTER_MAIN_CLASS \
+ --main $CLASS \
+ --conf "\"\$GROOVY_CONF\"" \
+ "\"\$@\""
+ else
+ eval exec "\"\$JAVACMD\"" $JAVA_OPTS \
+ -classpath "\"\$STARTER_CLASSPATH\"" \
+ -Dscript.name="\"\$SCRIPT_PATH\"" \
+ -Dprogram.name="\"\$PROGNAME\"" \
+ -Dgroovy.starter.conf="\"\$GROOVY_CONF\"" \
+ -Dgroovy.home="\"\$GROOVY_HOME\"" \
+ -Dtools.jar="\"\$TOOLS_JAR\"" \
+ $STARTER_MAIN_CLASS \
+ --main $CLASS \
+ --conf "\"\$GROOVY_CONF\"" \
+ --classpath "\"\$CP\"" \
+ "\"\$@\""
+ fi
fi
}
--
2.33.0

View File

@ -0,0 +1,39 @@
From 696538030dcf6ba670cb1dd8f9d762d860aac01c Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Thu, 14 Mar 2024 11:19:28 +0800
Subject: [PATCH] asd
---
.../org/codehaus/groovy/tools/GrapeMain.groovy | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/org/codehaus/groovy/tools/GrapeMain.groovy
index 0a1843d..528e8ed 100644
--- a/src/main/org/codehaus/groovy/tools/GrapeMain.groovy
+++ b/src/main/org/codehaus/groovy/tools/GrapeMain.groovy
@@ -348,10 +348,18 @@ if (cmd.hasOption('v')) {
return
}
-
-cmd.getOptionValues('D')?.each {String prop ->
- def (k, v) = prop.split ('=', 2) as List // array multiple assignment quirk
- System.setProperty(k, v ?: "")
+if (cmd.hasOption('D')) {
+ cmd.getOptionValues('D')?.each {String prop ->
+ while (prop.startsWith("=")) {
+ prop = prop.substring(1, prop.length());
+ }
+ def (k, v) = prop.split ('=', 2) as List // array multiple assignment quirk
+ if (k.isEmpty() || v.isEmpty()) {
+ println "one system property's name or value is emply, skip."
+ } else {
+ System.setProperty(k, v ?: "")
+ }
+ }
}
String[] arg = cmd.args
--
2.33.0

View File

@ -0,0 +1,22 @@
From f8a3b45b926bf2c969c633f2aea44f4c8f007d62 Mon Sep 17 00:00:00 2001
From: sunlan <sunlan@apache.org>
Date: Fri, 8 Dec 2017 08:01:10 +0800
Subject: [PATCH] Speed up class loading of groovy-all files
---
gradle/assemble.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index 20d74d6efd5..42e9e2b76a0 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -397,7 +397,7 @@ task jarAll(type: Jar, dependsOn: replaceJarWithJarJar) {
ant {
copy(file: archivePathTmp, tofile: archivePath)
- jar(destfile: archivePath, update:true, manifest: manifestPath) {
+ jar(destfile: archivePath, update: true, index: true, manifest: manifestPath) {
zipfileset(src: jar.archivePath, excludes:'META-INF')
}
delete(file: archivePathTmp, quiet: true, deleteonexit: true)

View File

@ -761,4 +761,3 @@
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -1,15 +1,15 @@
Name: groovy Name: groovy
Version: 2.4.8 Version: 2.4.8
Release: 9 Release: 13
Summary: Dynamic language for the Java Platform Summary: Dynamic language for the Java Platform
License: ASL 2.0 and BSD and EPL-1.0 and Public Domain and ANTLR-PD and MIT License: ASL 2.0 and BSD and EPL-1.0 and Public Domain and ANTLR-PD and MIT
URL: http://groovy-lang.org URL: http://groovy-lang.org
Source0: https://dl.bintray.com/groovy/maven/apache-groovy-src-%{version}.zip Source0: https://archive.apache.org/dist/groovy/%{version}/sources/apache-groovy-src-%{version}.zip
Source1: groovy-script.sh Source1: groovy-script.sh
Source3: groovy.desktop Source3: groovy.desktop
Source4: cpl-v10.txt Source4: cpl-v10.txt
Source5: epl-v10.txt Source5: epl-v10.txt
Source6: http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/%{version}/groovy-all-%{version}.pom Source6: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/%{version}/groovy-all-%{version}.pom
Patch0: 0001-Port-to-Servlet-API-3.1.patch Patch0: 0001-Port-to-Servlet-API-3.1.patch
Patch1: 0002-Gradle-local-mode.patch Patch1: 0002-Gradle-local-mode.patch
Patch2: 0003-Bintray.patch Patch2: 0003-Bintray.patch
@ -18,6 +18,9 @@ Patch4: 0005-Update-to-QDox-2.0.patch
Patch5: 0006-Disable-artifactory-publish.patch Patch5: 0006-Disable-artifactory-publish.patch
Patch6: 0007-Fix-missing-extension-definitions.patch Patch6: 0007-Fix-missing-extension-definitions.patch
Patch7: CVE-2020-17521.patch Patch7: CVE-2020-17521.patch
Patch8: Speed-up-class-loading-of-groovy-all-files.patch
Patch9: 0008-compatible-for-version-1.8.patch
Patch10: 0009-add-parameter-check-for-grape-define.patch
BuildRequires: gradle-local >= 2.1-0.9 javapackages-local java-devel >= 1.8 ant antlr-tool ant-antlr BuildRequires: gradle-local >= 2.1-0.9 javapackages-local java-devel >= 1.8 ant antlr-tool ant-antlr
BuildRequires: aqute-bnd gpars multiverse apache-parent testng jline apache-commons-cli apache-commons-beanutils BuildRequires: aqute-bnd gpars multiverse apache-parent testng jline apache-commons-cli apache-commons-beanutils
@ -190,8 +193,20 @@ EOF
%doc LICENSE NOTICE README.adoc %doc LICENSE NOTICE README.adoc
%changelog %changelog
* Thu Feb 04 2021 wangyue <wangyue92@huawei.com> 2.4.8-9 * Wed Mar 13 2024 Ge Wang <wang__ge@126.com> - 2.4.8-13
- Add parameter check for grape define
* Tue Feb 20 2024 Ge Wang <wang__ge@126.com> - 2.4.8-12
- Compatible adapter for version 1.8
* Thu Nov 10 2022 liyanan <liyanan32@h-partners.com> - 2.4.8-11
- Change source
* Mon Aug 09 2021 lingsheng <lingsheng@huawei.com> - 2.4.8-10
- Speed up class loading of groovy-all files
* Thu Feb 04 2021 wangyue <wangyue92@huawei.com> - 2.4.8-9
- fix CVE-2020-17521 - fix CVE-2020-17521
* Thu Dec 7 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.8-8 * Tue Dec 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.8-8
- Package init - Package init