Re: [OpenWrt-Devel] [PATCH 2/2] ppp: fix o_special option printing
Hi Yousong: ++ } ++ } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp, *pp; + + ovp = malloc(sizeof(*ovp) + strlen(*argv)); +@@ -994,7 +1003,7 @@ print_option(opt, mainopt, printer, arg) + p = (char *) opt-addr2; + if ((opt-flags OPT_STATIC) == 0) + p = *(char **)p; +- printer(%q, p); ++ printer(arg, %q, p); + } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp; + -- 1.9.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From: yszhou4t...@gmail.com Date: Wed, 7 May 2014 14:40:20 +0800 Subject: Re: [OpenWrt-Devel] [PATCH 2/2] ppp: fix o_special option printing To: nlhi...@hotmail.com CC: openwrt-devel@lists.openwrt.org Hi, Nathan. On 7 May 2014 13:25, Nathan Hintz nlhi...@hotmail.com wrote: PPPD crashes (SEGV) when the 'dump' or 'dryrun' options are specified and an option defined internally as o_special with an option flag of OPT_A2STRVAL is used. The crash occurs because the option value is not saved when the parameter is processed, but is then referenced when printed. Additionally, the arg parameter is missing from the call to the printer utility. This was encountered using xl2tpd and the l2tp_ppp kernel module; the option PPPD crashes on is pppol2tp 8. I think the handling of OPT_A2STRVAL should be done in pppol2tp.c option handling function. Take `domain' option in options.c and `callback' option in cbcp.c as examples, the value of addr2 are set by handler of each. I got a chance to look at this this weekend, and I agree with your comment and will update the patch. I was contemplating a null pointer check in the print_option function in options.c to eliminate the possibility of crashing (if *(char **)addr2 was NULL); but that might not be necessary anymore. Thoughts? Modify pppd to correctly save the option value, and to call the printer utility with the correct parameters. Signed-off-by: Nathan Hintz nlhi...@hotmail.com --- Supersedes this patch: http://patchwork.openwrt.org/patch/3245/ package/network/services/ppp/Makefile | 2 +- .../501-fix-o_special-option-printing.patch | 29 ++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 package/network/services/ppp/patches/501-fix-o_special-option-printing.patch diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 9bf9616..a707985 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp PKG_VERSION:=2.4.5 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ diff --git a/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch b/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch new file mode 100644 index 000..99b933f --- /dev/null +++ b/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch @@ -0,0 +1,29 @@ +--- a/pppd/options.c b/pppd/options.c +@@ -809,7 +809,16 @@ process_option(opt, cmd, argv) + parser = (int (*) __P((char **))) opt-addr; + if (!(*parser)(argv)) + return 0; +- if (opt-flags OPT_A2LIST) { ++ if (opt-flags OPT_A2STRVAL) { ++ if (opt-flags OPT_STATIC) { ++ strlcpy((char *)(opt-addr2), *argv, opt-upper_limit); ++ } else { ++ sv = strdup(*argv); ++ if (sv == NULL) ++ novm(option argument); ++ *(char **)(opt-addr2) = sv; This reminds me of memory leak. :) This particular instance will be gone due to incorporation of your previous comment Regards. yousong Thanks for your input! Nathan ++ } ++ } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp, *pp; + + ovp = malloc(sizeof(*ovp) + strlen(*argv)); +@@ -994,7 +1003,7 @@ print_option(opt, mainopt, printer, arg) + p = (char *) opt-addr2; + if ((opt-flags OPT_STATIC) == 0) + p = *(char **)p; +- printer(%q, p); ++ printer(arg, %q, p); + } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp; + -- 1.9.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] ppp: fix o_special option printing
Hi, Nathan. On 11 May 2014 15:04, Nathan Hintz nlhi...@hotmail.com wrote: Hi Yousong: ++ } ++ } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp, *pp; + + ovp = malloc(sizeof(*ovp) + strlen(*argv)); +@@ -994,7 +1003,7 @@ print_option(opt, mainopt, printer, arg) + p = (char *) opt-addr2; + if ((opt-flags OPT_STATIC) == 0) + p = *(char **)p; +- printer(%q, p); ++ printer(arg, %q, p); + } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp; + -- 1.9.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From: yszhou4t...@gmail.com Date: Wed, 7 May 2014 14:40:20 +0800 Subject: Re: [OpenWrt-Devel] [PATCH 2/2] ppp: fix o_special option printing To: nlhi...@hotmail.com CC: openwrt-devel@lists.openwrt.org Hi, Nathan. On 7 May 2014 13:25, Nathan Hintz nlhi...@hotmail.com wrote: PPPD crashes (SEGV) when the 'dump' or 'dryrun' options are specified and an option defined internally as o_special with an option flag of OPT_A2STRVAL is used. The crash occurs because the option value is not saved when the parameter is processed, but is then referenced when printed. Additionally, the arg parameter is missing from the call to the printer utility. This was encountered using xl2tpd and the l2tp_ppp kernel module; the option PPPD crashes on is pppol2tp 8. I think the handling of OPT_A2STRVAL should be done in pppol2tp.c option handling function. Take `domain' option in options.c and `callback' option in cbcp.c as examples, the value of addr2 are set by handler of each. I got a chance to look at this this weekend, and I agree with your comment and will update the patch. I was contemplating a null pointer check in the print_option function in options.c to eliminate the possibility of crashing (if *(char **)addr2 was NULL); but that might not be necessary anymore. Thoughts? I checked several options with the OPT_A2STRVAL attribute and w/o OPT_STATIC. Looks like they all novm(errmsg) if pppd failed allocating the needed memory. I tend to think the current implementation is fine although a few lines of comment there will be better. :) Regards. yousong Modify pppd to correctly save the option value, and to call the printer utility with the correct parameters. Signed-off-by: Nathan Hintz nlhi...@hotmail.com --- Supersedes this patch: http://patchwork.openwrt.org/patch/3245/ package/network/services/ppp/Makefile | 2 +- .../501-fix-o_special-option-printing.patch | 29 ++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 package/network/services/ppp/patches/501-fix-o_special-option-printing.patch diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 9bf9616..a707985 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp PKG_VERSION:=2.4.5 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ diff --git a/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch b/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch new file mode 100644 index 000..99b933f --- /dev/null +++ b/package/network/services/ppp/patches/501-fix-o_special-option-printing.patch @@ -0,0 +1,29 @@ +--- a/pppd/options.c b/pppd/options.c +@@ -809,7 +809,16 @@ process_option(opt, cmd, argv) + parser = (int (*) __P((char **))) opt-addr; + if (!(*parser)(argv)) + return 0; +- if (opt-flags OPT_A2LIST) { ++ if (opt-flags OPT_A2STRVAL) { ++ if (opt-flags OPT_STATIC) { ++ strlcpy((char *)(opt-addr2), *argv, opt-upper_limit); ++ } else { ++ sv = strdup(*argv); ++ if (sv == NULL) ++ novm(option argument); ++ *(char **)(opt-addr2) = sv; This reminds me of memory leak. :) This particular instance will be gone due to incorporation of your previous comment Regards. yousong Thanks for your input! Nathan ++ } ++ } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp, *pp; + + ovp = malloc(sizeof(*ovp) + strlen(*argv)); +@@ -994,7 +1003,7 @@ print_option(opt, mainopt, printer, arg) + p = (char *) opt-addr2; + if ((opt-flags OPT_STATIC) == 0) + p = *(char **)p; +- printer(%q, p); ++ printer(arg, %q, p); + } else if (opt-flags OPT_A2LIST) { + struct option_value *ovp; + -- 1.9.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org
[OpenWrt-Devel] [PATCH] [ramips] fix not set lan/wan mac address
The first switch case is default case. Then it will only match default case. cause not update the lan/wan mac address. And in the default switch case the param lan_mac is empty. it will case error message 'arithmetic syntax error' when call macaddr_add function. Signed-off-by: michael lee igv...@gmail.com --- target/linux/ramips/base-files/etc/uci-defaults/02_network | 4 1 file changed, 4 deletions(-) diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index b66d176..550e81f 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -172,10 +172,6 @@ ramips_setup_macs() local wan_mac= case $board in - *) - wan_mac=$(macaddr_add $lan_mac 1) - ;; - br-6475nd) lan_mac=$(mtd_get_mac_binary devdata 13) wan_mac=$(mtd_get_mac_binary devdata 7) -- 1.8.3.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [ramips] add seama image can be upgrade by sysupgrade
generate sysupgrade image by combine two images. one is kernel image with seama header. another is root fs image. Signed-off-by: michael lee igv...@gmail.com --- target/linux/ramips/image/Makefile | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 19932f6..f64b7fa 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -162,7 +162,8 @@ BuildFirmware/Edimax/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3)) # build Seama header images define BuildFirmware/Seama/squashfs - $(call BuildFirmware/OF,$(1),$(2),$(3),$(5)) + $(call MkImageLzmaDtb,$(2),$(3),$(5)) + $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.bin) cat $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/root.$(1) $(KDIR)/img_$(2).$(1).tmp if [ `stat -c%s $(KDIR)/img_$(2).$(1).tmp` -gt (($(5) - 64)) ]; then \ echo Warning: $(KDIR)/img_$(2).$(1).tmp is too big 2; \ @@ -179,6 +180,14 @@ define BuildFirmware/Seama/squashfs -s $(call imgname,$(1),$(2))-factory.bin \ -m signature=$(4) \ -i $(KDIR)/vmlinux-$(2).tmp.seama; \ + dd if=$(KDIR)/vmlinux-$(2).bin.lzma.padded bs=1 count=`expr \`stat -c%s $(KDIR)/vmlinux-$(2).bin.lzma.padded\` - 64` of=$(KDIR)/vmlinux-$(2)-sysupgrade.tmp; \ + $(STAGING_DIR_HOST)/bin/seama \ + -i $(KDIR)/vmlinux-$(2)-sysupgrade.tmp \ + -m dev=/dev/mtdblock/2 -m type=firmware; \ + ( \ + dd if=$(KDIR)/vmlinux-$(2)-sysupgrade.tmp.seama; \ + dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ + ) $(BIN_DIR)/$(output_name); \ fi endef BuildFirmware/Seama/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3)) -- 1.8.3.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][AA][packages] cyrus-sasl: add libtool to PKG_FIXUP
This patch adds libtool to PKG_FIXUP variable. Without it it complaints about version mismatch. It fixes #13196. Signed-off-by: Jiri Slachta slac...@cesnet.cz --- libs/cyrus-sasl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/cyrus-sasl/Makefile b/libs/cyrus-sasl/Makefile index ca78de8..149fbb7 100644 --- a/libs/cyrus-sasl/Makefile +++ b/libs/cyrus-sasl/Makefile @@ -17,7 +17,7 @@ PKG_MD5SUM:=2eb0e48106f0e9cd8001e654f267ecbc PKG_BUILD_DEPENDS:=libopenssl -PKG_FIXUP:=autoreconf +PKG_FIXUP:=autoreconf libtool PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config PKG_AUTOMAKE_PATHS:=. saslauthd sasldb PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 -- 1.9.1 --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][AA][packages] asterisk-chan-sccp-b: update to revision 5393
This patch updates asterisk-chan-sccp-b module to revision 5393. This update is required if asterisk18 gets updated to 1.8.27.0. Signed-off-by: Jiri Slachta slac...@cesnet.cz --- net/asterisk-chan-sccp-b/Makefile | 24 +- .../patches/200-register-file-version.patch| 19 - net/asterisk-chan-sccp-b/patches/300-stdarg.patch | 10 - 3 files changed, 14 insertions(+), 39 deletions(-) delete mode 100644 net/asterisk-chan-sccp-b/patches/200-register-file-version.patch delete mode 100644 net/asterisk-chan-sccp-b/patches/300-stdarg.patch diff --git a/net/asterisk-chan-sccp-b/Makefile b/net/asterisk-chan-sccp-b/Makefile index 8201519..87406a0 100644 --- a/net/asterisk-chan-sccp-b/Makefile +++ b/net/asterisk-chan-sccp-b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk18-chan-sccp-b -PKG_REV=3004 -PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=2 +PKG_REV:=5393 +PKG_VERSION:=4.1r$(PKG_REV) +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/trunk +PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/branches/V4.1 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_PROTO:=svn +PKG_FIXUP:=autoreconf -fi + include $(INCLUDE_DIR)/package.mk define Package/asterisk18-chan-sccp-b @@ -26,7 +28,8 @@ define Package/asterisk18-chan-sccp-b CATEGORY:=Network TITLE:=SCCP channel provider for asterisk URL:=http://chan-sccp-b.sourceforge.net/ - DEPENDS:= asterisk18 +libltdl + DEPENDS:=asterisk18 +libltdl + MAINTAINER:=Jiri Slachta slac...@cesnet.cz endef define Package/asterisk18-chan-sccp-b/description @@ -34,12 +37,13 @@ define Package/asterisk18-chan-sccp-b/description by asterisk by default. endef -CONFIGURE_ARGS += \ - --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8 +define Build/Configure + $(call Build/Configure/Default,--with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8) +endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS=$(CFLAGS) -DLOW_MEMORY \ + CFLAGS=$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY \ DESTDIR=$(PKG_INSTALL_DIR) \ all install endef @@ -50,7 +54,7 @@ endef define Package/asterisk18-chan-sccp-b/install $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_BIN) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf + $(CP) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/ endef diff --git a/net/asterisk-chan-sccp-b/patches/200-register-file-version.patch b/net/asterisk-chan-sccp-b/patches/200-register-file-version.patch deleted file mode 100644 index 81ca9d3..000 --- a/net/asterisk-chan-sccp-b/patches/200-register-file-version.patch +++ /dev/null @@ -1,19 +0,0 @@ a/src/chan_sccp.h -+++ b/src/chan_sccp.h -@@ -127,15 +127,7 @@ extern C { - #define CHECK_LEAKS() - #endif - --#define SCCP_FILE_VERSION(file, version) \ -- static void __attribute__((constructor)) __register_file_version(void) \ -- { \ -- pbx_register_file_version(file, version); \ -- } \ -- static void __attribute__((destructor)) __unregister_file_version(void) \ -- { \ -- pbx_unregister_file_version(file); \ -- } -+#define SCCP_FILE_VERSION(file, version) - - #define DEV_ID_LOG(x) x ? x-id : SCCP - diff --git a/net/asterisk-chan-sccp-b/patches/300-stdarg.patch b/net/asterisk-chan-sccp-b/patches/300-stdarg.patch deleted file mode 100644 index be91ed7..000 --- a/net/asterisk-chan-sccp-b/patches/300-stdarg.patch +++ /dev/null @@ -1,10 +0,0 @@ a/src/chan_sccp.h -+++ b/src/chan_sccp.h -@@ -32,6 +32,7 @@ extern C { - #include common.h - #include poll.h - #include asterisk/compiler.h -+#include stdarg.h - #include asterisk/lock.h - #include asterisk/abstract_jb.h - -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][AA][packages] asterisk: update package to 1.8.27.0
This patch backports asterisk18 package from trunk to AA. It updates asterisk to version 1.8.27.0 and it fixes broken call data records subpackage. Signed-off-by: Jiri Slachta slac...@cesnet.cz --- net/asterisk-1.8.x/Makefile| 126 + net/asterisk-1.8.x/files/asterisk.init | 37 -- net/asterisk-1.8.x/patches/500-nres.patch | 2 +- net/asterisk-1.8.x/patches/600-CVE-2012-2186.patch | 10 -- 4 files changed, 130 insertions(+), 45 deletions(-) delete mode 100644 net/asterisk-1.8.x/patches/600-CVE-2012-2186.patch diff --git a/net/asterisk-1.8.x/Makefile b/net/asterisk-1.8.x/Makefile index 6c769cc..4707cc9 100644 --- a/net/asterisk-1.8.x/Makefile +++ b/net/asterisk-1.8.x/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2012 OpenWrt.org +# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk18 -PKG_VERSION:=1.8.10.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.8.27.0 +PKG_RELEASE:=1 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ -PKG_MD5SUM:=415738d347b9037cbe5f8bfbe66843de +PKG_MD5SUM:=8861a5ff91cf4252f485b2a049d1c317 PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) @@ -34,7 +34,6 @@ define Package/asterisk18/Default/description equipment using relatively inexpensive hardware. endef - define Package/asterisk18 $(call Package/asterisk18/Default) TITLE:=Complete open source PBX, v1.8x @@ -95,7 +94,7 @@ endef define Package/asterisk18-cdr $(call Package/asterisk18/Default) TITLE:=CDR support - DEPENDS:= asterisk18 @BROKEN + DEPENDS:= asterisk18 endef define Package/asterisk18-cdr/description @@ -104,6 +103,18 @@ $(call Package/asterisk18/Default/description) Asterisk. endef +define Package/asterisk18-pgsql +$(call Package/asterisk18/Default) + TITLE:=PostgreSQL support + DEPENDS:= asterisk18 +libpq +endef + +define Package/asterisk18-pgsql/description +$(call Package/asterisk18/Default/description) + This package provides PostgreSQL support to + Asterisk. +endef + define Package/asterisk18-res-musiconhold $(call Package/asterisk18/Default) TITLE:=MOH support @@ -234,6 +245,28 @@ $(call Package/asterisk18/Default/description) This package provides the channel chan_lantiq support to Asterisk. endef +define Package/asterisk18-odbc +$(call Package/asterisk18/Default) + TITLE:=ODBC support + DEPENDS:= asterisk18 +libpthread +libc +unixodbc +endef + +define Package/asterisk18-odbc/description +$(call Package/asterisk18/Default/description) + This package provides ODBC support for Asterisk. +endef + +define Package/asterisk18-pbx-lua +$(call Package/asterisk18/Default) + TITLE:=Lua support + DEPENDS:= asterisk18 +libpthread +libc +liblua +endef + +define Package/asterisk18-pbx-lua/description +$(call Package/asterisk18/Default/description) + This package provides Lua resources for Asterisk. +endef + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-app-meetme),) CONFIGURE_ARGS+= \ --with-dahdi=$(STAGING_DIR)/usr @@ -244,23 +277,28 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-gtalk),) CONFIGURE_ARGS+= \ - --with-gnutls=$(STAGING_DIR)/usr \ --with-iksemel=$(STAGING_DIR)/usr SITE_VARS+= \ - ac_cv_lib_iksemel_iks_start_sasl=yes \ - ac_cv_lib_gnutls_gnutls_bye=yes + ac_cv_lib_iksemel_iks_start_sasl=yes else CONFIGURE_ARGS+= \ - --without-gnutls \ --without-iksemel endif ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-curl),) CONFIGURE_ARGS+= \ - --with-curl=$(STAGING_DIR)/usr + --with-libcurl=$(STAGING_DIR)/usr +else + CONFIGURE_ARGS+= \ + --without-libcurl +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pgsql),) + CONFIGURE_ARGS+= \ + --with-postgres=$(STAGING_DIR)/usr else CONFIGURE_ARGS+= \ - --without-curl + --without-postgres endif ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mysql),) @@ -295,25 +333,30 @@ else --without-srtp endif +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pbx-lua),) + CONFIGURE_ARGS+= \ + --with-lua=$(STAGING_DIR)/usr + TARGET_LDFLAGS+=-ldl -lcrypt +else + CONFIGURE_ARGS+= \ + --without-lua +endif + CONFIGURE_ARGS+= \ --without-curses \ --with-gsm=internal \ --without-cap \ - --without-gtk \ --without-gtk2 \ --without-isdnnet \ - --without-kde \ --without-misdn \ --without-nbs \ --with-ncurses=$(STAGING_DIR)/usr \ --without-netsnmp \ --without-newt \ - --without-odbc \ --without-ogg \ --without-osptk \ --with-popt=$(STAGING_DIR)/usr \ --without-pri \ - --without-qt \ --without-radius \ --without-sdl \ --without-suppserv \ @@ -450,9 +493,7 @@ define
[OpenWrt-Devel] [PATCH][AA][packages] kamailio3: update to version 3.3.7
This patch updates kamailio3 to version 3.3.7. It also adds heavily used rtpproxy module which is missing in AA. This patch is a backport from trunk to AA. Signed-off-by: Jiri Slachta slac...@cesnet.cz --- net/kamailio3/Makefile| 58 --- net/kamailio3/patches/100-cross_compile.patch | 6 +-- 2 files changed, 27 insertions(+), 37 deletions(-) diff --git a/net/kamailio3/Makefile b/net/kamailio3/Makefile index 1702545..f11a27a 100644 --- a/net/kamailio3/Makefile +++ b/net/kamailio3/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012 OpenWrt.org +# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kamailio3 -PKG_VERSION:=3.3.0 +PKG_VERSION:=3.3.7 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/ PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz -PKG_MD5SUM:=c5261066b5c8b617b6a9408679ad514f +PKG_MD5SUM:=519d1dfbddf7dbead3a020321582d471 +PKG_USE_MIPS16:=0 INCL_MODULES:= KAM_MODULES:= @@ -30,12 +31,13 @@ define Package/kamailio3/Default CATEGORY:=Network SUBMENU:=Telephony URL:=http://www.kamailio.org/ + MAINTAINER:=Jiri Slachta slac...@cesnet.cz DEPENDS:=$(ICONV_DEPENDS) +libncurses +libpthread +libreadline endef define Package/kamailio3 $(call Package/kamailio3/Default) - TITLE:=Mature and flexible open source SIP server version 3.x + TITLE:=Mature and flexible open source SIP server, v3.3.x MENU:=1 endef @@ -128,8 +130,7 @@ define BuildPlugin define Package/kamailio3-mod-$(1)/install [ -z $(2) ] || $(INSTALL_DIR) $$(1)/usr/lib/kamailio/$(6) - $(CP) $(PKG_INSTALL_DIR)/usr/lib/kamailio/$(6)/$(2).so \ - $$(1)/usr/lib/kamailio/$(6)/ ; + $(CP) $(PKG_INSTALL_DIR)/usr/lib/kamailio/$(6)/$(2).so $$(1)/usr/lib/kamailio/$(6)/ endef INCL_MODULES+=$(2) @@ -212,6 +213,7 @@ $(eval $(call BuildPlugin,registrar,registrar,SIP Registrar,usrloc,,modules_k)) $(eval $(call BuildPlugin,rls,rls,Resource List Server,presence pua tm,+libxml2,modules_k)) $(eval $(call BuildPlugin,rr,rr,Record-Route and Route,,,modules_k)) $(eval $(call BuildPlugin,rtimer,rtimer,Routing Timer,,,modules_k)) +$(eval $(call BuildPlugin,rtpproxy,rtpproxy,RTP proxy,tm,,modules)) $(eval $(call BuildPlugin,sanity,sanity,SIP sanity checks,sl,,modules)) #$(eval $(call BuildPlugin,seas,seas,SIP Express Application Server,tm,,modules_k)) $(eval $(call BuildPlugin,sipcapture,sipcapture,SIP capture module,,,modules)) @@ -239,43 +241,33 @@ $(eval $(call BuildPlugin,xlog,xlog,Advanced logger,,,modules_k)) $(eval $(call BuildPlugin,xmpp,xmpp,SIP-to-XMPP Gateway,tm,+libexpat,modules_k)) PKG_MAKE_ARGS:= \ - cfg-dir=/etc/kamailio/ \ - bin-dir=/usr/sbin/ \ - data-dir=/var/lib/kamailio/ \ - lib-dir=/usr/lib/kamailio/ \ - modules-dir=/usr/lib/kamailio/modules/ \ + prefix=/ \ + cfg_dir=/etc/kamailio/ \ + bin_dir=/usr/sbin/ \ + data_dir=/var/lib/kamailio/ \ + lib_dir=/usr/lib/kamailio/ \ + modules_dir=/usr/lib/kamailio/ \ include_modules=$(INCL_MODULES) \ - $(KAM3_EXTRA_ARGS) \ - TLS_HOOKS=1 extra_defs=-DUSE_PTHREAD_MUTEX \ + cfg_target:=/etc/kamailio/ \ + TLS_HOOKS=1 \ + extra_defs=-DUSE_PTHREAD_MUTEX \ CFLAGS=$(TARGET_CFLAGS) \ - ISSMP=no \ LOCALBASE=$(STAGING_DIR)/usr \ SYSBASE=$(STAGING_DIR)/usr \ PCREDEFS:=$(TARGET_CPPFLAGS) \ PCRELIBS:=$(TARGET_LDFLAGS) \ - cfg_target:=/etc/kamailio/ \ - PREFIX:=/usr \ - prefix:=/usr quiet=verbose + CROSS_COMPILE=$(TARGET_CROSS) \ + CC=$(TARGET_CC) \ + ARCH=$(ARCH) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + quiet=verbose define Build/Compile - if ! [ -f $(PREBUILT_STAMP) ]; then echo $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ - CC=$(TARGET_CC) \ - ARCH=$(ARCH) \ - EXTRA_LIBS=-L$(STAGING_DIR)/usr/lib/ \ - all touch $(PREBUILT_STAMP); \ - fi $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ - CC=$(TARGET_CC) \ - ARCH=$(ARCH) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - prefix=/ \ - install-cfg + EXTRA_LIBS=-L$(STAGING_DIR)/usr/lib/ \ + all $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ - CC=$(TARGET_CC) \ - ARCH=$(ARCH) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - prefix=/usr \ - install-bin install-modules-all install-utils + install endef $(eval $(call BuildPackage,kamailio3)) diff --git a/net/kamailio3/patches/100-cross_compile.patch b/net/kamailio3/patches/100-cross_compile.patch index 963a607..a4ee4d8 100644 ---
[OpenWrt-Devel] [Patch] [packages] empdcd: fix compile on platforms with VFP
on platforms with VFP/hardfloat ld fails with: empcd uses VFP register arguments, empcd.o does not empcd uses VFP register arguments, keyeventtable.o does not empcd uses VFP register arguments, support/mpc-0.12.2/src/libmpdclient.o does not append to CFLAGS instead of overwrite Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- sound/empcd/patches/001-Makefile_use_VFP_CFLAGS.patch | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 sound/empcd/patches/001-Makefile_use_VFP_CFLAGS.patch diff --git a/sound/empcd/patches/001-Makefile_use_VFP_CFLAGS.patch b/sound/empcd/patches/001-Makefile_use_VFP_CFLAGS.patch new file mode 100644 index 000..3cfded9 --- /dev/null +++ b/sound/empcd/patches/001-Makefile_use_VFP_CFLAGS.patch @@ -0,0 +1,11 @@ +--- a/Makefile b/Makefile +@@ -17,7 +17,7 @@ DEPS = Makefile + OBJS = empcd.o keyeventtable.o support/mpc-0.12.2/src/libmpdclient.o + WARNS = -W -Wall -pedantic -Wno-format -Wno-unused -Wno-long-long + EXTRA = -g3 +-CFLAGS= $(WARNS) $(EXTRA) -D_GNU_SOURCE ++CFLAGS+= $(WARNS) $(EXTRA) -D_GNU_SOURCE + LDFLAGS = + CC = gcc + RM = rm -- 2.0.0.rc2 smime.p7s Description: S/MIME Cryptographic Signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [Patch][packages] jtg: fix compile on platforms with VFP
buildbot reported error on platforms with VFP (sunxi,imx6,omap): ld: error: jtg uses VFP register arguments, /tmp/ccewx1gu.o does not CFLAGS were overwritten so append them instead Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- net/jtg/patches/001-Makefile_honor_CFLAGS_for_VFP.patch | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 net/jtg/patches/001-Makefile_honor_CFLAGS_for_VFP.patch diff --git a/net/jtg/patches/001-Makefile_honor_CFLAGS_for_VFP.patch b/net/jtg/patches/001-Makefile_honor_CFLAGS_for_VFP.patch new file mode 100644 index 000..11e4d6c --- /dev/null +++ b/net/jtg/patches/001-Makefile_honor_CFLAGS_for_VFP.patch @@ -0,0 +1,11 @@ +--- a/Makefile b/Makefile +@@ -2,7 +2,7 @@ BINDIR= $(HOME)/bin + VERSION=1.95 + + CC = gcc +-CFLAGS= -O3 -Wall -Winline -pedantic ++CFLAGS+= -O3 -Wall -Winline -pedantic + CFLAGS+= -g + + # The -DLinuxTCP controls which TCP options are in use -- 2.0.0.rc2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [Patch] [packages] mdk3: fix compile on platforms with VFP
buildbot reported error on platforms with VFP (sunxi,imx6,omap): mdk3 uses VFP register arguments, /tmp/ccBN2WMD.o does not mdk3 uses VFP register arguments, osdep/libosdep.a(osdep.o) does not mdk3 uses VFP register arguments, osdep/libosdep.a(network.o) does not mdk3 uses VFP register arguments, osdep/libosdep.a(linux.o) does not mdk3 uses VFP register arguments, osdep/libosdep.a(radiotap-parser.o) does not mdk3 uses VFP register arguments, osdep/libosdep.a(common.o) does not with failed to merge target specific data of file ... CFLAGS were overwritten so append them instead Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- net/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch | 8 1 file changed, 8 insertions(+) create mode 100644 net/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch diff --git a/net/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch b/net/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch new file mode 100644 index 000..9a420c2 --- /dev/null +++ b/net/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch @@ -0,0 +1,8 @@ +--- a/Makefile b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS= -g -O3 -Wall -Wextra ++CFLAGS+= -g -O3 -Wall -Wextra + LINKFLAGS = -lpthread + + DESTDIR = -- 2.0.0.rc2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [Patch] [packages] netpipe: fix compile on platforms with VFP
buildbot reported error on platforms with VFP (sunxi,imx6,omap): NPtcp uses VFP register arguments, /tmp/.o does not CFLAGS were overwritten so append them instead Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- net/netpipe/patches/001-Makefile_honor_CFLAGS_for_VFP.patch | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 net/netpipe/patches/001-Makefile_honor_CFLAGS_for_VFP.patch diff --git a/net/netpipe/patches/001-Makefile_honor_CFLAGS_for_VFP.patch b/net/netpipe/patches/001-Makefile_honor_CFLAGS_for_VFP.patch new file mode 100644 index 000..4136425 --- /dev/null +++ b/net/netpipe/patches/001-Makefile_honor_CFLAGS_for_VFP.patch @@ -0,0 +1,11 @@ +--- a/makefile b/makefile +@@ -21,7 +21,7 @@ + + + CC = cc +-CFLAGS = -O -g ++CFLAGS += -O -g + SRC= ./src + + # For MPI, mpicc will set up the proper include and library paths -- 2.0.0.rc2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [Patch] [packages] openrrcp: fix compile on platforms with VFP
buildbot reported error on platforms with VFP (sunxi,imx6,omap): ld: error: ../bin/rtl83xx uses VFP register arguments, /tmp/o does not CFLAGS were created by acustom shellscript that was setting host includes paths. this was disabled Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- net/openrrcp/patches/001-Makefile_honor_CFLAGS_for_VFP.patch | 7 +++ 1 file changed, 7 insertions(+) create mode 100644 net/openrrcp/patches/001-Makefile_honor_CFLAGS_for_VFP.patch diff --git a/net/openrrcp/patches/001-Makefile_honor_CFLAGS_for_VFP.patch b/net/openrrcp/patches/001-Makefile_honor_CFLAGS_for_VFP.patch new file mode 100644 index 000..1799bda --- /dev/null +++ b/net/openrrcp/patches/001-Makefile_honor_CFLAGS_for_VFP.patch @@ -0,0 +1,7 @@ +--- a/src/Makefile b/src/Makefile +@@ -1,4 +1,3 @@ +-CFLAGS=`/bin/sh Makefile-helper.sh` + + all: rtl8316b rtl8324 rtl8326 rtl83xx_dlink_des1016d rtl83xx_dlink_des1024d_b1 \ + rtl83xx_dlink_des1024d_c1 rtl83xx_compex_ps2216 rtl83xx_ovislink_fsh2402gt \ -- 2.0.0.rc2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [fstools] ubi: add missing newlines
Signed-off-by: Luka Perkov l...@openwrt.org --- ubi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ubi.c b/ubi.c index b2d7299..e2a4a06 100644 --- a/ubi.c +++ b/ubi.c @@ -139,7 +139,7 @@ static int main_image(char *partition, char *image, char *overlay) libubi = libubi_open(); if (!libubi) { - fprintf(stderr, cannot open libubi); + fprintf(stderr, cannot open libubi\n); return -1; } @@ -160,34 +160,34 @@ static int main_image(char *partition, char *image, char *overlay) err = ubidetach(libubi, mtd); if (err) { - fprintf(stderr, cannot detach \%s\, mtd); + fprintf(stderr, cannot detach \%s\\n, mtd); return -1; } err = ubiattach(libubi, mtd); if (err) { - fprintf(stderr, cannot detach \%s\, mtd); + fprintf(stderr, cannot detach \%s\\n, mtd); return -1; } if (data) { err = ubirmvol(libubi, node, overlay); if (err) { - fprintf(stderr, cannot remove \%s\, node); + fprintf(stderr, cannot remove \%s\\n, node); return -1; } } err = ubiupdatevol(libubi, volume, image); if (err) { - fprintf(stderr, cannot update \%s\, volume); + fprintf(stderr, cannot update \%s\\n, volume); return -1; } if (overlay) { err = ubimkvol(libubi, node, overlay, 1); if (err) { - fprintf(stderr, cannot make \%s\, node); + fprintf(stderr, cannot make \%s\\n, node); return -1; } } @@ -205,7 +205,7 @@ static int main_info(void) libubi = libubi_open(); if (!libubi) { - fprintf(stderr, cannot open libubi); + fprintf(stderr, cannot open libubi\n); return -1; } -- 1.9.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] help with netifd 802.1ad development
Hi all! I am working on adding 802.1ad vlan support to netifd, it is almost working but interfaces are not created anymore since i have added this line that is necessary (without this line interfaces are created but they are 802.1q) https://gitorious.org/netifd/gsoc2014-netifd/source/6c7d308ee9497de5f7ae4463fb1fe98e7b4ae03b:system-linux.c#L845 cfg-proto contains ethertype of 802.1ad or ethertype of 802.1q many thanks for help! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RESEND PATCH v2 1/3] sysupgrade: let force be more forceful with multiple --force/-F options
Signed-off-by: Cody P Schafer de...@codyps.com --- package/base-files/files/sbin/sysupgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index cd224c6..c17e2a1 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -33,7 +33,7 @@ while [ -n $1 ]; do -r|--restore-backup) export CONF_RESTORE=$2 NEED_IMAGE=1; shift;; -l|--list-backup) export CONF_BACKUP_LIST=1; break;; -f) export CONF_IMAGE=$2; shift;; - -F|--force) export FORCE=1;; + -F|--force) export FORCE=$(($FORCE + 1));; -T|--test) export TEST=1;; -h|--help) export HELP=1; break;; -*) @@ -174,7 +174,7 @@ type platform_check_image /dev/null 2/dev/null || { for check in $sysupgrade_image_check; do ( eval $check \\$ARGV\ ) || { - if [ $FORCE -eq 1 ]; then + if [ $FORCE -gt 0 ]; then echo Image check '$check' failed but --force given - will update anyway! break else -- 1.9.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RESEND PATCH v2 2/3] upgrade/common: force mtd when sysupgrade gets -F -F (2 forces)
Signed-off-by: Cody P Schafer de...@codyps.com --- package/base-files/files/lib/upgrade/common.sh | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index ecf1a98..7b3554b 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -198,10 +198,15 @@ jffs2_copy_config() { default_do_upgrade() { sync + local f_arg= + if [ $FORCE -gt 1 ]; then + f_arg=-f + fi + if [ $SAVE_CONFIG -eq 1 ]; then - get_image $1 | mtd $MTD_CONFIG_ARGS -j $CONF_TAR write - ${PART_NAME:-image} + get_image $1 | mtd $f_arg $MTD_CONFIG_ARGS -j $CONF_TAR write - ${PART_NAME:-image} else - get_image $1 | mtd write - ${PART_NAME:-image} + get_image $1 | mtd $f_arg write - ${PART_NAME:-image} fi } -- 1.9.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] help with netifd 802.1ad development
Hi Gioacchino, it seems the kernel expects a big-endian value as vlan protocol, so you should probably try wrapping cfg-proto in htons when passing it to nla_put_u16. Cheers, Steven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel