Module: kamailio
Branch: 5.5
Commit: efe83bb89e9582b5c58a85626cc45d87dc124205
URL:
https://github.com/kamailio/kamailio/commit/efe83bb89e9582b5c58a85626cc45d8…
Author: SPChan <shihping.chan(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2021-06-20T12:21:43+03:00
pkg: enable RHEL7-like distros to build with OpenSSL 1.1.1 [skip ci]
(cherry picked from commit ecc2cc69b08e797ca954af233c229ed44475ce33)
---
Modified: pkg/kamailio/obs/kamailio.spec
---
Diff:
https://github.com/kamailio/kamailio/commit/efe83bb89e9582b5c58a85626cc45d8…
Patch:
https://github.com/kamailio/kamailio/commit/efe83bb89e9582b5c58a85626cc45d8…
---
diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec
index 28dc1c9720..3ca6df74fc 100644
--- a/pkg/kamailio/obs/kamailio.spec
+++ b/pkg/kamailio/obs/kamailio.spec
@@ -172,6 +172,11 @@
%define _rundir %{_localstatedir}/run
%endif
+# build with openssl 1.1.1 on RHEL 7 based dists
+%if 0%{?rhel} == 7
+%bcond_with openssl11
+%endif
+
# redefine buggy openSUSE Leap _sharedstatedir macro. More info at
https://bugzilla.redhat.com/show_bug.cgi?id=183370
%if 0%{?suse_version} == 1315
%define _sharedstatedir /var/lib
@@ -279,8 +284,13 @@ Account transaction information in a JSON dictionary.
%package auth-ephemeral
Summary: Functions for authentication using ephemeral credentials
Group: %{PKGGROUP}
+%if 0%{?rhel} == 7 && %{with openssl11}
+Requires: openssl11, kamailio = %ver
+BuildRequires: openssl11-devel
+%else
Requires: openssl, kamailio = %ver
BuildRequires: openssl-devel
+%endif
%description auth-ephemeral
Functions for authentication using ephemeral credentials.
@@ -365,9 +375,14 @@ Requires: openssl
BuildRequires: openssl-devel
%endif
%if 0%{?rhel} == 7
+%if %{with openssl11}
+Requires: openssl11-libs
+BuildRequires: openssl11-devel
+%else
Requires: openssl-libs
BuildRequires: openssl-devel
%endif
+%endif
%if 0%{?fedora}
Requires: openssl-libs
BuildRequires: openssl-devel
@@ -673,8 +688,13 @@ MySQL database connectivity for Kamailio.
%package outbound
Summary: Outbound (RFC 5626) support for Kamailio
Group: %{PKGGROUP}
+%if 0%{?rhel} == 7 && %{with openssl11}
+Requires: openssl11, kamailio = %ver
+BuildRequires: openssl11-devel
+%else
Requires: openssl, kamailio = %ver
BuildRequires: openssl-devel
+%endif
%description outbound
RFC 5626, "Managing Client-Initiated Connections in the Session Initiation
@@ -952,8 +972,13 @@ SQLite database connectivity for Kamailio.
%package tls
Summary: TLS transport for Kamailio
Group: %{PKGGROUP}
+%if 0%{?rhel} == 7 && %{with openssl11}
+Requires: openssl11, kamailio = %ver
+BuildRequires: openssl11-devel
+%else
Requires: openssl, kamailio = %ver
BuildRequires: openssl-devel
+%endif
%description tls
TLS transport for Kamailio.
@@ -1008,8 +1033,13 @@ Non-SIP utitility functions for Kamailio.
%package websocket
Summary: WebSocket transport for Kamailio
Group: %{PKGGROUP}
+%if 0%{?rhel} == 7 && %{with openssl11}
+Requires: libunistring, openssl11, kamailio = %ver
+BuildRequires: libunistring-devel, openssl11-devel
+%else
Requires: libunistring, openssl, kamailio = %ver
BuildRequires: libunistring-devel, openssl-devel
+%endif
%description websocket
WebSocket transport for Kamailio.
@@ -1106,6 +1136,9 @@ make cfg prefix=/usr \
make
make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
jabber ndb_cassandra osp" \
+%if %{with openssl11}
+ SSL_BUILDER="pkg-config libssl11" \
+%endif
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
FREERADIUS=1 \
%endif
@@ -1201,6 +1234,9 @@ rm -rf %{buildroot}
make install
make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
iptrtpproxy jabber osp" \
+%if %{with openssl11}
+ SSL_BUILDER="pkg-config libssl11" \
+%endif
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
FREERADIUS=1 \
%endif