Commit f668ce1d authored by Emmanuel Bourg's avatar Emmanuel Bourg

Refreshed the patches

parent 2ed65e69
ant (1.10.1-1) UNRELEASED; urgency=medium
ant (1.10.2-1) UNRELEASED; urgency=medium
* New upstream release
- Refreshed the patches
......
......@@ -3,10 +3,11 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
@@ -70,20 +70,51 @@
@@ -76,16 +76,49 @@
try {
Date d = new Date();
Date d = getNow();
- customFormats.forEach(cts -> cts.execute(getProject(), d, getLocation()));
+ boolean reproducibleBuild = false;
+
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
......@@ -21,9 +22,7 @@ Forwarded: no
+ }
+ }
+
Enumeration i = customFormats.elements();
while (i.hasMoreElements()) {
CustomFormat cts = (CustomFormat) i.nextElement();
+ for (CustomFormat cts : customFormats) {
+ if (reproducibleBuild) {
+ if (cts.getTimezone() == null) {
+ cts.setTimezone("UTC");
......@@ -32,30 +31,30 @@ Forwarded: no
+ cts.setLocale("en_US");
+ }
+ }
cts.execute(getProject(), d, getLocation());
}
+ cts.execute(getProject(), d, getLocation());
+ }
SimpleDateFormat dstamp = new SimpleDateFormat ("yyyyMMdd");
SimpleDateFormat dstamp = new SimpleDateFormat("yyyyMMdd");
+ if (reproducibleBuild) {
+ dstamp.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
+ }
setProperty("DSTAMP", dstamp.format(d));
SimpleDateFormat tstamp = new SimpleDateFormat ("HHmm");
SimpleDateFormat tstamp = new SimpleDateFormat("HHmm");
+ if (reproducibleBuild) {
+ tstamp.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
+ }
setProperty("TSTAMP", tstamp.format(d));
SimpleDateFormat today
= new SimpleDateFormat ("MMMM d yyyy", Locale.US);
= new SimpleDateFormat("MMMM d yyyy", Locale.US);
+ if (reproducibleBuild) {
+ today.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
+ }
setProperty("TODAY", today.format(d));
} catch (Exception e) {
@@ -183,6 +214,10 @@
@@ -220,6 +253,10 @@
}
}
......@@ -66,7 +65,7 @@ Forwarded: no
/**
* The timezone to use for displaying time.
* The values are as defined by the Java TimeZone class.
@@ -193,6 +228,10 @@
@@ -230,6 +267,10 @@
timeZone = TimeZone.getTimeZone(id);
}
......
......@@ -5,7 +5,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -1703,6 +1703,16 @@
@@ -1700,6 +1700,16 @@
*/
@Override
public void execute() throws BuildException {
......@@ -21,4 +21,4 @@ Forwarded: no
+
checkTaskName();
final Vector<String> packagesToDoc = new Vector<String>();
final List<String> packagesToDoc = new Vector<>();
......@@ -5,7 +5,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/util/DateUtils.java
+++ b/src/main/org/apache/tools/ant/util/DateUtils.java
@@ -208,6 +208,10 @@
@@ -238,6 +238,10 @@
*/
public static String getDateForHeader() {
Calendar cal = Calendar.getInstance();
......@@ -16,7 +16,7 @@ Forwarded: no
TimeZone tz = cal.getTimeZone();
int offset = tz.getOffset(cal.get(Calendar.ERA),
cal.get(Calendar.YEAR),
@@ -228,6 +232,7 @@
@@ -258,6 +262,7 @@
}
tzMarker.append(minutes);
synchronized (DATE_HEADER_FORMAT_INT) {
......
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -207,7 +207,10 @@
@@ -213,7 +213,10 @@
*/
public String getSource() {
return source != null
......@@ -15,7 +15,7 @@ Forwarded: no
}
/**
@@ -786,7 +789,10 @@
@@ -792,7 +795,10 @@
public String getTarget() {
return targetAttribute != null
? targetAttribute
......@@ -27,7 +27,7 @@ Forwarded: no
}
/**
@@ -1109,6 +1115,9 @@
@@ -1121,6 +1127,9 @@
checkParameters();
resetFileLists();
......@@ -39,7 +39,7 @@ Forwarded: no
if (hasPath(src)) {
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2203,7 +2203,12 @@
@@ -2174,7 +2174,12 @@
: getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE);
if (sourceArg != null) {
toExecute.createArgument().setValue("-source");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment