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

Script to upgrade Tor binaries #8547

Merged
merged 11 commits into from Aug 25, 2022

Conversation

kiminuo
Copy link
Collaborator

@kiminuo kiminuo commented Jun 27, 2022

Follow-up to #8475 (comment).

See comments in the script itself. Tested on Windows only so far.

Testing

  • One can switch version to: $version = "11.5a12" but it has the same Tor version as $version = "11.0.4" unforunately.
  • .\UpgradeTorBinaries.ps1
  • .\UpgradeTorBinaries.ps1 -debug (outputs more information)
  • .\UpgradeTorBinaries.ps1 -skipDownloading

@kiminuo kiminuo force-pushed the feature/2022-06-27-TorUpgradeScript branch from d03d7fd to a0f6fbb Compare June 27, 2022 09:02
kiminuo added a commit to kiminuo/WalletWasabi that referenced this pull request Jul 3, 2022
@kiminuo kiminuo mentioned this pull request Jul 3, 2022
@kiminuo kiminuo force-pushed the feature/2022-06-27-TorUpgradeScript branch from da6f320 to 811bd18 Compare July 3, 2022 11:19
@kiminuo kiminuo force-pushed the feature/2022-06-27-TorUpgradeScript branch from 7cab8d8 to 93c4175 Compare August 15, 2022 08:16
@kiminuo kiminuo marked this pull request as ready for review August 15, 2022 08:29
@kiminuo kiminuo requested a review from molnard August 15, 2022 08:30
@kiminuo
Copy link
Collaborator Author

kiminuo commented Aug 15, 2022

There is a new Tor version torproject/tor@bbc29f4#diff-91c5b46dc84a94604a4e4d0caed9bf85590a2eddbb12d2e8dc80badf324a9dfbR1 but it is not released in 12.0.a1 (https://dist.torproject.org/torbrowser/). I was checking using this script.

@kiminuo kiminuo changed the title Tools for upgrading Tor binaries Script to upgrade Tor binaries Aug 15, 2022
Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit hesitant if I will be able to maintain this script. Manual instructions are usually easier to fix. When we switch to a script the manual procedure will be lost in the long term and when the script fails, nobody will remember how to do it manually because we will use the script.
What do you think?

@kiminuo
Copy link
Collaborator Author

kiminuo commented Aug 22, 2022

So the main motivation to write this script was that it actually takes some time to upgrade to the new version of Tor for us. It is easy to do a mistake along the way, because it's a set of boring tasks that one needs to repeat with every Tor upgrade. In this regard, I think the script is useful.

Regarding maintenance of the script, PowerShell can be actually run step by step (in VS Code) so one can debug it the script itself quite easily. I'm not sure if Bash can be debugged similarly, likely it can. I went with PowerShell, because the commands are much more self-describing and PowerShell itself is multiplatform.

Then there is the question of updating the script itself. There has not been a change how we upgrade Tor over the last two years. So there is a good chance that we won't need to modify it soon. And even if it turns out that we need to modify it, the script does not do any hard tasks. It extracts archives using 7z, it copies files recursively from one place to another and that's about it. So modifying the script does not seem hard even with little knowledge of PowerShell.

Finally, if we decide not to merge the script, I don't see a good reason not to use it myself to save my time. So there is not much that would change for me personally. It might save some time to others but then even if the PR is closed, the script is available so we can have and not have it. :)

@molnard
Copy link
Collaborator

molnard commented Aug 23, 2022

@yahiheb can you test this?

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yahiheb can you test this?

Running the script (to get Tor binaries from TorBrowser 11.5.1) results in the following files being updated:

WalletWasabi/Microservices/Binaries/lin64/Tor/libcrypto.so.1.1
WalletWasabi/Microservices/Binaries/lin64/Tor/libssl.so.1.1
WalletWasabi/Microservices/Binaries/lin64/Tor/tor
WalletWasabi/Microservices/Binaries/osx64/Tor/libevent-2.1.7.dylib
WalletWasabi/Microservices/Binaries/osx64/Tor/tor.real
WalletWasabi/Microservices/Binaries/win64/Tor/libcrypto-1_1-x64.dll
WalletWasabi/Microservices/Binaries/win64/Tor/libssl-1_1-x64.dll
WalletWasabi/Microservices/Binaries/win64/Tor/tor.exe

Wasabi runs perfectly with that Tor.

Note that you should run the script using PowerShell 7 and you should have the latest version of 7zip.

@kiminuo
Copy link
Collaborator Author

kiminuo commented Aug 24, 2022

Note that you should run the script using PowerShell 7 and you should have the latest version of 7zip.

Improved the doc a bit. Thanks.

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating Tor with the current manual workflow results in the same files being changed using this script.
I compared the hashes of all the files changed and they match.

tACK

@yahiheb
Copy link
Collaborator

yahiheb commented Aug 24, 2022

Note that Upgrade Geoip files can be added to this script in a follow up PR.

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@molnard molnard merged commit 2d5f690 into zkSNACKs:master Aug 25, 2022
@kiminuo kiminuo deleted the feature/2022-06-27-TorUpgradeScript branch August 27, 2022 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants