From 391af1c75a694dec0f197931298deef56f091b9b Mon Sep 17 00:00:00 2001 From: onryo Date: Sun, 7 Jan 2024 00:55:16 +0100 Subject: [PATCH 1/9] change version to 2.0.0 --- contrib/debian/changelog | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/debian/changelog b/contrib/debian/changelog index cd59351..6f55c2f 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,5 +1,5 @@ -silentdragonlite (1.5.4) stable; urgency=medium +silentdragonlite (2.0.0) stable; urgency=medium - * 1.5.4.1 release. + * 2.0.0.1 release. -- onryo Sat, 06 Jan 2024 10:20:30 +0200 diff --git a/src/version.h b/src/version.h index 0f14577..09253a4 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ // Copyright 2019-2024 The Hush developers // Released under the GPLv3 -#define APP_VERSION "1.5.4" +#define APP_VERSION "2.0.0" From 0f8f028d7dbdb6cc38c1c9ae1143267a4004ff99 Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 12 Jan 2024 18:17:32 -0500 Subject: [PATCH 2/9] Fix indentation, no functional changes --- lib/src/lib.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/src/lib.rs b/lib/src/lib.rs index eaa03ba..13e4d21 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -43,16 +43,13 @@ pub extern fn blake3_PW(pw: *const c_char) -> *mut c_char{ }; let data = passwd.as_bytes(); -// Hash an input all at once. -let hash1 = blake3::hash(data).to_hex(); -println!("\nBlake3 Hash: {}", hash1); - -//let sttring = CString::new(hash1).unwrap(); -let e_str = CString::new(format!("{}", hash1)).unwrap(); -return e_str.into_raw(); - - + // Hash an input all at once. + let hash1 = blake3::hash(data).to_hex(); + println!("\nBlake3 Hash: {}", hash1); + //let sttring = CString::new(hash1).unwrap(); + let e_str = CString::new(format!("{}", hash1)).unwrap(); + return e_str.into_raw(); } /// Create a new wallet and return the seed for the newly created wallet. From df67f779f71758217db05446784c4ce0fb7a9d77 Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 12 Jan 2024 19:36:13 -0500 Subject: [PATCH 3/9] Do not log blake3 hash to stdout, fixes #136 --- lib/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 13e4d21..7db5dd8 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -45,7 +45,9 @@ pub extern fn blake3_PW(pw: *const c_char) -> *mut c_char{ let data = passwd.as_bytes(); // Hash an input all at once. let hash1 = blake3::hash(data).to_hex(); - println!("\nBlake3 Hash: {}", hash1); + // This is sensitive metadata, do not log it to stdout + //println!("\nBlake3 Hash: {}", hash1); + println!("\nBlake3 Hash calculated"); //let sttring = CString::new(hash1).unwrap(); let e_str = CString::new(format!("{}", hash1)).unwrap(); From fd5eec230ef36d3bf889dfcac5129dedc2f7924a Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 14 Jan 2024 09:19:39 -0500 Subject: [PATCH 4/9] Allow custom number of cores to compile via build.sh #137 --- README.md | 3 +++ build.sh | 15 +++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 09df59e..f7deafc 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,10 @@ Compiling can take some time, so be patient and wait for it to finish. It will t git clone https://git.hush.is/hush/SilentDragonLite cd SilentDragonLite ./build.sh linguist +# This defaults to using 2 cores to compile ./build.sh +# To use a custom number of cores to compile, such as 8 : +# ./build.sh -j8 ./SilentDragonLite ``` diff --git a/build.sh b/build.sh index 4624f74..af3dc3b 100755 --- a/build.sh +++ b/build.sh @@ -4,16 +4,6 @@ UNAME=$(uname) -if [ "$UNAME" == "Linux" ] ; then - JOBS=2 -elif [ "$UNAME" == "FreeBSD" ] ; then - JOBS=$(nproc) -elif [ "$UNAME" == "Darwin" ] ; then - JOBS=$(sysctl -n hw.ncpu) -else - JOBS=1 -fi - # check if rustc and cargo are installed, otherwise exit with error if ! command -v rustc &> /dev/null then @@ -40,7 +30,7 @@ then fi VERSION=$(cat src/version.h |cut -d\" -f2) -echo "Compiling SilentDragonLite $VERSION with $JOBS threads..." +echo "Compiling SilentDragonLite $VERSION on $UNAME with args=$@" CONF=silentdragon-lite.pro set -e @@ -48,7 +38,8 @@ qbuild () { qmake $CONF CONFIG+=debug #lupdate $CONF #lrelease $CONF - make -j$JOBS + # default to 2 jobs or use the -j value given as argument to this script + make -j2 "$@" } if [ "$1" == "clean" ]; then From f15a28f3ec7169ec27c044f54cb0f828cc4d7167 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 14 Jan 2024 09:21:57 -0500 Subject: [PATCH 5/9] Fix bug in reporting version being compiled in build.sh --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index af3dc3b..6dc0e9d 100755 --- a/build.sh +++ b/build.sh @@ -29,7 +29,7 @@ then exit 1 fi -VERSION=$(cat src/version.h |cut -d\" -f2) +VERSION=$(grep APP_VERSION src/version.h |cut -d\" -f2) echo "Compiling SilentDragonLite $VERSION on $UNAME with args=$@" CONF=silentdragon-lite.pro From 45e50912086e46c6ccfa5355988b5ebd6fe97fcd Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 14 Jan 2024 09:22:54 -0500 Subject: [PATCH 6/9] Bump version --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 09253a4..928b60b 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ // Copyright 2019-2024 The Hush developers // Released under the GPLv3 -#define APP_VERSION "2.0.0" +#define APP_VERSION "2.0.1" From 6bbd2ac358bfdaefd7bc532a10f0216fd64802d6 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 14 Jan 2024 09:33:06 -0500 Subject: [PATCH 7/9] Fix bug in using more cores to compile in build.sh --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6dc0e9d..0a17309 100755 --- a/build.sh +++ b/build.sh @@ -49,7 +49,7 @@ elif [ "$1" == "linguist" ]; then lrelease $CONF elif [ "$1" == "cleanbuild" ]; then make clean - qbuild + qbuild "$@" else - qbuild + qbuild "$@" fi From 2fcb4f835826894405c0fd1ec3ef7f1598da89da Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 14 Jan 2024 09:42:59 -0500 Subject: [PATCH 8/9] Use 8 jobs by default for compiling libsodium on mac --- res/libsodium/buildlibsodium.sh | 4 ++-- silentdragon-lite.pro | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/res/libsodium/buildlibsodium.sh b/res/libsodium/buildlibsodium.sh index 12d4412..fe734fa 100755 --- a/res/libsodium/buildlibsodium.sh +++ b/res/libsodium/buildlibsodium.sh @@ -47,9 +47,9 @@ make clean echo "Compiling libsodium $VERSION" if [[ "$OSTYPE" == "darwin"* ]]; then - make CFLAGS="-mmacosx-version-min=10.11" CPPFLAGS="-mmacosx-version-min=10.11" -j4 + make CFLAGS="-mmacosx-version-min=10.11" CPPFLAGS="-mmacosx-version-min=10.11" -j8 # "$@" else - make -j8 + make -j8 # "$@" fi cd .. diff --git a/silentdragon-lite.pro b/silentdragon-lite.pro index adf640e..0faf9f2 100644 --- a/silentdragon-lite.pro +++ b/silentdragon-lite.pro @@ -183,7 +183,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin libsodium.target = $$PWD/res/libsodium.a -libsodium.commands = res/libsodium/buildlibsodium.sh +libsodium.commands = res/libsodium/buildlibsodium.sh "$@" unix: librust.target = $$PWD/lib/target/release/libsilentdragonlite.a else:win32: librust.target = $$PWD/lib/target/x86_64-pc-windows-gnu/release/silentdragonlite.lib From 1fb344a8c251ff2e780fe4484f88b829a37278a1 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 16 Jan 2024 20:45:12 -0500 Subject: [PATCH 9/9] updated build.sh for better OS compatibility --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0a17309..c648fed 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2019-2024 The Hush Developers # Released under the GPLv3