[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-153.5.0esr-16.0-1] 2 commits: fixup! TB 41089: Add tor-browser build scripts + Makefile to tor-browser



Title: GitLab

brizental pushed to branch tor-browser-153.5.0esr-16.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 9c1c6396
    by Beatriz Rizental at 2026-10-09T07:01:52-03:00
    fixup! TB 41089: Add tor-browser build scripts + Makefile to tor-browser
    
    This reverts commit 5f43c88992e4b69ac03c5e40aeba08fe8d0bd56e.
    
  • aeb4c4a3
    by Beatriz Rizental at 2026-10-09T08:39:19-03:00
    fixup! TB 43564: Modify ./mach bootstrap for Tor Browser
    
    Move NoScript gitignore statement to this commit
    

11 changed files:

Changes:

  • .gitignore
    ... ... @@ -420,16 +420,9 @@ CLAUDE.local.md
    420 420
     # lint-ignore-next-line: git-only
    
    421 421
     /*.json.gz
    
    422 422
     
    
    423
    -# Ignore binary base of Tor Browser
    
    424
    -.binaries
    
    425
    -
    
    426
    -# Other files modified at build time
    
    427
    -mobile/android/.experimenter.json
    
    428
    -
    
    429 423
     # GitLab project and token saved by `mach yeet auth`
    
    430 424
     /.yeet.json
    
    431 425
     
    
    432
    -# Tor libraries for local builds
    
    433
    -mobile/android/fenix/tools/nimbus-fml
    
    434
    -mobile/android/fenix/app/tor-expert-bundle.aar
    
    426
    +# Symlink to NoScript .xpi. It lives in MOZBUILD, but needs to be symlinked
    
    427
    +# to this path so it's added to the APK.
    
    435 428
     mobile/android/fenix/app/src/main/assets/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi

  • tools/torbrowser/Makefile deleted
    1
    -.DEFAULT_GOAL := all
    
    2
    -
    
    3
    -# https://stackoverflow.com/questions/18136918/how-to-get-current-relative-directory-of-your-makefile
    
    4
    -mkfile_path := "$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))"
    
    5
    -
    
    6
    -DEV_ROOT = "$(mkfile_path)/../.."
    
    7
    -BINARIES = "$(DEV_ROOT)/.binaries"
    
    8
    -ARCHITECTURE = "$(shell uname -m)"
    
    9
    -
    
    10
    -# Correct the architecture naming for ARM to match what mozilla has
    
    11
    -ifeq ($(ARCHITECTURE), "arm64")
    
    12
    -  ARCHITECTURE = "aarch64"
    
    13
    -endif
    
    14
    -
    
    15
    -ifeq ($(ARCHITECTURE), "aarch64")
    
    16
    -  LINUX_VENDOR = "unknown"
    
    17
    -else
    
    18
    -  LINUX_VENDOR = "pc"
    
    19
    -endif
    
    20
    -
    
    21
    -# Define build output path based on the platform.
    
    22
    -ifeq ("$(shell uname)", "Darwin")
    
    23
    -  BUILD_OUTPUT = "$(DEV_ROOT)/obj-$(ARCHITECTURE)-apple-darwin$(shell uname -r)"
    
    24
    -else
    
    25
    -  BUILD_OUTPUT = "$(DEV_ROOT)/obj-$(ARCHITECTURE)-$(LINUX_VENDOR)-linux-gnu"
    
    26
    -endif
    
    27
    -
    
    28
    -# Define the run command based on the platform.
    
    29
    -ifeq ("$(shell uname)", "Darwin")
    
    30
    -  RUN_CMD := cd "$(BINARIES)/Tor Browser.app/Contents/MacOS/" && ./firefox --purgecaches
    
    31
    -else
    
    32
    -  RUN_CMD := "$(BINARIES)/dev/Browser/start-tor-browser" -v --purgecaches $(ARGS)
    
    33
    -endif
    
    34
    -
    
    35
    -config:
    
    36
    -	./config.sh $(DEV_ROOT)
    
    37
    -
    
    38
    -ide-vscode:
    
    39
    -	./ide.sh vscode $(DEV_ROOT)
    
    40
    -
    
    41
    -ide-eclipse:
    
    42
    -	./ide.sh eclipse $(DEV_ROOT)
    
    43
    -
    
    44
    -ide-visualstudio:
    
    45
    -	./ide.sh visualstudio $(DEV_ROOT)
    
    46
    -
    
    47
    -fetch:
    
    48
    -	./fetch.sh $(BINARIES)
    
    49
    -
    
    50
    -build:
    
    51
    -	./build.sh $(DEV_ROOT)
    
    52
    -
    
    53
    -deploy:
    
    54
    -	./deploy.sh $(BINARIES) $(BUILD_OUTPUT)
    
    55
    -
    
    56
    -prepare-tests:
    
    57
    -	./prepare-tests.sh $(BINARIES) $(BUILD_OUTPUT)
    
    58
    -
    
    59
    -all: build deploy
    
    60
    -
    
    61
    -run:
    
    62
    -	$(RUN_CMD)
    
    63
    -
    
    64
    -jslint:
    
    65
    -	./jslint.sh $(DEV_ROOT) $(JS)
    
    66
    -
    
    67
    -clobber:
    
    68
    -	./clobber.sh $(DEV_ROOT)
    
    69
    -
    
    70
    -clean:
    
    71
    -	rm -rf $(BUILD_OUTPUT)
    
    72
    -

  • tools/torbrowser/browser-self-sign-macos.sh deleted
    1
    -#!/bin/bash
    
    2
    -
    
    3
    -CERTNAME=my-codesign-cert-tor
    
    4
    -BROWSERPATH=.
    
    5
    -
    
    6
    -if [ $# -ge 1 ]
    
    7
    -then
    
    8
    -  BROWSERPATH=$1
    
    9
    -fi
    
    10
    -
    
    11
    -
    
    12
    -security find-certificate -c $CERTNAME > /dev/null
    
    13
    -
    
    14
    -if [ $? -ne 0 ]
    
    15
    -then
    
    16
    -  echo ""
    
    17
    -  echo "ERROR: Self Signing Certificate not found, please create:"
    
    18
    -  echo "  1. In the Keychain Access app on your Mac, choose Keychain Access > Certificate Assistant > Create a Certificate."
    
    19
    -  echo "  2. Enter the name '$CERTNAME' for the certificate"
    
    20
    -  echo "  3. Choose an identity type:  Self Signed Root"
    
    21
    -  echo "  4. Certificate Type > Code Signing"
    
    22
    -  echo "  5. Check 'Let me override defaults' & click Continue."
    
    23
    -  echo "  6. Enter a unique Serial Number. (123 is fine)"
    
    24
    -  echo "  7. Enter a big Validity Period (days), like 3560 & click Continue."
    
    25
    -  echo "  8. Fill in your personal information & click Continue."
    
    26
    -  echo "  9. Accept defaults for the rest of the dialog boxes. (Continue several times)"
    
    27
    -  echo "  10. Certificate Created! Click Done."
    
    28
    -  echo ""
    
    29
    -  echo "For additional help see:"
    
    30
    -  echo "  https://support.apple.com/en-ca/guide/keychain-access/kyca8916/mac"
    
    31
    -  echo "  https://stackoverflow.com/questions/58356844/what-are-the-ways-or-technologies-to-sign-an-executable-application-file-in-mac"
    
    32
    -  
    
    33
    -  echo ""
    
    34
    -  read -n 1 -r -s -p $'Press enter to launch "Keychain Access"...\n'
    
    35
    -  open /System/Applications/Utilities/Keychain\ Access.app
    
    36
    -
    
    37
    -  exit -1
    
    38
    -fi
    
    39
    -
    
    40
    -echo "Found $CERTNAME, looking for browser to sign..."
    
    41
    -
    
    42
    -if [ ! -f "$BROWSERPATH/XUL" ]
    
    43
    -then
    
    44
    -  TESTPATH="$BROWSERPATH/Contents/MacOS"
    
    45
    -  if [ -f "$TESTPATH/XUL" ]
    
    46
    -  then
    
    47
    -      BROWSERPATH=$TESTPATH
    
    48
    -  else
    
    49
    -    echo "Error: browser files not detected in $BROWSERPATH!"
    
    50
    -    echo "  This script needs to be run in the 'Contents/MacOS' directory of a SomeBrowser.app directory"
    
    51
    -    exit -1
    
    52
    -  fi
    
    53
    -fi
    
    54
    -
    
    55
    -echo "Mozilla based browser found, signing..."
    
    56
    -echo '  Will be asked for password to certificate for all the things that need to be signed. Click "Always Allow" to automate'
    
    57
    -
    
    58
    -cd "$BROWSERPATH"
    
    59
    -
    
    60
    -codesign -s $CERTNAME *.dylib
    
    61
    -codesign -s $CERTNAME plugin-container.app
    
    62
    -
    
    63
    -if [ -d Tor ]
    
    64
    -then
    
    65
    -  codesign -s $CERTNAME Tor/PluggableTransports/*
    
    66
    -  codesign -s $CERTNAME Tor/libevent-2.1.7.dylib
    
    67
    -  if [ -f Tor/tor.real ]
    
    68
    -  then
    
    69
    -    codesign -s $CERTNAME Tor/tor.real
    
    70
    -  fi
    
    71
    -  if [ -f Tor/tor ]
    
    72
    -  then
    
    73
    -    codesign -s $CERTNAME Tor/tor
    
    74
    -  fi
    
    75
    -fi
    
    76
    -
    
    77
    -codesign -s $CERTNAME XUL
    
    78
    -
    
    79
    -if [ -d updater.app ]
    
    80
    -then
    
    81
    -  codesign -s $CERTNAME updater.app
    
    82
    -fi
    
    83
    -
    
    84
    -# mullvadbrowser
    
    85
    -if [ -f mullvadbrowser ]
    
    86
    -then
    
    87
    -  codesign -s $CERTNAME mullvadbrowser
    
    88
    -fi
    
    89
    -
    
    90
    -# BB or TB
    
    91
    -if [ -f firefox ]
    
    92
    -then
    
    93
    -  codesign -s $CERTNAME firefox
    
    94
    -fi
    
    95
    -
    
    96
    -echo ""
    
    97
    -echo "Browser signing step done!"
    
    98
    -echo ""
    
    99
    -
    
    100
    -echo "App still needs one more override to be easily opened with double click in Finder"
    
    101
    -echo "Alternatively you can right click it, select 'Open' and then select 'Open' from the override popup"
    
    102
    -echo "Or to enable it to be double clicked to open perform the following"
    
    103
    -echo ""
    
    104
    -echo "Double click the app and select either 'Ok' or 'Cancel' from the warning popup depending on which you get (Do Not 'Move to Trash')"
    
    105
    -echo 'Go to Preferences -> Security & Privacy and click on padlock to allow changes. '
    
    106
    -echo '  Then in "Allow appications downloaded from" select either:'
    
    107
    -echo '    - App Store and identified developers'
    
    108
    -echo '    - Anywhere'
    
    109
    -echo '  Below that may be a notice about your specific app saying it was blocked because it was not from an identified developer. Click "Open Anyways" and "Open"'
    
    110
    -

  • tools/torbrowser/build.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -DEV_ROOT=$1
    
    4
    -
    
    5
    -cd $DEV_ROOT
    
    6
    -./mach build
    
    7
    -
    
    8
    -if [ -z "$LOCALES" ]; then
    
    9
    -  ./mach build stage-package
    
    10
    -else
    
    11
    -  export MOZ_CHROME_MULTILOCALE=$LOCALES
    
    12
    -  # No quotes on purpose
    
    13
    -  ./mach package-multi-locale --locales en-US $MOZ_CHROME_MULTILOCALE
    
    14
    -  AB_CD=multi ./mach build stage-package
    
    15
    -fi

  • tools/torbrowser/clobber.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -DEV_ROOT=$1
    
    4
    -
    
    5
    -cd $DEV_ROOT
    
    6
    -./mach clobber

  • tools/torbrowser/config.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -DEV_ROOT=$1
    
    4
    -
    
    5
    -cd $DEV_ROOT
    
    6
    -./mach configure

  • tools/torbrowser/deploy.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -
    
    4
    -BINARIES="$1"
    
    5
    -BUILD_OUTPUT="$2"
    
    6
    -SCRIPT_DIR="$(realpath "$(dirname "$0")")"
    
    7
    -
    
    8
    -RESDIR="$BUILD_OUTPUT/dist/firefox"
    
    9
    -if [ "$(uname)" = "Darwin" ]; then
    
    10
    -    RESDIR="$RESDIR/Tor Browser.app/Contents/Resources"
    
    11
    -fi
    
    12
    -
    
    13
    -# Repackage the manual
    
    14
    -# rm -rf $BUILD_OUTPUT/_omni
    
    15
    -# mkdir $BUILD_OUTPUT/_omni
    
    16
    -# unzip $BINARIES/dev/Browser/browser/omni.ja -d $BUILD_OUTPUT/_omni
    
    17
    -# cd $BUILD_OUTPUT/_omni && zip -Xmr $RESDIR/browser/omni.ja chrome/browser/content/browser/manual
    
    18
    -# rm -rf $BUILD_OUTPUT/_omni
    
    19
    -
    
    20
    -if [ "$(uname)" = "Darwin" ]; then
    
    21
    -
    
    22
    -    # copy binaries
    
    23
    -    cp -r "$BUILD_OUTPUT/dist/firefox/"*.app/Contents/* "$BINARIES/Tor Browser.app/Contents/"
    
    24
    -    rm -rf "$BINARIES/TorBrowser-Data/Browser/Caches/*.default/startupCache"
    
    25
    -
    
    26
    -    # Self sign the Binaries
    
    27
    -    cd "$BINARIES/Tor Browser.app/Contents/MacOS"
    
    28
    -    "$SCRIPT_DIR/browser-self-sign-macos.sh"
    
    29
    -
    
    30
    -else
    
    31
    -
    
    32
    -    # backup the startup script
    
    33
    -    mv "$BINARIES/dev/Browser/firefox" "$BINARIES/dev/Browser/firefox.bak"
    
    34
    -
    
    35
    -    # copy binaries
    
    36
    -    cp -r "$RESDIR/"* "$BINARIES/dev/Browser"
    
    37
    -    rm -rf "$BINARIES/dev/Browser/TorBrowser/Data/Browser/profile.default/startupCache"
    
    38
    -
    
    39
    -    # shuffle firefox bin around and restore script to match a real deployment
    
    40
    -    mv "$BINARIES/dev/Browser/firefox" "$BINARIES/dev/Browser/firefox.real"
    
    41
    -    mv "$BINARIES/dev/Browser/firefox.bak" "$BINARIES/dev/Browser/firefox"
    
    42
    -
    
    43
    -fi

  • tools/torbrowser/fetch.sh deleted
    1
    -#!/bin/sh
    
    2
    -set -e
    
    3
    -
    
    4
    -BINARIES_DIR="$1"
    
    5
    -
    
    6
    -# download the current downloads.json
    
    7
    -wget https://aus1.torproject.org/torbrowser/update_3/alpha/downloads.json
    
    8
    -# get url for latest alpha linux package
    
    9
    -TOR_BROWSER_VERSION=$(grep -Eo "\"version\"\s*:\s*\"[0-9.a]+\"" downloads.json | grep -Eo "[0-9.a]+")
    
    10
    -if [ "$(uname)" = "Darwin" ]; then
    
    11
    -    TOR_BROWSER_PACKAGE="tor-browser-macos-${TOR_BROWSER_VERSION}.dmg"
    
    12
    -  else
    
    13
    -    TOR_BROWSER_PACKAGE="tor-browser-linux-$(uname -m)-${TOR_BROWSER_VERSION}.tar.xz"
    
    14
    -fi
    
    15
    -TOR_BROWSER_PACKAGE_URL="https://dist.torproject.org/torbrowser/${TOR_BROWSER_VERSION}/${TOR_BROWSER_PACKAGE}"
    
    16
    -
    
    17
    -# remove download manifest
    
    18
    -rm downloads.json
    
    19
    -
    
    20
    -# clear out previous tor-browser and previous package
    
    21
    -rm -rf "${BINARIES_DIR}"
    
    22
    -rm -f "${TOR_BROWSER_PACKAGE}"
    
    23
    -
    
    24
    -# download
    
    25
    -wget "${TOR_BROWSER_PACKAGE_URL}"
    
    26
    -mkdir -p "${BINARIES_DIR}"
    
    27
    -
    
    28
    -# and extract
    
    29
    -if [ "$(uname)" = "Darwin" ]
    
    30
    -  then
    
    31
    -    hdiutil attach "${TOR_BROWSER_PACKAGE}"
    
    32
    -    cp -R "/Volumes/Tor Browser Alpha/Tor Browser Alpha.app" "${BINARIES_DIR}/Tor Browser.app"
    
    33
    -    hdiutil detach "/Volumes/Tor Browser Alpha"
    
    34
    -  else
    
    35
    -    tar -xf "${TOR_BROWSER_PACKAGE}" -C "${BINARIES_DIR}"
    
    36
    -    mv "${BINARIES_DIR}/tor-browser" "${BINARIES_DIR}/dev"
    
    37
    -fi
    
    38
    -
    
    39
    -# Final cleanup
    
    40
    -rm -f "${TOR_BROWSER_PACKAGE}"

  • tools/torbrowser/ide.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -IDE=$1
    
    4
    -DEV_ROOT=$2
    
    5
    -
    
    6
    -cd $DEV_ROOT
    
    7
    -./mach ide $IDE

  • tools/torbrowser/jslint.sh deleted
    1
    -#!/bin/bash
    
    2
    -set -e
    
    3
    -DEV_ROOT=$1
    
    4
    -JS_FILE=$2
    
    5
    -
    
    6
    -cd $DEV_ROOT
    
    7
    -./mach lint -l eslint --fix $JS_FILE

  • tools/torbrowser/prepare-tests.sh deleted
    1
    -#!/bin/sh
    
    2
    -set -e
    
    3
    -
    
    4
    -BINARIES="$1"
    
    5
    -BUILD_OUTPUT="$2"
    
    6
    -
    
    7
    -if [ ! -d "$BUILD_OUTPUT" ]; then
    
    8
    -    echo "Error: $BUILD_OUTPUT directory does not exist."
    
    9
    -    echo "Make sure to run `mach ./build` or `make -C tools/torbrowser build`."
    
    10
    -    exit 1
    
    11
    -fi
    
    12
    -
    
    13
    -if [ ! -d "$BINARIES" ]; then
    
    14
    -    echo "Error: $BINARIES directory does not exist."
    
    15
    -    echo "Make sure to run `make -C tools/torbrowser fetch`."
    
    16
    -    exit 1
    
    17
    -fi
    
    18
    -
    
    19
    -if [ "$(uname)" = "Darwin" ]; then
    
    20
    -    cp -r "$BINARIES/Tor Browser.app/Contents/MacOS/Tor" "$BUILD_OUTPUT/dist/firefox/"*.app/Contents/MacOS
    
    21
    -    cp -r "$BINARIES/Tor Browser.app/Contents/Resources/fonts" "$BUILD_OUTPUT/dist/firefox/"*.app/Contents/Resources
    
    22
    -else
    
    23
    -    cp -r "$BINARIES/dev/Browser/fonts" "$BUILD_OUTPUT/dist/bin"
    
    24
    -    cp -r "$BINARIES/dev/Browser/TorBrowser" "$BUILD_OUTPUT/dist/bin"
    
    25
    -fi

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx