[sr-dev] git:master:ecc2cc69: pkg: enable RHEL7-like distros to build with OpenSSL 1.1.1

sergey-safarov s.safarov at gmail.com
Fri Jun 18 14:56:44 CEST 2021


Module: kamailio
Branch: master
Commit: ecc2cc69b08e797ca954af233c229ed44475ce33
URL: https://github.com/kamailio/kamailio/commit/ecc2cc69b08e797ca954af233c229ed44475ce33

Author: SPChan <shihping.chan at gmail.com>
Committer: sergey-safarov <s.safarov at gmail.com>
Date: 2021-06-18T15:56:41+03:00

pkg: enable RHEL7-like distros to build with OpenSSL 1.1.1

---

Modified: pkg/kamailio/obs/kamailio.spec

---

Diff:  https://github.com/kamailio/kamailio/commit/ecc2cc69b08e797ca954af233c229ed44475ce33.diff
Patch: https://github.com/kamailio/kamailio/commit/ecc2cc69b08e797ca954af233c229ed44475ce33.patch

---

diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec
index 8e9483bada..b68df0eef5 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




More information about the sr-dev mailing list