From 8fefafee3ccceb6b07de24596a29ede0a5c0de06 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:10:19 +0200 Subject: [PATCH 1/8] restund: rely on procd for shutdown No need to stop restund manually. Just let procd handle it. Signed-off-by: Sebastian Kemper --- net/restund/files/restund.init | 52 ---------------------------------- 1 file changed, 52 deletions(-) diff --git a/net/restund/files/restund.init b/net/restund/files/restund.init index ee722ca..e899bc1 100644 --- a/net/restund/files/restund.init +++ b/net/restund/files/restund.init @@ -12,7 +12,6 @@ DEFAULT=/etc/default/$DAEMON LOGGER="/usr/bin/logger -p user.err -s -t $DAEMON" OPTIONS= PROG=/usr/sbin/$DAEMON -TIMEOUT=30 [ -f $DEFAULT ] && . $DEFAULT @@ -38,54 +37,3 @@ start_service() { procd_set_param user $DAEMON procd_close_instance } - -stop_service() { - local retval= - local mypid= - local timeout=$TIMEOUT - - pgrep $DAEMON &> /dev/null - [ $? -ne 0 ] && exit 0 - - [ -f /var/run/${DAEMON}.pid ] - retval=$? - - # init script could find itself in a scenario where restund was started - # very recently, so make it wait a while for a pid file to appear - while [ $retval -ne 0 -a $timeout -gt 0 ]; do - sleep 1 - [ -f /var/run/${DAEMON}.pid ] - retval=$? - timeout=$(($timeout-1)) - done - - [ $retval -eq 0 ] || { - $LOGGER PID file does not exist - exit 1 - } - - mypid=$(cat /var/run/${DAEMON}.pid) - - [ "$mypid" -gt 1 ] 2> /dev/null || { - $LOGGER PID file contains garbage - exit 1 - } - - timeout=$TIMEOUT - kill $mypid 2>/dev/null - pgrep $DAEMON | grep -w $mypid &>/dev/null - retval=$? - - while [ $retval -eq 0 -a $timeout -gt 0 ]; do - sleep 10 - pgrep $DAEMON | grep -w $mypid &>/dev/null - retval=$? - [ $retval -eq 0 ] && kill $mypid 2>/dev/null - timeout=$(($timeout-10)) - done - - [ $retval -ne 1 ] && { - $LOGGER Failed to stop $DAEMON - exit 1 - } -} From 697966476913f7bdd1129942605e94695dcc845d Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:11:42 +0200 Subject: [PATCH 2/8] restund: do not disable on upgrade It is not a nice user experience when a package changes configuration files during an upgrade. Remove this from the postinstall routine. Signed-off-by: Sebastian Kemper --- net/restund/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/restund/Makefile b/net/restund/Makefile index fa53d2e..64cf420 100644 --- a/net/restund/Makefile +++ b/net/restund/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=restund PKG_VERSION:=0.4.12 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub @@ -95,11 +95,6 @@ define Package/restund/postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then chown $(PKG_NAME):$(PKG_NAME) /etc/restund.conf - - # Prevent $(PKG_NAME) from auto-starting after an upgrade. The modules may - # not be upgraded yet and the user configuration may need a revision. - sed -i '/^ENABLE_RESTUND="yes"/s/^/#/' \ - /etc/default/$(PKG_NAME) fi exit 0 endef From f45be8a15499d7b67fcec46a6e448702722ca017 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:14:11 +0200 Subject: [PATCH 3/8] baresip: disable ffmpeg support on i386 The ffmpeg full variant does not compile on i386_pentium currently. Disable ffmpeg support on i386 to prevent breakage on the buildbots. Signed-off-by: Sebastian Kemper --- net/baresip/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/baresip/Config.in b/net/baresip/Config.in index cb1c606..24efe8d 100644 --- a/net/baresip/Config.in +++ b/net/baresip/Config.in @@ -3,7 +3,7 @@ menu "bareSIP configuration" config BARESIP_WITH_FFMPEG bool "Compile with FFmpeg support" - default y if (i386||x86_64) + default y if (x86_64) help The sole purpose of this symbol is to prevent that the bareSIP video modules, the ones which depend on FFmpeg, are built by From 0eb77950802bc38bbf92c773927508a39ff309bb Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:17:29 +0200 Subject: [PATCH 4/8] baresip: do not disable on upgrade It is not a nice user experience when a package changes configuration files during an upgrade. Remove this from the postinstall routine. Signed-off-by: Sebastian Kemper --- net/baresip/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/baresip/Makefile b/net/baresip/Makefile index af2e4c8..68ce376 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -146,11 +146,6 @@ if [ -z "$${IPKG_INSTROOT}" ]; then /etc/baresip/accounts \ /etc/baresip/config \ /etc/baresip/contacts - - # Prevent $(PKG_NAME) from auto-starting after an upgrade. The modules may - # not be upgraded yet and the user configuration may need a revision. - sed -i '/^ENABLE_BARESIP="yes"/s/^/#/' \ - /etc/default/$(PKG_NAME) fi exit 0 endef From c6509afd2bb31df156394c50ac3ba4e4c9604564 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:18:46 +0200 Subject: [PATCH 5/8] baresip: rely on procd for shutdown No need to stop baresip manually. Just let procd handle it. Signed-off-by: Sebastian Kemper --- net/baresip/files/baresip.init | 52 ---------------------------------- 1 file changed, 52 deletions(-) diff --git a/net/baresip/files/baresip.init b/net/baresip/files/baresip.init index c18c985..72149be 100644 --- a/net/baresip/files/baresip.init +++ b/net/baresip/files/baresip.init @@ -12,7 +12,6 @@ DEFAULT=/etc/default/$DAEMON LOGGER="/usr/bin/logger -p user.err -s -t $DAEMON" OPTIONS= PROG=/usr/bin/$DAEMON -TIMEOUT=30 [ -f $DEFAULT ] && . $DEFAULT @@ -38,54 +37,3 @@ start_service() { procd_set_param user $DAEMON procd_close_instance } - -stop_service() { - local retval= - local mypid= - local timeout=$TIMEOUT - - pgrep $DAEMON &> /dev/null - [ $? -ne 0 ] && exit 0 - - [ -f /var/run/${DAEMON}.pid ] - retval=$? - - # init script could find itself in a scenario where baresip was started - # very recently, so make it wait a while for a pid file to appear - while [ $retval -ne 0 -a $timeout -gt 0 ]; do - sleep 1 - [ -f /var/run/${DAEMON}.pid ] - retval=$? - timeout=$(($timeout-1)) - done - - [ $retval -eq 0 ] || { - $LOGGER PID file does not exist - exit 1 - } - - mypid=$(cat /var/run/${DAEMON}.pid) - - [ "$mypid" -gt 1 ] 2> /dev/null || { - $LOGGER PID file contains garbage - exit 1 - } - - timeout=$TIMEOUT - kill $mypid 2>/dev/null - pgrep $DAEMON | grep -w $mypid &>/dev/null - retval=$? - - while [ $retval -eq 0 -a $timeout -gt 0 ]; do - sleep 10 - pgrep $DAEMON | grep -w $mypid &>/dev/null - retval=$? - [ $retval -eq 0 ] && kill $mypid 2>/dev/null - timeout=$(($timeout-10)) - done - - [ $retval -ne 1 ] && { - $LOGGER Failed to stop $DAEMON - exit 1 - } -} From a87851451348944d68ce494d25c2932279e1cf45 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:21:36 +0200 Subject: [PATCH 6/8] baresip: amend file permissions The files in /usr/share/baresip are all read-only anyway, so INSTALL_DATA can be used. Use it as well for the included (default) modules, otherwise they'll have different permissions than the extra modules. Signed-off-by: Sebastian Kemper --- net/baresip/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 68ce376..af40b02 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -118,11 +118,11 @@ define Package/baresip/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/lib/baresip/modules - $(INSTALL_BIN) \ + $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/{account,auloop,contact,ice,menu,stun,turn}.so \ $(1)/usr/lib/baresip/modules $(INSTALL_DIR) $(1)/usr/share/baresip - $(CP) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip $(INSTALL_DIR) $(1)/etc/baresip $(INSTALL_CONF) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip $(INSTALL_DIR) $(1)/etc/default From 5c29fde85ca70ff53e3bf4051762b9bbcc8beefe Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:24:09 +0200 Subject: [PATCH 7/8] baresip: update default config This adds two (three, really) sed scripts to update the default configuration. All example accounts are getting disabled/commented. And the module_path is set to the actual path. Signed-off-by: Sebastian Kemper --- net/baresip/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/baresip/Makefile b/net/baresip/Makefile index af40b02..888fea9 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -124,6 +124,8 @@ define Package/baresip/install $(INSTALL_DIR) $(1)/usr/share/baresip $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip $(INSTALL_DIR) $(1)/etc/baresip + $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/docs/examples/accounts + $(SED) '/^#module_path/s|^#||;s|/local||' $(PKG_BUILD_DIR)/docs/examples/config $(INSTALL_CONF) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip $(INSTALL_DIR) $(1)/etc/default $(INSTALL_CONF) ./files/baresip.default $(1)/etc/default/baresip From df294447b14e7dd4668c434e41fcd4028a720f3e Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 Apr 2019 15:27:21 +0200 Subject: [PATCH 8/8] baresip: update to 0.6.2 - echo module is now built by default - natbd, v4l, x264 don't exist anymore Signed-off-by: Sebastian Kemper --- net/baresip/Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 888fea9..a8cafca 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=baresip -PKG_VERSION:=0.6.0 +PKG_VERSION:=0.6.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub -PKG_HASH:=ab3dd329599e4df83eeeb5451b42811598e0171a45a90b34006c5628b61d0764 +PKG_HASH:=e1fae11ea9e6dc861bb2c43d6bef641778945aad86581d58bc4b0ea64b8d28e2 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=docs/COPYING @@ -27,7 +27,6 @@ baresip-mods:= \ avcodec \ avformat \ cons \ - echo \ evdev \ g711 \ g722 \ @@ -41,7 +40,6 @@ baresip-mods:= \ sndfile \ srtp \ stdio \ - v4l \ v4l2 PKG_CONFIG_DEPENDS:= \ @@ -72,7 +70,6 @@ baresip-mod-alsa := USE_ALSA baresip-mod-avcodec := USE_AVCODEC baresip-mod-avformat := USE_AVFORMAT baresip-mod-cons := USE_CONS -baresip-mod-echo := USE_ECHO baresip-mod-evdev := USE_EVDEV baresip-mod-g711 := USE_G711 baresip-mod-g722 := USE_G722 @@ -86,7 +83,6 @@ baresip-mod-rtcpsummary := USE_RTCPSUMMARY baresip-mod-sndfile := USE_SNDFILE baresip-mod-srtp := USE_SRTP baresip-mod-stdio := USE_STDIO -baresip-mod-v4l := USE_V4L baresip-mod-v4l2 := USE_V4L2 BARESIP_MOD_OPTIONS:= \ @@ -94,9 +90,6 @@ BARESIP_MOD_OPTIONS:= \ EXTRA_MODULES="dtmfio" \ $(foreach m,$(baresip-mods),$(baresip-mod-$(m))=$(if $(CONFIG_PACKAGE_baresip-mod-$(subst _,-,$(m))),1)) -# According to upstream baresip can use x264 directly or through ffmpeg. ffmpeg -# is preferred. The possibility to use it directly might even go away in the -# future. So prevent baresip from linking directly to x264. MAKE_FLAGS+= \ CROSS_COMPILE="$(TARGET_CROSS)" \ EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \ @@ -109,8 +102,7 @@ MAKE_FLAGS+= \ RELEASE=1 \ SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \ SYSROOT_ALT="$(STAGING_DIR)/usr" \ - $(BARESIP_MOD_OPTIONS) \ - USE_X264= + $(BARESIP_MOD_OPTIONS) TARGET_CFLAGS+=-D_GNU_SOURCE @@ -201,7 +193,6 @@ $(eval $(call BuildPlugin,g722,G.722 audio codec,g722,+libspandsp)) $(eval $(call BuildPlugin,g726,G.726 audio codec,g726,+libspandsp)) $(eval $(call BuildPlugin,httpd,HTTP webserver UI-module,httpd,)) $(eval $(call BuildPlugin,mwi,Message Waiting Indication,mwi,)) -$(eval $(call BuildPlugin,natbd,NAT Behavior Discovery Module,natbd,)) $(eval $(call BuildPlugin,natpmp,NAT Port Mapping Protocol module,natpmp,)) $(eval $(call BuildPlugin,opus,OPUS Interactive audio codec,opus,+libopus)) $(eval $(call BuildPlugin,oss,OSS audio driver,oss,)) @@ -215,7 +206,6 @@ $(eval $(call BuildPlugin,sndfile,Audio dumper using libsndfile,sndfile,+libsndf $(eval $(call BuildPlugin,srtp,Secure RTP module using libre,srtp,)) $(eval $(call BuildPlugin,stdio,Standard input/output UI driver,stdio,)) $(eval $(call BuildPlugin,uuid,UUID generator and loader,uuid,)) -$(eval $(call BuildPlugin,v4l,Video4Linux video source,v4l,+libv4l)) $(eval $(call BuildPlugin,v4l2,Video4Linux2 video source,v4l2,+libv4l)) $(eval $(call BuildPlugin,v4l2_codec,Video4Linux2 video codec module,v4l2_codec,)) $(eval $(call BuildPlugin,vidbridge,Video bridge module,vidbridge,))