Skip to content

Commit bc4d993

Browse files
authored
Merge pull request #2 from Axosoft/centos-7-fixes
Downgrade libcurl requirement
2 parents b7926ba + 05fd054 commit bc4d993

File tree

2 files changed

+56
-7
lines changed

2 files changed

+56
-7
lines changed

script/build-ubuntu.sh

+55-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ case "$TARGET_ARCH" in
3131
export CC="gcc"
3232
STRIP="strip"
3333
HOST=""
34-
TARGET="" ;;
34+
TARGET=""
35+
OSSL_TARGET="linux-x86_64" ;;
3536
"x86")
3637
DEPENDENCY_ARCH="x86"
3738
export CC="i686-linux-gnu-gcc"
3839
STRIP="i686-gnu-strip"
3940
HOST="--host=i686-linux-gnu"
40-
TARGET="--target=i686-linux-gnu" ;;
41+
TARGET="--target=i686-linux-gnu"
42+
OSSL_TARGET="linux-generic32" ;;
4143
"arm64")
4244
# __GLIBC_MINOR__ is used as a feature test macro. Replace it with the
4345
# earliest supported version of glibc 2.17 as was previously the case when building on ubuntu-18.04
@@ -48,13 +50,15 @@ case "$TARGET_ARCH" in
4850
export CC="aarch64-linux-gnu-gcc"
4951
STRIP="aarch64-linux-gnu-strip"
5052
HOST="--host=aarch64-linux-gnu"
51-
TARGET="--target=aarch64-linux-gnu" ;;
53+
TARGET="--target=aarch64-linux-gnu"
54+
OSSL_TARGET="linux-aarch64" ;;
5255
"arm")
5356
DEPENDENCY_ARCH="arm"
5457
export CC="arm-linux-gnueabihf-gcc"
5558
STRIP="arm-linux-gnueabihf-strip"
5659
HOST="--host=arm-linux-gnueabihf"
57-
TARGET="--target=arm-linux-gnueabihf" ;;
60+
TARGET="--target=arm-linux-gnueabihf"
61+
OSSL_TARGET="linux-armv4" ;;
5862
*)
5963
exit 1 ;;
6064
esac
@@ -70,18 +74,62 @@ source "$CURRENT_DIR/compute-checksum.sh"
7074
# shellcheck source=script/check-static-linking.sh
7175
source "$CURRENT_DIR/check-static-linking.sh"
7276

77+
echo " -- Building vanilla OpenSSL at $OSSL_INSTALL_DIR instead of distro-specific version"
78+
79+
OSSL_FILE_NAME="openssl-1.0.2u"
80+
OSSL_FILE="$OSSL_FILE_NAME.tar.gz"
81+
82+
cd /tmp || exit 1
83+
curl -LO "https://www.openssl.org/source/$OSSL_FILE"
84+
tar -xf $OSSL_FILE
85+
86+
(
87+
cd $OSSL_FILE_NAME || exit 1
88+
89+
# this will conflict with a variable in the makefile
90+
unset TARGET_ARCH
91+
92+
# flags:
93+
# - no-ssl2: deprecated
94+
# - no-ssl3: deprecated
95+
# - no-comp: not used by libcurl
96+
# - no-dso: libcurl won't respect libssl saying it needs -ldl
97+
# - no-engine: disabled because
98+
./Configure \
99+
"$OSSL_TARGET" \
100+
shared \
101+
no-ssl2 \
102+
no-ssl3 \
103+
no-comp \
104+
no-dso \
105+
no-engine \
106+
--prefix="$OSSL_INSTALL_DIR" \
107+
--openssldir="$OSSL_INSTALL_DIR"
108+
109+
make depend
110+
make build_libs
111+
make install
112+
)
73113
echo " -- Building vanilla curl at $CURL_INSTALL_DIR instead of distro-specific version"
74114

75-
CURL_FILE_NAME="curl-7.61.1"
115+
CURL_FILE_NAME="curl-7.29.0"
76116
CURL_FILE="$CURL_FILE_NAME.tar.gz"
77117

78118
cd /tmp || exit 1
79-
curl -LO "https://curl.haxx.se/download/$CURL_FILE"
119+
curl -LO "https://curl.haxx.se/download/archeology/$CURL_FILE"
80120
tar -xf $CURL_FILE
81121

82122
(
83123
cd $CURL_FILE_NAME || exit 1
84-
./configure --prefix="$CURL_INSTALL_DIR" "$HOST" "$TARGET"
124+
125+
export LDFLAGS="-Wl,-R$OSSL_INSTALL_DIR/lib"
126+
127+
./configure \
128+
--enable-threaded-resolver \
129+
--enable-tls-srp \
130+
--prefix="$CURL_INSTALL_DIR" \
131+
--with-ssl="$OSSL_INSTALL_DIR" \
132+
"$HOST" "$TARGET"
85133
make install
86134
)
87135
echo " -- Building git at $SOURCE to $DESTINATION"

script/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ BASEDIR=$ROOT \
2323
SOURCE="$ROOT/git" \
2424
DESTINATION="/tmp/build/git" \
2525
CURL_INSTALL_DIR="/tmp/build/curl" \
26+
OSSL_INSTALL_DIR="/tmp/build/openssl" \
2627
bash "$SCRIPT"

0 commit comments

Comments
 (0)