mirror of
				https://github.com/haveno-dex/haveno.git
				synced 2025-10-31 03:19:09 -04:00 
			
		
		
		
	Update Qubes/Whonix install for individual files (#1739)
This commit is contained in:
		
							parent
							
								
									fe3283f3b0
								
							
						
					
					
						commit
						050e6b907a
					
				
					 4 changed files with 23 additions and 32 deletions
				
			
		|  | @ -147,13 +147,13 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno | |||
| 
 | ||||
| ##### In `haveno-template` TemplateVM: | ||||
| ```shell | ||||
| % sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_ARCHIVE_URL>" "<PACKAGE_PGP_FINGERPRINT>" | ||||
| % sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_URL>" "<PACKAGE_PGP_FINGERPRINT>" | ||||
| ``` | ||||
| 
 | ||||
| <p style="text-align: center;">Example:</p> | ||||
| 
 | ||||
| ```shell | ||||
| % 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" | ||||
| % 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" | ||||
| ``` | ||||
| 
 | ||||
| #### *TemplateVM Using Precompiled Package From `git` Repository (CLI)* | ||||
|  | @ -195,10 +195,9 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno | |||
| 
 | ||||
| ```shell | ||||
| # export https_proxy=http://127.0.0.1:8082 | ||||
| # curl -sSLo /tmp/hashes.txt https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt | ||||
| # curl -sSLo /tmp/hashes.txt.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt.sig | ||||
| # curl -sSLo /tmp/haveno.zip https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip | ||||
| # curl -sSLo /tmp/haveno.zip.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip.sig | ||||
| # 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 | ||||
| # 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 | ||||
| # 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 | ||||
| ``` | ||||
| 
 | ||||
| <p style="text-align: center;">Note:</p> | ||||
|  | @ -207,28 +206,22 @@ $ printf 'haveno-Haveno.desktop' | qvm-appmenus --set-whitelist – haveno | |||
| <p style="text-align: center;">For Whonix On Anything Other Than Qubes OS:</p> | ||||
| 
 | ||||
| ```shell | ||||
| # curl -sSLo /tmp/hashes.txt https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt | ||||
| # curl -sSLo /tmp/hashes.txt.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/1.0.18-hashes.txt.sig | ||||
| # curl -sSLo /tmp/haveno.zip https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip | ||||
| # curl -sSLo /tmp/haveno.zip.sig https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno_amd64_deb-latest.zip.sig | ||||
| # 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 | ||||
| # 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 | ||||
| # 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 | ||||
| ``` | ||||
| 
 | ||||
| <p style="text-align: center;">Note:</p> | ||||
| <p style="text-align: center;"><em>Above are dummy URLS which MUST be replaced with actual working URLs</em></p> | ||||
| 
 | ||||
| ###### Verify Release Files | ||||
| ###### Verify & Install Package File | ||||
| ```shell | ||||
| # 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 | ||||
| ``` | ||||
| 
 | ||||
| ###### Verify Hash, Unpack & Install Package | ||||
| ```shell | ||||
| # 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 | ||||
| # 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 | ||||
| ``` | ||||
| 
 | ||||
| ###### Verify Jar | ||||
| ```shell | ||||
| # 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 | ||||
| # 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 | ||||
| ``` | ||||
| 
 | ||||
| #### *TemplateVM Building From Source via `git` Repository (Scripted)* | ||||
|  |  | |||
|  | @ -25,17 +25,17 @@ $ bash 0.0-dom0.sh && bash 0.1-dom0.sh && bash 0.2-dom0.sh | |||
| 
 | ||||
| 
 | ||||
| ## **Build TemplateVM** | ||||
| ### *Via Binary Archive* | ||||
| ### *Via Package* | ||||
| #### **In `haveno-template` `TemplateVM`:** | ||||
| 
 | ||||
| ```shell | ||||
| % sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_ARCHIVE_URL>" "<PACKAGE_PGP_FINGERPRINT>" | ||||
| % sudo bash QubesIncoming/dispXXXX/1.0-haveno-templatevm.sh "<PACKAGE_URL>" "<PACKAGE_PGP_FINGERPRINT>" | ||||
| ``` | ||||
| 
 | ||||
| <p style="text-align: center;">Example:</p> | ||||
| 
 | ||||
| ```shell | ||||
| % sudo bash 1.0-haveno-templatevm.sh "https://github.com/havenoexample/haveno-example/releases/download/v1.0.18/haveno-linux-deb.zip" "ABAF11C65A2970B130ABE3C479BE3E4300411886" | ||||
| % 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" | ||||
| ``` | ||||
| 
 | ||||
| ### *Via Source* | ||||
|  |  | |||
|  | @ -3,8 +3,8 @@ | |||
| 
 | ||||
| 
 | ||||
| function remote { | ||||
| 	if [[ -z $PRECOMPILED_URL || -z $FINGERPRINT ]]; then | ||||
| 	    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" | ||||
| 	if [[ -z $PACKAGE_URL || -z $FINGERPRINT ]]; then | ||||
| 	    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" | ||||
| 	    exit 1 | ||||
| 	fi | ||||
| 	## Update & Upgrade | ||||
|  | @ -32,12 +32,11 @@ function remote { | |||
| 
 | ||||
| 
 | ||||
| 	## Define URL & PGP Fingerprint etc. vars: | ||||
| 	user_url=$PRECOMPILED_URL | ||||
| 	user_url=$PACKAGE_URL | ||||
| 	base_url=$(printf ${user_url} | awk -F'/' -v OFS='/' '{$NF=""}1') | ||||
| 	expected_fingerprint=$FINGERPRINT | ||||
| 	binary_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url") | ||||
| 	package_filename="haveno.deb" | ||||
| 	signature_filename="${binary_filename}.sig" | ||||
| 	package_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url") | ||||
| 	signature_filename="${package_filename}.sig" | ||||
| 	key_filename="$(printf "$expected_fingerprint" | tr -d ' ' | sed -E 's/.*(................)/\1/' )".asc | ||||
| 	wget_flags="--tries=10 --timeout=10 --waitretry=5 --retry-connrefused --show-progress" | ||||
| 
 | ||||
|  | @ -46,7 +45,6 @@ function remote { | |||
| 	printf "\nUser URL=$user_url\n" | ||||
| 	printf "\nBase URL=$base_url\n" | ||||
| 	printf "\nFingerprint=$expected_fingerprint\n" | ||||
| 	printf "\nBinary Name=$binary_filename\n" | ||||
| 	printf "\nPackage Name=$package_filename\n" | ||||
| 	printf "\nSig Filename=$signature_filename\n" | ||||
| 	printf "\nKey Filename=$key_filename\n" | ||||
|  | @ -94,7 +92,7 @@ function remote { | |||
| 	## Verify the downloaded binary with the signature: | ||||
| 	echo_blue "Verifying the signature of the downloaded file ..." | ||||
| 	if gpg --digest-algo SHA256 --verify "${signature_filename}" >/dev/null 2>&1; then | ||||
| 	    7z x "${binary_filename}" && mv haveno*.deb "${package_filename}"; | ||||
| 	    mkdir -p /usr/share/desktop-directories; | ||||
| 	    else echo_red "Verification failed!" && sleep 5 | ||||
| 	    exit 1; | ||||
| 	fi | ||||
|  | @ -172,7 +170,7 @@ if ! [[ $# -eq 2 || $# -eq 3 ]] ; then | |||
| fi | ||||
| 
 | ||||
| if [[ $# -eq 2 ]] ; then | ||||
|     PRECOMPILED_URL=$1 | ||||
| 		PACKAGE_URL=$1 | ||||
|     FINGERPRINT=$2 | ||||
|     remote | ||||
| fi | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #!/bin/zsh | ||||
| ## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh  | ||||
| ## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh | ||||
| 
 | ||||
| ## Function to print messages in blue: | ||||
| echo_blue() { | ||||
|  | @ -42,7 +42,7 @@ whonix_firewall | |||
| ### Create Desktop Launcher: | ||||
| echo_blue "Creating desktop launcher ..." | ||||
| mkdir -p /home/$(ls /home)/\.local/share/applications | ||||
| 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 | ||||
| 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 | ||||
| chown -R $(ls /home):$(ls /home) /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 PromptPunksFauxCough
						PromptPunksFauxCough