siproxd: update to version 0.8.3, improve logging and memory usage 567/head
authorTony Ambardar <itugrok@yahoo.com>
Sun, 30 Aug 2020 06:21:35 +0000 (23:21 -0700)
committerTony Ambardar <itugrok@yahoo.com>
Sat, 5 Sep 2020 05:38:33 +0000 (22:38 -0700)
This release includes bug fixes and improvements accumulated over the last
4 years of development snapshots [1].

Bump upstream version, build new plugins 'stats' and 'blacklist', and add
an 'sqlite3' package dependency for siproxd-mod-blacklist.

Disable procd capturing stderr to syslog, since siproxd in 'foreground'
mode writes both to syslog and stderr, duplicating log messages.

Include a patch to drastically reduce memory usage (RSS from 17MB to 5MB
on ipq40xx platform):

  * 005-reduce-rtpproxy-urlmap-size.patch

Drop the following patches now included upstream:

  * 010-syslog-msg.patch
  * 020-gcc10.patch
  * 100-musl-compat.patch

[1] http://siproxd.sourceforge.net/index.php?op=changelog.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
net/siproxd/Makefile
net/siproxd/files/siproxd.init
net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch [new file with mode: 0644]
net/siproxd/patches/010-syslog-msg.patch [deleted file]
net/siproxd/patches/020-gcc10.patch [deleted file]
net/siproxd/patches/100-musl-compat.patch [deleted file]

index b7a603aecd49fa2bb6bf1c49fdf12f8b5fcb7946..30a4c11bff84bbd2beedd1cdd4cadde34ac748fe 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=siproxd
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=6
+PKG_VERSION:=0.8.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/siproxd
-PKG_HASH:=526ce491b0cc189e2766c62432aff3ebb995e551d7261ea32c02a90c7bf7ccd0
+PKG_HASH:=9a6d7a6bb6fff162775b1e1fb7018de9c69642cbf8626185dc6ffceeeba07736
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -67,7 +67,7 @@ define BuildPlugin
   define Package/siproxd-mod-$(subst _,-,$(1))
     $$(call Package/siproxd/Default)
     TITLE:= siproxd $(1) plugin
-    DEPENDS:=siproxd
+    DEPENDS:=siproxd $(2)
   endef
 
   define Package/siproxd-mod-$(subst _,-,$(1))/install
@@ -79,6 +79,7 @@ define BuildPlugin
 endef
 
 $(eval $(call BuildPackage,siproxd))
+$(eval $(call BuildPlugin,blacklist,+libsqlite3))
 $(eval $(call BuildPlugin,codecfilter))
 $(eval $(call BuildPlugin,defaulttarget))
 $(eval $(call BuildPlugin,demo))
@@ -89,6 +90,7 @@ $(eval $(call BuildPlugin,logcall))
 $(eval $(call BuildPlugin,prefix))
 $(eval $(call BuildPlugin,regex))
 $(eval $(call BuildPlugin,shortdial))
+$(eval $(call BuildPlugin,stats))
 $(eval $(call BuildPlugin,stripheader))
 $(eval $(call BuildPlugin,stun))
 $(eval $(call BuildPlugin,siptrunk))
index 7d5b003c19af761926e2e520211ed989ece93923..a8b86f7e50355132d64473f546af7a82f6b79b06 100644 (file)
@@ -110,7 +110,6 @@ section_end() {
        procd_set_param command "$PROG" --config "$conf_file"
        procd_set_param pidfile "$pid_file"
        procd_set_param respawn
-       procd_set_param stderr 1
        procd_add_jail siproxd log
        procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /dev/null
        procd_add_jail_mount "$conf_file"
diff --git a/net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch b/net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch
new file mode 100644 (file)
index 0000000..43587c5
--- /dev/null
@@ -0,0 +1,19 @@
+diff -urN siproxd-0.8.3/src/siproxd.h siproxd-0.8.3-patch/src/siproxd.h
+--- siproxd-0.8.3/src/siproxd.h        2019-11-09 09:42:04.000000000 -0800
++++ siproxd-0.8.3-patch/src/siproxd.h  2020-09-04 20:02:47.961246801 -0700
+@@ -282,13 +282,13 @@
+ #define TCP_IDLE_TO   300     /* TCP connection idle timeout in seconds */
+ #define TCP_CONNECT_TO        500     /* TCP connect() timeout in msec */
+-#define URLMAP_SIZE   512     /* number of URL mapping table entries  */
++#define URLMAP_SIZE   128     /* number of URL mapping table entries  */
+                               /* this limits the number of clients!   */
+ #define SOURCECACHE_SIZE 256  /* number of return addresses           */
+ #define DEJITTERLIMIT 1500000 /* max value for dejitter configuration */
+-#define RTPPROXY_SIZE 1024    /* number of rtp proxy entries          */
++#define RTPPROXY_SIZE 256     /* number of rtp proxy entries          */
+                               /* this limits the number of calls!     */
+ #define BUFFER_SIZE   8196    /* input buffer for read from socket    */
diff --git a/net/siproxd/patches/010-syslog-msg.patch b/net/siproxd/patches/010-syslog-msg.patch
deleted file mode 100644 (file)
index 0e00e0b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/log.c
-+++ b/src/log.c
-@@ -77,7 +77,7 @@
- static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
- void log_init(void) {
--   openlog(NULL,LOG_NDELAY|LOG_PID,LOG_DAEMON);
-+   openlog("siproxd",LOG_NDELAY|LOG_PID,LOG_DAEMON);
- }
- void log_end(void) {
-@@ -257,7 +257,7 @@
-    va_copy(ap_copy, ap);
-    vsnprintf(outbuf, sizeof(outbuf), format, ap_copy);
-    va_end(ap_copy);
--   syslog(LOG_USER|level, "%s:%i %s%s", file, line, label, outbuf);
-+   syslog(LOG_DAEMON|level, "%s:%i %s%s", file, line, label, outbuf);
-    return;
- }
diff --git a/net/siproxd/patches/020-gcc10.patch b/net/siproxd/patches/020-gcc10.patch
deleted file mode 100644 (file)
index f8be5cd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/accessctl.c
-+++ b/src/accessctl.c
-@@ -34,7 +34,7 @@
- static char const ident[]="$Id: accessctl.c 521 2015-09-13 08:43:04Z hb9xar $";
- /* configuration storage */
--struct siproxd_config configuration;
-+extern struct siproxd_config configuration;
- /*
diff --git a/net/siproxd/patches/100-musl-compat.patch b/net/siproxd/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index 8d7bf8e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/resolve.c
-+++ b/src/resolve.c
-@@ -28,8 +28,10 @@
- #include <arpa/nameser_compat.h>
- #endif
-+#include <stdio.h>
- #include <resolv.h>
- #include <string.h>
-+#include <sys/types.h>
- #include "log.h"