[tbb-commits] [Git][tpo/applications/tor-browser-build][main] 3 commits: Bug 41045: Log more information about Firefox build times.
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Tue Dec 19 18:21:30 UTC 2023
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
18ee3e22 by Pier Angelo Vendrame at 2023-12-19T19:21:10+01:00
Bug 41045: Log more information about Firefox build times.
We could dump more information about the time it takes to build Firefox
to possibly improve our build strategies.
- - - - -
e5e23eb6 by Pier Angelo Vendrame at 2023-12-19T19:21:11+01:00
Bug 42337: Make geckodriver available for all desktop platforms.
- - - - -
fa7042a2 by Pier Angelo Vendrame at 2023-12-19T19:21:11+01:00
Bug 41046: Use the final path in Linux debug symbols.
We had shipped an archive with debug symbols for a long time now.
However, users needed instructions on how to use it, because the files
needed to be moved to be used.
With this commit, it will be possible to just extract the tarball where
the tor-browser directory is located.
- - - - -
3 changed files:
- projects/browser/build
- projects/firefox/build
- projects/geckoview/build
Changes:
=====================================
projects/browser/build
=====================================
@@ -413,15 +413,34 @@ SCRIPT_EOF
[% IF c("var/updater_enabled") -%]
cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
[% END -%]
-[% IF c("var/linux-x86_64") -%]
- # TODO: See if we can make symbols also for Linux i686, see tor-browser#42146.
- cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.tar.xz "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].tar.xz"
- [% IF !c("var/asan") -%]
- cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.tar.xz "$OUTDIR/geckodriver-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].tar.xz"
- [% END -%]
-[% ELSIF c("var/windows") -%]
- cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.zip "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].zip"
+
+[% IF c("var/windows") -%]
+ archive_ext=zip
+[% ELSE -%]
+ archive_ext=tar.xz
[% END -%]
+
+debug_symbols="$rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.$archive_ext"
+if [[ -f "$debug_symbols" ]]; then
+ cp "$debug_symbols" "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
+fi
+
+[% IF c("var/macos_universal") -%]
+ geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
+ if [[ -f "$geckodriver" ]]; then
+ cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
+ fi
+ geckodriver="$rootdir/[% c('input_files_by_name/firefox-aarch64') %]/geckodriver.$archive_ext"
+ if [[ -f "$geckodriver" ]]; then
+ cp "$geckodriver" "$OUTDIR/geckodriver-macos-aarch64-[% c('var/torbrowser_version') %].$archive_ext"
+ fi
+[% ELSE -%]
+ geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
+ if [[ -f "$geckodriver" ]]; then
+ cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
+ fi
+[% END -%]
+
[%IF c("var/tor-browser") -%]
tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"
# strip off trailing "$buildid.tar.gz"
=====================================
projects/firefox/build
=====================================
@@ -161,6 +161,7 @@ mkdir "$HOME/.mozbuild"
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
+echo "Starting ./mach configure $(date)"
./mach configure \
--with-distribution-id=org.torproject \
--with-base-browser-version=[% c("var/torbrowser_version") %] \
@@ -168,12 +169,15 @@ export LANG=C.UTF-8
[% IF !c("var/base-browser") -%]--with-branding=browser/branding/[% c("var/branding_directory_prefix") %]-[% c("var/channel") %][% END %] \
[% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
+echo "Starting ./mach build $(date)"
./mach build --verbose
[% IF c("var/has_l10n") -%]
+ echo "Starting to merge locales $(date)"
export MOZ_CHROME_MULTILOCALE="$supported_locales"
# No quotes on purpose, see https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html#instructions-for-multi-locale-builds
./mach package-multi-locale --locales en-US $MOZ_CHROME_MULTILOCALE
AB_CD=multi ./mach build stage-package
+ echo "Locales merged $(date)"
[% ELSE -%]
./mach build stage-package
[% END -%]
@@ -197,9 +201,6 @@ export LANG=C.UTF-8
[% END -%]
[% IF c("var/linux") -%]
- [% IF c("var/linux-x86_64") && !c("var/asan") -%]
- cp obj-*/x86_64-unknown-linux-gnu/release/geckodriver $distdir
- [% END -%]
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
mkdir -p $distdir/Debug
# Some include files are symlinks, so use -Lr, or the tarball will fail
@@ -233,6 +234,8 @@ RBM_TB_EOF
popd
[% END -%]
+cp -L obj-*/dist/bin/geckodriver* $distdir
+
[% IF c("var/updater_enabled") -%]
# Make MAR-based update tools available for use during the bundle phase.
# Note that mar and mbsdiff are standalone tools, compiled for the build
@@ -275,10 +278,6 @@ RBM_TB_EOF
cd $distdir
[% IF c("var/linux") -%]
- [% IF c("var/linux-x86_64") && !c("var/asan") -%]
- # No need for an unstripped geckodriver
- strip geckodriver
- [% END -%]
mkdir -p $distdir/Debug/Browser
# Strip and generate debuginfo for the firefox binary that we keep, all *.so
# files, the plugin-container, and the updater (see ticket #10126)
@@ -324,22 +323,24 @@ END;
[% END -%]
[% END -%]
+echo "Starting to package artifacts $(date)"
+
[% c('tar', {
tar_src => [ browserdir ],
tar_args => '-caf ' _ dest_dir _ '/' _ c('filename') _ '/browser.tar.' _ c('compress_tar'),
}) %]
+# Debug symbols
[% IF c("var/linux") -%]
+ pushd Debug
+ mkdir -p [% c('var/project-name') %]/Browser
+ mv Browser [% c('var/project-name') %]/Browser/.debug
+ mv include [% c('var/project-name') %]/
[% c('tar', {
- tar_src => [ 'Debug' ],
+ tar_src => [ c('var/project-name') ],
tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/browser-debug-symbols.tar.xz',
}) %]
- [% IF c("var/linux-x86_64") && !c("var/asan") -%]
- [% c('tar', {
- tar_src => [ 'geckodriver' ],
- tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
- }) %]
- [% END -%]
+ popd
[% ELSIF c("var/windows") -%]
[% c('zip', {
zip_src => [ 'Debug' ],
@@ -347,6 +348,21 @@ END;
}) %]
[% END -%]
+# Geckodriver
+llvm-strip geckodriver*
+[% IF c("var/windows") -%]
+ [% c('zip', {
+ zip_src => [ 'geckodriver.exe' ],
+ zip_args => dest_dir _ '/' _ c('filename') _ '/geckodriver.zip',
+ }) %]
+[% ELSE -%]
+ [% c('tar', {
+ tar_src => [ 'geckodriver' ],
+ tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
+ }) %]
+[% END -%]
+
+# MAR tools
[% IF c("var/updater_enabled") -%]
[% c('zip', {
zip_src => [ 'mar-tools' ],
=====================================
projects/geckoview/build
=====================================
@@ -64,10 +64,13 @@ cp -rl $gradle_repo/maven2/* $gradle_repo || true
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
# Create .mozbuild to avoid interactive prompt in configure
mkdir "$HOME/.mozbuild"
+
+echo "Starting ./mach configure $(date)"
./mach configure \
--with-base-browser-version=[% c("var/torbrowser_version") %] \
[% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
+echo "Starting ./mach build $(date)"
./mach build --verbose
[% IF !c("var/android_single_arch") -%]
@@ -85,6 +88,7 @@ export MOZ_SOURCE_REPO="[% c('var/gitlab_project') %]"
export MOZ_SOURCE_CHANGESET=[% c("var/git_commit") %]
MOZCONFIG_EOF
+ echo "Starting the creation of the fake fat AAR $(date)"
pushd tools/torbrowser
make fat-aar ARCHS="[% c('arch') %]"
popd
@@ -93,6 +97,7 @@ MOZCONFIG_EOF
exoplayer2:publishDebugPublicationToMavenLocal
[% END -%]
+echo "Starting to package artifacts $(date)"
cd $distdir
[% c('tar', {
tar_src => [ project ],
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/93acf95505495e9d9d9c4a5f65c5dcb0ed4c2531...fa7042a2b4c0b3bdb0893cba0c867a0511c9b3ac
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/93acf95505495e9d9d9c4a5f65c5dcb0ed4c2531...fa7042a2b4c0b3bdb0893cba0c867a0511c9b3ac
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20231219/815d93fd/attachment-0001.htm>
More information about the tbb-commits
mailing list