Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get stable version using torbrowser updater xml #202

Merged
merged 1 commit into from
Nov 6, 2015

Conversation

boklm
Copy link
Collaborator

@boklm boklm commented Nov 5, 2015

The RecommendedTBBVersions file contains current versions of Tor Browser
from all channels, including alpha or beta.

Instead of this, we can use xml file used by Tor Browser's updater in
the "release" channel:
https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/en-US

The RecommendedTBBVersions file contains current versions of Tor Browser
from all channels, including alpha or beta.

Instead of this, we can use xml file used by Tor Browser's updater in
the "release" channel:
https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/en-US
@micahflee
Copy link
Collaborator

Thanks @boklm! I just tested this and it seems to work great if your locale is en-US and if your architecture is x86_64. It should be easy enough to generalize this to all locales and both architectures by changing this line:

'update_check_url': 'https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/en-US',

To this:

'update_check_url': 'https://dist.torproject.org/torbrowser/update_2/release/Linux_'+self.architecture+'-gcc3/x/'+self.language,

I've noticed that different locale URLs appear to work fine:

https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/en-US
https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/es-ES
https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/fr
https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/ru

But replacing Linux_x86_64-gcc3 with Linux_i686-gcc3 returns a 404, like with this URL:

https://dist.torproject.org/torbrowser/update_2/release/Linux_i686-gcc3/x/en-US

Do you know what the 32-bit Linux release channel URLs look like? Would you be able to add one more commit to this PR that supports different locales and architectures? Thanks!

Since there are separate release channel XML files, I imagine it would be pretty simple to enable the user to choose a branch: release, alpha, or hardened. These URLs should always remain the same, yes?

@micahflee
Copy link
Collaborator

Sorry, I introduced a merge conflict. It's easy to resolve though.

@micahflee
Copy link
Collaborator

Wait -- it shouldn't matter at all about the locale or architecture. We're just pulling this URL to get the version number, not a download URL. Nevermind about all that! I'll merge this now.

@micahflee micahflee merged commit e07beac into torproject:master Nov 6, 2015
@adrelanos
Copy link

Isn't this new format / link be more likely to change (break)?

@boklm
Copy link
Collaborator Author

boklm commented Nov 6, 2015

Yes, we are using this URL to get the version only, so it shouldn't matter which locale or architecture we use, as long as we don't push a new version for a specific locale or architecture only, which is unlikely. But if it's easy to put the real architecture and locale in the URL, we can do it, just in case. For i686, the "Linux_x86_64-gcc3" should be replaced by "Linux_x86-gcc3".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants