Skip to content
Snippets Groups Projects
Verified Commit 7855f0b6 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

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.
parent 71e464f1
No related branches found
No related tags found
No related merge requests found
Showing
with 13 additions and 40 deletions
File added
projects/browser/Bundle-Data/TorBrowser.dmg/.background/background.tiff

35.3 KiB

File deleted
projects/browser/Bundle-Data/mac-desktop.dmg/.background/background.png

48.8 KiB

File deleted
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=profile.default
Default=1
......@@ -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 $?
......@@ -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") -%]
......
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