ASF Bugzilla – Attachment 36845 Details for
Bug 62617
Honor SOURCE_DATE_EPOCH to allow reproducible builds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
new patch
0001-bz-62617-Honor-SOURCE_DATE_EPOCH-to-allow-reproducib.patch (text/plain), 1.50 KB, created by
Julien Lepiller
on 2019-10-17 11:32:17 UTC
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
Julien Lepiller
Created:
2019-10-17 11:32:17 UTC
Size:
1.50 KB
patch
obsolete
>From 3450698be0ced8ceb3761c57897880da42afbb4d Mon Sep 17 00:00:00 2001 >From: Julien Lepiller <julien@lepiller.eu> >Date: Thu, 17 Oct 2019 13:30:29 +0200 >Subject: [PATCH] bz-62617: Honor SOURCE_DATE_EPOCH to allow reproducible > builds. > >--- > WHATSNEW | 2 ++ > src/main/org/apache/tools/ant/taskdefs/Tstamp.java | 7 +++++++ > 2 files changed, 9 insertions(+) > >diff --git a/WHATSNEW b/WHATSNEW >index ab9d21094..c58c980cd 100644 >--- a/WHATSNEW >+++ b/WHATSNEW >@@ -18,6 +18,8 @@ Other changes: > * The runant.py script should now work with Python 3. > Github Pull Request #96 > >+ * tstamp honors SOURCE_DATE_EPOCH for reproducible builds. >+ > Changes from Ant 1.10.6 TO Ant 1.10.7 > ===================================== > >diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java >index 226419c31..a8e0a9b7a 100644 >--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java >+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java >@@ -75,6 +75,13 @@ public class Tstamp extends Task { > public void execute() throws BuildException { > try { > Date d = getNow(); >+ try { >+ String epoch = System.getenv("SOURCE_DATE_EPOCH"); >+ if (epoch != null) >+ d = new Date(Integer.parseInt(epoch) * 1000); >+ } catch(NumberFormatException e) { >+ } >+ > > customFormats.forEach(cts -> cts.execute(getProject(), d, getLocation())); > >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62617
:
36086
| 36845