From 4366c3647ee12a0166489cc80da8b9d193fb70bb Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Mon, 9 Dec 2019 23:37:17 +0200 Subject: [PATCH 1/3] Use libssl-dev on Ubuntu --- scripts/linux-prereqs.sh | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/scripts/linux-prereqs.sh b/scripts/linux-prereqs.sh index cbfff0ce..4e6a8053 100755 --- a/scripts/linux-prereqs.sh +++ b/scripts/linux-prereqs.sh @@ -150,28 +150,23 @@ elif type apt-get > /dev/null 2>&1; then if [ $NETCOREDEPS -ne 0 ]; then checkNetCoreDeps aptSudoIf "install -yq libicu[0-9][0-9] libkrb5-3 zlib1g" - # Determine which version of libssl to install + + # Check for libssl-dev # dpkg-query can return "1" in some distros if the package is not found. "2" is an unexpected error - LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1) + LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl-dev' 2>&1) if [ $? -eq 2 ]; then echo "(!) Failed see if libssl already installed!" exitScript 1 fi - if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then - # No libssl install 1.0.2 for Debian, 1.0.0 for Ubuntu - if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then - if ! aptSudoIf "install -yq libssl1.0.2"; then - echo "(!) libssl1.0.2 installation failed!" - exitScript 1 - fi - else - if ! aptSudoIf "install -yq libssl1.0.0"; then - echo "(!) libssl1.0.0 installation failed!" - exitScript 1 - fi + + # Install libssl-dev + if [ "$(echo "$LIBSSL" | grep -o 'libssl-dev' | uniq | sort | wc -l)" -eq 0 ]; then + if ! aptSudoIf "install -yq libssl-dev"; then + echo "(!) libssl-dev installation failed!" + exitScript 1 fi else - echo "(*) libssl1.0.x already installed." + echo "(*) libssl-dev already installed." fi fi From 7b41fd13ef823c815900d1620e5557ba4c4205b6 Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Tue, 10 Dec 2019 22:40:06 +0200 Subject: [PATCH 2/3] Change library to use openssl --- scripts/linux-prereqs.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/linux-prereqs.sh b/scripts/linux-prereqs.sh index 4e6a8053..d278b45b 100755 --- a/scripts/linux-prereqs.sh +++ b/scripts/linux-prereqs.sh @@ -151,22 +151,22 @@ elif type apt-get > /dev/null 2>&1; then if [ $NETCOREDEPS -ne 0 ]; then checkNetCoreDeps aptSudoIf "install -yq libicu[0-9][0-9] libkrb5-3 zlib1g" - # Check for libssl-dev + # Check for openssl # dpkg-query can return "1" in some distros if the package is not found. "2" is an unexpected error - LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl-dev' 2>&1) + LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'openssl' 2>&1) if [ $? -eq 2 ]; then echo "(!) Failed see if libssl already installed!" exitScript 1 fi - # Install libssl-dev - if [ "$(echo "$LIBSSL" | grep -o 'libssl-dev' | uniq | sort | wc -l)" -eq 0 ]; then - if ! aptSudoIf "install -yq libssl-dev"; then - echo "(!) libssl-dev installation failed!" + # Install openssl + if [ "$(echo "$LIBSSL" | grep -o 'openssl' | uniq | sort | wc -l)" -eq 0 ]; then + if ! aptSudoIf "install -yq openssl"; then + echo "(!) openssl installation failed!" exitScript 1 fi else - echo "(*) libssl-dev already installed." + echo "(*) openssl already installed." fi fi From 4824162a6aae21de99da8b1065655ea9121fbcb9 Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Wed, 11 Dec 2019 23:08:19 +0200 Subject: [PATCH 3/3] Change to openssl --- scripts/linux-prereqs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linux-prereqs.sh b/scripts/linux-prereqs.sh index d278b45b..bc07c3b3 100755 --- a/scripts/linux-prereqs.sh +++ b/scripts/linux-prereqs.sh @@ -155,7 +155,7 @@ elif type apt-get > /dev/null 2>&1; then # dpkg-query can return "1" in some distros if the package is not found. "2" is an unexpected error LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'openssl' 2>&1) if [ $? -eq 2 ]; then - echo "(!) Failed see if libssl already installed!" + echo "(!) Failed see if openssl already installed!" exitScript 1 fi