Richard Pospesel pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits: 7855f0b6 by Pier Angelo Vendrame at 2023-01-16T20:32:34+01:00 Bug 40732: Review the Bundle-Data and do not ship the default profile
In this commit we stop shipping Bundle-Data/$osname in base-browser, which means that the default profile is now distributed only in Tor Browser (and only on Windows and Linux). For this reason, we had to modify also the start-browser script.
On macOS we still had profile.ini, which we do not need anymore, so this commit removes it. Also, we are disabling the profile migration in the browser build configuration (tor-browser#41577), so the logic to populate the override.ini has been removed, too.
Finally, we had two .dmg templates: one for installing Tor Browser to /Applications, and one to install it to the desktop. We were not using the latter anymore, and this commits duplicate the former to start differentiating the dmg resources between the various browsers.
- - - - -
14 changed files:
- projects/browser/Bundle-Data/mac-applications.dmg/.DS_Store → projects/browser/Bundle-Data/BaseBrowser.dmg/.DS_Store - projects/browser/Bundle-Data/mac-applications.dmg/.VolumeIcon.icns → projects/browser/Bundle-Data/BaseBrowser.dmg/.VolumeIcon.icns - projects/browser/Bundle-Data/mac-applications.dmg/.background/background.tiff → projects/browser/Bundle-Data/BaseBrowser.dmg/.background/background.tiff - projects/browser/Bundle-Data/mac-desktop.dmg/.DS_Store → projects/browser/Bundle-Data/TorBrowser.dmg/.DS_Store - + projects/browser/Bundle-Data/TorBrowser.dmg/.VolumeIcon.icns - + projects/browser/Bundle-Data/TorBrowser.dmg/.background/background.tiff - − projects/browser/Bundle-Data/mac-desktop.dmg/._Desktop - − projects/browser/Bundle-Data/mac-desktop.dmg/.background/background.png - − projects/browser/Bundle-Data/mac-desktop.dmg/Desktop - projects/browser/Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaults → projects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults - − projects/browser/Bundle-Data/mac/TorBrowser/Data/Browser/profiles.ini - − projects/browser/Bundle-Data/mac/TorBrowser/Data/Tor/torrc - projects/browser/RelativeLink/start-browser - projects/browser/build
Changes:
===================================== projects/browser/Bundle-Data/mac-applications.dmg/.DS_Store → projects/browser/Bundle-Data/BaseBrowser.dmg/.DS_Store =====================================
===================================== projects/browser/Bundle-Data/mac-applications.dmg/.VolumeIcon.icns → projects/browser/Bundle-Data/BaseBrowser.dmg/.VolumeIcon.icns =====================================
===================================== projects/browser/Bundle-Data/mac-applications.dmg/.background/background.tiff → projects/browser/Bundle-Data/BaseBrowser.dmg/.background/background.tiff =====================================
===================================== projects/browser/Bundle-Data/mac-desktop.dmg/.DS_Store → projects/browser/Bundle-Data/TorBrowser.dmg/.DS_Store ===================================== Binary files a/projects/browser/Bundle-Data/mac-desktop.dmg/.DS_Store and b/projects/browser/Bundle-Data/TorBrowser.dmg/.DS_Store differ
===================================== projects/browser/Bundle-Data/TorBrowser.dmg/.VolumeIcon.icns ===================================== Binary files /dev/null and b/projects/browser/Bundle-Data/TorBrowser.dmg/.VolumeIcon.icns differ
===================================== projects/browser/Bundle-Data/TorBrowser.dmg/.background/background.tiff ===================================== Binary files /dev/null and b/projects/browser/Bundle-Data/TorBrowser.dmg/.background/background.tiff differ
===================================== projects/browser/Bundle-Data/mac-desktop.dmg/._Desktop deleted ===================================== Binary files a/projects/browser/Bundle-Data/mac-desktop.dmg/._Desktop and /dev/null differ
===================================== projects/browser/Bundle-Data/mac-desktop.dmg/.background/background.png deleted ===================================== Binary files a/projects/browser/Bundle-Data/mac-desktop.dmg/.background/background.png and /dev/null differ
===================================== projects/browser/Bundle-Data/mac-desktop.dmg/Desktop deleted ===================================== Binary files a/projects/browser/Bundle-Data/mac-desktop.dmg/Desktop and /dev/null differ
===================================== projects/browser/Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaults → projects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults =====================================
===================================== projects/browser/Bundle-Data/mac/TorBrowser/Data/Browser/profiles.ini deleted ===================================== @@ -1,9 +0,0 @@ -[General] -StartWithLastProfile=1 - -[Profile0] -Name=default -IsRelative=1 -Path=profile.default -Default=1 -
===================================== projects/browser/Bundle-Data/mac/TorBrowser/Data/Tor/torrc deleted =====================================
===================================== projects/browser/RelativeLink/start-browser ===================================== @@ -92,7 +92,7 @@ if test -r /proc/cpuinfo && ! grep -q '^flags\s*:.* sse2' /proc/cpuinfo; then exit 1 fi
-tbb_usage () { +print_usage () { printf "\n[% c('var/Project_Name') %] Script Options\n" printf " --verbose Display Tor and Firefox output in the terminal\n" printf " --log [file] Record Tor and Firefox output in file (default: [% c('var/project-name') %].log)\n" @@ -357,27 +357,22 @@ cd "${HOME}" if [ "$show_usage" -eq 1 ]; then # Display Firefox help, then our help [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \ - --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \ - -profile [% c('var/ProjectName') %]/Data/Browser/profile.default --help 2>/dev/null - tbb_usage + --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" --help 2>/dev/null + print_usage elif [ "$detach" -eq 1 ] ; then [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \ - --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \ - -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null & + --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null & disown "$!" elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \ - --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \ - -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" 2>&1 </dev/null | \ tee "$logfile" elif [ "$show_output" -eq 1 ]; then [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \ - --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \ - -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" < /dev/null + --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" < /dev/null else [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \ - --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \ - -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null + --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null fi
exit $?
===================================== projects/browser/build ===================================== @@ -203,31 +203,18 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz END; %]
[% IF c("var/macos") %] - # The Bundle-Data is designed for embedded data, so we need to modify - # the structure when we want the data to be outside the app directory. - # We also create an override.ini file to disable the profile migrator. - SKELETON_TMP=$rootdir/Bundle-Data/mac-skeleton-tmp - SKELETON_TMP_RESOURCES=$SKELETON_TMP/Contents/Resources - mkdir -p $SKELETON_TMP_RESOURCES/browser - echo "[XRE]" > $SKELETON_TMP_RESOURCES/browser/override.ini - echo "EnableProfileMigrator=0" >> $SKELETON_TMP_RESOURCES/browser/override.ini - [% IF c("var/tor-browser") -%] - mkdir -p $SKELETON_TMP_RESOURCES/TorBrowser/Tor - cp -p Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaults $SKELETON_TMP_RESOURCES/TorBrowser/Tor/ - [% END -%] - rm -Rf Bundle-Data/mac - mv $SKELETON_TMP Bundle-Data/mac - - tar -C Bundle-Data/mac-applications.dmg -c . | tar -C $TB_STAGE_DIR -x + tar -C "Bundle-Data/[% c('var/ProjectName') %].dmg" -c . | tar -C $TB_STAGE_DIR -x [% END %]
for tbdir in "${TBDIRS[@]}" do mkdir -p "$tbdir/$DOCSPATH" cp -a Bundle-Data/Docs/* "$tbdir/$DOCSPATH" - tar -C Bundle-Data/[% bundledata_osname %] \ - [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \ - -c . | tar -C "$tbdir[% IF ! c("var/macos") %]/[% c('var/ProjectName') %][% END %]" -x + [% IF c("var/tor-browser") -%] + tar -C Bundle-Data/[% bundledata_osname %] \ + [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \ + -c . | tar -C "$tbdir[% IF ! c("var/macos") %]/[% c('var/ProjectName') %][% END %]" -x + [% END -%] done
[% IF c("var/tor-browser") -%]
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/78...
tor-commits@lists.torproject.org