This is an automated email from the git hooks/post-receive script.
pierov pushed a change to branch main in repository builders/tor-browser-build.
from 7d6a2d1b Bug 40676: Remove HTTPS-Everywhere from the repackage script new 87987543 Bug 40641: Add projects/firefox-l10n new 1e12d726 Bug 40641: Use packaged locales on Firefox new 98b4184d Bug 40641: Remove langpacks and single-locale support
The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: README | 4 +- projects/browser/build | 154 ++------------------------------------ projects/browser/config | 3 - projects/firefox-l10n/build | 6 ++ projects/firefox-l10n/config | 45 +++++++++++ projects/firefox-langpacks/build | 16 ---- projects/firefox-langpacks/config | 50 ------------- projects/firefox/build | 16 +++- projects/firefox/config | 5 ++ rbm | 2 +- rbm.conf | 1 - tools/signing/check_file_counts | 7 -- 12 files changed, 80 insertions(+), 229 deletions(-) create mode 100644 projects/firefox-l10n/build create mode 100644 projects/firefox-l10n/config delete mode 100644 projects/firefox-langpacks/build delete mode 100644 projects/firefox-langpacks/config
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch main in repository builders/tor-browser-build.
commit 87987543961e8e5d3a108204034e34694b056519 Author: Nicolas Vigier boklm@torproject.org AuthorDate: Tue Nov 1 17:14:29 2022 +0100
Bug 40641: Add projects/firefox-l10n --- README | 4 ++-- projects/firefox-l10n/build | 6 ++++++ projects/firefox-l10n/config | 45 ++++++++++++++++++++++++++++++++++++++++++++ projects/firefox/config | 2 ++ rbm | 2 +- 5 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/README b/README index 3bc81774..6a29f8e8 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ etc ...). You will need to install the uidmap package, providing the newuidmap and newgidmap commands.
The sources of most components are downloaded using git, which needs to -be installed. +be installed. The mercurial package is also needed.
You also need a few perl modules installed: - YAML::XS @@ -40,7 +40,7 @@ If you are running Debian or Ubuntu, you can install them with: libstring-shellquote-perl libsort-versions-perl \ libdigest-sha-perl libdata-uuid-perl libdata-dump-perl \ libfile-copy-recursive-perl libfile-slurp-perl git \ - uidmap + mercurial uidmap
The build system is based on rbm, which is included as a git submodule in the rbm/ directory. You can fetch the rbm git submodule by running diff --git a/projects/firefox-l10n/build b/projects/firefox-l10n/build new file mode 100644 index 00000000..270420db --- /dev/null +++ b/projects/firefox-l10n/build @@ -0,0 +1,6 @@ +#!/bin/bash +[% c("var/set_default_env") -%] + +rm -Rf '[% dest_dir %]/[% c("filename") %]' +mkdir -p [% dest_dir %]/[% c("filename") %] +mv -v *.tar.xz [% dest_dir %]/[% c("filename") %] diff --git a/projects/firefox-l10n/config b/projects/firefox-l10n/config new file mode 100644 index 00000000..2a2e585b --- /dev/null +++ b/projects/firefox-l10n/config @@ -0,0 +1,45 @@ +# vim: filetype=yaml sw=2 +version: '[% pc("firefox", "abbrev") %]' +filename: '[% project %]-[% c("var/osname") %]-[% c("version") %]-1' +link_input_files: 1 + +steps: + fetch_locale: + filename: 'l10n-[% c("input_file_var/locale") %]-[% c("hg_hash") %]-[% c("var/build_id") %].tar.xz' + version: '[% c("hg_hash") %]' + fetch_locale: | + [% c("var/set_default_env") -%] + tar xf '[% project %]-[% c("version") %].tar.gz' + mv [% project %]-[% c("version") %] [% c("input_file_var/locale") %] + tar caf '[% dest_dir %]/[% c("filename") %]' [% c("input_file_var/locale") %] + input_files: [] +--- | + # This part of the file contains options written in perl + use JSON; + use Path::Tiny; + ( + input_files => sub { + my ($project, $options) = @_; + my @input_files; + 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, '.'); + next unless my $revision = $d->{$locale}{revision}; + my $input_file = { + name => $locale, + project => 'firefox-l10n', + pkg_type => 'fetch_locale', + hg_hash => $revision, + hg_url => "https://hg.mozilla.org/l10n-central/$locale", + hg_clone_subdir => $locale, + input_file_var => { + locale => $locale, + }, + }; + push @input_files, $input_file; + } + return [@input_files]; + }, + ) diff --git a/projects/firefox/config b/projects/firefox/config index 38aef044..b3652b2e 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -37,6 +37,8 @@ var: mv -f -- "$rezip_tmpdir/new.zip" [% c("rezip_file") %] rm -Rf "$rezip_tmpdir"
+ l10n-changesets: '[% exec("cat browser/locales/l10n-changesets.json") %]' + steps: src-tarballs: filename: 'src-[% project %]-[% c("version") %].tar.xz' diff --git a/rbm b/rbm index 8ed3aa1c..a6ccc103 160000 --- a/rbm +++ b/rbm @@ -1 +1 @@ -Subproject commit 8ed3aa1c0b65c711947df2f0d483215510514253 +Subproject commit a6ccc103fe59f6b520777308af92bf98113e2c90
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch main in repository builders/tor-browser-build.
commit 1e12d7269976feb7c2acdaa6f3d65260e83ef563 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Wed Nov 2 18:05:33 2022 +0100
Bug 40641: Use packaged locales on Firefox
This commit changes Firefox build script to run the needed steps to include additional locales as packages locales.
In our first tests, adding a locale adds at least 10 seconds to the build, so we do not add locales for testbuilds. --- projects/firefox/build | 16 +++++++++++++++- projects/firefox/config | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/projects/firefox/build b/projects/firefox/build index 4d554f20..10b93fdf 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -134,6 +134,12 @@ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system # Create .mozbuild to avoid interactive prompt in configure mkdir "$HOME/.mozbuild"
+l10ncentral="$HOME/.mozbuild/l10n-central" +mkdir "$l10ncentral" +for tarball in $rootdir/[% c('input_files_by_name/firefox-l10n') %]/*; do + tar -C "$l10ncentral" -xf "$tarball" +done + # PyYAML tries to read files as ASCII, otherwise export LC_ALL=C.UTF-8 export LANG=C.UTF-8 @@ -146,7 +152,15 @@ export LANG=C.UTF-8 [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %] \
./mach build --verbose -./mach build stage-package +[% IF !c("var/testbuild") %] + export MOZ_CHROME_MULTILOCALE="[% tmpl(c('var/locales').join(' ')) %]" + for AB_CD in $MOZ_CHROME_MULTILOCALE; do + ./mach build chrome-$AB_CD + done + AB_CD=multi ./mach build stage-package +[% ELSE %] + ./mach build stage-package +[% END %]
[% IF c("var/osx") %] cp -a obj-*/dist/firefox/* $distdir diff --git a/projects/firefox/config b/projects/firefox/config index b3652b2e..103e8a9a 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -149,6 +149,9 @@ input_files: name: rust - project: cbindgen name: cbindgen + - project: firefox-l10n + name: firefox-l10n + enable: '[% !c("var/testbuild") %]' - project: wasi-sysroot name: wasi-sysroot enable: '[% c("var/rlbox") %]'
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch main in repository builders/tor-browser-build.
commit 98b4184d69ab7b6d55c90ef25ce6fc8005a589b8 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Fri Nov 4 09:42:06 2022 +0100
Bug 40641: Remove langpacks and single-locale support
Since we have packaged locales, we do not have to include language packs anymore.
Also, we have decided that we are not switching back from multi-lingual packages, so we remove the support to single-lingual packages to simplify the browser project. --- projects/browser/build | 154 ++------------------------------------ projects/browser/config | 3 - projects/firefox-langpacks/build | 16 ---- projects/firefox-langpacks/config | 50 ------------- rbm.conf | 1 - tools/signing/check_file_counts | 7 -- 6 files changed, 6 insertions(+), 225 deletions(-)
diff --git a/projects/browser/build b/projects/browser/build index c14e38f9..43cd81d7 100644 --- a/projects/browser/build +++ b/projects/browser/build @@ -194,10 +194,6 @@ tar -C Bundle-Data/[% bundledata_osname %] [% IF ! c("var/namecoin") %]--exclude bridges_conf snowflake [% END -%]
-[% IF ! c("var/multi_lingual") && c("var/tor-browser") %] - echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> "$GENERATEDPREFSPATH" -[% END %] - [% IF c("var/linux") %] chmod 700 ${TB_STAGE_DIR}/Browser/[% c('var/ProjectName') %]/Data/Browser [% IF c("var/tor-browser") -%] @@ -205,18 +201,12 @@ tar -C Bundle-Data/[% bundledata_osname %] [% IF ! c("var/namecoin") %]--exclude [% END -%] [% END %]
-[% IF c("var/multi_lingual") %] - # If we are building a multi-lingual package, use "ALL" in the package name - # and as the locale for update purposes. We do not include "ALL" in the name - # of the directory that is inside the package (in other words, users will - # not see tor-browser_ALL after they install Tor Browser). - PKG_LOCALE="ALL" - PKG_DIR='[% c("var/project-name") %]' -[% ELSE %] - PKG_LOCALE="en-US" - PKG_DIR="[% c('var/project-name') %]_${PKG_LOCALE}" -[% END %] - +# With multi-lingual builds, we use "ALL" in the package name as the locale for +# update purposes. But we do not include "ALL" in the name of the directory that +# is inside the package (in other words, users will not see tor-browser_ALL +# after they install Tor Browser). +PKG_LOCALE="ALL" +PKG_DIR='[% c("var/project-name") %]'
pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]/browser/" unzip omni.ja defaults/preferences/[% c("var/prefs_file") %] || [ $? -lt 3 ] @@ -230,27 +220,6 @@ rm -rf defaults echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../tbb_version.json popd
-[% IF c("var/osx") || c("var/multi_lingual") -%] - # Prepare our language packs to embed our default bookmarks. - # See bug 21879 for more details. - [% IF c("var/multi_lingual") -%] - [% SET locales = c("var/locales") -%] - [% ELSE -%] - [% SET locales = c("var/testbuild") ? [] : c("var/locales") -%] - [% END -%] - [% FOREACH lang = locales %] - [% SET lang = tmpl(lang); - SET xpi = '$rootdir/' _ c('input_files_by_name/firefox-langpacks') _ '/' _ lang _ '.xpi'; - %] - # If we are building a multi-lingual package, add all of the language packs. - [% IF c("var/multi_lingual") %] - cp [% xpi %] "$TBDIR/$EXTSPATH/langpack-[% lang %]@firefox.mozilla.org.xpi" - [% END %] - cd .. - rm -rf prep_[% lang %] - [% END %] -[% END %] - [% IF c("var/windows") %] tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/nsis') %] export PATH="/var/tmp/dist/nsis/bin:$PATH" @@ -333,116 +302,5 @@ cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/ cp $rootdir/[% c('input_files_by_name/firefox') %]/build-infos.json "$OUTDIR"/build-infos-[% c("var/mar_osname") %].json [% END -%]
-# Create a tarball with all Linux x86_64 language packs (Bug 32676) -[% IF c("var/tor-browser") && c("var/linux-x86_64") && ! c("var/multi_lingual") && ! c("var/testbuild") -%] - pushd $rootdir/[% c('input_files_by_name/firefox-langpacks') %] - [% c('tar', { - tar_src => [ '.' ], - tar_args => '-cJf $OUTDIR/langpacks-tor-browser-linux64-' _ c("var/torbrowser_version") _ '.tar.xz', - }) - %] - popd -[% END -%] - -# If we did not create a multi-lingual package above, create a package for -# each locale. -[% IF ! c("var/multi_lingual") %] - [% SET locales = c("var/testbuild") ? [] : c("var/locales") -%] - [% FOREACH lang = locales %] - [% SET lang = tmpl(lang); - SET xpi = '$rootdir/' _ c('input_files_by_name/firefox-langpacks') _ '/' _ lang _ '.xpi'; - SET tbdir = '$distdir/' _ c("var/project-name") _ '_' _ lang; - SET mar_file = c("var/project-name") _ '-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_' _ lang _ '.mar'; - IF c("var/osx"); - SET browserdir = tbdir _ '/' _ c("var/Project_Name") _ '.app'; - ELSIF c("var/windows"); - SET browserdir = tbdir _ '/' _ c("var/Project_Name") _ '/Browser'; - ELSE; - SET browserdir = tbdir _ '/Browser'; - END; - SET build_mar = c("var/build_mar"); - # On nightly we only build mar files for some locales - IF c("var/nightly") && c("var/build_mar"); - build_mar = 0; - FOREACH mar_lang = c("var/mar_locales"); - mar_lang = tmpl(mar_lang); - IF mar_lang == lang; - build_mar = 1; - END; - END; - END; - %] - cat > "$scripts_dir/create-browser_[% lang %]" << SCRIPT_EOF -#!/bin/bash - set -e - cp -a ${TB_STAGE_DIR} [% tbdir %] - cp [% xpi %] "[% browserdir %]/$EXTSPATH/langpack-[% lang %]@firefox.mozilla.org.xpi" - - pushd "[% browserdir %]/[% IF c("var/osx") %]Contents/Resources/[% END %]browser/" - mkdir -p defaults/preferences - cp $rootdir/[% c("var/prefs_file") %] defaults/preferences/ - # Set the locale of the bundle. - echo "pref("intl.locale.requested", "[% lang %]");" >> defaults/preferences/[% c("var/prefs_file") %] - [% c("touch") %] defaults/preferences/[% c("var/prefs_file") %] - zip -Xm omni.ja defaults/preferences/[% c("var/prefs_file") %] - rm -rf defaults - # create tbb_version.json file for #25020 - echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"[% lang %]"}' > ../tbb_version.json - popd - - # Set the update.locale (it is used to replace %LOCALE% within - # app.update.url), remove the en-US spellchecking dictionary, and - # recreate precomplete file (needs to be accurate for full MAR updates). - pushd "[% browserdir %]/[% IF c("var/osx") %]Contents/Resources/[% END %]" - echo "[% lang %]" > update.locale - [% c("touch") %] update.locale - zip -Xm omni.ja update.locale - rm -rf dictionaries - rm -f precomplete - python $MARTOOLS/createprecomplete.py - popd - - cd $distdir - - [% IF build_mar -%] - # Create full MAR file and compressed package for this locale. - MAR=$MARTOOLS/mar \ - MOZ_PRODUCT_VERSION=[% c("var/torbrowser_version") %] \ - MAR_CHANNEL_ID=torbrowser-torproject-[% c("var/channel") %] \ - $MARTOOLS/make_full_update.sh -q $OUTDIR/[% mar_file %] "[% browserdir %]" - [% END -%] - - [% IF c("var/linux") %] - [% SET tardir = c("var/project-name") _ '_' _ lang; - c('tar', { - tar_src => [ tardir ], - tar_args => '-cJf $OUTDIR/' _ c("var/project-name") _ '-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_' _ lang _ '.tar.xz', - }) %] - [% ELSIF c("var/osx") %] - [% # Rename the Japanese bundle to not confuse users - IF lang == 'ja-JP-mac'; - SET lang = 'ja'; - END; -%] - [% c('var/ddmg', { - dmg_src => tbdir, - dmg_out => '$OUTDIR/' _ c('var/ProjectName') _ '-' _ c("var/torbrowser_version") _ '-' _ c("var/dmg_name") _ '_' _ lang _ '.dmg', - }) %] - [% ELSIF c("var/windows") %] - find "[% tbdir %]" -exec [% c("touch") %] {} ; - pushd "[% tbdir %]" - makensis [% c("var/projectname") %].nsi - # Working around NSIS braindamage - mv [% c("var/projectname") %]-install.exe browser-install-tmp.exe - python3 $rootdir/pe_checksum_fix.py - mv browser-install-tmp2.exe [% c("var/projectname") %]-install.exe - rm browser-install-tmp.exe - mv [% c("var/projectname") %]-install.exe $OUTDIR/[% c("var/projectname") %]-install[% IF c("var/windows-x86_64") %]-win64[% END %]-[% c("var/torbrowser_version") %]_[% lang %].exe - popd - [% END %] - rm -rf [% tbdir %] -SCRIPT_EOF - [% END %] -[% END %] - chmod 775 $rootdir/run_scripts "$scripts_dir"/* $rootdir/run_scripts [% c("num_procs") %] "$scripts_dir" diff --git a/projects/browser/config b/projects/browser/config index 4ae3e4f9..29d65f7e 100644 --- a/projects/browser/config +++ b/projects/browser/config @@ -73,9 +73,6 @@ input_files: - project: tor-expert-bundle name: tor-expert-bundle enable: '[% c("var/tor-browser") %]' - - project: firefox-langpacks - name: firefox-langpacks - enable: '[% (!c("var/testbuild") || c("var/multi_lingual")) && ! c("var/android") %]' - project: fonts name: fonts enable: '[% ! c("var/android") %]' diff --git a/projects/firefox-langpacks/build b/projects/firefox-langpacks/build deleted file mode 100644 index 6bc18101..00000000 --- a/projects/firefox-langpacks/build +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -[% c("var/set_default_env") -%] - -[% FOREACH lang = c('var/locales') %] - [% SET lang = tmpl(lang) %] - [% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %] - shasum=$(grep '[% c("var/ff_arch") %]/xpi/[% lang %].xpi$' SHA512SUMS-[% c("version") %] | sed 's| [% c("var/ff_arch") %]/xpi/[% lang %].xpi$||') - echo "$shasum [% filename %]" | sha512sum -c -[% END %] - -mkdir -p [% dest_dir %]/[% c("filename") %] -[% FOREACH lang = c('var/locales') %] - [% SET lang = tmpl(lang) %] - [% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %] - cp -a [% filename %] [% dest_dir %]/[% c("filename") %]/ -[% END %] diff --git a/projects/firefox-langpacks/config b/projects/firefox-langpacks/config deleted file mode 100644 index c2a11970..00000000 --- a/projects/firefox-langpacks/config +++ /dev/null @@ -1,50 +0,0 @@ -# vim: filetype=yaml sw=2 -version: '[% c("var/ff_version") %]-[% c("var/ff_build") %]' -filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]' - -var: - ff_version: '[% pc("firefox", "var/firefox_version") %]' - ff_build: build1 - input_filename: 'dl-langpack-[% c("var/ff_arch") %]-[% c("version") %]' - -targets: - linux: - var: - ff_arch: 'linux-[% c("arch") %]' - windows-i686: - var: - ff_arch: win32 - windows-x86_64: - var: - ff_arch: win64 - osx: - var: - ff_arch: mac - -input_files: - - URL: 'https://ftp.mozilla.org/pub/firefox/candidates/%5B% c("var/ff_version") %]-candidates/[% c("var/ff_build") %]/SHA512SUMS' - filename: 'SHA512SUMS-[% c("version") %]' - gpg_keyring: firefox.gpg - sig_ext: asc - file_gpg_id: 1 - - - filename: '[% c("var/input_filename") %]' - refresh_input: 1 - exec: | - #!/bin/bash - set -e - [% SET outdir = c("var/input_filename") %] - mkdir -p [% dest_dir %]/[% outdir %] - [% FOREACH lang = c('var/locales') %] - [% SET lang = tmpl(lang) %] - [% SET ffver = c("var/ff_version"); - SET ffbuild = c("var/ff_build"); - SET ffarch = c("var/ff_arch"); - SET URL = "https://ftp.mozilla.org/pub/firefox/candidates/" _ ffver _ '-candidates/' _ ffbuild _ '/' _ ffarch _ '/xpi/' _ lang _ '.xpi'; - SET filename = outdir _ '/' _ lang _ '.xpi'; %] - test -f [% dest_dir %]/[% filename %] || \ - [% GET c("urlget", { filename => filename _ '-tmp', URL => URL }); %] - test -f [% dest_dir %]/[% filename %] || \ - mv -f [% dest_dir %]/[% filename %]-tmp [% dest_dir %]/[% filename %] - [% END %] - diff --git a/rbm.conf b/rbm.conf index 9f778028..4313cdc7 100644 --- a/rbm.conf +++ b/rbm.conf @@ -75,7 +75,6 @@ var: torbrowser_build: 'build1' torbrowser_incremental_from: - 12.0a3 - multi_lingual: 1 build_mar: 1 # By default, we sort the list of installed packages. This allows sharing # containers with identical list of packages, even if they are not listed diff --git a/tools/signing/check_file_counts b/tools/signing/check_file_counts index a0524c8d..d374aa0a 100755 --- a/tools/signing/check_file_counts +++ b/tools/signing/check_file_counts @@ -149,13 +149,6 @@ total_count=$(( total_count + 2 )) remaining_files="$(echo "${remaining_files}" | sed 's/[ ]*'"${f}"'[ ]*/ /')" remaining_files="$(echo "${remaining_files}" | sed 's/[ ]*'"${f}.asc"'[ ]*/ /')"
-test "$(ls langpacks-tor-browser-linux64-*.tar.xz 2>/dev/null | wc -l)" = 1 || echo langpacks-tor-browser-linux64-*.tar.xz is wrong -test "$(ls langpacks-tor-browser-linux64-*.tar.xz.asc 2>/dev/null | wc -l)" = 1 || echo langpacks-tor-browser-linux64-*.tar.xz.asc is wrong -total_count=$(( total_count + 2 )) -f="$(ls langpacks-tor-browser-linux64-*.tar.xz)" -remaining_files="$(echo "${remaining_files}" | sed 's/[ ]*'"${f}"'[ ]*/ /')" -remaining_files="$(echo "${remaining_files}" | sed 's/[ ]*'"${f}.asc"'[ ]*/ /')" - # Expected file endings file_count_by_ending="$(ls ./*.tar.xz{,.asc} ./*.zip{,.asc} ./*.exe{,.asc} ./*.mar ./*.dmg{,.asc} ./*.apk{,.asc} ./*.txt{,.asc} ./*.txt.asc-* | wc -l)" test "${file_count_by_ending}" -eq ${total_count} || echo "Unexpected file endings: counted ${file_count_by_ending} vs ${total_count}"
tor-commits@lists.torproject.org