From: Sebastian Kemper Date: Wed, 2 Oct 2019 19:22:44 +0000 (+0200) Subject: rtpproxy: update to current snapshot X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6280803f1cd5ca664f5fb9fb4ac6ecedc3b5ba3c;p=feed%2Ftelephony.git rtpproxy: update to current snapshot Upstream accepted OpenWrt patches, so most can be removed. Other changes: - version handling changed to use PKG_SOURCE_DATE and PKG_SOURCE_VERSION as per OpenWrt package policies [1] - ./files/rtpproxy.config renamed to ./files/rtpproxy.conf also as per OpenWrt package policies [1] - no longer needed Makefile variables dropped (PKG_SOURCE_SUBDIR etc.) - PKG_CHECK_FORMAT_SECURITY:=0 dropped, patch for that upstreamed as well - PKG_BUILD_PARALLEL:=1 added - PKG_LICENSE_FILES updated - dropped bcg729 deactivation hack (fixed by adding bcg729 pkg-config file in other commit) - dependency on libatomic now required - updated rtpproxy-mod-acct-csv TITLE - added --without-xsltproc to CONFIGURE_ARGS to prevent build failure - added new module rtpproxy-mod-acct-rtcp-hep - added utilities extractaudio and makeann - updated patch to prevent debug build of rtpp_acct_rtcp_hep [1] https://openwrt.org/docs/guide-developer/package-policies Signed-off-by: Sebastian Kemper --- diff --git a/net/rtpproxy/Makefile b/net/rtpproxy/Makefile index 4ff92cc..aef54ac 100644 --- a/net/rtpproxy/Makefile +++ b/net/rtpproxy/Makefile @@ -9,24 +9,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rtpproxy -PKG_VERSION:=2.1.0-20170914 -PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/sippy/rtpproxy.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=589cc78cb8698b49aa408c6411c8720a2a0efe3c -PKG_MIRROR_HASH:=087b363a7e5f112fe0c601e147ac087f528a500a25340cbccc12d90935876137 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz +PKG_SOURCE_DATE=2019-10-02 +PKG_SOURCE_VERSION:=aa1f179e09097f467bc4726e3300014c1e35246f +PKG_RELEASE:=1 +PKG_MIRROR_HASH:=7acc5f5bf2d4be23e9a2fad0c4e7576f172191c9f1b37104aee4d05dbdcac8fd -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CHECK_FORMAT_SECURITY:=0 +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=COPYING +PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jiri Slachta include $(INCLUDE_DIR)/package.mk @@ -40,7 +37,7 @@ endef define Package/rtpproxy $(call Package/rtpproxy/Default) - DEPENDS:=+libpthread +librt + DEPENDS:=+libatomic +libpthread +librt TITLE:=RTP (Realtime Transport Protocol) proxy MENU:=1 endef @@ -53,11 +50,17 @@ endef define Package/rtpproxy-mod-acct-csv $(call Package/rtpproxy/Default) DEPENDS:=rtpproxy - TITLE:=RTPproxy accounting module + TITLE:=RTPproxy CSV accounting module endef -CONFIGURE_VARS += \ - ac_cv_lib_bcg729_initBcg729EncoderChannel=no +define Package/rtpproxy-mod-acct-rtcp-hep +$(call Package/rtpproxy/Default) + DEPENDS:=rtpproxy + TITLE:=RTPproxy RTCP HEP accounting module +endef + +CONFIGURE_ARGS += \ + --without-xsltproc # Otherwise OpenWrt's CPPFLAGS are ignored TARGET_CFLAGS+=$(TARGET_CPPFLAGS) @@ -70,7 +73,7 @@ define Package/rtpproxy/install $(INSTALL_BIN) ./files/rtpproxy.init $(1)/etc/init.d/rtpproxy $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/rtpproxy.config $(1)/etc/config/rtpproxy + $(INSTALL_CONF) ./files/rtpproxy.conf $(1)/etc/config/rtpproxy $(INSTALL_DIR) $(1)/etc/hotplug.d/iface $(INSTALL_BIN) ./files/rtpproxy.hotplug $(1)/etc/hotplug.d/iface/90-rtpproxy @@ -96,5 +99,30 @@ define Package/rtpproxy-mod-acct-csv/install $(1)/usr/lib/rtpproxy endef +define Package/rtpproxy-mod-acct-rtcp-hep/install + $(INSTALL_DIR) $(1)/usr/lib/rtpproxy + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/rtpproxy/rtpp_acct_rtcp_hep.so \ + $(1)/usr/lib/rtpproxy +endef + +define Package/$(PKG_NAME)/Util + define Package/$(PKG_NAME)-util-$(1) + $(call Package/$(PKG_NAME)/Default) + DEPENDS:= $(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-util-$(1):%,$(2)) + TITLE:=RTPproxy $(1) utility + endef + + define Package/$(PKG_NAME)-util-$(1)/install + $$(INSTALL_DIR) $$(1)/usr/bin + $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin + endef + + $$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(1))) +endef + $(eval $(call BuildPackage,rtpproxy)) $(eval $(call BuildPackage,rtpproxy-mod-acct-csv)) +$(eval $(call BuildPackage,rtpproxy-mod-acct-rtcp-hep)) +$(eval $(call Package/$(PKG_NAME)/Util,extractaudio,+bcg729 +libsndfile +libsrtp2)) +$(eval $(call Package/$(PKG_NAME)/Util,makeann,+bcg729)) diff --git a/net/rtpproxy/files/rtpproxy.conf b/net/rtpproxy/files/rtpproxy.conf new file mode 100644 index 0000000..afcf1b2 --- /dev/null +++ b/net/rtpproxy/files/rtpproxy.conf @@ -0,0 +1,23 @@ +config rtpproxy global + option enabled 0 # 0 - disabled, 1 - enabled + +config instance 'site1' + option socket 'udp:127.0.0.1:7723' # socket + option ipaddr '127.0.0.1' # IPv4 address + option ip6addr '2001:0db8:0000:0000:0000:0000:1428:57ab' # IPv6 address + option user 'nobody' # userid to run rtpproxy instance from + option log_level 'INFO' # DBUG, INFO, WARN, ERR or CRIT + option opts '' # additional options for rtpproxy instance + +config instance 'site2' + option socket 'udp:127.0.0.1:7724' + option ipaddr 'lan/wan' # Bridge mode. 'lan' and 'wan' will be + option user 'nobody' # translated to IPv4 addresses by init + option log_level 'DBUG' # script. Handy if using dynamic IPs. Can + option opts '' # also be used with single interfaces. + # Translation for both 'ipaddr' and + # 'ip6addr' supported. + +config rtpproxy 'hotplug' + #option interface 'wan' # uncomment to enable hotplug + diff --git a/net/rtpproxy/files/rtpproxy.config b/net/rtpproxy/files/rtpproxy.config deleted file mode 100644 index afcf1b2..0000000 --- a/net/rtpproxy/files/rtpproxy.config +++ /dev/null @@ -1,23 +0,0 @@ -config rtpproxy global - option enabled 0 # 0 - disabled, 1 - enabled - -config instance 'site1' - option socket 'udp:127.0.0.1:7723' # socket - option ipaddr '127.0.0.1' # IPv4 address - option ip6addr '2001:0db8:0000:0000:0000:0000:1428:57ab' # IPv6 address - option user 'nobody' # userid to run rtpproxy instance from - option log_level 'INFO' # DBUG, INFO, WARN, ERR or CRIT - option opts '' # additional options for rtpproxy instance - -config instance 'site2' - option socket 'udp:127.0.0.1:7724' - option ipaddr 'lan/wan' # Bridge mode. 'lan' and 'wan' will be - option user 'nobody' # translated to IPv4 addresses by init - option log_level 'DBUG' # script. Handy if using dynamic IPs. Can - option opts '' # also be used with single interfaces. - # Translation for both 'ipaddr' and - # 'ip6addr' supported. - -config rtpproxy 'hotplug' - #option interface 'wan' # uncomment to enable hotplug - diff --git a/net/rtpproxy/patches/100-no-sysctl-on-musl.patch b/net/rtpproxy/patches/100-no-sysctl-on-musl.patch deleted file mode 100644 index f337733..0000000 --- a/net/rtpproxy/patches/100-no-sysctl-on-musl.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: rtpproxy-2.0.0/src/rtpp_util.c -=================================================================== ---- rtpproxy-2.0.0.orig/src/rtpp_util.c -+++ rtpproxy-2.0.0/src/rtpp_util.c -@@ -28,7 +28,9 @@ - - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - #include - #include - #include diff --git a/net/rtpproxy/patches/101-include-endian-h.patch b/net/rtpproxy/patches/101-include-endian-h.patch deleted file mode 100644 index 4a4b390..0000000 --- a/net/rtpproxy/patches/101-include-endian-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: rtpproxy-2.0.0/src/rtp.h -=================================================================== ---- rtpproxy-2.0.0.orig/src/rtp.h -+++ rtpproxy-2.0.0/src/rtp.h -@@ -29,6 +29,8 @@ - #ifndef _RTP_H_ - #define _RTP_H_ - -+#include -+ - /* - * RTP payload types - */ diff --git a/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch b/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch index 2c8d784..ba0ff6c 100644 --- a/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch +++ b/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch @@ -1,16 +1,32 @@ --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -1,4 +1,4 @@ +@@ -5,7 +5,7 @@ include $(top_srcdir)/autosrc/Makefile.a + + UCL_DIR=$(top_srcdir)/external/libucl + -bin_PROGRAMS=rtpproxy rtpproxy_debug +bin_PROGRAMS=rtpproxy - BASE_SOURCES=main.c rtp.h rtpp_server.c rtpp_server.h \ - rtpp_defines.h rtpp_log.h rtpp_record.c rtpp_record.h rtpp_session.h \ - rtpp_util.c rtpp_util.h rtp.c rtp_resizer.c rtp_resizer.h rtpp_session.c \ + noinst_PROGRAMS = rtpp_rzmalloc_perf rtpp_fintest + + if BUILD_OBJCK --- a/modules/acct_csv/Makefile.am +++ b/modules/acct_csv/Makefile.am -@@ -1,4 +1,4 @@ +@@ -1,6 +1,6 @@ + include $(top_srcdir)/m4/memdeb.ami + -pkglib_LTLIBRARIES = rtpp_acct_csv.la rtpp_acct_csv_debug.la +pkglib_LTLIBRARIES = rtpp_acct_csv.la rtpp_acct_csv_la_SOURCES = rtpp_acct_csv.c rtpp_acct_csv_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +--- a/modules/acct_rtcp_hep/Makefile.am ++++ b/modules/acct_rtcp_hep/Makefile.am +@@ -3,7 +3,7 @@ include $(top_srcdir)/m4/memdeb.ami + HEPSRCDIR=$(top_srcdir)/hepconnector + UCLSRCDIR=$(top_srcdir)/external/libucl + +-pkglib_LTLIBRARIES = rtpp_acct_rtcp_hep.la rtpp_acct_rtcp_hep_debug.la ++pkglib_LTLIBRARIES = rtpp_acct_rtcp_hep.la + + noinst_PROGRAMS = rtcp2json_test + rtcp2json_test_SOURCES = rtcp2json_test.c rtpp_sbuf.c rtcp2json.c diff --git a/net/rtpproxy/patches/103-add-missing-includes.patch b/net/rtpproxy/patches/103-add-missing-includes.patch deleted file mode 100644 index 57bb163..0000000 --- a/net/rtpproxy/patches/103-add-missing-includes.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/src/rtpp_record.c -+++ b/src/rtpp_record.c -@@ -48,6 +48,7 @@ - #include - #include - -+#include "config.h" - #include "rtp.h" - #include "rtp_packet.h" - #include "rtpp_log.h" -@@ -67,6 +68,7 @@ - #include "rtpp_session.h" - #include "rtpp_stream.h" - #include "rtpp_time.h" -+#include "rtpp_util.h" - #include "rtpp_pipe.h" - #include "rtpp_netaddr.h" - ---- a/modules/acct_csv/rtpp_acct_csv.c -+++ b/modules/acct_csv/rtpp_acct_csv.c -@@ -38,6 +38,7 @@ - #include - #include - -+#include "config.h" - #include "rtpp_ssrc.h" - #include "rtpa_stats.h" - #include "rtpp_monotime.h" -@@ -50,6 +51,7 @@ - #include "rtpp_module.h" - #include "rtpp_netaddr.h" - #include "rtpp_network.h" -+#include "rtpp_util.h" - #include "rtpp_cfg_stable.h" - - #define SSRC_STRLEN 11