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

[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40732: Review the Bundle-Data and do not ship the default profile



Title: GitLab

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:

Changes:

  • projects/browser/Bundle-Data/mac-applications.dmg/.DS_Storeprojects/browser/Bundle-Data/BaseBrowser.dmg/.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/mac-applications.dmg/.VolumeIcon.icnsprojects/browser/Bundle-Data/BaseBrowser.dmg/.VolumeIcon.icns
    No preview for this file type
  • projects/browser/Bundle-Data/mac-applications.dmg/.background/background.tiffprojects/browser/Bundle-Data/BaseBrowser.dmg/.background/background.tiff
    No preview for this file type
  • projects/browser/Bundle-Data/mac-desktop.dmg/.DS_Storeprojects/browser/Bundle-Data/TorBrowser.dmg/.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/TorBrowser.dmg/.VolumeIcon.icns
    No preview for this file type
  • projects/browser/Bundle-Data/TorBrowser.dmg/.background/background.tiff
    No preview for this file type
  • projects/browser/Bundle-Data/mac-desktop.dmg/._Desktop deleted
    No preview for this file type
  • projects/browser/Bundle-Data/mac-desktop.dmg/.background/background.png deleted
    No preview for this file type
  • projects/browser/Bundle-Data/mac-desktop.dmg/Desktop deleted
    No preview for this file type
  • projects/browser/Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaultsprojects/browser/Bundle-Data/mac/Contents/Resources/TorBrowser/Tor/torrc-defaults

  • projects/browser/Bundle-Data/mac/TorBrowser/Data/Browser/profiles.ini deleted
    1
    -[General]
    
    2
    -StartWithLastProfile=1
    
    3
    -
    
    4
    -[Profile0]
    
    5
    -Name=default
    
    6
    -IsRelative=1
    
    7
    -Path=profile.default
    
    8
    -Default=1
    
    9
    -

  • 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
    92 92
             exit 1
    
    93 93
     fi
    
    94 94
     
    
    95
    -tbb_usage () {
    
    95
    +print_usage () {
    
    96 96
         printf "\n[% c('var/Project_Name') %] Script Options\n"
    
    97 97
         printf "  --verbose         Display Tor and Firefox output in the terminal\n"
    
    98 98
         printf "  --log [file]      Record Tor and Firefox output in file (default: [% c('var/project-name') %].log)\n"
    
    ... ... @@ -357,27 +357,22 @@ cd "${HOME}"
    357 357
     if [ "$show_usage" -eq 1 ]; then
    
    358 358
         # Display Firefox help, then our help
    
    359 359
         [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
    
    360
    -        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \
    
    361
    -        -profile [% c('var/ProjectName') %]/Data/Browser/profile.default --help 2>/dev/null
    
    362
    -    tbb_usage
    
    360
    +        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" --help 2>/dev/null
    
    361
    +    print_usage
    
    363 362
     elif [ "$detach" -eq 1 ] ; then
    
    364 363
         [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
    
    365
    -        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \
    
    366
    -        -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null &
    
    364
    +        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null &
    
    367 365
         disown "$!"
    
    368 366
     elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then
    
    369 367
         [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
    
    370
    -        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \
    
    371
    -        -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" 2>&1 </dev/null | \
    
    368
    +        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" 2>&1 </dev/null | \
    
    372 369
             tee "$logfile"
    
    373 370
     elif [ "$show_output" -eq 1 ]; then
    
    374 371
         [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
    
    375
    -        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \
    
    376
    -        -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" < /dev/null
    
    372
    +        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" < /dev/null
    
    377 373
     else
    
    378 374
         [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
    
    379
    -        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" \
    
    380
    -        -profile [% c('var/ProjectName') %]/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null
    
    375
    +        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null
    
    381 376
     fi
    
    382 377
     
    
    383 378
     exit $?

  • projects/browser/build
    ... ... @@ -203,31 +203,18 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
    203 203
        END; %]
    
    204 204
     
    
    205 205
     [% IF c("var/macos") %]
    
    206
    -  # The Bundle-Data is designed for embedded data, so we need to modify
    
    207
    -  # the structure when we want the data to be outside the app directory.
    
    208
    -  # We also create an override.ini file to disable the profile migrator.
    
    209
    -  SKELETON_TMP=$rootdir/Bundle-Data/mac-skeleton-tmp
    
    210
    -  SKELETON_TMP_RESOURCES=$SKELETON_TMP/Contents/Resources
    
    211
    -  mkdir -p $SKELETON_TMP_RESOURCES/browser
    
    212
    -  echo "[XRE]" > $SKELETON_TMP_RESOURCES/browser/override.ini
    
    213
    -  echo "EnableProfileMigrator=0" >> $SKELETON_TMP_RESOURCES/browser/override.ini
    
    214
    -  [% IF c("var/tor-browser") -%]
    
    215
    -    mkdir -p $SKELETON_TMP_RESOURCES/TorBrowser/Tor
    
    216
    -    cp -p Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaults $SKELETON_TMP_RESOURCES/TorBrowser/Tor/
    
    217
    -  [% END -%]
    
    218
    -  rm -Rf Bundle-Data/mac
    
    219
    -  mv $SKELETON_TMP Bundle-Data/mac
    
    220
    -
    
    221
    -  tar -C Bundle-Data/mac-applications.dmg -c . | tar -C $TB_STAGE_DIR -x
    
    206
    +  tar -C "Bundle-Data/[% c('var/ProjectName') %].dmg" -c . | tar -C $TB_STAGE_DIR -x
    
    222 207
     [% END %]
    
    223 208
     
    
    224 209
     for tbdir in "${TBDIRS[@]}"
    
    225 210
     do
    
    226 211
       mkdir -p "$tbdir/$DOCSPATH"
    
    227 212
       cp -a Bundle-Data/Docs/* "$tbdir/$DOCSPATH"
    
    228
    -  tar -C Bundle-Data/[% bundledata_osname %] \
    
    229
    -    [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \
    
    230
    -    -c . | tar -C "$tbdir[% IF ! c("var/macos") %]/[% c('var/ProjectName') %][% END %]" -x
    
    213
    +  [% IF c("var/tor-browser") -%]
    
    214
    +    tar -C Bundle-Data/[% bundledata_osname %] \
    
    215
    +      [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \
    
    216
    +      -c . | tar -C "$tbdir[% IF ! c("var/macos") %]/[% c('var/ProjectName') %][% END %]" -x
    
    217
    +  [% END -%]
    
    231 218
     done
    
    232 219
     
    
    233 220
     [% IF c("var/tor-browser") -%]
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits