Skip to content

Commit 050e6b9

Browse files
Update Qubes/Whonix install for individual files (haveno-dex#1739)
1 parent fe3283f commit 050e6b9

File tree

4 files changed

+23
-32
lines changed

4 files changed

+23
-32
lines changed

scripts/install_whonix_qubes/INSTALL.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno
147147

148148
##### In `haveno-template` TemplateVM:
149149
```shell
150-
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_ARCHIVE_URL>" "<PACKAGE_PGP_FINGERPRINT>"
150+
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_URL>" "<PACKAGE_PGP_FINGERPRINT>"
151151
```
152152

153153
<p style="text-align: center;">Example:</p>
154154

155155
```shell
156-
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno-linux-deb.zip" "ABAF11C65A2970B130ABE3C479BE3E4300411886"
156+
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb" "ABAF11C65A2970B130ABE3C479BE3E4300411886"
157157
```
158158

159159
#### *TemplateVM Using Precompiled Package From `git` Repository (CLI)*
@@ -195,10 +195,9 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno
195195

196196
```shell
197197
# export https_proxy=http://127.0.0.1:8082
198-
# curl -sSLo /tmp/hashes.txt https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt
199-
# curl -sSLo /tmp/hashes.txt.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt.sig
200-
# curl -sSLo /tmp/haveno.zip https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip
201-
# curl -sSLo /tmp/haveno.zip.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip.sig
198+
# curl -sSLo /tmp/haveno.deb https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb
199+
# curl -sSLo /tmp/haveno.deb.sig https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb.sig
200+
# curl -sSLo /tmp/haveno-jar.SHA-256 https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-SNAPSHOT-all.jar.SHA-256
202201
```
203202

204203
<p style="text-align: center;">Note:</p>
@@ -207,28 +206,22 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno
207206
<p style="text-align: center;">For Whonix On Anything Other Than Qubes OS:</p>
208207

209208
```shell
210-
# curl -sSLo /tmp/hashes.txt https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt
211-
# curl -sSLo /tmp/hashes.txt.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt.sig
212-
# curl -sSLo /tmp/haveno.zip https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip
213-
# curl -sSLo /tmp/haveno.zip.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip.sig
209+
# curl -sSLo /tmp/haveno.deb https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb
210+
# curl -sSLo /tmp/haveno.deb.sig https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb.sig
211+
# curl -sSLo /tmp/haveno-jar.SHA-256 https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-SNAPSHOT-all.jar.SHA-256
214212
```
215213

216214
<p style="text-align: center;">Note:</p>
217215
<p style="text-align: center;"><em>Above are dummy URLS which MUST be replaced with actual working URLs</em></p>
218216

219-
###### Verify Release Files
217+
###### Verify & Install Package File
220218
```shell
221-
# if gpg --digest-algo SHA256 --verify /tmp/hashes.txt.sig >/dev/null 2>&1; then printf $'SHASUM file has a VALID signature!\n'; else printf $'SHASUMS failed signature check\n' && sleep 5 && exit 1; fi
222-
```
223-
224-
###### Verify Hash, Unpack & Install Package
225-
```shell
226-
# if [[ $(cat /tmp/hashes.txt) =~ $(sha512sum /tmp/haveno*.zip | awk '{ print $1 }') ]] ; then printf $'SHA Hash IS valid!\n' && mkdir -p /usr/share/desktop-directories && cd /tmp && unzip /tmp/haveno*.zip && apt install -y /tmp/haveno*.deb; else printf $'WARNING: Bad Hash!\n' && exit; fi
219+
# if gpg --digest-algo SHA256 --verify /tmp/haveno.deb.sig >/dev/null 2>&1; then printf $'PACKAGE file has a VALID signature!\n' && mkdir -p /usr/share/desktop-directories && apt install -y /tmp/haveno*.deb; else printf $'PACKAGE failed signature check\n' && sleep 5 && exit 1; fi
227220
```
228221

229222
###### Verify Jar
230223
```shell
231-
# if [[ $(cat /tmp/desktop*.SHA-256) =~ $(sha256sum /opt/haveno/lib/app/desktop*.jar | awk '{ print $1 }') ]] ; then printf $'SHA Hash IS valid!\n' && printf 'Happy trading!\n'; else printf $'WARNING: Bad Hash!\n' && exit; fi
224+
# if [[ $(cat /tmp/haveno-jar.SHA-256) =~ $(sha256sum /opt/haveno/lib/app/desktop*.jar | awk '{ print $1 }') ]] ; then printf $'SHA Hash IS valid!\n' && printf 'Happy trading!\n'; else printf $'WARNING: Bad Hash!\n' && exit; fi
232225
```
233226

234227
#### *TemplateVM Building From Source via `git` Repository (Scripted)*

scripts/install_whonix_qubes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ $ bash 0.0-dom0.sh && bash 0.1-dom0.sh && bash 0.2-dom0.sh
2525

2626

2727
## **Build TemplateVM**
28-
### *Via Binary Archive*
28+
### *Via Package*
2929
#### **In `haveno-template` `TemplateVM`:**
3030

3131
```shell
32-
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_ARCHIVE_URL>" "<PACKAGE_PGP_FINGERPRINT>"
32+
% sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_URL>" "<PACKAGE_PGP_FINGERPRINT>"
3333
```
3434

3535
<p style="text-align: center;">Example:</p>
3636

3737
```shell
38-
% sudo bash 1.0-haveno-templatevm.sh "https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno-linux-deb.zip" "ABAF11C65A2970B130ABE3C479BE3E4300411886"
38+
% sudo bash 1.0-haveno-templatevm.sh "https://github.com/havenoexample/haveno-example/releases/download/1.1.1/haveno-v1.1.1-linux-x86_64-installer.deb" "ABAF11C65A2970B130ABE3C479BE3E4300411886"
3939
```
4040

4141
### *Via Source*

scripts/install_whonix_qubes/scripts/1-TemplateVM/1.0-haveno-templatevm.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
function remote {
6-
if [[ -z $PRECOMPILED_URL || -z $FINGERPRINT ]]; then
7-
printf "\nNo arguments provided!\n\nThis script requires two arguments to be provided:\nBinary URL & PGP Fingerprint\n\nPlease review documentation and try again.\n\nExiting now ...\n"
6+
if [[ -z $PACKAGE_URL || -z $FINGERPRINT ]]; then
7+
printf "\nNo arguments provided!\n\nThis script requires two arguments to be provided:\nPackage URL & PGP Fingerprint\n\nPlease review documentation and try again.\n\nExiting now ...\n"
88
exit 1
99
fi
1010
## Update & Upgrade
@@ -32,12 +32,11 @@ function remote {
3232

3333

3434
## Define URL & PGP Fingerprint etc. vars:
35-
user_url=$PRECOMPILED_URL
35+
user_url=$PACKAGE_URL
3636
base_url=$(printf ${user_url} | awk -F'/' -v OFS='/' '{$NF=""}1')
3737
expected_fingerprint=$FINGERPRINT
38-
binary_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url")
39-
package_filename="haveno.deb"
40-
signature_filename="${binary_filename}.sig"
38+
package_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url")
39+
signature_filename="${package_filename}.sig"
4140
key_filename="$(printf "$expected_fingerprint" | tr -d ' ' | sed -E 's/.*(................)/\1/' )".asc
4241
wget_flags="--tries=10 --timeout=10 --waitretry=5 --retry-connrefused --show-progress"
4342

@@ -46,7 +45,6 @@ function remote {
4645
printf "\nUser URL=$user_url\n"
4746
printf "\nBase URL=$base_url\n"
4847
printf "\nFingerprint=$expected_fingerprint\n"
49-
printf "\nBinary Name=$binary_filename\n"
5048
printf "\nPackage Name=$package_filename\n"
5149
printf "\nSig Filename=$signature_filename\n"
5250
printf "\nKey Filename=$key_filename\n"
@@ -94,7 +92,7 @@ function remote {
9492
## Verify the downloaded binary with the signature:
9593
echo_blue "Verifying the signature of the downloaded file ..."
9694
if gpg --digest-algo SHA256 --verify "${signature_filename}" >/dev/null 2>&1; then
97-
7z x "${binary_filename}" && mv haveno*.deb "${package_filename}";
95+
mkdir -p /usr/share/desktop-directories;
9896
else echo_red "Verification failed!" && sleep 5
9997
exit 1;
10098
fi
@@ -172,7 +170,7 @@ if ! [[ $# -eq 2 || $# -eq 3 ]] ; then
172170
fi
173171

174172
if [[ $# -eq 2 ]] ; then
175-
PRECOMPILED_URL=$1
173+
PACKAGE_URL=$1
176174
FINGERPRINT=$2
177175
remote
178176
fi

scripts/install_whonix_qubes/scripts/3-AppVM/3.0-haveno-appvm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/zsh
2-
## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh
2+
## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh
33

44
## Function to print messages in blue:
55
echo_blue() {
@@ -42,7 +42,7 @@ whonix_firewall
4242
### Create Desktop Launcher:
4343
echo_blue "Creating desktop launcher ..."
4444
mkdir -p /home/$(ls /home)/\.local/share/applications
45-
sed 's|/opt/haveno/bin/Haveno|/opt/haveno/bin/Haveno --torControlPort=9051 --torControlUseSafeCookieAuth --torControlCookieFile=/var/run/tor/control.authcookie --socks5ProxyXmrAddress=127.0.0.1:9050 --useTorForXmr=on|g' /opt/haveno/lib/haveno-Haveno.desktop > /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop
45+
sed 's|/opt/haveno/bin/Haveno|/opt/haveno/bin/Haveno --torControlPort=9051 --socks5ProxyXmrAddress=127.0.0.1:9050 --useTorForXmr=on|g' /opt/haveno/lib/haveno-Haveno.desktop > /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop
4646
chown -R $(ls /home):$(ls /home) /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop
4747

4848

0 commit comments

Comments
 (0)