[tor-commits] [builders/tor-browser-build] 03/05: Bug 40485: Resolve Android reproducibility issues

gitolite role git at cupani.torproject.org
Thu May 12 16:55:09 UTC 2022


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

sysrqb pushed a commit to branch maint-11.5a10
in repository builders/tor-browser-build.

commit ee29394062477446047e5f46288d706d2bcf0d8d
Author: Matthew Finkel <sysrqb at torproject.org>
AuthorDate: Fri May 6 16:35:08 2022 +0000

    Bug 40485: Resolve Android reproducibility issues
---
 projects/application-services/bug40485.patch | 54 ++++++++++++++++++++++++++++
 projects/application-services/build          |  1 +
 projects/application-services/config         |  2 ++
 projects/fenix/build                         |  3 ++
 4 files changed, 60 insertions(+)

diff --git a/projects/application-services/bug40485.patch b/projects/application-services/bug40485.patch
new file mode 100644
index 0000000..fb97a22
--- /dev/null
+++ b/projects/application-services/bug40485.patch
@@ -0,0 +1,54 @@
+diff --git a/components/support/nimbus-fml/src/parser.rs b/components/support/nimbus-fml/src/parser.rs
+index 1de9a301..19d29373 100644
+--- a/components/support/nimbus-fml/src/parser.rs
++++ b/components/support/nimbus-fml/src/parser.rs
+@@ -2,7 +2,7 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+-use std::{collections::HashMap, path::Path};
++use std::{collections::BTreeMap, collections::HashMap, path::Path};
+ 
+ use serde::{Deserialize, Serialize};
+ use serde_json::json;
+@@ -22,7 +22,7 @@ pub(crate) struct EnumVariantBody {
+ #[derive(Debug, Deserialize, Serialize, Clone)]
+ pub(crate) struct EnumBody {
+     description: String,
+-    variants: HashMap<String, EnumVariantBody>,
++    variants: BTreeMap<String, EnumVariantBody>,
+ }
+ 
+ #[derive(Debug, Deserialize, Serialize, Clone)]
+@@ -39,26 +39,26 @@ pub(crate) struct FieldBody {
+ pub(crate) struct ObjectBody {
+     description: String,
+     failable: Option<bool>,
+-    fields: HashMap<String, FieldBody>,
++    fields: BTreeMap<String, FieldBody>,
+ }
+ 
+ #[derive(Debug, Deserialize, Serialize, Clone, Default)]
+ pub(crate) struct Types {
+-    enums: HashMap<String, EnumBody>,
+-    objects: HashMap<String, ObjectBody>,
++    enums: BTreeMap<String, EnumBody>,
++    objects: BTreeMap<String, ObjectBody>,
+ }
+ 
+ #[derive(Debug, Deserialize, Serialize, Clone)]
+ pub(crate) struct FeatureBody {
+     description: String,
+-    variables: HashMap<String, FieldBody>,
++    variables: BTreeMap<String, FieldBody>,
+     #[serde(alias = "defaults")]
+     default: Option<serde_json::Value>,
+ }
+ #[derive(Debug, Deserialize, Serialize, Clone, Default)]
+ pub(crate) struct ManifestFrontEnd {
+     types: Types,
+-    features: HashMap<String, FeatureBody>,
++    features: BTreeMap<String, FeatureBody>,
+     channels: Vec<String>,
+ }
+ 
diff --git a/projects/application-services/build b/projects/application-services/build
index f526973..121dc12 100755
--- a/projects/application-services/build
+++ b/projects/application-services/build
@@ -76,6 +76,7 @@ do
 done
 
 patch -p1 < $rootdir/no-git.patch
+patch -p1 < $rootdir/bug40485.patch
 export RUST_ANDROID_GRADLE_PYTHON_COMMAND=python3
 [% IF c('var/fetch_gradle_dependencies') %]
   # XXX: `assemble` is still not enough to see all fetched dependencies via
diff --git a/projects/application-services/config b/projects/application-services/config
index 29a6084..d65014f 100644
--- a/projects/application-services/config
+++ b/projects/application-services/config
@@ -97,6 +97,8 @@ input_files:
     enable: '[% !c("var/fetch_gradle_dependencies") %]'
   - filename: gen_gradle_deps_file.sh
     enable: '[% c("var/fetch_gradle_dependencies") %]'
+  # Delete when this patch is included upstream
+  - filename: bug40485.patch
 
 steps:
   list_toolchain_updates:
diff --git a/projects/fenix/build b/projects/fenix/build
index 1c1890f..3306e3d 100755
--- a/projects/fenix/build
+++ b/projects/fenix/build
@@ -77,6 +77,9 @@ v=[% c("variant") %]
     exit 1
   fi
 
+  # Bug 40485: Inject deterministic build date into Glean.
+  echo "ext.gleanBuildDate = \"0\"" >> app/build.gradle
+
   # We put the tor-browser version last to avoid int-parsing errors when consumers of project.versionName
   # assume it starts with a major version number, as it does for all Mozilla version names.
   version_name='[% c("var/fenix_version") %]-[% c("variant") %] ([% c("var/torbrowser_version") %])'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list