You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/03/19 16:14:06 UTC
[tomcat] branch 9.0.x updated (d988741 -> f79d84f)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
from d988741 Reproducible builds: Make jdbc-pool JAR reproducible
new 974af56 Reproducible builds: XReflectionIntrospectionUtils.java
new f79d84f Reproducible builds: Binary packages (excluding installer)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
build.xml | 76 +++++++++++++++++++++-
.../ObjectReflectionPropertyInspector.java | 3 +-
.../util/xreflection/ReflectionProperty.java | 12 +++-
.../tomcat/util/xreflection/SetPropertyClass.java | 13 ++--
4 files changed, 96 insertions(+), 8 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/02: Reproducible builds:
XReflectionIntrospectionUtils.java
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 974af564eb4e0e0fe873b3ae0f80f0ed29d32da8
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Mar 18 19:50:00 2021 +0000
Reproducible builds: XReflectionIntrospectionUtils.java
---
.../util/xreflection/ObjectReflectionPropertyInspector.java | 3 ++-
.../apache/tomcat/util/xreflection/ReflectionProperty.java | 12 +++++++++++-
.../apache/tomcat/util/xreflection/SetPropertyClass.java | 13 +++++++++----
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/tomcat/util/xreflection/ObjectReflectionPropertyInspector.java b/java/org/apache/tomcat/util/xreflection/ObjectReflectionPropertyInspector.java
index dc101cb..f27a27f 100644
--- a/java/org/apache/tomcat/util/xreflection/ObjectReflectionPropertyInspector.java
+++ b/java/org/apache/tomcat/util/xreflection/ObjectReflectionPropertyInspector.java
@@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@@ -64,7 +65,7 @@ public final class ObjectReflectionPropertyInspector {
private static final Set<Class<?>> getKnownClasses() throws ClassNotFoundException {
return
- Collections.unmodifiableSet(new HashSet<>(
+ Collections.unmodifiableSet(new LinkedHashSet<>(
Arrays.asList(
Class.forName("org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider"),
Class.forName("org.apache.catalina.authenticator.jaspic.PersistentProviderRegistrations$Property"),
diff --git a/java/org/apache/tomcat/util/xreflection/ReflectionProperty.java b/java/org/apache/tomcat/util/xreflection/ReflectionProperty.java
index f74f7c0..46d4447 100644
--- a/java/org/apache/tomcat/util/xreflection/ReflectionProperty.java
+++ b/java/org/apache/tomcat/util/xreflection/ReflectionProperty.java
@@ -19,7 +19,7 @@ package org.apache.tomcat.util.xreflection;
import java.lang.reflect.Method;
import java.net.InetAddress;
-final class ReflectionProperty {
+final class ReflectionProperty implements Comparable<ReflectionProperty> {
private final String clazz;
private final String propertyName;
private final Class<?> propertyType;
@@ -116,4 +116,14 @@ final class ReflectionProperty {
sb.append('}');
return sb.toString();
}
+
+ @Override
+ public int compareTo(ReflectionProperty o) {
+ // Class then property name
+ int result = clazz.compareTo(o.clazz);
+ if (result == 0) {
+ result = propertyName.compareTo(o.propertyName);
+ }
+ return result;
+ }
}
diff --git a/java/org/apache/tomcat/util/xreflection/SetPropertyClass.java b/java/org/apache/tomcat/util/xreflection/SetPropertyClass.java
index 55a68c4..389a483 100644
--- a/java/org/apache/tomcat/util/xreflection/SetPropertyClass.java
+++ b/java/org/apache/tomcat/util/xreflection/SetPropertyClass.java
@@ -18,12 +18,12 @@ package org.apache.tomcat.util.xreflection;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.util.HashSet;
import java.util.Set;
+import java.util.TreeSet;
import org.apache.tomcat.util.IntrospectionUtils;
-final class SetPropertyClass {
+final class SetPropertyClass implements Comparable<SetPropertyClass> {
static final String OBJECT_VAR_NAME = "o";
static final String NAME_VAR_NAME = "name";
@@ -32,8 +32,8 @@ final class SetPropertyClass {
private final SetPropertyClass parent;
private final Class<?> clazz;
- private Set<SetPropertyClass> children = new HashSet<>();
- private Set<ReflectionProperty> properties = new HashSet<>();
+ private Set<SetPropertyClass> children = new TreeSet<>();
+ private Set<ReflectionProperty> properties = new TreeSet<>();
private final boolean isAbstract;
private final Method genericSetPropertyMethod;
private final Method genericGetPropertyMethod;
@@ -433,4 +433,9 @@ final class SetPropertyClass {
return code.toString();
}
+
+ @Override
+ public int compareTo(SetPropertyClass o) {
+ return clazz.getName().compareTo(o.clazz.getName());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/02: Reproducible builds: Binary packages (excluding
installer)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit f79d84fecbcb5bea7cf52fe0e0f84675940940a1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Mar 18 20:53:49 2021 +0000
Reproducible builds: Binary packages (excluding installer)
---
build.xml | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 74 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index d7a0353..e975fa6 100644
--- a/build.xml
+++ b/build.xml
@@ -1751,6 +1751,12 @@
<classpath refid="compile.classpath" />
</javac>
+ <!-- Reproducible builds: consistent timestamps for class files and other
+ files placed in JARs -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${xreflect.directory}/classes"/>
+ </touch>
+
<!-- Create the binary JAR file -->
<jarIt jarfile="${tomcat-embed-programmatic.jar}"
filesDir="${xreflect.directory}/classes"
@@ -1786,6 +1792,12 @@
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
+
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.embed}"/>
+ </touch>
+
<zip destfile="${tomcat.embed}/${final.name}-embed.zip">
<fileset dir="${tomcat.embed}">
<include name="**" />
@@ -1801,6 +1813,12 @@
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
+
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.embed}"/>
+ </touch>
+
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.embed}/${final.name}-embed.tar.gz">
<tarfileset dir="${tomcat.embed}" prefix="${final.name}-embed">
@@ -2422,7 +2440,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
</copy>
<!-- Digester and dependencies -->
- <jar jarfile="${tomcat.deployer}/lib/catalina-deployer.jar">
+ <zip destfile="${tomcat.deployer}/lib/catalina-deployer.jar">
<fileset dir="${tomcat.classes}">
<include name="org/apache/catalina/startup/DigesterFactory.class" />
<include name="org/apache/catalina/util/SchemaResolver.class" />
@@ -2447,7 +2465,14 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
- </jar>
+ <zipfileset file="${tomcat.manifests}" fullpath="META-INF" />
+ <zipfileset file="${tomcat.manifests}/default.manifest"
+ fullpath="META-INF/MANIFEST.MF" />
+ <zipfileset file="${tomcat.manifests}/default.notice"
+ fullpath="META-INF/NOTICE" />
+ <zipfileset file="${tomcat.manifests}/default.license"
+ fullpath="META-INF/LICENSE" />
+ </zip>
<!-- Main build script -->
<copy todir="${tomcat.deployer}">
@@ -2698,7 +2723,13 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}.zip">
+ <zipfileset file="${tomcat.dist}" fullpath="${final.name}"/>
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
@@ -2731,8 +2762,14 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<!-- Windows x86 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x86.zip">
+ <zipfileset file="${tomcat.dist}" fullpath="${final.name}"/>
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
@@ -2758,6 +2795,7 @@ skip.installer property in build.properties" />
<!-- Windows x64 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x64.zip">
+ <zipfileset file="${tomcat.dist}" fullpath="${final.name}"/>
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
@@ -2798,7 +2836,14 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ <fileset dir="${tomcat.deployer}"/>
+ </touch>
+
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.zip">
+ <zipfileset file="${tomcat.deployer}" fullpath="${final.name}-deployer"/>
<zipfileset dir="${tomcat.deployer}" prefix="${final.name}-deployer" includes="**" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="LICENSE" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="NOTICE" />
@@ -2816,6 +2861,11 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}.tar.gz">
<tarfileset dir="${tomcat.dist}" dirmode="700" filemode="600" prefix="${final.name}">
@@ -2864,6 +2914,12 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ <fileset dir="${tomcat.deployer}"/>
+ </touch>
+
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="${final.name}-deployer">
@@ -2887,6 +2943,11 @@ skip.installer property in build.properties" />
<patternset refid="text.files" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="tomcat-${version.major.minor}-doc">
@@ -2911,7 +2972,13 @@ skip.installer property in build.properties" />
<include name="bin/*.sh" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<zip zipfile="${tomcat.release}/v${version}/src/${final-src.name}.zip">
+ <zipfileset file="${tomcat.dist}/src" fullpath="${final-src.name}" />
<zipfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
</zip>
@@ -2927,6 +2994,11 @@ skip.installer property in build.properties" />
<include name="bin/*.sh" />
</fixcrlf>
+ <!-- Reproducible builds: consistent timestamps for distributed files -->
+ <touch datetime="${tstamp.file}" pattern="MM/dd/yyyy hh:mm:ss aa">
+ <fileset dir="${tomcat.dist}"/>
+ </touch>
+
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz">
<tarfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org