This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new f558a19 Reproducible builds: Make jdbc-pool JAR reproducible
f558a19 is described below
commit f558a1984ea60318e7d3405b1fbe2a246edc49b4
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Mar 18 16:05:44 2021 +0000
Reproducible builds: Make jdbc-pool JAR reproducible
---
build.xml | 1 +
modules/jdbc-pool/build.properties.default | 4 ++++
modules/jdbc-pool/build.xml | 20 ++++++++++++++++++--
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index 710d962..1bc68b7 100644
--- a/build.xml
+++ b/build.xml
@@ -1551,6 +1551,7 @@
<echo message="Building Tomcat JDBC pool libraries"/>
<ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
inheritAll="false" target="build">
+ <property name="ant.tstamp.now.iso" value ="${ant.tstamp.now.iso}" />
<property name="tomcat.pool" value="${tomcat.pool}" />
<property name="tomcat.juli.jar" value="${tomcat-juli.jar}" />
<property name="skip.download" value="set"/>
diff --git a/modules/jdbc-pool/build.properties.default
b/modules/jdbc-pool/build.properties.default
index 753da45..6131bd7 100644
--- a/modules/jdbc-pool/build.properties.default
+++ b/modules/jdbc-pool/build.properties.default
@@ -29,6 +29,10 @@ version.build=0
version.patch=1
version.suffix=
+# ----- Reproducible builds -----
+# Uncomment and set to current time for reproducible builds
+#ant.tstamp.now.iso=2021-03-18T06:00:00Z
+
# ----- Default Base Path for Dependent Packages -----
# Please note this path must be absolute, not relative,
# as it is referenced with different working directory
diff --git a/modules/jdbc-pool/build.xml b/modules/jdbc-pool/build.xml
index 6d41d22..3bc8c3d 100644
--- a/modules/jdbc-pool/build.xml
+++ b/modules/jdbc-pool/build.xml
@@ -85,6 +85,9 @@
</fileset>
<!-- Version info filter set -->
+ <tstamp>
+ <format property="tstamp.file" pattern="MM/dd/yyyy hh:mm:ss aa"/>
+ </tstamp>
<filterset id="version.filters">
<filter token="YEAR" value="${year}"/>
<filter token="VERSION" value="${version}"/>
@@ -157,8 +160,21 @@
<include name="org/apache/tomcat/jdbc/**" />
</javac>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.classes}"/>
+ <fileset dir="${tomcat.pool}/resources"/>
+ <fileset dir="${basedir}/src/main/java">
+ <include name="org/apache/tomcat/jdbc/**/*.xml" />
+ </fileset>
+ <fileset refid="license.notice"/>
+ </touch>
+
<!-- connection pool JAR File -->
- <jar jarfile="${tomcat-jdbc.jar}" update="true"
manifest="${tomcat.pool}/resources/MANIFEST.MF">
+ <zip destfile="${tomcat-jdbc.jar}" update="true">
+ <zipfileset file="${tomcat.pool}/resources" fullpath="META-INF" />
+ <zipfileset file="${tomcat.pool}/resources/MANIFEST.MF"
+ fullpath="META-INF/MANIFEST.MF" />
<fileset dir="${tomcat.classes}">
<include name="org/apache/tomcat/jdbc/**" />
</fileset>
@@ -166,7 +182,7 @@
<include name="org/apache/tomcat/jdbc/**/*.xml" />
</fileset>
<fileset refid="license.notice"/>
- </jar>
+ </zip>
</target>
<target name="build-src">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]