[android-platform-tools-base] 30/30: New Inception-Date.patch: Manually set Inception-Date in some JARs' manifest for reproducibility

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Fri Jul 22 10:33:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

seamlik-guest pushed a commit to branch master
in repository android-platform-tools-base.

commit 44122c24410855b6613f6d04be028d185ef0b872
Author: Kai-Chung Yan <seamlikok at gmail.com>
Date:   Fri Jul 22 18:32:00 2016 +0800

    New Inception-Date.patch: Manually set Inception-Date in some JARs' manifest for reproducibility
---
 debian/patches/Inception-Date.patch      | 32 ++++++++++++++++++++++++++++++++
 debian/patches/build.gradle.patch        |  4 ++--
 debian/patches/series                    |  1 +
 debian/{debian.gradle => project.gradle} |  0
 debian/{version.gradle => root.gradle}   |  4 +++-
 5 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/debian/patches/Inception-Date.patch b/debian/patches/Inception-Date.patch
new file mode 100644
index 0000000..60c0775
--- /dev/null
+++ b/debian/patches/Inception-Date.patch
@@ -0,0 +1,32 @@
+Author: Kai-Chung Yan <seamlikok at gmail.com>
+Last-Update: 2016-07-22
+Description: Remove the dynamic Inception-Date attributes
+ Some JAR's manifest includes a dynamic "Inception-Date" attributes which are
+ set as the date when the package is built. For reproducibility, the date is
+ manually set at when the code of this version of Gradle Plugin is commited.
+ The date is read from <https://android.googlesource.com/platform/tools/base>.
+--- a/build-system/gradle-experimental/build.gradle
++++ b/build-system/gradle-experimental/build.gradle
+@@ -30,9 +30,7 @@
+ 
+ 
+ jar.manifest.attributes("Plugin-Version": version)
+-jar.manifest.attributes("Inception-Date":"${Calendar.getInstance().get(Calendar.YEAR)}:" +
+-        "${Calendar.getInstance().get(Calendar.MONTH)}:${Calendar.getInstance().get(Calendar.DATE)}")
+-
++jar.manifest.attributes("Inception-Date": rootProject.ext.inceptionDate)
+ 
+ test {
+     environment("CUSTOM_REPO", rootProject.file("../out/repo"))
+--- a/build-system/gradle/build.gradle
++++ b/build-system/gradle/build.gradle
+@@ -15,8 +15,7 @@
+ project.ext.pomDesc = 'Gradle plug-in to build Android applications.'
+ 
+ jar.manifest.attributes("Plugin-Version": version)
+-jar.manifest.attributes("Inception-Date":"${Calendar.getInstance().get(Calendar.YEAR)}:" +
+-        "${Calendar.getInstance().get(Calendar.MONTH)}:${Calendar.getInstance().get(Calendar.DATE)}")
++jar.manifest.attributes("Inception-Date": rootProject.ext.inceptionDate)
+ 
+ test {
+     environment("CUSTOM_REPO", rootProject.file("../out/repo"))
diff --git a/debian/patches/build.gradle.patch b/debian/patches/build.gradle.patch
index f416055..63e5317 100644
--- a/debian/patches/build.gradle.patch
+++ b/debian/patches/build.gradle.patch
@@ -556,7 +556,7 @@ Description: Patch upstream's build system for Debian.
 --- a/build.gradle
 +++ b/build.gradle
 @@ -1,3 +1,5 @@
-+apply from: 'debian/version.gradle'
++apply from: 'debian/root.gradle'
 +
  subprojects { Project project ->
      // only configure leaf projects.
@@ -566,7 +566,7 @@ Description: Patch upstream's build system for Debian.
      if ("fdr".equals(project.name)) return
  
 -    apply from: "$rootDir/buildSrc/base/baseJava.gradle"
-+    apply from: "$rootDir/debian/debian.gradle"
++    apply from: "$rootDir/debian/project.gradle"
  }
  
 --- a/build-system/gradle-api/build.gradle
diff --git a/debian/patches/series b/debian/patches/series
index c6c8f90..0e8c5da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ libhttpcore-java-ThreadSafe.patch
 exclude_instant-run.patch
 disable_jacoco.patch
 set_classpaths.patch
+Inception-Date.patch
diff --git a/debian/debian.gradle b/debian/project.gradle
similarity index 100%
rename from debian/debian.gradle
rename to debian/project.gradle
diff --git a/debian/version.gradle b/debian/root.gradle
similarity index 59%
rename from debian/version.gradle
rename to debian/root.gradle
index dbad714..f525558 100644
--- a/debian/version.gradle
+++ b/debian/root.gradle
@@ -2,4 +2,6 @@ project.ext.apiVersion = 3
 project.ext.baseVersion = '25.0.0'
 project.ext.buildVersion = '2.0.0'
 project.ext.experimentalVersion = '0.6.0'
-project.ext.nativeApiVersion = 0
\ No newline at end of file
+project.ext.nativeApiVersion = 0
+
+project.ext.inceptionDate = '2016:4:4' /* From Git history */
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/android-platform-tools-base.git



More information about the pkg-java-commits mailing list