Fridrich Strba 2023-09-11 12:52:47 +00:00 committed by Git OBS Bridge
parent 950e76dd88
commit 0615f32bb7
9 changed files with 69 additions and 0 deletions

View File

@ -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>

View File

@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.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: java-devel >= 1.8
BuildRequires: javapackages-local
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# clean jar files
find . -name "*.jar" -print -delete

View File

@ -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>

View File

@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.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: java-devel >= 1.8
BuildRequires: javapackages-local
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# clean jar files
find . -name "*.jar" -print -delete

View File

@ -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>

View File

@ -44,6 +44,8 @@ Patch3: reproducible-build-date.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.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: java-devel >= 1.8
BuildRequires: javapackages-local
@ -392,6 +394,7 @@ find -name \*.jar -print -delete
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# clean jar files
find . -name "*.jar" -print -delete

View File

@ -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>

View File

@ -43,6 +43,8 @@ Patch3: reproducible-build-date.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.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: java-devel >= 1.8
BuildRequires: javapackages-local
@ -391,6 +393,7 @@ find -name \*.jar -print -delete
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# clean jar files
find . -name "*.jar" -print -delete

View 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();
}
}