rtpengine: bump to LTS version 9.5.1.3 679/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 28 Aug 2021 23:10:46 +0000 (01:10 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 29 Aug 2021 10:34:46 +0000 (12:34 +0200)
This

 - updates the dependencies
 - makes rtpengine use spandsp3 (it supports this version now)
 - fixes /etc/modules.d/ipt-rtpengine (needs user and group ids instead
   of names)
 - adds user as well when kmod is installed so that abovementioned user
   and group ids are available
 - adds /etc/modules.d/ipt-rtpengine to conffiles
 - removes 01-cflags.patch since upstream fixed the flag handling
 - removes 200-openssl-deprecated.patch as it was integrated upstream

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/rtpengine/Makefile
net/rtpengine/patches/01-cflags.patch [deleted file]
net/rtpengine/patches/05-use-spandsp3.patch [new file with mode: 0644]
net/rtpengine/patches/200-openssl-deprecated.patch [deleted file]

index e03169838f3ecc5ce7258c12a61a15516bd2c650..e35b511284338f68be1da7bdaffe5919d862b791 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=rtpengine
-PKG_VERSION:=8.5.3.3
+PKG_VERSION:=9.5.1.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-mr$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/sipwise/rtpengine/tar.gz/mr$(PKG_VERSION)?
-PKG_HASH:=754711a46fc50001b2e840521d3b6fd654cb2f9da11924ca40d8e165fba6bd98
+PKG_HASH:=c9b07f120703429351abc120da71e4e72d4d9b8d72ec689a3cd61ab3030545c6
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-mr$(PKG_VERSION)
 
@@ -48,6 +48,7 @@ ENGINE_DEPENDS := \
        +libopenssl \
        +libpcap \
        +libpcre \
+       +libwebsockets \
        +xmlrpc-c-client \
        +zlib
 
@@ -56,15 +57,18 @@ ENGINE_DEPENDS_TRANSCODING := \
        +bcg729 \
        +libffmpeg-full \
        +libmariadb \
-       +libspandsp
+       +libspandsp3
 
 RECORDING_DEPENDS := \
+       +bcg729 \
        +glib2 \
        +libffmpeg-full \
        +libmariadb \
        +libopenssl
 
-RTPENGINE_USERID:=$(PKG_NAME)=378:$(PKG_NAME)=378
+RTPENGINE_USERID:=378
+RTPENGINE_GROUPID:=$(RTPENGINE_USERID)
+RTPENGINE_USER:=$(PKG_NAME)=$(RTPENGINE_USERID):$(PKG_NAME)=$(RTPENGINE_GROUPID)
 
 define Package/rtpengine/Default
   URL:=https://github.com/sipwise/rtpengine
@@ -76,7 +80,7 @@ $(call Package/rtpengine/Default)
   CATEGORY:=Network
   SECTION:=net
   SUBMENU:=Telephony
-  USERID:=$(RTPENGINE_USERID)
+  USERID:=$(RTPENGINE_USER)
 endef
 
 define Package/rtpengine/description/Template
@@ -155,7 +159,7 @@ $(call Package/rtpengine/Default)
   CATEGORY:=Network
   SECTION:=net
   SUBMENU:=Telephony
-  USERID:=$(RTPENGINE_USERID)
+  USERID:=$(RTPENGINE_USER)
   DEPENDS:=$(patsubst +%,+PACKAGE_rtpengine-recording:%,$(RECORDING_DEPENDS))
 endef
 
@@ -206,11 +210,17 @@ $(call Package/rtpengine/Default)
   FILES:=$(PKG_BUILD_DIR)/kernel-module/xt_RTPENGINE.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoProbe,xt_RTPENGINE)
   DEPENDS := \
+         +PACKAGE_kmod-ipt-rtpengine:kmod-crypto-aead \
          +PACKAGE_kmod-ipt-rtpengine:kmod-crypto-hash \
          +PACKAGE_kmod-ipt-rtpengine:kmod-ipt-core
   MODPARAMS.xt_RTPENGINE := \
-         proc_uid=$(PKG_NAME) \
-         proc_gid=$(PKG_NAME)
+         proc_uid=$(RTPENGINE_USERID) \
+         proc_gid=$(RTPENGINE_GROUPID)
+  USERID:=$(RTPENGINE_USER)
+endef
+
+define KernelPackage/ipt-rtpengine/conffiles
+/etc/modules.d/ipt-rtpengine
 endef
 
 define KernelPackage/ipt-rtpengine/description
diff --git a/net/rtpengine/patches/01-cflags.patch b/net/rtpengine/patches/01-cflags.patch
deleted file mode 100644 (file)
index 6fe985a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/lib/lib.Makefile
-+++ b/lib/lib.Makefile
-@@ -62,3 +62,6 @@ ifneq ($(DBG),yes)
-     LDLIBS+=  $(shell dpkg-buildflags --get LDLIBS)
-   endif
- endif
-+
-+CFLAGS+=$(OpenWrt_CFLAGS)
-+LDFLAGS+=$(OpenWrt_LDFLAGS)
---- a/daemon/Makefile
-+++ b/daemon/Makefile
-@@ -1,3 +1,6 @@
-+OpenWrt_CFLAGS:=$(CFLAGS)
-+OpenWrt_LDFLAGS:=$(LDFLAGS)
-+
- TARGET=               rtpengine
- with_iptables_option ?= yes
---- a/recording-daemon/Makefile
-+++ b/recording-daemon/Makefile
-@@ -1,3 +1,6 @@
-+OpenWrt_CFLAGS:=$(CFLAGS)
-+OpenWrt_LDFLAGS:=$(LDFLAGS)
-+
- TARGET=               rtpengine-recording
- CFLAGS=               -g -Wall -Wstrict-prototypes -pthread -I. -I../lib/ -I../kernel-module/
---- a/iptables-extension/Makefile
-+++ b/iptables-extension/Makefile
-@@ -1,3 +1,6 @@
-+OpenWrt_CFLAGS:=$(CFLAGS)
-+OpenWrt_LDFLAGS:=$(LDFLAGS)
-+
- CC?=gcc
- CFLAGS                = -O2 -Wall -Wstrict-prototypes -shared -fPIC
- ifneq ($(RTPENGINE_VERSION),)
-@@ -22,6 +25,9 @@ else
- XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
- endif
-+CFLAGS+=$(OpenWrt_CFLAGS)
-+LDFLAGS+=$(OpenWrt_LDFLAGS)
-+
- IPTABLES      = $(shell test -e /usr/include/iptables.h && echo 1)
- IP6TABLES     = $(shell test -e /usr/include/ip6tables.h && echo 1)
-@@ -37,7 +43,7 @@ WORK=1
- module: libxt_RTPENGINE.so
- libxt_RTPENGINE.so: libxt_RTPENGINE.c
--      $(CC) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c
-+      $(CC) $(LDFLAGS) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c
- else
diff --git a/net/rtpengine/patches/05-use-spandsp3.patch b/net/rtpengine/patches/05-use-spandsp3.patch
new file mode 100644 (file)
index 0000000..cd3cbe3
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -30,7 +30,7 @@ CFLAGS+=     $(shell pkg-config --cflags lib
+ CFLAGS+=      $(shell pkg-config --cflags libavutil)
+ CFLAGS+=      $(shell pkg-config --cflags libswresample)
+ CFLAGS+=      $(shell pkg-config --cflags libavfilter)
+-CFLAGS+=      $(shell pkg-config --cflags spandsp)
++CFLAGS+=      $(shell pkg-config --cflags spandsp3)
+ CFLAGS+=      -DWITH_TRANSCODING
+ CFLAGS+=        $(shell mysql_config --cflags)
+ else
+@@ -68,7 +68,7 @@ LDLIBS+=     $(shell pkg-config --libs libav
+ LDLIBS+=      $(shell pkg-config --libs libavutil)
+ LDLIBS+=      $(shell pkg-config --libs libswresample)
+ LDLIBS+=      $(shell pkg-config --libs libavfilter)
+-LDLIBS+=      $(shell pkg-config --libs spandsp)
++LDLIBS+=      $(shell pkg-config --libs spandsp3)
+ LDLIBS+=        $(shell mysql_config --libs)
+ endif
diff --git a/net/rtpengine/patches/200-openssl-deprecated.patch b/net/rtpengine/patches/200-openssl-deprecated.patch
deleted file mode 100644 (file)
index 2755fb6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/daemon/dtls.c
-+++ b/daemon/dtls.c
-@@ -5,6 +5,8 @@
- #include <glib.h>
- #include <openssl/ssl.h>
- #include <openssl/x509.h>
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <openssl/err.h>
-@@ -239,10 +241,10 @@ static int cert_init(void) {
-       /* cert lifetime */
--      if (!X509_gmtime_adj(X509_get_notBefore(x509), -60*60*24))
-+      if (!X509_gmtime_adj(X509_getm_notBefore(x509), -60*60*24))
-               goto err;
--      if (!X509_gmtime_adj(X509_get_notAfter(x509), CERT_EXPIRY_TIME))
-+      if (!X509_gmtime_adj(X509_getm_notAfter(x509), CERT_EXPIRY_TIME))
-               goto err;
-       /* sign it */
---- a/lib/ssllib.c
-+++ b/lib/ssllib.c
-@@ -35,10 +35,6 @@ static void make_OpenSSL_thread_safe(voi
-       CRYPTO_THREADID_set_callback(cb_openssl_threadid);
-       CRYPTO_set_locking_callback(cb_openssl_lock);
- }
--#else
--static void make_OpenSSL_thread_safe(void) {
--      ;
--}
- #endif
-@@ -46,7 +42,9 @@ void rtpe_ssl_init(void) {
-       struct timespec ts;
-       clock_gettime(CLOCK_REALTIME, &ts);
-       srandom(ts.tv_sec ^ ts.tv_nsec);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-       SSL_library_init();
-       SSL_load_error_strings();
-       make_OpenSSL_thread_safe();
-+#endif
- }