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
Script to upgrade Tor binaries #8547
Conversation
d03d7fd
to
a0f6fbb
Compare
da6f320
to
811bd18
Compare
7cab8d8
to
93c4175
Compare
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. |
There was a problem hiding this 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?
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. :) |
@yahiheb can you test this? |
There was a problem hiding this 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.
Improved the doc a bit. Thanks. |
There was a problem hiding this 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
Note that Upgrade Geoip files can be added to this script in a follow up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK #8547 (review)
Follow-up to #8475 (comment).
See comments in the script itself. Tested on Windows only so far.
Testing
$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