include $(TOPDIR)/rules.mk
PKG_NAME:=debootstrap
-PKG_VERSION:=1.0.83
+PKG_VERSION:=1.0.87
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap
-PKG_MD5SUM:=877fe5281a0e424bd6c71d121cbb725b8f56694e66558cd47c20c3aa87ceff72
+PKG_MD5SUM:=784f5754f3287ae80715d9100a4ed04e7895be5f7b81b7b2295d335dd69d79fb
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=debian/copyright
endef
define Host/Install
- $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin
- $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(HOST_BUILD_PREFIX)/bin/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOSTPKG)/bin/
endef
$(eval $(call HostBuild))
PKG_NAME:=syslog-ng
PKG_VERSION:=3.8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
define Package/syslog-ng
SECTION:=admin
CATEGORY:=Administration
- DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid
+ DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl
TITLE:=A powerful syslog daemon
URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
endef
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-dependency-tracking \
+ --disable-ampq \
--disable-tcp-wrapper \
--disable-glibtest \
--disable-mongodb \
--disable-java \
+ --disable-json \
+ --disable-python \
--disable-spoof-source \
--disable-sql \
--disable-linux-caps \
+ --disable-smtp \
+ --disable-redis \
--enable-prce \
TARGET_CPPFLAGS += \
define Package/syslog-ng/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsyslog-ng-3.8.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(1)/usr/sbin/
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ install-sbinPROGRAMS install-libLTLIBRARIES \
+ install-moduleLTLIBRARIES DESTDIR="$(1)"
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
+ $(call libtool_remove_files,$(1))
endef
$(eval $(call BuildPackage,syslog-ng))
-@version:3.0
+@version:3.8
options {
chain_hostnames(no);
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2016 OpenWrt.org
-START=50
+START=20
SERVICE_USE_PID=1
include $(INCLUDE_DIR)/host-build.mk
define Package/luajit
+ SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=LuaJIT
define Host/Compile
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
- DPREFIX=$(STAGING_DIR)/host \
+ DPREFIX=$(STAGING_DIR_HOSTPKG) \
TARGET_CFLAGS="$(HOST_CFLAGS)" \
TARGET_LDFLAGS="$(HOST_LDFLAGS)"
endef
define Host/Install
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
- DPREFIX=$(STAGING_DIR)/host \
+ DPREFIX=$(STAGING_DIR_HOSTPKG) \
install
- $(CP) $(STAGING_DIR)/host/bin/luajit-2.1.0-beta2 $(STAGING_DIR)/host/bin/$(PKG_NAME)
+ $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-2.1.0-beta2 $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME)
endef
$(eval $(call HostBuild,luajit))
--- /dev/null
+--- a/src/luaconf.h
++++ b/src/luaconf.h
+@@ -35,8 +35,8 @@
+ #ifndef LUA_LMULTILIB
+ #define LUA_LMULTILIB "lib"
+ #endif
+-#define LUA_LROOT "/usr/local"
+-#define LUA_LUADIR "/lua/5.1/"
++#define LUA_LROOT "/usr"
++#define LUA_LUADIR "/lua/"
+ #define LUA_LJDIR "/luajit-2.1.0-beta2/"
+
+ #ifdef LUA_ROOT
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) all \
CC="$(TARGET_CC)" \
- LUA="$(STAGING_DIR)/host/bin/lua" \
- LUAC="$(STAGING_DIR)/host/bin/luac" \
+ LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
+ LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield"
endef
CONFIGURE_ARGS = \
--prefix=$(CONFIGURE_PREFIX) \
--sysconfdir=/etc \
- --with-lua=$(STAGING_DIR)/host
+ --with-lua=$(STAGING_DIR_HOSTPKG)
CONFIGURE_VARS = \
LUAROCKS_UNAME_S="Linux" \
HOST_CONFIGURE_ARGS:= \
--dest-os=linux \
--without-snapshot \
- --prefix=$(HOST_BUILD_PREFIX)
+ --prefix=$(STAGING_DIR_HOSTPKG)
HOST_CONFIGURE_CMD:=python ./configure
PKG_NAME:=perl-cgi
PKG_VERSION:=4.35
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c
PKG_LICENSE:=GPL Artistic-2.0
-PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
+ Philip Prindeville <philipp@redfish-solutions.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION)
+# don't strip comments because that will mangle this module
+PKG_LEAVE_COMMENTS:=1
+
include $(INCLUDE_DIR)/package.mk
include ../perl/perlmod.mk
EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib
EXPAT_INCPATH=$(STAGING_DIR)/usr/include
-HOST_EXPAT_LIBPATH:=$(STAGING_DIR)/host/lib
-HOST_EXPAT_INCPATH=$(STAGING_DIR)/host/include
+HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib
+HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
Test support is still in development. Some tests will fail,
others are just missing completely.
+config PERL_NOCOMMENT
+ bool "Strip comments and pod sections from modules"
+ default y
+ help
+ Remove comments and pod sections for all perl packages.
+
+ This will descrease the size of perl libraries moderately.
+
+ Stripping occasionally gets confused and mangles valid code,
+ so disable this option if you're not pressed for space.
+
endmenu
PKG_NAME:=perl
PKG_VERSION:=5.22.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
http://www.cpan.org/src/5.0 \
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_LICENSE_FILES:=Copying Artistic README
-PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
+ Philip Prindeville <philipp@redfish-solutions.com>
# Build settings
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
HOST_BUILD_PARALLEL:=1
# Variables used during configuration/build
-HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr
+HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr
# Filter -g3, it will break Compress-Raw-Zlib
TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS))
PERL_VERSION:=5.22
# Build environment
-HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr
+HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr
ifneq ($(CONFIG_USE_GLIBC),)
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
endif
-PERL_CMD:=$(STAGING_DIR)/host/usr/bin/perl$(PERL_VERSION).0
+PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION).0
MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
ifdef CONFIG_PERL_THREADS
rm -f $(1)/Makefile.aperl
$(MAKE) -C $(1) perl
$(CP) $(1)/perl $(PERL_CMD)
- $(CP) $(1)/perl $(STAGING_DIR)/host/usr/bin/perl
+ $(CP) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl
endef
define perlmod/host/Configure
endef
-define perlmod/Install
- $(call perlmod/Install/NoStrip,$(1),$(2),$(3))
-
+define perlmod/_DoStrip
@echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)"
find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \
xargs -r sed -i \
-e '/^#[^!"'"'"']/d'
endef
+define perlmod/Install
+ $(call perlmod/Install/NoStrip,$(1),$(2),$(3))
+
+ $(if $(CONFIG_PERL_NOCOMMENT),$(if $(PKG_LEAVE_COMMENTS),,$(call perlmod/_DoStrip,$(1),$(2),$(3))))
+endef
+
# You probably don't want to use this directly. Look at perlmod/InstallTests
define perlmod/_InstallTests
$(INSTALL_DIR) $(strip $(1))
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.0.13
+PKG_VERSION:=7.1.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=eb117bf1d1efc99c522f132b265a3402
+PKG_MD5SUM:=cf36039303c47f493100afea522a8f53
+PKG_HASH:=a810b3f29c21407c24caa88f50649320d20ba6892ae1923132598b8a0ca145b6
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \
php_cv_cc_rpath="no" \
iconv_impl_name="gnu_libiconv" \
- ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
+ ac_cv_php_xml2_config_path="$(STAGING_DIR_HOSTPKG)/bin/xml2-config" \
define Package/php7/conffiles
/etc/php.ini
From: Joe Orton <jorton@redhat.com>
-Date: Sun, 18 Oct 2015 02:15:17 +0200
+Date: Thu, 20 Oct 2016 11:44:14 +0200
Subject: Add support for use of the system timezone database
Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired.
History:
+r14: improve check for valid tz file
r13: adapt for upstream changes to use PHP allocator
r12: adapt for upstream changes for new zic
r11: use canonical names to avoid more case sensitivity issues
r2: add filesystem trawl to set up name alias index
r1: initial revision
---
- ext/date/lib/parse_tz.c | 549 +++++++++++++++++++++++++++++++++++++++++++++++-
- ext/date/lib/timelib.m4 | 14 ++
- 2 files changed, 552 insertions(+), 11 deletions(-)
+ ext/date/lib/parse_tz.c | 560 +++++++++++++++++++++++++++++++++++++++++++++++-
+ ext/date/lib/timelib.m4 | 13 ++
+ 2 files changed, 562 insertions(+), 11 deletions(-)
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
-index 20d7eea..6301dc5 100644
+index 20d7eea..ed7717e 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -24,6 +24,16 @@
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -302,7 +321,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
+@@ -302,7 +321,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
+ && strcmp(ent->d_name, "posix") != 0
+ && strcmp(ent->d_name, "posixrules") != 0
+ && strcmp(ent->d_name, "right") != 0
++ && strstr(ent->d_name, ".list") == NULL
+ && strstr(ent->d_name, ".tab") == NULL;
+}
+
+
+/* Returns true if the passed-in stat structure describes a
+ * probably-valid timezone file. */
-+static int is_valid_tzfile(const struct stat *st)
++static int is_valid_tzfile(const struct stat *st, int fd)
+{
++ if (fd) {
++ char buf[20];
++ if (read(fd, buf, 20)!=20) {
++ return 0;
++ }
++ lseek(fd, SEEK_SET, 0);
++ if (memcmp(buf, "TZif", 4)) {
++ return 0;
++ }
++ }
+ return S_ISREG(st->st_mode) && st->st_size > 20;
+}
+
+ }
+
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
-+
++
+ fd = open(fname, O_RDONLY);
+ if (fd == -1) {
+ return NULL;
-+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) {
++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) {
+ close(fd);
+ return NULL;
+ }
{
int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
-@@ -341,21 +771,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
+@@ -341,21 +782,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
return 0;
}
+
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
+
-+ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
++ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0);
+ }
+#endif
+
}
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -380,24 +877,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz)
+@@ -380,24 +888,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz)
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
tmp = NULL;
}
diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4
-index c725572..4c837c7 100644
+index 99bf9fa..4bf7e46 100644
--- a/ext/date/lib/timelib.m4
+++ b/ext/date/lib/timelib.m4
-@@ -78,3 +78,17 @@ stdlib.h
+@@ -78,3 +78,16 @@ stdlib.h
dnl Check for strtoll, atoll
- AC_CHECK_FUNCS(strtoll atoll strftime)
+ AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
+
+PHP_ARG_WITH(system-tzdata, for use of system timezone data,
+[ --with-system-tzdata[=DIR] to specify use of system timezone data],
+ [Define for location of system timezone data])
+ fi
+fi
-+
1 file changed, 17 insertions(+)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
-index e780b2e..2b5a528 100644
+index cbe6e91..1999c83 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
-@@ -992,6 +992,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
+@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
DATEG(timezone_valid) = 1;
return DATEG(default_timezone);
}
sapi/cgi/cgi_main.c | 4 ++--
sapi/cli/php_cli.c | 4 ++--
sapi/fpm/fpm/fpm_main.c | 4 ++--
- sapi/litespeed/lsapi_main.c | 4 ++--
sapi/phpdbg/phpdbg.c | 4 +---
- 7 files changed, 12 insertions(+), 24 deletions(-)
+ 6 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ext/standard/info.c b/ext/standard/info.c
-index e6eaac3..024e5c9 100644
+index e74d6b4..883fbdf 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
-@@ -863,7 +863,6 @@ PHPAPI void php_print_info(int flag)
+@@ -865,7 +865,6 @@ PHPAPI void php_print_info(int flag)
php_info_print_box_end();
php_info_print_table_start();
php_info_print_table_row(2, "System", ZSTR_VAL(php_uname));
case $host_alias in
*aix*)
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
-index 8983b53..589e299 100644
+index 0b6deb1..bb9014a 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
-@@ -2216,9 +2216,9 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\
SG(request_info).no_headers = 1;
}
#if ZEND_DEBUG
php_request_shutdown((void *) 0);
fcgi_shutdown();
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
-index 978c8b3..3ee61a4 100644
+index dc92045..bb28364 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
-@@ -682,8 +682,8 @@ static int do_cli(int argc, char **argv) /* {{{ */
+@@ -690,8 +690,8 @@ static int do_cli(int argc, char **argv) /* {{{ */
goto out;
case 'v': /* show php version & quit */
"ZTS "
#else
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
-index 5adeb63..5e60255 100644
+index 6768113..545c52e 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
-@@ -1757,9 +1757,9 @@ int main(int argc, char *argv[])
+@@ -1756,9 +1756,9 @@ int main(int argc, char *argv[])
SG(request_info).no_headers = 1;
#if ZEND_DEBUG
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
-diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
-index b0ea105..4feb8f3 100644
---- a/sapi/litespeed/lsapi_main.c
-+++ b/sapi/litespeed/lsapi_main.c
-@@ -811,9 +811,9 @@ static int cli_main( int argc, char * argv[] )
- case 'v':
- if (php_request_startup() != FAILURE) {
- #if ZEND_DEBUG
-- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #else
-- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #endif
- #ifdef PHP_OUTPUT_NEWAPI
- php_output_end_all();
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
-index 68a164c..82565d8 100644
+index b47c7c8..ab94bba 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
-@@ -1657,10 +1657,8 @@
- phpdbg_do_help(NULL);
+@@ -1699,10 +1699,8 @@ phpdbg_main:
+ phpdbg_do_help_cmd(exec);
} else if (show_version) {
phpdbg_out(
- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
--- /dev/null
+From 6cbb9f4c247c5361b8c165fbb40b4118d5d7c0e5 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Mon, 25 Apr 2016 11:59:14 +0200
+Subject: [PATCH] Fix asm constraints in aarch64 multiply macro
+
+All operands must be register operands and the output operands are early
+clobbered.
+---
+ Zend/zend_multiply.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
+index dfd21f7..651dd43 100644
+--- a/Zend/zend_multiply.h
++++ b/Zend/zend_multiply.h
+@@ -53,8 +53,8 @@
+ __asm__("mul %0, %2, %3\n" \
+ "smulh %1, %2, %3\n" \
+ "sub %1, %1, %0, asr #63\n" \
+- : "=X"(__tmpvar), "=X"(usedval) \
+- : "X"(a), "X"(b)); \
++ : "=&r"(__tmpvar), "=&r"(usedval) \
++ : "r"(a), "r"(b)); \
+ if (usedval) (dval) = (double) (a) * (double) (b); \
+ else (lval) = __tmpvar; \
+ } while (0)
+--
+2.8.0
+
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
endef
define Host/Install
+++ /dev/null
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=gmpy
-PKG_VERSION:=1.17
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy
-PKG_MD5SUM:=2bf419076b06e107167e219f60ac6d27
-
-PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILES:=lgpl-2.1.txt
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-
-define Package/python-gmpy
- SECTION:=lang
- CATEGORY:=Languages
- SUBMENU:=Python
- TITLE:=python-gmpy
- URL:=http://code.google.com/p/gmpy/
- DEPENDS:=+libgmp +python-light
-endef
-
-define Package/python-gmpy/description
-gmpy is a C-coded Python extension module that provides access to the
-GMP (or MPIR) multiple-precision arithmetic library.
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
-$(eval $(call PyPackage,python-gmpy))
-$(eval $(call BuildPackage,python-gmpy))
CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps))
CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts))
-HOST_PYTHON_PIP:=$(STAGING_DIR)/host/bin/pip$(PYTHON_VERSION)
+HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10)
recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3))
$(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url $(CONFIG_PACKAGE_python-packages-index-url)) \
$(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \
-HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR)/host,"")
+HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
HOST_PYTHON_PIP_INSTALL_TARGET=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr)
HOST_PYTHON_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr)
define Host/Compile
$(call Build/Compile/HostPyMod,,\
- install --root="$(STAGING_DIR)/host" --prefix="" \
+ install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
--single-version-externally-managed \
)
endef
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
endef
define Host/Install
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
endef
define Host/Install
define Host/Compile
$(call Build/Compile/HostPyMod,,\
- install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
+ install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
--single-version-externally-managed \
)
endef
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host
+HOST_BUILD_DEPENDS:=bzip2/host expat/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
-|$(PYTHON_PKG_DIR)
endef
+HOST_LDFLAGS += \
+ $$$$(pkg-config --static --libs libcrypto libssl)
+
HOST_CONFIGURE_ARGS+= \
--without-cxx-main \
--without-pymalloc \
--prefix=$(HOST_PYTHON_DIR) \
--exec-prefix=$(HOST_PYTHON_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
- --with-system-ffi \
- CONFIG_SITE= \
- CFLAGS="$(HOST_CFLAGS)"
+ --with-system-ffi=no \
+ CONFIG_SITE=
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) install
# For PYTHON_VERSION
$(call include_mk, python-version.mk)
-# Compatibility fallback for older OpenWrt and LEDE versions
-ifeq ($(STAGING_DIR_HOSTPKG),)
- $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host)
- STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host
-endif
-
HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG)
HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
define HostPy/Compile/Default
$(call Build/Compile/HostPyMod,,\
- install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
+ install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
--single-version-externally-managed \
)
endef
-ifeq ($(BUILD_VARIANT),python)
-define Host/Compile
- $(call HostPy/Compile/Default)
-endef
-
-define Host/Install
-endef
-endif # python
-
endif # __python_host_mk_inc
+++ /dev/null
-diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
-index 75f62a7..4d6c9f2 100755
---- a/Modules/_ctypes/libffi/configure
-+++ b/Modules/_ctypes/libffi/configure
-@@ -17257,20 +17257,12 @@ case "$host" in
- fi
- ;;
-
-- i?86-*-* | x86_64-*-*)
-- TARGETDIR=x86
-- if test $ac_cv_sizeof_size_t = 4; then
-- case "$host" in
-- *-gnux32)
-- TARGET=X86_64
-- ;;
-- *)
-- TARGET=X86
-- ;;
-- esac
-- else
-- TARGET=X86_64;
-- fi
-+ i?86-*-*)
-+ TARGET=X86; TARGETDIR=x86
-+ ;;
-+
-+ x86_64-*-*)
-+ TARGET=X86_64; TARGETDIR=x86
- ;;
-
- ia64*-*-*)
+++ /dev/null
-diff --git a/setup.py b/setup.py
-index 7868b7b..86b0119 100644
---- a/setup.py
-+++ b/setup.py
-@@ -725,8 +725,8 @@ class PyBuildExt(build_ext):
- # use the same library for the readline and curses modules.
- if 'curses' in readline_termcap_library:
- curses_library = readline_termcap_library
-- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-- curses_library = 'ncursesw'
-+ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-+ # curses_library = 'ncursesw'
- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
- curses_library = 'ncurses'
- elif self.compiler.find_library_file(lib_dirs, 'curses'):
+++ /dev/null
---- a/setup.py
-+++ b/setup.py
-@@ -859,7 +859,7 @@ class PyBuildExt(build_ext):
-
- min_openssl_ver = 0x00907000
- have_any_openssl = ssl_incs is not None and ssl_libs is not None
-- have_usable_openssl = (have_any_openssl and
-+ have_usable_openssl = cross_compiling and (have_any_openssl and
- openssl_ver >= min_openssl_ver)
-
- if have_any_openssl:
# For PYTHON3_VERSION
$(call include_mk, python3-version.mk)
-# Compatibility fallback for older OpenWrt and LEDE versions
-ifeq ($(STAGING_DIR_HOSTPKG),)
- $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host)
- STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host
-endif
-
HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG)
HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
define HostPy3/Compile/Default
$(call Build/Compile/HostPy3Mod,,\
- install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
+ install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
--single-version-externally-managed \
)
endef
define Host/Install
# When ruby version is updated, make install asks in some cases before replace
# an existing different file. Remove them before install and avoid the interaction
- rm -f $(HOST_BUILD_PREFIX)/bin/rake
+ rm -f $(STAGING_DIR_HOSTPKG)/bin/rake
$(call Host/Install/Default)
endef
define Host/Install
$(INSTALL_DIR) \
- $(STAGING_DIR)/host/bin
+ $(STAGING_DIR_HOSTPKG)/bin
$(CP) \
$(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \
- $(STAGING_DIR)/host/bin/
+ $(STAGING_DIR_HOSTPKG)/bin/
endef
define Package/boost/Default/install
PKG_NAME:=dtc
PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc
PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0
$(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
endef
+TARGET_CFLAGS += \
+ $(FPIC)
+
MAKE_FLAGS += \
PREFIX= \
CFLAGS="$(TARGET_CFLAGS)"
include $(TOPDIR)/rules.mk
PKG_NAME:=glib2
-PKG_VERSION:=2.49.7
-PKG_RELEASE:=1
+PKG_VERSION:=2.50.2
+PKG_RELEASE:=2
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.49
-PKG_MD5SUM:=397ead3fcf325cb921d54e2c9e7dfd7a
+PKG_SOURCE_URL:=@GNOME/glib/2.50
+PKG_MD5SUM:=5eeb2bfaf78a07be59585e8b6e80b1d6
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
HOST_CONFIGURE_ARGS += \
--disable-selinux \
--with-libiconv=gnu \
- --with-pcre=internal
+ --with-pcre=internal \
+ --enable-libmount=no
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--enable-debug=no \
--disable-selinux \
+ --enable-libmount=no \
--disable-fam \
--with-libiconv=gnu \
--with-pcre=internal
CONFIGURE_VARS += \
glib_cv_stack_grows=no \
glib_cv_uscore=no \
- ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR)/host/bin/glib-genmarshal \
+ ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOSTPKG)/bin/glib-genmarshal \
ac_cv_func_mmap_fixed_mapped=yes \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_posix_getgrgid_r=yes
#
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=55.1
+PKG_VERSION:=58.2
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-55_1-src.tgz
-PKG_SOURCE_URL:=http://download.icu-project.org/files/icu4c/55.1
-PKG_MD5SUM:=e2d523df79d6cb7855c2fbe284f4db29
+PKG_SOURCE:=$(PKG_NAME)-58_2-src.tgz
+PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
+PKG_MD5SUM:=fac212b32b7ec7ab007a12dff1f3aea1
PKG_LICENSE:=ICU-1.8.1+
-PKG_LICENSE_FILES:=license.html
+PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=icu/host
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
DEPENDS:=+libstdcpp +libpthread
endef
-define Build/Configure
- $(call Build/Configure/Default, \
- --disable-debug \
- --enable-release \
- --enable-shared \
- --enable-static \
- --enable-draft \
- --enable-renaming \
- --disable-tracing \
- --disable-extras \
- --enable-dyload \
- --enable-layout \
- --enable-layoutex \
- --disable-tools \
- --disable-tests \
- --disable-samples \
- --with-cross-build="$(HOST_BUILD_DIR)" \
- )
-endef
+CONFIGURE_CMD:= ./runConfigureICU
+CONFIGURE_VARS:=
+CONFIGURE_ARGS:= \
+ Linux/gcc \
+ --disable-debug \
+ --enable-release \
+ --enable-shared \
+ --enable-static \
+ --enable-draft \
+ --enable-renaming \
+ --disable-tracing \
+ --disable-extras \
+ --enable-dyload \
+ --disable-tools \
+ --disable-tests \
+ --disable-samples \
+ --with-cross-build="$(HOST_BUILD_DIR)" \
+ --prefix=/usr
+
+HOST_CONFIGURE_CMD:= ./runConfigureICU
+HOST_CONFIGURE_VARS:=
+HOST_CONFIGURE_ARGS:= \
+ Linux/gcc \
+ --disable-debug \
+ --enable-release \
+ --enable-shared \
+ --enable-static \
+ --enable-draft \
+ --enable-renaming \
+ --disable-tracing \
+ --disable-extras \
+ --enable-dyload \
+ --prefix=$(HOST_BUILD_PREFIX)
define Build/InstallDev
$(INSTALL_DIR) \
$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
-- $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html
+- $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
$(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
$(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -893,8 +893,8 @@
+ AC_CHECK_FUNC(strtod_l)
+ if test x$ac_cv_func_strtod_l = xyes
+ then
+- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1"
+- U_HAVE_STRTOD_L=1
++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
++ U_HAVE_STRTOD_L=0
+ else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
+ U_HAVE_STRTOD_L=0
+--- a/configure
++++ b/configure
+@@ -7053,8 +7053,8 @@
+
+ if test x$ac_cv_func_strtod_l = xyes
+ then
+- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1"
+- U_HAVE_STRTOD_L=1
++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
++ U_HAVE_STRTOD_L=0
+ else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
+ U_HAVE_STRTOD_L=0
#
-# Copyright (C) 2015 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=libextractor
PKG_VERSION:=1.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
# ToDo:
# - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_MD5SUM:=35b8913dbebafe583a2781bf71509c48
+PKG_HASH:=868ad64c9a056d6b923d451d746935bffb1ddf5d89c3eb4f67d786001a3f7b7f
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
dvi \
flac:+libflac \
gif:+giflib \
- gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \
+ gstreamer:+libgstreamer1:+gstreamer1-plugins-base:+libgst1app:+libgst1pbutils:+libgst1tag \
it \
jpeg:+libjpeg \
man \
--- /dev/null
+--- a/src/plugins/thumbnailffmpeg_extractor.c
++++ b/src/plugins/thumbnailffmpeg_extractor.c
+@@ -59,6 +59,20 @@
+ #include <ffmpeg/swscale.h>
+ #endif
+
++#if USE_JPEG
++#ifdef PIX_FMT_YUVJ420P
++#define PIX_OUTPUT_FORMAT PIX_FMT_YUVJ420P
++#else
++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_YUVJ420P
++#endif
++#else
++#ifdef PIX_FMT_RGB24
++#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24
++#else
++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24
++#endif
++#endif
++
+ /**
+ * Set to 1 to enable debug output.
+ */
+@@ -153,7 +167,7 @@
+ static size_t
+ create_thumbnail (int src_width, int src_height,
+ int src_stride[],
+- enum PixelFormat src_pixfmt,
++ enum AVPixelFormat src_pixfmt,
+ const uint8_t * const src_data[],
+ int dst_width, int dst_height,
+ uint8_t **output_data,
+@@ -189,7 +203,8 @@
+ if (NULL ==
+ (scaler_ctx =
+ sws_getContext (src_width, src_height, src_pixfmt,
+- dst_width, dst_height, PIX_FMT_RGB24,
++ dst_width, dst_height,
++ PIX_OUTPUT_FORMAT,
+ SWS_BILINEAR, NULL, NULL, NULL)))
+ {
+ #if DEBUG
+@@ -199,7 +214,12 @@
+ return 0;
+ }
+
+- if (NULL == (dst_frame = avcodec_alloc_frame ()))
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ dst_frame = av_frame_alloc ();
++#else
++ dst_frame = avcodec_alloc_frame();
++#endif
++ if (NULL == dst_frame)
+ {
+ #if DEBUG
+ fprintf (stderr,
+@@ -209,18 +229,24 @@
+ return 0;
+ }
+ if (NULL == (dst_buffer =
+- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height))))
++ av_malloc (avpicture_get_size (PIX_OUTPUT_FORMAT,
++ dst_width, dst_height))))
+ {
+ #if DEBUG
+ fprintf (stderr,
+ "Failed to allocate the destination image buffer\n");
+ #endif
+- av_free (dst_frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&dst_frame);
++#else
++ avcodec_free_frame (&dst_frame);
++#endif
+ sws_freeContext (scaler_ctx);
+ return 0;
+ }
+ avpicture_fill ((AVPicture *) dst_frame, dst_buffer,
+- PIX_FMT_RGB24, dst_width, dst_height);
++ PIX_OUTPUT_FORMAT,
++ dst_width, dst_height);
+ sws_scale (scaler_ctx,
+ src_data,
+ src_stride,
+@@ -236,7 +262,11 @@
+ "Failed to allocate the encoder output buffer\n");
+ #endif
+ av_free (dst_buffer);
+- av_free (dst_frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&dst_frame);
++#else
++ avcodec_free_frame (&dst_frame);
++#endif
+ sws_freeContext (scaler_ctx);
+ return 0;
+ }
+@@ -249,13 +279,17 @@
+ #endif
+ av_free (encoder_output_buffer);
+ av_free (dst_buffer);
+- av_free (dst_frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&dst_frame);
++#else
++ avcodec_free_frame (&dst_frame);
++#endif
+ sws_freeContext (scaler_ctx);
+ return 0;
+ }
+ encoder_codec_ctx->width = dst_width;
+ encoder_codec_ctx->height = dst_height;
+- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24;
++ encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT;
+ opts = NULL;
+ if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0)
+ {
+@@ -263,10 +297,14 @@
+ fprintf (stderr,
+ "Failed to open the encoder\n");
+ #endif
+- av_free (encoder_codec_ctx);
++ avcodec_free_context (&encoder_codec_ctx);
+ av_free (encoder_output_buffer);
+ av_free (dst_buffer);
+- av_free (dst_frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&dst_frame);
++#else
++ avcodec_free_frame (&dst_frame);
++#endif
+ sws_freeContext (scaler_ctx);
+ return 0;
+ }
+@@ -295,9 +333,13 @@
+ cleanup:
+ av_dict_free (&opts);
+ avcodec_close (encoder_codec_ctx);
+- av_free (encoder_codec_ctx);
++ avcodec_free_context (&encoder_codec_ctx);
+ av_free (dst_buffer);
+- av_free (dst_frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&dst_frame);
++#else
++ avcodec_free_frame (&dst_frame);
++#endif
+ sws_freeContext (scaler_ctx);
+ *output_data = encoder_output_buffer;
+
+@@ -406,18 +448,23 @@
+ fprintf (stderr,
+ "Failed to open image codec\n");
+ #endif
+- av_free (codec_ctx);
++ avcodec_free_context (&codec_ctx);
+ return;
+ }
+ av_dict_free (&opts);
+- if (NULL == (frame = avcodec_alloc_frame ()))
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ frame = av_frame_alloc ();
++#else
++ frame = avcodec_alloc_frame();
++#endif
++ if (NULL == frame)
+ {
+ #if DEBUG
+ fprintf (stderr,
+ "Failed to allocate frame\n");
+ #endif
+ avcodec_close (codec_ctx);
+- av_free (codec_ctx);
++ avcodec_free_context (&codec_ctx);
+ return;
+ }
+
+@@ -441,9 +488,13 @@
+ fprintf (stderr,
+ "Failed to decode a complete frame\n");
+ #endif
+- av_free (frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&frame);
++#else
++ avcodec_free_frame (&frame);
++#endif
+ avcodec_close (codec_ctx);
+- av_free (codec_ctx);
++ avcodec_free_context (&codec_ctx);
+ return;
+ }
+ calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height,
+@@ -467,9 +518,13 @@
+ err);
+ av_free (encoded_thumbnail);
+ }
+- av_free (frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&frame);
++#else
++ avcodec_free_frame (&frame);
++#endif
+ avcodec_close (codec_ctx);
+- av_free (codec_ctx);
++ avcodec_free_context (&codec_ctx);
+ }
+
+
+@@ -563,7 +618,12 @@
+ return;
+ }
+
+- if (NULL == (frame = avcodec_alloc_frame ()))
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ frame = av_frame_alloc ();
++#else
++ frame = avcodec_alloc_frame();
++#endif
++ if (NULL == frame)
+ {
+ #if DEBUG
+ fprintf (stderr,
+@@ -616,7 +676,11 @@
+ fprintf (stderr,
+ "Failed to decode a complete frame\n");
+ #endif
+- av_free (frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&frame);
++#else
++ avcodec_free_frame (&frame);
++#endif
+ avcodec_close (codec_ctx);
+ avformat_close_input (&format_ctx);
+ av_free (io_ctx);
+@@ -643,7 +707,11 @@
+ err);
+ av_free (encoded_thumbnail);
+ }
+- av_free (frame);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&frame);
++#else
++ avcodec_free_frame (&frame);
++#endif
+ avcodec_close (codec_ctx);
+ avformat_close_input (&format_ctx);
+ av_free (io_ctx);
+--- a/src/plugins/previewopus_extractor.c
++++ b/src/plugins/previewopus_extractor.c
+@@ -296,7 +296,12 @@
+ /** Initialize one audio frame for reading from the input file */
+ static int init_input_frame(AVFrame **frame)
+ {
+- if (!(*frame = avcodec_alloc_frame())) {
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ *frame = av_frame_alloc ();
++#else
++ *frame = avcodec_alloc_frame();
++#endif
++ if (NULL == *frame) {
+ #if DEBUG
+ fprintf(stderr, "Could not allocate input frame\n");
+ #endif
+@@ -655,7 +660,11 @@
+ av_freep(&converted_input_samples[0]);
+ free(converted_input_samples);
+ }
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&input_frame);
++#else
+ avcodec_free_frame(&input_frame);
++#endif
+
+ return ret;
+ }
+@@ -671,7 +680,12 @@
+ int error;
+
+ /** Create a new frame to store the audio samples. */
+- if (!(*frame = avcodec_alloc_frame())) {
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ *frame = av_frame_alloc ();
++#else
++ *frame = avcodec_alloc_frame();
++#endif
++ if (NULL == *frame) {
+ #if DEBUG
+ fprintf(stderr, "Could not allocate output frame\n");
+ #endif
+@@ -702,7 +716,11 @@
+ #if DEBUG
+ fprintf(stderr, "Could allocate output frame samples (error '%s')\n", get_error_text(error));
+ #endif
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (frame);
++#else
+ avcodec_free_frame(frame);
++#endif
+ return error;
+ }
+
+@@ -783,17 +801,29 @@
+ #if DEBUG
+ fprintf(stderr, "Could not read data from FIFO\n");
+ #endif
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&output_frame);
++#else
+ avcodec_free_frame(&output_frame);
++#endif
+ return AVERROR_EXIT;
+ }
+
+ /** Encode one frame worth of audio samples. */
+ if (encode_audio_frame(output_frame, output_format_context,
+ output_codec_context, &data_written)) {
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&output_frame);
++#else
+ avcodec_free_frame(&output_frame);
++#endif
+ return AVERROR_EXIT;
+ }
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ av_frame_free (&output_frame);
++#else
+ avcodec_free_frame(&output_frame);
++#endif
+ return 0;
+ }
+ /** Write the trailer of the output file container. */
+@@ -907,7 +937,12 @@
+ return;
+ }
+
+- if (NULL == (frame = avcodec_alloc_frame ()))
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
++ frame = av_frame_alloc ();
++#else
++ frame = avcodec_alloc_frame();
++#endif
++ if (NULL == frame)
+ {
+ #if DEBUG
+ fprintf (stderr,
--without-iconv
CONFIGURE_VARS += \
- LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \
+ LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \
ac_cv_header_iconv_h=no
define Build/InstallDev
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
$(1)/usr/lib/pkgconfig/
- $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/vala/vapi/* \
- $(STAGING_DIR)/host/share/vala-0.30/vapi
+ $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi
endef
define Package/libgee/install
$(SED) \
's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
$(2)/bin/gpg-error-config
- ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
+ ln -sf $(STAGING_DIR_HOSTPKG)/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DATA) \
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
-DENABLEEXAMPLES=0 \
- -DNODE_EXECUTABLE=$(STAGING_DIR)/host/bin/node \
- -DSWIG_DIR=$(STAGING_DIR)/host/bin
+ -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
+ -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
th02 tm1637 tsl2561 ttp223 ublox6 uln200xa waterlevel wheelencoder wt5001 yg1006 zfm20
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
- -DNODE_EXECUTABLE=$(STAGING_DIR)/host/bin/node \
- -DSWIG_DIR=$(STAGING_DIR)/host/bin
+ -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
+ -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
define Package/libupm/Default
SECTION:=libs
$(PKG_INSTALL_DIR)/usr/bin/xslt-config \
$(2)/bin/
- ln -sf $(STAGING_DIR)/host/bin/xslt-config $(1)/usr/bin/xslt-config
+ ln -sf $(STAGING_DIR_HOSTPKG)/bin/xslt-config $(1)/usr/bin/xslt-config
$(SED) \
's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
endef
define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR)/host/bin
- $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR)/host/bin/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOSTPKG)/bin/
endef
$(eval $(call HostBuild))
RE2C = @RE2C@
RE2CFLAGS = -b
-FILTERH = ./tools/bin/filterh
-+FILTERH = $(STAGING_DIR)/host/bin/filterh
++FILTERH = $(STAGING_DIR_HOSTPKG)/bin/filterh
AM_CPPFLAGS = $(CPPFLAGS) $(DBCPPFLAGS)
AM_CPPFLAGS += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions
#
# Copyright (C) 2007-2016 OpenWrt.org
+# Copyright (C) 2017 Daniel Engberg <daniel.engberg.lists@pyret.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_VERSION:=1.7.7
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pocoproject.org/releases/poco-1.7.7
-PKG_MD5SUM:=deb1e25704a39aac9fcd2beb4db55316
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MD5SUM:=17783e30f5ef9c852544ac0e9d1fd316c4804317026059a9d6aad798b61c77f8
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR)/usr/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR)/usr/bin/
- $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR)/host/bin/
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR)/host/bin/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/
endef
define Build/Configure
$(Build/Configure/Default)
- $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR)/host/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
+ $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
endef
TARGET_CFLAGS += $(FPIC) -lpthread
of its internal RPC protocols and file formats.
endef
-CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR)/host/bin/protoc
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
define Build/InstallDev
$(INSTALL_DIR) \
select FFMPEG_CUSTOM_DECODER_opus
select FFMPEG_CUSTOM_DECODER_pcm_s16be
select FFMPEG_CUSTOM_DECODER_pcm_s16le
- select FFMPEG_CUSTOM_SELECT_speex
select FFMPEG_CUSTOM_DECODER_vorbis
select FFMPEG_CUSTOM_DECODER_wavpack
select FFMPEG_CUSTOM_DECODER_wmav1
config FFMPEG_CUSTOM_SELECT_libopus
bool "Opus"
-config FFMPEG_CUSTOM_SELECT_speex
- bool "Speex"
-
config FFMPEG_CUSTOM_SELECT_x264
bool "x264"
depends on FFMPEG_CUSTOM_PATENTED
#
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=2.8.8
-PKG_RELEASE:=2
+PKG_VERSION:=3.2.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=5fae1ba5a5d37a2d0de750479b7270d4
+PKG_SOURCE_URL:=https://ffmpeg.org/releases/
+PKG_MD5SUM:=e34d1b92c5d844f2a3611c741a6dba18
+PKG_HASH:=3f01bd1fe1a17a277f8c84869e5d9192b4b978cb660872aa2b54c3cc8a2fedfc
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
define Package/libffmpeg-custom
$(call Package/libffmpeg/Default)
TITLE+= (custom)
- DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus +FFMPEG_CUSTOM_SELECT_speex:libspeex \
+ DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \
+PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib
VARIANT:=custom
define Package/libffmpeg-audio-dec
$(call Package/libffmpeg/Default)
TITLE+= (audio)
- DEPENDS+= +libspeex
VARIANT:=audio-dec
endef
define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
TITLE+= (full)
- DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus +libspeex
+ DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus
VARIANT:=full
endef
ifeq ($(CONFIG_SOFT_FLOAT),y)
FFMPEG_CONFIGURE += \
--disable-altivec \
+ --disable-vsx \
+ --disable-power8 \
--disable-amd3dnow \
--disable-amd3dnowext \
--disable-mmx \
--disable-fma3 \
--disable-fma4 \
--disable-avx2 \
+ --disable-aesni \
+ --disable-armv5te \
+ --disable-armv6 \
+ --disable-armv6t2 \
--disable-inline-asm \
- --disable-mips32r2 \
- --disable-mipsdspr1 \
+ --disable-mipsdsp \
--disable-mipsdspr2 \
--disable-mipsfpu \
+ --disable-msa \
+ --disable-mmi \
+ --disable-fast-unaligned \
--disable-runtime-cpudetect
else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
ifeq ($(BUILD_VARIANT),full)
FFMPEG_CONFIGURE+= \
--enable-libopus --enable-decoder=libopus \
- --enable-libspeex --enable-decoder=libspeex \
$(if $(CONFIG_PACKAGE_libx264),--enable-libx264) \
$(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame)
endif
--enable-libopus --enable-decoder=libopus
endif
-ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y)
- FFMPEG_CONFIGURE+= \
- --enable-libspeex --enable-decoder=libspeex
-endif
-
ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_x264),y)
FFMPEG_CONFIGURE+= \
--enable-libx264
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
$(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
- --enable-libspeex --enable-decoder=libspeex \
--disable-decoder=pcm_bluray,pcm_dvd \
endif
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
$(1)/usr/lib/pkgconfig/
- $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi/
# Note: this are compiled elsewhere because grilo refuses to
# generate VAPI files unless gobject-introspection exists;
# OpenWrt does not yet have a gobject-introspection package.
$(INSTALL_DATA) \
./files/*.vapi \
- $(STAGING_DIR)/host/share/vala-0.30/vapi
+ $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi
endef
define Package/grilo/install
PKG_NAME:=bcp38
PKG_VERSION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENCE:=GPL-3.0+
include $(INCLUDE_DIR)/package.mk
endef
define Package/bcp38/description
- bcp38 implements IETF BCP38 for home routers. See https://tools.ietf.org/html/bcp38.
+ bcp38 implements IETF BCP38 for home routers.
+ See https://tools.ietf.org/html/bcp38.
+
+ This package provides BCP38 for IPv4 only - IPv6 uses source
+ specific default routes, so no firewall configuration is needed.
endef
define Package/bcp38/conffiles
# There is a dhcp trigger to do this for the netmask of a
# double natted connection needed
+# You can only specify IPv4 addresses here - for IPv6, only source
+# specific default routes will be installed, which achieves the same
+# without needing any firewall routes.
+
# I will argue that this level of indirection doesn't scale
# very well - see how to block china as an example
# http://www.okean.com/china.txt
config BIND_ENABLE_FILTER_AAAA
bool
- default n
+ default y
prompt "Enable filtering of AAAA records returned to the client"
help
BIND 9 has an option to filter AAAA (IPv6 address) records
#
# Copyright (C) 2006-2012 OpenWrt.org
-# 2014-2016 Noah Meyerhans <frodo@morgul.net>
+# 2014-2017 Noah Meyerhans <frodo@morgul.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.10.4-P4
-PKG_RELEASE:=2
+PKG_VERSION:=9.10.4-P5
+PKG_RELEASE:=1
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
PKG_SOURCE_URL:= \
ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_MD5SUM:=e110904a1d54f83f01d4be8bcd842927
+PKG_MD5SUM:=c53a3e34e7aabb16820b036ae9afd3c9
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
#
-# Copyright (C) 2008-2016 OpenWrt.org
+# Copyright (C) 2008-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
#
PKG_VERSION:=2.7.6
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=9
+PKG_RELEASE:=11
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
###### *************************************************************************
define Package/$(PKG_NAME)/preinst
#!/bin/sh
- # if NOT run buildroot and PKG_UPGRADE then stop service
- [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # if NOT run buildroot then stop service
+ [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)/install
define Package/$(PKG_NAME)/postinst
#!/bin/sh
# if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled
- [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && {
+ [ -x /etc/uci-defaults/ddns ] && \
+ /etc/uci-defaults/ddns && \
+ rm -f /etc/uci-defaults/ddns >/dev/null 2>&1
+ /etc/init.d/ddns enabled && \
+ /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)/prerm
#!/bin/sh
# if run within buildroot exit
[ -n "$${IPKG_INSTROOT}" ] && exit 0
-
# stop running scripts
/etc/init.d/ddns stop
/etc/init.d/ddns disable
-
# clear LuCI indexcache
rm -f /tmp/luci-indexcache >/dev/null 2>&1
-
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_cloudflare/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare
- $(INSTALL_DIR) $(1)/usr/lib/ddns
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz $(1)/usr/share
+ $(INSTALL_DIR) $(1)/usr/lib/ddns
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns
endef
define Package/$(PKG_NAME)_cloudflare/postinst
#!/bin/sh
- # if NOT upgrading add entries
- [ "$${PKG_UPGRADE}" = "1" ] || {
- printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
- }
+ # remove old services file entries
+ /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ # and create new
+ printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+ printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
# on real system restart service if enabled
- [ -z "$${IPKG_INSTROOT}" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && {
+ [ -x /etc/uci-defaults/ddns_cloudflare ] && \
+ /etc/uci-defaults/ddns_cloudflare && \
+ rm -f /etc/uci-defaults/ddns_cloudflare >/dev/null 2>&1
+ /etc/init.d/ddns enabled && \
+ /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_cloudflare/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # remove services file entries
/bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
/bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_cloudflare.com-v4/postinst
#!/bin/sh
- # if NOT upgrading add entries
- [ "$${PKG_UPGRADE}" = "1" ] || {
- printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
- }
+ # remove old services file entries
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ # and create new
+ printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+ printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
# on real system restart service if enabled
- [ -z "$${IPKG_INSTROOT}" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && {
+ [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \
+ /etc/uci-defaults/ddns_cloudflare.com-v4 && \
+ rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1
+ /etc/init.d/ddns enabled && \
+ /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_cloudflare.com-v4/prerm
#!/bin/sh
+ # if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # remove services file entries
/bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
/bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_godaddy.com-v1/postinst
#!/bin/sh
- # if NOT upgrading add entries
- [ "$${PKG_UPGRADE}" = "1" ] || {
- printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
- }
+ # remove old services file entries
+ /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ # and create new
+ printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+ printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
# on real system restart service if enabled
- [ -z "$${IPKG_INSTROOT}" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && {
+ [ -x /etc/uci-defaults/ddns_godaddy.com-v1 ] && \
+ /etc/uci-defaults/ddns_godaddy.com-v1 && \
+ rm -f /etc/uci-defaults/ddns_godaddy.com-v1 >/dev/null 2>&1
+ /etc/init.d/ddns enabled \
+ && /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_godaddy.com-v1/prerm
#!/bin/sh
+ # if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # remove services file entries
/bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
/bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_no-ip_com/postinst
#!/bin/sh
- # if NOT upgrading add entries
- [ "$${PKG_UPGRADE}" = "1" ] || {
- printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- }
+ # remove old services file entries
+ /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ # and create new
+ printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
# on real system restart service if enabled
- [ -z "$${IPKG_INSTROOT}" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && {
+ [ -x /etc/uci-defaults/ddns_no-ip_com ] && \
+ /etc/uci-defaults/ddns_no-ip_com && \
+ rm -f /etc/uci-defaults/ddns_no-ip_com >/dev/null 2>&1
+ /etc/init.d/ddns enabled && \
+ /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_no-ip_com/prerm
#!/bin/sh
+ # if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # remove services file entries
/bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
exit 0 # suppress errors
endef
endef
define Package/$(PKG_NAME)_nsupdate/postinst
#!/bin/sh
- # if NOT upgrading add entries
- [ "$${PKG_UPGRADE}" = "1" ] || {
- printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
- }
+ # remove old services file entries
+ /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ # and create new
+ printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+ printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
# on real system restart service if enabled
- [ -z "$${IPKG_INSTROOT}" ] \
- && /etc/init.d/ddns enabled \
- && /etc/init.d/ddns start >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && {
+ [ -x /etc/uci-defaults/ddns_nsupdate ] && \
+ /etc/uci-defaults/ddns_nsupdate && \
+ rm -f /etc/uci-defaults/ddns_nsupdate >/dev/null 2>&1
+ /etc/init.d/ddns enabled && \
+ /etc/init.d/ddns start >/dev/null 2>&1
+ }
exit 0 # suppress errors
endef
define Package/$(PKG_NAME)_nsupdate/prerm
#!/bin/sh
+ # if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ # remove services file entries
/bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
/bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
exit 0 # suppress errors
#!/bin/sh
+g_pslfile=/usr/share/public_suffix_list.dat.gz
+[ -f "$g_pslfile" ] || g_pslfile="$(dirname $0)/public_suffix_list.dat.gz"
+
+g_pslerr=0
+g_cfgfile="ddns"
+
+# modify "cloudflare.com-v1" domain to new syntax
+# returns "host[.subdom]@domain.TLD" of given FQDN #############################
+mod_cloudflare_v1_domain() {
+ # $1 entry to validate/split
+ [ -f "$g_pslfile" ] || return 1
+
+ [ $# -ne 1 -o -z "$1" ] && \
+ { printf "%s\\n" "mod_cloudflare_v1_domain() - Invalid number of parameters" >&2; return 1; }
+
+ local mcd_fqdn=$1
+ local mcd_fsub=""
+ local mcd_fdom=""
+ local mcd_ctld=""
+ local mcd_ftld=""
+
+ # check if already new syntax, "@" inside string
+ if [ $( printf "%s" "$mcd_fqdn" | grep -cF "@" 2>/dev/null ) -gt 0 ]; then
+ # already done
+ printf "%s" "$mcd_fqdn"
+ return 0
+ fi
+
+ # we need to do in one line because otherwise sh doesn't work correctly
+ # to lower | replace "." to " " | awk invert word order
+ set -- $(printf %s "$mcd_fqdn" | tr [A-Z] [a-z] | tr "." " " \
+ | awk '{do printf "%s"(NF>1?OFS:ORS),$NF;while (--NF)}' )
+
+ while [ -n "${1:-}" ] ; do # as long we have parameters
+ if [ -z "$mcd_ctld" ]; then # first loop
+ mcd_ctld="$1" # CURRENT TLD to look at
+ shift
+ else
+ mcd_ctld="$1.$mcd_ctld" # Next TLD to look at
+ shift
+ fi
+ # check if TLD exact match in public_suffix_name.dat, save TLD
+ zcat $g_pslfile | grep -E "^$mcd_ctld$" >/dev/null 2>&1 && {
+ mcd_ftld="$mcd_ctld" # save found
+ mcd_fdom="${1:-}" # save domain next step might be invalid
+ continue
+ }
+ # check if match any "*" in public_suffix_name.dat,
+ zcat $g_pslfile | grep -E "^\*.$mcd_ctld$" >/dev/null 2>&1 && {
+ [ -z "${1:-}" ] && break # no more data break
+ # check if next level TLD match excludes "!" in tld_names.dat
+ if zcat $g_pslfile | grep -E "^!$1.$mcd_ctld$" >/dev/null 2>&1 ; then
+ mcd_ftld="$mcd_ctld" # Yes
+ else
+ mcd_ftld="$1.$mcd_ctld"
+ shift
+ fi
+ mcd_fdom="$1"; shift
+ }
+ [ -n "$mcd_ftld" ] && break # we have something valid, break
+ done
+
+ # the leftover parameters are the HOST/SUBDOMAIN
+ while [ -n "${1:-}" ]; do
+ mcd_fsub="${1}${mcd_fsub:+.$mcd_fsub}" # remember we need to invert
+ shift # and insert dot if mcd_fsub not empty
+ done
+
+ # now validate found data
+ [ -z "$mcd_ftld" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no TLD not found in '$mcd_fqdn'" >&1; return 1; }
+ [ -z "$mcd_fdom" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no registrable Domain not found in '$mcd_fqdn'" >&1; return 1; }
+
+ # return data
+ printf "%s" "${mcd_fsub:+${mcd_fsub}@}${mcd_fdom}.${mcd_ftld}"
+ return 0
+}
+
+# modify timer settings from interval and unit to dhms format
+timer2dhms() {
+# $1 Number and
+# $2 Unit of time interval
+ local t=0
+ case $2 in
+ days) t=$(( $1 * 86400 ));;
+ hours) t=$(( $1 * 3600 ));;
+ minutes) t=$(( $1 * 60 ));;
+ *) t=$1;;
+ esac
+
+ local d=$(( $t / 86400 ))
+ local h=$(( $t % 86400 / 3600 ))
+ local m=$(( $t % 3600 / 60 ))
+ local s=$(( $t % 60 ))
+ if [ $d -gt 0 ]; then printf "%dd %02dh %02dm %02ds" "$d" "$h" "$m" "$s"
+ elif [ $h -gt 0 ]; then printf "%dh %02dm %02ds" "$h" "$m" "$s"
+ elif [ $m -gt 0 ]; then printf "%dm %02ds" "$m" "$s"
+ else printf "%ds" "$s"; fi
+
+ unset d h m s t
+ return 0
+}
+
# using function to not confuse function calls with existing ones inside /lib/functions.sh
-update_ddns_config() {
- udc_uci="$(which uci) -q" # ignore errors
- udc_pkg="ddns"
- udc_cfg=""
- udc_name=""
- udc_var=""
- udc_val=""
+update_config() {
+ uc_uci="$(which uci) -q" # ignore errors
+ uc_cfg=""
+ uc_name=""
+ uc_var=""
+ uc_val=""
package() { return 0; }
config () {
- udc_cfg="$1"
- udc_name="$2"
+ uc_cfg="$1"
+ uc_name="$2"
# Type = ddns Name = global
- if [ "$udc_cfg" = "$udc_pkg" -a "$udc_name" = "global" ]; then
- option() { return 0; }
- # rename options
- $udc_uci rename $udc_pkg.$udc_name.allow_local_ip="upd_privateip"
- $udc_uci rename $udc_pkg.$udc_name.date_format="ddns_dateformat"
- $udc_uci rename $udc_pkg.$udc_name.log_dir="ddns_logdir"
- $udc_uci rename $udc_pkg.$udc_name.log_lines="ddns_loglines"
- $udc_uci rename $udc_pkg.$udc_name.run_dir="ddns_rundir"
+ if [ "$uc_cfg" = "$g_cfgfile" -a "$uc_name" = "global" ]; then
+ option() {
+ uc_var="$1"; shift
+ uc_val="$*"
+ case "$uc_var" in
+ allow_local_ip) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_privateip";;
+ date_format) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_dateformat";;
+ log_lines) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_loglines";;
+ log_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_logdir";;
+ run_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_rundir";;
+ # leave all other options currently unchanged
+ *) ;;
+ esac
+ }
# Type = service Name = ???
- elif [ "$udc_cfg" = "service" ]; then
+ elif [ "$uc_cfg" = "service" ]; then
option() {
- udc_var="$1"; shift
- udc_val="$*"
- # fix some option service_name values
- case "$udc_var" in
- service_name)
- case "$udc_val" in
+ uc_var="$1"; shift
+ uc_val="$*"
+ case "$uc_var" in
+ # fix some option service_name values
+ # and some settings for specific providers
+ service_name|upd_provider)
+ case "$uc_val" in
freedns\.afraid\.org|afraid\.org)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="afraid.org-keyauth";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="afraid.org-keyauth";;
Bind-nsupdate)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="bind-nsupdate";;
- CloudFlare|cloudflare\.com)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="cloudflare.com-v1";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="bind-nsupdate";;
+ CloudFlare|cloudflare\.com|cloudflare\.com-v1)
+ # verify if lookup_host is set
+ $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || {
+ ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null)
+ $uc_uci set $g_cfgfile.$uc_name.lookup_host="$ucv_domain"
+ }
+ if [ -f "$g_pslfile" ]; then
+ # change value of domain/upd_object to new syntax
+ # there is no sort order inside uci data so we need multiple checks
+ ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null)
+ ucv_object=$($uc_uci get $g_cfgfile.$uc_name.upd_object 2>/dev/null)
+ # still old option domain
+ if [ -n "$ucv_domain" ]; then
+ ucv_new=$(mod_cloudflare_v1_domain "$ucv_domain") || g_pslerr=1
+ # no error save data save data
+ [ $g_pslerr -eq 0 ] && \
+ $uc_uci set $g_cfgfile.$uc_name.domain="$ucv_new"
+ fi
+ # already new option upd_object
+ if [ -n "$ucv_object" ]; then
+ ucv_new=$(mod_cloudflare_v1_domain "$ucv_object") || g_pslerr=1
+ # no error save data save data
+ [ $g_pslerr -eq 0 ] && \
+ $uc_uci set $g_cfgfile.$uc_name.upd_object="$ucv_new"
+ fi
+ fi
+ unset ucv_domain ucv_object ucv_new
+ # set new option value
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="cloudflare.com-v1"
+ ;;
dyndns\.org|dyndns\.com)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="dyn.com";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="dyn.com";;
free\.editdns\.net)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="editdns.net";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="editdns.net";;
domains\.google\.com)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="google.com";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="google.com";;
loopia\.com)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="loopia.se";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="loopia.se";;
NoIP\.com|No-IP\.com)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="no-ip.com";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="no-ip.com";;
spdns\.de)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="spdyn.de";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="spdyn.de";;
strato\.de)
- $udc_uci set $udc_pkg.$udc_name.$udc_var="strato.com";;
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="strato.com";;
*)
# all others leave unchanged
;;
esac
# rename option service_name to option upd_provider
-# $udc_uci rename $udc_pkg.$udc_name.$udc_var="upd_provider"
+# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_provider"
;;
- *)
- # leave all other options currently unchanged
+ domain|upd_object)
+ # verify if lookup_host is set
+ $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || \
+ $uc_uci set $g_cfgfile.$uc_name.lookup_host="$uc_val"
+ if [ -f "$g_pslfile" ]; then
+ # if service_name/upd_provider cloudflare_v1 then change domain/upd_object to new syntax
+ # there is no sort order inside uci data so we need multiple checks
+ uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \
+ uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null)
+ if [ "$uco_provider" = "CloudFlare" \
+ -o "$uco_provider" = "cloudflare.com" \
+ -o "$uco_provider" = "cloudflare.com-v1" ]; then
+ ucv_new=$(mod_cloudflare_v1_domain "$uc_val") || g_pslerr=1
+ # no error save data save data
+ [ $g_pslerr -eq 0 ] && \
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="$ucv_new"
+ unset ucv_new
+ fi
+ unset uco_provider
+ fi
+ # rename option domain to option upd_object
+# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_object"
;;
+# dns_server)
+# # if bind-nsupdate takeover old "dns_server" value as new "upd_nsupd_server" value
+# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \
+# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null)
+# [ "$uco_provider" = "Bind-nsupdate" -o \
+# "$uco_provider" = "bind-nsupdate" ] && \
+# $uc_uci set $g_cfgfile.$uc_name.upd_nsupd_server="$uc_val"
+# # rename option dns_server to new option global_dnssvr
+# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="global_dnssvr"
+# ;;
+# bind_network)
+# $udc_uci set $g_cfgfile.$uc_name.upd_url_bindnet="$uc_val"
+# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_url_bindnet"
+# ;;
+# proxy)
+# # proxy value must include protocoll
+# $udc_uci set $g_cfgfile.$uc_name.$uc_var="http://$uc_val"
+# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_proxy"
+# ;;
+# use_ipv6)
+# $udc_uci set $g_cfgfile.$uc_name.$uc_var="$(( 4 + ( 2 * $uc_val ) ))"
+# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_ipversion"
+# TODO update_url)
+# TODO update_script)
+ # other renames
+# TODO lookup_host) -> rip_host
+# enabled) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_enabled";;
+# force_dnstcp) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_dnstcp";;
+# is_glue) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_isglue";;
+# ip_interface) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_iface";;
+# ip_network) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_net";;
+# use_https) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_secure";;
+# cacert) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_cacert";;
+# username) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_username";;
+# password) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_password";;
+# param_opt) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramopt";;
+# param_enc) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramenc";;
+
+ # leave all other options currently unchanged
+ *) ;;
esac
return 0
}
fi
}
- # read package config file
- udc_data=$($udc_uci -S -n export "$udc_pkg")
- udc_ret="$?"
- # No error and udc_data then execute (eval)
+ # read config file
+ uc_data=$($uc_uci -S -n export "$g_cfgfile")
+ uc_ret="$?"
+ # Error then create config file
+ [ $uc_ret -ne 0 ] && {
+ touch /etc/config/$uc_cfgfile
+ chmod 644 /etc/config/$uc_cfgfile
+ }
+ # No error and uc_data then execute (eval)
# this will call functions defined above
- [ "$udc_ret" -eq 0 -a -n "$udc_data" ] && eval "$udc_data"
+ [ $uc_ret -eq 0 -a -n "$uc_data" ] && eval "$uc_data"
# add config ddns "global" (ignore error if exists)
- $udc_uci set ddns.global="$udc_pkg"
+ $uc_uci set ddns.global="$g_cfgfile"
# write changes to config file
- $udc_uci commit "$udc_pkg"
+ $uc_uci commit "$g_cfgfile"
- unset udc_uci udc_pkg udc_cfg udc_name udc_var udc_val udc_ret udc_data
+ unset uc_uci uc_cfg uc_name uc_var uc_val uc_ret uc_data
return 0
}
-# do existing config update
-update_ddns_config
-
-# clear Ludc_uci indexcache
+# clear LuCI indexcache
rm -f /tmp/luci-indexcache >/dev/null 2>&1
+# do config update
+update_config
+
+#cleanup
+[ $g_pslerr -ne 0 ] && {
+ unset g_pslfile g_pslerr g_cfgfile
+ return 1
+}
+
+[ -f "$g_pslfile" ] && rm -f "$g_pslfile"
+unset g_pslfile g_pslerr g_cfgfile
return 0
+
# (Loosely) based on the script on the one posted by exobyte in the forums here:
# http://forum.openwrt.org/viewtopic.php?id=14040
# extended and partial rewritten
-#.2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2014-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
#
# function timeout
# copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh
# Global configuration settings
# allow NON-public IP's
-upd_privateip=$(uci -q get ddns.global.allow_local_ip) || upd_privateip=0
+upd_privateip=$(uci -q get ddns.global.upd_privateip) || upd_privateip=0
# directory to store run information to.
-ddns_rundir=$(uci -q get ddns.global.run_dir) || ddns_rundir="/var/run/ddns"
+ddns_rundir=$(uci -q get ddns.global.ddns_rundir) || ddns_rundir="/var/run/ddns"
[ -d $ddns_rundir ] || mkdir -p -m755 $ddns_rundir
# directory to store log files
-ddns_logdir=$(uci -q get ddns.global.log_dir) || ddns_logdir="/var/log/ddns"
+ddns_logdir=$(uci -q get ddns.global.ddns_logdir) || ddns_logdir="/var/log/ddns"
[ -d $ddns_logdir ] || mkdir -p -m755 $ddns_logdir
# number of lines to before rotate logfile
-ddns_loglines=$(uci -q get ddns.global.log_lines) || ddns_loglines=250
+ddns_loglines=$(uci -q get ddns.global.ddns_loglines) || ddns_loglines=250
ddns_loglines=$((ddns_loglines + 1)) # correct sed handling
# format to show date information in log and luci-app-ddns default ISO 8601 format
-ddns_dateformat=$(uci -q get ddns.global.date_format) || ddns_dateformat="%F %R"
+ddns_dateformat=$(uci -q get ddns.global.ddns_dateformat) || ddns_dateformat="%F %R"
DATE_PROG="date +'$ddns_dateformat'"
# USE_CURL if GNU Wget and cURL installed normally Wget is used by do_transfer()
write_log 3 "$__PROG error: '$__ERR'"
write_log 7 "$(cat $ERRFILE)"
else
- if [ -n "$BIND_HOST" ]; then
+ if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then
if [ $is_glue -eq 1 ]; then
__DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -om1 "$__REGEX" )
else
__DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
fi
- elif [ -n "$KNOT_HOST" ]; then
- __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
elif [ -n "$DRILL" ]; then
__DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' )
elif [ -n "$HOSTIP" ]; then
__DATA=$(cat $DATFILE | grep -om1 "$__REGEX")
elif [ -n "$NSLOOKUP" ]; then
- __DATA=$(cat $DATFILE | sed -e '1,/Name:/d' | grep -om1 "$__REGEX" )
+ __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" )
fi
[ -n "$__DATA" ] && {
write_log 7 "Registered IP '$__DATA' detected"
# /usr/lib/ddns/dynamic_dns_lucihelper.sh
#
#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#.2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2014-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
# This script is used by luci-app-ddns
#
# variables in small chars are read from /etc/config/ddns as parameter given here
# (Loosely) based on the script on the one posted by exobyte in the forums here:
# http://forum.openwrt.org/viewtopic.php?id=14040
# extended and partial rewritten
-#.2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2014-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
#
# variables in small chars are read from /etc/config/ddns
# variables in big chars are defined inside these scripts as global vars
if [ $LAST_TIME -eq 0 ]; then
write_log 7 "last update: never"
else
- EPOCH_TIME=$(( $(date +%s) - CURR_TIME + LAST_TIME ))
+ EPOCH_TIME=$(( $(date +%s) - $CURR_TIME + $LAST_TIME ))
EPOCH_TIME="date -d @$EPOCH_TIME +'$ddns_dateformat'"
write_log 7 "last update: $(eval $EPOCH_TIME)"
fi
in.rs
org.rs
-// ru : http://www.cctld.ru/ru/docs/aktiv_8.php
-// Industry domains
+// ru : https://cctld.ru/en/domains/domens_ru/reserved/
ru
ac.ru
-com.ru
edu.ru
-int.ru
-net.ru
-org.ru
-pp.ru
-// Geographical domains
-adygeya.ru
-altai.ru
-amur.ru
-arkhangelsk.ru
-astrakhan.ru
-bashkiria.ru
-belgorod.ru
-bir.ru
-bryansk.ru
-buryatia.ru
-cbg.ru
-chel.ru
-chelyabinsk.ru
-chita.ru
-chukotka.ru
-chuvashia.ru
-dagestan.ru
-dudinka.ru
-e-burg.ru
-grozny.ru
-irkutsk.ru
-ivanovo.ru
-izhevsk.ru
-jar.ru
-joshkar-ola.ru
-kalmykia.ru
-kaluga.ru
-kamchatka.ru
-karelia.ru
-kazan.ru
-kchr.ru
-kemerovo.ru
-khabarovsk.ru
-khakassia.ru
-khv.ru
-kirov.ru
-koenig.ru
-komi.ru
-kostroma.ru
-krasnoyarsk.ru
-kuban.ru
-kurgan.ru
-kursk.ru
-lipetsk.ru
-magadan.ru
-mari.ru
-mari-el.ru
-marine.ru
-mordovia.ru
-// mosreg.ru Bug 1090800 - removed at request of Aleksey Konstantinov <konstantinovav@mosreg.ru>
-msk.ru
-murmansk.ru
-nalchik.ru
-nnov.ru
-nov.ru
-novosibirsk.ru
-nsk.ru
-omsk.ru
-orenburg.ru
-oryol.ru
-palana.ru
-penza.ru
-perm.ru
-ptz.ru
-rnd.ru
-ryazan.ru
-sakhalin.ru
-samara.ru
-saratov.ru
-simbirsk.ru
-smolensk.ru
-spb.ru
-stavropol.ru
-stv.ru
-surgut.ru
-tambov.ru
-tatarstan.ru
-tom.ru
-tomsk.ru
-tsaritsyn.ru
-tsk.ru
-tula.ru
-tuva.ru
-tver.ru
-tyumen.ru
-udm.ru
-udmurtia.ru
-ulan-ude.ru
-vladikavkaz.ru
-vladimir.ru
-vladivostok.ru
-vologda.ru
-voronezh.ru
-vrn.ru
-vyatka.ru
-yakutia.ru
-yamal.ru
-yaroslavl.ru
-yekaterinburg.ru
-yuzhno-sakhalinsk.ru
-// More geographical domains
-amursk.ru
-baikal.ru
-cmw.ru
-fareast.ru
-jamal.ru
-kms.ru
-k-uralsk.ru
-kustanai.ru
-kuzbass.ru
-mytis.ru
-nakhodka.ru
-nkz.ru
-norilsk.ru
-oskol.ru
-pyatigorsk.ru
-rubtsovsk.ru
-snz.ru
-syzran.ru
-vdonsk.ru
-zgrad.ru
-// State domains
gov.ru
+int.ru
mil.ru
-// Technical domains
test.ru
// rw : http://www.nic.rw/cgi-bin/policy.pl
// Submitted by Alex Hanselka <alex@gitlab.com>
gitlab.io
+// UKHomeOffice : https://www.gov.uk/government/organisations/home-office
+// Submitted by Jon Shanks <jon.shanks@digital.homeoffice.gov.uk>
+homeoffice.gov.uk
+
// GlobeHosting, Inc.
// Submitted by Zoltan Egresi <egresi@globehosting.com>
ro.im
// Submitted by Simon Kissel <hostmaster@viprinet.com>
router.management
+// Western Digital Technologies, Inc : https://www.wdc.com
+// Submitted by Jung Jin <jungseok.jin@wdc.com>
+remotewd.com
+
// Wikimedia Labs : https://wikitech.wikimedia.org
// Submitted by Yuvi Panda <yuvipanda@wikimedia.org>
wmflabs.org
// Submitted by Olli Vanhoja <olli@zeit.co>
now.sh
+// 1GB LLC : https://www.1gb.ua/
+// Submitted by 1GB LLC <noc@1gb.com.ua>
+cc.ua
+inf.ua
+ltd.ua
+
// ===END PRIVATE DOMAINS===
#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
#
# script for sending updates to cloudflare.com
-#.2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2014-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
# many thanks to Paul for testing and feedback during development
#
# This script is parsed by dynamic_dns_functions.sh inside send_update() function
[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD
-
-# split given Host/Domain into TLD, registrable domain, and subdomain
-split_FQDN $domain __TLD __DOMAIN __SUBDOM
-[ $? -ne 0 -o -z "$__DOMAIN" ] && \
- write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!"
-
-# put together what we need
-__DOMAIN="$__DOMAIN.$__TLD"
+local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __FQDN
+
+# split __SUBDOM __DOMAIN from $domain
+# given data:
+# @example.com for "domain record"
+# host.sub@example.com for a "host record"
+__SUBDOM=$(printf %s "$domain" | cut -d@ -f1)
+__DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
+
+# Cloudflare v1 needs:
+# __DOMAIN = the base domain i.e. example.com
+# __SUBDOM = the host.sub to change if a "host record" or blank if domain record
+# __FQDN = the FQDN to detect record_id to change
+# i.e. example.com for the "domain record" or host.sub.example.com for "host record"
+if [ -z "$__SUBDOM" -o "$__SUBDOM" = "$__DOMAIN" ]; then
+ __SUBDOM=""
+ __FQDN="$__DOMAIN"
+else
+ __FQDN="${__SUBDOM}.${__DOMAIN}"
+fi
# parse OpenWrt script with
# functions for parsing and generating json
# json_get_var __DISPLAY "display_name" # for debugging
json_get_var __NAME "name"
json_get_var __TYPE "type"
- if [ "$__NAME" = "$domain" ]; then
+ if [ "$__NAME" = "$__FQDN" ]; then
# we must verify IPv4 and IPv6 because there might be both for the same host
[ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && {
__FOUND=1 # mark found
}
json_get_var __RECID "rec_id" # last thing to do get rec_id
json_cleanup # cleanup
- write_log 7 "rec_id '$__RECID' detected for host/domain '$domain'"
+ write_log 7 "rec_id '$__RECID' detected for host/domain '$__FQDN'"
}
# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
# script for sending updates to cloudflare.com
#.based on Ben Kulbertis cloudflare-update-record.sh found at http://gist.github.com/benkulbertis
#.and on George Johnson's cf-ddns.sh found at https://github.com/gstuartj/cf-ddns.sh
-#.2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2016-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
# CloudFlare API documentation at https://api.cloudflare.com/
#
# This script is parsed by dynamic_dns_functions.sh inside send_update() function
local __URLBASE="https://api.cloudflare.com/client/v4"
# split __HOST __DOMAIN from $domain
+# given data:
+# @example.com for "domain record"
+# host.sub@example.com for a "host record"
__HOST=$(printf %s "$domain" | cut -d@ -f1)
__DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
-# __HOST != __DOMAIN then host@domain.tld => host.domain.tld
-[ "$__HOST" = "$__DOMAIN" ] || __HOST=$(printf %s "$domain" | tr "@" ".")
+# Cloudflare v4 needs:
+# __DOMAIN = the base domain i.e. example.com
+# __HOST = the FQDN of record to modify
+# i.e. example.com for the "domain record" or host.sub.example.com for "host record"
+
+# handling domain record then set __HOST = __DOMAIN
+[ -z "$__HOST" ] && __HOST=$__DOMAIN
+# handling host record then rebuild fqdn host@domain.tld => host.domain.tld
+[ "$__HOST" != "$__DOMAIN" ] && __HOST="${__HOST}.${__DOMAIN}"
# set record type
[ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA"
#
# script for sending updates to godaddy.com
#.based on GoDaddy.sh v1.0 by Nazar78 @ TeaNazaR.com
-#.2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
# GoDaddy Documentation at https://developer.godaddy.com/doc
#
# This script is parsed by dynamic_dns_functions.sh inside send_update() function
local __HOST __DOMAIN __TYPE __URL __PRGBASE __RUNPROG __DATA __IPV6
# split __HOST __DOMAIN from $domain
+# given data:
+# @example.com for "domain record"
+# host.sub@example.com for a "host record"
__HOST=$(printf %s "$domain" | cut -d@ -f1)
__DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
-[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40" # no expizit host given so set to default "@" => urlencode "%40"
+
+# GoDaddy needs:
+# __DOMAIN = the base domain i.e. example.com
+# __HOST = host.sub if updating a host record or
+# __HOST = "@" urlencoded "%40" for a domain record
+[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40"
# set record type
[ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA"
include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy
-PKG_VERSION:=1.8.0
+PKG_VERSION:=1.9.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy
-PKG_MD5SUM:=dfc59de962b31709b8ba277c6cbb9768dde5104c3b2f2f039a3533703e90475c
+PKG_MD5SUM:=4f593faeba9facb4718caa011d76497b3e813b110f3a2a44a25c9c950ac74129
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
# ephemeral keys option requires extra CPU cycles and can cause huge system load
# option ephemeral_keys '0'
# more details at https://github.com/jedisct1/dnscrypt-proxy#public-key-client-authentication
- # option client_key ''
+ # option client_key '/path/to/client_key'
+ # option syslog '1'
+ # option syslog_prefix 'dnscrypt-proxy'
+ # option query_log_file '/path/to/logfile'
+ # enable cache may speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster
+ # option local_cache '0'
+ # disable IPv6 may also speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster
+ # option block_ipv6 '0'
+ # Blacklists allow you to block domains, ip, ... see https://github.com/jedisct1/dnscrypt-proxy/wiki/Filtering
+ # list blacklist 'domains:/path/to/domains-blacklist-file.txt'
+ # list blacklist 'domains:/path/to/domains-blacklist2-file.txt'
# config dnscrypt-proxy ns2
# option address '127.0.0.1'
START=50
USE_PROCD=1
PROG=/usr/sbin/dnscrypt-proxy
+CONFIG_DIR=/var/etc
+USER=nobody
-dnscrypt_instance() {
- local address port resolver resolvers_list ephemeral_keys client_key
+dnscrypt_instance() {
+ local config_path="$CONFIG_DIR/dnscrypt-proxy-$1.conf"
+ create_config_file $1 "$config_path"
- config_get address $1 'address'
- config_get port $1 'port'
- config_get resolver $1 'resolver' ''
- config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv'
- config_get_bool ephemeral_keys $1 'ephemeral_keys' '0'
- config_get client_key $1 'client_key' ''
+ procd_open_instance
+ procd_set_param command $PROG "$config_path"
+ procd_close_instance
+}
+
+create_config_file() {
+ local address port resolver resolvers_list ephemeral_keys client_key syslog syslog_prefix local_cache query_log_file block_ipv6
+ local config_path="$2"
+
+ [ ! -d "$CONFIG_DIR" ] && mkdir -p "$CONFIG_DIR"
+ [ -f "$config_path" ] && rm "$config_path"
+
+ config_get address $1 'address' '127.0.0.1'
+ config_get port $1 'port' '5353'
+ config_get resolver $1 'resolver' ''
+ config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv'
+ config_get client_key $1 'client_key' ''
+ config_get syslog_prefix $1 'syslog_prefix' 'dnscrypt-proxy'
+ config_get query_log_file $1 'query_log_file' ''
+ config_get_bool syslog $1 'syslog' '1'
+ config_get_bool ephemeral_keys $1 'ephemeral_keys' '0'
+ config_get_bool local_cache $1 'local_cache' '0'
+ config_get_bool block_ipv6 $1 'block_ipv6' '0'
+
+ append_param_not_empty "ResolverName" "$resolver" $config_path
+ append_param "ResolversList" "$resolvers_list" $config_path
+ append_param "User" "$USER" $config_path
+ append_param "LocalAddress" "$address:$port" $config_path
+ append_param_not_empty "ClientKey" "$client_key" $config_path
+ append_on_off "EphemeralKeys" $ephemeral_keys $config_path
+ append_on_off "Syslog" $syslog $config_path
+ append_param "SyslogPrefix" "$syslog_prefix" $config_path
+ append_on_off "LocalCache" $local_cache $config_path
+ append_param_not_empty "QueryLogFile" "$query_log_file" $config_path
+ append_yes_no "BlockIPv6" $block_ipv6 $config_path
+
+ config_list_foreach $1 'blacklist' append_blacklists $config_path
+}
+
+append_on_off() {
+ local param_name=$1
+ local param_value=$2
+ local config_path=$3
+ local value
+
+ if [ $param_value -eq 1 ]
+ then
+ value="on"
+ else
+ value="off"
+ fi
+
+ echo "$param_name $value" >> $config_path
+}
+
+append_yes_no() {
+ local param_name=$1
+ local param_value=$2
+ local config_path=$3
+ local value
+
+ if [ $param_value -eq 1 ]
+ then
+ value="yes"
+ else
+ value="no"
+ fi
+
+ echo "$param_name $value" >> $config_path
+}
+
+append_param() {
+ local param_name=$1
+ local param_value=$2
+ local config_path=$3
+
+ echo "$param_name $param_value" >> $config_path
+}
+
+append_param_not_empty() {
+ local param_name=$1
+ local param_value=$2
+ local config_path=$3
+
+ if [ ! -z "$param_value" -a "$param_value" != " " ]
+ then
+ append_param "$param_name" "$param_value" "$config_path"
+ fi
+}
- procd_open_instance
- procd_set_param command $PROG -u nobody -S
- procd_append_param command -a "$address:$port"
- procd_append_param command -L $resolvers_list
- [ -n "$resolver" ] && procd_append_param command -R $resolver
- [ $ephemeral_keys -eq 1 ] && procd_append_param command -E
- [ -n "$client_key" ] && procd_append_param command -K $client_key
- procd_close_instance
+append_blacklists() {
+ local value="$1"
+ local config_path="$2"
+ append_param_not_empty "BlackList" "$value" $config_path
}
start_service() {
- config_load dnscrypt-proxy
- config_foreach dnscrypt_instance dnscrypt-proxy
+ config_load dnscrypt-proxy
+ config_foreach dnscrypt_instance dnscrypt-proxy
}
service_triggers() {
- procd_add_reload_trigger 'dnscrypt-proxy'
+ procd_add_reload_trigger 'dnscrypt-proxy'
}
#
-# Copyright (C) 2015 Thomas Weißschuh
+# Copyright (C) 2015-2016 Thomas Weißschuh
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=esniper
-PKG_VERSION:=2.31.0
+PKG_VERSION:=2.32.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(VERSION_TRANSFORMED)
PKG_SOURCE:=$(PKG_NAME)-$(VERSION_TRANSFORMED).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_MD5SUM:=4b411588c4a223acef7333ab684c7618
+PKG_MD5SUM:=5ee3e5237c6a12059ae9d38380505d38448c2c12787f9fcc603cdb0a1a519312
PKG_BUILD_PARALLEL:=1
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=948983f991c6fa623cf008826b62a6142dafa189
-PKG_VERSION:=0.10.2-git-20161127-$(PKG_SOURCE_VERSION)
+PKG_SOURCE_VERSION:=a4295da3df82817ff2fe1fa547374a96a2e0280b
+PKG_VERSION:=0.10.2-git-20170111-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
-# ToDo:
-# - package testing stuff
-
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://gnunet.org/git/gnunet.git
--with-ltdl \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
- $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
+ $(if $(CONFIG_PACKAGE_libsqlite3),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
+ --disable-testing \
+ --disable-testruns \
+ --disable-wachs \
--enable-experimental \
--with-extractor=$(STAGING_DIR)/usr \
--with-gnutls=$(STAGING_DIR)/usr \
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
- ( for bin in arm ats cadet core config ecc identity nat nat-server nse \
+ ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
peerinfo revocation scalarproduct statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
( for lib in arm ats block cadet core datacache dht \
- dns dnsparser fragmentation friends hello identity nat natnew nse \
+ dns dnsparser fragmentation friends hello identity natauto natnew nse \
peerinfo regexblock regex revocation scalarproduct set \
statistics transport util; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
( for lex in daemon-topology helper-nat-client \
helper-nat-server service-arm service-ats service-cadet \
- service-core service-dht service-identity service-nse \
- service-peerinfo service-regex \
+ service-core service-dht service-identity service-nat service-nat-auto \
+ service-nse service-peerinfo service-regex \
service-revocation service-scalarproduct-alice \
service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-statistics \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
done )
- ( for conf in arm ats cadet core datacache dht identity \
- nat nse peerinfo regex revocation scalarproduct \
+ ( for conf in arm ats cadet core datacache dht identity identity-provider \
+ nat nat-auto nse peerinfo regex revocation scalarproduct \
set statistics topology transport util; do \
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
done )
USERID_gns:=gnunet=958:gnunetdns=452
BIN_gns:=gns gns-import.sh namecache namestore resolver
LIB_gns:=gns gnsrecord namecache namestore
-PLUGIN_gns:=block_dns block_gns gnsrecord_dns gnsrecord_gns
-LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver
-CONF_gns:=dns gns namecache namestore resolver
+PLUGIN_gns:=block_dns block_gns gnsrecord_dns gnsrecord_gns gnsrecord_identity
+LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
+CONF_gns:=dns gns namecache namestore resolver zonemaster
DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd
LIBEXEC_namestore-fcfsd:=namestore-fcfsd
PLUGIN_social-pgsql:=psycstore_postgres
CONFLICTS_social-pgsql:=gnunet-social-sqlite gnunet-social-mysql
-DEPENDS_sqlite:=+libsqlite3
-
-DEPENDS_gns-sqlite:=+gnunet-sqlite +gnunet-gns
+DEPENDS_gns-sqlite:=+libsqlite3 +gnunet-gns
PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
CONFLICTS_gns-sqlite:=gnunet-gns-flat
-DEPENDS_peerstore-sqlite:=+gnunet-sqlite +gnunet-peerstore
+DEPENDS_peerstore-sqlite:=+libsqlite3 +gnunet-peerstore
PLUGIN_peerstore-sqlite:=peerstore_sqlite
CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
-DEPENDS_dhtcache-sqlite:=+gnunet-sqlite
+DEPENDS_dhtcache-sqlite:=+libsqlite3
PLUGIN_dhtcache-sqlite:=datacache_sqlite
-DEPENDS_fs-sqlite:=+gnunet-sqlite +gnunet-datastore
+DEPENDS_fs-sqlite:=+libsqlite3 +gnunet-datastore
PLUGIN_fs-sqlite:=datastore_sqlite
-LIBEXEC_fs-sqlite:=daemon-latency-logger
-DEPENDS_social-sqlite:=+gnunet-sqlite +gnunet-social
+DEPENDS_social-sqlite:=+libsqlite3 +gnunet-social
PLUGIN_social-sqlite:=psycstore_sqlite
DEPENDS_transport-bluetooth:=+bluez-libs
LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
DEPENDS_utils:=+certtool +openssl-util
-BIN_utils:=gns-proxy-setup-ca transport-certificate-creation scrypt
+BIN_utils:=gns-proxy-setup-ca transport-certificate-creation
DEPENDS_vpn:=+kmod-tun +iptables +firewall
BIN_vpn:=vpn
$(eval $(call BuildComponent,fs-pgsql,PostgreSQL filesharing plugin,))
$(eval $(call BuildComponent,gns-pgsql,PostgreSQL GNS plugins,))
$(eval $(call BuildComponent,social-pgsql,PostgreSQL social plugin,))
-$(eval $(call BuildComponent,sqlite,libsqlite3 storage backends,))
$(eval $(call BuildComponent,dhtcache-sqlite,libsqlite3 dhtcache plugin,))
$(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugin,))
$(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,))
include $(TOPDIR)/rules.mk
PKG_NAME:=https_dns_proxy
-PKG_VERSION:=2016-09-04
-PKG_RELEASE=1
+PKG_VERSION:=2017-01-07
+PKG_RELEASE=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=9e617b76bfd97adfff23e0e8bf2862ce4aee8682
+PKG_SOURCE_VERSION:=c62ce3f6807a4067230a8bc5ea5a829f532de785
PKG_MAINTAINER:=Aaron Drew <aarond10@gmail.com>
PKG_LICENSE:=MIT
procd_open_instance
procd_set_param command ${PROG} \
- -l "$listen_addr" -p "$listen_port" \
+ -a "$listen_addr" -p "$listen_port" \
-u "$user" -g "$group"
procd_set_param respawn
procd_close_instance
include $(TOPDIR)/rules.mk
PKG_NAME:=iotivity
-PKG_VERSION:=1.1.0
+PKG_VERSION:=1.2.1
PKG_RELEASE=1
PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
-PKG_MD5SUM:=98f8d5b0304c357520c4343d983491e2
+PKG_MD5SUM:=7dcd9f0f48263c6b27a2c3d085dd7278b5c0feed1dfec8872a04899707fa23d8
PKG_USE_MIPS16:=0
PKG_BUILD_DEPENDS:=boost
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_iotivity \
CONFIG_PACKAGE_iotivity-cpp \
- CONFIG_PACKAGE_iotivity-things-manager-lib \
+ CONFIG_PACKAGE_iotivity-resource-directory-lib \
CONFIG_PACKAGE_iotivity-oic-middle \
- CONFIG_PACKAGE_iotivity-things-manager \
CONFIG_PACKAGE_iotivity-resource-container-lib \
CONFIG_PACKAGE_iotivity-resource-container-sample \
CONFIG_PACKAGE_iotivity-resource-container-hue \
CONFIG_PACKAGE_iotivity-example-garage \
+ CONFIG_PACKAGE_iotivity-example-simple \
CONFIG_PACKAGE_iotivity_DEBUG \
CONFIG_PACKAGE_iotivity_SECURE
define Package/iotivity
SECTION:=net
CATEGORY:=Network
- DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid
+ DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid +libsqlite3 +PACKAGE_iotivity_SECURE:libmbedtls
TITLE:=IoTivity C Library
URL:=https://www.iotivity.org
MENU:=1
config PACKAGE_iotivity_SECURE
bool "IoTivity with security support"
- default y
help
Activate security support.
+ config PACKAGE_iotivity_LOGGING
+ bool "IoTivity with logging support"
+ default y
+ help
+ Activate logging support.
+ This will make IoTivity write a lot of log messages to stdout.
endif
endef
Open Interconnect Consortium Specification.
endef
-
-define Package/iotivity-things-manager-lib
+define Package/iotivity-resource-directory-lib
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+iotivity +iotivity-cpp +libstdcpp
- TITLE:=IoTivity things manager lib
+ DEPENDS:=+iotivity +iotivity-cpp
+ TITLE:=IoTivity Resource Directory library
URL:=https://www.iotivity.org
endef
-define Package/iotivity-things-manager-lib/description
- IoTivity things-manager lib
-endef
-
define Package/iotivity-oic-middle
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+iotivity +iotivity-cpp
+ DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib
TITLE:=IoTivity OIC Middle
URL:=https://www.iotivity.org
endef
IoTivity OIC Middle
endef
-
-define Package/iotivity-things-manager
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+iotivity +iotivity-cpp +iotivity-things-manager-lib
- TITLE:=IoTivity things manager
- URL:=https://www.iotivity.org
-endef
-
-define Package/iotivity-things-manager/description
- IoTivity things manager
-endef
-
define Package/iotivity-resource-container-lib
SECTION:=net
CATEGORY:=Network
define Package/iotivity-example-garage
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+iotivity +iotivity-cpp
+ DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib
TITLE:=IoTivity Garage example
URL:=https://www.iotivity.org
endef
An IoTivity example application
endef
+define Package/iotivity-example-simple
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib
+ TITLE:=IoTivity simple client + server
+ URL:=https://www.iotivity.org
+endef
+
+define Package/iotivity-example-simple/description
+ The IoTivity simple client and simple server exmaple
+endef
+
PKG_TINYCBOR_NAME:=tinycbor
-PKG_TINYCBOR_VERSION:=43e3ac9490cf19459ec7b7bd13df3b66810fb62a
-PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
PKG_TINYCBOR_PROTO:=git
+PKG_TINYCBOR_VERSION:=0.4
+PKG_TINYCBOR_SOURCE_VERSION:=a088996aa5f59b4f27f20fadad053d88bee357d4
+PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git
PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME)
-#PKG_TINYCBOR_MIRROR_MD5SUM:=?
define Download/iotivity-tinycbor
FILE:=$(PKG_TINYCBOR_SOURCE)
URL:=$(PKG_TINYCBOR_SOURCE_URL)
PROTO:=$(PKG_TINYCBOR_PROTO)
- VERSION:=$(PKG_TINYCBOR_VERSION)
+ VERSION:=$(PKG_TINYCBOR_SOURCE_VERSION)
SUBDIR:=$(PKG_TINYCBOR_SUBDIR)
- #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
endef
$(eval $(call Download,iotivity-tinycbor))
-PKG_SQLITE_NAME:=sqlite
-PKG_SQLITE_VERSION:=3081101
-PKG_SQLITE_SOURCE:=$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION).zip
-PKG_SQLITE_SOURCE_URL:=http://www.sqlite.org/2015/
-PKG_SQLITE_SUBDIR:=$(PKG_SQLITE_NAME)
-PKG_SQLITE_MD5SUM:=94907e831502e2080b76e281cfa24dde
-
-define Download/iotivity-sqlite
- FILE:=$(PKG_SQLITE_SOURCE)
- URL:=$(PKG_SQLITE_SOURCE_URL)
- VERSION:=$(PKG_SQLITE_VERSION)
- SUBDIR:=$(PKG_SQLITE_SUBDIR)
- MD5SUM:=$(PKG_SQLITE_MD5SUM)
-endef
-$(eval $(call Download,iotivity-sqlite))
+EXTRA_CXXFLAGS += -std=gnu++11
SCONS_OPTIONS += \
TARGET_OS=linux \
TARGET_TRANSPORT=IP \
TARGET_ARCH=$(ARCH) \
STAGING_DIR=$(STAGING_DIR) \
- LOGGING=true \
- $(if $(CONFIG_PACKAGE_iotivity),liboctbstack) \
- $(if $(CONFIG_PACKAGE_iotivity-cpp),liboc) \
- $(if $(CONFIG_PACKAGE_iotivity-things-manager-lib),libTGMSDK) \
+ WITH_ENV=true \
+ octbstack oc \
$(if $(CONFIG_PACKAGE_iotivity-oic-middle),examples) \
- $(if $(CONFIG_PACKAGE_iotivity-things-manager),ConServerApp ConClientApp BootstrapServerApp) \
$(if $(CONFIG_PACKAGE_iotivity-resource-container-lib),libResContainer) \
$(if $(CONFIG_PACKAGE_iotivity-resource-container-sample),containersample) \
$(if $(CONFIG_PACKAGE_iotivity-resource-container-hue),libHueBundle) \
$(if $(CONFIG_PACKAGE_iotivity-example-garage),examples) \
+ $(if $(CONFIG_PACKAGE_iotivity-example-simple),examples) \
+ install
ifeq ($(CONFIG_PACKAGE_iotivity_DEBUG),y)
SCONS_OPTIONS += RELEASE=false
SCONS_OPTIONS += SECURED=0
endif
+ifeq ($(CONFIG_PACKAGE_iotivity_LOGGING),y)
+ SCONS_OPTIONS += LOGGING=true
+endif
+
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
SCONS_OPTIONS += VERBOSE=true
endif
define Build/Prepare
$(call Build/Prepare/Default)
$(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE)
- unzip -d $(PKG_BUILD_DIR)/extlibs/sqlite3/ $(DL_DIR)/$(PKG_SQLITE_SOURCE)
- mv $(PKG_BUILD_DIR)/extlibs/sqlite3/$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION)/sqlite3.h $(PKG_BUILD_DIR)/extlibs/sqlite3/
- mv $(PKG_BUILD_DIR)/extlibs/sqlite3/$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION)/sqlite3.c $(PKG_BUILD_DIR)/extlibs/sqlite3/
endef
define Package/iotivity/install
$(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/
ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y)
$(INSTALL_DIR) $(1)/etc/iotivity/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/
endef
-define Package/iotivity-things-manager-lib/install
+define Package/iotivity-resource-directory-lib/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libTGMSDKLibrary.so $(1)/usr/lib/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/
endef
define Package/iotivity-oic-middle/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/examples/OICMiddle/OICMiddle $(1)/usr/bin/
endef
-define Package/iotivity-things-manager/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/
-endef
-
define Package/iotivity-resource-container-lib/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_common.so $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/garageserver $(1)/usr/bin/
endef
+define Package/iotivity-example-simple/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleclient $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleserver $(1)/usr/bin/
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/include $(1)/usr/include/iotivity
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/
+endef
+
$(eval $(call BuildPackage,iotivity))
$(eval $(call BuildPackage,iotivity-cpp))
-$(eval $(call BuildPackage,iotivity-things-manager-lib))
+$(eval $(call BuildPackage,iotivity-resource-directory-lib))
$(eval $(call BuildPackage,iotivity-oic-middle))
-$(eval $(call BuildPackage,iotivity-things-manager))
$(eval $(call BuildPackage,iotivity-resource-container-lib))
$(eval $(call BuildPackage,iotivity-resource-container-sample))
$(eval $(call BuildPackage,iotivity-resource-container-hue))
$(eval $(call BuildPackage,iotivity-example-garage))
+$(eval $(call BuildPackage,iotivity-example-simple))
{
"href": "/oic/res",
"rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.wk.res"],
+ "if": ["oic.if.ll"]
},
{
"href": "/oic/d",
"rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.wk.d"],
+ "if": ["oic.if.baseline", "oic.if.r"]
},
{
"href": "/oic/p",
"rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/res/d",
- "rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/res/types/d",
- "rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/ad",
- "rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.wk.p"],
+ "if": ["oic.if.baseline", "oic.if.r"]
},
{
"href": "/oic/sec/acl",
"rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/sec/amacl",
- "rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/sec/doxm",
- "rel": "",
- "rt": "",
- "if": ""
- },
- {
- "href": "/oic/sec/pstat",
- "rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.r.acl"],
+ "if": ["oic.if.baseline"]
}
],
"permission": 2
},
{
- "subjectuuid": "32323232-3232-3232-3232-323232323232",
+ "subjectuuid": "*",
"resources": [
{
- "href": "/oic/sec/acl",
+ "href": "/oic/sec/doxm",
"rel": "",
- "rt": "",
- "if": ""
- } ,
+ "rt": ["oic.r.doxm"],
+ "if": ["oic.if.baseline"]
+ },
{
- "href": "/oic/sec/cred",
+ "href": "/oic/sec/pstat",
"rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.r.pstat"],
+ "if": ["oic.if.baseline"]
}
],
- "permission": 31
+ "permission": 2
},
{
"subjectuuid": "*",
{
"href": "*",
"rel": "",
- "rt": "",
- "if": ""
+ "rt": ["oic.core"],
+ "if": ["oic.if.baseline"]
}
],
- "permission": 6
+ "permission": 7
}
]
},
"rowneruuid": "31313131-3131-3131-3131-313131313131",
"cm": 0,
"tm": 0,
- "om": 3,
- "sm": 3
+ "om": 4,
+ "sm": 4
},
"doxm": {
"oxms": [0],
"owned": true,
"deviceuuid": "31313131-3131-3131-3131-313131313131",
"devowneruuid": "32323232-3232-3232-3232-323232323232",
- "rowneruuid": "31313131-3131-3131-3131-313131313131",
- "dpc": false
+ "rowneruuid": "31313131-3131-3131-3131-313131313131"
},
"cred": {
"creds": [
}
}
],
- "rowneruuid": "32323232-3232-3232-3232-323232323232"
+ "rowneruuid": "31313131-3131-3131-3131-313131313131"
}
}
+--- a/plugins/SConscript
++++ b/plugins/SConscript
+@@ -35,7 +35,7 @@ if target_os not in ['android', 'arduino
+
+ SConscript(os.path.join('src', 'SConscript'))
+
+- SConscript(os.path.join('unittests', 'SConscript'))
++# SConscript(os.path.join('unittests', 'SConscript'))
+
+ if build_sample == 'ON':
+ if target_os in ['linux']:
--- a/resource/SConscript
+++ b/resource/SConscript
-@@ -75,7 +75,7 @@ if target_os == 'linux':
- SConscript('csdk/stack/samples/linux/secure/SConscript')
+@@ -78,7 +78,7 @@ if target_os in ['linux', 'windows']:
+ SConscript('csdk/stack/samples/linux/secure/SConscript')
# Build C/C++ unit tests
- SConscript('unit_tests.scons')
elif target_os == 'darwin':
env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh')
---- a/resource/csdk/security/provisioning/ck_manager/SConscript
-+++ b/resource/csdk/security/provisioning/ck_manager/SConscript
-@@ -47,4 +47,4 @@ x509_env.AppendUnique(LIBS = ['Base64'])
- x509_env.AppendUnique(LIBS = ['Json'])
-
- SConscript('sample/SConscript')
--SConscript('unittest/SConscript')
-+# SConscript('unittest/SConscript')
---- a/service/resource-encapsulation/SConscript
-+++ b/service/resource-encapsulation/SConscript
-@@ -113,10 +113,10 @@ SConscript('examples/SConscript')
- # Build UnitTests Resource Client , resourceCache and resourceBroker and
- # DiscoveryManager
- ################################################ ######################
--if target_os == 'linux':
-- SConscript('unittests/SConscript')
-- SConscript('src/resourceCache/unittests/SConscript')
-- SConscript('src/resourceBroker/unittest/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
-+# SConscript('src/resourceCache/unittests/SConscript')
-+# SConscript('src/resourceBroker/unittest/SConscript')
-
- if target_os == 'android':
- SConscript('android/SConscript')
-\ No newline at end of file
---- a/service/things-manager/SConscript
-+++ b/service/things-manager/SConscript
-@@ -75,6 +75,6 @@ SConscript('sampleapp/SConscript')
- ######################################################################
- # Build UnitTests Things Manager
- ################################################ ######################
--if target_os == 'linux':
+--- a/resource/csdk/resource-directory/SConscript
++++ b/resource/csdk/resource-directory/SConscript
+@@ -114,8 +114,3 @@ if 'SERVER' in rd_mode:
+ if target_os in ['linux']:
+ SConscript('samples/SConscript')
+
+-######################################################################
+-# Build UnitTests of the Resource Directory
+-################################################ ######################
+-if target_os in ['linux']:
- SConscript('unittests/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
-
---- a/service/resource-hosting/SConscript
-+++ b/service/resource-hosting/SConscript
-@@ -94,8 +94,8 @@ resourcehosting_env.UserInstallTargetHea
- 'service/resource-hosting', 'Hosting.h')
-
- # Go to build Unit test
--if target_os == 'linux':
-- SConscript('unittest/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittest/SConscript')
-
- # Go to build sample apps
- SConscript('SampleApp/SConscript')
---- a/service/easy-setup/mediator/csdk/SConscript
-+++ b/service/easy-setup/mediator/csdk/SConscript
-@@ -124,8 +124,8 @@ if target_os == 'linux':
+--- a/service/coap-http-proxy/SConscript
++++ b/service/coap-http-proxy/SConscript
+@@ -84,6 +84,3 @@ local_env.UserInstallTargetHeader('inclu
######################################################################
- #Build UnitTestcases for Mediator[CSDK]
- ################################################ ######################
--if target_os == 'linux':
+ if target_os in ['linux', 'tizen']:
+ SConscript('samples/SConscript')
+-
+-if target_os in ['linux']:
- SConscript('unittests/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
-
-
-
+--- a/service/easy-setup/enrollee/SConscript
++++ b/service/easy-setup/enrollee/SConscript
+@@ -123,7 +123,3 @@ if target_os == 'arduino':
+
+ if target_os in ['linux']:
+ SConscript('../sampleapp/enrollee/linux/SConscript')
+- #Build UnitTestcases for Enrollee
+- if enrollee_env.get('SECURED') == '0':
+- SConscript('../enrollee/unittests/SConscript')
+-
--- a/service/easy-setup/mediator/richsdk/SConscript
+++ b/service/easy-setup/mediator/richsdk/SConscript
-@@ -138,6 +138,6 @@ if target_os == 'linux':
- ######################################################################
- #Build UnitTestcases for Mediator[RichSDK]
- ################################################ ######################
--if target_os == 'linux':
-- SConscript('unittests/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
-
+@@ -163,11 +163,3 @@ if target_os in ['linux']:
+ if target_os in ['android']:
+ SConscript('../../sampleapp/mediator/android/SConscript')
+
+-
+-######################################################################
+-#Build UnitTestcases for Mediator[RichSDK]
+-################################################ ######################
+-if env.get('SECURED') == '0':
+- if target_os == 'linux':
+- SConscript('unittests/SConscript')
+-
--- a/service/resource-container/SConscript
+++ b/service/resource-container/SConscript
-@@ -209,8 +209,8 @@ lib_env = conf2.Finish()
- ######################################################################
- # build resource container unit tests
- ######################################################################
--if target_os == 'linux':
-- SConscript('unittests/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
+@@ -223,12 +223,6 @@ else:
+ lib_env = conf2.Finish()
######################################################################
+-# build resource container unit tests
+-######################################################################
+-if target_os in ['linux']:
+- SConscript('unittests/SConscript')
+-
+-######################################################################
# Build Container Sample
---- a/plugins/SConscript
-+++ b/plugins/SConscript
-@@ -35,7 +35,7 @@ if target_os not in ['android', 'arduino
-
- SConscript(os.path.join('src', 'SConscript'))
-
-- SConscript(os.path.join('unittests', 'SConscript'))
-+# SConscript(os.path.join('unittests', 'SConscript'))
-
- if build_sample == 'ON':
- if target_os in ['linux']:
---- a/service/scene-manager/SConscript
-+++ b/service/scene-manager/SConscript
-@@ -101,8 +101,8 @@ scenemanager_env.UserInstallTargetHeader
- scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h')
+ ######################################################################
+ if target_os not in ['ios']:
+--- a/service/resource-encapsulation/SConscript
++++ b/service/resource-encapsulation/SConscript
+@@ -121,14 +121,5 @@ resourceClient_env.UserInstallTargetHead
+ ######################################################################
+ SConscript('examples/SConscript')
- # Go to build Unit test
--if target_os == 'linux':
+-######################################################################
+-# Build UnitTests Resource Client , resourceCache and resourceBroker and
+-# DiscoveryManager
+-################################################ ######################
+-if target_os in ['linux']:
- SConscript('unittests/SConscript')
-+# if target_os == 'linux':
-+# SConscript('unittests/SConscript')
-
- # Go to build sample apps
--SConscript('sampleapp/SConscript')
-+# SConscript('sampleapp/SConscript')
+- SConscript('src/resourceCache/unittests/SConscript')
+- SConscript('src/resourceBroker/unittest/SConscript')
+-
+ if target_os == 'android':
+ SConscript('android/SConscript')
--- a/service/resource-encapsulation/src/common/SConscript
+++ b/service/resource-encapsulation/src/common/SConscript
-@@ -122,9 +122,9 @@ if target_os == 'linux':
- 'expiryTimer/unittests/ExpiryTimerTest.cpp'
- ]
-
-- rcs_common_test = rcs_common_test_env.Program('rcs_common_test', rcs_common_test_src)
-- Alias("rcs_common_test", rcs_common_test)
-- env.AppendTarget('rcs_common_test')
-+# rcs_common_test = rcs_common_test_env.Program('rcs_common_test', rcs_common_test_src)
-+# Alias("rcs_common_test", rcs_common_test)
-+# env.AppendTarget('rcs_common_test')
-
- if env.get('TEST') == '1':
- from tools.scons.RunTest import *
+@@ -22,10 +22,10 @@
+ # rcs_common (primitiveResource and expiryTimer) build script
+ ##
+ import os
++Import('env')
+
+ # SConscript file for Local PKI google tests
+-gtest_env = SConscript('#extlibs/gtest/SConscript')
+-lib_env = gtest_env.Clone()
++lib_env = env.Clone()
+
+ # Add third party libraries
+ SConscript('#service/third_party_libs.scons', exports = 'lib_env')
--- a/service/resource-encapsulation/src/serverBuilder/SConscript
+++ b/service/resource-encapsulation/src/serverBuilder/SConscript
-@@ -110,9 +110,9 @@ if target_os == 'linux':
-
- server_builder_test_src = env.Glob('unittests/*.cpp')
-
-- server_builder_test = server_builder_test_env.Program('rcs_server_test', server_builder_test_src)
-- Alias("rcs_server_test", server_builder_test)
-- env.AppendTarget('rcs_server_test')
-+# server_builder_test = server_builder_test_env.Program('rcs_server_test', server_builder_test_src)
-+# Alias("rcs_server_test", server_builder_test)
-+# env.AppendTarget('rcs_server_test')
+@@ -21,9 +21,11 @@
+ ##
+ # rcs_server (Server Builder) project build script
+ ##
++import os
++Import('env')
++
+ # SConscript file for Local PKI google tests
+-gtest_env = SConscript('#extlibs/gtest/SConscript')
+-lib_env = gtest_env.Clone()
++lib_env = env.Clone()
+
+ # Add third party libraries
+ SConscript('#service/third_party_libs.scons', exports = 'lib_env')
+--- a/service/scene-manager/SConscript
++++ b/service/scene-manager/SConscript
+@@ -100,9 +100,5 @@ scenemanager_env.UserInstallTargetHeader
+ scenemanager_env.UserInstallTargetHeader('include/RemoteScene.h', 'service/scene-manager', 'RemoteScene.h')
+ scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h')
- if env.get('TEST') == '1':
- from tools.scons.RunTest import *
+-# Go to build Unit test
+-if target_os in ['linux']:
+- SConscript('unittests/SConscript')
+-
+ # Go to build sample apps
+ SConscript('sampleapp/SConscript')
+++ /dev/null
-From 884e831ed07607097614276f6bbf192993228100 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
-Date: Tue, 2 Jun 2015 11:08:17 +0200
-Subject: [PATCH 3/4] 004-use-env.patch
-
----
- build_common/SConscript | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
---- a/build_common/SConscript
-+++ b/build_common/SConscript
-@@ -151,6 +151,26 @@ tc_set_msg = '''
- * cause inexplicable errors. *
- *******************************************************************************
- '''
-+env['ENV'] = os.environ
-+if 'CC' in os.environ:
-+ env['CC'] = Split(os.environ['CC'])
-+ print "using CC from environment: %s" % env['CC']
-+if 'CXX' in os.environ:
-+ env['CXX'] = Split(os.environ['CXX'])
-+ print "using CXX from environment: %s" % env['CXX']
-+if 'CFLAGS' in os.environ:
-+ env['CFLAGS'] = Split(os.environ['CFLAGS'])
-+ print "using CFLAGS from environment: %s" % env['CFLAGS']
-+if 'CXXFLAGS' in os.environ:
-+ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
-+ print "using CXXFLAGS from environment: %s" % env['CXXFLAGS']
-+if 'CPPFLAGS' in os.environ:
-+ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
-+ print "using CPPFLAGS from environment: %s" % env['CPPFLAGS']
-+if 'LDFLAGS' in os.environ:
-+ env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
-+ print "using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS']
-+
- if env.get('VERBOSE') == False:
- env['CCCOMSTR'] = "Compiling $TARGET"
- env['SHCCCOMSTR'] = "Compiling $TARGET"
+++ /dev/null
-From 980ef34a085f654e74c9896e8143e6f970049b6c Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Mon, 22 Jun 2015 19:39:58 +0200
-Subject: [PATCH 3/5] Do not set architecture specific flags
-
-Setting architecture specific flags causes problems when you want to
-build something which is not covered by these.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- build_common/linux/SConscript | 20 --------------------
- resource/csdk/connectivity/build/linux/SConscript | 20 --------------------
- 2 files changed, 40 deletions(-)
-
---- a/build_common/linux/SConscript
-+++ b/build_common/linux/SConscript
-@@ -24,20 +24,3 @@ env.AppendUnique(LINKFLAGS = ['-ldl', '-
-
- # Set arch flags that match best TARGET_ARCH variable
- target_arch = env.get('TARGET_ARCH')
--if target_arch in ['x86']:
-- env.AppendUnique(CCFLAGS = ['-m32'])
-- env.AppendUnique(LINKFLAGS = ['-m32'])
--elif target_arch in ['x86_64']:
-- env.AppendUnique(CCFLAGS = ['-m64'])
-- env.AppendUnique(LINKFLAGS = ['-m64'])
--elif target_arch in ['arm'] or target_arch.find('v5') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
--elif target_arch.find('v7a-hard') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
-- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
-- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
-- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
--elif target_arch.find('v7a') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
--elif target_arch.find('arm64') >= 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
---- a/resource/csdk/connectivity/build/linux/SConscript
-+++ b/resource/csdk/connectivity/build/linux/SConscript
-@@ -22,20 +22,3 @@ env.AppendUnique(LINKFLAGS = ['-ldl', '-
-
- # Set arch flags
- target_arch = env.get('TARGET_ARCH')
--if target_arch in ['x86']:
-- env.AppendUnique(CCFLAGS = ['-m32'])
-- env.AppendUnique(LINKFLAGS = ['-m32'])
--elif target_arch in ['x86_64']:
-- env.AppendUnique(CCFLAGS = ['-m64'])
-- env.AppendUnique(LINKFLAGS = ['-m64'])
--elif target_arch.find('v7a-hard') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
-- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
-- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
-- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
--elif target_arch.find('v7a') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
--elif target_arch.find('arm64') > 0:
-- env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
--else:
-- env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
--- /dev/null
+From dabd6597013e1df72b08621b466d136b8d25d110 Mon Sep 17 00:00:00 2001
+From: Philippe Coval <philippe.coval@osg.samsung.com>
+Date: Thu, 29 Sep 2016 10:57:59 +0200
+Subject: [PATCH 20/23] linux: Add more architectures
+
+This does not scale and this check should be removed.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+Author: Hauke Mehrtens <hauke@hauke-m.de>
+Change-Id: Ibb271701904745ee4f5dd689c197228239c37262
+Origin: https://github.com/openwrt/packages/blob/master/net/iotivity/patches/021-add-some-more-architectures.patch
+Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
+Reviewed-on: https://gerrit.iotivity.org/gerrit/14575
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
+Reviewed-by: Nivedita Singhvi <niveditasinghvi@gmail.com>
+Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
+Reviewed-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
+---
+ build_common/SConscript | 2 +-
+ resource/csdk/connectivity/build/SConscript | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/build_common/SConscript
++++ b/build_common/SConscript
+@@ -18,7 +18,7 @@ host_target_map = {
+
+ # Map of os and allowed archs (os: allowed archs)
+ os_arch_map = {
+- 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'],
++ 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'],
+ 'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'],
+ 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
+ 'windows': ['x86', 'amd64', 'arm'],
+--- a/resource/csdk/connectivity/build/SConscript
++++ b/resource/csdk/connectivity/build/SConscript
+@@ -14,7 +14,7 @@ host_target_map = {
+
+ # Map of os and allowed archs (os: allowed archs)
+ os_arch_map = {
+- 'linux': ['x86', 'x86_64', 'arm', 'arm64'],
++ 'linux': ['x86', 'x86_64', 'arm', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'],
+ 'tizen': ['x86', 'x86_64', 'arm', 'arm64'],
+ 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
+ 'windows': ['x86', 'amd64', 'arm'],
+++ /dev/null
-From f78ba209b14908bf2b6197293e1f9e3458ddba8e Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Mon, 22 Jun 2015 19:59:47 +0200
-Subject: [PATCH 4/5] add some more architectures
-
-This does not scale and this check should be removed.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- build_common/SConscript | 2 +-
- resource/csdk/connectivity/build/SConscript | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/build_common/SConscript
-+++ b/build_common/SConscript
-@@ -14,7 +14,7 @@ host_target_map = {
-
- # Map of os and allowed archs (os: allowed archs)
- os_arch_map = {
-- 'linux': ['x86', 'x86_64', 'arm', 'arm64'],
-+ 'linux': ['x86', 'x86_64', 'arm', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'],
- 'tizen': ['x86', 'x86_64', 'arm', 'arm64', 'armeabi-v7a'],
- 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
- 'windows': ['x86', 'amd64', 'arm'],
---- a/resource/csdk/connectivity/build/SConscript
-+++ b/resource/csdk/connectivity/build/SConscript
-@@ -14,7 +14,7 @@ host_target_map = {
-
- # Map of os and allowed archs (os: allowed archs)
- os_arch_map = {
-- 'linux': ['x86', 'x86_64', 'arm', 'arm64'],
-+ 'linux': ['x86', 'x86_64', 'arm', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'],
- 'tizen': ['x86', 'x86_64', 'arm', 'arm64'],
- 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
- 'windows': ['x86', 'amd64', 'arm'],
--- /dev/null
+From 792f68219b3ab4ff5238e3abc7aa1c68bfa4a22b Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 10 Dec 2016 18:15:32 +0100
+Subject: [PATCH 21/23] build: do not set TARGET_ARCH to default
+
+This check is useless, scons already checks this and returns such an
+error message:
+Invalid value for option TARGET_ARCH: mips. Valid values are: ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64']
+
+Change-Id: I3f7dd3b9fcae875ab20349203fb77537f24be763
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ build_common/SConscript | 3 ---
+ resource/csdk/connectivity/build/SConscript | 2 --
+ 2 files changed, 5 deletions(-)
+
+--- a/build_common/SConscript
++++ b/build_common/SConscript
+@@ -54,9 +54,6 @@ if target_os == 'android':
+ else:
+ default_arch = platform.machine()
+
+-if default_arch not in os_arch_map[target_os]:
+- default_arch = os_arch_map[target_os][0].lower()
+-
+ target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch
+
+ # True if binary needs to be installed on board. (Might need root permissions)
+--- a/resource/csdk/connectivity/build/SConscript
++++ b/resource/csdk/connectivity/build/SConscript
+@@ -40,8 +40,6 @@ if target_os not in host_target_map[host
+ Exit(1)
+
+ default_arch = platform.machine()
+-if default_arch not in os_arch_map[target_os]:
+- default_arch = os_arch_map[target_os][0].lower()
+
+ target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch
+
--- /dev/null
+From 39b0c436c77555849da1e68cc8733c67183c291f Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 10 Dec 2016 18:35:04 +0100
+Subject: [PATCH 22/23] build: restrict compiler options to supported
+ architectures
+
+For Linux we currently only support the following architectures:
+'x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'
+explicitly check for those architectures and also remove ARM hard float.
+
+Change-Id: I7078530bc2a89b88c7049cc53e8bb3fbe5d75ca8
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ build_common/linux/SConscript | 11 +++--------
+ resource/csdk/connectivity/build/linux/SConscript | 11 +++--------
+ 2 files changed, 6 insertions(+), 16 deletions(-)
+
+--- a/build_common/linux/SConscript
++++ b/build_common/linux/SConscript
+@@ -30,14 +30,9 @@ if target_arch in ['x86']:
+ elif target_arch in ['x86_64']:
+ env.AppendUnique(CCFLAGS = ['-m64'])
+ env.AppendUnique(LINKFLAGS = ['-m64'])
+-elif target_arch in ['arm'] or target_arch.find('v5') > 0:
++elif target_arch in ['arm']:
+ env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
+-elif target_arch.find('v7a-hard') > 0:
++elif target_arch in ['arm-v7a', 'armeabi-v7a']:
+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
+- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
+- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
+-elif target_arch.find('v7a') > 0:
+- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+-elif target_arch.find('arm64') >= 0:
++elif target_arch.find('arm64') > 0:
+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
+--- a/resource/csdk/connectivity/build/linux/SConscript
++++ b/resource/csdk/connectivity/build/linux/SConscript
+@@ -29,14 +29,9 @@ if target_arch in ['x86']:
+ elif target_arch in ['x86_64']:
+ env.AppendUnique(CCFLAGS = ['-m64'])
+ env.AppendUnique(LINKFLAGS = ['-m64'])
+-elif target_arch.find('v7a-hard') > 0:
+- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
+- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
+- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
+-elif target_arch.find('v7a') > 0:
++elif target_arch in ['arm']:
++ env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
++elif target_arch in ['arm-v7a', 'armeabi-v7a']:
+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+ elif target_arch.find('arm64') > 0:
+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
+-else:
+- env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
--- /dev/null
+From 5f9513eb341d520d10c48f8ba2bd145063405fdd Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 10 Dec 2016 18:08:05 +0100
+Subject: [PATCH 23/23] build: take compiler options from environment
+
+This makes it possible to compile IoTivity with custom compiler
+options. This way someone can use optimized compiler settings for the
+target CPU. I want to use this in OpenWrt / LEDE to build specific
+IoTivity binaries for each CPU architecture, there the build system
+provides the matching compiler options.
+
+Change-Id: I86772f73b81c41d7e96e51b434fd9e3b4992753a
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ build_common/SConscript | 25 +++++++++++++++++++++
+ build_common/linux/SConscript | 27 ++++++++++++-----------
+ resource/csdk/connectivity/build/linux/SConscript | 27 ++++++++++++-----------
+ 3 files changed, 53 insertions(+), 26 deletions(-)
+
+--- a/build_common/SConscript
++++ b/build_common/SConscript
+@@ -120,6 +120,7 @@ help_vars.Add(PathVariable('ANDROID_NDK'
+ help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept))
+ help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile))
+ help_vars.Add(EnumVariable('WITH_UPSTREAM_LIBCOAP', 'Use latest stable version of LibCoAP downloaded from github', default_with_upstream_libcoap, allowed_values=('0','1')))
++help_vars.Add(BoolVariable('WITH_ENV', 'Use compiler options from environment', False))
+
+ AddOption('--prefix',
+ dest='prefix',
+@@ -153,6 +154,30 @@ else:
+ )
+ Help(help_vars.GenerateHelpText(env))
+
++if env.get('WITH_ENV'):
++ env['ENV'] = os.environ
++ if 'CC' in os.environ:
++ env['CC'] = Split(os.environ['CC'])
++ print "using CC from environment: %s" % env['CC']
++ if 'CXX' in os.environ:
++ env['CXX'] = Split(os.environ['CXX'])
++ print "using CXX from environment: %s" % env['CXX']
++ if 'CFLAGS' in os.environ:
++ env['CFLAGS'] = Split(os.environ['CFLAGS'])
++ print "using CFLAGS from environment: %s" % env['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
++ print "using CXXFLAGS from environment: %s" % env['CXXFLAGS']
++ if 'CCFLAGS' in os.environ:
++ env['CCFLAGS'] = Split(os.environ['CCFLAGS'])
++ print "using CCFLAGS from environment: %s" % env['CCFLAGS']
++ if 'CPPFLAGS' in os.environ:
++ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
++ print "using CPPFLAGS from environment: %s" % env['CPPFLAGS']
++ if 'LDFLAGS' in os.environ:
++ env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
++ print "using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS']
++
+ tc_set_msg = '''
+ ************************************ Warning **********************************
+ * Enviornment variable TC_PREFIX/TC_PATH is set. It will change the default *
+--- a/build_common/linux/SConscript
++++ b/build_common/linux/SConscript
+@@ -23,16 +23,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-W
+ env.AppendUnique(LIBS = ['dl', 'pthread', 'uuid'])
+
+ # Set arch flags that match best TARGET_ARCH variable
+-target_arch = env.get('TARGET_ARCH')
+-if target_arch in ['x86']:
+- env.AppendUnique(CCFLAGS = ['-m32'])
+- env.AppendUnique(LINKFLAGS = ['-m32'])
+-elif target_arch in ['x86_64']:
+- env.AppendUnique(CCFLAGS = ['-m64'])
+- env.AppendUnique(LINKFLAGS = ['-m64'])
+-elif target_arch in ['arm']:
+- env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
+-elif target_arch in ['arm-v7a', 'armeabi-v7a']:
+- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+-elif target_arch.find('arm64') > 0:
+- env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
++if not env.get('WITH_ENV'):
++ target_arch = env.get('TARGET_ARCH')
++ if target_arch in ['x86']:
++ env.AppendUnique(CCFLAGS = ['-m32'])
++ env.AppendUnique(LINKFLAGS = ['-m32'])
++ elif target_arch in ['x86_64']:
++ env.AppendUnique(CCFLAGS = ['-m64'])
++ env.AppendUnique(LINKFLAGS = ['-m64'])
++ elif target_arch in ['arm']:
++ env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
++ elif target_arch in ['arm-v7a', 'armeabi-v7a']:
++ env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
++ elif target_arch.find('arm64') > 0:
++ env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
+--- a/resource/csdk/connectivity/build/linux/SConscript
++++ b/resource/csdk/connectivity/build/linux/SConscript
+@@ -22,16 +22,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-f
+ env.AppendUnique(LIBS = ['dl', 'pthread'])
+
+ # Set arch flags
+-target_arch = env.get('TARGET_ARCH')
+-if target_arch in ['x86']:
+- env.AppendUnique(CCFLAGS = ['-m32'])
+- env.AppendUnique(LINKFLAGS = ['-m32'])
+-elif target_arch in ['x86_64']:
+- env.AppendUnique(CCFLAGS = ['-m64'])
+- env.AppendUnique(LINKFLAGS = ['-m64'])
+-elif target_arch in ['arm']:
+- env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
+-elif target_arch in ['arm-v7a', 'armeabi-v7a']:
+- env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
+-elif target_arch.find('arm64') > 0:
+- env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
++if not env.get('WITH_ENV'):
++ target_arch = env.get('TARGET_ARCH')
++ if target_arch in ['x86']:
++ env.AppendUnique(CCFLAGS = ['-m32'])
++ env.AppendUnique(LINKFLAGS = ['-m32'])
++ elif target_arch in ['x86_64']:
++ env.AppendUnique(CCFLAGS = ['-m64'])
++ env.AppendUnique(LINKFLAGS = ['-m64'])
++ elif target_arch in ['arm']:
++ env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
++ elif target_arch in ['arm-v7a', 'armeabi-v7a']:
++ env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
++ elif target_arch.find('arm64') > 0:
++ env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
--- a/service/resource-container/SConscript
+++ b/service/resource-container/SConscript
-@@ -175,36 +175,22 @@ if target_os in ['linux', 'tizen', 'andr
+@@ -191,36 +191,22 @@ if target_os in ['linux', 'tizen', 'andr
# build hue sample bundle
######################################################################
+hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle')
######################################################################
- # build resource container unit tests
+ # Build Container Sample
--- /dev/null
+From 08b403572985a70fe5d652378e1cfa2b72ac6a3d Mon Sep 17 00:00:00 2001
+From: Philippe Coval <philippe.coval@osg.samsung.com>
+Date: Fri, 9 Dec 2016 02:12:04 +0100
+Subject: [PATCH] linux: Use system sqlite3
+
+Problem was discovered on yocto
+
+Change-Id: I5274bed9e4b7ddcdc1b17a265a1886cd78cb631f
+Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
+Reviewed-on: https://gerrit.iotivity.org/gerrit/15305
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
+Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
+---
+ resource/csdk/SConscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/resource/csdk/SConscript
++++ b/resource/csdk/SConscript
+@@ -191,7 +191,7 @@ if with_tcp == True:
+
+ if 'SERVER' in rd_mode:
+ liboctbstack_src.append(OCTBSTACK_SRC + 'oicresourcedirectory.c')
+- if target_os not in ['tizen']:
++ if target_os not in ['linux', 'tizen']:
+ liboctbstack_src.append('#extlibs/sqlite3/sqlite3.c')
+
+ if target_os in ['linux']:
+++ /dev/null
-From 4488170af944163b62051b2afee60386a9973c72 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke.mehrtens@intel.com>
-Date: Thu, 31 Mar 2016 10:23:48 +0200
-Subject: [PATCH] remove building of provisioning service
-
-The provisioning service is not used in this build and depends on boost_thread
-which would add an additional unused dependency.
-
-Change-Id: Ic7edab3ae96d77339ea0f48fc76ab2534c49b6ba
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
----
- resource/src/SConscript | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/resource/src/SConscript
-+++ b/resource/src/SConscript
-@@ -116,5 +116,5 @@ oclib_env.UserInstallTargetHeader(header
- oclib_env.UserInstallTargetHeader(header_dir + 'CAManager.h', 'resource', 'CAManager.h')
-
- # Add Provisioning library
--if target_os in ['linux', 'android', 'tizen'] and env.get('SECURED') == '1':
-- SConscript('../provisioning/SConscript')
-+# if target_os in ['linux', 'android', 'tizen'] and env.get('SECURED') == '1':
-+# SConscript('../provisioning/SConscript')
--- /dev/null
+From d8cf30cb0abd5fa8f6282b490618204d683b625c Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Mon, 3 Oct 2016 21:00:28 +0200
+Subject: [PATCH 1/3] csdk: move OCEntityHandlerResponse from stack to heap
+
+OCEntityHandlerResponse is over 50KByte and I got a stack overflow on MIPS
+running on LEDE without this patch. Instead of storing
+OCEntityHandlerResponse on the program stack, allocate some memory on
+the heap and free it afterwards again.
+
+This fixes one part of this issue for me:
+https://jira.iotivity.org/browse/IOT-1374
+
+Change-Id: I365a5c7a34dce2dfb0897a20b57a13ba566748ec
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/stack/src/ocresource.c | 24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+--- a/resource/csdk/stack/src/ocresource.c
++++ b/resource/csdk/stack/src/ocresource.c
+@@ -774,15 +774,25 @@ static bool includeThisResourceInRespons
+ OCStackResult SendNonPersistantDiscoveryResponse(OCServerRequest *request, OCResource *resource,
+ OCPayload *discoveryPayload, OCEntityHandlerResult ehResult)
+ {
+- OCEntityHandlerResponse response = {0};
++ OCEntityHandlerResponse *response = NULL;
++ OCStackResult result = OC_STACK_ERROR;
+
+- response.ehResult = ehResult;
+- response.payload = discoveryPayload;
+- response.persistentBufferFlag = 0;
+- response.requestHandle = (OCRequestHandle) request->requestId;
+- response.resourceHandle = (OCResourceHandle) resource;
++ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response));
++ VERIFY_PARAM_NON_NULL(TAG, response, "Failed allocating OCEntityHandlerResponse");
+
+- return OCDoResponse(&response);
++ response->ehResult = ehResult;
++ response->payload = discoveryPayload;
++ response->persistentBufferFlag = 0;
++ response->requestHandle = (OCRequestHandle) request->requestId;
++ response->resourceHandle = (OCResourceHandle) resource;
++
++ result = OCDoResponse(response);
++
++ OICFree(response);
++ return result;
++
++exit:
++ return OC_STACK_NO_MEMORY;
+ }
+
+ static OCStackResult EHRequest(OCEntityHandlerRequest *ehRequest, OCPayloadType type,
--- /dev/null
+From e8971dd4914c9d42938c4c885b4ac6d784d7e0ff Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Mon, 3 Oct 2016 23:22:36 +0200
+Subject: [PATCH 2/3] csdk: move OCClientResponse from stack to heap
+
+OCClientResponse is about 50KByte and should not be stored on the
+stack. On LEDE with MIPS, musl libc this causes a segmentation fault.
+Moving this structure to the heap is the simple solution for this
+problem, but this structure should be shrined.
+
+There are probably more places were this is stored on the stack and
+will cause problems. This fixes the other issue I saw in
+https://jira.iotivity.org/browse/IOT-1374
+
+Change-Id: I45d8aee4a8151fea51d3318acb1eea61ce579060
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/stack/src/ocstack.c | 163 ++++++++++++++++++++++++--------------
+ 1 file changed, 102 insertions(+), 61 deletions(-)
+
+--- a/resource/csdk/stack/src/ocstack.c
++++ b/resource/csdk/stack/src/ocstack.c
+@@ -1042,7 +1042,7 @@ OCStackResult HandlePresenceResponse(con
+ OCStackApplicationResult cbResult = OC_STACK_DELETE_TRANSACTION;
+ ClientCB * cbNode = NULL;
+ char *resourceTypeName = NULL;
+- OCClientResponse response = {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}};
++ OCClientResponse *response = NULL;
+ OCStackResult result = OC_STACK_ERROR;
+ uint32_t maxAge = 0;
+ int uriLen;
+@@ -1057,15 +1057,23 @@ OCStackResult HandlePresenceResponse(con
+ return OC_STACK_ERROR;
+ }
+
+- response.payload = NULL;
+- response.result = OC_STACK_OK;
++ response = (OCClientResponse *)OICCalloc(1, sizeof(*response));
++ if (!response)
++ {
++ OIC_LOG(ERROR, TAG, "Allocating memory for response failed");
++ return OC_STACK_ERROR;
++ }
++ response->devAddr.adapter = OC_DEFAULT_ADAPTER;
+
+- CopyEndpointToDevAddr(endpoint, &response.devAddr);
+- FixUpClientResponse(&response);
++ response->payload = NULL;
++ response->result = OC_STACK_OK;
++
++ CopyEndpointToDevAddr(endpoint, &response->devAddr);
++ FixUpClientResponse(response);
+
+ if (responseInfo->info.payload)
+ {
+- result = OCParsePayload(&response.payload,
++ result = OCParsePayload(&response->payload,
+ PAYLOAD_TYPE_PRESENCE,
+ responseInfo->info.payload,
+ responseInfo->info.payloadSize);
+@@ -1075,15 +1083,15 @@ OCStackResult HandlePresenceResponse(con
+ OIC_LOG(ERROR, TAG, "Presence parse failed");
+ goto exit;
+ }
+- if(!response.payload || response.payload->type != PAYLOAD_TYPE_PRESENCE)
++ if(!response->payload || response->payload->type != PAYLOAD_TYPE_PRESENCE)
+ {
+ OIC_LOG(ERROR, TAG, "Presence payload was wrong type");
+ result = OC_STACK_ERROR;
+ goto exit;
+ }
+- response.sequenceNumber = ((OCPresencePayload*)response.payload)->sequenceNumber;
+- resourceTypeName = ((OCPresencePayload*)response.payload)->resourceType;
+- maxAge = ((OCPresencePayload*)response.payload)->maxAge;
++ response->sequenceNumber = ((OCPresencePayload*)response->payload)->sequenceNumber;
++ resourceTypeName = ((OCPresencePayload*)response->payload)->resourceType;
++ maxAge = ((OCPresencePayload*)response->payload)->maxAge;
+ }
+
+ // check for unicast presence
+@@ -1091,6 +1099,7 @@ OCStackResult HandlePresenceResponse(con
+ responseInfo->isMulticast);
+ if (uriLen < 0 || (size_t)uriLen >= sizeof (presenceUri))
+ {
++ OICFree(response);
+ return OC_STACK_INVALID_URI;
+ }
+ OIC_LOG(ERROR, TAG, "check for unicast presence");
+@@ -1118,7 +1127,7 @@ OCStackResult HandlePresenceResponse(con
+
+ if (presenceSubscribe)
+ {
+- if(cbNode->sequenceNumber == response.sequenceNumber)
++ if(cbNode->sequenceNumber == response->sequenceNumber)
+ {
+ OIC_LOG(INFO, TAG, "No presence change");
+ ResetPresenceTTL(cbNode, maxAge);
+@@ -1129,7 +1138,7 @@ OCStackResult HandlePresenceResponse(con
+ if(maxAge == 0)
+ {
+ OIC_LOG(INFO, TAG, "Stopping presence");
+- response.result = OC_STACK_PRESENCE_STOPPED;
++ response->result = OC_STACK_PRESENCE_STOPPED;
+ if(cbNode->presence)
+ {
+ OICFree(cbNode->presence->timeOut);
+@@ -1165,7 +1174,7 @@ OCStackResult HandlePresenceResponse(con
+
+ ResetPresenceTTL(cbNode, maxAge);
+
+- cbNode->sequenceNumber = response.sequenceNumber;
++ cbNode->sequenceNumber = response->sequenceNumber;
+ }
+ }
+ else
+@@ -1175,7 +1184,7 @@ OCStackResult HandlePresenceResponse(con
+ if (0 == maxAge)
+ {
+ OIC_LOG(INFO, TAG, "Stopping presence");
+- response.result = OC_STACK_PRESENCE_STOPPED;
++ response->result = OC_STACK_PRESENCE_STOPPED;
+ }
+ }
+
+@@ -1191,7 +1200,7 @@ OCStackResult HandlePresenceResponse(con
+
+ OIC_LOG(INFO, TAG, "Callback for presence");
+
+- cbResult = cbNode->callBack(cbNode->context, cbNode->handle, &response);
++ cbResult = cbNode->callBack(cbNode->context, cbNode->handle, response);
+
+ if (cbResult == OC_STACK_DELETE_TRANSACTION)
+ {
+@@ -1199,7 +1208,8 @@ OCStackResult HandlePresenceResponse(con
+ }
+
+ exit:
+- OCPayloadDestroy(response.payload);
++ OCPayloadDestroy(response->payload);
++ OICFree(response);
+ return result;
+ }
+
+@@ -1240,36 +1250,53 @@ void OCHandleResponse(const CAEndpoint_t
+ OIC_LOG(INFO, TAG, "Receiving A Timeout for this token");
+ OIC_LOG(INFO, TAG, "Calling into application address space");
+
+- OCClientResponse response =
+- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}};
+- CopyEndpointToDevAddr(endPoint, &response.devAddr);
+- FixUpClientResponse(&response);
+- response.resourceUri = responseInfo->info.resourceUri;
+- memcpy(response.identity.id, responseInfo->info.identity.id,
+- sizeof (response.identity.id));
+- response.identity.id_length = responseInfo->info.identity.id_length;
++ OCClientResponse *response = NULL;
++
++ response = (OCClientResponse *)OICCalloc(1, sizeof(*response));
++ if (!response)
++ {
++ OIC_LOG(ERROR, TAG, "Allocating memory for response failed");
++ return;
++ }
++
++ response->devAddr.adapter = OC_DEFAULT_ADAPTER;
++ CopyEndpointToDevAddr(endPoint, &response->devAddr);
++ FixUpClientResponse(response);
++ response->resourceUri = responseInfo->info.resourceUri;
++ memcpy(response->identity.id, responseInfo->info.identity.id,
++ sizeof (response->identity.id));
++ response->identity.id_length = responseInfo->info.identity.id_length;
+
+- response.result = CAResponseToOCStackResult(responseInfo->result);
++ response->result = CAResponseToOCStackResult(responseInfo->result);
+ cbNode->callBack(cbNode->context,
+- cbNode->handle, &response);
++ cbNode->handle, response);
+ FindAndDeleteClientCB(cbNode);
++ OICFree(response);
+ }
+ else
+ {
+ OIC_LOG(INFO, TAG, "This is a regular response, A client call back is found");
+ OIC_LOG(INFO, TAG, "Calling into application address space");
+
+- OCClientResponse response =
+- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}};
+- response.sequenceNumber = MAX_SEQUENCE_NUMBER + 1;
+- CopyEndpointToDevAddr(endPoint, &response.devAddr);
+- FixUpClientResponse(&response);
+- response.resourceUri = responseInfo->info.resourceUri;
+- memcpy(response.identity.id, responseInfo->info.identity.id,
+- sizeof (response.identity.id));
+- response.identity.id_length = responseInfo->info.identity.id_length;
++ OCClientResponse *response = NULL;
+
+- response.result = CAResponseToOCStackResult(responseInfo->result);
++ response = (OCClientResponse *)OICCalloc(1, sizeof(*response));
++ if (!response)
++ {
++ OIC_LOG(ERROR, TAG, "Allocating memory for response failed");
++ return;
++ }
++
++ response->devAddr.adapter = OC_DEFAULT_ADAPTER;
++ response->sequenceNumber = MAX_SEQUENCE_NUMBER + 1;
++ CopyEndpointToDevAddr(endPoint, &response->devAddr);
++ FixUpClientResponse(response);
++ response->resourceUri = responseInfo->info.resourceUri;
++ memcpy(response->identity.id, responseInfo->info.identity.id,
++ sizeof (response->identity.id));
++ response->identity.id_length = responseInfo->info.identity.id_length;
++
++ response->result = CAResponseToOCStackResult(responseInfo->result);
+
+ if(responseInfo->info.payload &&
+ responseInfo->info.payloadSize)
+@@ -1359,21 +1386,23 @@ void OCHandleResponse(const CAEndpoint_t
+ {
+ OIC_LOG_V(ERROR, TAG, "Unknown Payload type: %d %s",
+ cbNode->method, cbNode->requestUri);
++ OICFree(response);
+ return;
+ }
+
+- if(OC_STACK_OK != OCParsePayload(&response.payload,
++ if(OC_STACK_OK != OCParsePayload(&response->payload,
+ type,
+ responseInfo->info.payload,
+ responseInfo->info.payloadSize))
+ {
+ OIC_LOG(ERROR, TAG, "Error converting payload");
+- OCPayloadDestroy(response.payload);
++ OCPayloadDestroy(response->payload);
++ OICFree(response);
+ return;
+ }
+ }
+
+- response.numRcvdVendorSpecificHeaderOptions = 0;
++ response->numRcvdVendorSpecificHeaderOptions = 0;
+ if(responseInfo->info.numOptions > 0)
+ {
+ int start = 0;
+@@ -1391,19 +1420,20 @@ void OCHandleResponse(const CAEndpoint_t
+ observationOption =
+ (observationOption << 8) | optionData[i];
+ }
+- response.sequenceNumber = observationOption;
+- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1;
++ response->sequenceNumber = observationOption;
++ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1;
+ start = 1;
+ }
+ else
+ {
+- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions;
++ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions;
+ }
+
+- if(response.numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS)
++ if(response->numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS)
+ {
+ OIC_LOG(ERROR, TAG, "#header options are more than MAX_HEADER_OPTIONS");
+- OCPayloadDestroy(response.payload);
++ OCPayloadDestroy(response->payload);
++ OICFree(response);
+ return;
+ }
+
+@@ -1411,19 +1441,19 @@ void OCHandleResponse(const CAEndpoint_t
+ {
+ if(&(responseInfo->info.options[i]))
+ {
+- memcpy (&(response.rcvdVendorSpecificHeaderOptions[i-start]),
++ memcpy (&(response->rcvdVendorSpecificHeaderOptions[i-start]),
+ &(responseInfo->info.options[i]), sizeof(OCHeaderOption));
+ }
+ }
+ }
+
+ if (cbNode->method == OC_REST_OBSERVE &&
+- response.sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER &&
++ response->sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER &&
+ cbNode->sequenceNumber <= MAX_SEQUENCE_NUMBER &&
+- response.sequenceNumber <= cbNode->sequenceNumber)
++ response->sequenceNumber <= cbNode->sequenceNumber)
+ {
+ OIC_LOG_V(INFO, TAG, "Received stale notification. Number :%d",
+- response.sequenceNumber);
++ response->sequenceNumber);
+ }
+ else
+ {
+@@ -1432,13 +1462,13 @@ void OCHandleResponse(const CAEndpoint_t
+ char *targetUri = strstr(cbNode->requestUri, OC_RSRVD_RD_URI);
+ if (targetUri)
+ {
+- OCUpdateResourceInsWithResponse(cbNode->requestUri, &response);
++ OCUpdateResourceInsWithResponse(cbNode->requestUri, response);
+ }
+ #endif
+ OCStackApplicationResult appFeedback = cbNode->callBack(cbNode->context,
+ cbNode->handle,
+- &response);
+- cbNode->sequenceNumber = response.sequenceNumber;
++ response);
++ cbNode->sequenceNumber = response->sequenceNumber;
+
+ if (appFeedback == OC_STACK_DELETE_TRANSACTION)
+ {
+@@ -1459,7 +1489,8 @@ void OCHandleResponse(const CAEndpoint_t
+ CA_MSG_ACKNOWLEDGE, 0, NULL, NULL, 0, NULL, CA_RESPONSE_FOR_RES);
+ }
+
+- OCPayloadDestroy(response.payload);
++ OCPayloadDestroy(response->payload);
++ OICFree(response);
+ }
+ return;
+ }
+@@ -1585,16 +1616,26 @@ void HandleCAErrorResponse(const CAEndpo
+ errorInfo->info.tokenLength, NULL, NULL);
+ if (cbNode)
+ {
+- OCClientResponse response = { .devAddr = { .adapter = OC_DEFAULT_ADAPTER } };
+- CopyEndpointToDevAddr(endPoint, &response.devAddr);
+- FixUpClientResponse(&response);
+- response.resourceUri = errorInfo->info.resourceUri;
+- memcpy(response.identity.id, errorInfo->info.identity.id,
+- sizeof (response.identity.id));
+- response.identity.id_length = errorInfo->info.identity.id_length;
+- response.result = CAResultToOCResult(errorInfo->result);
++ OCClientResponse *response = NULL;
++
++ response = (OCClientResponse *)OICCalloc(1, sizeof(*response));
++ if (!response)
++ {
++ OIC_LOG(ERROR, TAG, "Allocating memory for response failed");
++ return;
++ }
++
++ response->devAddr.adapter = OC_DEFAULT_ADAPTER;
++ CopyEndpointToDevAddr(endPoint, &response->devAddr);
++ FixUpClientResponse(response);
++ response->resourceUri = errorInfo->info.resourceUri;
++ memcpy(response->identity.id, errorInfo->info.identity.id,
++ sizeof (response->identity.id));
++ response->identity.id_length = errorInfo->info.identity.id_length;
++ response->result = CAResultToOCResult(errorInfo->result);
+
+- cbNode->callBack(cbNode->context, cbNode->handle, &response);
++ cbNode->callBack(cbNode->context, cbNode->handle, response);
++ OICFree(response);
+ }
+
+ ResourceObserver *observer = GetObserverUsingToken(errorInfo->info.token,
--- /dev/null
+From 7fb5b6a19b06dc5b0a7f32261551b206b1e6a563 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 8 Jan 2017 19:24:26 +0100
+Subject: [PATCH 3/3] src: move OCClientResponse from stack to heap
+
+OCClientResponse is about 50KByte and should not be stored on the
+stack. On LEDE with MIPS, musl libc this causes a segmentation fault.
+Moving this structure to the heap is the simple solution for this
+problem, but this structure should be shrinked.
+
+Change-Id: I7887f93450f45b8031fcdfffb9ee2214fc3d5dd2
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/src/InProcServerWrapper.cpp | 44 +++++++++++++++++++++---------------
+ 1 file changed, 26 insertions(+), 18 deletions(-)
+
+--- a/resource/src/InProcServerWrapper.cpp
++++ b/resource/src/InProcServerWrapper.cpp
+@@ -568,51 +568,58 @@ namespace OC
+ }
+ else
+ {
+- OCEntityHandlerResponse response;
++ OCEntityHandlerResponse *response = NULL;
++
++ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response));
++ if (!response) {
++ result = OC_STACK_MALFORMED_RESPONSE;
++ throw OCException(OC::Exception::STR_NULL_RESPONSE, OC_STACK_MALFORMED_RESPONSE);
++ }
++
+ // OCRepPayload* payLoad = pResponse->getPayload();
+ HeaderOptions serverHeaderOptions = pResponse->getHeaderOptions();
+
+- response.requestHandle = pResponse->getRequestHandle();
+- response.resourceHandle = pResponse->getResourceHandle();
+- response.ehResult = pResponse->getResponseResult();
++ response->requestHandle = pResponse->getRequestHandle();
++ response->resourceHandle = pResponse->getResourceHandle();
++ response->ehResult = pResponse->getResponseResult();
+
+- response.payload = reinterpret_cast<OCPayload*>(pResponse->getPayload());
++ response->payload = reinterpret_cast<OCPayload*>(pResponse->getPayload());
+
+- response.persistentBufferFlag = 0;
++ response->persistentBufferFlag = 0;
+
+- response.numSendVendorSpecificHeaderOptions = serverHeaderOptions.size();
++ response->numSendVendorSpecificHeaderOptions = serverHeaderOptions.size();
+ int i = 0;
+ for (auto it=serverHeaderOptions.begin(); it != serverHeaderOptions.end(); ++it)
+ {
+- response.sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID;
+- response.sendVendorSpecificHeaderOptions[i].optionID =
++ response->sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID;
++ response->sendVendorSpecificHeaderOptions[i].optionID =
+ static_cast<uint16_t>(it->getOptionID());
+- response.sendVendorSpecificHeaderOptions[i].optionLength =
++ response->sendVendorSpecificHeaderOptions[i].optionLength =
+ (it->getOptionData()).length() + 1;
+ std::string optionData = it->getOptionData();
+ std::copy(optionData.begin(),
+ optionData.end(),
+- response.sendVendorSpecificHeaderOptions[i].optionData);
+- response.sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()]
++ response->sendVendorSpecificHeaderOptions[i].optionData);
++ response->sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()]
+ = '\0';
+ i++;
+ }
+
+- if(OC_EH_RESOURCE_CREATED == response.ehResult)
++ if(OC_EH_RESOURCE_CREATED == response->ehResult)
+ {
+- pResponse->getNewResourceUri().copy(response.resourceUri,
+- sizeof (response.resourceUri) - 1);
+- response.resourceUri[pResponse->getNewResourceUri().length()] = '\0';
++ pResponse->getNewResourceUri().copy(response->resourceUri,
++ sizeof (response->resourceUri) - 1);
++ response->resourceUri[pResponse->getNewResourceUri().length()] = '\0';
+ }
+
+ if(cLock)
+ {
+ std::lock_guard<std::recursive_mutex> lock(*cLock);
+- result = OCDoResponse(&response);
++ result = OCDoResponse(response);
+ }
+ else
+ {
+- OICFree(response.payload);
++ OICFree(response->payload);
+ result = OC_STACK_ERROR;
+ }
+
+@@ -620,6 +627,7 @@ namespace OC
+ {
+ oclog() << "Error sending response\n";
+ }
++ OICFree(response);
+ return result;
+ }
+ }
+++ /dev/null
-From 8a1a5562904c1bbdb2bcb332c0a74482d7cdea15 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
-Date: Wed, 11 Nov 2015 18:10:03 +0100
-Subject: [PATCH 5/5] resource-encapsulation: deactivate test covergae
-
-Change-Id: I9c9b5853ee1521f5963c73c3025b1c0f10393a96
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
----
- .../resource-encapsulation/src/common/SConscript | 4 ----
- .../src/serverBuilder/SConscript | 4 ----
- 2 files changed, 8 deletions(-)
-
---- a/service/resource-encapsulation/src/common/SConscript
-+++ b/service/resource-encapsulation/src/common/SConscript
-@@ -66,10 +66,6 @@ if target_os == 'android':
-
- rcs_common_env.AppendUnique(LIBS = ['dl', 'oc'])
-
--if not release:
-- rcs_common_env.AppendUnique(CXXFLAGS = ['--coverage'])
-- rcs_common_env.PrependUnique(LIBS = ['gcov'])
--
- ######################################################################
- # Source files and Targets
- ######################################################################
---- a/service/resource-encapsulation/src/serverBuilder/SConscript
-+++ b/service/resource-encapsulation/src/serverBuilder/SConscript
-@@ -67,10 +67,6 @@ server_builder_env.AppendUnique(LIBS = [
- if env.get('LOGGING'):
- server_builder_env.AppendUnique(LIBS = ['octbstack'])
-
--if not release:
-- server_builder_env.AppendUnique(CXXFLAGS = ['--coverage'])
-- server_builder_env.PrependUnique(LIBS = ['gcov'])
--
- ######################################################################
- # Source files and Targets
- ######################################################################
+++ /dev/null
-From b1c29c35cba3eb39af18fb8db0ec676e3d658b1d Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke.mehrtens@intel.com>
-Date: Fri, 17 Jun 2016 17:38:35 +0200
-Subject: [PATCH] security: fix reading of permission attribute from
- configuration
-
-Casting the pointer to the permission attribute from uint16_t to uint64_t
-causes problems on MIPS Big Endian systems and probably othrs as well.
-When the calling method interprets it as uint64_t not the value is
-converted but the pointer is interpreted as it would point to a 64 bit
-integer, but it is only a 16 bit wide integer. On MIPS BE permission was
-always 0 independent of which value between 0 and 32 the permission
-attribute had, this was probably written to some padding area or into
-some other member of the struct.
-
-This patch fixes the memory corruption and makes the code work for me with
-a MIPS BE CPU.
-
-Change-Id: Ifa843e69980ad4309b1e3076b8e2c98c03324352
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
----
- resource/csdk/security/src/aclresource.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/resource/csdk/security/src/aclresource.c
-+++ b/resource/csdk/security/src/aclresource.c
-@@ -602,8 +602,11 @@ OicSecAcl_t* CBORPayloadToAcl(const uint
- // Permissions -- Mandatory
- if (strcmp(name, OIC_JSON_PERMISSION_NAME) == 0)
- {
-- cborFindResult = cbor_value_get_uint64(&aclMap, (uint64_t *) &acl->permission);
-+ uint64_t tmp64;
-+
-+ cborFindResult = cbor_value_get_uint64(&aclMap, &tmp64);
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed Finding a PERM Value.");
-+ acl->permission = tmp64;
- }
-
- // Period -- Not mandatory
+++ /dev/null
-From f182119e571a1b520b4e5ef4ee5e5b5cd243b931 Mon Sep 17 00:00:00 2001
-From: Chul Lee <chuls.lee@samsung.com>
-Date: Wed, 22 Jun 2016 12:40:21 +0900
-Subject: [PATCH] Remove the endianness dependency in cbor conversion.
-
-A similar bug reported from https://gerrit.iotivity.org/gerrit/#/c/8755/
-
-Change-Id: I631bab77f7486f1f45eaff96c67d39606e37c6b6
-Signed-off-by: Chul Lee <chuls.lee@samsung.com>
-Reviewed-on: https://gerrit.iotivity.org/gerrit/8829
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
-Reviewed-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
-Reviewed-by: Randeep Singh <randeep.s@samsung.com>
-(cherry picked from commit 24474a8d2555229efb425b6cb63e19b3279ba810)
-Reviewed-on: https://gerrit.iotivity.org/gerrit/9053
----
- resource/csdk/security/src/credresource.c | 8 ++++++--
- resource/csdk/security/src/pconfresource.c | 5 +++--
- resource/csdk/stack/src/ocpayloadparse.c | 8 ++++++--
- 3 files changed, 15 insertions(+), 6 deletions(-)
-
---- a/resource/csdk/security/src/credresource.c
-+++ b/resource/csdk/security/src/credresource.c
-@@ -435,8 +435,10 @@ OCStackResult CBORPayloadToCred(const ui
- //credid
- if (strcmp(name, OIC_JSON_CREDID_NAME) == 0)
- {
-- cborFindResult = cbor_value_get_uint64(&credMap, (uint64_t *) &cred->credId);
-+ uint64_t credId = 0;
-+ cborFindResult = cbor_value_get_uint64(&credMap, &credId);
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed Finding CredId.");
-+ cred->credId = (uint16_t)credId;
- }
- // subjectid
- if (strcmp(name, OIC_JSON_SUBJECTID_NAME) == 0)
-@@ -451,8 +453,10 @@ OCStackResult CBORPayloadToCred(const ui
- // credtype
- if (strcmp(name, OIC_JSON_CREDTYPE_NAME) == 0)
- {
-- cborFindResult = cbor_value_get_uint64(&credMap, (uint64_t *) &cred->credType);
-+ uint64_t credType = 0;
-+ cborFindResult = cbor_value_get_uint64(&credMap, &credType);
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed Finding CredType.");
-+ cred->credType = (OicSecCredType_t)credType;
- }
- // privatedata
- if (strcmp(name, OIC_JSON_PRIVATEDATA_NAME) == 0)
---- a/resource/csdk/security/src/pconfresource.c
-+++ b/resource/csdk/security/src/pconfresource.c
-@@ -642,8 +642,9 @@ OCStackResult CBORPayloadToPconf(const u
- // Permissions -- Mandatory
- if (strcmp(name, OIC_JSON_PERMISSION_NAME) == 0)
- {
-- cborFindResult = cbor_value_get_uint64(&pdAclMap,
-- (uint64_t *) &pdacl->permission);
-+ uint64_t permission = 0;
-+ cborFindResult = cbor_value_get_uint64(&pdAclMap, &permission);
-+ pdacl->permission = (uint16_t)permission;
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed to get value");
- }
-
---- a/resource/csdk/stack/src/ocpayloadparse.c
-+++ b/resource/csdk/stack/src/ocpayloadparse.c
-@@ -1169,17 +1169,21 @@ static OCStackResult OCParsePresencePayl
- if (cbor_value_is_map(rootValue))
- {
- CborValue curVal;
-+ uint64_t temp = 0;
-
- // Sequence Number
- CborError err = cbor_value_map_find_value(rootValue, OC_RSRVD_NONCE, &curVal);
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding nonce tag");
-- err = cbor_value_get_uint64(&curVal, (uint64_t *)&payload->sequenceNumber);
-+ err = cbor_value_get_uint64(&curVal, &temp);
-+ payload->sequenceNumber = (uint32_t)temp;
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding nonce value");
-
- // Max Age
- err = cbor_value_map_find_value(rootValue, OC_RSRVD_TTL, &curVal);
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding ttl tag");
-- err = cbor_value_get_uint64(&curVal, (uint64_t *)&payload->maxAge);
-+ temp = 0;
-+ err = cbor_value_get_uint64(&curVal, &temp);
-+ payload->maxAge = (uint32_t)temp;
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding ttl value");
-
- // Trigger
+++ /dev/null
-From 7c99ef8bfa024f11452311c36329eeeeece4fd74 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke.mehrtens@intel.com>
-Date: Wed, 22 Jun 2016 11:41:43 +0200
-Subject: [PATCH] Fix memory corruption when reading inetgers from cbor
-
-When the cbor_value_get_*() function is called with a pointer to some int, it
-should have the correct size. When we cast it to something else it is treated
-as a pointer to an uint64_t in the function for example and them 64 bits gets
-written to memory even with the real type is only 32 bit long. When the real
-type is only 32 bit long some other memory gets overwritten. On Big endian
-systems the least significant bits are cut of so in most cases 0 is read.
-
-With this patch a value cast is used and the value is converted to the other size.
-
-This is the same as in commit 0d64c7c95a5c11a9fb5201e729fd8c75da210c80
-"security: fix reading of permission attribute from configuration"
-
-Change-Id: If5965491241e25ebf60a22dc45d37d74a33cb02f
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
----
- resource/csdk/security/src/pconfresource.c | 5 ++++-
- resource/csdk/stack/src/ocpayloadparse.c | 19 +++++++++++++++----
- 2 files changed, 19 insertions(+), 5 deletions(-)
-
---- a/resource/csdk/security/src/pconfresource.c
-+++ b/resource/csdk/security/src/pconfresource.c
-@@ -507,8 +507,11 @@ OCStackResult CBORPayloadToPconf(const u
-
- while (cbor_value_is_valid(&prm))
- {
-- cborFindResult = cbor_value_get_int(&prm, (int *)&pconf->prm[i++]);
-+ int prm_val;
-+
-+ cborFindResult = cbor_value_get_int(&prm, &prm_val);
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed to get value");
-+ pconf->prm[i++] = (OicSecPrm_t)prm_val;
- cborFindResult = cbor_value_advance(&prm);
- VERIFY_CBOR_SUCCESS(TAG, cborFindResult, "Failed to advance value");
- }
---- a/resource/csdk/stack/src/ocpayloadparse.c
-+++ b/resource/csdk/stack/src/ocpayloadparse.c
-@@ -287,6 +287,8 @@ static OCStackResult OCParseDiscoveryPay
-
- while (cbor_value_is_map(&resourceMap))
- {
-+ int bitmap;
-+
- resource = (OCResourcePayload *)OICCalloc(1, sizeof(OCResourcePayload));
- VERIFY_PARAM_NON_NULL(TAG, resource, "Failed allocating resource payload");
-
-@@ -319,8 +321,9 @@ static OCStackResult OCParseDiscoveryPay
- // Bitmap
- err = cbor_value_map_find_value(&policyMap, OC_RSRVD_BITMAP, &curVal);
- VERIFY_CBOR_SUCCESS(TAG, err, "to find bitmap tag");
-- err = cbor_value_get_int(&curVal, (int *)&resource->bitmap);
-+ err = cbor_value_get_int(&curVal, &bitmap);
- VERIFY_CBOR_SUCCESS(TAG, err, "to find bitmap value");
-+ resource->bitmap = (uint8_t)bitmap;
-
- // Secure Flag
- err = cbor_value_map_find_value(&policyMap, OC_RSRVD_SECURE, &curVal);
-@@ -336,8 +339,11 @@ static OCStackResult OCParseDiscoveryPay
- VERIFY_CBOR_SUCCESS(TAG, err, "to find port tag");
- if (cbor_value_is_valid(&curVal))
- {
-- err = cbor_value_get_int(&curVal, (int *)&resource->port);
-+ int port;
-+
-+ err = cbor_value_get_int(&curVal, &port);
- VERIFY_CBOR_SUCCESS(TAG, err, "to find port value");
-+ resource->port = (uint16_t)port;
- }
-
- err = cbor_value_advance(&resourceMap);
-@@ -1170,6 +1176,7 @@ static OCStackResult OCParsePresencePayl
- {
- CborValue curVal;
- uint64_t temp = 0;
-+ uint8_t trigger;
-
- // Sequence Number
- CborError err = cbor_value_map_find_value(rootValue, OC_RSRVD_NONCE, &curVal);
-@@ -1189,8 +1196,9 @@ static OCStackResult OCParsePresencePayl
- // Trigger
- err = cbor_value_map_find_value(rootValue, OC_RSRVD_TRIGGER, &curVal);
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding trigger tag");
-- err = cbor_value_get_simple_type(&curVal, (uint8_t *)&payload->trigger);
-+ err = cbor_value_get_simple_type(&curVal, &trigger);
- VERIFY_CBOR_SUCCESS(TAG, err, "Failed finding trigger value");
-+ payload->trigger = (OCPresenceTrigger)trigger;
-
- // Resource type name
- err = cbor_value_map_find_value(rootValue, OC_RSRVD_RESOURCE_TYPE, &curVal);
+++ /dev/null
-From e093390b2839f6039a6ff94ed4942fa45c53a418 Mon Sep 17 00:00:00 2001
-From: Philippe Coval <philippe.coval@osg.samsung.com>
-Date: Tue, 26 Apr 2016 15:28:17 +0200
-Subject: [PATCH] [Resource-container] Backported init fix to 1.1-rel
-
-[Resource-container] Fix member var initialization
-
-Incorrect type was used causing build error.
-
-Origin: 6a10062f1fe64ca75ac6d34541bbd295ef052dcb
-Author: Inga Stotland <inga.stotland@intel.com>
-Change-Id: I701096c3b6512546847cf4e120430f690e920453
-Signed-off-by: Inga Stotland <inga.stotland@intel.com>
-Reviewed-on: https://gerrit.iotivity.org/gerrit/7759
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
-Reviewed-by: George Nash <george.nash@intel.com>
-Reviewed-by: Markus Jung <markus.jung85@gmail.com>
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
-Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
-Reviewed-on: https://gerrit.iotivity.org/gerrit/7929
----
- service/resource-container/src/BundleInfoInternal.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/service/resource-container/src/BundleInfoInternal.cpp
-+++ b/service/resource-container/src/BundleInfoInternal.cpp
-@@ -32,8 +32,8 @@ namespace OIC
- m_resourceCreator = nullptr;
- m_resourceDestroyer = nullptr;
- m_bundleHandle = nullptr;
-- m_so_bundle = nullptr;
-
-+ m_so_bundle = false;
- m_loaded = false;
- m_activated = false;
- m_java_bundle = false;
--- /dev/null
+From 261cf19bfa3dea10ed0f2ebbb2d945c19c9a2804 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 4 Dec 2016 00:18:37 +0100
+Subject: [PATCH 5/7] ssl: fix compilation against non debug mbedtls
+
+The function mbedtls_debug_set_threshold() is only available when
+MBEDTLS_DEBUG_C is set. make the call depend on this condition.
+
+Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
++++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+@@ -1278,8 +1278,10 @@ static int InitConfig(mbedtls_ssl_config
+
+ #if !defined(NDEBUG) || defined(TB_LOG)
+ mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL);
++#if defined(MBEDTLS_DEBUG_C)
+ mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL);
+ #endif
++#endif
+ OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
+ return 0;
+ }
--- /dev/null
+From cee085e0e62214603b9ae035d63fabca23c491bd Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 8 Jan 2017 01:39:35 +0100
+Subject: [PATCH 6/7] ssl: call mbedtls_version_get_string() only if available
+
+The function mbedtls_version_get_string() is only available if
+MBEDTLS_VERSION_C is set in the mbedtls configuration. Check this
+before calling this function and print the mbedtls version this was
+compiled against instead if mbedtls_version_get_string() is not
+available.
+
+This fixes a compile problem when MBEDTLS_VERSION_C is not set.
+
+Change-Id: I54c2c2a3fc1f9d35afa475500e3db68420a1b54a
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
++++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+@@ -1376,9 +1376,13 @@ CAResult_t CAinitSslAdapter()
+ /* Initialize TLS library
+ */
+ #if !defined(NDEBUG) || defined(TB_LOG)
++#ifdef MBEDTLS_VERSION_C
+ char version[MBED_TLS_VERSION_LEN];
+ mbedtls_version_get_string(version);
+ OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", version);
++#else
++ OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", MBEDTLS_VERSION_STRING);
++#endif
+ #endif
+
+ /* Entropy settings
--- /dev/null
+From 3684ac3720f91dc131c1c61689395a69ae1865f9 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 8 Jan 2017 20:31:18 +0100
+Subject: [PATCH 7/7] ssl: call mbedtls_ssl_conf_renegotiation() only if
+ available
+
+The function mbedtls_ssl_conf_renegotiation() is only available if
+MBEDTLS_SSL_RENEGOTIATION is set in the mbedtls configuration. Check this
+before calling this function.
+
+This fixes a compile problem when MBEDTLS_SSL_RENEGOTIATION is not set.
+
+Change-Id: I69f15359d2dcaed1e4fe56fc7799737e38d6c2e7
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
++++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+@@ -1273,7 +1273,9 @@ static int InitConfig(mbedtls_ssl_config
+ mbedtls_ssl_conf_rng(conf, mbedtls_ctr_drbg_random, &g_caSslContext->rnd);
+ mbedtls_ssl_conf_curves(conf, curve[ADAPTER_CURVE_SECP256R1]);
+ mbedtls_ssl_conf_min_version(conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3);
++#ifdef MBEDTLS_SSL_RENEGOTIATION
+ mbedtls_ssl_conf_renegotiation(conf, MBEDTLS_SSL_RENEGOTIATION_DISABLED);
++#endif
+ mbedtls_ssl_conf_authmode(conf, MBEDTLS_SSL_VERIFY_REQUIRED);
+
+ #if !defined(NDEBUG) || defined(TB_LOG)
--- /dev/null
+From 01796db0b166e720860eff200acabff410ba6979 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 4 Dec 2016 00:15:21 +0100
+Subject: [PATCH 4/7] ssl: enable usage of patched mbed functions conditionally
+
+Only activate support for the MBEDTLS_KEY_EXCHANGE_ECDH_ANON_ENABLED
+cipher suite when this is actually available in mbedtls.
+This makes it possible to compile IoTivity against a unpatched mbedtls
+version.
+
+Change-Id: Ic56d7faf7597cc5dc08f9d55be29dde898949609
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
++++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+@@ -237,7 +237,9 @@ int tlsCipher[ADAPTER_CIPHER_MAX][2] =
+ {
+ {MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, 0},
+ {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, 0},
++#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256
+ {MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256, 0},
++#endif
+ {MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 0},
+ {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, 0},
+ {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 0}
+@@ -1943,6 +1945,7 @@ CAResult_t CAsetTlsCipherSuite(const uin
+ g_caSslContext->cipher = ADAPTER_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
+ break;
+ }
++#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256
+ case MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256:
+ {
+ #ifdef __WITH_TLS__
+@@ -1960,6 +1963,7 @@ CAResult_t CAsetTlsCipherSuite(const uin
+ g_caSslContext->cipher = ADAPTER_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA_256;
+ break;
+ }
++#endif
+ case MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256:
+ {
+ #if 0 // PIN OTM
--- /dev/null
+Make it possible to use system mbedtls version
+
+--- a/resource/csdk/connectivity/src/SConscript
++++ b/resource/csdk/connectivity/src/SConscript
+@@ -73,16 +73,7 @@ if env.get('SECURED') == '1':
+ env.AppendUnique(CPPPATH = [src_dir + '/resource/csdk/security/include'])
+ env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
+ env.AppendUnique(CPPPATH = [os.path.join(root_dir, 'external/inc')])
+- tls_path = 'extlibs/mbedtls';
+- tls_headers_path = 'mbedtls/include';
+- if ca_os == 'tizen' and os.path.exists(root_dir + '/' + tls_path):
+- env.SConscript(os.path.join(root_dir, tls_path + '/SConscript'))
+- env.AppendUnique(CPPPATH = [os.path.join(root_dir, tls_path + '/' + tls_headers_path)])
+- else:
+- if ca_os != 'android':
+- env.SConscript('#' + tls_path + '/SConscript')
+- env.AppendUnique(CPPPATH = ['#' + tls_path + '/' + tls_headers_path])
+- env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')])
++ env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')])
+
+ if ((secured == '1') and (with_tcp == True)):
+ env.AppendUnique(CPPDEFINES = ['__WITH_TLS__'])
--- /dev/null
+From df8360447163762c63994dcb07f9e69a5a365a1c Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 8 Jan 2017 22:01:57 +0100
+Subject: [PATCH 8/8] zigbee_wrapper: do not check for floating point
+
+This makes the compile fail for soft float builds. In such builds the
+double is still 64 bit long.
+
+Change-Id: I45d3f19b49f5d23d2b65307738a362765c5ea1c2
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ plugins/zigbee_wrapper/src/zigbee_wrapper.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/plugins/zigbee_wrapper/src/zigbee_wrapper.c
++++ b/plugins/zigbee_wrapper/src/zigbee_wrapper.c
+@@ -37,14 +37,6 @@
+ #include <math.h>
+ #include <errno.h>
+
+-// The following #define must be here under "math.h".
+-// This ifdef ensures that "__STDC_IEC_559__" is defined. If it is defined,
+-// then we are guaranteed that the 'double' type is 64-bit. Otherwise, the
+-// compilation of this file should fail because we are no longer guaranteed.
+-#ifndef __STDC_IEC_559__
+-#error "Requires IEEE 754 floating point!"
+-#endif
+-
+ #include "zigbee_wrapper.h"
+ #include "telegesis_wrapper.h"
+ #include "pluginlist.h"
--- a/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript
+++ b/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript
-@@ -73,7 +73,7 @@ env.AppendUnique(
+@@ -73,7 +73,6 @@ env.AppendUnique(
# The Linux BLE adapter implementation uses GDBus to make D-Bus based
# method calls to BlueZ. Pull in the necessary dependencies.
-env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs")
-+# env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs")
# Set up commands to generate GDBus code from the D-Bus introspection
# XML.
--- a/resource/csdk/security/provisioning/sample/SConscript
+++ b/resource/csdk/security/provisioning/sample/SConscript
-@@ -58,7 +58,7 @@ if env.get('SECURED') == '1':
- if env.get('DTLS_WITH_X509') == '1':
- provisioning_env.AppendUnique(LIBS = ['CKManager'])
- provisioning_env.AppendUnique(LIBS = ['asn1'])
--provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
-+# provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
-
- provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+@@ -70,7 +70,6 @@ if target_os not in ['windows']:
+ if target_os not in ['msys_nt', 'windows']:
+ provisioning_env.AppendUnique(LIBS = ['dl', 'm'])
+- provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
+ provisioning_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+ else:
+ provisioning_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource', 'csdk')])
--- a/resource/csdk/security/provisioning/SConscript
+++ b/resource/csdk/security/provisioning/SConscript
-@@ -76,8 +76,8 @@ provisioning_env.AppendUnique(LIBS = ['t
- if env.get('DTLS_WITH_X509') == '1':
- provisioning_env.AppendUnique(LIBS = ['CKManager', 'asn1'])
+@@ -73,9 +73,6 @@ provisioning_env.PrependUnique(LIBS = ['
+ provisioning_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
+
--if target_os != 'android':
+-if target_os not in ['msys_nt', 'windows', 'android', 'ios']:
- provisioning_env.ParseConfig('pkg-config --libs glib-2.0')
-+# if target_os != 'android':
-+# provisioning_env.ParseConfig('pkg-config --libs glib-2.0')
+-
+ if target_os in ['windows', 'msys_nt']:
+ provisioning_env.AppendUnique(LIBS = ['ws2_32', 'advapi32', 'iphlpapi'])
- if target_os == 'tizen':
- provisioning_env.ParseConfig('pkg-config --cflags --libs sqlite3')
include $(TOPDIR)/rules.mk
PKG_NAME:=irssi
-PKG_VERSION:=0.8.20
+PKG_VERSION:=0.8.21
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/0.8.20/
-PKG_MD5SUM:=67d48c5feec2d3b949d088aa4abc3601
+PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/0.8.21/
+PKG_MD5SUM:=b820760c3b4f3b0c24abe4db82b6366a
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
-PKG_VERSION:=4.3.3
+PKG_VERSION:=4.3.5
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Antony Antony <antony@phenome.org>
PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
-PKG_MD5SUM:=c5577b09c9017cdd319a11ff6364268e
+PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
+ http://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
+ http://ftp.iij.ad.jp/pub/network/isc/dhcp/$(PKG_VERSION)
+PKG_MD5SUM:=2b5e5b2fa31c2e27e487039d86f83d3f
+PKG_HASH:=eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
endif
define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ BUILD_CC="$(HOSTCC_NOCACHE)" \
+ CROSS_CC="$(TARGET_CC)" \
+ host_alias="$(GNU_TARGET_NAME)" \
+ target_alias="$(GNU_TARGET_NAME)" \
+ build_alias="$(GNU_HOST_NAME)" \
+ all
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
BUILD_CC="$(HOSTCC_NOCACHE)" \
host_alias="$(GNU_TARGET_NAME)" \
target_alias="$(GNU_TARGET_NAME)" \
build_alias="$(GNU_HOST_NAME)" \
- all install-exec
+ install-exec
endef
define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install
local link_selection
config_get link_selection ipv4 link_selection
if network_get_device ifname "$link_selection"; then
- append args "-l $ifname"
+ append args "-U $ifname"
fi
# relay mode
if [ -n "$relay_lowers" ]; then
local relay_lower
for relay_lower in $relay_lowers; do
- append relay_lower_args "-l $relay_lower"
+ append relay_lower_args "-U $relay_lower"
done
fi
+++ /dev/null
---- a/relay/dhcrelay.c
-+++ b/relay/dhcrelay.c
-@@ -60,6 +60,7 @@
- int client_packet_errors = 0; /* Errors sending packets to clients. */
-
- int add_agent_options = 0; /* If nonzero, add relay agent options. */
-+int add_rfc3527_suboption = 0; /* If nonzero, add RFC3527 link selection sub-option. */
-
- int agent_option_errors = 0; /* Number of packets forwarded without
- agent options because there was no room. */
-@@ -99,6 +100,8 @@
- struct sockaddr_in to;
- } *servers;
-
-+struct interface_info *uplink;
-+
- #ifdef DHCPv6
- struct stream_list {
- struct stream_list *next;
-@@ -147,6 +150,7 @@
- " [-pf <pid-file>] [--no-pid]\n"\
- " [-m append|replace|forward|discard]\n" \
- " [-i interface0 [ ... -i interfaceN]\n" \
-+" [-l interface]\n" \
- " server0 [ ... serverN]\n\n" \
- " dhcrelay -6 [-d] [-q] [-I] [-c <hops>] [-p <port>]\n" \
- " [-pf <pid-file>] [--no-pid]\n" \
-@@ -161,6 +165,7 @@
- " [-pf <pid-file>] [--no-pid]\n" \
- " [-m append|replace|forward|discard]\n" \
- " [-i interface0 [ ... -i interfaceN]\n" \
-+" [-l interface]\n" \
- " server0 [ ... serverN]\n\n"
- #endif
-
-@@ -325,6 +330,20 @@
- agent_relay_mode = discard;
- } else
- usage();
-+ } else if (!strcmp (argv [i], "-l")) {
-+ add_agent_options = 1;
-+ add_rfc3527_suboption = 1;
-+ if (++i == argc)
-+ usage();
-+
-+ status = interface_allocate(&uplink, MDL);
-+ if (status != ISC_R_SUCCESS)
-+ log_fatal("%s: interface_allocate: %s",
-+ argv[i],
-+ isc_result_totext(status));
-+ strcpy(uplink->name, argv[i]);
-+ interface_snorf(uplink, INTERFACE_REQUESTED);
-+ //interface_dereference(&uplink, MDL);
- } else if (!strcmp(argv[i], "-D")) {
- #ifdef DHCPv6
- if (local_family_set && (local_family == AF_INET6)) {
-@@ -711,12 +730,17 @@
- ip->addresses[0])))
- return;
-
-+ /* RFC3527: Replace giaddr address by uplink address. The original
-+ * giaddr will be used in the link selection sub-option */
-+ if (add_rfc3527_suboption)
-+ packet->giaddr = uplink->addresses[0];
-+
- /* If giaddr is not already set, Set it so the server can
- figure out what net it's from and so that we can later
- forward the response to the correct net. If it's already
- set, the response will be sent directly to the relay agent
- that set giaddr, so we won't see it. */
-- if (!packet->giaddr.s_addr)
-+ else if (!packet->giaddr.s_addr)
- packet->giaddr = ip->addresses[0];
- if (packet->hops < max_hop_count)
- packet->hops = packet->hops + 1;
-@@ -1090,6 +1114,9 @@
- optlen += ip->remote_id_len + 2; /* RAI_REMOTE_ID + len */
- }
-
-+ if (add_rfc3527_suboption)
-+ optlen += 6;
-+
- /* We do not support relay option fragmenting(multiple options to
- * support an option data exceeding 255 bytes).
- */
-@@ -1121,6 +1148,14 @@
- memcpy(sp, ip->remote_id, ip->remote_id_len);
- sp += ip->remote_id_len;
- }
-+
-+ if (add_rfc3527_suboption) {
-+ *sp++ = RAI_LINK_SELECT;
-+ *sp++ = 4u;
-+ memcpy(sp, &giaddr.s_addr, 4);
-+ sp += 4;
-+ log_debug ("RFC3527 link selection sub-option added: %s", inet_ntoa(giaddr));
-+ }
- } else {
- ++agent_option_errors;
- log_error("No room in packet (used %d of %d) "
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_MAINTAINER:=Ben Kelly <ben@benjii.net>
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=lftp
-PKG_VERSION:=4.7.4
+PKG_VERSION:=4.7.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://lftp.tech/ftp/ \
ftp://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/
-PKG_MD5SUM:=74965c798b1806d0a2659d8a606ea47f
+PKG_MD5SUM:=88c1505f8264429353ea7f249597eeb7
PKG_NAME:=luci-app-bcp38
PKG_VERSION:=2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=Apache-2.0
LUCI_DIR:=/usr/lib/lua/luci
m = Map("bcp38", translate("BCP38"),
translate("This function blocks packets with private address destinations " ..
"from going out onto the internet as per " ..
- "<a href=\"http://tools.ietf.org/html/bcp38\">BCP 38</a>."))
+ "<a href=\"http://tools.ietf.org/html/bcp38\">BCP 38</a>. " ..
+ "For IPv6, only source specific default routes are installed, so " ..
+ "no BCP38 firewall routes are needed."))
s = m:section(TypedSection, "bcp38", translate("BCP38 config"))
s.anonymous = true
endef
# Applies to all...
-MAKE_FLAGS += WITH_DOCS=no
+MAKE_FLAGS += WITH_DOCS=no UNAME=Linux
ifeq ($(BUILD_VARIANT),nossl)
MAKE_FLAGS += WITH_TLS=no WITH_WEBSOCKETS=no
else
OPT="$(TARGET_CFLAGS)" \
INSTALLSUID="install -m 4755" \
DESTDIR="$(PKG_INSTALL_DIR)" \
- RPCGEN_PATH=$(STAGING_DIR)/host/bin/rpcgen \
- RPCGEN=$(STAGING_DIR)/host/bin/rpcgen
+ RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
+ RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
HOST_CFLAGS += -Dlinux
endef
define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR)/host/bin
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR)/host/bin/rpcgen
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen
endef
define Package/nfs-kernel-server/install
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
+PKG_SOURCE_URL:=https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
+ https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/ \
+ https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
PKG_MD5SUM:=b2db2a83caf66a208bb78d6d287cdaa3
PKG_LICENSE:=BSD ISC
# this is *NOT* GNU autoconf stuff
(cd $(PKG_BUILD_DIR); ./configure \
--prefix=/usr \
- --with-lua="$(STAGING_DIR)/host/bin" \
+ --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \
--with-lua-include="$(STAGING_DIR)/usr/include" \
--with-lua-lib="$(STAGING_DIR)/usr/lib" \
--cflags="$(TARGET_CFLAGS)" \
ccnet-object.h: ${ccnet_object_define}
rm -f $@
- valac --pkg posix ${ccnet_object_define} -C -H ccnet-object.h
-+ "$(STAGING_DIR)/host/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h
++ "$(STAGING_DIR_HOSTPKG)/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h
ccnetobj.c: ${ccnet_object_define}
rm -f $@
- valac -C --pkg posix ${ccnet_object_define}
-+ "$(STAGING_DIR)/host/bin/valac" -C --pkg posix ${ccnet_object_define}
++ "$(STAGING_DIR_HOSTPKG)/bin/valac" -C --pkg posix ${ccnet_object_define}
searpc_gen = searpc-signature.h searpc-marshal.h
seafile-object.h: ${seafile_object_define}
rm -f $@
- valac --pkg posix ${seafile_object_define} -C -H seafile-object.h
-+ "$(STAGING_DIR)/host/bin/valac" --pkg posix ${seafile_object_define} -C -H seafile-object.h
++ "$(STAGING_DIR_HOSTPKG)/bin/valac" --pkg posix ${seafile_object_define} -C -H seafile-object.h
DISTCLEANFILES = ${searpc_gen}
@rm -f vala.tmp
@touch vala.tmp
- valac -C --pkg posix $^
-+ "$(STAGING_DIR)/host/bin/valac" -C --pkg posix $^
++ "$(STAGING_DIR_HOSTPKG)/bin/valac" -C --pkg posix $^
@mv -f vala.tmp $@
${seafile_object_gen}: vala.stamp
include $(TOPDIR)/rules.mk
PKG_NAME:=ser2net
-PKG_VERSION:=3.2
+PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ser2net
-PKG_MD5SUM:=85adca01e963ec80ec96f1dfd23aeaec
+PKG_MD5SUM:=8daf1cfd70d2b220b184c412c64faf2c
+PKG_HASH:=3d1cef5f48df8291e57d4d7d4eac2fc809ae644a5524ffca4aebef0f4e4153dc
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=2.2.3
+PKG_VERSION:=2.6.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
-PKG_SOURCE_VERSION:=2b1eef11973de3f7380401fd20f937e84bc2b756
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_VERSION:=a3bf80cf11e0a88589abdd87266b5351f270197c
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MAINTAINER:=Jian Chang <aa65535@live.com>
+PKG_MIRROR_MD5SUM:=fc60936d8b990fdecd69b908bc6b770b1c1e54598da6622cc9669750c76fa2d1
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
TITLE:=Lightweight Secured Socks5 Proxy $(2)
URL:=https://github.com/shadowsocks/shadowsocks-libev
VARIANT:=$(1)
- DEPENDS:=$(3) +libpthread +ipset +ip +iptables-mod-tproxy
+ DEPENDS:=$(3) +libpthread +ipset +ip +iptables-mod-tproxy +libpcre +zlib
endef
+CONFIGURE_ARGS += \
+ --disable-documentation \
+
Package/shadowsocks-libev = $(call Package/shadowsocks-libev/Default,openssl,(OpenSSL),+libopenssl)
-Package/shadowsocks-libev-polarssl = $(call Package/shadowsocks-libev/Default,polarssl,(PolarSSL),+libpolarssl)
+Package/shadowsocks-libev-mbedtls = $(call Package/shadowsocks-libev/Default,mbedtls,(mbed TLS),+libmbedtls)
define Package/shadowsocks-libev/description
Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.
endef
-Package/shadowsocks-libev-polarssl/description = $(Package/shadowsocks-libev/description)
+Package/shadowsocks-libev-mbedtls/description = $(Package/shadowsocks-libev/description)
define Package/shadowsocks-libev/conffiles
/etc/config/shadowsocks-libev
endef
-Package/shadowsocks-libev-polarssl/conffiles = $(Package/shadowsocks-libev/conffiles)
+Package/shadowsocks-libev-mbedtls/conffiles = $(Package/shadowsocks-libev/conffiles)
define Package/shadowsocks-libev/postinst
#!/bin/sh
exit 0
endef
-Package/shadowsocks-libev-polarssl/postinst = $(Package/shadowsocks-libev/postinst)
+Package/shadowsocks-libev-mbedtls/postinst = $(Package/shadowsocks-libev/postinst)
-ifeq ($(BUILD_VARIANT),polarssl)
- CONFIGURE_ARGS += --with-crypto-library=polarssl
+ifeq ($(BUILD_VARIANT),mbedtls)
+ CONFIGURE_ARGS += --with-crypto-library=mbedtls
endif
define Package/shadowsocks-libev/install
$(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/shadowsocks-libev/firewall.include
endef
-Package/shadowsocks-libev-polarssl/install = $(Package/shadowsocks-libev/install)
+Package/shadowsocks-libev-mbedtls/install = $(Package/shadowsocks-libev/install)
$(eval $(call BuildPackage,shadowsocks-libev))
-$(eval $(call BuildPackage,shadowsocks-libev-polarssl))
+$(eval $(call BuildPackage,shadowsocks-libev-mbedtls))
include $(TOPDIR)/rules.mk
PKG_NAME:=sstp-client
-PKG_VERSION:=1.0.10
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.11
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/sstp-client/$(PKG_VERSION)
-PKG_MD5SUM:=5f290355187e5ce0423fb7e388e65b9d
+PKG_MD5SUM:=4ddbc2fe33eb27d5a4f38d2241005970
PKG_LICENSE=GPLv2
include $(INCLUDE_DIR)/package.mk
define Package/sstp-client
SECTION:=net
CATEGORY:=Network
+ SUBMENU:=VPN
DEPENDS=+libevent2 +libopenssl +ppp
- TITLE:=SSTP is Microsofts Remote Access Solution for PPP over SSL
+ TITLE:=SSTP-Client is a SSTP client for Linux.
URL:=http://sstp-client.sourceforge.net/
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
endef
define Package/sstp-client/description
- It can be used instead of PPTP or L2TP, and is only available with Windows Vista/7 connecting to a Windows 2008 Server. The advantage of SSTP compared to PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443.
- Windows Vista/7 uses SSTP whenever PPTP or L2TP cannot be established. For further information on SSTP check out wikipedia's article on Secure Socket Tunneling Protocol.
+The advantage of SSTP compared to other vpn protocols like PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443.
+This software has a similar commandline and configuration to the standard linux pptp-client software.
+
+Features:
+- Connect to Microsoft RAS network using SSTP
+- Use HTTPS with strong encryption over port 443
+- Asynchronous HDLC frame support
+- Integration with pon/poff
+
endef
define Package/sstp-client/conffiles
endef
define Package/sstp-client/install
- $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/{bin,lib}
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/sstpc $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/src/libsstp-api/.libs/*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/src/pppd-plugin/.libs/*.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/etc/ppp
- $(INSTALL_DIR) $(1)/etc/peers
+
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) files/etc $(1)
endef
$(eval $(call BuildPackage,sstp-client))
include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
-PKG_VERSION:=2.92
-PKG_RELEASE:=3
+PKG_VERSION:=2.92+git
+PKG_RELEASE:=4
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/transmission/transmission-releases/raw/master
-PKG_MD5SUM:=3fce404a436e3cd7fde80fb6ed61c264
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/transmission/transmission.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=35fea28d1a37875ef7480ac061754df617805b19
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_MD5SUM:=aeeb8dfd918bd2cf4fb6fbdf58bd822e9b509df1ba5ec408888edd161123ef8e
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
VARIANT:=openssl
endef
-define Package/transmission-daemon-polarssl
+define Package/transmission-daemon-mbedtls
$(call Package/transmission-daemon/Default)
- TITLE+= (with PolarSSL)
- DEPENDS+=+libpolarssl
- VARIANT:=polarssl
+ TITLE+= (with mbed TLS)
+ DEPENDS+=+libmbedtls
+ VARIANT:=mbedtls
endef
define Package/transmission-cli/Default
VARIANT:=openssl
endef
-define Package/transmission-cli-polarssl
+define Package/transmission-cli-mbedtls
$(call Package/transmission-cli/Default)
- TITLE+= (with PolarSSL)
- DEPENDS+=+libpolarssl
- VARIANT:=polarssl
+ TITLE+= (with mbed TLS)
+ DEPENDS+=+libmbedtls
+ VARIANT:=mbedtls
endef
define Package/transmission-remote/Default
VARIANT:=openssl
endef
-define Package/transmission-remote-polarssl
+define Package/transmission-remote-mbedtls
$(call Package/transmission-remote/Default)
- TITLE+= (with PolarSSL)
- DEPENDS+=+libpolarssl
- VARIANT:=polarssl
+ TITLE+= (with mbed TLS)
+ DEPENDS+=+libmbedtls
+ VARIANT:=mbedtls
endef
define Package/transmission-web
$(call Package/transmission/template)
TITLE+= (webinterface)
- DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-polarssl)
+ DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
endef
This package contains the daemon itself.
endef
Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
-Package/transmission-daemon-polarssl/description = $(Package/transmission-daemon/Default/description)
+Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description)
define Package/transmission-cli/Default/description
CLI utilities for transmission.
endef
Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
-Package/transmission-cli-polarssl/description = $(Package/transmission-cli/Default/description)
+Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description)
define Package/transmission-remote/Default/description
CLI remote interface for transmission.
endef
Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
-Package/transmission-remote-polarssl/description = $(Package/transmission-remote/Default/description)
+Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description)
define Package/transmission-web/description
Webinterface resources for transmission.
define Package/transmission-daemon-openssl/conffiles
/etc/config/transmission
endef
-Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles)
+Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
CONFIGURE_VARS += \
--with-crypto=openssl
endif
-ifeq ($(BUILD_VARIANT),polarssl)
+ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += \
--with-crypto=polarssl
+ CONFIGURE_VARS += \
+ MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
+ MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
endif
MAKE_FLAGS += \
TARGET_CFLAGS += -std=gnu99
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR); ./autogen.sh $(CONFIGURE_ARGS))
+ $(call Build/Configure/Default,$CONFIGURE_ARGS)
+endef
+
define Package/transmission-daemon-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
endef
-Package/transmission-daemon-polarssl/install = $(Package/transmission-daemon-openssl/install)
+Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
define Package/transmission-cli-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
$(1)/usr/bin/
endef
-Package/transmission-cli-polarssl/install = $(Package/transmission-cli-openssl/install)
+Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
define Package/transmission-remote-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
endef
-Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install)
+Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
define Package/transmission-web/install
$(INSTALL_DIR) $(1)/usr/share/transmission
endef
$(eval $(call BuildPackage,transmission-daemon-openssl))
-$(eval $(call BuildPackage,transmission-daemon-polarssl))
+$(eval $(call BuildPackage,transmission-daemon-mbedtls))
$(eval $(call BuildPackage,transmission-cli-openssl))
-$(eval $(call BuildPackage,transmission-cli-polarssl))
+$(eval $(call BuildPackage,transmission-cli-mbedtls))
$(eval $(call BuildPackage,transmission-remote-openssl))
-$(eval $(call BuildPackage,transmission-remote-polarssl))
+$(eval $(call BuildPackage,transmission-remote-mbedtls))
$(eval $(call BuildPackage,transmission-web))
--- a/configure.ac
+++ b/configure.ac
-@@ -378,7 +378,7 @@ dnl See if ANY version of miniupnpc is i
+@@ -386,7 +386,7 @@ dnl See if ANY version of miniupnpc is i
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>],
[struct UPNPDev dev;])],
--- a/libtransmission/bitfield.c
+++ b/libtransmission/bitfield.c
-@@ -7,6 +7,8 @@
- * $Id: bitfield.c 14646 2015-12-31 05:22:42Z mikedld $
+@@ -6,6 +6,8 @@
+ *
*/
+#define __NEED_ssize_t
#include <assert.h>
#include <string.h> /* memset */
-@@ -14,6 +16,7 @@
+@@ -13,6 +15,7 @@
#include "bitfield.h"
#include "utils.h" /* tr_new0 () */
/****
--- a/libtransmission/fdlimit.h
+++ b/libtransmission/fdlimit.h
-@@ -11,6 +11,8 @@
+@@ -10,6 +10,8 @@
#error only libtransmission should #include this header.
#endif
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -154,24 +154,8 @@ AS_IF([test "x$want_crypto" = "xauto" -o
+ AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [
+ PKG_CHECK_MODULES(MBEDTLS, [mbedtls >= $POLARSSL_MINIMUM],
+ [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS="$MBEDTLS_CFLAGS"; CRYPTO_LIBS="$MBEDTLS_LIBS"; POLARSSL_IS_MBEDTLS=yes],
+- [AC_CHECK_HEADER([polarssl/version.h],
+- [AC_EGREP_CPP([version_ok], [#include <polarssl/version.h>
+- #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM
+- version_ok
+- #endif],
+- [AC_CHECK_LIB([polarssl], [dhm_calc_secret],
+- [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"],
+- [AS_IF([test "x$want_crypto" = "xpolarssl"],
+- [AC_MSG_ERROR([PolarSSL support requested, but library not found.])]
+- )]
+- )],
+- [AS_IF([test "x$want_crypto" = "xpolarssl"],
+- [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])]
+- )]
+- )],
+- [AS_IF([test "x$want_crypto" = "xpolarssl"],
+- [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])]
+- )]
++ [AS_IF([test "x$want_crypto" = "xpolarssl"],
++ [AC_MSG_ERROR([PolarSSL support requested, but library not found.])]
+ )]
+ )
+ ])
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -42,8 +42,8 @@ set(TR_NAME ${PROJECT_NAME})
+ # "Z" for unsupported trunk builds,
+ # "0" for stable, supported releases
+ # these should be the only two lines you need to change
+-set(TR_USER_AGENT_PREFIX "2.92+")
+-set(TR_PEER_ID_PREFIX "-TR292Z-")
++set(TR_USER_AGENT_PREFIX "2.92")
++set(TR_PEER_ID_PREFIX "-TR2920-")
+
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+).*" TR_VERSION "${TR_USER_AGENT_PREFIX}")
+ set(TR_VERSION_MAJOR "${CMAKE_MATCH_1}")
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,8 +3,8 @@ dnl STATUS: "X" for prerelease beta buil
+ dnl "Z" for unsupported trunk builds,
+ dnl "0" for stable, supported releases
+ dnl these should be the only two lines you need to change
+-m4_define([user_agent_prefix],[2.92+])
+-m4_define([peer_id_prefix],[-TR292Z-])
++m4_define([user_agent_prefix],[2.92])
++m4_define([peer_id_prefix],[-TR2920-])
+
+ AC_INIT([transmission],[user_agent_prefix],[https://trac.transmissionbt.com/newticket])
+ AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix])
#
-# Copyright (c) 2016 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2016-2017 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=0.3.0
+PKG_VERSION:=0.3.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
## Main Features
* STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
-* zero-conf like automatic installation & setup, usually no manual changes needed
+* easy setup within normal OpenWrt/LEDE environment
* fast uplink connections
* procd init system support
* procd based hotplug support, the travelmate start will be triggered by interface triggers
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="0.3.0"
+trm_ver="0.3.1"
trm_enabled=1
trm_debug=0
trm_maxwait=20
f_check()
{
- local ifname cnt=0 mode="${1}"
+ local ifname cnt=1 mode="${1}"
trm_ifstatus="false"
- while [ ${cnt} -lt ${trm_maxwait} ]
+ while [ ${cnt} -le ${trm_maxwait} ]
do
ifname="$(ubus -S call network.wireless status | jsonfilter -l 1 -e "@.*.interfaces[@.config.mode=\"${mode}\"].ifname")"
if [ "${mode}" = "sta" ]
f_main()
{
- local ap_list ssid_list config network ssid cnt=0
+ local ap_list ssid_list config network ssid cnt=1
f_check "sta"
if [ "${trm_ifstatus}" != "true" ]
fi
for ap in ${ap_list}
do
- while [ ${cnt} -lt ${trm_maxretry} ]
+ while [ ${cnt} -le ${trm_maxretry} ]
do
if [ ${trm_iw} -eq 1 ]
then
then
uci -q set wireless."${config}".disabled=0
uci -q commit wireless
- ubus call network.interface."${network}" up
ubus call network reload
- f_log "info " "main ::: wwan interface connected to uplink ${ssid}"
- return 0
+ f_check "sta"
+ if [ "${trm_ifstatus}" = "true" ]
+ then
+ f_log "info " "main ::: wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry})"
+ return 0
+ else
+ uci -q set wireless."${config}".disabled=1
+ uci -q commit wireless
+ ubus call network reload
+ f_log "info " "main ::: wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry})"
+ fi
fi
done
fi
#
-# Copyright (C) 2009-2015 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=umurmur
-PKG_VERSION:=0.2.16
+PKG_VERSION:=0.2.16-20161126
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/umurmur/umurmur.git
+PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=0.2.16
+PKG_SOURCE_VERSION:=fac630135664fda26338d403041b6b6e558a2d6b
+PKG_MIRROR_MD5SUM:=0e031baa5cebcdb4eb39a0cde572014f
+PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
SUBMENU:=Instant Messaging
TITLE:=uMurmur
DEPENDS:=+libconfig +libprotobuf-c
- URL:=http://code.google.com/p/umurmur
- MAINTAINER:=Martin Johansson <martin@fatbob.nu>
+ URL:=http://umurmur.net
endef
define Package/umurmur/Default/description
Uses OpenSSL library for SSL and crypto.
endef
-define Package/umurmur-polarssl
+define Package/umurmur-mbedtls
$(call Package/umurmur/Default)
- TITLE+= (with PolarSSL support)
- DEPENDS+= +libpolarssl
- VARIANT:=polarssl
+ TITLE+= (with mbed TLS support)
+ DEPENDS+= +libmbedtls
+ VARIANT:=mbedtls
endef
-define Package/umurmur-polarssl/description
+define Package/umurmur-mbedtls/description
$(call Package/umurmur/Default/description)
- Uses the PolarSSL library for SSL and crypto.
+ Uses the mbed TLS library for SSL and crypto.
endef
define Build/Compile
/etc/umurmur.conf
endef
-Package/umurmur-polarssl/conffiles = $(Package/umurmur-openssl/conffiles)
+Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles)
define Package/umurmur-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/umurmur
endef
-Package/umurmur-polarssl/install = $(Package/umurmur-openssl/install)
+Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += \
--with-ssl=openssl
endif
-ifeq ($(BUILD_VARIANT),polarssl)
+ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += \
- --with-ssl=polarssl
+ --with-ssl=mbedtls
endif
$(eval $(call BuildPackage,umurmur-openssl))
-$(eval $(call BuildPackage,umurmur-polarssl))
+$(eval $(call BuildPackage,umurmur-mbedtls))
--- /dev/null
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -90,7 +90,7 @@ typedef ssl_context SSL_handle_t;
+
+ #elif defined(USE_MBEDTLS)
+ #include <mbedtls/ssl.h>
+-#include <mbedtls/net.h>
++#include <mbedtls/net_sockets.h>
+ #include <mbedtls/version.h>
+
+ #if defined(MBEDTLS_VERSION_MAJOR)
+++ /dev/null
-diff --git a/src/ssli_polarssl.c b/src/ssli_polarssl.c
-index a36ccb6..167637b 100644
---- a/src/ssli_polarssl.c
-+++ b/src/ssli_polarssl.c
-@@ -225,8 +225,12 @@ void SSLi_init(void)
- Log_fatal("Cannot open /dev/urandom");
- #endif
-
-+#ifdef POLARSSL_VERSION_FEATURES
- version_get_string(verstring);
- Log_info("PolarSSL library version %s initialized", verstring);
-+#else
-+ Log_info("PolarSSL library initialized");
-+#endif
- }
-
- void SSLi_deinit(void)
PKG_NAME:=wireguard
-PKG_VERSION:=0.0.20161230
+PKG_VERSION:=0.0.20170105
PKG_RELEASE:=1
PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
# This is actually SHA256, but OpenWRT/LEDE will figure it out based on the length
-PKG_MD5SUM:=69c9770daf9c8ff6632d614afc117b60774760f1224c9322c84f8da92b9ae396
+PKG_MD5SUM:=1bd990eeae6fbf599ccddde81caa92770f58623ad9705f875bcfab8254583896
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
PKG_BUILD_DIR:=$(BUILD_DIR)/WireGuard-$(PKG_VERSION)
TITLE:=Wireguard kernel module
DEPENDS:=+IPV6:kmod-udptunnel6 +kmod-udptunnel4 +kmod-ipt-hashlimit
FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX)
- AUTOLOAD:=$(call AutoLoad,33,wireguard)
+ AUTOLOAD:=$(call AutoProbe,wireguard)
endef
define KernelPackage/wireguard/description
PKG_LICENSE:=GPL-3.0
-PKG_SOURCE:=$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne/archive/
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne
PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=ae491c277e6f35d1acbdcbf700e2b834957295ae
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_MIRROR_MD5SUM:=c8c3219c995a59161832d580a194f6280de7a4eef75cebece6f38400b64f003e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_MD5SUM:=5e381f0864797886b3b3bf20beb49bba
PKG_BUILD_DEPENDS:=uclibcxx
PKG_BUILD_PARALLEL:=1
make-linux.mk | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
-Index: ZeroTierOne-1.1.14/make-linux.mk
-===================================================================
---- ZeroTierOne-1.1.14.orig/make-linux.mk
-+++ ZeroTierOne-1.1.14/make-linux.mk
-@@ -39,19 +39,19 @@ include objects.mk
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -39,24 +39,24 @@ include objects.mk
# On Linux we auto-detect the presence of some libraries and if present we
# link against the system version. This works with our package build images.
-ifeq ($(wildcard /usr/include/lz4.h),)
-+ifeq ($(wildcard $(STAGING_DIR)/usr/include/lz4.h),)
++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/lz4.h),)
OBJS+=ext/lz4/lz4.o
- else
- LDLIBS+=-llz4
- DEFS+=-DZT_USE_SYSTEM_LZ4
- endif
+-else
+- LDLIBS+=-llz4
+- DEFS+=-DZT_USE_SYSTEM_LZ4
+-endif
-ifeq ($(wildcard /usr/include/http_parser.h),)
-+ifeq ($(wildcard $(STAGING_DIR)/usr/include/http_parser.h),)
++#else
++# LDLIBS+=-llz4
++# DEFS+=-DZT_USE_SYSTEM_LZ4
++#endif
++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/http_parser.h),)
OBJS+=ext/http-parser/http_parser.o
- else
- LDLIBS+=-lhttp_parser
- DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER
- endif
+-else
+- LDLIBS+=-lhttp_parser
+- DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER
+-endif
-ifeq ($(wildcard /usr/include/json-parser/json.h),)
-+ifeq ($(wildcard $(STAGING_DIR)/usr/include/json-parser/json.h),)
++#else
++# LDLIBS+=-lhttp_parser
++# DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER
++#endif
++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/json-parser/json.h),)
OBJS+=ext/json-parser/json.o
- else
- LDLIBS+=-ljsonparser
+-else
+- LDLIBS+=-ljsonparser
+- DEFS+=-DZT_USE_SYSTEM_JSON_PARSER
+-endif
++#else
++# LDLIBS+=-ljsonparser
++# DEFS+=-DZT_USE_SYSTEM_JSON_PARSER
++#endif
+
+ ifeq ($(ZT_USE_MINIUPNPC),1)
+ OBJS+=osdep/PortMapper.o
--- /dev/null
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -64,7 +64,8 @@ ifeq ($(ZT_USE_MINIUPNPC),1)
+ DEFS+=-DZT_USE_MINIUPNPC
+
+ # Auto-detect libminiupnpc at least v2.0
+- MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
++ #MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
++ MINIUPNPC_IS_NEW_ENOUGH=1
+ ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
+ DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
+ LDLIBS+=-lminiupnpc
+@@ -74,7 +75,7 @@ ifeq ($(ZT_USE_MINIUPNPC),1)
+ endif
+
+ # Auto-detect libnatpmp
+- ifeq ($(wildcard /usr/include/natpmp.h),)
++ ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
+ OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
+ else
+ LDLIBS+=-lnatpmp
+--- a/osdep/PortMapper.cpp
++++ b/osdep/PortMapper.cpp
+@@ -180,7 +180,7 @@ public:
+ struct IGDdatas data;
+
+ int upnpError = 0;
+- UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,2,&upnpError);
++ UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,&upnpError);
+ if (devlist) {
+
+ #ifdef ZT_PORTMAPPER_TRACE
+++ /dev/null
-Index: ZeroTierOne-1.1.14/make-linux.mk
-===================================================================
---- ZeroTierOne-1.1.14.orig/make-linux.mk
-+++ ZeroTierOne-1.1.14/make-linux.mk
-@@ -64,22 +64,22 @@ ifeq ($(ZT_USE_MINIUPNPC),1)
- DEFS+=-DZT_USE_MINIUPNPC
-
- # Auto-detect libminiupnpc at least v2.0
-- MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
-- ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
-+# MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
-+# ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
- DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
- LDLIBS+=-lminiupnpc
-- else
-- DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
-- OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
-- endif
-+# else
-+# DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
-+# OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
-+# endif
-
- # Auto-detect libnatpmp
-- ifeq ($(wildcard /usr/include/natpmp.h),)
-- OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
-- else
-+# ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
-+# OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
-+# else
- LDLIBS+=-lnatpmp
- DEFS+=-DZT_USE_SYSTEM_NATPMP
-- endif
-+# endif
- endif
-
- ifeq ($(ZT_ENABLE_NETWORK_CONTROLLER),1)
-Index: ZeroTierOne-1.1.14/osdep/PortMapper.cpp
-===================================================================
---- ZeroTierOne-1.1.14.orig/osdep/PortMapper.cpp
-+++ ZeroTierOne-1.1.14/osdep/PortMapper.cpp
-@@ -180,7 +180,7 @@ public:
- struct IGDdatas data;
-
- int upnpError = 0;
-- UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,2,&upnpError);
-+ UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,&upnpError);
- if (devlist) {
-
- #ifdef ZT_PORTMAPPER_TRACE
+++ /dev/null
---- a/src/luaconf.h
-+++ b/src/luaconf.h
-@@ -35,8 +35,8 @@
- #ifndef LUA_LMULTILIB
- #define LUA_LMULTILIB "lib"
- #endif
--#define LUA_LROOT "/usr/local"
--#define LUA_LUADIR "/lua/5.1/"
-+#define LUA_LROOT "/usr"
-+#define LUA_LUADIR "/lua/"
- #define LUA_LJDIR "/luajit-2.1.0-beta2/"
-
- #ifdef LUA_ROOT
#
-# Copyright (C) 2015-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# updated to work with latest source from abrasive
PKG_NAME:=shairport-sync
PKG_VERSION:=2.8.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Mike Brady <mikebrady@eircom.net>
VARIANT:=openssl
endef
-define Package/shairport-sync-polarssl
+define Package/shairport-sync-mbedtls
$(Package/shairport-sync/default)
- TITLE+= (polarssl)
- DEPENDS+= +libpolarssl +libavahi-client +libsoxr
- VARIANT:=polarssl
+ TITLE+= (mbed TLS)
+ DEPENDS+= +libmbedtls +libavahi-client +libsoxr
+ VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/shairport-sync-mini
$(Package/shairport-sync/default)
TITLE+= (minimal)
- DEPENDS+= +libpolarssl
+ DEPENDS+= +libmbedtls
VARIANT:=mini
endef
Also select kmod-usb-audio if you want to use USB-connected sound cards.
endef
Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description)
-Package/shairport-sync-polarssl/description = $(Package/shairport-sync/default/description)
+Package/shairport-sync-mbedtls/description = $(Package/shairport-sync/default/description)
define Package/shairport-sync-mini/description
$(Package/shairport-sync/default/description)
- Minimal version uses PolarSSL and does not include libsoxr and avahi support.
+ Minimal version uses mbed TLS and does not include libsoxr and avahi support.
endef
CONFIGURE_ARGS+= \
CONFIGURE_ARGS+= --with-ssl=openssl
endif
-ifeq ($(BUILD_VARIANT),polarssl)
- CONFIGURE_ARGS+= --with-ssl=polarssl
+ifeq ($(BUILD_VARIANT),mbedtls)
+ CONFIGURE_ARGS+= --with-ssl=mbedtls
endif
ifeq ($(BUILD_VARIANT),mini)
- CONFIGURE_ARGS+= --with-ssl=polarssl --with-tinysvcmdns
+ CONFIGURE_ARGS+= --with-ssl=mbedtls --with-tinysvcmdns
else
CONFIGURE_ARGS+= --with-avahi --with-soxr
endif
endef
Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles)
-Package/shairport-sync-polarssl/conffiles = $(Package/shairport-sync/default/conffiles)
+Package/shairport-sync-mbedtls/conffiles = $(Package/shairport-sync/default/conffiles)
Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles)
define Package/shairport-sync/default/install
endef
Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
-Package/shairport-sync-polarssl/install = $(Package/shairport-sync/default/install)
+Package/shairport-sync-mbedtls/install = $(Package/shairport-sync/default/install)
Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install)
$(eval $(call BuildPackage,shairport-sync-openssl))
-$(eval $(call BuildPackage,shairport-sync-polarssl))
+$(eval $(call BuildPackage,shairport-sync-mbedtls))
$(eval $(call BuildPackage,shairport-sync-mini))
--- /dev/null
+diff --git a/common.c b/common.c
+index bf72127..2d4739e 100644
+--- a/common.c
++++ b/common.c
+@@ -54,17 +54,14 @@
+ #include <openssl/buffer.h>
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
+-#include <polarssl/version.h>
+-#include <polarssl/base64.h>
+-#include <polarssl/x509.h>
+-#include <polarssl/md.h>
+-#include "polarssl/entropy.h"
+-#include "polarssl/ctr_drbg.h"
+-
+-#if POLARSSL_VERSION_NUMBER >= 0x01030000
+-#include "polarssl/compat-1.2.h"
+-#endif
++#ifdef HAVE_LIBMBEDTLS
++#include <mbedtls/version.h>
++#include <mbedtls/base64.h>
++#include <mbedtls/x509.h>
++#include <mbedtls/md.h>
++#include "mbedtls/entropy.h"
++#include "mbedtls/ctr_drbg.h"
++
+ #endif
+
+ #include "common.h"
+@@ -126,16 +123,16 @@ void inform(char *format, ...) {
+ daemon_log(LOG_INFO, "%s", s);
+ }
+
+-#ifdef HAVE_LIBPOLARSSL
++#ifdef HAVE_LIBMBEDTLS
+ char *base64_enc(uint8_t *input, int length) {
+ char *buf = NULL;
+ size_t dlen = 0;
+- int rc = base64_encode(NULL, &dlen, input, length);
+- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL))
++ int rc = mbedtls_base64_encode(NULL, 0, &dlen, input, length);
++ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL))
+ debug(1, "Error %d getting length of base64 encode.", rc);
+ else {
+ buf = (char *)malloc(dlen);
+- rc = base64_encode((unsigned char *)buf, &dlen, input, length);
++ rc = mbedtls_base64_encode((unsigned char *)buf, dlen, &dlen, input, length);
+ if (rc != 0)
+ debug(1, "Error %d encoding base64.", rc);
+ }
+@@ -156,10 +153,10 @@ uint8_t *base64_dec(char *input, int *outlen) {
+ else {
+ strcpy(inbuf, input);
+ strcat(inbuf, "===");
+- // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length
+- // %d.",input,strlen(input),inbuf,inbufsize);
+- int rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize);
+- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL))
++ // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length %d.",
++ // input,strlen(input),inbuf,inbufsize);
++ int rc = mbedtls_base64_decode(NULL, 0, &dlen, (unsigned char *)inbuf, inbufsize);
++ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL))
+ debug(1, "Error %d getting decode length, result is %d.", rc, dlen);
+ else {
+ // debug(1,"Decode size is %d.",dlen);
+@@ -167,7 +164,7 @@ uint8_t *base64_dec(char *input, int *outlen) {
+ if (buf == 0)
+ debug(1, "Can't allocate memory in base64_dec.");
+ else {
+- rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize);
++ rc = mbedtls_base64_decode(buf, dlen, &dlen, (unsigned char *)inbuf, inbufsize);
+ if (rc != 0)
+ debug(1, "Error %d in base64_dec.", rc);
+ }
+@@ -280,58 +277,59 @@ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) {
+ }
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
++#ifdef HAVE_LIBMBEDTLS
+ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) {
+- rsa_context trsa;
++ mbedtls_pk_context pkctx;
++ mbedtls_rsa_context *trsa;
+ const char *pers = "rsa_encrypt";
++ size_t olen = *outlen;
+ int rc;
+
+- entropy_context entropy;
+- ctr_drbg_context ctr_drbg;
+- entropy_init(&entropy);
+- if ((rc = ctr_drbg_init(&ctr_drbg, entropy_func, &entropy, (const unsigned char *)pers,
+- strlen(pers))) != 0)
+- debug(1, "ctr_drbg_init returned %d\n", rc);
++ mbedtls_entropy_context entropy;
++ mbedtls_ctr_drbg_context ctr_drbg;
++
++ mbedtls_entropy_init(&entropy);
++
++ mbedtls_ctr_drbg_init(&ctr_drbg);
++ mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
++ (const unsigned char *)pers, strlen(pers));
+
+- rsa_init(&trsa, RSA_PKCS_V21, POLARSSL_MD_SHA1); // padding and hash id get overwritten
+- // BTW, this seems to reset a lot of parameters in the rsa_context
+- rc = x509parse_key(&trsa, (unsigned char *)super_secret_key, strlen(super_secret_key), NULL, 0);
++ mbedtls_pk_init(&pkctx);
++
++ rc = mbedtls_pk_parse_key(&pkctx, (unsigned char *)super_secret_key, sizeof(super_secret_key), NULL, 0);
+ if (rc != 0)
+- debug(1, "Error %d reading the private key.");
++ debug(1, "Error %d reading the private key.", rc);
+
+- uint8_t *out = NULL;
++ uint8_t *outbuf = NULL;
++ trsa = mbedtls_pk_rsa(pkctx);
+
+ switch (mode) {
+ case RSA_MODE_AUTH:
+- trsa.padding = RSA_PKCS_V15;
+- trsa.hash_id = POLARSSL_MD_NONE;
+- debug(2, "rsa_apply encrypt");
+- out = malloc(trsa.len);
+- rc = rsa_pkcs1_encrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, inlen, input, out);
++ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_NONE);
++ outbuf = malloc(trsa->len);
++ rc = mbedtls_rsa_pkcs1_encrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE,
++ inlen, input, outbuf);
+ if (rc != 0)
+- debug(1, "rsa_pkcs1_encrypt error %d.", rc);
+- *outlen = trsa.len;
++ debug(1, "mbedtls_pk_encrypt error %d.", rc);
++ *outlen = trsa->len;
+ break;
+ case RSA_MODE_KEY:
+- debug(2, "rsa_apply decrypt");
+- trsa.padding = RSA_PKCS_V21;
+- trsa.hash_id = POLARSSL_MD_SHA1;
+- out = malloc(trsa.len);
+-#if POLARSSL_VERSION_NUMBER >= 0x01020900
+- rc = rsa_pkcs1_decrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, (size_t *)outlen, input,
+- out, trsa.len);
+-#else
+- rc = rsa_pkcs1_decrypt(&trsa, RSA_PRIVATE, outlen, input, out, trsa.len);
+-#endif
++ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA1);
++ outbuf = malloc(trsa->len);
++ rc = mbedtls_rsa_pkcs1_decrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE,
++ &olen, input, outbuf, trsa->len);
+ if (rc != 0)
+- debug(1, "decrypt error %d.", rc);
++ debug(1, "mbedtls_pk_decrypt error %d.", rc);
++ *outlen = olen;
+ break;
+ default:
+ die("bad rsa mode");
+ }
+- rsa_free(&trsa);
+- debug(2, "rsa_apply exit");
+- return out;
++
++ mbedtls_ctr_drbg_free(&ctr_drbg);
++ mbedtls_entropy_free(&entropy);
++ mbedtls_pk_free(&pkctx);
++ return outbuf;
+ }
+ #endif
+
+@@ -517,7 +515,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
+ void *ibuf = (void *)buf;
+ size_t bytes_remaining = count;
+ int rc = 0;
+- struct pollfd ufds[1];
++ struct pollfd ufds[1];
+ while ((bytes_remaining>0) && (rc==0)) {
+ // check that we can do some writing
+ ufds[0].fd = fd;
+diff --git a/configure.ac b/configure.ac
+index 8d82da4..a2d1e4f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -108,11 +108,11 @@ AC_ARG_WITH(piddir, [ --with-piddir=<pathname> Specify a pathname to a directory
+ AM_CONDITIONAL([USE_CUSTOMPIDDIR], [test "x$HAS_CUSTOMPIDDIR" = "x1"])
+
+ # Check --with-ssl=argument
+-AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encryption services], [
++AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=mbedtls for encryption services], [
+ AC_MSG_CHECKING(encryption libraries chosen)
+ if test "x${with_ssl}" = x -o "x${with_ssl}" = xyes ; then
+ AC_MSG_RESULT(not found)
+- AC_MSG_ERROR(choose either "openssl" or "polarssl" encryption)
++ AC_MSG_ERROR(choose either "openssl" or "mbedtls" encryption)
+ fi
+ if test "x${with_ssl}" = xopenssl ; then
+ if test "x${with_pkg_config}" = xyes ; then
+@@ -127,10 +127,15 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encrypti
+ AC_DEFINE([HAVE_LIBCRYPTO],[1],[Define to 1 if you have libcrypto])
+ AC_DEFINE([HAVE_LIBSSL],[1],[Define to 1 if you have libssl])
+ fi
+- elif test "x${with_ssl}" = xpolarssl ; then
+- AC_CHECK_LIB([polarssl],[ssl_init], , AC_MSG_ERROR(PolarSSL selected but the library cannot be found!))
++ elif test "x${with_ssl}" = xmbedtls ; then
++ AC_CHECK_LIB([mbedtls],[mbedtls_ssl_init],,
++ [AC_MSG_ERROR([Cannot find required libray: libmbedtls],1)])
++ AC_CHECK_LIB([mbedcrypto], [mbedtls_entropy_func],,
++ [AC_MSG_ERROR([Cannot find required library: libmbedcrypto],1)])
++ AC_CHECK_LIB([mbedx509], [mbedtls_pk_init],,
++ [AC_MSG_ERROR([Cannot find required library: libmbedx509],1)])
+ else
+- AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "polarssl")
++ AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "mbedtls")
+ fi
+ ], )
+
+diff --git a/player.c b/player.c
+index 97eccfb..da2d735 100644
+--- a/player.c
++++ b/player.c
+@@ -47,9 +47,9 @@
+
+ #include "config.h"
+
+-#ifdef HAVE_LIBPOLARSSL
+-#include <polarssl/aes.h>
+-#include <polarssl/havege.h>
++#ifdef HAVE_LIBMBEDTLS
++#include <mbedtls/aes.h>
++#include <mbedtls/havege.h>
+ #endif
+
+ #ifdef HAVE_LIBSSL
+@@ -82,8 +82,8 @@ static int max_frame_size_change = 1;
+ // maximal resampling shift - conservative
+ //#define OUTFRAME_BYTES(frame_size) (4 * (frame_size + 3))
+
+-#ifdef HAVE_LIBPOLARSSL
+-static aes_context dctx;
++#ifdef HAVE_LIBMBEDTLS
++static mbedtls_aes_context dctx;
+ #endif
+
+ //static pthread_t player_thread = NULL;
+@@ -247,8 +247,8 @@ static int alac_decode(short *dest, int *destlen, uint8_t *buf, int len) {
+ unsigned char iv[16];
+ int aeslen = len & ~0xf;
+ memcpy(iv, aesiv, sizeof(iv));
+-#ifdef HAVE_LIBPOLARSSL
+- aes_crypt_cbc(&dctx, AES_DECRYPT, aeslen, iv, buf, packet);
++#ifdef HAVE_LIBMBEDTLS
++ mbedtls_aes_crypt_cbc(&dctx, MBEDTLS_AES_DECRYPT, aeslen, iv, buf, packet);
+ #endif
+ #ifdef HAVE_LIBSSL
+ AES_cbc_encrypt(buf, packet, aeslen, &aes, iv, AES_DECRYPT);
+@@ -1685,9 +1685,9 @@ int player_play(stream_cfg *stream, pthread_t *player_thread) {
+ die("specified buffer starting fill %d > buffer size %d", config.buffer_start_fill,
+ BUFFER_FRAMES);
+ if (encrypted) {
+-#ifdef HAVE_LIBPOLARSSL
+- memset(&dctx, 0, sizeof(aes_context));
+- aes_setkey_dec(&dctx, stream->aeskey, 128);
++#ifdef HAVE_LIBMBEDTLS
++ memset(&dctx, 0, sizeof(mbedtls_aes_context));
++ mbedtls_aes_setkey_dec(&dctx, stream->aeskey, 128);
+ #endif
+
+ #ifdef HAVE_LIBSSL
+diff --git a/rtsp.c b/rtsp.c
+index 38b0745..8003803 100644
+--- a/rtsp.c
++++ b/rtsp.c
+@@ -50,8 +50,8 @@
+ #include <openssl/md5.h>
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
+-#include <polarssl/md5.h>
++#ifdef HAVE_LIBMBEDTLS
++#include <mbedtls/md5.h>
+ #endif
+
+ #include "common.h"
+@@ -979,7 +979,7 @@ static void handle_set_parameter_parameter(rtsp_conn_info *conn,
+ // more significant changes make it not malloc memory
+ // needs to initialise the docoding table first
+
+-// add _so to end of name to avoid confusion with polarssl's implementation
++// add _so to end of name to avoid confusion with SSL library implementation
+
+ static char encoding_table[] = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+@@ -1651,21 +1651,21 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) {
+ MD5_Final(digest_mu, &ctx);
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
+- md5_context tctx;
+- md5_starts(&tctx);
+- md5_update(&tctx, (const unsigned char *)username, strlen(username));
+- md5_update(&tctx, (unsigned char *)":", 1);
+- md5_update(&tctx, (const unsigned char *)realm, strlen(realm));
+- md5_update(&tctx, (unsigned char *)":", 1);
+- md5_update(&tctx, (const unsigned char *)config.password,
++#ifdef HAVE_LIBMBEDTLS
++ mbedtls_md5_context tctx;
++ mbedtls_md5_starts(&tctx);
++ mbedtls_md5_update(&tctx, (const unsigned char *)username, strlen(username));
++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1);
++ mbedtls_md5_update(&tctx, (const unsigned char *)realm, strlen(realm));
++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1);
++ mbedtls_md5_update(&tctx, (const unsigned char *)config.password,
+ strlen(config.password));
+- md5_finish(&tctx, digest_urp);
+- md5_starts(&tctx);
+- md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method));
+- md5_update(&tctx, (unsigned char *)":", 1);
+- md5_update(&tctx, (const unsigned char *)uri, strlen(uri));
+- md5_finish(&tctx, digest_mu);
++ mbedtls_md5_finish(&tctx, digest_urp);
++ mbedtls_md5_starts(&tctx);
++ mbedtls_md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method));
++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1);
++ mbedtls_md5_update(&tctx, (const unsigned char *)uri, strlen(uri));
++ mbedtls_md5_finish(&tctx, digest_mu);
+ #endif
+
+ int i;
+@@ -1685,16 +1685,16 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) {
+ MD5_Final(digest_total, &ctx);
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
+- md5_starts(&tctx);
+- md5_update(&tctx, buf, 32);
+- md5_update(&tctx, (unsigned char *)":", 1);
+- md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce));
+- md5_update(&tctx, (unsigned char *)":", 1);
++#ifdef HAVE_LIBMBEDTLS
++ mbedtls_md5_starts(&tctx);
++ mbedtls_md5_update(&tctx, buf, 32);
++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1);
++ mbedtls_md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce));
++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1);
+ for (i = 0; i < 16; i++)
+ sprintf((char *)buf + 2 * i, "%02x", digest_mu[i]);
+- md5_update(&tctx, buf, 32);
+- md5_finish(&tctx, digest_total);
++ mbedtls_md5_update(&tctx, buf, 32);
++ mbedtls_md5_finish(&tctx, digest_total);
+ #endif
+
+ for (i = 0; i < 16; i++)
+diff --git a/shairport.c b/shairport.c
+index f725d60..2349447 100644
+--- a/shairport.c
++++ b/shairport.c
+@@ -42,8 +42,8 @@
+
+ #include "config.h"
+
+-#ifdef HAVE_LIBPOLARSSL
+-#include <polarssl/md5.h>
++#ifdef HAVE_LIBMBEDTLS
++#include <mbedtls/md5.h>
+ #endif
+
+ #ifdef HAVE_LIBSSL
+@@ -109,8 +109,8 @@ char* get_version_string() {
+ char* version_string = malloc(200);
+ if (version_string) {
+ strcpy(version_string, PACKAGE_VERSION);
+- #ifdef HAVE_LIBPOLARSSL
+- strcat(version_string, "-PolarSSL");
++ #ifdef HAVE_LIBMBEDTLS
++ strcat(version_string, "-mbedTLS");
+ #endif
+ #ifdef HAVE_LIBSSL
+ strcat(version_string, "-OpenSSL");
+@@ -1046,11 +1046,11 @@ int main(int argc, char **argv) {
+ MD5_Final(ap_md5, &ctx);
+ #endif
+
+-#ifdef HAVE_LIBPOLARSSL
+- md5_context tctx;
+- md5_starts(&tctx);
+- md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name));
+- md5_finish(&tctx, ap_md5);
++#ifdef HAVE_LIBMBEDTLS
++ mbedtls_md5_context tctx;
++ mbedtls_md5_starts(&tctx);
++ mbedtls_md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name));
++ mbedtls_md5_finish(&tctx, ap_md5);
+ #endif
+ memcpy(config.hw_addr, ap_md5, sizeof(config.hw_addr));
+ #ifdef CONFIG_METADATA
include $(TOPDIR)/rules.mk
PKG_NAME:=ccid
-PKG_VERSION:=1.4.24
+PKG_VERSION:=1.4.26
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4171
-PKG_MD5SUM:=62cb73c6c009c9799c526f05a05e25f00f0ad86d50f82a714dedcfbf4a7e4176
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4205
+PKG_MD5SUM:=3267bf708ab780c02f01f6241b7c7277cb892d30fd1179a9926a8cc0ca40be2f
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
--disable-verbose-mode \
--disable-xml-docs \
--with-dbus-user=root \
- --with-dbus-daemondir="$(STAGIND_DIR)/host/bin" \
- --with-system-socket="$(STAGING_DIR)/host/var/run/dbus/system_bus_socket" \
- --with-system-pid-file="$(STAGING_DIR)/host/var/run/dbus.pid" \
+ --with-dbus-daemondir="$(STAGING_DIR_HOSTPKG)/bin" \
+ --with-system-socket="$(STAGING_DIR_HOSTPKG)/var/run/dbus/system_bus_socket" \
+ --with-system-pid-file="$(STAGING_DIR_HOSTPKG)/var/run/dbus.pid" \
--without-x \
- --libexecdir="$(STAGING_DIR)/host/lib/dbus-1"
+ --libexecdir="$(STAGING_DIR_HOSTPKG)/lib/dbus-1"
HOST_CONFIGURE_VARS+= \
ac_cv_have_abstract_sockets="yes" \
include $(TOPDIR)/rules.mk
PKG_NAME:=gnupg
-PKG_VERSION:=1.4.20
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.21
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \
ftp://ftp.gnupg.org/gcrypt/gnupg
-PKG_MD5SUM:=b7af897a041c03c8ad1c7c466b54d10d
+PKG_MD5SUM:=9bdeabf3c0f87ff21cb3f9216efdd01d
+PKG_HASH:=6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
PKG_INSTALL:=1
MENU:=1
endef
+define Package/gpgv
+ $(call Package/gnupg/Default)
+ TITLE:=GnuPG signature verification only
+endef
+
define Package/gnupg-utils
$(call Package/gnupg/Default)
DEPENDS:=gnupg +libcurl
with PGP2 because it uses IDEA (which is patented worldwide).
endef
+define Package/gpgv/description
+ GPGv is a stripped down version of GnuPG that only checks signatures.
+ .
+ GnuPG does not use any patented algorithms so it cannot be compatible
+ with PGP2 because it uses IDEA (which is patented worldwide).
+endef
+
define Package/gnupg-utils/description
Key management utilies for GnuPG.
This package is needed to import keys from a keyserver.
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/
endef
+define Package/gpgv/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/
+endef
+
define Package/gnupg-utils/install
$(INSTALL_DIR) $(1)/usr/lib/gnupg
for file in gpgkeys_curl gpgkeys_hkp; do \
endef
$(eval $(call BuildPackage,gnupg))
+$(eval $(call BuildPackage,gpgv))
$(eval $(call BuildPackage,gnupg-utils))
include $(TOPDIR)/rules.mk
PKG_NAME:=open-plc-utils
-PKG_VERSION:=2015-09-21
+PKG_VERSION:=2017-01-11
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=885a1b7e2e663b5ab8797db6d40a0318131fdf18
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_VERSION:=6a07d621583cb86ddf2fddcacb41cc4cf28bf33a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
$(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a))))
-ifdef CONFIG_USE_MUSL
- TARGET_CFLAGS += -D__UCLIBC__
-endif
-
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
+++ /dev/null
---- a/ether/readpacket.c
-+++ b/ether/readpacket.c
-@@ -70,6 +70,10 @@
- #include <memory.h>
- #include <errno.h>
-
-+#if defined (__linux__)
-+#include <poll.h>
-+#endif
-+
- #include "../ether/channel.h"
- #include "../tools/memory.h"
- #include "../tools/error.h"
-@@ -95,8 +99,6 @@ ssize_t readpacket (struct channel const
-
- #elif defined (__linux__)
-
--#include <sys/poll.h>
--
- struct pollfd pollfd =
- {
- channel->fd,
---- a/serial/serial.c
-+++ b/serial/serial.c
-@@ -69,6 +69,8 @@
-
- #if defined (WIN32)
- #include <Windows.h>
-+#else
-+#include <sys/select.h>
- #endif
-
- /*====================================================================*
include $(TOPDIR)/rules.mk
PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.18
+PKG_VERSION:=1.8.20
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4179
-PKG_MD5SUM:=b22d32b018f6a1016adba91abfcc63876cca999daa472dd86e953ddd41d00905
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4203
+PKG_MD5SUM:=ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
#
# Copyright (C) 2013-2015 OpenWrt.org
+# Copyright (C) 2017 Daniel Engberg <daniel.engberg.lists@pyret.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=xz
-PKG_VERSION:=5.2.2
+PKG_VERSION:=5.2.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://tukaani.org/xz \
- http://fossies.org/linux/misc
-PKG_MD5SUM:=f90c9a0c8b259aee2234c4e0d7fd70af
+PKG_SOURCE_URL:=@SF/lzmautils \
+ http://tukaani.org/xz
+PKG_MD5SUM:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1
PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+
PKG_LICENSE_FILES:=COPYING