Summary(pl.UTF-8): Sieciowe narzędzie do UPS-ów
Name: nut
Version: 2.7.4
-Release: 8
+Release: 9
License: GPL v2+
Group: Applications/System
Source0: http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz
Patch6: bcmxcp-off-by-one.patch
Patch7: %{name}-build.patch
Patch8: %{name}-i2c.patch
+Patch9: openssl.patch
URL: http://www.networkupstools.org/
BuildRequires: asciidoc >= 8.6.3
BuildRequires: autoconf >= 2.60
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%build
%{__libtoolize}
--- /dev/null
+--- nut-2.7.4/m4/nut_check_libopenssl.m4~ 2015-12-29 09:42:34.000000000 +0100
++++ nut-2.7.4/m4/nut_check_libopenssl.m4 2018-09-18 08:24:37.208213839 +0200
+@@ -58,7 +58,7 @@ if test -z "${nut_have_libopenssl_seen}"
+
+ dnl check if openssl is usable
+ AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT])
+- AC_CHECK_FUNCS(SSL_library_init, [], [nut_have_openssl=no])
++ AC_CHECK_FUNCS(OPENSSL_init_ssl, [], [nut_have_openssl=no])
+
+ if test "${nut_have_openssl}" = "yes"; then
+ nut_with_ssl="yes"
+--- nut-2.7.4/server/netssl.c~ 2015-12-29 13:08:34.000000000 +0100
++++ nut-2.7.4/server/netssl.c 2018-09-18 08:26:46.435444419 +0200
+@@ -387,7 +387,7 @@ void ssl_init(void)
+ #ifdef WITH_OPENSSL
+
+ SSL_load_error_strings();
+- SSL_library_init();
++ OPENSSL_init_ssl(0, NULL);
+
+ if ((ssl_method = TLSv1_server_method()) == NULL) {
+ ssl_debug();
+--- nut-2.7.4/clients/upsclient.c~ 2015-12-29 13:08:34.000000000 +0100
++++ nut-2.7.4/clients/upsclient.c 2018-09-18 08:27:00.155858201 +0200
+@@ -316,7 +316,7 @@ int upscli_init(int certverify, const ch
+
+ #ifdef WITH_OPENSSL
+
+- SSL_library_init();
++ OPENSSL_init_ssl(0, NULL);
+ SSL_load_error_strings();
+
+ ssl_method = TLSv1_client_method();