2020-03-02 23:25:15 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2022-12-29 07:57:05 +02:00
|
|
|
cd "$(dirname "$0")" || exit
|
2022-09-26 14:55:45 +03:00
|
|
|
|
2023-01-07 15:14:06 +02:00
|
|
|
check_exists()
|
|
|
|
|
{
|
2020-03-02 23:25:15 +02:00
|
|
|
command -v "$1" > /dev/null
|
|
|
|
|
}
|
2017-08-26 07:56:31 +00:00
|
|
|
|
2023-01-07 15:14:06 +02:00
|
|
|
# This may be overriden by --python/-p option.
|
|
|
|
|
python="python3"
|
2022-02-09 18:18:10 +02:00
|
|
|
|
2020-07-09 19:08:25 +03:00
|
|
|
# This is needed for systems where GNU is not the default make, like FreeBSD.
|
|
|
|
|
if check_exists gmake; then
|
2022-12-29 07:57:05 +02:00
|
|
|
make="gmake"
|
2020-07-09 19:08:25 +03:00
|
|
|
else
|
2022-12-29 07:57:05 +02:00
|
|
|
make="make"
|
2020-07-09 19:08:25 +03:00
|
|
|
fi
|
|
|
|
|
|
2023-01-07 15:14:06 +02:00
|
|
|
num_cores()
|
|
|
|
|
{
|
|
|
|
|
${python} -c 'import multiprocessing as mp; print(mp.cpu_count())'
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-18 18:34:17 -07:00
|
|
|
sha256_verify ()
|
|
|
|
|
{
|
2018-07-22 11:45:07 +03:00
|
|
|
if [[ "$(uname)" == "Darwin" ]]; then
|
2017-11-18 18:34:17 -07:00
|
|
|
shasum -a 256 -c <<<"$1 $2"
|
2018-07-22 11:45:07 +03:00
|
|
|
return "$?"
|
2020-07-09 19:08:25 +03:00
|
|
|
elif [[ "$(uname)" == "FreeBSD" ]]; then
|
|
|
|
|
sha256 -c "$1" "$2"
|
|
|
|
|
return "$?"
|
2017-11-18 18:34:17 -07:00
|
|
|
else
|
|
|
|
|
sha256sum -c <<<"$1 $2"
|
2018-07-22 11:45:07 +03:00
|
|
|
return "$?"
|
2017-11-18 18:34:17 -07:00
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-02 23:25:15 +02:00
|
|
|
# http_get url filename
|
|
|
|
|
http_get ()
|
|
|
|
|
{
|
|
|
|
|
if check_exists curl; then
|
|
|
|
|
curl --retry 5 -L "$1" -o "$2"
|
|
|
|
|
elif check_exists wget; then
|
|
|
|
|
wget "$1" -O "$2"
|
|
|
|
|
else
|
|
|
|
|
echo "Neither curl nor wget present; please install one of them using your OS package manager."
|
|
|
|
|
kill $$
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-23 11:31:27 +03:00
|
|
|
gpg_verify ()
|
|
|
|
|
{
|
|
|
|
|
if [[ $no_gpg_validation != 1 ]]; then
|
|
|
|
|
if ! check_exists gpg; then
|
|
|
|
|
echo "GPG not installed, cannot verify release signatures; install gpg or use --no-gpg-validation."
|
|
|
|
|
kill $$
|
|
|
|
|
fi
|
|
|
|
|
gpg --import "$1"
|
|
|
|
|
gpg --verify "$2" || kill $$
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-04 21:28:09 +03:00
|
|
|
deps_install ()
|
|
|
|
|
{
|
2020-07-09 16:23:27 -04:00
|
|
|
debian_deps=( \
|
2019-09-05 20:23:35 +00:00
|
|
|
'curl' \
|
|
|
|
|
'build-essential' \
|
|
|
|
|
'automake' \
|
2024-05-14 17:46:22 +02:00
|
|
|
'autoconf' \
|
2019-09-05 20:23:35 +00:00
|
|
|
'pkg-config' \
|
|
|
|
|
'libtool' \
|
2020-01-14 18:55:00 +00:00
|
|
|
'python3-dev' \
|
2020-08-16 20:50:44 -04:00
|
|
|
'python3-pip' \
|
|
|
|
|
'python3-setuptools' \
|
2022-11-04 11:10:05 -04:00
|
|
|
'python3-venv' \
|
2025-10-30 03:01:18 +00:00
|
|
|
'libffi-dev' \
|
|
|
|
|
'libffi8' \
|
2020-08-16 20:50:44 -04:00
|
|
|
'libltdl-dev' )
|
|
|
|
|
|
|
|
|
|
if [ "$with_sudo" == 1 ]; then debian_deps+=("sudo"); fi
|
2020-01-14 18:55:00 +00:00
|
|
|
|
2020-07-09 16:23:27 -04:00
|
|
|
darwin_deps=( \
|
|
|
|
|
'automake' \
|
|
|
|
|
'libtool' )
|
|
|
|
|
|
2020-01-14 18:55:00 +00:00
|
|
|
if ! is_python3; then
|
|
|
|
|
echo "Python 2 is no longer supported. Please use a compatible Python 3 version."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2019-09-05 20:23:35 +00:00
|
|
|
|
2021-09-28 23:16:17 +03:00
|
|
|
if [[ ${use_os_deps_check} != '1' ]]; then
|
|
|
|
|
echo "Checking OS package manager's dependencies disabled. Trying to build."
|
|
|
|
|
return 0
|
|
|
|
|
elif [[ ${install_os} == 'debian' ]]; then
|
2020-07-09 16:23:27 -04:00
|
|
|
deb_deps_install "${debian_deps[@]}"
|
|
|
|
|
return "$?"
|
|
|
|
|
elif [[ ${install_os} == 'darwin' ]]; then
|
|
|
|
|
dar_deps_install "${darwin_deps[@]}"
|
2019-09-05 20:23:35 +00:00
|
|
|
return "$?"
|
2018-05-04 21:28:09 +03:00
|
|
|
else
|
|
|
|
|
echo "OS can not be determined. Trying to build."
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-03 12:04:18 +02:00
|
|
|
tor_deps_install ()
|
|
|
|
|
{
|
|
|
|
|
debian_deps=( \
|
|
|
|
|
'libevent-dev' \
|
|
|
|
|
'libssl-dev' \
|
|
|
|
|
'zlib1g-dev' )
|
|
|
|
|
|
2022-04-01 16:54:28 +03:00
|
|
|
darwin_deps=( \
|
|
|
|
|
'libevent' \
|
|
|
|
|
'zlib' )
|
2021-11-03 12:04:18 +02:00
|
|
|
|
|
|
|
|
if [[ ${use_os_deps_check} != '1' ]]; then
|
|
|
|
|
return 0
|
|
|
|
|
elif [[ ${install_os} == 'debian' ]]; then
|
|
|
|
|
deb_deps_install "${debian_deps[@]}"
|
|
|
|
|
return "$?"
|
|
|
|
|
elif [[ ${install_os} == 'darwin' ]]; then
|
2022-04-01 16:54:28 +03:00
|
|
|
dar_deps_install "${darwin_deps[@]}"
|
|
|
|
|
return "$?"
|
2021-11-03 12:04:18 +02:00
|
|
|
else
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
deb_deps_check ()
|
|
|
|
|
{
|
2025-07-19 08:13:32 +03:00
|
|
|
LANG=C apt-cache policy "${deb_deps[@]}" | grep "Installed.*none"
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deb_deps_install ()
|
|
|
|
|
{
|
2022-12-29 07:57:05 +02:00
|
|
|
deb_deps=( "${@}" )
|
2017-08-26 18:10:14 +03:00
|
|
|
if deb_deps_check; then
|
2017-08-26 07:56:31 +00:00
|
|
|
clear
|
2020-08-16 20:50:44 -04:00
|
|
|
sudo_command=''
|
|
|
|
|
if [ "$with_sudo" == 1 ]; then
|
|
|
|
|
echo "
|
|
|
|
|
sudo password required to run :
|
|
|
|
|
|
2022-12-29 07:57:05 +02:00
|
|
|
\`apt-get install ${deb_deps[*]}\`
|
2020-08-16 20:50:44 -04:00
|
|
|
"
|
|
|
|
|
sudo_command="sudo"
|
|
|
|
|
fi
|
2017-08-26 07:56:31 +00:00
|
|
|
|
2022-12-29 07:57:05 +02:00
|
|
|
if ! $sudo_command apt-get install -y --no-install-recommends "${deb_deps[@]}"; then
|
2020-08-16 20:50:44 -04:00
|
|
|
return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-09 16:23:27 -04:00
|
|
|
dar_deps_install ()
|
|
|
|
|
{
|
2022-12-29 07:57:05 +02:00
|
|
|
dar_deps=( "${@}" )
|
|
|
|
|
if ! brew install "${dar_deps[@]}"; then
|
2020-07-09 16:23:27 -04:00
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
check_skip_build ()
|
|
|
|
|
{
|
2018-07-22 11:45:07 +03:00
|
|
|
if [[ ${reinstall} == false ]] && [[ -d "$1" ]]; then
|
2022-12-29 07:57:05 +02:00
|
|
|
read -r -n 1 -p "Directory ${1} exists. Remove and recreate? (y/N) " q
|
2022-09-28 16:40:47 +03:00
|
|
|
echo ""
|
2017-08-26 07:56:31 +00:00
|
|
|
if [[ "${q}" =~ Y|y ]]; then
|
|
|
|
|
rm -rf "./${1}"
|
2017-08-26 09:22:18 +00:00
|
|
|
mkdir -p "./${1}"
|
2017-08-26 07:56:31 +00:00
|
|
|
return 1
|
|
|
|
|
else
|
|
|
|
|
echo "skipping ${1}..."
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
return 1
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-07 14:46:12 +03:00
|
|
|
upgrade_setuptools ()
|
|
|
|
|
{
|
|
|
|
|
pip install --upgrade pip
|
|
|
|
|
pip install --upgrade setuptools
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
venv_setup ()
|
|
|
|
|
{
|
|
|
|
|
if check_skip_build 'jmvenv'; then
|
|
|
|
|
return 0
|
2018-07-22 11:45:07 +03:00
|
|
|
else
|
|
|
|
|
reinstall='true'
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
2022-11-04 11:10:05 -04:00
|
|
|
"${python}" -m venv "${jm_source}/jmvenv" || return 1
|
2022-12-29 07:57:05 +02:00
|
|
|
# shellcheck source=/dev/null
|
2017-08-27 21:17:32 +03:00
|
|
|
source "${jm_source}/jmvenv/bin/activate" || return 1
|
2023-10-07 14:46:12 +03:00
|
|
|
upgrade_setuptools
|
2017-08-26 18:58:15 +03:00
|
|
|
deactivate
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-22 18:39:37 +02:00
|
|
|
dep_get ()
|
2017-08-26 07:56:31 +00:00
|
|
|
{
|
2018-11-22 18:39:37 +02:00
|
|
|
pkg_name="$1" pkg_hash="$2" pkg_url="$3"
|
2022-07-23 11:31:27 +03:00
|
|
|
pkg_pubkeys="$4" pkg_sig="$5" pkg_hash_file="$6" pkg_hash_file_sig="$7"
|
2018-11-22 18:39:37 +02:00
|
|
|
|
2022-12-29 07:57:05 +02:00
|
|
|
pushd cache || return 1
|
2021-03-04 09:26:24 +02:00
|
|
|
if [ ! -f "${pkg_name}" ] || ! sha256_verify "${pkg_hash}" "${pkg_name}"; then
|
2020-03-02 23:25:15 +02:00
|
|
|
http_get "${pkg_url}/${pkg_name}" "${pkg_name}"
|
2017-11-03 01:58:32 +02:00
|
|
|
fi
|
2022-08-29 00:00:46 +03:00
|
|
|
if ! sha256_verify "${pkg_hash}" "${pkg_name}"; then
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2022-07-23 11:31:27 +03:00
|
|
|
if [[ -n "${pkg_hash_file}" ]]; then
|
|
|
|
|
http_get "${pkg_url}/${pkg_hash_file}" "${pkg_hash_file}"
|
|
|
|
|
if [[ -n "${pkg_hash_file_sig}" ]]; then
|
|
|
|
|
http_get "${pkg_url}/${pkg_hash_file_sig}" "${pkg_hash_file_sig}"
|
|
|
|
|
gpg_verify "../../pubkeys/third-party/${pkg_pubkeys}" "${pkg_hash_file_sig}"
|
|
|
|
|
fi
|
|
|
|
|
if ! grep -qs "${pkg_hash}" "${pkg_hash_file}"; then
|
|
|
|
|
echo "Hash mismatch, ${pkg_hash} not in ${pkg_url}/${pkg_hash_file}!"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
if [[ -n "${pkg_sig}" ]]; then
|
|
|
|
|
http_get "${pkg_url}/${pkg_sig}" "${pkg_sig}"
|
|
|
|
|
gpg_verify "../../pubkeys/third-party/${pkg_pubkeys}" "${pkg_sig}"
|
|
|
|
|
fi
|
2018-11-22 18:39:37 +02:00
|
|
|
tar -xzf "${pkg_name}" -C ../
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-08 20:03:58 +02:00
|
|
|
libffi_autoreconf_patch ()
|
2017-08-26 07:56:31 +00:00
|
|
|
{
|
2018-07-22 11:45:07 +03:00
|
|
|
# autogen.sh is not happy when run from some directories, causing it
|
2025-01-08 20:03:58 +02:00
|
|
|
# to create an ltmain.sh file in our ${jm_root} directory. weird.
|
2018-07-22 11:45:07 +03:00
|
|
|
# https://github.com/meetecho/janus-gateway/issues/290#issuecomment-125160739
|
|
|
|
|
# https://github.com/meetecho/janus-gateway/commit/ac38cfdae7185f9061569b14809af4d4052da700
|
|
|
|
|
cat <<'EOF' > autoreconf.patch
|
|
|
|
|
18a19
|
|
|
|
|
> AC_CONFIG_AUX_DIR([.])
|
2017-08-26 07:56:31 +00:00
|
|
|
EOF
|
2018-07-22 11:45:07 +03:00
|
|
|
patch configure.ac autoreconf.patch
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
libffi_build ()
|
|
|
|
|
{
|
|
|
|
|
./autogen.sh
|
|
|
|
|
./configure --disable-docs --enable-shared --prefix="${jm_root}"
|
2020-07-09 19:08:25 +03:00
|
|
|
$make uninstall
|
|
|
|
|
$make
|
|
|
|
|
if ! $make check; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
libffi_install ()
|
|
|
|
|
{
|
2025-01-08 20:03:58 +02:00
|
|
|
libffi_version='libffi-3.4.6'
|
|
|
|
|
libffi_lib_tar="v3.4.6.tar.gz"
|
|
|
|
|
libffi_lib_sha='9ac790464c1eb2f5ab5809e978a1683e9393131aede72d1b0a0703771d3c6cda'
|
2017-08-26 07:56:31 +00:00
|
|
|
libffi_url="https://github.com/libffi/libffi/archive"
|
|
|
|
|
|
2018-07-22 11:45:07 +03:00
|
|
|
if check_skip_build "${libffi_version}"; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 0
|
|
|
|
|
fi
|
2018-11-22 18:39:37 +02:00
|
|
|
if ! dep_get "${libffi_lib_tar}" "${libffi_lib_sha}" "${libffi_url}"; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
pushd "${libffi_version}" || return 1
|
2025-01-08 20:03:58 +02:00
|
|
|
if ! libffi_autoreconf_patch; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
if libffi_build; then
|
2020-07-09 19:08:25 +03:00
|
|
|
$make install
|
2017-08-26 07:56:31 +00:00
|
|
|
else
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2020-04-28 19:47:08 +01:00
|
|
|
libsecp256k1_build()
|
|
|
|
|
{
|
2020-10-08 20:08:30 +03:00
|
|
|
$make clean
|
2020-04-28 19:47:08 +01:00
|
|
|
./autogen.sh
|
|
|
|
|
./configure \
|
2020-10-08 20:08:30 +03:00
|
|
|
--enable-module-recovery \
|
|
|
|
|
--prefix "${jm_root}" \
|
|
|
|
|
--enable-experimental \
|
|
|
|
|
--enable-module-ecdh \
|
|
|
|
|
--enable-benchmark=no \
|
|
|
|
|
MAKE=$make
|
|
|
|
|
$make
|
2020-10-29 22:19:36 +02:00
|
|
|
if [[ $use_secp_check == '1' ]]; then
|
|
|
|
|
if ! $make check; then
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "Skipping libsecp256k1 tests."
|
2020-04-28 19:47:08 +01:00
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
libsecp256k1_install()
|
|
|
|
|
{
|
2024-05-08 22:22:51 +03:00
|
|
|
secp256k1_version="0.5.0"
|
2023-07-29 11:50:15 +03:00
|
|
|
secp256k1_lib_tar="v$secp256k1_version.tar.gz"
|
2024-05-08 22:22:51 +03:00
|
|
|
secp256k1_lib_sha="07934fde88c677abbc4d42c36ef7ef8d3850cd0c065e4f976f66f4f97502c95a"
|
2023-07-29 11:50:15 +03:00
|
|
|
secp256k1_lib_url='https://github.com/bitcoin-core/secp256k1/archive/refs/tags'
|
|
|
|
|
if ! dep_get "${secp256k1_lib_tar}" "${secp256k1_lib_sha}" "${secp256k1_lib_url}"; then
|
2020-04-28 19:47:08 +01:00
|
|
|
return 1
|
|
|
|
|
fi
|
2023-07-29 11:50:15 +03:00
|
|
|
pushd "secp256k1-$secp256k1_version" || return 1
|
2020-04-28 19:47:08 +01:00
|
|
|
if libsecp256k1_build; then
|
2020-10-08 20:08:30 +03:00
|
|
|
$make install
|
2020-04-28 19:47:08 +01:00
|
|
|
else
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2020-04-28 19:47:08 +01:00
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
libsodium_build ()
|
|
|
|
|
{
|
2020-07-09 19:08:25 +03:00
|
|
|
$make uninstall
|
|
|
|
|
$make distclean
|
2024-02-09 01:48:56 +02:00
|
|
|
./autogen.sh DO_NOT_UPDATE_CONFIG_SCRIPTS=1
|
2018-12-19 19:27:01 +02:00
|
|
|
./configure \
|
|
|
|
|
--enable-minimal \
|
|
|
|
|
--enable-shared \
|
|
|
|
|
--prefix="${jm_root}"
|
2020-07-09 19:08:25 +03:00
|
|
|
$make uninstall
|
|
|
|
|
$make
|
|
|
|
|
if ! $make check; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
libsodium_install ()
|
|
|
|
|
{
|
2025-04-24 17:59:18 +03:00
|
|
|
sodium_version='libsodium-1.0.20'
|
2017-08-26 07:56:31 +00:00
|
|
|
sodium_lib_tar="${sodium_version}.tar.gz"
|
2025-04-24 17:59:18 +03:00
|
|
|
sodium_lib_sha='ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19'
|
2019-11-30 23:26:54 +02:00
|
|
|
sodium_url='https://download.libsodium.org/libsodium/releases'
|
2022-07-23 11:31:27 +03:00
|
|
|
sodium_pubkeys='libsodium.asc'
|
2017-08-26 07:56:31 +00:00
|
|
|
|
2018-07-22 11:45:07 +03:00
|
|
|
if check_skip_build "${sodium_version}"; then
|
2017-08-26 07:56:31 +00:00
|
|
|
return 0
|
|
|
|
|
fi
|
2022-07-23 11:31:27 +03:00
|
|
|
if ! dep_get "${sodium_lib_tar}" "${sodium_lib_sha}" "${sodium_url}" "${sodium_pubkeys}" "${sodium_lib_tar}.sig"; then
|
2018-07-22 11:45:07 +03:00
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
pushd "${sodium_version}" || return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
if libsodium_build; then
|
2020-07-09 19:08:25 +03:00
|
|
|
$make install
|
2017-08-26 07:56:31 +00:00
|
|
|
else
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2022-07-13 18:44:00 +03:00
|
|
|
tor_root ()
|
2021-11-03 12:04:18 +02:00
|
|
|
{
|
2022-05-11 21:42:25 +03:00
|
|
|
# jm_root will be empty for --docker-install,
|
|
|
|
|
# sys.prefix defaults to /usr/local
|
|
|
|
|
if [[ -n "$jm_root" ]]; then
|
2022-07-13 18:44:00 +03:00
|
|
|
echo "$jm_root"
|
2022-05-11 21:42:25 +03:00
|
|
|
else
|
2022-07-13 18:44:00 +03:00
|
|
|
echo "/usr/local"
|
2022-05-11 21:42:25 +03:00
|
|
|
fi
|
2022-07-13 18:44:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tor_build ()
|
|
|
|
|
{
|
2021-11-03 12:04:18 +02:00
|
|
|
$make uninstall
|
|
|
|
|
$make distclean
|
|
|
|
|
./configure \
|
|
|
|
|
--disable-system-torrc \
|
|
|
|
|
--disable-seccomp \
|
|
|
|
|
--disable-libscrypt \
|
|
|
|
|
--disable-module-relay \
|
|
|
|
|
--disable-lzma \
|
|
|
|
|
--disable-zstd \
|
|
|
|
|
--disable-asciidoc \
|
|
|
|
|
--disable-manpage \
|
|
|
|
|
--disable-html-manual \
|
2022-07-13 18:44:00 +03:00
|
|
|
--prefix="$(tor_root)"
|
2021-11-03 12:04:18 +02:00
|
|
|
$make
|
|
|
|
|
if ! $make check; then
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tor_install ()
|
|
|
|
|
{
|
Bump built-in Tor from 0.4.8.10 to 0.4.8.13
Changes in version 0.4.8.13 - 2024-10-24
This is minor release fixing an important client circuit building (Conflux
related) bug which lead to performance degradation and extra load on the
network. Some minor memory leaks fixes as well as an important minor feature
for pluggable transports. We strongly recommend to update as soon as possible
for clients in order to neutralize this conflux bug.
o Major bugfixes (circuit building):
- Conflux circuit building was ignoring the "predicted ports"
feature, which aims to make Tor stop building circuits if there
have been no user requests lately. This bug led to every idle Tor
on the network building and discarding circuits every 30 seconds,
which added overall load to the network, used bandwidth and
battery from clients that weren't actively using their Tor, and
kept sockets open on guards which added connection padding
essentially forever. Fixes bug 40981; bugfix on 0.4.8.1-alpha;
o Minor feature (bridges, pluggable transport):
- Add STATUS TYPE=version handler for Pluggable Transport. This
allows us to gather version statistics on Pluggable Transport
usage from bridge servers on our metrics portal. Closes
ticket 11101.
o Minor features (fallbackdir):
- Regenerate fallback directories generated on October 24, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/10/24.
o Minor bugfixes (memleak, authority):
- Fix a small memleak when computing a new consensus. This only
affects directory authorities. Fixes bug 40966; bugfix
on 0.3.5.1-alpha.
o Minor bugfixes (memory):
- Fix memory leaks of the CPU worker code during shutdown. Fixes bug
833; bugfix on 0.3.5.1-alpha.
Changes in version 0.4.8.12 - 2024-06-06
This is a minor release with couple bugfixes affecting conflux and logging.
We also have the return of faravahar directory authority with new keys and
address.
o Minor feature (dirauth):
- Add back faravahar with a new address and new keys. Closes 40689.
o Minor features (fallbackdir):
- Regenerate fallback directories generated on June 06, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/06/06.
o Minor bugfix (circuit):
- Remove a log_warn being triggered by a protocol violation that
already emits a protocol warning log. Fixes bug 40932; bugfix
on 0.4.8.1-alpha.
o Minor bugfixes (conflux):
- Avoid a potential hard assert (crash) when sending a cell on a
Conflux set. Fixes bug 40921; bugfix on 0.4.8.1-alpha.
- Make sure we don't process a closed circuit when packaging data.
This lead to a non fatal BUG() spamming logs. Fixes bug 40908;
bugfix on 0.4.8.1-alpha.
Changes in version 0.4.8.11 - 2024-04-10
This is a minor release mostly to upgrade the fallbackdir list. Worth noting
also that directory authority running this version will now automatically
reject relays running the end of life 0.4.7.x version.
o Minor feature (authority):
- Reject 0.4.7.x series at the authority level. Closes ticket 40896.
o Minor feature (dirauth, tor26):
- New IP address and keys.
o Minor feature (directory authority):
- Allow BandwidthFiles "node_id" KeyValue without the dollar sign at
the start of the hexdigit, in order to easier database queries
combining Tor documents in which the relays fingerprint does not
include it. Fixes bug 40891; bugfix on 0.4.7 (all supported
versions of Tor).
o Minor features (fallbackdir):
- Regenerate fallback directories generated on April 10, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/04/10.
o Minor bugfixes (directory authorities):
- Add a warning when publishing a vote or signatures to another
directory authority fails. Fixes bug 40910; bugfix
on 0.2.0.3-alpha.
2024-11-29 23:26:36 +02:00
|
|
|
tor_version='tor-0.4.8.13'
|
2021-11-03 12:04:18 +02:00
|
|
|
tor_tar="${tor_version}.tar.gz"
|
Bump built-in Tor from 0.4.8.10 to 0.4.8.13
Changes in version 0.4.8.13 - 2024-10-24
This is minor release fixing an important client circuit building (Conflux
related) bug which lead to performance degradation and extra load on the
network. Some minor memory leaks fixes as well as an important minor feature
for pluggable transports. We strongly recommend to update as soon as possible
for clients in order to neutralize this conflux bug.
o Major bugfixes (circuit building):
- Conflux circuit building was ignoring the "predicted ports"
feature, which aims to make Tor stop building circuits if there
have been no user requests lately. This bug led to every idle Tor
on the network building and discarding circuits every 30 seconds,
which added overall load to the network, used bandwidth and
battery from clients that weren't actively using their Tor, and
kept sockets open on guards which added connection padding
essentially forever. Fixes bug 40981; bugfix on 0.4.8.1-alpha;
o Minor feature (bridges, pluggable transport):
- Add STATUS TYPE=version handler for Pluggable Transport. This
allows us to gather version statistics on Pluggable Transport
usage from bridge servers on our metrics portal. Closes
ticket 11101.
o Minor features (fallbackdir):
- Regenerate fallback directories generated on October 24, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/10/24.
o Minor bugfixes (memleak, authority):
- Fix a small memleak when computing a new consensus. This only
affects directory authorities. Fixes bug 40966; bugfix
on 0.3.5.1-alpha.
o Minor bugfixes (memory):
- Fix memory leaks of the CPU worker code during shutdown. Fixes bug
833; bugfix on 0.3.5.1-alpha.
Changes in version 0.4.8.12 - 2024-06-06
This is a minor release with couple bugfixes affecting conflux and logging.
We also have the return of faravahar directory authority with new keys and
address.
o Minor feature (dirauth):
- Add back faravahar with a new address and new keys. Closes 40689.
o Minor features (fallbackdir):
- Regenerate fallback directories generated on June 06, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/06/06.
o Minor bugfix (circuit):
- Remove a log_warn being triggered by a protocol violation that
already emits a protocol warning log. Fixes bug 40932; bugfix
on 0.4.8.1-alpha.
o Minor bugfixes (conflux):
- Avoid a potential hard assert (crash) when sending a cell on a
Conflux set. Fixes bug 40921; bugfix on 0.4.8.1-alpha.
- Make sure we don't process a closed circuit when packaging data.
This lead to a non fatal BUG() spamming logs. Fixes bug 40908;
bugfix on 0.4.8.1-alpha.
Changes in version 0.4.8.11 - 2024-04-10
This is a minor release mostly to upgrade the fallbackdir list. Worth noting
also that directory authority running this version will now automatically
reject relays running the end of life 0.4.7.x version.
o Minor feature (authority):
- Reject 0.4.7.x series at the authority level. Closes ticket 40896.
o Minor feature (dirauth, tor26):
- New IP address and keys.
o Minor feature (directory authority):
- Allow BandwidthFiles "node_id" KeyValue without the dollar sign at
the start of the hexdigit, in order to easier database queries
combining Tor documents in which the relays fingerprint does not
include it. Fixes bug 40891; bugfix on 0.4.7 (all supported
versions of Tor).
o Minor features (fallbackdir):
- Regenerate fallback directories generated on April 10, 2024.
o Minor features (geoip data):
- Update the geoip files to match the IPFire Location Database, as
retrieved on 2024/04/10.
o Minor bugfixes (directory authorities):
- Add a warning when publishing a vote or signatures to another
directory authority fails. Fixes bug 40910; bugfix
on 0.2.0.3-alpha.
2024-11-29 23:26:36 +02:00
|
|
|
tor_sha='9baf26c387a2820b3942da572146e6eb77c2bc66862af6297cd02a074e6fba28'
|
2021-11-03 12:04:18 +02:00
|
|
|
tor_url='https://dist.torproject.org'
|
2022-07-23 11:31:27 +03:00
|
|
|
tor_pubkeys='Tor.asc'
|
2021-11-03 12:04:18 +02:00
|
|
|
|
2022-07-23 11:31:27 +03:00
|
|
|
if ! dep_get "${tor_tar}" "${tor_sha}" "${tor_url}" "${tor_pubkeys}" "" "${tor_tar}.sha256sum" "${tor_tar}.sha256sum.asc"; then
|
2021-11-03 12:04:18 +02:00
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
pushd "${tor_version}" || return 1
|
2021-11-03 12:04:18 +02:00
|
|
|
if tor_build; then
|
|
|
|
|
$make install
|
2022-04-12 02:57:49 +03:00
|
|
|
echo "# Default JoinMarket Tor configuration
|
|
|
|
|
Log warn stderr
|
|
|
|
|
SOCKSPort 9050 IsolateDestAddr IsolateDestPort
|
|
|
|
|
ControlPort 9051
|
|
|
|
|
CookieAuthentication 1
|
2022-07-13 18:44:00 +03:00
|
|
|
" > "$(tor_root)/etc/tor/torrc"
|
2021-11-03 12:04:18 +02:00
|
|
|
else
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2021-11-03 12:04:18 +02:00
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
joinmarket_install ()
|
|
|
|
|
{
|
2023-10-05 19:30:39 +02:00
|
|
|
reqs='services'
|
2019-09-05 20:23:35 +00:00
|
|
|
|
2020-06-03 19:08:02 +03:00
|
|
|
if [[ ${with_qt} == "1" ]]; then
|
2023-10-05 19:30:39 +02:00
|
|
|
reqs='gui'
|
|
|
|
|
fi
|
|
|
|
|
if [[ ${develop} == "1" ]]; then
|
|
|
|
|
reqs+=',test'
|
2019-09-05 20:23:35 +00:00
|
|
|
fi
|
|
|
|
|
|
2023-10-05 19:30:39 +02:00
|
|
|
if [ "$with_jmvenv" == 1 ]; then pip_command=pip; else pip_command=pip3; fi
|
|
|
|
|
$pip_command install -e ".[${reqs}]" || return 1
|
2020-06-03 19:08:02 +03:00
|
|
|
|
|
|
|
|
if [[ ${with_qt} == "1" ]]; then
|
2020-06-25 18:01:31 +03:00
|
|
|
if [[ -d ~/.local/share/icons ]] && [[ -d ~/.local/share/applications ]]; then
|
2020-06-03 19:08:02 +03:00
|
|
|
echo "Installing XDG desktop entry"
|
|
|
|
|
cp -f "$(dirname "$0")/docs/images/joinmarket_logo.png" \
|
|
|
|
|
~/.local/share/icons/
|
2022-12-29 07:57:05 +02:00
|
|
|
sed "s/\\\$JMHOME/$(dirname "$(realpath "$0")" | sed 's/\//\\\//g')/" \
|
|
|
|
|
"$(dirname "$0")/joinmarket-qt.desktop" > \
|
2020-06-03 19:08:02 +03:00
|
|
|
~/.local/share/applications/joinmarket-qt.desktop
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2017-09-23 20:24:59 +03:00
|
|
|
parse_flags ()
|
|
|
|
|
{
|
2018-11-12 22:30:25 -07:00
|
|
|
while :; do
|
|
|
|
|
case $1 in
|
2017-09-23 20:24:59 +03:00
|
|
|
--develop)
|
2023-10-05 19:30:39 +02:00
|
|
|
# editable install is currently always on
|
|
|
|
|
# option solely triggers test dependencies installation for now
|
|
|
|
|
develop='1'
|
2017-09-23 20:24:59 +03:00
|
|
|
;;
|
2021-09-28 23:16:17 +03:00
|
|
|
--disable-os-deps-check)
|
|
|
|
|
use_os_deps_check='0'
|
|
|
|
|
;;
|
2020-10-29 22:19:36 +02:00
|
|
|
--disable-secp-check)
|
|
|
|
|
use_secp_check='0'
|
|
|
|
|
;;
|
2022-07-23 11:31:27 +03:00
|
|
|
--no-gpg-validation)
|
|
|
|
|
no_gpg_validation='1'
|
|
|
|
|
;;
|
2018-11-12 22:30:25 -07:00
|
|
|
-p|--python)
|
|
|
|
|
if [[ "$2" ]]; then
|
|
|
|
|
python="$2"
|
|
|
|
|
shift
|
|
|
|
|
else
|
|
|
|
|
echo 'ERROR: "--python" requires a non-empty option argument.'
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
--python=?*)
|
|
|
|
|
python="${1#*=}"
|
|
|
|
|
;;
|
|
|
|
|
--python=)
|
|
|
|
|
echo 'ERROR: "--python" requires a non-empty option argument.'
|
|
|
|
|
return 1
|
|
|
|
|
;;
|
2021-11-03 12:04:18 +02:00
|
|
|
--with-local-tor)
|
|
|
|
|
build_local_tor='1'
|
|
|
|
|
;;
|
2018-12-15 15:33:17 +02:00
|
|
|
--with-qt)
|
|
|
|
|
with_qt='1'
|
|
|
|
|
;;
|
2019-11-01 00:19:37 +02:00
|
|
|
--without-qt)
|
|
|
|
|
with_qt='0'
|
|
|
|
|
;;
|
2020-08-16 20:50:44 -04:00
|
|
|
--docker-install)
|
|
|
|
|
with_sudo='0'
|
|
|
|
|
with_jmvenv='0'
|
|
|
|
|
;;
|
2019-01-03 17:36:46 +00:00
|
|
|
"")
|
|
|
|
|
break
|
|
|
|
|
;;
|
2018-11-12 22:30:25 -07:00
|
|
|
*)
|
2022-03-16 01:06:27 +02:00
|
|
|
if [[ $1 != '-h' ]] && [[ $1 != '--help' ]]; then
|
|
|
|
|
echo "Invalid option $1"
|
|
|
|
|
fi
|
2019-01-03 17:36:46 +00:00
|
|
|
echo "
|
2022-12-29 07:57:05 +02:00
|
|
|
Usage: ${0} [options]
|
2019-01-03 17:36:46 +00:00
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
|
2023-10-12 01:45:53 +03:00
|
|
|
--develop developer mode (install dependencies for testing)
|
2021-09-28 23:16:17 +03:00
|
|
|
--disable-os-deps-check skip OS package manager's dependency check
|
|
|
|
|
--disable-secp-check do not run libsecp256k1 tests (default is to run them)
|
2020-08-16 20:50:44 -04:00
|
|
|
--docker-install system wide install as root for minimal Docker installs
|
2022-07-23 11:31:27 +03:00
|
|
|
--no-gpg-validation disable GPG key validation for dependencies
|
2021-09-28 23:16:17 +03:00
|
|
|
--python, -p python version (only python3 versions are supported)
|
2021-11-03 12:04:18 +02:00
|
|
|
--with-local-tor build Tor locally and autostart when needed
|
2021-09-28 23:16:17 +03:00
|
|
|
--with-qt build the Qt GUI
|
|
|
|
|
--without-qt don't build the Qt GUI
|
2019-01-03 17:36:46 +00:00
|
|
|
"
|
|
|
|
|
return 1
|
|
|
|
|
;;
|
2017-09-23 20:24:59 +03:00
|
|
|
esac
|
2018-11-12 22:30:25 -07:00
|
|
|
shift
|
2017-09-23 20:24:59 +03:00
|
|
|
done
|
2018-12-15 15:33:17 +02:00
|
|
|
|
2020-01-14 18:55:00 +00:00
|
|
|
if [[ ${with_qt} == '' ]]; then
|
2022-12-29 07:57:05 +02:00
|
|
|
read -r -n 1 -p "
|
2018-12-15 15:33:17 +02:00
|
|
|
INFO: Joinmarket-Qt for GUI Taker and Tumbler modes is available.
|
2022-09-28 16:40:47 +03:00
|
|
|
Install Qt dependencies (~160mb)? (y/N) "
|
|
|
|
|
echo ""
|
2018-12-15 15:33:17 +02:00
|
|
|
if [[ ${REPLY} =~ y|Y ]]; then
|
2022-09-28 16:40:47 +03:00
|
|
|
echo "Building Qt GUI"
|
2018-12-15 15:33:17 +02:00
|
|
|
with_qt='1'
|
2022-09-28 16:40:47 +03:00
|
|
|
else
|
|
|
|
|
echo "Not building Qt GUI"
|
2018-12-15 15:33:17 +02:00
|
|
|
fi
|
|
|
|
|
fi
|
2017-09-23 20:24:59 +03:00
|
|
|
}
|
|
|
|
|
|
2018-05-04 21:28:09 +03:00
|
|
|
os_is_deb ()
|
|
|
|
|
{
|
|
|
|
|
( which apt-get && which dpkg-query ) 2>/dev/null 1>&2
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-09 16:23:27 -04:00
|
|
|
os_is_dar ()
|
|
|
|
|
{
|
|
|
|
|
[[ "$(uname)" == "Darwin" ]]
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-29 06:46:15 +08:00
|
|
|
is_python3 ()
|
|
|
|
|
{
|
2019-09-05 20:23:35 +00:00
|
|
|
if [[ ${python} == python3* ]]; then
|
2018-11-29 06:46:15 +08:00
|
|
|
return 0
|
|
|
|
|
fi
|
2019-09-05 20:23:35 +00:00
|
|
|
if [[ ${python} == python2* ]]; then
|
2018-11-29 06:46:15 +08:00
|
|
|
return 1
|
|
|
|
|
fi
|
2019-09-05 20:23:35 +00:00
|
|
|
${python} -c 'import sys; sys.exit(0) if sys.version_info >= (3,0) else sys.exit(1)'
|
2018-11-29 06:46:15 +08:00
|
|
|
}
|
|
|
|
|
|
2018-05-04 21:28:09 +03:00
|
|
|
install_get_os ()
|
|
|
|
|
{
|
|
|
|
|
if os_is_deb; then
|
|
|
|
|
echo 'debian'
|
2020-07-09 16:23:27 -04:00
|
|
|
elif os_is_dar; then
|
|
|
|
|
echo 'darwin'
|
2018-05-04 21:28:09 +03:00
|
|
|
else
|
|
|
|
|
echo 'unknown'
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-26 07:56:31 +00:00
|
|
|
main ()
|
|
|
|
|
{
|
2017-09-23 20:24:59 +03:00
|
|
|
# flags
|
2021-11-03 12:04:18 +02:00
|
|
|
build_local_tor=''
|
2022-07-23 11:31:27 +03:00
|
|
|
no_gpg_validation=''
|
2021-09-28 23:16:17 +03:00
|
|
|
use_os_deps_check='1'
|
2020-10-29 22:19:36 +02:00
|
|
|
use_secp_check='1'
|
2018-12-15 15:33:17 +02:00
|
|
|
with_qt=''
|
2020-08-16 20:50:44 -04:00
|
|
|
with_jmvenv='1'
|
|
|
|
|
with_sudo='1'
|
2018-07-22 11:45:07 +03:00
|
|
|
reinstall='false'
|
2022-12-29 07:57:05 +02:00
|
|
|
if ! parse_flags "${@}"; then
|
2018-11-12 22:30:25 -07:00
|
|
|
return 1
|
|
|
|
|
fi
|
2017-09-23 20:24:59 +03:00
|
|
|
|
2020-08-16 20:50:44 -04:00
|
|
|
jm_source="$PWD"
|
|
|
|
|
if [ "$with_jmvenv" == 1 ]; then
|
|
|
|
|
jm_root="${jm_source}/jmvenv"
|
2023-01-07 15:14:06 +02:00
|
|
|
export PKG_CONFIG_PATH="${jm_root}/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
|
|
|
|
export LD_LIBRARY_PATH="${jm_root}/lib:${LD_LIBRARY_PATH}"
|
|
|
|
|
export C_INCLUDE_PATH="${jm_root}/include:${C_INCLUDE_PATH}"
|
2020-08-16 20:50:44 -04:00
|
|
|
else
|
|
|
|
|
jm_root=""
|
|
|
|
|
fi
|
|
|
|
|
|
2018-05-04 21:28:09 +03:00
|
|
|
# os check
|
|
|
|
|
install_os="$( install_get_os )"
|
|
|
|
|
|
|
|
|
|
if ! deps_install; then
|
2017-08-26 07:56:31 +00:00
|
|
|
echo "Dependecies could not be installed. Exiting."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2023-01-07 15:14:06 +02:00
|
|
|
|
|
|
|
|
MAKEFLAGS="-j $(num_cores)" && export MAKEFLAGS
|
|
|
|
|
|
2020-08-16 20:50:44 -04:00
|
|
|
if [ "$with_jmvenv" == 1 ]; then
|
|
|
|
|
if ! venv_setup; then
|
2022-11-04 11:10:05 -04:00
|
|
|
echo "Joinmarket Python virtual environment could not be setup. Exiting."
|
2020-08-16 20:50:44 -04:00
|
|
|
return 1
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
# shellcheck source=/dev/null
|
2020-08-16 20:50:44 -04:00
|
|
|
source "${jm_root}/bin/activate"
|
2023-10-07 14:46:12 +03:00
|
|
|
else
|
|
|
|
|
upgrade_setuptools
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
2021-11-03 12:04:18 +02:00
|
|
|
if [[ ${build_local_tor} == "1" ]]; then
|
|
|
|
|
if ! tor_deps_install; then
|
|
|
|
|
echo "Tor dependencies could not be installed. Exiting."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2018-07-22 11:45:07 +03:00
|
|
|
mkdir -p "deps/cache"
|
2022-12-29 07:57:05 +02:00
|
|
|
pushd deps || return 1
|
2020-04-28 19:47:08 +01:00
|
|
|
if ! libsecp256k1_install; then
|
|
|
|
|
echo "libsecp256k1 was not built. Exiting."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2025-10-30 03:01:18 +00:00
|
|
|
if [[ "${install_os}" != 'debian' ]]; then
|
|
|
|
|
if ! libffi_install; then
|
|
|
|
|
echo "Libffi was not built. Exiting."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
|
|
|
|
if ! libsodium_install; then
|
|
|
|
|
echo "Libsodium was not built. Exiting."
|
2017-08-26 09:22:18 +00:00
|
|
|
return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
2021-11-03 12:04:18 +02:00
|
|
|
if [[ ${build_local_tor} == "1" ]]; then
|
|
|
|
|
if ! tor_install; then
|
|
|
|
|
echo "Building local Tor was requested, but not built. Exiting."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2022-12-29 07:57:05 +02:00
|
|
|
popd || return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
if ! joinmarket_install; then
|
|
|
|
|
echo "Joinmarket was not installed. Exiting."
|
2020-08-16 20:50:44 -04:00
|
|
|
if [ "$with_jmvenv" == 1 ]; then deactivate; fi
|
2017-08-26 09:22:18 +00:00
|
|
|
return 1
|
2017-08-26 07:56:31 +00:00
|
|
|
fi
|
2020-08-16 20:50:44 -04:00
|
|
|
if [ "$with_jmvenv" == 1 ]; then
|
|
|
|
|
deactivate
|
|
|
|
|
echo "Joinmarket successfully installed
|
|
|
|
|
Before executing scripts or tests, run:
|
2017-08-26 07:56:31 +00:00
|
|
|
|
2020-08-16 20:50:44 -04:00
|
|
|
\`source jmvenv/bin/activate\`
|
2017-08-26 15:36:54 +03:00
|
|
|
|
2022-11-04 11:10:05 -04:00
|
|
|
from this directory, to activate the virtual environment."
|
2020-08-16 20:50:44 -04:00
|
|
|
fi
|
2017-08-26 07:56:31 +00:00
|
|
|
}
|
2022-12-29 07:57:05 +02:00
|
|
|
main "${@}"
|