Fridrich Strba 2023-09-14 08:04:32 +00:00 committed by Git OBS Bridge
parent 424644ce1e
commit 2db2492097
3 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Sep 14 07:58:44 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* reproducible-properties.patch
+ use SOURCE_DATE_EPOCH for timestamp in the generated
properties files
-------------------------------------------------------------------
Wed Aug 23 06:27:50 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@ -165,6 +165,8 @@ Patch10: memory-limits.patch
Patch12: adlc-parser.patch
# Fix: implicit-pointer-decl
Patch13: implicit-pointer-decl.patch
# Use SOURCE_DATE_EPOCH in timestamp when writing properties
Patch14: reproducible-properties.patch
Patch15: system-pcsclite.patch
Patch16: fips.patch
Patch17: nss-security-provider.patch
@ -406,6 +408,7 @@ rm -rvf src/java.desktop/share/native/liblcms/lcms2*
%patch10 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%if %{with_system_pcsc}
%patch15 -p1

View File

@ -0,0 +1,15 @@
--- a/src/java.base/share/classes/java/util/Properties.java
+++ b/src/java.base/share/classes/java/util/Properties.java
@@ -903,7 +903,11 @@ public class Properties extends Hashtable<Object,Object> {
if (comments != null) {
writeComments(bw, comments);
}
- bw.write("#" + new Date().toString());
+ Date now = new Date();
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+ now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
+ }
+ bw.write("#" + now.toString());
bw.newLine();
synchronized (this) {
for (Map.Entry<Object, Object> e : entrySet()) {