Skip to content
Snippets Groups Projects
Commit 1e8f6720 authored by Mike Perry's avatar Mike Perry Committed by Richard Pospesel
Browse files

TB3: Tor Browser's official .mozconfigs.

Also:
Bug #9829.1: new .mozconfig file for the new cross-compiler and ESR24
Changes needed to build Mac in 64bit
Bug 10715: Enable Webgl for mingw-w64 again.
Disable ICU when cross-compiling; clean-up.
Bug 15773: Enable ICU on OS X
Bug 15990: Don't build the sandbox with mingw-w64
Bug 12761: Switch to ESR 38 for OS X
Updating .mozconfig-asan
Bug 12516: Compile hardenend Tor Browser with -fwrapv
Bug 18331: Switch to Mozilla's toolchain for building Tor Browser for OS X
Bug 17858: Cannot create incremental MARs for hardened builds.
Define HOST_CFLAGS, etc. to avoid compiling programs such as mbsdiff
(which is part of mar-tools and is not distributed to end-users) with
ASan.
Bug 13419: Add back ICU for Windows
Bug 21239: Use GTK2 for ESR52 Linux builds
Bug 23025: Add hardening flags for macOS
Bug 24478: Enable debug assertions and tests in our ASan builds
--enable-proxy-bypass-protection
Bug 27597: ASan build option in tor-browser-build is broken

Bug 27623 - Export MOZILLA_OFFICIAL during desktop builds

This fixes a problem where some preferences had the wrong default value.
Also see bug 27472 where we made a similar fix for Android.

Bug 30463: Explicitly disable MOZ_TELEMETRY_REPORTING

Bug 31450: Set proper BINDGEN_CFLAGS for ASan builds

Add an --enable-tor-browser-data-outside-app-dir configure option

Add --with-tor-browser-version configure option

Bug 21849: Don't allow SSL key logging.

Bug 31457: disable per-installation profiles

The dedicated profiles (per-installation) feature does not interact
well with our bundled profiles on Linux and Windows, and it also causes
multiple profiles to be created on macOS under TorBrowser-Data.

Bug 31935: Disable profile downgrade protection.

Since Tor Browser does not support more than one profile, disable
the prompt and associated code that offers to create one when a
version downgrade situation is detected.

Bug 32493: Disable MOZ_SERVICES_HEALTHREPORT

Bug 25741 - TBA: Disable features at compile-time

MOZ_NATIVE_DEVICES for casting and the media player
MOZ_TELEMETRY_REPORTING for telemetry
MOZ_DATA_REPORTING for all data reporting preferences (crashreport, telemetry, geo)

Bug 25741 - TBA: Add default configure options in dedicated file

Define MOZ_ANDROID_NETWORK_STATE and MOZ_ANDROID_LOCATION

Bug 29859: Disable HLS support for now

Add --disable-tor-launcher build option

Add --enable-tor-browser-update build option

Bug 33734: Set MOZ_NORMANDY to False

Bug 33851: Omit Parental Controls.

Bug 40061: Omit the Windows default browser agent from the build

Bug 40107: Adapt .mozconfig-asan for ESR 78

Bug 40252: Add --enable-rust-simd to our tor-browser mozconfig files

Bug 40793: moved Tor configuration options from old-configure.in to moz.configure
parent 11b2f5a4
No related branches found
No related tags found
1 merge request!545Rebase tor-browser to esr102.8
Showing
with 148 additions and 18 deletions
...@@ -87,6 +87,9 @@ if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]: ...@@ -87,6 +87,9 @@ if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]:
# Impacts `/toolkit/content/license.html`. # Impacts `/toolkit/content/license.html`.
DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True
if CONFIG["TOR_BROWSER_UPDATE"]:
DEFINES["TOR_BROWSER_UPDATE"] = 1
JAR_MANIFESTS += ["jar.mn"] JAR_MANIFESTS += ["jar.mn"]
GeneratedFile( GeneratedFile(
......
...@@ -41,5 +41,3 @@ ac_add_options MOZ_TELEMETRY_REPORTING= ...@@ -41,5 +41,3 @@ ac_add_options MOZ_TELEMETRY_REPORTING=
if test -z "$WASI_SYSROOT"; then if test -z "$WASI_SYSROOT"; then
ac_add_options --without-wasm-sandboxed-libraries ac_add_options --without-wasm-sandboxed-libraries
fi fi
ac_add_options --with-relative-profile=BaseBrowser/Data/Browser
. $topsrcdir/browser/config/mozconfigs/base-browser
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
ac_add_options --with-relative-profile=TorBrowser/Data/Browser
ac_add_options --enable-tor-browser-update
ac_add_options --with-distribution-id=org.torproject
. $topsrcdir/browser/config/mozconfigs/base-browser-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
ac_add_options --disable-tor-browser-update
ac_add_options --disable-verify-mar
if test ! -z "$LOCAL_DEV_BUILD"; then
ac_add_options --with-tor-browser-version=dev-build
fi
...@@ -82,6 +82,10 @@ endif ...@@ -82,6 +82,10 @@ endif
endif endif
endif endif
ifdef TOR_BROWSER_UPDATE
DEFINES += -DTOR_BROWSER_UPDATE
endif
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
DEFINES += -DMOZ_SHARED_MOZGLUE=1 DEFINES += -DMOZ_SHARED_MOZGLUE=1
endif endif
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
imply_option("MOZ_PLACES", True) imply_option("MOZ_PLACES", True)
imply_option("MOZ_SERVICES_HEALTHREPORT", True) imply_option("MOZ_SERVICES_HEALTHREPORT", False)
imply_option("MOZ_SERVICES_SYNC", True) imply_option("MOZ_SERVICES_SYNC", True)
imply_option("MOZ_DEDICATED_PROFILES", True) imply_option("MOZ_DEDICATED_PROFILES", False)
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True) imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", False)
imply_option("MOZ_NORMANDY", True) imply_option("MOZ_NORMANDY", False)
with only_when(target_is_linux & compile_environment): with only_when(target_is_linux & compile_environment):
option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper") option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper")
......
...@@ -15,3 +15,11 @@ MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official ...@@ -15,3 +15,11 @@ MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official
MOZ_RAW=1 MOZ_RAW=1
MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110} MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110}
### Tor Browser for Android ###
# Disable telemetry at compile-time
unset MOZ_TELEMETRY_REPORTING
# Disable data reporting at compile-time
unset MOZ_DATA_REPORTING
...@@ -46,6 +46,7 @@ android { ...@@ -46,6 +46,7 @@ android {
buildConfigField 'String', "MOZ_APP_DISPLAYNAME", "\"${mozconfig.substs.MOZ_APP_DISPLAYNAME}\""; buildConfigField 'String', "MOZ_APP_DISPLAYNAME", "\"${mozconfig.substs.MOZ_APP_DISPLAYNAME}\"";
buildConfigField 'String', "MOZ_APP_UA_NAME", "\"${mozconfig.substs.MOZ_APP_UA_NAME}\""; buildConfigField 'String', "MOZ_APP_UA_NAME", "\"${mozconfig.substs.MOZ_APP_UA_NAME}\"";
buildConfigField 'String', "MOZ_UPDATE_CHANNEL", "\"${mozconfig.substs.MOZ_UPDATE_CHANNEL}\""; buildConfigField 'String', "MOZ_UPDATE_CHANNEL", "\"${mozconfig.substs.MOZ_UPDATE_CHANNEL}\"";
buildConfigField 'String', "TOR_BROWSER_VERSION", "\"${mozconfig.substs.TOR_BROWSER_VERSION}\"";
// MOZILLA_VERSION is oddly quoted from autoconf, but we don't have to handle it specially in Gradle. // MOZILLA_VERSION is oddly quoted from autoconf, but we don't have to handle it specially in Gradle.
buildConfigField 'String', "MOZILLA_VERSION", "\"${mozconfig.substs.MOZILLA_VERSION}\""; buildConfigField 'String', "MOZILLA_VERSION", "\"${mozconfig.substs.MOZILLA_VERSION}\"";
......
...@@ -13,7 +13,7 @@ project_flag( ...@@ -13,7 +13,7 @@ project_flag(
project_flag( project_flag(
"MOZ_ANDROID_HLS_SUPPORT", "MOZ_ANDROID_HLS_SUPPORT",
help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)", help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
default=True, default=False,
) )
option( option(
...@@ -58,7 +58,10 @@ option( ...@@ -58,7 +58,10 @@ option(
set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite") set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite")
imply_option("MOZ_NORMANDY", False) imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_SERVICES_HEALTHREPORT", True) # Comment this so we can imply |False| in torbrowser.configure
# The Build system doesn't allow multiple imply_option()
# calls with the same key.
# imply_option("MOZ_SERVICES_HEALTHREPORT", True)
imply_option("MOZ_ANDROID_HISTORY", True) imply_option("MOZ_ANDROID_HISTORY", True)
imply_option("--enable-small-chunk-size", True) imply_option("--enable-small-chunk-size", True)
...@@ -77,6 +80,8 @@ def check_target(target): ...@@ -77,6 +80,8 @@ def check_target(target):
) )
include("torbrowser.configure")
include("../../toolkit/moz.configure") include("../../toolkit/moz.configure")
include("../../build/moz.configure/android-sdk.configure") include("../../build/moz.configure/android-sdk.configure")
include("../../build/moz.configure/java.configure") include("../../build/moz.configure/java.configure")
......
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
# Set Tor Browser default config
imply_option("MOZ_ANDROID_EXCLUDE_FONTS", False)
# Disable uploading crash reports and dump files to an external server
# This is still configured in old-configure. Uncomment when this moves
# to the python config
# imply_option("MOZ_CRASHREPORTER", False)
# Disable uploading information about the browser configuration and
# performance to an external server
imply_option("MOZ_SERVICES_HEALTHREPORT", False)
# Disable creating telemetry and data reports that are uploaded to an
# external server
# These aren't actually configure options. These are disabled in
# confvars.sh, but they look like configure options so we'll document
# them here, as well.
# XXX: no confvars.sh here
# imply_option("MOZ_TELEMETRY_REPORTING", False)
# imply_option("MOZ_DATA_REPORTING", False)
imply_option("MOZ_ANDROID_NETWORK_STATE", False)
imply_option("MOZ_ANDROID_LOCATION", False)
...@@ -1044,6 +1044,69 @@ def relative_profile(value, target): ...@@ -1044,6 +1044,69 @@ def relative_profile(value, target):
set_define("RELATIVE_PROFILE_DIRECTORY", relative_profile) set_define("RELATIVE_PROFILE_DIRECTORY", relative_profile)
# Tor additions.
option(
"--with-tor-browser-version",
nargs=1,
help="Set Tor Browser version, e.g., 7.0a1"
)
@depends("--with-tor-browser-version")
def tor_browser_version(value):
if not value:
die("--with-tor-browser-version is required for Tor Browser.")
return value[0]
@depends("--with-tor-browser-version")
def tor_browser_version_quoted(value):
if not value:
die("--with-tor-browser-version is required for Tor Browser.")
return '"{}"'.format(value[0])
set_config("TOR_BROWSER_VERSION", tor_browser_version)
set_define("TOR_BROWSER_VERSION", tor_browser_version)
set_define("TOR_BROWSER_VERSION_QUOTED", tor_browser_version_quoted)
option(
"--enable-tor-browser-update",
help="Enable Tor Browser update"
)
@depends("--enable-tor-browser-update")
def tor_browser_update(value):
if value:
return True
set_config("TOR_BROWSER_UPDATE", tor_browser_update)
set_define("TOR_BROWSER_UPDATE", tor_browser_update)
add_old_configure_assignment("TOR_BROWSER_UPDATE", tor_browser_update)
option(
"--enable-tor-browser-data-outside-app-dir",
help="Enable Tor Browser data outside of app directory"
)
@depends("--enable-tor-browser-data-outside-app-dir")
def tor_browser_data_outside_app_dir(value):
if value:
return True
set_define(
"TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
add_old_configure_assignment(
"TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
# Please do not add configure checks from here on. # Please do not add configure checks from here on.
# Fallthrough to autoconf-based configure # Fallthrough to autoconf-based configure
......
. $topsrcdir/browser/config/mozconfigs/base-browser-android . $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-aarch64-linux-android mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-aarch64-linux-android
ac_add_options --target=aarch64-linux-android ac_add_options --target=aarch64-linux-android
...@@ -10,14 +10,13 @@ if test -n "$LOCAL_DEV_BUILD"; then ...@@ -10,14 +10,13 @@ if test -n "$LOCAL_DEV_BUILD"; then
# You must use the "default" bogus channel for dev builds # You must use the "default" bogus channel for dev builds
ac_add_options --enable-update-channel=default ac_add_options --enable-update-channel=default
ac_add_options --without-wasm-sandboxed-libraries ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --with-tor-browser-version=dev-build
else else
# We want to have a similar fat .aar versioning as Mozilla and make it clear # We want to have a similar fat .aar versioning as Mozilla and make it clear
# we are on the beta channel for GeckoView # we are on the beta channel for GeckoView
ac_add_options --enable-update-channel=beta ac_add_options --enable-update-channel=beta
fi fi
ac_add_options --with-tor-browser-version=dev-build
ac_add_options --with-java-bin-path=$JAVA_HOME/bin ac_add_options --with-java-bin-path=$JAVA_HOME/bin
ac_add_options --with-android-sdk=$ANDROID_HOME ac_add_options --with-android-sdk=$ANDROID_HOME
ac_add_options --with-gradle=$GRADLE_HOME/bin/gradle ac_add_options --with-gradle=$GRADLE_HOME/bin/gradle
. $topsrcdir/browser/config/mozconfigs/base-browser-android . $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi
ac_add_options --target=arm-linux-androideabi ac_add_options --target=arm-linux-androideabi
. $topsrcdir/browser/config/mozconfigs/base-browser-android . $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-i386-linux-android mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-i386-linux-android
ac_add_options --target=i686-linux-android ac_add_options --target=i686-linux-android
. $topsrcdir/browser/config/mozconfigs/base-browser-android . $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android
ac_add_options --target=x86_64-linux-android ac_add_options --target=x86_64-linux-android
. $topsrcdir/browser/config/mozconfigs/base-browser . $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=arm-linux-gnueabihf ac_add_options --target=arm-linux-gnueabihf
......
. $topsrcdir/browser/config/mozconfigs/base-browser . $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=i686-linux-gnu ac_add_options --target=i686-linux-gnu
......
. $topsrcdir/browser/config/mozconfigs/base-browser . $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --enable-default-toolkit=cairo-gtk3
......
. $topsrcdir/browser/config/mozconfigs/base-browser . $topsrcdir/browser/config/mozconfigs/tor-browser
export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc" export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc" export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment