From: Benoît Canet <benoit.canet.cont...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master
lua: Add a check for openssl header version
If OpenSSL version is 1.1 prompt a message explaining
to the user how to install the compat headers.
Signed-off-by: Benoît Canet <ben...@scylladb.com>
Message-Id: <20170725115124.14525-1-ben...@scylladb.com>
---
diff --git a/modules/lua/Makefile b/modules/lua/Makefile
--- a/modules/lua/Makefile
+++ b/modules/lua/Makefile
@@ -119,6 +119,8 @@ $(CDIR)/path.lua: $(LUA_ROCKS_BIN)
LuaSec: $(CDIR)/ssl.lua
$(CDIR)/ssl.lua: $(LUA_ROCKS_BIN)
+ ./check-openssl-version
+
# Workaround because LuaRocks ignores /lib64
ifneq ("$(wildcard /usr/lib64/libssl.so*)", "")
out/bin/luarocks install LuaSec 0.5 OPENSSL_LIBDIR=/usr/lib64
diff --git a/modules/lua/check-openssl-version
b/modules/lua/check-openssl-version
--- a/modules/lua/check-openssl-version
+++ b/modules/lua/check-openssl-version
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This is here to help cope with the transition period that the distro
+# use for openssl-1.0 to openssl-1.1
+if [ -f /usr/include/openssl/opensslv.h ]; then
+ has_new_openssl=$(grep "OpenSSL 1.1" /usr/include/openssl/opensslv.h)
+fi
+if [ "$has_new_openssl"x != "x" ]; then
+ echo "OpenSSL 1.1 header detected."
+ echo "On Fedora >= 26 please use the compat headers by doing:"
+ echo ""
+ echo " dnf install --allowerasing compat-openssl10-devel -y"
+ echo ""
+ exit 1
+fi
+exit 0
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.