Opened 5 years ago

Closed 4 years ago

#11641 closed defect (fixed)

change TBB directory structure to be more like Firefox's

Reported by: mcs Owned by: mcs
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: MikePerry201405R
Cc: brade, mikeperry, gk, boklm Actual Points:
Parent ID: #4234 Points:
Reviewer: Sponsor:

Description

Reorganizing the internal directory structure of TBB to mirror Firefox's layout as closely as possible will simplify the Firefox updater patches (#4234) and reduce risk for the updater. The new structure will be like Firefox's with the Tor-related subdirectories (Data, Doc, Tor) added under a new subdirectory named TorBrowser.

On Windows and Linux, the installable TBB packages will include a "container" directory named Browser at the top level so we do not expose so many files to end users.

On Linux, we will move the launcher script (start-tor-browser) under the Browser directory and at the top level we will include a symbolic link to it.

On Windows, we will eliminate the Start Tor Browser.exe program and instead modify the NSIS-based installer so it creates a similarly named shortcut at the top level.

On Mac OS, the .app bundle mechanism takes care of hiding the underlying structure.

New Linux structure:

Tor Browser/
  start-tor-browser    // symlink to Browser/start-tor-browser
  Browser/
    firefox
    start-tor-browser  // launcher script
    TorBrowser/
      Data/
      Docs/
      Tor/

New Windows structure:

Tor Browser/
  Start Tor Browser.lnk  // shortcut to Browser\firefox.exe
  Browser/
    firefox.exe
    TorBrowser/
      Data/
      Docs/
      Tor/

New Mac OS structure:

TorBrowser.app/
  Contents/
    MacOS/
      firefox
  TorBrowser/
    Data/
    Docs/
    Tor/

Firefox changes needed: update the #9173 patch to account for the new location of the profile directory and create a new patch that forces -no-remote.

Tor Launcher changes needed: prepend the directory that contains tor.exe to the PATH environment variable (currently done by Start Tor Launcher.exe aka RelativeLink.c) and adjust getTorFile() to account for the new structure.

The gitian descriptors within builders/tor-browser-bundle.git will need to be modified to construct the packages using the new structure.

torbrowser.nsi will need to be modified to create a shortcut.

The Linux launcher script (RelativeLink.sh/start-tor-browser) will need minor changes to account for the new directory structure.

Child Tickets

Change History (11)

comment:1 Changed 5 years ago by mcs

Parent ID: #4234

comment:2 Changed 5 years ago by gk

Cc: gk added

comment:3 Changed 5 years ago by mcs

Ready for review.
https://gitweb.torproject.org/user/brade/tor-browser-bundle.git/commit/31d35dbb9faa2fbc6af5f3820e921e83f703ad96

https://gitweb.torproject.org/user/brade/tor-browser.git/shortlog/refs/heads/bug11641 (most recent three commits)

https://gitweb.torproject.org/user/brade/tor-launcher.git/commit/6599aca0c63944a4db7782fd47c0c6569d8dfdf0

https://github.com/MarkCSmith/tbb-windows-installer/commit/00133b8741eb8ca34fc8153d344c7c54a5e3fae9

Note that we created a (hopefully) temporary fork of tbb-windows-installer on GitHub.

Also note that the tor-browser-bundle.git changes will need some minor cleanup before merging. For now, we only modified the versions.beta file; all of the versions* files and fetch-inputs.sh will need to be modified to pull using new tags.

comment:4 Changed 5 years ago by mcs

Keywords: MikePerry201405R added

comment:5 Changed 5 years ago by mikeperry

Nice work guys. Some comments:

First, is there a reason why we can't have the 'Docs' subdir in the bundle at the top-level for all three platforms? I realize this is my oversight for not asking this sooner. If there is no problem with doing this, I can clean up the branch myself.

Second, in addition to the maint-3.6 tor-browser-bundle.git branch, it seems like we should create a new maint-0.2.5 branch for tor-launcher.git now, and start calling these new restructured tor launchers 0.2.6? Similarly, we probably want to make a separate tor-browser.git branch for the #9173 update, and probably the remoting stuff too. I can also do this, I am just stating it in case you have any alternate suggestions.

Third, for the tor-browser-bundle.git cleanups, I think we should be using the versions.nightly file for these changes, at least to start. Then we can think about building a 4.0-alpha (which will also have the updater in it, eventually) if the nightlies check out OK.

As far as merge timeline, I think we should shoot for merging this into 'master' and doing all the branch restructuring after we are satisfied with #8402's behavior in the nightlies, and begin tagging that stuff for 3.6.2 (hopefully mid next week).

comment:6 Changed 5 years ago by boklm

Cc: boklm added

comment:7 in reply to:  5 Changed 5 years ago by mcs

Replying to mikeperry:

Nice work guys. Some comments:

First, is there a reason why we can't have the 'Docs' subdir in the bundle at the top-level for all three platforms? I realize this is my oversight for not asking this sooner. If there is no problem with doing this, I can clean up the branch myself.

The problem is that the updater will not be able to touch anything above the directory that contains Firefox. So if by "top level" you mean "above the directory that contains Firefox" then that won't work. We could create a shortcut on Windows and a symlink on Linux that point to the Docs directory. On Mac OS, I am not sure how to really help people find the docs since they will need to know how to ctrl-click and choose "Show Package Contents" to see anything beyond the app package. The best idea we have is to add a "Show Documentation Folder" feature inside Tor Launcher... if we can find a place for it in the GUI.

Second, in addition to the maint-3.6 tor-browser-bundle.git branch, it seems like we should create a new maint-0.2.5 branch for tor-launcher.git now, and start calling these new restructured tor launchers 0.2.6? Similarly, we probably want to make a separate tor-browser.git branch for the #9173 update, and probably the remoting stuff too. I can also do this, I am just stating it in case you have any alternate suggestions.

That sounds like a good plan.

Third, for the tor-browser-bundle.git cleanups, I think we should be using the versions.nightly file for these changes, at least to start. Then we can think about building a 4.0-alpha (which will also have the updater in it, eventually) if the nightlies check out OK.

OK, but we still need a branch within tor-browser-bundle.git since we did not conditionalize all of the path changes, files have been removed and moved, etc.

As far as merge timeline, I think we should shoot for merging this into 'master' and doing all the branch restructuring after we are satisfied with #8402's behavior in the nightlies, and begin tagging that stuff for 3.6.2 (hopefully mid next week).

Sounds good to us.

comment:8 Changed 4 years ago by mcs

We rebased the builder changes (there were quite a few conflicts due to gk's refactoring work):

https://gitweb.torproject.org/user/brade/tor-browser-bundle.git/commit/d1b31fc54a1039a7c70fd0538dd60ee44e03fb42

I expect the other changes (Firefox, Tor Launcher, Windows installer) will apply without much hassle.

comment:9 Changed 4 years ago by mikeperry

Ok, this is merged. I branched a maint-3.6 branch in tor-browser-builder.git for continued work on the 3.6 series. master now contains these descriptor changes, and references tor-browser.git branch tor-browser-24.5.0esr-4.x-1 in the versions.alpha file and the versions.nightly file. tor-launcher.git was also brached for maint-0.2.5, and master contains your changes.

This means that if all goes well, nightlies should appear with this change at https://people.torproject.org/~linus/builds/ (probably as either tbb-nightly-2014-05-30 or tbb-nightly-2014-05-31, depending on when the build starts).

I did not tag anything in tor-browser.git or tor-launcher.git yet. If the nightlies go well, we can create tags and switch VERIFY_TAGS=1 back on.

I've left your NSIS fork in place. I reference your commit by hash now in the versions files.

comment:10 Changed 4 years ago by mttp

Does the "Using debug symbols" of https://trac.torproject.org/projects/tor/wiki/doc/TorBrowser/Hacking still apply with these changes?

comment:11 Changed 4 years ago by mikeperry

Resolution: fixed
Status: newclosed

This is merged for 4.0-alpha. We may have to update the debugging instructions for the 4.0-alpha series to specify the new location of the Debug symbols for that series. We should update that when we make the first 4.0-alpha release.

Note: See TracTickets for help on using tickets.