Accepting request 1110311 from Java:packages
reproducible timestamp in property files OBS-URL: https://build.opensuse.org/request/show/1110311 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ant?expand=0&rev=92
This commit is contained in:
commit
93bb27927c
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 11 12:50:03 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* reproducible-propertyfile-task.patch
|
||||||
|
+ Debian patch to improve propertyfile task in RPM builds by
|
||||||
|
using the date specified by the SOURCE_DATE_EPOCH variable
|
||||||
|
in the header of the .properties file generated
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
|
|||||||
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
Patch5: reproducible-build-manifest.patch
|
Patch5: reproducible-build-manifest.patch
|
||||||
Patch6: apache-ant-xml-apis.patch
|
Patch6: apache-ant-xml-apis.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE debian patch to use SOURCE_DATE_EPOCH for timestamp in property files
|
||||||
|
Patch7: reproducible-propertyfile-task.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 11 12:50:03 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* reproducible-propertyfile-task.patch
|
||||||
|
+ Debian patch to improve propertyfile task in RPM builds by
|
||||||
|
using the date specified by the SOURCE_DATE_EPOCH variable
|
||||||
|
in the header of the .properties file generated
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
|
|||||||
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
Patch5: reproducible-build-manifest.patch
|
Patch5: reproducible-build-manifest.patch
|
||||||
Patch6: apache-ant-xml-apis.patch
|
Patch6: apache-ant-xml-apis.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE debian patch to use SOURCE_DATE_EPOCH for timestamp in property files
|
||||||
|
Patch7: reproducible-propertyfile-task.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 11 12:50:03 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* reproducible-propertyfile-task.patch
|
||||||
|
+ Debian patch to improve propertyfile task in RPM builds by
|
||||||
|
using the date specified by the SOURCE_DATE_EPOCH variable
|
||||||
|
in the header of the .properties file generated
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
|
|||||||
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
Patch5: reproducible-build-manifest.patch
|
Patch5: reproducible-build-manifest.patch
|
||||||
Patch6: apache-ant-xml-apis.patch
|
Patch6: apache-ant-xml-apis.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE debian patch to use SOURCE_DATE_EPOCH for timestamp in property files
|
||||||
|
Patch7: reproducible-propertyfile-task.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 11 12:50:03 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* reproducible-propertyfile-task.patch
|
||||||
|
+ Debian patch to improve propertyfile task in RPM builds by
|
||||||
|
using the date specified by the SOURCE_DATE_EPOCH variable
|
||||||
|
in the header of the .properties file generated
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
Thu Aug 31 06:49:53 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
3
ant.spec
3
ant.spec
@ -43,6 +43,8 @@ Patch3: reproducible-build-date.patch
|
|||||||
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
Patch5: reproducible-build-manifest.patch
|
Patch5: reproducible-build-manifest.patch
|
||||||
Patch6: apache-ant-xml-apis.patch
|
Patch6: apache-ant-xml-apis.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE debian patch to use SOURCE_DATE_EPOCH for timestamp in property files
|
||||||
|
Patch7: reproducible-propertyfile-task.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -391,6 +393,7 @@ find -name \*.jar -print -delete
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
21
reproducible-propertyfile-task.patch
Normal file
21
reproducible-propertyfile-task.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--- apache-ant-1.10.14/src/main/org/apache/tools/ant/util/DateUtils.java 2023-09-11 14:41:39.980341631 +0200
|
||||||
|
+++ apache-ant-1.10.14/src/main/org/apache/tools/ant/util/DateUtils.java 2023-09-11 14:46:43.779148231 +0200
|
||||||
|
@@ -227,6 +227,10 @@
|
||||||
|
*/
|
||||||
|
public static String getDateForHeader() {
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
|
||||||
|
+ cal.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
+ cal.setTime(new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))));
|
||||||
|
+ }
|
||||||
|
TimeZone tz = cal.getTimeZone();
|
||||||
|
int offset = tz.getOffset(cal.get(Calendar.ERA),
|
||||||
|
cal.get(Calendar.YEAR),
|
||||||
|
@@ -247,6 +251,7 @@
|
||||||
|
}
|
||||||
|
tzMarker.append(minutes);
|
||||||
|
synchronized (DATE_HEADER_FORMAT_INT) {
|
||||||
|
+ DATE_HEADER_FORMAT_INT.setTimeZone(tz);
|
||||||
|
return DATE_HEADER_FORMAT_INT.format(cal.getTime()) + tzMarker.toString();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user