brizental pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: a635c2b6 by Beatriz Rizental at 2025-10-13T16:51:25+02:00 Bug 44131: Move torrc-defaults creation to tor-expert-bundle Related to tor-browser#44131 - - - - - 8 changed files: - − projects/browser/Bundle-Data/linux/Data/Tor/torrc - − projects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults - − projects/browser/Bundle-Data/windows/Data/Tor/torrc - − projects/browser/Bundle-Data/windows/Data/Tor/torrc-defaults - projects/browser/build - projects/tor-expert-bundle/build - projects/tor-expert-bundle/config - projects/browser/Bundle-Data/linux/Data/Tor/torrc-defaults → projects/tor-expert-bundle/torrc-defaults Changes: ===================================== projects/browser/Bundle-Data/linux/Data/Tor/torrc deleted ===================================== ===================================== projects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults deleted ===================================== @@ -1,15 +0,0 @@ -# torrc-defaults for Tor Browser -# -# DO NOT EDIT THIS FILE -# -# This file is distributed with Tor Browser and SHOULD NOT be modified (it -# may be overwritten during the next Tor Browser update). To customize your -# Tor configuration, shut down Tor Browser and edit the torrc file. -# -# If non-zero, try to write to disk less frequently than we would otherwise. -AvoidDiskWrites 1 -# Where to send logging messages. Format is minSeverity[-maxSeverity] -# (stderr|stdout|syslog|file FILENAME). -Log notice stdout -CookieAuthentication 1 -DormantCanceledByStartup 1 ===================================== projects/browser/Bundle-Data/windows/Data/Tor/torrc deleted ===================================== ===================================== projects/browser/Bundle-Data/windows/Data/Tor/torrc-defaults deleted ===================================== @@ -1,15 +0,0 @@ -# torrc-defaults for Tor Browser -# -# DO NOT EDIT THIS FILE -# -# This file is distributed with Tor Browser and SHOULD NOT be modified (it -# may be overwritten during the next Tor Browser update). To customize your -# Tor configuration, shut down Tor Browser and edit the torrc file. -# -# If non-zero, try to write to disk less frequently than we would otherwise. -AvoidDiskWrites 1 -# Where to send logging messages. Format is minSeverity[-maxSeverity] -# (stderr|stdout|syslog|file FILENAME). -Log notice stdout -CookieAuthentication 1 -DormantCanceledByStartup 1 ===================================== projects/browser/build ===================================== @@ -99,7 +99,13 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b # geoip(6) and anything else that belongs in the data dir from the expert bundle mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] - mv_tbdir data/{geoip,geoip6} "$TORCONFIGPATH" + mv_tbdir data/{geoip,geoip6,torrc-defaults} "$TORCONFIGPATH" + [% IF ! c("var/macos") %] + # Create an empty torrc file for user configurations. + # + # In MacOS this file is usually in the user directory, so we skip it there. + touch "$TBDIR/$TORCONFIGPATH"/torrc + [% END %] # pt_config.json will be consumed later in `bridges_conf` mv tor/pluggable_transports/pt_config.json $rootdir @@ -220,20 +226,6 @@ do [% END -%] done -[% IF c("var/tor-browser") -%] - PT_CONFIG="$rootdir/pt_config.json" - - # Write our ClientTransportPlugin lines to torrc-defults - for tbdir in "${TBDIRS[@]}" - do - PT_PATH='[% c("var/pt_path") %]' - TORRC_DEFAULTS="$tbdir/$TORCONFIGPATH/torrc-defaults" - jq --raw-output .pluggableTransports[] "${PT_CONFIG}" | while read -r line; do - echo "${line/\$\{pt_path\}/${PT_PATH}}" >> "$TORRC_DEFAULTS" - done - done -[% END -%] - [% IF c("var/linux") && c("var/tor-browser") %] chmod 700 "${TB_STAGE_DIR}/Browser/[% c('var/ProjectName') %]/Data/Browser" chmod 700 "${TB_STAGE_DIR}/Browser/TorBrowser/Data/Tor" ===================================== projects/tor-expert-bundle/build ===================================== @@ -71,6 +71,12 @@ cd $distdir cd .. [% END %] +# Write our ClientTransportPlugin lines to torrc-defults +jq --raw-output .pluggableTransports[] "tor/pluggable_transports/pt_config.json" | while read -r line; do + echo "${line/\$\{pt_path\}/[% c("var/pt_path") %]}" >> "$rootdir/torrc-defaults" +done +mv "$rootdir/torrc-defaults" data + [% SET tar_src = [ "tor", "data", "docs" ]; IF c("var/linux"); ===================================== projects/tor-expert-bundle/config ===================================== @@ -3,8 +3,15 @@ filename: '[% project %]-[% c("var/osname") %]-[% c("version") %]-[% c("var/buil version: '[% c("var/torbrowser_version") %]' targets: + linux: + var: + pt_path: ./TorBrowser/Tor/PluggableTransports/ + macos: + var: + pt_path: PluggableTransports/ windows: var: + pt_path: TorBrowser\Tor\PluggableTransports\ pt_extension: .exe input_files: @@ -16,6 +23,8 @@ input_files: project: conjure enable: '[% !c("var/android-x86") && !c("var/android-x86_64") %]' - filename: pt_config.json + - filename: torrc-defaults + enable: '[% !c("var/android") %]' - filename: AndroidManifest.xml enable: '[% c("var/android") %]' - filename: MANIFEST.MF ===================================== projects/browser/Bundle-Data/linux/Data/Tor/torrc-defaults → projects/tor-expert-bundle/torrc-defaults ===================================== View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a6... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a6... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
brizental (@brizental)