From ed8d33050400aa9438b70de3b96e74942143339b Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 2 Nov 2023 23:36:52 +0100 Subject: [PATCH] rtpengine: bump to 11.5.1.12 release and set PCRE2 Bump rtpengine to release 11.5.1.12. New 11.x release require libopus as a new library and also moved to PCRE2 library. Refresh patches and also introduce a new one to disable docs as they changed doc generation tool and now would require a new prereq and docs are not useful and would waste space on an embedded scenario. For recording module libcurl is also now required. Signed-off-by: Christian Marangi --- net/rtpengine/Makefile | 12 +++-- net/rtpengine/patches/05-use-spandsp3.patch | 8 +-- ...-fix-compilation-with-iptables-1-8-8.patch | 30 ----------- ...cally-allocate-buffer-for-kernel-mod.patch | 54 +++++++++++-------- net/rtpengine/patches/08-no-docs.patch | 43 +++++++++++++++ 5 files changed, 86 insertions(+), 61 deletions(-) delete mode 100644 net/rtpengine/patches/06-fix-compilation-with-iptables-1-8-8.patch create mode 100644 net/rtpengine/patches/08-no-docs.patch diff --git a/net/rtpengine/Makefile b/net/rtpengine/Makefile index fdd396c..ec1aacf 100644 --- a/net/rtpengine/Makefile +++ b/net/rtpengine/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=rtpengine -PKG_VERSION:=10.5.2.6 -PKG_RELEASE:=3 +PKG_VERSION:=11.5.1.12 +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:=6f6d5cc2ebf27b6361ed2bd2f86a0ca74103503fd1a14af69ed423dba8340bc4 +PKG_HASH:=76a16d00926838cdb16b0004043c2476115b8481f85eff454d5134204c780d47 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-mr$(PKG_VERSION) @@ -48,8 +48,9 @@ ENGINE_DEPENDS := \ +libmosquitto \ +libopenssl \ +libpcap \ - +libpcre \ + +libpcre2 \ +libwebsockets-openssl \ + +libopus \ +xmlrpc-c-client \ +zlib @@ -65,7 +66,8 @@ RECORDING_DEPENDS := \ +glib2 \ +libffmpeg-full \ +libmariadb \ - +libopenssl + +libopenssl \ + +libcurl RTPENGINE_USERID:=378 RTPENGINE_GROUPID:=$(RTPENGINE_USERID) diff --git a/net/rtpengine/patches/05-use-spandsp3.patch b/net/rtpengine/patches/05-use-spandsp3.patch index cb37112..1e75359 100644 --- a/net/rtpengine/patches/05-use-spandsp3.patch +++ b/net/rtpengine/patches/05-use-spandsp3.patch @@ -1,20 +1,20 @@ --- a/daemon/Makefile +++ b/daemon/Makefile -@@ -30,7 +30,7 @@ CFLAGS+= $(shell pkg-config --cflags lib +@@ -32,7 +32,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+= $(shell pkg-config --cflags opus) CFLAGS+= -DWITH_TRANSCODING CFLAGS+= $(shell mysql_config --cflags) - else -@@ -65,7 +65,7 @@ LDLIBS+= $(shell pkg-config --libs libav +@@ -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 pkg-config --libs opus) LDLIBS+= $(shell mysql_config --libs) endif - diff --git a/net/rtpengine/patches/06-fix-compilation-with-iptables-1-8-8.patch b/net/rtpengine/patches/06-fix-compilation-with-iptables-1-8-8.patch deleted file mode 100644 index 1b92b59..0000000 --- a/net/rtpengine/patches/06-fix-compilation-with-iptables-1-8-8.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 2a6d5cd2cbb58c1cab271a65a76decfdbc11dcd7 Mon Sep 17 00:00:00 2001 -From: Nick Hainke -Date: Wed, 8 Jun 2022 09:30:44 +0200 -Subject: [PATCH] fix compilation with iptables 1.8.8 - -The extension handling changed [0,1]. Fix compilation with iptables -1.8.8 [2]. - -[0] - https://git.netfilter.org/iptables/commit/?id=ef108943f69a6e20533d58823740d3f0534ea8ec -[1] - https://git.netfilter.org/iptables/commit/?id=6c689b639cf8e2aeced8685eca2915892d76ad86 -[2] - openwrt/openwrt#9886 - -Signed-off-by: Nick Hainke ---- - iptables-extension/libxt_RTPENGINE.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/iptables-extension/libxt_RTPENGINE.c -+++ b/iptables-extension/libxt_RTPENGINE.c -@@ -5,6 +5,10 @@ - #include - #include - -+#ifndef _init -+#define _init __attribute__((constructor)) _INIT -+#endif -+ - #if defined(__ipt) - #include - #elif defined(__ip6t) diff --git a/net/rtpengine/patches/07-always-dynamically-allocate-buffer-for-kernel-mod.patch b/net/rtpengine/patches/07-always-dynamically-allocate-buffer-for-kernel-mod.patch index 6f42c17..daeb5c3 100644 --- a/net/rtpengine/patches/07-always-dynamically-allocate-buffer-for-kernel-mod.patch +++ b/net/rtpengine/patches/07-always-dynamically-allocate-buffer-for-kernel-mod.patch @@ -1,36 +1,46 @@ --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c -@@ -3455,14 +3455,11 @@ static inline ssize_t proc_control_read_ - struct inode *inode; - uint32_t id; +@@ -3781,7 +3781,6 @@ static inline ssize_t proc_control_read_ struct rtpengine_table *t; -- struct rtpengine_message msgbuf; - struct rtpengine_message *msg; int err; + enum rtpengine_command cmd; +- char scratchbuf[512]; + size_t readlen, writelen, writeoffset; + int i; - if (buflen < sizeof(*msg)) - return -EIO; -- if (buflen == sizeof(*msg)) -- msg = &msgbuf; - else { /* > */ - msg = kmalloc(buflen, GFP_KERNEL); - if (!msg) -@@ -3559,16 +3556,14 @@ static inline ssize_t proc_control_read_ - goto out; +@@ -3823,13 +3822,9 @@ static inline ssize_t proc_control_read_ + return -ERANGE; + + // do we need an extra large storage buffer? +- if (buflen > sizeof(scratchbuf)) { +- msg.storage = kmalloc(buflen, GFP_KERNEL); +- if (!msg.storage) +- return -ENOMEM; +- } +- else +- msg.storage = scratchbuf; ++ msg.storage = kmalloc(buflen, GFP_KERNEL); ++ if (!msg.storage) ++ return -ENOMEM; + + // get our table + inode = file->f_path.dentry->d_inode; +@@ -3942,16 +3937,14 @@ static inline ssize_t proc_control_read_ + goto err_free; } -- if (msg != &msgbuf) -- kfree(msg); -+ kfree(msg); +- if (msg.storage != scratchbuf) +- kfree(msg.storage); ++ kfree(msg.storage); return buflen; - err: + err_table_free: table_put(t); - out: -- if (msg != &msgbuf) -- kfree(msg); -+ kfree(msg); + err_free: +- if (msg.storage != scratchbuf) +- kfree(msg.storage); ++ kfree(msg.storage); return err; } static ssize_t proc_control_write(struct file *file, const char __user *ubuf, size_t buflen, loff_t *off) { diff --git a/net/rtpengine/patches/08-no-docs.patch b/net/rtpengine/patches/08-no-docs.patch new file mode 100644 index 0000000..b93af2b --- /dev/null +++ b/net/rtpengine/patches/08-no-docs.patch @@ -0,0 +1,43 @@ +--- a/lib/common.Makefile ++++ b/lib/common.Makefile +@@ -34,12 +34,6 @@ $(DAEMONSRCS) $(HASHSRCS): $(patsubst %, + echo '#line 1' && \ + cat ../daemon/"$@" ) > "$@" + +-%.8: ../docs/%.md +- cat "$<" | sed '/^# /d; s/^##/#/' | \ +- pandoc -s -t man \ +- -M "footer:$(RTPENGINE_VERSION)" \ +- -M "date:$(BUILD_DATE)" \ +- -o "$@" + + resample.c codeclib.strhash.c mix.c packet.c: fix_frame_channel_layout.h + +--- a/daemon/Makefile ++++ b/daemon/Makefile +@@ -93,11 +93,8 @@ LIBASM= mvr2s_x64_avx2.S mvr2s_x64_avx5 + endif + OBJS= $(SRCS:.c=.o) $(LIBSRCS:.c=.o) $(LIBASM:.S=.o) + +-MDS= rtpengine.ronn +-MANS= $(MDS:.ronn=.8) + + include ../lib/common.Makefile + + install: $(TARGET) $(MANS) + install -m 0755 -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET) +- install -m 0644 -D $(TARGET).8 $(DESTDIR)/usr/share/man/man8/$(TARGET).8 +--- a/recording-daemon/Makefile ++++ b/recording-daemon/Makefile +@@ -39,11 +39,8 @@ LIBSRCS= loglib.c auxlib.c rtplib.c code + LIBASM= mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S + OBJS= $(SRCS:.c=.o) $(LIBSRCS:.c=.o) $(LIBASM:.S=.o) + +-MDS= rtpengine-recording.ronn +-MANS= $(MDS:.ronn=.8) + + include ../lib/common.Makefile + + install: $(TARGET) $(MANS) + install -m 0755 -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET) +- install -m 0644 -D $(TARGET).8 $(DESTDIR)/usr/share/man/man8/$(TARGET).8 -- 2.30.2