brizental pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

8 changed files:

Changes:

  • projects/browser/Bundle-Data/linux/Data/Tor/torrc deleted

  • projects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults deleted
    1
    -# torrc-defaults for Tor Browser
    
    2
    -#
    
    3
    -# DO NOT EDIT THIS FILE
    
    4
    -#
    
    5
    -# This file is distributed with Tor Browser and SHOULD NOT be modified (it
    
    6
    -# may be overwritten during the next Tor Browser update). To customize your
    
    7
    -# Tor configuration, shut down Tor Browser and edit the torrc file.
    
    8
    -#
    
    9
    -# If non-zero, try to write to disk less frequently than we would otherwise.
    
    10
    -AvoidDiskWrites 1
    
    11
    -# Where to send logging messages.  Format is minSeverity[-maxSeverity]
    
    12
    -# (stderr|stdout|syslog|file FILENAME).
    
    13
    -Log notice stdout
    
    14
    -CookieAuthentication 1
    
    15
    -DormantCanceledByStartup 1

  • projects/browser/Bundle-Data/windows/Data/Tor/torrc deleted

  • projects/browser/Bundle-Data/windows/Data/Tor/torrc-defaults deleted
    1
    -# torrc-defaults for Tor Browser
    
    2
    -#
    
    3
    -# DO NOT EDIT THIS FILE
    
    4
    -#
    
    5
    -# This file is distributed with Tor Browser and SHOULD NOT be modified (it
    
    6
    -# may be overwritten during the next Tor Browser update). To customize your
    
    7
    -# Tor configuration, shut down Tor Browser and edit the torrc file.
    
    8
    -#
    
    9
    -# If non-zero, try to write to disk less frequently than we would otherwise.
    
    10
    -AvoidDiskWrites 1
    
    11
    -# Where to send logging messages.  Format is minSeverity[-maxSeverity]
    
    12
    -# (stderr|stdout|syslog|file FILENAME).
    
    13
    -Log notice stdout
    
    14
    -CookieAuthentication 1
    
    15
    -DormantCanceledByStartup 1

  • projects/browser/build
    ... ... @@ -99,7 +99,13 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b
    99 99
     
    
    100 100
       # geoip(6) and anything else that belongs in the data dir from the expert bundle
    
    101 101
       mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %]
    
    102
    -  mv_tbdir data/{geoip,geoip6} "$TORCONFIGPATH"
    
    102
    +  mv_tbdir data/{geoip,geoip6,torrc-defaults} "$TORCONFIGPATH"
    
    103
    +  [% IF ! c("var/macos") %]
    
    104
    +    # Create an empty torrc file for user configurations.
    
    105
    +    #
    
    106
    +    # In MacOS this file is usually in the user directory, so we skip it there.
    
    107
    +    touch "$TBDIR/$TORCONFIGPATH"/torrc
    
    108
    +  [% END %]
    
    103 109
     
    
    104 110
       # pt_config.json will be consumed later in `bridges_conf`
    
    105 111
       mv tor/pluggable_transports/pt_config.json $rootdir
    
    ... ... @@ -220,20 +226,6 @@ do
    220 226
       [% END -%]
    
    221 227
     done
    
    222 228
     
    
    223
    -[% IF c("var/tor-browser") -%]
    
    224
    -  PT_CONFIG="$rootdir/pt_config.json"
    
    225
    -
    
    226
    -  # Write our ClientTransportPlugin lines to torrc-defults
    
    227
    -  for tbdir in "${TBDIRS[@]}"
    
    228
    -  do
    
    229
    -    PT_PATH='[% c("var/pt_path") %]'
    
    230
    -    TORRC_DEFAULTS="$tbdir/$TORCONFIGPATH/torrc-defaults"
    
    231
    -    jq --raw-output .pluggableTransports[] "${PT_CONFIG}" | while read -r line; do
    
    232
    -      echo "${line/\$\{pt_path\}/${PT_PATH}}" >> "$TORRC_DEFAULTS"
    
    233
    -    done
    
    234
    -  done
    
    235
    -[% END -%]
    
    236
    -
    
    237 229
     [% IF c("var/linux") && c("var/tor-browser") %]
    
    238 230
       chmod 700 "${TB_STAGE_DIR}/Browser/[% c('var/ProjectName') %]/Data/Browser"
    
    239 231
       chmod 700 "${TB_STAGE_DIR}/Browser/TorBrowser/Data/Tor"
    

  • projects/tor-expert-bundle/build
    ... ... @@ -71,6 +71,12 @@ cd $distdir
    71 71
       cd ..
    
    72 72
     [% END %]
    
    73 73
     
    
    74
    +# Write our ClientTransportPlugin lines to torrc-defults
    
    75
    +jq --raw-output .pluggableTransports[] "tor/pluggable_transports/pt_config.json" | while read -r line; do
    
    76
    +  echo "${line/\$\{pt_path\}/[% c("var/pt_path") %]}" >> "$rootdir/torrc-defaults"
    
    77
    +done
    
    78
    +mv "$rootdir/torrc-defaults" data
    
    79
    +
    
    74 80
     [%
    
    75 81
       SET tar_src = [ "tor", "data", "docs" ];
    
    76 82
       IF c("var/linux");
    

  • projects/tor-expert-bundle/config
    ... ... @@ -3,8 +3,15 @@ filename: '[% project %]-[% c("var/osname") %]-[% c("version") %]-[% c("var/buil
    3 3
     version: '[% c("var/torbrowser_version") %]'
    
    4 4
     
    
    5 5
     targets:
    
    6
    +  linux:
    
    7
    +    var:
    
    8
    +      pt_path: ./TorBrowser/Tor/PluggableTransports/
    
    9
    +  macos:
    
    10
    +    var:
    
    11
    +      pt_path: PluggableTransports/
    
    6 12
       windows:
    
    7 13
         var:
    
    14
    +      pt_path: TorBrowser\Tor\PluggableTransports\
    
    8 15
           pt_extension: .exe
    
    9 16
     
    
    10 17
     input_files:
    
    ... ... @@ -16,6 +23,8 @@ input_files:
    16 23
         project: conjure
    
    17 24
         enable: '[% !c("var/android-x86") && !c("var/android-x86_64") %]'
    
    18 25
       - filename: pt_config.json
    
    26
    +  - filename: torrc-defaults
    
    27
    +    enable: '[% !c("var/android") %]'
    
    19 28
       - filename: AndroidManifest.xml
    
    20 29
         enable: '[% c("var/android") %]'
    
    21 30
       - filename: MANIFEST.MF
    

  • projects/browser/Bundle-Data/linux/Data/Tor/torrc-defaultsprojects/tor-expert-bundle/torrc-defaults