[tbb-commits] [tor-browser-build/master] Bug 28697: Use pre-generated android keystore and fix timestamps on zipped archives

gk at torproject.org gk at torproject.org
Thu Dec 6 20:36:34 UTC 2018


commit ea1d0b24448f0365b9c8ff60a6ab2c4a130ec279
Author: sisbell <shane.isbell at gmail.com>
Date:   Tue Dec 4 12:20:40 2018 -0800

    Bug 28697: Use pre-generated android keystore and fix timestamps on zipped archives
---
 projects/tor-browser/android-qa.keystore          | Bin 0 -> 2138 bytes
 projects/tor-browser/build.android                |   6 +++---
 projects/tor-browser/config                       |   4 ++++
 projects/tor-browser/how-to-generate-keystore.txt |   3 +++
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/projects/tor-browser/android-qa.keystore b/projects/tor-browser/android-qa.keystore
new file mode 100644
index 0000000..90cfaed
Binary files /dev/null and b/projects/tor-browser/android-qa.keystore differ
diff --git a/projects/tor-browser/build.android b/projects/tor-browser/build.android
index b623466..d56d4b5 100644
--- a/projects/tor-browser/build.android
+++ b/projects/tor-browser/build.android
@@ -9,10 +9,10 @@ cd /var/tmp/build
 
 mv $rootdir/[% c('input_files_by_name/https-everywhere') %] $ext_dir/https-everywhere-eff at eff.org.xpi
 mv $rootdir/[% c('input_files_by_name/noscript') %] $ext_dir/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
+[% c("var/touch") %] $ext_dir $ext_dir/*
 
 zip -d $apk META-INF/\*
-zip -r $apk $ext_dir
+zip -r -X $apk $ext_dir
 
 # Sign a QA build. This apk is not a debug version and doesn't contain a debug flag in the manifest
-keytool -genkey -v -keystore qa.keystore -storepass android -alias androidqakey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Tor QA,O=Tor,C=US"
-jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore qa.keystore -signedjar $qa_apk $apk androidqakey -storepass android -keypass android
+[% c("var/faketime") %] jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore $rootdir/android-qa.keystore -signedjar $qa_apk $apk androidqakey -storepass android -keypass android
diff --git a/projects/tor-browser/config b/projects/tor-browser/config
index 43db189..2b937bd 100644
--- a/projects/tor-browser/config
+++ b/projects/tor-browser/config
@@ -46,6 +46,7 @@ targets:
     var:
       arch_deps:
         - openjdk-8-jdk
+        - faketime
 
 input_files:
   - project: container-image
@@ -108,3 +109,6 @@ input_files:
     URL: https://files.pythonhosted.org/packages/7e/9b/f99171190f04cd23768547dd34533b4016bd582842f53cd9fe9585a74c74/pefile-2017.11.5.tar.gz
     sha256sum: 675c35ee0e1677db9e80d2f48d8a7ff2cf38e6207e8cd5e2a2c6d126db025854
     enable: '[% c("var/windows") %]'
+  # To generate a new keystore, see how-to-generate-keystore.txt
+  - filename: android-qa.keystore
+    enable: '[% c("var/android") %]'
diff --git a/projects/tor-browser/how-to-generate-keystore.txt b/projects/tor-browser/how-to-generate-keystore.txt
new file mode 100644
index 0000000..3dbe443
--- /dev/null
+++ b/projects/tor-browser/how-to-generate-keystore.txt
@@ -0,0 +1,3 @@
+To generate a new keystore, type the following command:
+
+keytool -genkey -v -keystore android-qa.keystore -storepass android -alias androidqakey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Tor QA,O=Tor,C=US"





More information about the tbb-commits mailing list