Debian: Add build option for reproducible builds;

remove timestamp from manifests and javadocs (ticket #2279)
This commit is contained in:
zzz
2018-06-28 18:47:45 +00:00
parent 9b17b52b39
commit d8cc2a3560
3 changed files with 12 additions and 4 deletions

View File

@@ -140,6 +140,8 @@ javac.version=1.7
#bundle.routerInfos.i2pConfigDir=/PATH/TO/.i2p
### Debian/Ubuntu packages ###
# uncomment to try to make the build reproducible; work in progress
#build.reproducible=true
# Don't include geoip files, we will use geoip-database package
#with-geoip-database=true
# Don't include jetty files, we will use libjetty9-java package. Requires with-libtomcat8-java=true.

View File

@@ -439,14 +439,19 @@
<copy file="apps/jrobin/java/build/jrobin.jar" todir="build/" />
</target>
<target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber" >
<target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber, setBuildTimestamp" >
<!-- default if not set above -->
<property name="workspace.version" value="unknown" />
<!-- default if not set by setBuildTimestamp -->
<property name="build.timestamp" value="reproducible" />
<property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
<echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
</target>
<target name="setBuildTimestamp" unless="${build.reproducible}" >
<tstamp>
<format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
</tstamp>
<property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
<echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
</target>
<target name="buildWEB" depends="buildRouterConsole" >
@@ -806,6 +811,7 @@
use="true"
splitindex="true"
failonerror="true"
additionalparam="-notimestamp"
doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
<group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:org.apache.http.conn.ssl:org.apache.http.conn.util:org.apache.http.util:net.minidev.json:net.minidev.json.*" />
@@ -880,7 +886,6 @@
<link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
<link offline="true" href="${wrapperdocs.url}" packagelistLoc="installer/resources/package-lists/wrapper/" />
</javadoc>
<echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
</target>
<target name="javadoc-zip" depends="javadoc">

1
debian/rules vendored
View File

@@ -82,6 +82,7 @@ endif
@/bin/echo -e "javac.compilerargs=-bootclasspath $(JAVA_HOME)/jre/lib/rt.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
@/bin/echo -e "javac.compilerargs7=-bootclasspath $(JAVA_HOME)/jre/lib/rt.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
@/bin/echo -e "build.built-by=debian" >> $(CURDIR)/override.properties
@/bin/echo -e "build.reproducible=true" >> $(CURDIR)/override.properties
@# debian and ubuntu: everywhere
@/bin/echo -e "with-geoip-database=true" >> $(CURDIR)/override.properties