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
-
e5e23eb6
by Pier Angelo Vendrame at 2023-12-19T19:21:11+01:00
-
fa7042a2
by Pier Angelo Vendrame at 2023-12-19T19:21:11+01:00
3 changed files:
Changes:
... | ... | @@ -413,15 +413,34 @@ SCRIPT_EOF |
413 | 413 | [% IF c("var/updater_enabled") -%]
|
414 | 414 | cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
|
415 | 415 | [% END -%]
|
416 | -[% IF c("var/linux-x86_64") -%]
|
|
417 | - # TODO: See if we can make symbols also for Linux i686, see tor-browser#42146.
|
|
418 | - 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"
|
|
419 | - [% IF !c("var/asan") -%]
|
|
420 | - cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.tar.xz "$OUTDIR/geckodriver-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].tar.xz"
|
|
421 | - [% END -%]
|
|
422 | -[% ELSIF c("var/windows") -%]
|
|
423 | - 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"
|
|
416 | + |
|
417 | +[% IF c("var/windows") -%]
|
|
418 | + archive_ext=zip
|
|
419 | +[% ELSE -%]
|
|
420 | + archive_ext=tar.xz
|
|
424 | 421 | [% END -%]
|
422 | + |
|
423 | +debug_symbols="$rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.$archive_ext"
|
|
424 | +if [[ -f "$debug_symbols" ]]; then
|
|
425 | + cp "$debug_symbols" "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
|
|
426 | +fi
|
|
427 | + |
|
428 | +[% IF c("var/macos_universal") -%]
|
|
429 | + geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
|
|
430 | + if [[ -f "$geckodriver" ]]; then
|
|
431 | + cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
|
|
432 | + fi
|
|
433 | + geckodriver="$rootdir/[% c('input_files_by_name/firefox-aarch64') %]/geckodriver.$archive_ext"
|
|
434 | + if [[ -f "$geckodriver" ]]; then
|
|
435 | + cp "$geckodriver" "$OUTDIR/geckodriver-macos-aarch64-[% c('var/torbrowser_version') %].$archive_ext"
|
|
436 | + fi
|
|
437 | +[% ELSE -%]
|
|
438 | + geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
|
|
439 | + if [[ -f "$geckodriver" ]]; then
|
|
440 | + cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
|
|
441 | + fi
|
|
442 | +[% END -%]
|
|
443 | + |
|
425 | 444 | [%IF c("var/tor-browser") -%]
|
426 | 445 | tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"
|
427 | 446 | # strip off trailing "$buildid.tar.gz"
|
... | ... | @@ -161,6 +161,7 @@ mkdir "$HOME/.mozbuild" |
161 | 161 | export LC_ALL=C.UTF-8
|
162 | 162 | export LANG=C.UTF-8
|
163 | 163 | |
164 | +echo "Starting ./mach configure $(date)"
|
|
164 | 165 | ./mach configure \
|
165 | 166 | --with-distribution-id=org.torproject \
|
166 | 167 | --with-base-browser-version=[% c("var/torbrowser_version") %] \
|
... | ... | @@ -168,12 +169,15 @@ export LANG=C.UTF-8 |
168 | 169 | [% IF !c("var/base-browser") -%]--with-branding=browser/branding/[% c("var/branding_directory_prefix") %]-[% c("var/channel") %][% END %] \
|
169 | 170 | [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
|
170 | 171 | |
172 | +echo "Starting ./mach build $(date)"
|
|
171 | 173 | ./mach build --verbose
|
172 | 174 | [% IF c("var/has_l10n") -%]
|
175 | + echo "Starting to merge locales $(date)"
|
|
173 | 176 | export MOZ_CHROME_MULTILOCALE="$supported_locales"
|
174 | 177 | # No quotes on purpose, see https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html#instructions-for-multi-locale-builds
|
175 | 178 | ./mach package-multi-locale --locales en-US $MOZ_CHROME_MULTILOCALE
|
176 | 179 | AB_CD=multi ./mach build stage-package
|
180 | + echo "Locales merged $(date)"
|
|
177 | 181 | [% ELSE -%]
|
178 | 182 | ./mach build stage-package
|
179 | 183 | [% END -%]
|
... | ... | @@ -197,9 +201,6 @@ export LANG=C.UTF-8 |
197 | 201 | [% END -%]
|
198 | 202 | |
199 | 203 | [% IF c("var/linux") -%]
|
200 | - [% IF c("var/linux-x86_64") && !c("var/asan") -%]
|
|
201 | - cp obj-*/x86_64-unknown-linux-gnu/release/geckodriver $distdir
|
|
202 | - [% END -%]
|
|
203 | 204 | cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
|
204 | 205 | mkdir -p $distdir/Debug
|
205 | 206 | # Some include files are symlinks, so use -Lr, or the tarball will fail
|
... | ... | @@ -233,6 +234,8 @@ RBM_TB_EOF |
233 | 234 | popd
|
234 | 235 | [% END -%]
|
235 | 236 | |
237 | +cp -L obj-*/dist/bin/geckodriver* $distdir
|
|
238 | + |
|
236 | 239 | [% IF c("var/updater_enabled") -%]
|
237 | 240 | # Make MAR-based update tools available for use during the bundle phase.
|
238 | 241 | # Note that mar and mbsdiff are standalone tools, compiled for the build
|
... | ... | @@ -275,10 +278,6 @@ RBM_TB_EOF |
275 | 278 | cd $distdir
|
276 | 279 | |
277 | 280 | [% IF c("var/linux") -%]
|
278 | - [% IF c("var/linux-x86_64") && !c("var/asan") -%]
|
|
279 | - # No need for an unstripped geckodriver
|
|
280 | - strip geckodriver
|
|
281 | - [% END -%]
|
|
282 | 281 | mkdir -p $distdir/Debug/Browser
|
283 | 282 | # Strip and generate debuginfo for the firefox binary that we keep, all *.so
|
284 | 283 | # files, the plugin-container, and the updater (see ticket #10126)
|
... | ... | @@ -324,22 +323,24 @@ END; |
324 | 323 | [% END -%]
|
325 | 324 | [% END -%]
|
326 | 325 | |
326 | +echo "Starting to package artifacts $(date)"
|
|
327 | + |
|
327 | 328 | [% c('tar', {
|
328 | 329 | tar_src => [ browserdir ],
|
329 | 330 | tar_args => '-caf ' _ dest_dir _ '/' _ c('filename') _ '/browser.tar.' _ c('compress_tar'),
|
330 | 331 | }) %]
|
331 | 332 | |
333 | +# Debug symbols
|
|
332 | 334 | [% IF c("var/linux") -%]
|
335 | + pushd Debug
|
|
336 | + mkdir -p [% c('var/project-name') %]/Browser
|
|
337 | + mv Browser [% c('var/project-name') %]/Browser/.debug
|
|
338 | + mv include [% c('var/project-name') %]/
|
|
333 | 339 | [% c('tar', {
|
334 | - tar_src => [ 'Debug' ],
|
|
340 | + tar_src => [ c('var/project-name') ],
|
|
335 | 341 | tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/browser-debug-symbols.tar.xz',
|
336 | 342 | }) %]
|
337 | - [% IF c("var/linux-x86_64") && !c("var/asan") -%]
|
|
338 | - [% c('tar', {
|
|
339 | - tar_src => [ 'geckodriver' ],
|
|
340 | - tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
|
|
341 | - }) %]
|
|
342 | - [% END -%]
|
|
343 | + popd
|
|
343 | 344 | [% ELSIF c("var/windows") -%]
|
344 | 345 | [% c('zip', {
|
345 | 346 | zip_src => [ 'Debug' ],
|
... | ... | @@ -347,6 +348,21 @@ END; |
347 | 348 | }) %]
|
348 | 349 | [% END -%]
|
349 | 350 | |
351 | +# Geckodriver
|
|
352 | +llvm-strip geckodriver*
|
|
353 | +[% IF c("var/windows") -%]
|
|
354 | + [% c('zip', {
|
|
355 | + zip_src => [ 'geckodriver.exe' ],
|
|
356 | + zip_args => dest_dir _ '/' _ c('filename') _ '/geckodriver.zip',
|
|
357 | + }) %]
|
|
358 | +[% ELSE -%]
|
|
359 | + [% c('tar', {
|
|
360 | + tar_src => [ 'geckodriver' ],
|
|
361 | + tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
|
|
362 | + }) %]
|
|
363 | +[% END -%]
|
|
364 | + |
|
365 | +# MAR tools
|
|
350 | 366 | [% IF c("var/updater_enabled") -%]
|
351 | 367 | [% c('zip', {
|
352 | 368 | zip_src => [ 'mar-tools' ],
|
... | ... | @@ -64,10 +64,13 @@ cp -rl $gradle_repo/maven2/* $gradle_repo || true |
64 | 64 | export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
65 | 65 | # Create .mozbuild to avoid interactive prompt in configure
|
66 | 66 | mkdir "$HOME/.mozbuild"
|
67 | + |
|
68 | +echo "Starting ./mach configure $(date)"
|
|
67 | 69 | ./mach configure \
|
68 | 70 | --with-base-browser-version=[% c("var/torbrowser_version") %] \
|
69 | 71 | [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
|
70 | 72 | |
73 | +echo "Starting ./mach build $(date)"
|
|
71 | 74 | ./mach build --verbose
|
72 | 75 | |
73 | 76 | [% IF !c("var/android_single_arch") -%]
|
... | ... | @@ -85,6 +88,7 @@ export MOZ_SOURCE_REPO="[% c('var/gitlab_project') %]" |
85 | 88 | export MOZ_SOURCE_CHANGESET=[% c("var/git_commit") %]
|
86 | 89 | MOZCONFIG_EOF
|
87 | 90 | |
91 | + echo "Starting the creation of the fake fat AAR $(date)"
|
|
88 | 92 | pushd tools/torbrowser
|
89 | 93 | make fat-aar ARCHS="[% c('arch') %]"
|
90 | 94 | popd
|
... | ... | @@ -93,6 +97,7 @@ MOZCONFIG_EOF |
93 | 97 | exoplayer2:publishDebugPublicationToMavenLocal
|
94 | 98 | [% END -%]
|
95 | 99 | |
100 | +echo "Starting to package artifacts $(date)"
|
|
96 | 101 | cd $distdir
|
97 | 102 | [% c('tar', {
|
98 | 103 | tar_src => [ project ],
|