Opened 5 years ago

Closed 4 years ago

#14835 closed enhancement (fixed)

Script to upload Tor Browser to Github

Reported by: ilv Owned by: ilv
Priority: High Milestone:
Component: Applications/GetTor Version:
Severity: Keywords: gettor, china, censorship, tor-browser
Cc: sukhbir, mrphs Actual Points:
Parent ID: #14114 Points:
Reviewer: Sponsor:

Description

I have made a preliminary version of a script to upload Tor Browser to GitHub. This should be integrated with the work done in #14744, as it should be run after fetching the latest Tor Browser. After the Tor Browser files have been fetched, this script copy the files to a new directory called VERSION, where VERSION is the version of the latest Tor Browser. Then it commits and push the changes to GitHub, all of this done via system calls to git, and with the assumption that a GitHub repository has been previously created and synchronized in the machine that the script is executed. After that, the GitHub API is used to get the links of the files recently pushed and create a links file with that info.

You can check a sample links file here and the script bundles2github here. Please note that the uploaded files are plain text, so if you open the links you will only see raw text. A sample link for a binary file can be found here.

In order to make the git commits and push without problems or user interaction, one should previously create a SSH key and link that key to GitHub. Similarly, to interact with the GitHub API without using basic credentials (user/pass), one should previously create a token in GitHub. For the tests I did a personal access token was enough.

This was done for the purposes of #14114. Reviews welcome!

Child Tickets

Change History (4)

comment:1 Changed 5 years ago by ilv

I accidentally committed all the changes to master. Now it's fixed, so the new URLs for the links are:

Sample links file: https://github.com/ilv/gettor/blob/develop/providers/github.links
bundles2github script: https://github.com/ilv/gettor/blob/develop/upload/bundles2github.py
Sample link for binary file: https://github.com/ilv/gettor/raw/develop/upload/tor-browser-linux32-4.0.2_en-US.tar.xz

comment:2 Changed 4 years ago by ilv

I've tested this on my personal setup of gettor and I made a tiny list of the steps to deploy it. We need to install libsaas though, so I'll open a ticket for it. After that we should be ready.

comment:3 Changed 4 years ago by ilv

Status: newneeds_review

I already installed libsaas on getulum (locally). However, I did some minor changes in the code (removed system calls and used sh.git instead), so reviews are welcome.

The updated code can be found here:

https://gitweb.torproject.org/user/ilv/gettor.git/tree/upload/bundles2github.py?h=develop

comment:4 Changed 4 years ago by ilv

Resolution: fixed
Status: needs_reviewclosed

It's been a long time since this, but finally I got it reviewed by Nima and Sukhbir. I wanted to change the links message first, so now both things are done. Some of the latest improvements here and here.

Note: See TracTickets for help on using tickets.