[gradle] 07/08: New patch: removeTimestampsInManifest.patch
Kai-Chung Yan
seamlik-guest at moszumanska.debian.org
Thu Sep 8 11:24:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
seamlik-guest pushed a commit to branch master
in repository gradle.
commit c156635bbebac3c361514e2b6bd1830b534b3e61
Author: Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>
Date: Thu Sep 8 19:23:25 2016 +0800
New patch: removeTimestampsInManifest.patch
---
debian/patches/removeTimestampInManifest.patch | 75 ++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 76 insertions(+)
diff --git a/debian/patches/removeTimestampInManifest.patch b/debian/patches/removeTimestampInManifest.patch
new file mode 100644
index 0000000..e28e65d
--- /dev/null
+++ b/debian/patches/removeTimestampInManifest.patch
@@ -0,0 +1,75 @@
+Author: Kai-Chung Yan (殷啟聰)
+Last-Update: 2016-09-08
+Forwarded: no
+Description: Remove timetamps in manefest files
+ java.util.Properties writes timestamps to the output file but this feature
+ can't be turned off. In order to improve reproducibility, this patch manually
+ outputs the manifest files.
+ .
+ This patch also manually sets the timestamps and other dynamic strings that
+ breaks the reproducibility.
+--- a/gradle/groovyProject.gradle
++++ b/gradle/groovyProject.gradle
+@@ -112,7 +112,12 @@
+
+ @TaskAction
+ def generate() {
+- manifestFile.withOutputStream { properties.save(it, 'module definition') }
++ manifestFile.withPrintWriter {
++ def prop = properties
++ it.println '# module definition'
++ it.println "projects=${prop.projects}"
++ it.println "runtime=${prop.runtime}"
++ }
+ }
+ }
+
+--- a/subprojects/core/core.gradle
++++ b/subprojects/core/core.gradle
+@@ -93,6 +93,9 @@
+
+ @TaskAction
+ def generate() {
+- propertiesFile.withOutputStream { pluginProperties.save(it, 'plugin definitions') }
++ propertiesFile.withPrintWriter {
++ it.println '# plugin definitions'
++ it.println "plugins=${pluginProperties.plugins}"
++ }
+ }
+ }
+--- a/gradle/buildReceipt.gradle
++++ b/gradle/buildReceipt.gradle
+@@ -105,7 +105,7 @@
+ }
+ }
+
+-task createBuildReceipt(dependsOn: determineCommitId) {
++task createBuildReceipt() {
+ ext.receiptFile = file("$buildDir/$buildReceiptFileName")
+ outputs.file receiptFile
+ outputs.upToDateWhen { false }
+@@ -127,18 +127,18 @@
+ }
+ }
+ def data = [
+- commitId: determineCommitId.commitId,
++ commitId: 'none',
+ versionNumber: version,
+ versionBase: versionBase,
+ isSnapshot: isSnapshot,
+ rcNumber: rcNumber == null ? "" : rcNumber,
+- buildTimestamp: buildTimestamp,
+- buildNumber: System.properties["build.number"] ?: 'none',
+- username: System.properties["user.name"],
+- hostname: hostName,
++ buildTimestamp: '20121221000000+0000',
++ buildNumber: 'none',
++ username: 'debian',
++ hostname: 'debian',
+ javaVersion: System.properties["java.version"],
+ osName: System.properties["os.name"],
+- osVersion: System.properties["os.version"],
++ osVersion: 'none',
+ project: 'gradle'
+ ]
+
diff --git a/debian/patches/series b/debian/patches/series
index ac91316..3d22f8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,4 @@ ivy-2.4.0.patch
maven-3.3-compatibility.patch
groovy-jar.patch
upgrade-to-jetty9.patch
+removeTimestampInManifest.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle.git
More information about the pkg-java-commits
mailing list