File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 4
4
# Downloads, builds and installs librdkafka into <install-dir>
5
5
#
6
6
7
- set -e
7
+ if [[ $1 == " --require-ssl" ]]; then
8
+ REQUIRE_SSL=1
9
+ shift
10
+ fi
8
11
9
12
VERSION=$1
10
13
PREFIXDIR=$2
11
14
15
+ set -e
16
+
12
17
if [[ -z " $VERSION " ]]; then
13
- echo " Usage: $0 <librdkafka-version> [<install-dir>]" 1>&2
18
+ echo " Usage: $0 --require-ssl <librdkafka-version> [<install-dir>]" 1>&2
14
19
exit 1
15
20
fi
16
21
@@ -32,6 +37,12 @@ curl -L "https://github.com/edenhill/librdkafka/archive/${VERSION}.tar.gz" | \
32
37
./configure --clean
33
38
make clean
34
39
./configure --prefix=" $PREFIXDIR "
40
+
41
+ if [[ $REQUIRE_SSL == 1 ]]; then
42
+ grep ' ^#define WITH_SSL 2$' config.h || \
43
+ (echo " ERROR: OpenSSL support required" ; cat config.log ; exit 1)
44
+ fi
45
+
35
46
make -j
36
47
make install
37
48
popd
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ if [[ -z $PREFIX ]]; then
14
14
fi
15
15
16
16
set -ex
17
+ set -o pipefail
17
18
18
19
echo " # Building OpenSSL ${OPENSSL_VERSION} "
19
20
20
-
21
21
if ! grep -q " ^VERSION=${OPENSSL_VERSION} $" build-openssl/Makefile ; then
22
22
echo " No usable build-openssl directory: downloading ${OPENSSL_VERSION} "
23
23
rm -rf build-openssl
32
32
33
33
./config --prefix=${PREFIX} zlib no-krb5 zlib shared
34
34
echo " ## building openssl"
35
- time make -j 2>&1 | tail -20
35
+ if ! time make -j 2>&1 | tail -20 ; then
36
+ echo " ## Make failed, cleaning up and retrying"
37
+ time make clean 2>&1 | tail -20
38
+ rm -f test/PASSED
39
+ echo " ## building openssl (retry)"
40
+ time make -j 2>&1 | tail -20 ; then
41
+ fi
42
+
36
43
if [[ ! -f test/PASSED ]]; then
37
44
echo " ## testing openssl"
38
45
time make test 2>&1 | tail -20
You can’t perform that action at this time.
0 commit comments