Opened 8 years ago

Closed 8 years ago

#3896 closed task (fixed)

Thandy bootstrapper

Reported by: chiiph Owned by: chiiph
Priority: Medium Milestone:
Component: Archived/Thandy Version:
Severity: Keywords:
Cc: erinn, g.koppen@…, nickm Actual Points:
Parent ID: #4460 Points:
Reviewer: Sponsor:

Description

This ticket will be used to track the progress on the Thandy bootstrapper (i.e. the application that's not vidalia, nor tor, and can update both).

The code will live inside the thandy repo, unless someone else thinks that's a bad idea. Although there isn't anything to show about this yet.

Child Tickets

Attachments (1)

bootstrapper.png (183.4 KB) - added by chiiph 8 years ago.
Screenshot of the app

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by chiiph

Type: defecttask

I've written a workflow kind of doc about this application. I've also "designed" the GUI, but it's really minimalistic so there isn't much point on uploading screenshots. The odd names, like btnOk refer to the GUI, if it doesn't make much sense to you, let me know and I'll upload a screenshot with the names of each widget.

Let me know what you think about it:

Workflow for the updater:
  0. This updater may be executed from within Vidalia, so it will have
     a switch --wait <NUM> to ask the updater to wait <NUM> seconds
     before checking for running processes so Vidalia has time to close.
  0'. This updater may be executed from within Vidalia to check for
     updates and/or download them, so it will need a switch --check and
     --no-download to just run Thandy without installing anything and
     display its output without a GUI.
  1. Check the running processes, look for Vidalia, Tor and Firefox.
  2. If there's any of these running:
     2.1. Display the pgProcess page.
     2.2. For each process that's running, create a ProcessLine and
          add it to the listWidget.
     2.3. If it can try to terminate the processes, setVisible(true)
          for lblAsk and btnTerminate.
  3. If there aren't any processes running:
     3.1. Display the pgUpdate page, disable btnOk, display a message
          if the user wants to close asking if she really wants that.
     3.2. Run thandy-client update --control-log-format /bundleinfo/(*)
     (*). Depending on the bundle it'd be vidalia_bundle and/or tbb_bundle.
          There will be a config file (updater.conf) where you can specify:
          [General]
          Bundles=vidalia_bundle,tbb_bundle,whatever_package,whatever_bundle
          ThpRoot=/path/to/thp/intallation/root
          ThpDB=/path/to/thp/db
     3.3. Parse Thandy's output and put the messages in nice colors
          depending on the type of message.
     3.4. If there's an error, show a popup with the corresponding
          information.
     3.5. If everything went ok, enable btnOk, and let the user close
          the app.

Notes:
  1. Thandy will live inside a directory where the executable for the
     updater will be.
     1.1. We just need to set the env var PYTHON_PATH where the deps live.
     1.2. Is this better than py2exe? It's more platform independent.
  2. Python and all Thandy's deps will be bundled along with thandy.
     2.1. So the updater will call Thandy this way ($THANDY_LOC is the
          relative path where Thandy lives):
          $THANDY_LOC/bin/python{.exe,.app,} $THANDY_LOC/bin/ClientCLI.py <args>

comment:2 Changed 8 years ago by gk

Cc: g.koppen@… added

comment:3 Changed 8 years ago by chiiph

Status: newneeds_review

In the repo user/chiiph/thandy-bootstrap.git is the first commit for this bootstrapper.
It still lacks a couple of minor things, but it's functional.

To make it useful, you need to create a file called updater.conf with the following:

[General]
PythonPath=path/to/thandy/lib/
ThpInstallRoot=path/to/thproot/
ThpDbRoot=path/to/thpdb/
PythonBinary=path/to/python
ThandyLocation=path/to/thandy/
Bundles=/bundleinfo/thp-bundle1/,/bundleinfo/thp-bundle2/

This file should live in a directory that is passed with the --datadir switch to the app.

The idea is to distribute this app with:

...
Bundles=/bundleinfo/vidalia/,/bundleinfo/firefox/,/bundleinfo/torbutton/, etc

Along with a copy of repo snapshot, and the user will install the latest of everything.

I'll upload some screenshots for the lazy that don't want to build&run this :)

Here are some questions to Nick:

  • Do you want to be the owner of the official thandy-bootstrap repo?
  • Do you want to review its code? Or should I treat this as a Vidalia-like app when it comes to review?

Changed 8 years ago by chiiph

Attachment: bootstrapper.png added

Screenshot of the app

comment:4 in reply to:  3 ; Changed 8 years ago by nickm

Replying to chiiph:

In the repo user/chiiph/thandy-bootstrap.git is the first commit for this bootstrapper.

I'll upload some screenshots for the lazy that don't want to build&run this :)

Much appreciated; looks good. I'd suggest that the UI should show more prominently what bundle it's upgrading or installing, and it should be easy to "rebrand" the thing. (Nobody is going to know what "thandy" means; they want to know that their Tor Browser Bundle is getting upgraded.)

Here are some questions to Nick:

  • Do you want to be the owner of the official thandy-bootstrap repo?

That's probably not a good idea; I shouldn't be in critical path for any more things.

  • Do you want to review its code? Or should I treat this as a Vidalia-like app when it comes to review?

I'd be glad to review the code if and when you want, but it probably shouldn't be blocking on me.

comment:5 in reply to:  4 ; Changed 8 years ago by chiiph

Replying to nickm:

Much appreciated; looks good. I'd suggest that the UI should show more prominently what bundle it's upgrading or installing, and it should be easy to "rebrand" the thing. (Nobody is going to know what "thandy" means; they want to know that their Tor Browser Bundle is getting upgraded.)

True. Hm, we might want a couple of more logCtrl messages for that, or show the INFO ones (although they seemed like too much info, I guess). I'll re-think this and update #3901 with a new patch.

Here are some questions to Nick:

  • Do you want to be the owner of the official thandy-bootstrap repo?

That's probably not a good idea; I shouldn't be in critical path for any more things.

Ok then, unless someone else objects, I guess I should take the lead on this part.

  • Do you want to review its code? Or should I treat this as a Vidalia-like app when it comes to review?

I'd be glad to review the code if and when you want, but it probably shouldn't be blocking on me.

Great, so, given that you already have a lot on your plate, does it sound good to you if I submit it for review once I think it's "done"? It won't be much more code that it is right now. If so, we can close this ticket for now, I can reopen when the time comes.

comment:6 in reply to:  5 Changed 8 years ago by nickm

Owner: changed from nickm to chiiph
Status: needs_reviewassigned

Replying to chiiph:

Replying to nickm:

That's probably not a good idea; I shouldn't be in critical path for any more things.

Ok then, unless someone else objects, I guess I should take the lead on this part.

Go for it! :)

I'd be glad to review the code if and when you want, but it probably shouldn't be blocking on me.

Great, so, given that you already have a lot on your plate, does it sound good to you if I submit it for review once I think it's "done"? It won't be much more code that it is right now. If so, we can close this ticket for now, I can reopen when the time comes.

Sounds good to me. Except, instead of closing the ticket, let's just kick it out of "needs_review."

comment:7 Changed 8 years ago by chiiph

Parent ID: #4460

comment:8 Changed 8 years ago by chiiph

Cc: nickm added
Status: assignedneeds_review

I'm considering this "done" for the moment, so lets hear the reviews :).

It still needs more testing, especially on Windows, but I think it is in good shape.

comment:9 Changed 8 years ago by chiiph

Resolution: fixed
Status: needs_reviewclosed

As per Karsten recommendation, I'm closing this. Please reopen if you have any comments, or open a separate ticket for the specific issue.

Note: See TracTickets for help on using tickets.