Skip to content

Commit

Permalink
Update glassfish-hk2 to version 2.5.0 / rev 6 via SR 1110690
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1110690
by user fstrba + anag+factory
reproducibility improvements
  • Loading branch information
fstrba authored and bmwiedemann committed Sep 13, 2023
1 parent 241e3e2 commit 0f1235e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
Binary file modified packages/g/glassfish-hk2/.files
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/g/glassfish-hk2/.rev
Expand Up @@ -39,4 +39,12 @@
<comment>Reproducible builds improvement</comment>
<requestid>1109948</requestid>
</revision>
<revision rev="6" vrev="5">
<srcmd5>931c023542cb78fb99123cd22baa5c4e</srcmd5>
<version>2.5.0</version>
<time>1694630646</time>
<user>anag+factory</user>
<comment>reproducibility improvements</comment>
<requestid>1110690</requestid>
</revision>
</revisionlist>
7 changes: 7 additions & 0 deletions packages/g/glassfish-hk2/glassfish-hk2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 12 15:38:18 UTC 2023 - Fridrich Strba <fstrba@suse.com>

- Added patch:
* reproducible-now.patch
+ use SOURCE_DATE_EPOCH also for timestamp in generated files

-------------------------------------------------------------------
Sat Sep 9 13:33:00 UTC 2023 - Fridrich Strba <fstrba@suse.com>

Expand Down
4 changes: 4 additions & 0 deletions packages/g/glassfish-hk2/glassfish-hk2.spec
Expand Up @@ -34,6 +34,8 @@ Patch0: 0001-OSGi-metadata-fixes.patch
Patch1: 0002-Fixed-tests.patch
# Module ambiguous in java 11
Patch2: hk2-jdk11.patch
# Reproducible timestamps
Patch3: reproducible-now.patch
BuildRequires: maven-local
BuildRequires: mvn(aopalliance:aopalliance)
BuildRequires: mvn(javax.annotation:javax.annotation-api)
Expand Down Expand Up @@ -251,6 +253,8 @@ for mod in osgi-resource-locator dependency-verifier dependency-visualizer ; do
%pom_add_parent "org.glassfish.hk2:hk2-parent:%{version}" $mod
done

%patch3 -p1

# Do not remove test resources
find . -name '*.jar' ! -name "gendir.jar" -type f -print -delete
find . -name '*.class' -print -delete
Expand Down
31 changes: 31 additions & 0 deletions packages/g/glassfish-hk2/reproducible-now.patch
@@ -0,0 +1,31 @@
--- glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/internal/GeneratorRunner.java 2023-09-12 17:24:07.673254218 +0200
+++ glassfish-hk2-2.5.0-RELEASE/maven-plugins/hk2-inhabitant-generator/src/main/java/org/jvnet/hk2/generator/internal/GeneratorRunner.java 2023-09-12 17:26:20.997518588 +0200
@@ -378,7 +378,11 @@
private void writeHeader(PrintWriter writer) {
writer.println("#");
if (includeDate) {
- writer.println("# Generated on " + new Date() + " by hk2-inhabitant-generator");
+ Date now = new Date();
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+ now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
+ }
+ writer.println("# Generated on " + now + " by hk2-inhabitant-generator");
}
else {
writer.println("# Generated by hk2-inhabitant-generator");
--- glassfish-hk2-2.5.0-RELEASE/dependency-visualizer/src/main/java/com/sun/enterprise/tools/visualizer/hk2/DotGenerator.java 2023-09-12 17:28:53.991920312 +0200
+++ glassfish-hk2-2.5.0-RELEASE/dependency-visualizer/src/main/java/com/sun/enterprise/tools/visualizer/hk2/DotGenerator.java 2023-09-12 17:30:06.552427028 +0200
@@ -202,8 +202,12 @@
this.wireOut.println("digraph wiring {");
this.wireOut.println("node [color=grey, style=filled];");
this.wireOut.println("node [fontname=\"Verdana\", size=\"30,30\"];");
+ Date now = new Date();
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+ now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
+ }
String date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
- DateFormat.SHORT).format(new Date());
+ DateFormat.SHORT).format(now);
StringBuffer footer = new StringBuffer();
footer.append("graph [ fontname = \"Arial\", fontsize = 26,style = \"bold\", ");
footer.append("label = \"\\nGlassFish v3 OSGi bundle wiring relationship diagram");

0 comments on commit 0f1235e

Please sign in to comment.