From 35e9fae218b1667bac2abdf6c83c7da5107a1580c330140853b6f771a9d45760 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 16:34:58 +0000 Subject: [PATCH 01/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=25 --- groovy18-timestamp.patch | 107 +++++++++++++++++++++++++++++++++++++++ groovy18.changes | 8 +++ groovy18.spec | 4 +- 3 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 groovy18-timestamp.patch diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch new file mode 100644 index 0000000..716fcba --- /dev/null +++ b/groovy18-timestamp.patch @@ -0,0 +1,107 @@ +--- groovy-core-GROOVY_1_8_9/gradle/assemble.gradle 2023-09-14 17:55:59.522896097 +0200 ++++ groovy-core-GROOVY_1_8_9/gradle/assemble.gradle 2023-09-14 18:31:52.621162384 +0200 +@@ -45,6 +45,10 @@ + + binaryJarsMetaInf = { + Date buildTime = new Date() ++ def sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH") ++ if (sourceDateEpoch != null) { ++ buildTime = new Date(1000 * Long.parseLong(sourceDateEpoch)) ++ } + from "$projectDir/LICENSE.txt" + from("$projectDir/src/main/META-INF/groovy-release-info.properties") { + filter {String line -> +--- groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 17:55:59.532896167 +0200 ++++ groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 18:18:30.645595375 +0200 +@@ -16,7 +16,7 @@ + @GroovyASTTransformation(phase=CompilePhase.CONVERSION) + public class CompiledAtASTTransformation implements ASTTransformation { + +- private final static compileTime = new Date().toString() ++ private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(sourceDateEpoch)).toString() : new Date().toString() + + public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { + +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 18:27:30.922678287 +0200 +@@ -62,9 +62,9 @@ + %> + + +- ++ + ${title} +- ++ + + + +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 17:55:59.569563087 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 18:29:48.580300951 +0200 +@@ -38,9 +38,9 @@ + %> + + +- ++ + ${title} +- ++ + + + +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 17:55:59.569563087 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 18:30:08.917108852 +0200 +@@ -3,7 +3,7 @@ + <% def title = subtitle + (props.windowTitle ? " (${props.windowTitle})" : "") %> + + +- ++ + ${title} + + +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 17:55:59.569563087 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 18:29:08.500022604 +0200 +@@ -16,9 +16,9 @@ + %> + + +- ++ + ${title} +- ++ + + + +--- groovy-core-GROOVY_1_8_9/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxTimerFactory.groovy 2023-09-14 17:55:59.506229315 +0200 ++++ groovy-core-GROOVY_1_8_9/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxTimerFactory.groovy 2023-09-14 18:08:37.814820693 +0200 +@@ -93,7 +93,13 @@ + } + + private def getNormalizedDate(date) { +- if (!date) return new Date() ++ if (!date) { ++ def sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH") ++ if (sourceDateEpoch != null) { ++ return new Date(1000 * Long.parseLong(sourceDateEpoch)) ++ } ++ return new Date() ++ } + if (date instanceof Date) { + return date + } +@@ -102,8 +108,12 @@ + case null: + case "now": + default: ++ if (sourceDateEpoch != null) { ++ startDate = new Date(1000 * Long.parseLong(sourceDateEpoch)) ++ } else { + startDate = new Date() + } ++ } + return startDate + } + diff --git a/groovy18.changes b/groovy18.changes index a7adf6e..00a69c8 100644 --- a/groovy18.changes +++ b/groovy18.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Sep 14 16:34:06 UTC 2023 - Fridrich Strba + +- Added patch: + * groovy18-timestamp.patch + + use SOURCE_DATE_EPOCH for timestamp in classes generated by + groovy + ------------------------------------------------------------------- Mon May 16 11:48:35 UTC 2022 - Fridrich Strba diff --git a/groovy18.spec b/groovy18.spec index 9008b91..c0ec125 100644 --- a/groovy18.spec +++ b/groovy18.spec @@ -1,7 +1,7 @@ # # spec file for package groovy18 # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,6 +45,7 @@ Patch10: groovy18-asm7.patch Patch11: groovy18-nofork.patch Patch12: groovy18-jansi.patch Patch13: groovy18-jline2.patch +Patch14: groovy18-timestamp.patch BuildRequires: ant BuildRequires: ant-antlr BuildRequires: antlr @@ -141,6 +142,7 @@ cp %{SOURCE3} . %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # build.xml is not compatible with Ant 1.10+ sed -i "s| depends=\"-excludeLegacyAntVersion\"||" build.xml From a869a78e172bc86884c6202c40ebb2aa3aff14bb8a405a3f597dd82b779b2ec8 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 18:55:03 +0000 Subject: [PATCH 02/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=26 --- groovy18-timestamp.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 716fcba..6725045 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -18,7 +18,7 @@ public class CompiledAtASTTransformation implements ASTTransformation { - private final static compileTime = new Date().toString() -+ private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(sourceDateEpoch)).toString() : new Date().toString() ++ private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).toString() : new Date().toString() public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { @@ -29,10 +29,10 @@ - -+ ++ ${title} - -+ ++ @@ -43,10 +43,10 @@ - -+ ++ ${title} - -+ ++ @@ -57,7 +57,7 @@ - -+ ++ ${title} @@ -68,10 +68,10 @@ - -+ ++ ${title} - -+ ++ From 830a82848ff7459803eab56f054fb7a9ad27761dc7ee213ecca3e56763ce16f3 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 19:12:32 +0000 Subject: [PATCH 03/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=27 --- groovy18-timestamp.patch | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 6725045..3267157 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -1,5 +1,5 @@ --- groovy-core-GROOVY_1_8_9/gradle/assemble.gradle 2023-09-14 17:55:59.522896097 +0200 -+++ groovy-core-GROOVY_1_8_9/gradle/assemble.gradle 2023-09-14 18:31:52.621162384 +0200 ++++ groovy-core-GROOVY_1_8_9/gradle/assemble.gradle 2023-09-14 21:03:58.849056055 +0200 @@ -45,6 +45,10 @@ binaryJarsMetaInf = { @@ -12,7 +12,7 @@ from("$projectDir/src/main/META-INF/groovy-release-info.properties") { filter {String line -> --- groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 17:55:59.532896167 +0200 -+++ groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 18:18:30.645595375 +0200 ++++ groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 21:03:58.849056055 +0200 @@ -16,7 +16,7 @@ @GroovyASTTransformation(phase=CompilePhase.CONVERSION) public class CompiledAtASTTransformation implements ASTTransformation { @@ -23,7 +23,7 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 18:27:30.922678287 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:03:58.849056055 +0200 @@ -62,9 +62,9 @@ %> @@ -37,7 +37,7 @@ --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 18:29:48.580300951 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 21:03:58.849056055 +0200 @@ -38,9 +38,9 @@ %> @@ -51,7 +51,7 @@ --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 18:30:08.917108852 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 21:03:58.849056055 +0200 @@ -3,7 +3,7 @@ <% def title = subtitle + (props.windowTitle ? " (${props.windowTitle})" : "") %> @@ -62,7 +62,7 @@ --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 18:29:08.500022604 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 21:03:58.849056055 +0200 @@ -16,9 +16,9 @@ %> @@ -76,14 +76,14 @@ --- groovy-core-GROOVY_1_8_9/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxTimerFactory.groovy 2023-09-14 17:55:59.506229315 +0200 -+++ groovy-core-GROOVY_1_8_9/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxTimerFactory.groovy 2023-09-14 18:08:37.814820693 +0200 ++++ groovy-core-GROOVY_1_8_9/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxTimerFactory.groovy 2023-09-14 21:08:56.304430856 +0200 @@ -93,7 +93,13 @@ } private def getNormalizedDate(date) { - if (!date) return new Date() ++ def sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH") + if (!date) { -+ def sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH") + if (sourceDateEpoch != null) { + return new Date(1000 * Long.parseLong(sourceDateEpoch)) + } @@ -92,16 +92,13 @@ if (date instanceof Date) { return date } -@@ -102,8 +108,12 @@ - case null: +@@ -103,6 +109,9 @@ case "now": default: + startDate = new Date() + if (sourceDateEpoch != null) { + startDate = new Date(1000 * Long.parseLong(sourceDateEpoch)) -+ } else { - startDate = new Date() ++ } } -+ } return startDate } - From c688cf52709360109ded4f62675bd2903cac79f7a236b9a53eca9ac99703ec85 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 19:34:56 +0000 Subject: [PATCH 04/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=28 --- groovy18-timestamp.patch | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 3267157..e795acf 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -12,66 +12,63 @@ from("$projectDir/src/main/META-INF/groovy-release-info.properties") { filter {String line -> --- groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 17:55:59.532896167 +0200 -+++ groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 21:03:58.849056055 +0200 ++++ groovy-core-GROOVY_1_8_9/src/examples/transforms/global/CompiledAtASTTransformation.groovy 2023-09-14 21:31:24.853487358 +0200 @@ -16,7 +16,7 @@ @GroovyASTTransformation(phase=CompilePhase.CONVERSION) public class CompiledAtASTTransformation implements ASTTransformation { - private final static compileTime = new Date().toString() -+ private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).toString() : new Date().toString() ++ private final static compileTime = (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).toString() public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:03:58.849056055 +0200 -@@ -62,9 +62,9 @@ ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 +@@ -62,9 +62,8 @@ %> - -+ ++ ${title} - -+ --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 21:03:58.849056055 +0200 -@@ -38,9 +38,9 @@ ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/deprecated-list.html 2023-09-14 21:14:47.296829350 +0200 +@@ -38,9 +38,8 @@ %> - -+ ++ ${title} - -+ --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 21:03:58.849056055 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/help-doc.html 2023-09-14 21:14:32.966733748 +0200 @@ -3,7 +3,7 @@ <% def title = subtitle + (props.windowTitle ? " (${props.windowTitle})" : "") %> - -+ ++ ${title} --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 17:55:59.569563087 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 21:03:58.849056055 +0200 -@@ -16,9 +16,9 @@ ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/index-all.html 2023-09-14 21:15:03.270269230 +0200 +@@ -16,9 +16,8 @@ %> - -+ ++ ${title} - -+ From 086ed3147dc6f273f20b432f86bc232a52a3e0028772c6af40292928589bab33 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 21:44:56 +0000 Subject: [PATCH 05/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=29 --- groovy18-timestamp.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index e795acf..0669c5c 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -18,7 +18,7 @@ public class CompiledAtASTTransformation implements ASTTransformation { - private final static compileTime = new Date().toString() -+ private final static compileTime = (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).toString() ++ private final static compileTime = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).toString() public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { From fb4f63b6f72e4e3b809e4ba3d6ffe4ad9cfd5243db88372f819d1455429f8234 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 21:57:41 +0000 Subject: [PATCH 06/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=30 --- groovy18-timestamp.patch | 2 +- groovy18.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 0669c5c..e795acf 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -18,7 +18,7 @@ public class CompiledAtASTTransformation implements ASTTransformation { - private final static compileTime = new Date().toString() -+ private final static compileTime = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).toString() ++ private final static compileTime = (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).toString() public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { diff --git a/groovy18.spec b/groovy18.spec index c0ec125..63a293f 100644 --- a/groovy18.spec +++ b/groovy18.spec @@ -190,7 +190,7 @@ export CLASSPATH=$(build-classpath ant/ant-antlr) %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} export ANT_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED" %endif -%ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ +%ant -v -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ createJars javadoc %install From cb38a75c3c1c5a53feb1a312a211a8fd1e097dfd2b3868d9361d37e35a82fd5a Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 22:15:59 +0000 Subject: [PATCH 07/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=31 --- groovy18-timestamp.patch | 18 ++++++++++++++++++ groovy18.spec | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index e795acf..220f92a 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -22,6 +22,24 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:20.536016445 +0200 +@@ -432,13 +432,13 @@ + ClassHelper.long_TYPE, + //"", + node, +- new ConstantExpression(System.currentTimeMillis())); ++ new ConstantExpression((System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).getTime())); + // alternatively, FieldNode timeTagField = SourceUnit.createFieldNode("public static final long __timeStamp = " + System.currentTimeMillis() + "L"); + timeTagField.setSynthetic(true); + node.addField(timeTagField); + + timeTagField = new FieldNode( +- Verifier.__TIMESTAMP__ + String.valueOf(System.currentTimeMillis()), ++ Verifier.__TIMESTAMP__ + String.valueOf((System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).getTime()), + ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, + ClassHelper.long_TYPE, + //"", --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 @@ -62,9 +62,8 @@ diff --git a/groovy18.spec b/groovy18.spec index 63a293f..c0ec125 100644 --- a/groovy18.spec +++ b/groovy18.spec @@ -190,7 +190,7 @@ export CLASSPATH=$(build-classpath ant/ant-antlr) %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} export ANT_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED" %endif -%ant -v -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ +%ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ createJars javadoc %install From 804a5e61b100049fa13fa65ee6b6eec4da788414e887f33e40d621f5a8c4a108 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 23:06:38 +0000 Subject: [PATCH 08/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=32 --- groovy18-timestamp.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 220f92a..f4dbae8 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -23,7 +23,7 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:20.536016445 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:04:37.502489263 +0200 @@ -432,13 +432,13 @@ ClassHelper.long_TYPE, //"", @@ -40,6 +40,15 @@ ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, ClassHelper.long_TYPE, //"", +@@ -1051,7 +1051,7 @@ + } + + protected void addCovariantMethods(ClassNode classNode) { +- Map methodsToAdd = new HashMap(); ++ Map methodsToAdd = new LinkedHashMap(); + Map genericsSpec = new HashMap(); + + // unimplemented abstract methods from interfaces --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 @@ -62,9 +62,8 @@ From 6fb4401416819a599cd6436140f99204b3f355002361cdfaf7e087200c9c50ac Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 23:19:43 +0000 Subject: [PATCH 09/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=33 --- groovy18-timestamp.patch | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index f4dbae8..9e3d0d7 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -23,7 +23,7 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:04:37.502489263 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:19:28.711554694 +0200 @@ -432,13 +432,13 @@ ClassHelper.long_TYPE, //"", @@ -40,15 +40,41 @@ ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, ClassHelper.long_TYPE, //"", -@@ -1051,7 +1051,7 @@ +@@ -1051,12 +1051,12 @@ } protected void addCovariantMethods(ClassNode classNode) { - Map methodsToAdd = new HashMap(); +- Map genericsSpec = new HashMap(); + Map methodsToAdd = new LinkedHashMap(); - Map genericsSpec = new HashMap(); ++ Map genericsSpec = new LinkedHashMap(); // unimplemented abstract methods from interfaces +- Map abstractMethods = new HashMap(); +- Map allInterfaceMethods = new HashMap(); ++ Map abstractMethods = new LinkedHashMap(); ++ Map allInterfaceMethods = new LinkedHashMap(); + ClassNode[] interfaces = classNode.getInterfaces(); + for (ClassNode iface : interfaces) { + Map ifaceMethodsMap = iface.getDeclaredMethodsMap(); +@@ -1086,7 +1086,7 @@ + + addCovariantMethods(classNode, declaredMethods, abstractMethods, methodsToAdd, genericsSpec); + +- Map declaredMethodsMap = new HashMap(); ++ Map declaredMethodsMap = new LinkedHashMap(); + if (methodsToAdd.size() > 0) { + for (MethodNode mn : declaredMethods) { + declaredMethodsMap.put(mn.getTypeDescriptor(), mn); +@@ -1336,7 +1336,7 @@ + } + + private Map createGenericsSpec(ClassNode current, Map oldSpec) { +- Map ret = new HashMap(oldSpec); ++ Map ret = new LinkedHashMap(oldSpec); + // ret contains the type specs, what we now need is the type spec for the + // current class. To get that we first apply the type parameters to the + // current class and then use the type names of the current class to reset --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 @@ -62,9 +62,8 @@ From 69ff199d585ed88f044fbc19402410fb140004ec0a45bdc3e9a01363bcd1a917 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 23:28:02 +0000 Subject: [PATCH 10/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=34 --- groovy18-timestamp.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 9e3d0d7..1773be5 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -23,7 +23,7 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:19:28.711554694 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:27:52.518115209 +0200 @@ -432,13 +432,13 @@ ClassHelper.long_TYPE, //"", @@ -46,14 +46,14 @@ protected void addCovariantMethods(ClassNode classNode) { - Map methodsToAdd = new HashMap(); - Map genericsSpec = new HashMap(); -+ Map methodsToAdd = new LinkedHashMap(); -+ Map genericsSpec = new LinkedHashMap(); ++ Map methodsToAdd = new TreeMap(); ++ Map genericsSpec = new TreeMap(); // unimplemented abstract methods from interfaces - Map abstractMethods = new HashMap(); - Map allInterfaceMethods = new HashMap(); -+ Map abstractMethods = new LinkedHashMap(); -+ Map allInterfaceMethods = new LinkedHashMap(); ++ Map abstractMethods = new TreeMap(); ++ Map allInterfaceMethods = new TreeMap(); ClassNode[] interfaces = classNode.getInterfaces(); for (ClassNode iface : interfaces) { Map ifaceMethodsMap = iface.getDeclaredMethodsMap(); @@ -62,7 +62,7 @@ addCovariantMethods(classNode, declaredMethods, abstractMethods, methodsToAdd, genericsSpec); - Map declaredMethodsMap = new HashMap(); -+ Map declaredMethodsMap = new LinkedHashMap(); ++ Map declaredMethodsMap = new TreeMap(); if (methodsToAdd.size() > 0) { for (MethodNode mn : declaredMethods) { declaredMethodsMap.put(mn.getTypeDescriptor(), mn); @@ -71,7 +71,7 @@ private Map createGenericsSpec(ClassNode current, Map oldSpec) { - Map ret = new HashMap(oldSpec); -+ Map ret = new LinkedHashMap(oldSpec); ++ Map ret = new TreeMap(oldSpec); // ret contains the type specs, what we now need is the type spec for the // current class. To get that we first apply the type parameters to the // current class and then use the type names of the current class to reset From c5d29bd025c8784507f4c686c7d9a2a1fe8840449f9063d6693142c40b1b5ebc Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2023 23:34:19 +0000 Subject: [PATCH 11/11] OBS-URL: https://build.opensuse.org/package/show/Java:packages/groovy18?expand=0&rev=35 --- groovy18-timestamp.patch | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index 1773be5..63729a7 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -23,7 +23,7 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 -+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:27:52.518115209 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 01:32:16.059801789 +0200 @@ -432,13 +432,13 @@ ClassHelper.long_TYPE, //"", @@ -40,41 +40,6 @@ ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, ClassHelper.long_TYPE, //"", -@@ -1051,12 +1051,12 @@ - } - - protected void addCovariantMethods(ClassNode classNode) { -- Map methodsToAdd = new HashMap(); -- Map genericsSpec = new HashMap(); -+ Map methodsToAdd = new TreeMap(); -+ Map genericsSpec = new TreeMap(); - - // unimplemented abstract methods from interfaces -- Map abstractMethods = new HashMap(); -- Map allInterfaceMethods = new HashMap(); -+ Map abstractMethods = new TreeMap(); -+ Map allInterfaceMethods = new TreeMap(); - ClassNode[] interfaces = classNode.getInterfaces(); - for (ClassNode iface : interfaces) { - Map ifaceMethodsMap = iface.getDeclaredMethodsMap(); -@@ -1086,7 +1086,7 @@ - - addCovariantMethods(classNode, declaredMethods, abstractMethods, methodsToAdd, genericsSpec); - -- Map declaredMethodsMap = new HashMap(); -+ Map declaredMethodsMap = new TreeMap(); - if (methodsToAdd.size() > 0) { - for (MethodNode mn : declaredMethods) { - declaredMethodsMap.put(mn.getTypeDescriptor(), mn); -@@ -1336,7 +1336,7 @@ - } - - private Map createGenericsSpec(ClassNode current, Map oldSpec) { -- Map ret = new HashMap(oldSpec); -+ Map ret = new TreeMap(oldSpec); - // ret contains the type specs, what we now need is the type spec for the - // current class. To get that we first apply the type parameters to the - // current class and then use the type names of the current class to reset --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 @@ -62,9 +62,8 @@