This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch main in repository builders/tor-browser-build.
The following commit(s) were added to refs/heads/main by this push: new 985fe814 Bug 40699: Fix input_files in projects/firefox-l10n/config 985fe814 is described below
commit 985fe814f019dae162f9410a6437bf0f3fcb9e09 Author: Nicolas Vigier boklm@torproject.org AuthorDate: Tue Nov 29 11:59:52 2022 +0100
Bug 40699: Fix input_files in projects/firefox-l10n/config
In input_files in projects/firefox-l10n/config we are doing this:
my $locales = project_config($project, 'var/locales', $options); foreach my $locale (@$locales) { $locale = process_template($project, $locale, '.');
In this foreach loop, `$locale` is pointing to the real string from `var/locales` and not a copy, and we are updating it with the output from `process_template`. This means that the template will be processed the first time the function is called (for example for a linux-x86_64 build) and the processed value from the first call reused on subsequent calls (for example a macos build, where the `ja` locale is supposed to be different).
This is what caused the reproducibility issue in https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/merge_req...
To fix that we just use a separate variable to store the processed template. --- projects/firefox-l10n/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/firefox-l10n/config b/projects/firefox-l10n/config index 2a2e585b..d8800a3c 100644 --- a/projects/firefox-l10n/config +++ b/projects/firefox-l10n/config @@ -24,8 +24,8 @@ steps: my $changesets_json = project_config('firefox', 'var/l10n-changesets', { %$options, origin_project => $project }); my $d = decode_json $changesets_json; my $locales = project_config($project, 'var/locales', $options); - foreach my $locale (@$locales) { - $locale = process_template($project, $locale, '.'); + foreach my $loc (@$locales) { + my $locale = process_template($project, $loc, '.'); next unless my $revision = $d->{$locale}{revision}; my $input_file = { name => $locale,
tbb-commits@lists.torproject.org