summaryrefslogtreecommitdiffstats
path: root/package/netsnmp
diff options
context:
space:
mode:
Diffstat (limited to 'package/netsnmp')
-rw-r--r--package/netsnmp/0003-configure-Invert-AC_CHECK_LIB-EVP_md5-.-without-lz-w.patch41
-rw-r--r--package/netsnmp/0003-configure-fix-AC_CHECK_FUNCS-EVP_sha224-EVP_sha384-..patch39
-rw-r--r--package/netsnmp/0004-configure-fix-AC_CHECK_FUNCS-TLS_method-TLSv1_method.patch39
3 files changed, 78 insertions, 41 deletions
diff --git a/package/netsnmp/0003-configure-Invert-AC_CHECK_LIB-EVP_md5-.-without-lz-w.patch b/package/netsnmp/0003-configure-Invert-AC_CHECK_LIB-EVP_md5-.-without-lz-w.patch
deleted file mode 100644
index 5cbc35600f..0000000000
--- a/package/netsnmp/0003-configure-Invert-AC_CHECK_LIB-EVP_md5-.-without-lz-w.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 77062d4a76f5dbd8aee03a25e9eb514b7d924bcc Mon Sep 17 00:00:00 2001
-From: Giulio Benetti <giulio.benetti@micronovasrl.com>
-Date: Mon, 17 Sep 2018 21:44:20 +0200
-Subject: [PATCH 3/3] configure: Invert AC_CHECK_LIB(EVP_md5,..) without -lz
- with -lz
-
-First AC_CHECK_LIB(EVP_md5,...) is going to succeed due to
-[other-libraries] fields, but in that case it won't add -lz to LIBCRYPTO
-resulting in failing AC_CHECH_FUNCS() with LIBS=LIBCRYPTO.
-
-Try AC_CHECK_LIB(EVP_md5,..) where LIBS can miss -lz
-and in action-if-not-found try AC_CHECK_LIB(EVP_md5,...) without -lz.
-In the first case append -lz to LIBCRYPTO, in the second don't.
-This is done to check if -lz is present and used in -lcrypto.
-
-Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
----
- configure.d/config_os_libs2 | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
-index 81788a209..bfd14c191 100644
---- a/configure.d/config_os_libs2
-+++ b/configure.d/config_os_libs2
-@@ -307,11 +307,10 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
-
- if test x$CRYPTO = x; then
- AC_CHECK_LIB([crypto], [EVP_md5],
-- [CRYPTO="crypto"; LIBCRYPTO="-lcrypto"], [
-+ [CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"], [
- unset ac_cv_lib_crypto_EVP_md5
- AC_CHECK_LIB([crypto], [EVP_md5],
-- [CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"], [],
-- [-lz])
-+ [CRYPTO="crypto"; LIBCRYPTO="-lcrypto"], [])
- ])
- else
- LIBCRYPTO="-l${CRYPTO}"
---
-2.17.1
-
diff --git a/package/netsnmp/0003-configure-fix-AC_CHECK_FUNCS-EVP_sha224-EVP_sha384-..patch b/package/netsnmp/0003-configure-fix-AC_CHECK_FUNCS-EVP_sha224-EVP_sha384-..patch
new file mode 100644
index 0000000000..0829042128
--- /dev/null
+++ b/package/netsnmp/0003-configure-fix-AC_CHECK_FUNCS-EVP_sha224-EVP_sha384-..patch
@@ -0,0 +1,39 @@
+From 8e273c688aa235ed9c68570a700d31596bac14df Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Mon, 15 Oct 2018 19:07:05 +0200
+Subject: [PATCH 1/2] configure: fix AC_CHECK_FUNCS(EVP_sha224 EVP_sha384 ...)
+ failure on static linking
+
+If building as static lib, AC_CHECK_FUNCS(EVP_sha224 EVP_sha384 ...)
+fails due to missing -lz in $LIBS.
+At the moment, $LIBS contains $LIBCRYPTO only discarding previous $LIBS
+content.
+
+Add $LIBS to:
+LIBS="$LIBCRYPTO"
+as:
+LIBS="$LIBCRYPTO $LIBS"
+This way $LIBS will contain -lz at the end of linking command that in
+static linking build is mandatory.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ configure.d/config_os_libs2 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
+index 81788a209..93044000b 100644
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -321,7 +321,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
+ AC_DEFINE(HAVE_LIBCRYPTO, 1,
+ [Define to 1 if you have the OpenSSL library (-lcrypto or -leay32).])
+ netsnmp_save_LIBS="$LIBS"
+- LIBS="$LIBCRYPTO"
++ LIBS="$LIBCRYPTO $LIBS"
+ AC_CHECK_FUNCS([AES_cfb128_encrypt]dnl
+ [EVP_sha224 EVP_sha384 ]dnl
+ [EVP_MD_CTX_create EVP_MD_CTX_destroy]dnl
+--
+2.17.1
+
diff --git a/package/netsnmp/0004-configure-fix-AC_CHECK_FUNCS-TLS_method-TLSv1_method.patch b/package/netsnmp/0004-configure-fix-AC_CHECK_FUNCS-TLS_method-TLSv1_method.patch
new file mode 100644
index 0000000000..a731f25761
--- /dev/null
+++ b/package/netsnmp/0004-configure-fix-AC_CHECK_FUNCS-TLS_method-TLSv1_method.patch
@@ -0,0 +1,39 @@
+From 1ab6e3fc3cf61fa5a7b7363e59095e868474524b Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Mon, 15 Oct 2018 19:34:26 +0200
+Subject: [PATCH 2/2] configure: fix AC_CHECK_FUNCS(TLS_method TLSv1_method
+ ...) failure on static linking
+
+If building as static lib, AC_CHECK_FUNCS(TLS_method TLSv1_method ...)
+fails due to missing -lz in $LIBS.
+At the moment, $LIBS contains "-lssl $LIBCRYPTO" only discarding
+previous $LIBS content.
+
+Add $LIBS to:
+LIBS="-lssl $LIBCRYPTO"
+as:
+LIBS="-lssl $LIBCRYPTO $LIBS"
+This way $LIBS will contain -lz at the end of linking command that in
+static linking build is mandatory.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ configure.d/config_os_libs2 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
+index 93044000b..c811c63ec 100644
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -349,7 +349,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
+ LIBS="$netsnmp_save_LIBS"
+ fi
+ netsnmp_save_LIBS="$LIBS"
+- LIBS="-lssl $LIBCRYPTO"
++ LIBS="-lssl $LIBCRYPTO $LIBS"
+ AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl
+ [SSL_library_init SSL_load_error_strings])
+ LIBS="$netsnmp_save_LIBS"
+--
+2.17.1
+
OpenPOWER on IntegriCloud