PKG_NAME:=syslog-ng
PKG_VERSION:=3.9.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
--- /dev/null
+--- a/lib/crypto.c 2016-12-21 07:57:44.000000000 -0700
++++ b/lib/crypto.c 2017-03-24 13:19:34.188259018 -0600
+@@ -51,11 +51,20 @@
+ }
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+ static unsigned long
+ ssl_thread_id(void)
+ {
+ return (unsigned long) get_thread_id();
+ }
++
++#else
++static void
++ssl_thread_id2(CRYPTO_THREADID *id)
++{
++ CRYPTO_THREADID_set_numeric(id, get_thread_id());
++}
++#endif
+
+ static void
+ crypto_init_threading(void)
+@@ -68,7 +76,11 @@
+ {
+ g_static_mutex_init(&ssl_locks[i]);
+ }
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+ CRYPTO_set_id_callback(ssl_thread_id);
++#else
++ CRYPTO_THREADID_set_callback(ssl_thread_id2);
++#endif
+ CRYPTO_set_locking_callback(ssl_locking_callback);
+ }
+
PKG_VERSION:=2.1.0
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode
-PKG_SOURCE_PROTO:=hg
-PKG_SOURCE_VERSION:=500243383cb6acbddd3cf12aee6e4667aab53324
+PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/
+PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
PKG_NPM_NAME:=arduino-firmata
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.3.3
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
include $(INCLUDE_DIR)/package.mk
define Package/node-arduino-firmata
- DEPENDS:=+node
+ DEPENDS:=+node +node-npm
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
PKG_NPM_NAME:=cylon
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.22.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
include $(INCLUDE_DIR)/package.mk
define Package/node-cylon/default
- DEPENDS:=+node $(2)
+ DEPENDS:=+node +node-npm $(2)
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
PKG_NPM_NAME:=hid
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.5.1
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
include $(INCLUDE_DIR)/package.mk
define Package/node-hid
- DEPENDS:=+node
+ DEPENDS:=+node +node-npm
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
PKG_NPM_NAME:=serialport
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=3.0.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
include $(INCLUDE_DIR)/package.mk
define Package/node-serialport
- DEPENDS:=+node
+ DEPENDS:=+node +node-npm
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
PKG_NAME:=node
PKG_VERSION:=v4.4.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
endef
+define Package/node-npm
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Node.js
+ TITLE:=NPM stands for Node Package Manager
+ URL:=http://npmjs.com/
+ DEPENDS:=+node
+endef
+
+define Package/node-npm/description
+ NPM is the package manager for NodeJS
+endef
+
CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))
MAKE_VARS += \
endef
define Package/node/install
+ mkdir -p $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/
+endef
+
+define Package/node-npm/install
mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/npm $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
$(eval $(call HostBuild))
$(eval $(call BuildPackage,node))
+$(eval $(call BuildPackage,node-npm))
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.35
-PKG_RELEASE:=2
+PKG_VERSION:=4.36
+PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c
+PKG_MD5SUM:=48566d81f430a7f755bb4d8f426ce35d
+PKG_HASH:=fefe84d4f2461e867f9be80f3f988e17bcbbcb4e306952cf2fd1dea7e4515490
PKG_LICENSE:=GPL Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
PECL_NAME:=dio
PECL_LONGNAME:=Direct I/O functions
-PKG_VERSION:=0.0.9
+PKG_VERSION:=0.1.0
PKG_RELEASE:=1
-PKG_MD5SUM:=2c80b63fbbbaead856cb468955c14dc328d1262621b0c704b122d902053c8156
+PKG_HASH:=aab985e374604379d99c9c93207f2c2959ff141740d1a648c0fbd07e0e08a73e
PKG_NAME:=php7-pecl-$(PECL_NAME)
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+++ /dev/null
---- a/config9.m4 2016-09-08 21:39:18.000000000 +0200
-+++ b/config9.m4 2016-09-08 21:42:35.066903251 +0200
-@@ -71,18 +71,7 @@
- extname=$1
- haveext=$[PHP_]translit($1,a-z_-,A-Z__)
- AC_MSG_CHECKING([for ext/$extname support])
-- if test -x "$PHP_EXECUTABLE"; then
-- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
-- if test "$grepext" = "$extname"; then
-- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
-- AC_MSG_RESULT([yes])
-- $2
-- else
-- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=
-- AC_MSG_RESULT([no])
-- $3
-- fi
-- elif test "$haveext" != "no" && test "x$haveext" != "x"; then
-+ if test "$haveext" != "no" && test "x$haveext" != "x"; then
- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
- AC_MSG_RESULT([yes])
- $2
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.1.3
-PKG_RELEASE:=1
+PKG_VERSION:=7.1.4
+PKG_RELEASE:=5
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:=d604d688be17f4a05b99dbb7fb9581f4
-PKG_HASH:=e4887c2634778e37fd962fbdf5c4a7d32cd708482fe07b448804625570cb0bb0
+PKG_MD5SUM:=a74c13f8779349872b365e6732e8c98e
+PKG_HASH:=71514386adf3e963df087c2044a0b3747900b8b1fc8da3a99f0a0ae9180d300b
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
config PHP7_FILTER
bool "PHP7 Filter support"
depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
+ default y
config PHP7_LIBXML
bool "PHP7 LIBXML support"
This package contains the FastCGI Process Manager of the PHP7 interpreter.
endef
+# not everything groks --disable-nls
+DISABLE_NLS:=
+
CONFIGURE_ARGS+= \
--enable-cli \
--enable-cgi \
--with-jpeg-dir="$(STAGING_DIR)/usr" \
--with-png-dir="$(STAGING_DIR)/usr" \
--without-xpm-dir \
- --without-t1lib \
--enable-gd-native-ttf \
--disable-gd-jis-conv
else
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-intl),)
CONFIGURE_ARGS+= --enable-intl=shared
+ TARGET_CXXFLAGS+= -std=c++0x
else
CONFIGURE_ARGS+= --disable-intl
endif
--- /dev/null
+--- a/ext/gettext/config.m4
++++ b/ext/gettext/config.m4
+@@ -32,3 +32,2 @@
+ )
+- LDFLAGS=$O_LDFLAGS
+
+@@ -48,3 +48,4 @@
+ AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
++ LDFLAGS=$O_LDFLAGS
+
+ fi
--- /dev/null
+--- a/configure.in 2017-04-14 11:53:48.345481008 -0600
++++ b/configure.in 2017-04-14 11:58:47.887644651 -0600
+@@ -497,6 +497,7 @@
+ locale.h \
+ monetary.h \
+ netdb.h \
++poll.h \
+ pwd.h \
+ resolv.h \
+ signal.h \
+@@ -509,7 +510,6 @@
+ sys/file.h \
+ sys/mman.h \
+ sys/mount.h \
+-sys/poll.h \
+ sys/resource.h \
+ sys/select.h \
+ sys/socket.h \
+--- a/main/php_network.h 2017-04-11 09:37:35.000000000 -0600
++++ b/main/php_network.h 2017-04-14 12:00:00.736168983 -0600
+@@ -122,8 +122,8 @@
+ /* uncomment this to debug poll(2) emulation on systems that have poll(2) */
+ /* #define PHP_USE_POLL_2_EMULATION 1 */
+
+-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+-# include <sys/poll.h>
++#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
++# include <poll.h>
+ typedef struct pollfd php_pollfd;
+ #else
+ typedef struct _php_pollfd {
+--- a/main/network.c 2017-04-11 09:37:35.000000000 -0600
++++ b/main/network.c 2017-04-14 11:59:44.528052372 -0600
+@@ -51,8 +51,8 @@
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+-#if HAVE_SYS_POLL_H
+-#include <sys/poll.h>
++#if HAVE_POLL_H
++#include <poll.h>
+ #endif
+
+ #if defined(NETWARE)
+--- a/main/fastcgi.c 2017-04-11 09:37:35.000000000 -0600
++++ b/main/fastcgi.c 2017-04-14 12:01:06.924644901 -0600
+@@ -76,8 +76,8 @@
+ # include <netdb.h>
+ # include <signal.h>
+
+-# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+-# include <sys/poll.h>
++# if defined(HAVE_POLL_H) && defined(HAVE_POLL)
++# include <poll.h>
+ # endif
+ # if defined(HAVE_SYS_SELECT_H)
+ # include <sys/select.h>
+@@ -1430,7 +1430,7 @@
+ break;
+ #else
+ if (req->fd >= 0) {
+-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
++#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
+ struct pollfd fds;
+ int ret;
+
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=5
+PKG_RELEASE:=1
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_MD5SUM:=82b143ebbf4514d7e05876bed7a6b1f5
-PKG_HASH:=b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622
+PKG_MD5SUM:=692b4fc3a2ba0d54d1495d4ead5b0b5c
+PKG_HASH:=a01810ddfcec216bcdb357a84bfaafdfaa0ca42bbdaa4cb7ff74f5a9961e4041
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
# See /LICENSE for more information.
#
+# Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=6
-PYTHON3_VERSION_MICRO:=0
+PYTHON3_VERSION_MICRO:=1
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
+++ /dev/null
-diff --git a/setup.py b/setup.py
-index 93f390f..ace1494 100644
---- a/setup.py
-+++ b/setup.py
-@@ -461,7 +461,8 @@ class PyBuildExt(build_ext):
- add_dir_to_list(dir_list, directory)
-
- if os.path.normpath(sys.base_prefix) != '/usr' \
-- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
-+ and not cross_compiling:
- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
- # building a framework with different architectures than
#ifdef __sgi
#include <term.h>
#endif
-diff --git a/setup.py b/setup.py
-index af9a414..ee19ecd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1349,7 +1349,6 @@ class PyBuildExt(build_ext):
- panel_library = 'panel'
- if curses_library == 'ncursesw':
- curses_defines.append(('HAVE_NCURSESW', '1'))
-- curses_includes.append('/usr/include/ncursesw')
- # Bug 1464056: If _curses.so links with ncursesw,
- # _curses_panel.so must link with panelw.
- panel_library = 'panelw'
#
# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2017 Luiz Angelo Daros de Luca <luizluca@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# First two numbes
PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
-PKG_HASH:=ccfb2d0a61e2a9c374d51e099b0d833b09241ee78fc17e1fe38e3b282160237c
+PKG_HASH:=4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=avahi
PKG_VERSION:=0.6.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION)
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
VARIANT:=dbus
- DEPENDS:=libavahi-client +libgdbm
+ DEPENDS:=+libavahi-client +libgdbm
TITLE+= (utilities)
endef
#
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-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:=fftw3
-PKG_VERSION:=3.3.6-pl1
+PKG_VERSION:=3.3.6-pl2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.fftw.org
-PKG_MD5SUM:=682a0e78d6966ca37c7446d4ab4cc2a1
+PKG_MD5SUM:=927e481edbb32575397eb3d62535a856
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/giflib
$(CP) $(PKG_BUILD_DIR)/lib/.libs/lib*so* $(1)/usr/lib/
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,giflib))
--- /dev/null
+Index: hiredis-0.13.3/hiredis.h
+===================================================================
+--- hiredis-0.13.3.orig/hiredis.h
++++ hiredis-0.13.3/hiredis.h
+@@ -98,7 +98,7 @@
+ * then GNU strerror_r returned an internal static buffer and we \
+ * need to copy the result into our private buffer. */ \
+ if (err_str != (buf)) { \
+- buf[(len)] = '\0'; \
++ (buf)[(len)] = '\0'; \
+ strncat((buf), err_str, ((len) - 1)); \
+ } \
+ } while (0)
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=58.2
-PKG_RELEASE:=5
+PKG_VERSION:=59.1
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-58_2-src.tgz
+PKG_SOURCE:=$(PKG_NAME)-59_1-src.tgz
PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_MD5SUM:=fac212b32b7ec7ab007a12dff1f3aea1
+PKG_MD5SUM:=54923fa9fab5b2b83f235fb72523de37
+PKG_HASH:=7132fdaf9379429d004005217f10e00b7d2319d0fea22bdfddef8991c45b75fe
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
index 9db6c52..6aa2273 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -180,7 +180,6 @@ install-icu: $(INSTALLED_BUILT_FILES)
+@@ -184,7 +184,6 @@ install-icu: $(INSTALLED_BUILT_FILES)
$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
--- a/configure.ac
+++ b/configure.ac
-@@ -893,8 +893,8 @@
+@@ -883,8 +883,8 @@
AC_CHECK_FUNC(strtod_l)
if test x$ac_cv_func_strtod_l = xyes
then
U_HAVE_STRTOD_L=0
--- a/configure
+++ b/configure
-@@ -7053,8 +7053,8 @@
+@@ -7093,8 +7093,8 @@
if test x$ac_cv_func_strtod_l = xyes
then
include $(TOPDIR)/rules.mk
PKG_NAME:=libpng
-PKG_VERSION:=1.2.57
-PKG_RELEASE:=1
+PKG_VERSION:=1.6.29
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng
-PKG_MD5SUM:=307052e5e8af97b82b17b64fb1b3677a
+PKG_HASH:=4245b684e8fe829ebb76186327bb37ce5a639938b219882b53d64bd3cfc5f239
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,16}-config $(1)/usr/bin/
$(SED) \
's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
- $(1)/usr/bin/libpng{,12}-config
+ $(1)/usr/bin/libpng{,16}-config
$(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng12 $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf,libconf}.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng16 $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,la,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng16.{a,la,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng.{a,la,so} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,16}.pc $(1)/usr/lib/pkgconfig/
$(INSTALL_DIR) $(2)/bin
- for f in libpng{,12}-config; do \
+ for f in libpng{,16}-config; do \
$(LN) ../../usr/bin/$$$$f $(2)/bin/ ; \
done
endef
define Package/libpng/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng16.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng.so $(1)/usr/lib/
endef
$(eval $(call HostBuild))
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index a978473..302ac4d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,7 +70,7 @@ AC_PROG_MAKE_SET
+ dnl libtool/libtoolize; version 2.4.2 is the tested version. This or any
+ dnl compatible later version may be used
+ LT_INIT([win32-dll])
+-LT_PREREQ([2.4.2])
++LT_PREREQ([2.4])
+
+ # Some awks crash when confronted with pnglibconf.dfa, do a test run now
+ # to make sure this doesn't happen
include $(TOPDIR)/rules.mk
PKG_NAME:=libsndfile
-PKG_VERSION:=1.0.26
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.28
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.mega-nerd.com/libsndfile/files/
-PKG_MD5SUM:=ec810a0c60c08772a8a5552704b63393
+PKG_HASH:=1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+#
+# Copyright (C) 2017 Yegor Yefremov <yegorslists@googlemail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libsoc
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/jackmitch/libsoc.git
+PKG_SOURCE_DATE:=2016-12-22
+PKG_SOURCE_VERSION:=5b788d4d558a78c52e6cfe97325e4564b307a3a0
+
+PKG_MAINTAINER:=Yegor Yefremov <yegorslists@googlemail.com>
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=LICENCE
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libsoc
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libpthread
+ TITLE:=SoC Library
+ URL:=https://github.com/jackmitch/libsoc
+endef
+
+define Package/libsoc/description
+ libsoc: C library for interfacing with common SoC peripherals through
+ generic kernel interfaces
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+ --disable-cxx
+
+MAKE_FLAGS += \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_board.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_conffile.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_debug.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_gpio.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_i2c.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_pwm.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_spi.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsoc.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libsoc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libsoc))
CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
+CMAKE_OPTIONS+= -DWITH_OPENMP=0
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebsockets.so* $(1)/usr/lib/
endef
-Package/libwebsockets-cyassl/install = $(Package/libwesockets/install)
+Package/libwebsockets-cyassl/install = $(Package/libwebsockets/install)
Package/libwebsockets-openssl/install = $(Package/libwebsockets/install)
-Package/libwesockets-full/install = $(Package/libwebsockets/install)
+Package/libwebsockets-full/install = $(Package/libwebsockets/install)
$(eval $(call BuildPackage,libwebsockets-openssl))
$(eval $(call BuildPackage,libwebsockets-cyassl))
# ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
# AMD Geode LX and i486 do not have SSE
-CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale
+CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \
+ mips32 24kc 34kc 74kc octeon mips64
ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
CONFIGURE_VARS+= AS=
endef
CONFIGURE_ARGS += \
- --with-ssl=openssl
+ --with-ssl=openssl \
+ --with-idn=no
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index 8435d9a..148453c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -109,9 +109,22 @@ else
+ fi
+ AC_SUBST([TEST_DIRS])
+
+-PKG_CHECK_MODULES(LIBIDN, libidn, have_idn=yes, have_idn=no)
+-if test "x$have_idn" = "xyes"; then
+- AC_DEFINE(HAVE_IDN, 1, [Define if IDN support is included])
++dnl +--------------------------------------------------------+
++dnl | Checking for libidn support |-
++dnl +--------------------------------------------------------+
++AC_ARG_WITH(idn,
++ AS_HELP_STRING([--with-idn=@<:@auto|no@:>@],
++ [Whether to use libidn [[default=auto]]]),
++ ac_idn=$withval,
++ ac_idn=auto)
++
++if test "x$ac_idn" = "xauto"; then
++ PKG_CHECK_MODULES(LIBIDN, libidn, enable_idn=yes, enable_idn=no)
++ if test "x$enable_idn" = "xyes"; then
++ AC_DEFINE(HAVE_IDN, 1, [Define if IDN support is included])
++ fi
++else
++ enable_idn=no
+ fi
+
+ dnl Gtk doc
+@@ -323,7 +336,7 @@ echo "
+
+ prefix: ${prefix}
+ compiler: ${CC}
+- Have IDN support: ${have_idn}
++ Enable IDN support: ${enable_idn}
+ Enable SSL: ${enable_ssl}
+ Asynchronous DNS: ${enable_asyncns}
+ Linux TCP keepalives: ${use_keepalives}
PKG_NAME:=pcre
PKG_VERSION:=8.40
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
--- /dev/null
+#CVE-2017-7186 patch
+--- trunk/pcre_internal.h 2016/05/21 13:34:44 1649
++++ trunk/pcre_internal.h 2017/02/24 17:30:30 1688
+@@ -2772,6 +2772,9 @@
+ extern const pcre_uint16 PRIV(ucd_stage2)[];
+ extern const pcre_uint32 PRIV(ucp_gentype)[];
+ extern const pcre_uint32 PRIV(ucp_gbtable)[];
++#ifdef COMPILE_PCRE32
++extern const ucd_record PRIV(dummy_ucd_record)[];
++#endif
+ #ifdef SUPPORT_JIT
+ extern const int PRIV(ucp_typerange)[];
+ #endif
+@@ -2780,9 +2783,15 @@
+ /* UCD access macros */
+
+ #define UCD_BLOCK_SIZE 128
+-#define GET_UCD(ch) (PRIV(ucd_records) + \
++#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \
+ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
+ UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
++
++#ifdef COMPILE_PCRE32
++#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch))
++#else
++#define GET_UCD(ch) REAL_GET_UCD(ch)
++#endif
+
+ #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
+ #define UCD_SCRIPT(ch) GET_UCD(ch)->script
+--- trunk/pcre_ucd.c 2014/06/19 07:51:39 1490
++++ trunk/pcre_ucd.c 2017/02/24 17:30:30 1688
+@@ -38,6 +38,20 @@
+ const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0};
+ #else
+
++/* If the 32-bit library is run in non-32-bit mode, character values
++greater than 0x10ffff may be encountered. For these we set up a
++special record. */
++
++#ifdef COMPILE_PCRE32
++const ucd_record PRIV(dummy_ucd_record)[] = {{
++ ucp_Common, /* script */
++ ucp_Cn, /* type unassigned */
++ ucp_gbOther, /* grapheme break property */
++ 0, /* case set */
++ 0, /* other case */
++ }};
++#endif
++
+ /* When recompiling tables with a new Unicode version, please check the
+ types in this structure definition from pcre_internal.h (the actual
+ field names will be different):
--- /dev/null
+Index: pthsem-2.0.8/acinclude.m4
+===================================================================
+--- pthsem-2.0.8.orig/acinclude.m4
++++ pthsem-2.0.8/acinclude.m4
+@@ -894,6 +894,8 @@ changequote(, )dnl
+ x2.[23456789]* ) ;;
+ changequote(, )dnl
+ x3.* ) ;;
++changequote(, )dnl
++ x4.* ) ;;
+ changequote([, ])
+ * ) braindead=yes ;;
+ esac
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot
-PKG_VERSION:=2.2.28
+PKG_VERSION:=2.2.29.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
-PKG_HASH:=e0288f59e326ab87cb3881fdabadafe542f4dc7ab9996db13863a439ebbc1f25
+PKG_HASH:=ccfa9ffb7eb91e9e87c21c108324b911250c9ffa838bffb64b1caafadcb0f388
PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=acme
-PKG_SOURCE_VERSION:=6d84da588b98733dd9c4f5b88440281ab1eb4989
-PKG_VERSION:=1.4
+PKG_SOURCE_VERSION:=7b40cbe8c1a52041351524bcde4b37665a7cdf79
+PKG_VERSION:=1.5
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3
define Package/acme
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+curl +ca-certificates +openssl-util +netcat
+ DEPENDS:=+curl +ca-bundle +openssl-util +netcat
TITLE:=ACME (Letsencrypt) client
PKGARCH:=all
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
CHECK_CRON=$1
ACME=/usr/lib/acme/acme.sh
-export SSL_CERT_DIR=/etc/ssl/certs
+export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
export NO_TIMESTAMP=1
UHTTPD_LISTEN_HTTP=
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=2.4.0
+PKG_VERSION:=2.6.0
PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* => daily updates, approx. 15 entries
* [ransomware tracker](https://ransomwaretracker.abuse.ch)
* => daily updates, approx. 150 entries
- * [rolist/easylist](https://easylist-downloads.adblockplus.org/rolist+easylist.txt)
- * => weekly updates, approx. 600 entries
- * [ruadlist/easylist](https://code.google.com/p/ruadlist)
- * => weekly updates, approx. 2.000 entries
+ * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
+ * => regional blocklist for China, daily updates, approx. 1.600 entries
+ * [reg_pl](http://adblocklist.org)
+ * => regional blocklist for Poland, daily updates, approx. 50 entries
+ * [reg_ro](https://easylist-downloads.adblockplus.org/rolist+easylist.txt)
+ * => regional blocklist for Romania, weekly updates, approx. 600 entries
+ * [reg_ru](https://code.google.com/p/ruadlist)
+ * => regional blocklist for Russia, weekly updates, approx. 2.000 entries
* [securemecca](http://www.securemecca.com)
* => infrequent updates, approx. 25.000 entries
* [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
* additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist
* quality checks during block list update to ensure a reliable dns backend service
* minimal status & error logging to syslog, enable debug logging to receive more output
-* procd based init system support (start/stop/restart/reload/suspend/resume)
-* procd based hotplug support, the adblock start will be triggered by interface triggers
+* procd based init system support (start/stop/restart/reload/suspend/resume/query/status)
+* procd based hotplug support, the adblock start will be solely triggered by network interface triggers
* suspend & resume adblock actions temporarily without block list reloading
-* runtime statistics via ubus service call
+* runtime information available via LuCI & via 'status' init command
* query function to quickly identify blocked (sub-)domains, e.g. for whitelisting
* optional: automatic block list backup & restore, backups will be (de-)compressed and restored on the fly in case of any runtime error
* optional: add new adblock sources on your own via uci config
## Prerequisites
-* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer) and with current trunk (Designated Driver)
-* [LEDE project](https://www.lede-project.org), tested with trunk > r98
+* [LEDE project](https://www.lede-project.org), tested with latest stable release (LEDE 17.01) and with current LEDE snapshot
* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported
-* a download utility: full versions (with ssl support) of 'wget', 'uclient-fetch', 'aria2c' or 'curl' are supported - the Chaos Calmer built-in busybox wget is not
- * Chaos Calmer: download & install the external 'wget' package
- * Designated Driver/Trunk: use built-in 'uclient-fetch' or download & install the external 'wget' package
+* a download utility:
+ * to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
+ * for limited devices with real memory constraints, adblock provides also a plain http option and supports wget-nossl and uclient-fetch (wihout libustream-ssl), too
* for more configuration options see examples below
-## OpenWrt / LEDE trunk Installation & Usage
-* install 'adblock' (_opkg install adblock_) and that's it - the adblock start will be automatically triggered by procd interface triggers
-* start/stop/restart/reload/suspend/resume the adblock service manually with _/etc/init.d/adblock_
+## LEDE trunk Installation & Usage
+* install 'adblock' (_opkg install adblock_) and that's it - the adblock start will be automatically triggered by procd interface trigger
+* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend
* enable/disable your favored block list sources in _/etc/config/adblock_ - 'adaway', 'disconnect' and 'yoyo' are enabled by default
## LuCI adblock companion package
-* for easy management of the various block list sources and options you can also use a nice & efficient LuCI frontend
+* for easy management of the various block list sources and all other adblock options you can also use a nice & efficient LuCI frontend
* install 'luci-app-adblock' (_opkg install luci-app-adblock_)
* the application is located in LuCI under 'Services' menu
-* _Thanks to Hannu Nyman for this great adblock LuCI frontend!_
-
-## Chaos Calmer installation notes
-* 'adblock' and 'luci-app-adblock' are _not_ available as .ipk packages in the Chaos Calmer download repository
-* download both packages from a development snapshot package directory:
- * for 'adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/)
- * for 'luci-app-adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci/)
-* manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_)
-* install the packages with _opkg install <...>_ as described above
## Tweaks
-* **status/runtime statistics:** the adblock status and runtime statistics are available via ubus service call (see example below)
+* **runtime information:** the adblock status is available via _/etc/init.d/adblock status_ (see example below)
* **debug logging:** for script debugging please set the config option 'adb\_debug' to '1' and check the runtime output with _logread -e "adblock"_
* **storage expansion:** to process and store all block list sources at once it might helpful to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
-* **add white-/blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below)
+* **add white- / blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below)
* **backup & restore block lists:** enable this feature, to restore automatically the latest compressed backup of your block lists in case of any processing error (e.g. a single block list source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this
* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
-* **restrict/disable procd interface trigger:** to restrict the procd interface trigger to a (list of) certain wan interface(s) or to disable it at all, set 'adb\_iface' to an existing interface like 'wan' or to a non-existing like 'false'
+* **restrict procd interface trigger:** restrict the procd interface trigger to a (list of) certain interface(s) (default: wan). To disable it at all, remove all entries
* **suspend & resume adblocking:** to quickly switch the adblock service 'on' or 'off', simply use _/etc/init.d/adblock [suspend|resume]_
* **domain query:** to query the active block lists for a specific domain, please run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
* **divert dns requests:** to force dns requests to your local dns resolver add an appropriate firewall rule (see example below)
* usually the pre-configured adblock setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' config section:
* adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled)
* adb\_debug => enable/disable adblock debug output (default: '0', disabled)
- * adb\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled)
+ * adb\_iface => set the procd interface trigger to a (list of) lan / wan interface(s) (default: 'wan')
* adb\_fetch => full path to a different download utility, see example below (default: not set, use wget)
* adb\_fetchparm => options for the download utility, see example below (default: not set, use wget options)
- * adb\_tldcomp => enable/disable tld compression (default: '1', enabled)
+ * adb\_triggerdelay => additional trigger delay in seconds before adblock processing starts (default: '1')
## Examples
-
**change default dns backend to 'unbound':**
<pre><code>
Adblock detects the presence of an active unbound dns backend and the block lists will be automatically pulled in by unbound.
option adb_fetchparm '-s --connect-timeout 10 --insecure -o'
</code></pre>
-**receive adblock statistics via ubus:**
+**receive adblock runtime information:**
<pre><code>
-ubus call service list '{"name":"adblock_stats"}'
-This will output the active block lists and other runtime information as JSON, e.g.:
-{
- "adblock_stats": {
- "instances": {
- "statistics": {
- "running": false,
- "command": [
- ""
- ],
- "data": {
- "active_lists": [
- {
- "palevo": "14",
- "blacklist": "144",
- "winspy": "168",
- "zeus": "422",
- "adaway": "408",
- "rolist": "649",
- "malwarelist": "1219",
- "ransomware": "1495",
- "ruadlist": "1791",
- "yoyo": "2304",
- "openphish": "2139",
- "dshield": "154",
- "disconnect": "3176",
- "spam404": "6251",
- "adguard": "11081",
- "whocares": "11575",
- "winhelp": "10574",
- "malware": "13854",
- "sysctl": "8539",
- "securemecca": "9262",
- "shalla": "25358",
- "hphosts": "36256"
- }
- ],
- "adblock_version": "2.3.0",
- "blocked_domains": "146833",
- "dns_backend": "dnsmasq",
- "last_rundate": "04.02.2017 21:10:31",
- "system": "LEDE Reboot SNAPSHOT r3286-c980147527"
- }
- }
- }
- }
-}
+root@blackhole:~# /etc/init.d/adblock status
+::: adblock runtime information
+ status : active
+ adblock_version : 2.6.0
+ blocked_domains : 113711
+ fetch_info : wget (built-in)
+ dns_backend : dnsmasq
+ last_rundate : 12.04.2017 13:08:26
+ system : LEDE Reboot SNAPSHOT r3900-399d5cf532
</code></pre>
**cronjob for a regular block list update (/etc/crontabs/root):**
</code></pre>
## Support
-Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail <dev@brenken.org>
+Please join the adblock discussion in this [forum thread](https://forum.lede-project.org/t/adblock-2-x-support-thread/507) or contact me by mail <dev@brenken.org>
## Removal
* stop all adblock related services with _/etc/init.d/adblock stop_
config adblock 'global'
option adb_enabled '1'
option adb_debug '0'
+ option adb_iface 'wan'
+ option adb_triggerdelay '2'
option adb_whitelist '/etc/adblock/adblock.whitelist'
option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}'
option adb_backup '0'
option adb_backupdir '/mnt'
+ option adb_rtfile '/tmp/adb_runtime.json'
config source 'adaway'
option enabled '1'
config source 'dshield'
option enabled '0'
- option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt'
+ option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt'
option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, daily updates, approx. 4.500 entries'
option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}'
option adb_src_desc 'focus on ransomware, numerous updates on the same day, approx. 130 entries'
-config source 'rolist'
+config source 'reg_cn'
+ option enabled '0'
+ option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt'
+ option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}'
+ option adb_src_desc 'focus on chinese ads, daily updates, approx. 1.600 entries'
+
+config source 'reg_pl'
+ option enabled '0'
+ option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt'
+ option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}'
+ option adb_src_desc 'focus on polish ads, daily updates, approx. 50 entries'
+
+config source 'reg_ro'
option enabled '0'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 600 entries'
-config source 'ruadlist'
+config source 'reg_ru'
option enabled '0'
option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt'
option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}'
#!/bin/sh /etc/rc.common
#
-START=90
+START=50
USE_PROCD=1
-EXTRA_COMMANDS="suspend resume query"
+EXTRA_COMMANDS="suspend resume query status"
EXTRA_HELP=" suspend Suspend adblock processing
resume Resume adblock processing
- query <DOMAIN> Query active blocklists for specific domain"
+ query <DOMAIN> Query active blocklists for specific domains
+ status Print runtime information"
+adb_init="/etc/init.d/adblock"
adb_script="/usr/bin/adblock.sh"
boot()
{
- local wanif4 wanif6 cnt=0 max_cnt=30
-
- . "/lib/functions/network.sh"
- while [ ${cnt} -le ${max_cnt} ]
- do
- network_find_wan wanif4
- network_find_wan6 wanif6
- if [ -n "${wanif4}" ] || [ -n "${wanif6}" ] || [ ${cnt} -eq ${max_cnt} ]
- then
- rc_procd start_service
- return 0
- else
- sleep 1
- cnt=$((cnt+1))
- network_flush_cache
- fi
- done
+ adb_boot=1
+ ubus -t 30 wait_for network.interface 2>/dev/null
+ rc_procd start_service
}
start_service()
{
- if [ $(/etc/init.d/adblock enabled; printf ${?}) -eq 0 ]
+ if [ $("${adb_init}" enabled; printf ${?}) -eq 0 ]
then
+ if [ -n "${adb_boot}" ]
+ then
+ return 0
+ fi
procd_open_instance "adblock"
procd_set_param command "${adb_script}" "${@}"
procd_set_param stdout 1
fi
}
-reload_service()
-{
- rc_procd start_service reload
-}
-
stop_service()
{
rc_procd "${adb_script}" stop
+ rc_procd start_service
}
restart()
suspend()
{
- rc_procd start_service suspend
+ rc_procd "${adb_script}" suspend
}
resume()
{
- rc_procd start_service resume
+ rc_procd "${adb_script}" resume
}
query()
rc_procd "${adb_script}" query "${1}"
}
+status()
+{
+ rc_procd "${adb_script}" status
+}
+
service_triggers()
{
local iface="$(uci -q get adblock.global.adb_iface)"
+ local delay="$(uci -q get adblock.global.adb_triggerdelay)"
- if [ -z "${iface}" ]
- then
- procd_add_raw_trigger "interface.*.up" 1000 /etc/init.d/adblock start
- else
- for name in ${iface}
- do
- procd_add_interface_trigger "interface.*.up" "${name}" /etc/init.d/adblock start
- done
- fi
- procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
+ PROCD_RELOAD_DELAY=$((${delay:=2} * 1000))
+ for name in ${iface}
+ do
+ procd_add_interface_trigger "interface.*.up" "${name}" "${adb_init}" start
+ done
+ PROCD_RELOAD_DELAY=1000
+ procd_add_config_trigger "config.change" "adblock" "${adb_init}" start
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="2.4.0-2"
+adb_ver="2.6.0-2"
+adb_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
adb_enabled=1
adb_debug=0
adb_backup=0
-adb_tldcomp=1
adb_backupdir="/mnt"
adb_whitelist="/etc/adblock/adblock.whitelist"
adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}"
adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"
adb_dnslist="dnsmasq unbound"
adb_dnsprefix="adb_list"
+adb_rtfile="/tmp/adb_runtime.json"
# f_envload: load adblock environment
#
# source in system library
#
- if [ -r "/lib/functions.sh" ]
+ if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
then
. "/lib/functions.sh"
+ . "/usr/share/libubox/jshn.sh"
else
- f_log "error" "system library not found"
+ f_log "error" "system libraries not found"
fi
# set dns backend environment
#
- while [ ${cnt} -le 10 ]
+ while [ ${cnt} -le 20 ]
do
for dns in ${adb_dnslist}
do
#
f_envcheck()
{
+ local ssl_lib
+
# check 'enabled' option
#
if [ ${adb_enabled} -ne 1 ]
then
- if [ "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* >/dev/null 2>&1)" ]
+ if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ]
then
f_rmdns
f_dnsrestart
# check fetch utility
#
+ ssl_lib="-"
+ if [ -x "${adb_fetch}" ]
+ then
+ if [ "$(readlink -fn "${adb_fetch}")" = "/usr/bin/wget-nossl" ]
+ then
+ adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 -O"
+ elif [ "$(readlink -fn "/bin/wget")" = "/bin/busybox" ] || [ "$(readlink -fn "${adb_fetch}")" = "/bin/busybox" ]
+ then
+ adb_fetch="/bin/busybox"
+ adb_fetchparm="-q -O"
+ else
+ ssl_lib="built-in"
+ fi
+ fi
if [ ! -x "${adb_fetch}" ] && [ "$(readlink -fn "/bin/wget")" = "/bin/uclient-fetch" ]
then
adb_fetch="/bin/uclient-fetch"
- adb_fetchparm="-q --timeout=10 --no-check-certificate -O"
+ if [ -f "/lib/libustream-ssl.so" ]
+ then
+ adb_fetchparm="-q --timeout=10 --no-check-certificate -O"
+ ssl_lib="libustream-ssl"
+ else
+ adb_fetchparm="-q --timeout=10 -O"
+ fi
fi
- if [ -z "${adb_fetch}" ] || [ -z "${adb_fetchparm}" ] || [ ! -x "${adb_fetch}" ] || [ "$(readlink -fn "${adb_fetch}")" = "/bin/busybox" ]
+ if [ ! -x "${adb_fetch}" ] || [ -z "${adb_fetch}" ] || [ -z "${adb_fetchparm}" ]
then
- f_log "error" "required download utility with ssl support not found, e.g. install full 'wget' package"
+ f_log "error" "no download utility found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
fi
+ adb_fetchinfo="${adb_fetch##*/} (${ssl_lib})"
# create dns hideout directory
#
rm -f "${adb_dnsdir}/${adb_dnsprefix}"*
rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
rm -rf "${adb_dnshidedir}"
+ > "${adb_rtfile}"
fi
- ubus call service delete "{\"name\":\"adblock_stats\",\"instances\":\"statistics\"}" 2>/dev/null
}
# f_dnsrestart: restart the dns backend
adb_dnsup="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@.${adb_dns}.instances.*.running")"
if [ "${adb_dnsup}" = "true" ]
then
- return 0
+ break
fi
cnt=$((cnt+1))
sleep 1
if [ -z "${dns_active}" ]
then
- printf "%s\n" "::: no active block lists found, please start adblock first"
+ printf "%s\n" "::: no active block lists found, please start / resume adblock first"
elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
then
printf "%s\n" "::: invalid domain input, please submit a specific (sub-)domain, e.g. 'www.abc.xyz'"
search="${domain//./\.}"
result="$(grep -Hm1 "[/\"\.]${search}[/\"]" "${adb_dnsprefix}"* | awk -F ':|=|/|\"' '{printf(" %-20s : %s\n",$1,$4)}')"
printf "%s\n" "::: distinct results for domain '${domain}'"
- if [ -z "${result}" ]
- then
- printf "%s\n" " no match"
- else
- printf "%s\n" "${result}"
- fi
+ printf "%s\n" "${result:=" no match"}"
domain="${tld}"
tld="${domain#*.}"
done
fi
}
+# f_status: output runtime information
+#
+f_status()
+{
+ local key keylist value
+
+ if [ -s "${adb_rtfile}" ]
+ then
+ local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
+ local dns_passive="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
+
+ if [ -n "${dns_active}" ]
+ then
+ value="active"
+ elif [ -n "${dns_passive}" ] || [ -z "${dns_active}" ]
+ then
+ value="no domains blocked"
+ fi
+ printf "%s\n" "::: adblock runtime information"
+ printf " %-15s : %s\n" "status" "${value}"
+ json_load "$(cat "${adb_rtfile}" 2>/dev/null)"
+ json_select data
+ json_get_keys keylist
+ for key in ${keylist}
+ do
+ json_get_var value ${key}
+ printf " %-15s : %s\n" "${key}" "${value}"
+ done
+ fi
+}
+
# f_log: write to syslog, exit on error
#
f_log()
logger -t "adblock-[${adb_ver}] ${class}" "${log_msg}"
if [ "${class}" = "error" ]
then
- logger -t "adblock-[${adb_ver}] ${class}" "Please check the online documentation 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
+ logger -t "adblock-[${adb_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md' (${adb_sysver})"
f_rmtemp
- if [ "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* >/dev/null 2>&1)" ]
+ if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ]
then
f_rmdns
f_dnsrestart
f_main()
{
local enabled url cnt sum_cnt=0 mem_total=0
- local src_name src_rset shalla_archive list active_lists
- local sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
+ local src_name src_rset shalla_archive
mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo" 2>/dev/null)"
f_log "info " "start adblock processing ..."
+ > "${adb_rtfile}"
for src_name in ${adb_sources}
do
eval "enabled=\"\${enabled_${src_name}}\""
# download block list
#
- f_log "debug" "name: ${src_name}, enabled: ${enabled}, backup: ${adb_backup}, dns: ${adb_dns}, fetch: ${adb_fetch}, memory: ${mem_total}"
+ f_log "debug" "name: ${src_name}, enabled: ${enabled}, backup: ${adb_backup}, dns: ${adb_dns}, fetch: ${adb_fetchinfo}, memory: ${mem_total}"
if [ "${src_name}" = "blacklist" ]
then
cat "${url}" 2>/dev/null > "${adb_tmpload}"
#
if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
then
- awk "${src_rset}" "${adb_tmpload}" > "${adb_tmpfile}"
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
if [ -s "${adb_tmpfile}" ]
then
- if [ ${adb_tldcomp} -eq 1 ]
- then
- awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" | sort -u > "${adb_tmpload}"
- awk '{if(NR==1){tld=$NF};while(getline){if($NF !~ tld"\\."){print tld;tld=$NF}}print tld}' "${adb_tmpload}" > "${adb_tmpfile}"
- awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" > "${adb_tmpload}"
- else
- sort -u "${adb_tmpfile}" > "${adb_tmpload}"
- fi
+ awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null | sort -u > "${adb_tmpload}"
+ awk '{if(NR==1){tld=$NF};while(getline){if($NF !~ tld"\\."){print tld;tld=$NF}}print tld}' "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null > "${adb_tmpload}"
mv -f "${adb_tmpload}" "${adb_tmpfile}"
f_list backup
else
then
if [ -s "${adb_tmpdir}/tmp.whitelist" ]
then
- grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" | eval "${adb_dnsformat}" > "${adb_dnsfile}"
+ grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}"
else
- cat "${adb_tmpfile}" | eval "${adb_dnsformat}" > "${adb_dnsfile}"
+ cat "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}"
fi
adb_rc=${?}
if [ ${adb_rc} -ne 0 ]
fi
cnt="$(wc -l < "${src_name}")"
sum_cnt=$((sum_cnt + cnt))
- list="${src_name/*./}"
- if [ -z "${active_lists}" ]
- then
- active_lists="\"${list}\":\"${cnt}\""
- else
- active_lists="${active_lists},\"${list}\":\"${cnt}\""
- fi
done
- # restart the dns backend and write statistics to procd service instance
+ # restart the dns backend and export runtime information
#
mv -f "${adb_tmpdir}/${adb_dnsprefix}"* "${adb_dnsdir}" 2>/dev/null
chown "${adb_dns}":"${adb_dns}" "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null
f_dnsrestart
if [ "${adb_dnsup}" = "true" ]
then
- f_log "info " "block lists with overall ${sum_cnt} domains loaded successfully (${sysver})"
- ubus call service set "{\"name\":\"adblock_stats\",
- \"instances\":{\"statistics\":{\"command\":[\"\"],
- \"data\":{\"active_lists\":[{${active_lists}}],
- \"adblock_version\":\"${adb_ver}\",
- \"blocked_domains\":\"${sum_cnt}\",
- \"dns_backend\":\"${adb_dns}\",
- \"last_rundate\":\"$(/bin/date "+%d.%m.%Y %H:%M:%S")\",
- \"system\":\"${sysver}\"}}}}"
- return 0
+ json_init
+ json_add_object "data"
+ json_add_string "adblock_version" "${adb_ver}"
+ json_add_string "blocked_domains" "${sum_cnt}"
+ json_add_string "fetch_info" "${adb_fetchinfo}"
+ json_add_string "dns_backend" "${adb_dns}"
+ json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ json_add_string "system" "${adb_sysver}"
+ json_close_object
+ json_dump > "${adb_rtfile}"
+ f_log "info " "block lists with overall ${sum_cnt} domains loaded successfully (${adb_sysver})"
+ else
+ f_log "error" "dns backend restart with active block lists failed"
fi
- f_log "error" "dns backend restart with active block lists failed (${sysver})"
}
# handle different adblock actions
query)
f_query "${2}"
;;
+ status)
+ f_status
+ ;;
*)
f_envcheck
f_main
PKG_NAME:=bcp38
PKG_VERSION:=5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENCE:=GPL-3.0+
include $(INCLUDE_DIR)/package.mk
iptables -N "$IPTABLES_CHAIN" 2>/dev/null
iptables -F "$IPTABLES_CHAIN" 2>/dev/null
- iptables -I output_rule -m state --state NEW -j "$IPTABLES_CHAIN"
- iptables -I input_rule -m state --state NEW -j "$IPTABLES_CHAIN"
- iptables -I forwarding_rule -m state --state NEW -j "$IPTABLES_CHAIN"
+ iptables -I output_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN"
+ iptables -I input_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN"
+ iptables -I forwarding_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN"
# always accept DHCP traffic
iptables -A "$IPTABLES_CHAIN" -p udp --dport 67:68 --sport 67:68 -j RETURN
destroy_iptables()
{
- iptables -D output_rule -m state --state NEW -j "$IPTABLES_CHAIN" 2>/dev/null
- iptables -D input_rule -m state --state NEW -j "$IPTABLES_CHAIN" 2>/dev/null
- iptables -D forwarding_rule -m state --state NEW -j "$IPTABLES_CHAIN" 2>/dev/null
+ iptables -D output_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN" 2>/dev/null
+ iptables -D input_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN" 2>/dev/null
+ iptables -D forwarding_rule -m conntrack --ctstate NEW -j "$IPTABLES_CHAIN" 2>/dev/null
iptables -F "$IPTABLES_CHAIN" 2>/dev/null
iptables -X "$IPTABLES_CHAIN" 2>/dev/null
}
--- /dev/null
+Index: dansguardian-2.12.0.3/src/OptionContainer.cpp
+===================================================================
+--- dansguardian-2.12.0.3.orig/src/OptionContainer.cpp
++++ dansguardian-2.12.0.3/src/OptionContainer.cpp
+@@ -17,6 +17,7 @@
+ #include <sstream>
+ #include <syslog.h>
+ #include <dirent.h>
++#include <cstdlib>
+
+ #include <unistd.h> // checkme: remove?
+
define Package/darkstat
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libpcap +zlib
+ DEPENDS:=+libpcap +zlib +USE_GLIBC:libbsd
TITLE:=Network bandwidth monitor
URL:=http://unix4lyfe.org/darkstat/
endef
--- /dev/null
+menu "Configuration"
+ depends on PACKAGE_dnscrypt-proxy
+
+config DNSCRYPT_ENABLE_PLUGINS
+ bool "Enable plugin support (includes libldns and plugins, increases size by 125kB)"
+ default n
+
+endmenu
PKG_NAME:=dnscrypt-proxy
PKG_VERSION:=1.9.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy
PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
PKG_LICENSE:=ISC
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_DNSCRYPT_ENABLE_PLUGINS
include $(INCLUDE_DIR)/package.mk
define Package/dnscrypt-proxy
$(call Package/dnscrypt-proxy/Default)
- DEPENDS:=+libsodium +dnscrypt-proxy-resolvers
+ DEPENDS:=+libsodium +dnscrypt-proxy-resolvers +DNSCRYPT_ENABLE_PLUGINS:libltdl \
+ +DNSCRYPT_ENABLE_PLUGINS:libldns
TITLE:=A tool for securing communications between a client and a DNS resolver
endef
to IPv4 or IPv6 addresses.
endef
+define Package/dnscrypt-proxy/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Build/Configure
$(call Build/Configure/Default, \
--prefix=/usr \
--disable-ssp \
- --disable-plugins \
+ $(if $(CONFIG_DNSCRYPT_ENABLE_PLUGINS),,--disable-plugins) \
)
endef
$(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/dnscrypt-proxy.config $(1)/etc/config/dnscrypt-proxy
+ $(if $(CONFIG_DNSCRYPT_ENABLE_PLUGINS), \
+ $(INSTALL_DIR) $(1)/usr/lib/dnscrypt-proxy; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_cache.so $(1)/usr/lib/dnscrypt-proxy/; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_aaaa_blocking.so $(1)/usr/lib/dnscrypt-proxy/; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.so $(1)/usr/lib/dnscrypt-proxy/; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_logging.so $(1)/usr/lib/dnscrypt-proxy/)
endef
define Package/dnscrypt-proxy-resolvers/install
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.12.1
+PKG_VERSION:=2.12.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=db11674364b764e101966d829a2e271c9b9d2a8bd4d8ecb4221a1dcdc9a3ada2
+PKG_HASH:=d21a9e23506e618d561fb25a8a7bd6134f927b86147930103487117a7a678c4a
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- a/Makefile
+++ b/Makefile
-@@ -1125,7 +1125,7 @@ else
+@@ -1123,7 +1123,7 @@ else
endif
curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.7.3
-PKG_RELEASE:=07
+PKG_VERSION:=1.7.5
+PKG_RELEASE:=01
PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.7/src/
-PKG_MD5SUM:=e529c240c08e4004c6e9dcf3fd6b3ab
+PKG_SOURCE_URL:=http://www.haproxy.org/download/1.7/src/
+PKG_MD5SUM:=ed84c80cb97852d2aa3161ed16c48a1c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
$(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR)/lua \
INSTALL_TOP="$(STAGING_DIR)/lua-5.3.3/" \
CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lreadline" \
LD="$(TARGET_LD)" \
linux install
$(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
CC="$(TARGET_CC)" \
- PCREDIR="$(STAGING_DIR)/usr/include" \
+ PCREDIR="$(STAGING_DIR)/usr/" \
SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \
USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_REGPARM=1 \
USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1\
+++ /dev/null
-From 91715c09a4595af6451ad97c43bf41fec107c69e Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Fri, 10 Mar 2017 11:49:21 +0100
-Subject: [PATCH 1/7] MINOR: config: warn when some HTTP rules are used in a
- TCP proxy
-
-Surprizingly, http-request, http-response, block, redirect, and capture
-rules did not cause a warning to be emitted when used in a TCP proxy, so
-let's fix this.
-
-This patch may be backported to older versions as it helps spotting
-configuration issues.
-(cherry picked from commit de7dc88c517e22d3ae02ce8a8a23046ab2c62238)
----
- src/cfgparse.c | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index fc6e149..d8d2fda 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -8681,6 +8681,36 @@ out_uri_auth_compat:
- curproxy->uri_auth = NULL;
- }
-
-+ if (curproxy->capture_name) {
-+ Warning("config : 'capture' statement ignored for %s '%s' as it requires HTTP mode.\n",
-+ proxy_type_str(curproxy), curproxy->id);
-+ err_code |= ERR_WARN;
-+ }
-+
-+ if (!LIST_ISEMPTY(&curproxy->http_req_rules)) {
-+ Warning("config : 'http-request' rules ignored for %s '%s' as they require HTTP mode.\n",
-+ proxy_type_str(curproxy), curproxy->id);
-+ err_code |= ERR_WARN;
-+ }
-+
-+ if (!LIST_ISEMPTY(&curproxy->http_res_rules)) {
-+ Warning("config : 'http-response' rules ignored for %s '%s' as they require HTTP mode.\n",
-+ proxy_type_str(curproxy), curproxy->id);
-+ err_code |= ERR_WARN;
-+ }
-+
-+ if (!LIST_ISEMPTY(&curproxy->block_rules)) {
-+ Warning("config : 'block' rules ignored for %s '%s' as they require HTTP mode.\n",
-+ proxy_type_str(curproxy), curproxy->id);
-+ err_code |= ERR_WARN;
-+ }
-+
-+ if (!LIST_ISEMPTY(&curproxy->redirect_rules)) {
-+ Warning("config : 'redirect' rules ignored for %s '%s' as they require HTTP mode.\n",
-+ proxy_type_str(curproxy), curproxy->id);
-+ err_code |= ERR_WARN;
-+ }
-+
- if (curproxy->options & (PR_O_FWDFOR | PR_O_FF_ALWAYS)) {
- Warning("config : 'option %s' ignored for %s '%s' as it requires HTTP mode.\n",
- "forwardfor", proxy_type_str(curproxy), curproxy->id);
---
-2.10.2
-
+++ /dev/null
-From 8253b517585a664be53718f1522e24291f553d95 Mon Sep 17 00:00:00 2001
-From: Christopher Faulet <cfaulet@haproxy.com>
-Date: Thu, 23 Feb 2017 10:17:15 +0100
-Subject: [PATCH 2/7] BUG/MINOR: spoe: Fix soft stop handler using a specific
- id for spoe filters
-
-During a soft stop, we need to wakeup all SPOE applets to stop them. So we loop
-on all proxies, and for each proxy, on all filters. But we must be sure to only
-handle SPOE filters here. To do so, we use a specific id.
-(cherry picked from commit 3b386a318f699def6f37b4d3199cd1d72c481a0f)
----
- src/flt_spoe.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/flt_spoe.c b/src/flt_spoe.c
-index aa6414a..2a96c65 100644
---- a/src/flt_spoe.c
-+++ b/src/flt_spoe.c
-@@ -235,6 +235,9 @@ struct spoe_context {
- unsigned int process_exp; /* expiration date to process an event */
- };
-
-+/* SPOE filter id. Used to identify SPOE filters */
-+const char *spoe_filter_id = "SPOE filter";
-+
- /* Set if the handle on SIGUSR1 is registered */
- static int sighandler_registered = 0;
-
-@@ -2286,10 +2289,16 @@ sig_stop_spoe(struct sig_handler *sh)
- struct flt_conf *fconf;
-
- list_for_each_entry(fconf, &p->filter_configs, list) {
-- struct spoe_config *conf = fconf->conf;
-- struct spoe_agent *agent = conf->agent;
-+ struct spoe_config *conf;
-+ struct spoe_agent *agent;
- struct appctx *appctx;
-
-+ if (fconf->id != spoe_filter_id)
-+ continue;
-+
-+ conf = fconf->conf;
-+ agent = conf->agent;
-+
- list_for_each_entry(appctx, &agent->cache, ctx.spoe.list) {
- si_applet_want_get(appctx->owner);
- si_applet_want_put(appctx->owner);
-@@ -3178,6 +3187,7 @@ parse_spoe_flt(char **args, int *cur_arg, struct proxy *px,
- }
-
- *cur_arg = pos;
-+ fconf->id = spoe_filter_id;
- fconf->ops = &spoe_ops;
- fconf->conf = conf;
- return 0;
---
-2.10.2
-
+++ /dev/null
-From a208d4dd73794b67a59dae7e3077378473650d6c Mon Sep 17 00:00:00 2001
-From: Christopher Faulet <cfaulet@haproxy.com>
-Date: Thu, 23 Feb 2017 22:41:09 +0100
-Subject: [PATCH 3/7] BUG/MINOR: spoe: Fix parsing of arguments in spoe-message
- section
-
-The array of pointers passed to sample_parse_expr was not really an array but a
-pointer to pointer. So it can easily lead to a segfault during the configuration
-parsing.
-(cherry picked from commit b0b42388259224be54bf504fa559803b39d6453c)
----
- src/flt_spoe.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/flt_spoe.c b/src/flt_spoe.c
-index 2a96c65..57fb1da 100644
---- a/src/flt_spoe.c
-+++ b/src/flt_spoe.c
-@@ -2966,8 +2966,9 @@ cfg_parse_spoe_message(const char *file, int linenum, char **args, int kwm)
- arg->name_len = delim - args[cur_arg];
- delim++;
- }
--
-- arg->expr = sample_parse_expr(&delim, &idx, file, linenum, &errmsg, &curproxy->conf.args);
-+ arg->expr = sample_parse_expr((char*[]){delim, NULL},
-+ &idx, file, linenum, &errmsg,
-+ &curproxy->conf.args);
- if (arg->expr == NULL) {
- Alert("parsing [%s:%d] : '%s': %s.\n", file, linenum, args[0], errmsg);
- err_code |= ERR_ALERT | ERR_FATAL;
---
-2.10.2
-
+++ /dev/null
-From 821d3a9f513a63b06f1696352392996391807c16 Mon Sep 17 00:00:00 2001
-From: Janusz Dziemidowicz <rraptorr@nails.eu.org>
-Date: Wed, 8 Mar 2017 16:59:41 +0100
-Subject: [PATCH 4/7] BUG/MEDIUM: ssl: Clear OpenSSL error stack after trying
- to parse OCSP file
-
-Invalid OCSP file (for example empty one that can be used to enable
-OCSP response to be set dynamically later) causes errors that are
-placed on OpenSSL error stack. Those errors are not cleared so
-anything that checks this stack later will fail.
-
-Following configuration:
- bind :443 ssl crt crt1.pem crt crt2.pem
-
-With following files:
- crt1.pem
- crt1.pem.ocsp - empty one
- crt2.pem.rsa
- crt2.pem.ecdsa
-
-Will fail to load.
-
-This patch should be backported to 1.7.
-(cherry picked from commit 8d7104982e1c41f7dc4d75ae7f7d2bbb96052d40)
----
- src/ssl_sock.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index cc2dc12..daa584c 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -433,6 +433,8 @@ static int ssl_sock_load_ocsp_response(struct chunk *ocsp_response, struct certi
-
- ret = 0;
- out:
-+ ERR_clear_error();
-+
- if (bs)
- OCSP_BASICRESP_free(bs);
-
---
-2.10.2
-
+++ /dev/null
-From e9607769d56373cf29c4df040f605191603beb50 Mon Sep 17 00:00:00 2001
-From: Nenad Merdanovic <nmerdan@haproxy.com>
-Date: Sun, 12 Mar 2017 22:01:35 +0100
-Subject: [PATCH 5/7] BUG/MEDIUM: cli: Prevent double free in CLI ACL lookup
-
-The memory is released by cli_release_mlook, which also properly sets the
-pointer to NULL. This was introduced with a big code reorganization
-involving moving to the new keyword registration form in commit ad8be61c7.
-
-This fix needs to be backported to 1.7.
-
-Signed-off-by: Nenad Merdanovic <nmerdan@haproxy.com>
-(cherry picked from commit 24f45d8e34797ed9c16ac3fa6d89f3eed435e706)
----
- src/map.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/map.c b/src/map.c
-index b6fce4d..90deb08 100644
---- a/src/map.c
-+++ b/src/map.c
-@@ -524,7 +524,6 @@ static int cli_io_handler_map_lookup(struct appctx *appctx)
-
- default:
- appctx->st2 = STAT_ST_FIN;
-- free(appctx->ctx.map.chunk.str);
- return 1;
- }
- }
---
-2.10.2
-
+++ /dev/null
-From e1008f22fbb9c08080aad9f998a557170b96f3f9 Mon Sep 17 00:00:00 2001
-From: Nenad Merdanovic <nmerdan@haproxy.com>
-Date: Sun, 12 Mar 2017 22:01:36 +0100
-Subject: [PATCH 6/7] BUG/MINOR: Fix "get map <map> <value>" CLI command
-
-The said form of the CLI command didn't return anything since commit
-ad8be61c7.
-
-This fix needs to be backported to 1.7.
-
-Signed-off-by: Nenad Merdanovic <nmerdan@haproxy.com>
-(cherry picked from commit 96c15719434a4eb46e191fcf1dafcb051065a76e)
----
- src/map.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/map.c b/src/map.c
-index 90deb08..e8c6a2a 100644
---- a/src/map.c
-+++ b/src/map.c
-@@ -906,7 +906,7 @@ static struct cli_kw_list cli_kws = {{ },{
- { { "add", "map", NULL }, "add map : add map entry", cli_parse_add_map, NULL },
- { { "clear", "map", NULL }, "clear map <id> : clear the content of this map", cli_parse_clear_map, NULL },
- { { "del", "map", NULL }, "del map : delete map entry", cli_parse_del_map, NULL },
-- { { "get", "map", NULL }, "get map : report the keys and values matching a sample for a map", cli_parse_get_map, NULL },
-+ { { "get", "map", NULL }, "get map : report the keys and values matching a sample for a map", cli_parse_get_map, cli_io_handler_map_lookup, cli_release_mlook },
- { { "set", "map", NULL }, "set map : modify map entry", cli_parse_set_map, NULL },
- { { "show", "map", NULL }, "show map [id] : report available maps or dump a map's contents", cli_parse_show_map, NULL },
- { { NULL }, NULL, NULL, NULL }
---
-2.10.2
-
+++ /dev/null
-From afbf56b951967e8fa4d509e423fdcb11c27d40e2 Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Tue, 14 Mar 2017 20:19:29 +0100
-Subject: [PATCH 7/7] BUG/MAJOR: connection: update CO_FL_CONNECTED before
- calling the data layer
-
-Matthias Fechner reported a regression in 1.7.3 brought by the backport
-of commit 819efbf ("BUG/MEDIUM: tcp: don't poll for write when connect()
-succeeds"), causing some connections to fail to establish once in a while.
-While this commit itself was a fix for a bad sequencing of connection
-events, it in fact unveiled a much deeper bug going back to the connection
-rework era in v1.5-dev12 : 8f8c92f ("MAJOR: connection: add a new
-CO_FL_CONNECTED flag").
-
-It's worth noting that in a lab reproducing a similar environment as
-Matthias' about only 1 every 19000 connections exhibit this behaviour,
-making the issue not so easy to observe. A trick to make the problem
-more observable consists in disabling non-blocking mode on the socket
-before calling connect() and re-enabling it later, so that connect()
-always succeeds. Then it becomes 100% reproducible.
-
-The problem is that this CO_FL_CONNECTED flag is tested after deciding to
-call the data layer (typically the stream interface but might be a health
-check as well), and that the decision to call the data layer relies on a
-change of one of the flags covered by the CO_FL_CONN_STATE set, which is
-made of CO_FL_CONNECTED among others.
-
-Before the fix above, this bug couldn't appear with TCP but it could
-appear with Unix sockets. Indeed, connect() was always considered
-blocking so the CO_FL_WAIT_L4_CONN connection flag was always set, and
-polling for write events was always enabled. This used to guarantee that
-the conn_fd_handler() could detect a change among the CO_FL_CONN_STATE
-flags.
-
-Now with the fix above, if a connect() immediately succeeds for non-ssl
-connection with send-proxy enabled, and no data in the buffer (thus TCP
-mode only), the CO_FL_WAIT_L4_CONN flag is not set, the lack of data in
-the buffer doesn't enable polling flags for the data layer, the
-CO_FL_CONNECTED flag is not set due to send-proxy still being pending,
-and once send-proxy is done, its completion doesn't cause the data layer
-to be woken up due to the fact that CO_FL_CONNECT is still not present
-and that the CO_FL_SEND_PROXY flag is not watched in CO_FL_CONN_STATE.
-
-Then no progress is made when data are received from the client (and
-attempted to be forwarded), because a CF_WRITE_NULL (or CF_WRITE_PARTIAL)
-flag is needed for the stream-interface state to turn from SI_ST_CON to
-SI_ST_EST, allowing ->chk_snd() to be called when new data arrive. And
-the only way to set this flag is to call the data layer of course.
-
-After the connect timeout, the connection gets killed and if in the mean
-time some data have accumulated in the buffer, the retry will succeed.
-
-This patch fixes this situation by simply placing the update of
-CO_FL_CONNECTED where it should have been, before the check for a flag
-change needed to wake up the data layer and not after.
-
-This fix must be backported to 1.7, 1.6 and 1.5. Versions not having
-the patch above are still affected for unix sockets.
-
-Special thanks to Matthias Fechner who provided a very detailed bug
-report with a bisection designating the faulty patch, and to Olivier
-Houchard for providing full access to a pretty similar environment where
-the issue could first be reproduced.
-(cherry picked from commit 7bf3fa3c23f6a1b7ed1212783507ac50f7e27544)
----
- src/connection.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/connection.c b/src/connection.c
-index 26fc5f6..1e4c9aa 100644
---- a/src/connection.c
-+++ b/src/connection.c
-@@ -131,6 +131,13 @@ void conn_fd_handler(int fd)
- }
-
- leave:
-+ /* Verify if the connection just established. The CO_FL_CONNECTED flag
-+ * being included in CO_FL_CONN_STATE, its change will be noticed by
-+ * the next block and be used to wake up the data layer.
-+ */
-+ if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
-+ conn->flags |= CO_FL_CONNECTED;
-+
- /* The wake callback may be used to process a critical error and abort the
- * connection. If so, we don't want to go further as the connection will
- * have been released and the FD destroyed.
-@@ -140,10 +147,6 @@ void conn_fd_handler(int fd)
- conn->data->wake(conn) < 0)
- return;
-
-- /* Last check, verify if the connection just established */
-- if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
-- conn->flags |= CO_FL_CONNECTED;
--
- /* remove the events before leaving */
- fdtab[fd].ev &= FD_POLL_STICKY;
-
---
-2.10.2
-
# not found:
MAKE_FLAGS += \
LD="$(TARGET_CC)" \
- CFLAGS_DEBUG="$(TARGET_CFLAGS)" \
+ CFLAGS_DEBUG="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LINKOPTS=-lc \
LDCONFIG= \
ETCBASE="$(PKG_INSTALL_DIR)/etc" \
include $(TOPDIR)/rules.mk
PKG_NAME:=memcached
-PKG_VERSION:=1.4.34
+PKG_VERSION:=1.4.36
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://memcached.org/files
-PKG_MD5SUM:=040887d52dfcc88b2e8918b4bfd91bf5
+PKG_MD5SUM:=1e028fbab7288911fcaa5ed2a21817fe
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_NAME:=mini_snmpd
PKG_VERSION:=1.4-rc1
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Luke McKee <hojuruku@gmail.com>
+PKG_RELEASE:=3
+PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
local name="$1" netdev netdev_count
[ -z $netdev_count ] && netdev_count=0
# for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev
- netdev=$(ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"$name\"].l3_device")
+ network_get_device netdev "$name"
if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
[ $netdev_count -ge 4 ] && {
_err "$cfg: too many network interfaces configured, ignoring $name"
append interfaces_arg "$netdev"
fi
else
- _err "$cfg: physical interface for network $name not found in uci or kernel so not monitoring"
+ _log "$cfg: physical interface for network $name not found in uci or kernel so not monitoring"
fi
}
config_get_bool enabled "$cfg" "enabled" '1'
[ "$enabled" -gt 0 ] || return 0
config_get listen_interface "$cfg" listen_interface
- # listen_interface_up=$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.interface=\"$listen_interface\"].up")
# If the interface is up & instance is running we'll watch at the instance level and only restart that instance if it's bound interface changes
# Regardless of ubus knowing about an interface (in the case it's not yet configured)
[ -n "$listen_interface" ] && trigger_interfaces="${listen_interface} ${trigger_interfaces} "
+ # Restart daemon if one of monitored interfaces changes
+ config_get reload_interfaces "$cfg" interfaces
+
}
validate_mini_snmpd_section() {
procd_add_interface_trigger "interface.*" $n /etc/init.d/mini_snmpd start
done
}
+ [ -n "$reload_interfaces" ] && {
+ for n in $reload_interfaces; do
+ procd_add_reload_interface_trigger $n
+ done
+ }
procd_close_trigger
procd_add_validation validate_mini_snmpd_section
}
return 1
}
- local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up ubus_exit ubus_err
+ local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up
[ -n "$listen_interface" ] && {
- listen_interface_json=$(ubus -S call network.interface.$listen_interface status)
- ubus_exit=$?
- [ $ubus_exit = 4 ] && {
- _err "$cfg: listen_interface $listen_interface not properly configured in ubus network.interface.* not starting this instance "
- return 1
- }
- [ $ubus_exit = 255 -a -z "$listen_interface_json" ] && {
- _log "$cfg: ubusd not yet up, will try to start mini_snmpd shorlty when procd detects $listen_interface comes up"
- return 1
- }
- [ -z "$listen_interface_json" ] && {
- ubus_err=`ubus call network.interface.$listen_interface status 2>&1 >/dev/null`
- _err "$cfg: unknown ubus error. exit: $ubus_exit errormsg: $ubus_err "
- return 1
- }
- listen_interface_up=$(jsonfilter -s "$listen_interface_json" -e '@.up')
if [ "$ipv6" = 1 ]; then
- listen_interface_ip=$(jsonfilter -s "$listen_interface_json" -e "@['ipv6-address'][0].address")
+ network_get_ipaddrs6 listen_interface_ip "$listen_interface"
else
- listen_interface_ip=$(jsonfilter -s "$listen_interface_json" -e "@['ipv4-address'][0].address")
+ network_get_ipaddrs listen_interface_ip "$listen_interface"
fi
- [ -n "$listen_interface_ip" -a "$listen_interface_up" = 'true' ] || {
+ network_is_up "$listen_interface" && [ -n "$listen_interface_ip" ] || {
_log "$cfg:listen interface $listen_interface not up yet / not configured properly"
_log "$cfg:procd will try again when interface state changes"
return 1
}
- listen_interface_device=$(jsonfilter -s "$listen_interface_json" -e '@.l3_device')
+ network_get_physdev listen_interface_device "$listen_interface"
}
[ $validation_failed ] && {
# uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
# e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0
[ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a"
- [ -n "$disks_arg" ] && procd_append_param command "-d $disks_arg"
- [ -n "$interfaces_arg" ] && procd_append_param command "-i $interfaces_arg"
+ [ -n "$disks_arg" ] && procd_append_param command "-d" "$disks_arg"
+ [ -n "$interfaces_arg" ] && {
+ procd_append_param netdev ${interfaces_arg//,/ }
+ procd_append_param command "-i" "$interfaces_arg"
+ }
[ -n "$listen_interface_device" ] && {
procd_append_param command "-I" "$listen_interface_device"
# and this monitors the hardware device for changes outside of ubus - just a guess
- procd_set_param netdev $listen_interface_device
+ procd_append_param netdev $listen_interface_device
}
procd_close_instance
}
start_service() {
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
config_load 'mini_snmpd'
config_foreach start_instance 'mini_snmpd'
}
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.3
+PKG_VERSION:=2.5
PKG_RELEASE:=5
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
mwan3_delete_iface_iptables $INTERFACE
mwan3_delete_iface_route $INTERFACE
mwan3_delete_iface_ipset_entries $INTERFACE
+ mwan3_track_signal $INTERFACE $DEVICE
mwan3_set_policies_iptables
mwan3_set_user_rules
mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown"
mwan3_track()
{
- local track_ip track_ips reliability count timeout interval down up size
+ local track_ip track_ips
mwan3_list_track_ips()
{
if [ -e /var/run/mwan3track-$1.pid ] ; then
kill $(cat /var/run/mwan3track-$1.pid) &> /dev/null
- rm /var/run/mwan3track-$1.pid &> /dev/null
fi
if [ -n "$track_ips" ]; then
- config_get reliability $1 reliability 1
- config_get count $1 count 1
- config_get timeout $1 timeout 4
- config_get interval $1 interval 10
- config_get down $1 down 5
- config_get up $1 up 5
- config_get size $1 size 56
-
- [ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $1 $2 $reliability $count $timeout $interval $down $up $size $track_ips &
+ [ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $1 $2 $track_ips &
+ fi
+}
+
+mwan3_track_signal()
+{
+ local pid status
+
+ if [ -f "/var/run/mwan3track-${1}.pid" ]; then
+ pid="$(cat "/var/run/mwan3track-${1}.pid")"
+ status="$(pgrep -f mwan3track | grep "${pid}")"
+ if [ "${status}" != "" ]; then
+ kill -USR1 "${pid}"
+ else
+ $LOG warn "Unable to send signal USR1 to mwan3track on interface $1 with pid ${pid}"
+ fi
+ else
+ $LOG warn "Unable to find \"/var/run/mwan3track-${1}.pid\" file for mwan3track on interface $1"
fi
}
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /usr/share/libubox/jshn.sh
+
+MWAN3_STATUS_DIR="/var/run/mwan3track"
+MWAN3_PID_FILE="/var/run/mwan3track"
+
+IPS="/usr/sbin/ipset"
+IPT4="/usr/sbin/iptables -t mangle -w"
+IPT6="/usr/sbin/ip6tables -t mangle -w"
+
+report_connected_v4() {
+ local address
+
+ if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then
+ for address in $($IPS list mwan3_connected_v4 | tail -n +8); do
+ json_add_string "" "${address}"
+ done
+ fi
+}
+
+report_connected_v6() {
+ local address
+
+ if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then
+ for address in $($IPS list mwan3_connected_v6 | tail -n +8); do
+ json_add_string "" "${address}"
+ done
+ fi
+}
+
+get_mwan3_status() {
+ local iface="${1}"
+ local iface_select="${2}"
+ local running="0"
+ local pid=""
+ local status=""
+
+ if [ "${iface}" = "${iface_select}" ] || [ "${iface_select}" = "" ]; then
+ if [ -f "${MWAN3_PID_FILE}-${iface}.pid" ]; then
+ pid="$(cat "${MWAN3_PID_FILE}-${iface}.pid")"
+ status="$(pgrep -f mwan3track | grep "${pid}")"
+ if [ "${status}" != "" ]; then
+ running="1"
+ fi
+ fi
+
+ json_add_object "${iface}"
+ json_add_string "score" "$(cat "$MWAN3_STATUS_DIR/${iface}/SCORE")"
+ json_add_string "lost" "$(cat "$MWAN3_STATUS_DIR/${iface}/LOST")"
+ json_add_string "turn" "$(cat "$MWAN3_STATUS_DIR/${iface}/TURN")"
+ json_add_string "status" "$(cat "$MWAN3_STATUS_DIR/${iface}/STATUS")"
+ json_add_boolean "running" "${running}"
+ json_add_array "track_ip"
+ for file in $MWAN3_STATUS_DIR/${iface}/*; do
+ track="${file#*/TRACK_}"
+ if [ "${track}" != "${file}" ]; then
+ json_add_object
+ json_add_string ip "${track}"
+ json_add_string status "$(cat "${file}")"
+ json_close_object
+ fi
+ done
+ json_close_array
+ json_close_object
+ fi
+}
+
+case "$1" in
+ list)
+ json_init
+ json_add_object "status"
+ json_add_string "section" "x"
+ json_add_string "interface" "x"
+ json_close_object
+ json_dump
+ ;;
+ call)
+ case "$2" in
+ status)
+ local section iface
+ read input;
+ json_load "$input"
+ json_get_var section section
+ json_get_var iface interface
+
+ config_load mwan3
+ json_init
+ case "$section" in
+ interfaces)
+ json_add_object interfaces
+ config_foreach get_mwan3_status interface "${iface}"
+ json_close_object
+ ;;
+ connected)
+ json_add_object connected
+ json_add_array ipv4
+ report_connected_v4
+ json_close_array
+ json_add_array ipv6
+ report_connected_v6
+ json_close_array
+ json_close_object
+ ;;
+ *)
+ # interfaces
+ json_add_object interfaces
+ config_foreach get_mwan3_status interface
+ json_close_object
+ # connected
+ json_add_object connected
+ json_add_array ipv4
+ report_connected_v4
+ json_close_array
+ json_add_array ipv6
+ report_connected_v6
+ json_close_array
+ json_close_object
+ ;;
+ esac
+ json_dump
+ ;;
+ esac
+ ;;
+esac
if [ -e /var/run/mwan3track-$1.pid ] ; then
kill $(cat /var/run/mwan3track-$1.pid)
- rm /var/run/mwan3track-$1.pid
fi
}
local ipset route rule table IP IPT
killall mwan3track &> /dev/null
- rm /var/run/mwan3track-* &> /dev/null
for IP in "$IP4" "$IP6"; do
#!/bin/sh
-[ -z "$10" ] && echo "Error: should not be started manually" && exit 0
+. /lib/functions.sh
-if [ -e /var/run/mwan3track-$1.pid ] ; then
- kill $(cat /var/run/mwan3track-$1.pid) &> /dev/null
- rm /var/run/mwan3track-$1.pid &> /dev/null
-fi
+LOG="/usr/bin/logger -t $(basename "$0")[$$] -p"
+INTERFACE=""
+DEVICE=""
-echo "$$" > /var/run/mwan3track-$1.pid
+IFDOWN_EVENT=0
-score=$(($7+$8))
-track_ips=$(echo $* | cut -d ' ' -f 10-99)
-host_up_count=0
-lost=0
-
-while true; do
-
- for track_ip in $track_ips; do
- ping -I $2 -c $4 -W $5 -s $9 -q $track_ip &> /dev/null
- if [ $? -eq 0 ]; then
- let host_up_count++
+clean_up() {
+ $LOG notice "Stopping mwan3track for interface \"${INTERFACE}\""
+ rm "/var/run/mwan3track-${INTERFACE}.pid" &> /dev/null
+ rm -rf "/var/run/mwan3track/${INTERFACE}" &> /dev/null
+ if [ -z "$(ls -A "/var/run/mwan3track")" ]; then
+ rm -rf "/var/run/mwan3track"
+ fi
+ exit 0
+}
+
+if_down() {
+ $LOG info "Detect ifdown event on interface ${INTERFACE} (${DEVICE})"
+ IFDOWN_EVENT=1
+}
+
+main() {
+ local reliability count timeout interval failure_interval
+ local recovery_interval down up size
+
+ [ -z "$3" ] && echo "Error: should not be started manually" && exit 0
+
+ INTERFACE=$1
+ DEVICE=$2
+ echo "$$" > /var/run/mwan3track-$1.pid
+ mkdir -p /var/run/mwan3track/$1
+ trap clean_up SIGINT SIGTERM
+ trap if_down SIGUSR1
+
+ config_load mwan3
+ config_get reliability $1 reliability 1
+ config_get count $1 count 1
+ config_get timeout $1 timeout 4
+ config_get interval $1 interval 10
+ config_get down $1 down 5
+ config_get up $1 up 5
+ config_get size $1 size 56
+ config_get failure_interval $1 failure_interval $interval
+ config_get recovery_interval $1 recovery_interval $interval
+
+ local score=$(($down+$up))
+ local track_ips=$(echo $* | cut -d ' ' -f 3-99)
+ local host_up_count=0
+ local lost=0
+ local sleep_time=0
+ local turn=0
+
+ echo "offline" > /var/run/mwan3track/$1/STATUS
+ while true; do
+
+ sleep_time=$interval
+
+ for track_ip in $track_ips; do
+ ping -I $2 -c $count -W $timeout -s $size -q $track_ip &> /dev/null
+ if [ $? -eq 0 ]; then
+ let host_up_count++
+ echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ else
+ let lost++
+ echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ fi
+ done
+
+ if [ $host_up_count -lt $reliability ]; then
+ let score--
+
+ if [ $score -lt $up ]; then
+ score=0
+ else
+ sleep_time=$failure_interval
+ fi
+
+ if [ $score -eq $up ]; then
+ echo "offline" > /var/run/mwan3track/$1/STATUS
+ $LOG notice "Interface $1 ($2) is offline"
+ env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
+ score=0
+ fi
else
- let lost++
+ if [ $score -lt $(($down+$up)) ] && [ $lost -gt 0 ]; then
+ $LOG info "Lost $(($lost*$count)) ping(s) on interface $1 ($2)"
+ fi
+
+ let score++
+ lost=0
+
+ if [ $score -gt $up ]; then
+ echo "online" > /var/run/mwan3track/$1/STATUS
+ score=$(($down+$up))
+ elif [ $score -le $up ]; then
+ sleep_time=$recovery_interval
+ fi
+
+ if [ $score -eq $up ]; then
+ $LOG notice "Interface $1 ($2) is online"
+ env -i ACTION=ifup INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
+ rm /var/run/mwan3track-$1.pid
+ rm -rf "/var/run/mwan3track/${1}" &> /dev/null
+ exit 0
+ fi
fi
- done
- if [ $host_up_count -lt $3 ]; then
- let score--
+ let turn++
+ echo "${lost}" > /var/run/mwan3track/$1/LOST
+ echo "${score}" > /var/run/mwan3track/$1/SCORE
+ echo "${turn}" > /var/run/mwan3track/$1/TURN
- if [ $score -lt $8 ]; then score=0 ; fi
- if [ $score -eq $8 ]; then
+ host_up_count=0
+ sleep "${sleep_time}" &
+ wait
- logger -t mwan3track -p notice "Interface $1 ($2) is offline"
- env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
+ if [ "${IFDOWN_EVENT}" -eq 1 ]; then
score=0
-
+ echo "offline" > /var/run/mwan3track/$1/STATUS
+ IFDOWN_EVENT=0
fi
+ done
+}
- else
-
- if [ $score -lt $(($7+$8)) ] && [ $lost -gt 0 ]; then
-
- logger -t mwan3track -p info "Lost $(($lost*$4)) ping(s) on interface $1 ($2)"
-
- fi
-
- let score++
- lost=0
-
- if [ $score -gt $8 ]; then score=$(($7+$8)); fi
- if [ $score -eq $8 ]; then
-
- logger -t mwan3track -p notice "Interface $1 ($2) is online"
- env -i ACTION=ifup INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
- rm /var/run/mwan3track-$1.pid
- exit 0
- fi
- fi
-
- host_up_count=0
- sleep $6
-done
-
-exit 1
+main "$@"
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p9
-PKG_RELEASE:=3
+PKG_VERSION:=4.2.8p10
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72
+PKG_HASH:=ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
PKG_NAME:=ser2net
PKG_VERSION:=3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ser2net
--- /dev/null
+From 8614cf0ad4a017184285e814a704322f59a28869 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Wed, 12 Apr 2017 23:36:17 +0200
+Subject: [PATCH] dataxfer.c: fix possible buffer overruns caused by
+ gai_strerror
+
+This fixes a possible buffer overrun that could occur due to
+gai_strerror() returning a string which is longer than the portbuff
+array, i.e. longer than 32 byte.
+
+Reported-by: David Thornley <david.thornley@touchstargroup.com>
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+Signed-off-by: Corey Minyard <cminyard@mvista.com>
+
+diff --git a/dataxfer.c b/dataxfer.c
+index 3d1e713..988f4e4 100644
+--- a/dataxfer.c
++++ b/dataxfer.c
+@@ -3702,18 +3702,20 @@ showshortport(struct controller_info *cntlr, port_info_t *port)
+ portbuff, sizeof(portbuff),
+ NI_NUMERICHOST | NI_NUMERICSERV);
+ if (err) {
+- strcpy(buffer, "*err*");
+- sprintf(portbuff, "%s", gai_strerror(err));
++ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
++ count = controller_outputf(cntlr, "%s", buffer);
++ } else {
++ count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
+ }
+- bytes_recv = netcon->bytes_received;
+- bytes_sent = netcon->bytes_sent;
+
+- count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
+ while (count < 23) {
+ controller_outs(cntlr, " ");
+ count++;
+ }
+
++ bytes_recv = netcon->bytes_received;
++ bytes_sent = netcon->bytes_sent;
++
+ controller_outputf(cntlr, "%-22s ", port->io.devname);
+ controller_outputf(cntlr, "%-14s ", state_str[port->net_to_dev_state]);
+ controller_outputf(cntlr, "%-14s ", state_str[port->dev_to_net_state]);
+@@ -3758,11 +3760,12 @@ showport(struct controller_info *cntlr, port_info_t *port)
+ portbuff, sizeof(portbuff),
+ NI_NUMERICHOST | NI_NUMERICSERV);
+ if (err) {
+- strcpy(buffer, "*err*");
+- sprintf(portbuff, "%s", gai_strerror(err));
++ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
++ controller_outputf(cntlr, " connected to: %s\r\n", buffer);
++ } else {
++ controller_outputf(cntlr, " connected to: %s,%s\r\n",
++ buffer, portbuff);
+ }
+- controller_outputf(cntlr, " connected to: %s,%s\r\n",
+- buffer, portbuff);
+ controller_outputf(cntlr, " bytes read from TCP: %d\r\n",
+ netcon->bytes_received);
+ controller_outputf(cntlr, " bytes written to TCP: %d\r\n",
+--
+2.7.4
+
--- /dev/null
+From b303432f2dbd6a20afa99cb462aa0a1bb740b86d Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Wed, 12 Apr 2017 23:43:18 +0200
+Subject: [PATCH] dataxfer.c: truncate error message to fit the column width
+
+gai_strerror() could return a string which is longer than our current
+column width of "Remote address". To make the output nice again,
+truncate the error string in this case.
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+Signed-off-by: Corey Minyard <cminyard@mvista.com>
+
+diff --git a/dataxfer.c b/dataxfer.c
+index 988f4e4..75c2777 100644
+--- a/dataxfer.c
++++ b/dataxfer.c
+@@ -3703,6 +3703,10 @@ showshortport(struct controller_info *cntlr, port_info_t *port)
+ NI_NUMERICHOST | NI_NUMERICSERV);
+ if (err) {
+ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
++ /* gai_strerror could return an elongated string which could break
++ our pretty formatted output below, so truncate the string nicely */
++ if (strlen(buffer) > 22)
++ strcpy(&buffer[22 - 3], "...");
+ count = controller_outputf(cntlr, "%s", buffer);
+ } else {
+ count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
+--
+2.7.4
+
--- /dev/null
+From 81f3991e232fd45b05ff52b5091393532e4305e5 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Thu, 13 Apr 2017 20:29:10 +0200
+Subject: [PATCH] dataxfer.c: adjust "Remote address" column width
+
+In case we are connected to an IPv6 address the current column width
+is too small to take the complete address and port number so adjust it.
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+Signed-off-by: Corey Minyard <cminyard@mvista.com>
+
+diff --git a/dataxfer.c b/dataxfer.c
+index 75c2777..9955403 100644
+--- a/dataxfer.c
++++ b/dataxfer.c
+@@ -3674,6 +3674,9 @@ clear_old_port_config(int curr_config)
+ UNLOCK(ports_lock);
+ }
+
++#define REMOTEADDR_COLUMN_WIDTH \
++ (INET6_ADDRSTRLEN - 1 /* terminating NUL */ + 1 /* comma */ + 5 /* strlen("65535") */)
++
+ /* Print information about a port to the control port given in cntlr. */
+ static void
+ showshortport(struct controller_info *cntlr, port_info_t *port)
+@@ -3705,14 +3708,14 @@ showshortport(struct controller_info *cntlr, port_info_t *port)
+ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
+ /* gai_strerror could return an elongated string which could break
+ our pretty formatted output below, so truncate the string nicely */
+- if (strlen(buffer) > 22)
+- strcpy(&buffer[22 - 3], "...");
++ if (strlen(buffer) > REMOTEADDR_COLUMN_WIDTH)
++ strcpy(&buffer[REMOTEADDR_COLUMN_WIDTH - 3], "...");
+ count = controller_outputf(cntlr, "%s", buffer);
+ } else {
+ count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
+ }
+
+- while (count < 23) {
++ while (count < REMOTEADDR_COLUMN_WIDTH + 1) {
+ controller_outs(cntlr, " ");
+ count++;
+ }
+@@ -3878,10 +3881,11 @@ showshortports(struct controller_info *cntlr, char *portspec)
+ port_info_t *port;
+
+ controller_outputf(cntlr,
+- "%-22s %-6s %7s %-22s %-22s %-14s %-14s %9s %9s %9s %9s %s\r\n",
++ "%-22s %-6s %7s %-*s %-22s %-14s %-14s %9s %9s %9s %9s %s\r\n",
+ "Port name",
+ "Type",
+ "Timeout",
++ REMOTEADDR_COLUMN_WIDTH,
+ "Remote address",
+ "Device",
+ "TCP to device",
+--
+2.7.4
+
--- /dev/null
+From 1479d3acc7ffb77225ea294f83a8d3fbdadfece6 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Thu, 13 Apr 2017 20:37:35 +0200
+Subject: [PATCH] dataxfer.c: in case port is not connected display this
+ directly
+
+In this case we don't bother to call into getnameinfo but show
+directly "unconnected", this prevents showing an error message.
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+Signed-off-by: Corey Minyard <cminyard@mvista.com>
+
+diff --git a/dataxfer.c b/dataxfer.c
+index 9955403..d6a59d9 100644
+--- a/dataxfer.c
++++ b/dataxfer.c
+@@ -3700,19 +3700,23 @@ showshortport(struct controller_info *cntlr, port_info_t *port)
+ if (!netcon)
+ netcon = &(port->netcons[0]);
+
+- err = getnameinfo(netcon->raddr, netcon->raddrlen,
+- buffer, sizeof(buffer),
+- portbuff, sizeof(portbuff),
+- NI_NUMERICHOST | NI_NUMERICSERV);
+- if (err) {
+- snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
+- /* gai_strerror could return an elongated string which could break
+- our pretty formatted output below, so truncate the string nicely */
+- if (strlen(buffer) > REMOTEADDR_COLUMN_WIDTH)
+- strcpy(&buffer[REMOTEADDR_COLUMN_WIDTH - 3], "...");
+- count = controller_outputf(cntlr, "%s", buffer);
++ if (port->net_to_dev_state != PORT_UNCONNECTED) {
++ err = getnameinfo(netcon->raddr, netcon->raddrlen,
++ buffer, sizeof(buffer),
++ portbuff, sizeof(portbuff),
++ NI_NUMERICHOST | NI_NUMERICSERV);
++ if (err) {
++ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
++ /* gai_strerror could return an elongated string which could break
++ our pretty formatted output below, so truncate the string nicely */
++ if (strlen(buffer) > REMOTEADDR_COLUMN_WIDTH)
++ strcpy(&buffer[REMOTEADDR_COLUMN_WIDTH - 3], "...");
++ count = controller_outputf(cntlr, "%s", buffer);
++ } else {
++ count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
++ }
+ } else {
+- count = controller_outputf(cntlr, "%s,%s", buffer, portbuff);
++ count = controller_outputf(cntlr, "unconnected");
+ }
+
+ while (count < REMOTEADDR_COLUMN_WIDTH + 1) {
+@@ -3762,21 +3766,25 @@ showport(struct controller_info *cntlr, port_info_t *port)
+ controller_outputf(cntlr, " timeout: %d\r\n", port->timeout);
+
+ for_each_connection(port, netcon) {
+- err = getnameinfo(netcon->raddr, netcon->raddrlen,
+- buffer, sizeof(buffer),
+- portbuff, sizeof(portbuff),
+- NI_NUMERICHOST | NI_NUMERICSERV);
+- if (err) {
+- snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
+- controller_outputf(cntlr, " connected to: %s\r\n", buffer);
++ if (port->net_to_dev_state != PORT_UNCONNECTED) {
++ err = getnameinfo(netcon->raddr, netcon->raddrlen,
++ buffer, sizeof(buffer),
++ portbuff, sizeof(portbuff),
++ NI_NUMERICHOST | NI_NUMERICSERV);
++ if (err) {
++ snprintf(buffer, sizeof(buffer), "*err*,%s", gai_strerror(err));
++ controller_outputf(cntlr, " connected to: %s\r\n", buffer);
++ } else {
++ controller_outputf(cntlr, " connected to: %s,%s\r\n",
++ buffer, portbuff);
++ }
++ controller_outputf(cntlr, " bytes read from TCP: %d\r\n",
++ netcon->bytes_received);
++ controller_outputf(cntlr, " bytes written to TCP: %d\r\n",
++ netcon->bytes_sent);
+ } else {
+- controller_outputf(cntlr, " connected to: %s,%s\r\n",
+- buffer, portbuff);
++ controller_outputf(cntlr, " unconnected\r\n");
+ }
+- controller_outputf(cntlr, " bytes read from TCP: %d\r\n",
+- netcon->bytes_received);
+- controller_outputf(cntlr, " bytes written to TCP: %d\r\n",
+- netcon->bytes_sent);
+ }
+
+ controller_outputf(cntlr, " device: %s\r\n", port->io.devname);
+--
+2.7.4
+
#
-# Copyright (C) 2006-2015 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.
PKG_NAME:=siit
PKG_VERSION:=1.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPLv2+
include $(INCLUDE_DIR)/package.mk
siit_stats(dev)->rx_bytes += skb->len;
siit_stats(dev)->rx_packets++;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
+ netif_trans_update(dev);
+#else
dev->trans_start = jiffies;
+#endif
/* Upper layer (IP) protocol forms sk_buff for outgoing packet
* and sets IP header + Ether header too. IP layer sets outgoing
PKG_NAME:=simple-adblock
PKG_VERSION:=1.5.6
-PKG_RELEASE:=6
+PKG_RELEASE:=8
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
#### Add custom repo to your router
If your router is not set up with the access to repository containing these packages you will need to add custom repository to your router by connecting to your router via ssh and running the following commands:
+
+###### OpenWrt CC 15.05.1
+```sh
+opkg update; opkg install wget libopenssl
+echo -e -n 'untrusted comment: public key 7ffc7517c4cc0c56\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
+! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
+opkg update
+```
+
+###### LEDE Project and OpenWrt DD trunk
```sh
+opkg update; opkg install uclient-fetch libustream-mbedtls
echo -e -n 'untrusted comment: public key 7ffc7517c4cc0c56\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
opkg update
In general, whatever domain is specified to be whitelisted; it, along with with its subdomains will be whitelisted, but not any fake domains containing it.
## Documentation / Discussion
-Please head to [OpenWrt Forum](https://forum.openwrt.org/viewtopic.php?pid=307950) or [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lightweight-and-fully-uci-luci-configurable-ad-blocking/) for discussion of this package.
+Please head to [OpenWrt Forum](https://forum.openwrt.org/viewtopic.php?pid=307950) or [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
## What's New
1.5.6:
readonly B_TMP='/var/hosts.blocked.tmp'
readonly T_TMP='/var/simple-adblock.hosts'
readonly dl='wget --no-check-certificate -qO-'
-readonly h_filter='/localhost/d;/^#/d;/^$/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;'
-readonly d_filter='/localhost/d;/^#/d;/^$/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/^</d;'
+readonly h_filter='/localhost/d;/^#/d;/*/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/^$/d;'
+readonly d_filter='/localhost/d;/^#/d;/*/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/^</d;/^$/d;'
readonly f_filter='s|^|local=/|;s|$|/|'
readonly _ok_='\033[0;32m\xe2\x9c\x93\033[0m'
readonly _fail_='\033[0;31m\xe2\x9c\x97\033[0m'
PKG_NAME:=sslh
PKG_VERSION:=v1.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://rutschle.net/tech/sslh/
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=SSL/SSH multiplexer
+ DEPENDS:=+libconfig +USE_UCLIBC:libpcre +USE_MUSL:libpcre
URL:=http://rutschle.net/tech/sslh.shtml
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
endef
define Package/sslh/conffiles
/etc/config/sslh
+/etc/sslh.conf
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
- ENABLE_REGEX= \
- USELIBCONFIG= \
+ ENABLE_REGEX=1 \
+ USELIBCONFIG=1 \
USELIBWRAP= \
USELIBPCRE= \
+ $(if $(CONFIG_USE_GLIBC),USELIBPCRE=,USELIBPCRE=1)\
all
endef
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/basic.cfg $(1)/etc/sslh.conf
endef
$(eval $(call BuildPackage,sslh))
# verbose defaults to off
# -v
option 'verbose' '0'
+ # use external config file
+ # option configfile '/etc/sslh.conf'
config_get val "${section}" ssl
[ -n "${val}" ] && append args "--ssl ${val}"
# D) openvpn parameter
- config_get val "${section}" openvpn
- [ -n "${val}" ] && append args "--openvpn ${val}"
+ config_get val "${section}" openvpn
+ [ -n "${val}" ] && append args "--openvpn ${val}"
# E) tinc parameter
- config_get val "${section}" tinc
- [ -n "${val}" ] && append args "--tinc ${val}"
- # F) xmpp parameter
+ config_get val "${section}" tinc
+ [ -n "${val}" ] && append args "--tinc ${val}"
+ # F) xmpp parameter
config_get val "${section}" xmpp
[ -n "${val}" ] && append args "--xmpp ${val}"
# G) timeout (before a connection is considered to be SSH)
local verbosed
config_get_bool verbosed "${section}" verbose 0
[ "${verbosed}" -ne 0 ] && append args "-v"
+ # I) sslh config file (cmd line args override file settings)
+ config_get val "${section}" configfile
+ [ -n "${val}" ] && append args "-F${val}"
# Defaults were removed for --user and --pidfile options
# in sslh 1.11; Define them here instead.
--- /dev/null
+diff --git a/basic.cfg b/basic.cfg
+index 54a799c..d938767 100644
+--- a/basic.cfg
++++ b/basic.cfg
+@@ -1,3 +1,7 @@
++# **** Attention OpenWRT/LEDE Users ****
++# sslh command line arguments override arguments defined in this
++# configuration file (UCI uses command line arguments)
++
+ # This is a basic configuration file that should provide
+ # sensible values for "standard" setup.
+
+@@ -14,15 +18,16 @@ pidfile: "/var/run/sslh.pid";
+ # Change hostname with your external address name.
+ listen:
+ (
+- { host: "thelonious"; port: "443"; }
++ { host: "0.0.0.0"; port: "443"; },
++ { host: "[::]"; port: "443"; }
+ );
+
+ protocols:
+ (
+ { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; },
+ { name: "openvpn"; host: "localhost"; port: "1194"; },
+- { name: "xmpp"; host: "localhost"; port: "5222"; },
+- { name: "http"; host: "localhost"; port: "80"; },
++# { name: "xmpp"; host: "localhost"; port: "5222"; },
++# { name: "http"; host: "localhost"; port: "80"; },
+ { name: "ssl"; host: "localhost"; port: "443"; log_level: 0; },
+ { name: "anyprot"; host: "localhost"; port: "443"; }
+ );
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.40
+PKG_VERSION:=5.41
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_SOURCE_URL:= \
http://ftp.nluug.nl/pub/networking/stunnel/ \
- http://www.usenix.org.uk/mirrors/stunnel/
+ http://www.usenix.org.uk/mirrors/stunnel/ \
+ https://www.stunnel.org/downloads/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=23acdb390326ffd507d90f8984ecc90e0d9993f6bd6eac1d0a642456565c45ff
+PKG_HASH:=f05c6321ee1f6ddebacc234ccf20825971941e831b5beea6d0ce0b8e1668148f
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpreplay
-PKG_VERSION:=4.1.2
+PKG_VERSION:=4.2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
-PKG_MD5SUM:=3105b10b07dbc0b07ce2da07a2368359
+PKG_MD5SUM:=a2864f466fe17715baa49d44d5a91eb4
+PKG_HASH:=224b519e561d969b4bdb0e700c2283e036620e3cb5895d5aab2a7e4f27d21a79
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=docs/LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=0.4.2
+PKG_VERSION:=0.6.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
* easy setup within normal OpenWrt/LEDE environment
* fast uplink connections
-* "active mode" support, where travelmate will be restarted every n seconds (default 60) and checks the existing uplink connection regardless of ifdown event trigger
+* manual / automatic mode support, the latter one checks the existing uplink connection regardless of ifdown event trigger every n seconds
* support of devices with multiple radios
-* procd init system support
-* procd based hotplug support, the travelmate start will be triggered by interface triggers
+* procd init and hotplug support
+* runtime information accessible via ubus service call
* status & debug logging to syslog
## Prerequisites
* the application is located in LuCI under 'Services' menu
* _Thanks to Hannu Nyman for this great LuCI frontend!_
-## Chaos Calmer installation notes
-* 'travelmate' and 'luci-app-travelmate' are _not_ available as ipk packages in the Chaos Calmer download repository
-* download the packages from a development snapshot directory (see download links above)
-* manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_)
-* install the packages as described above
-
## Travelmate config options
* travelmate config options:
* trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
* trm\_debug => enable/disable debug logging (default: '0', disabled)
- * trm\_active => keep travelmate in an active state (default: '0', disabled)
- * trm\_maxwait => how long (in seconds) should travelmate wait for wlan interface reload action (default: '20')
+ * trm\_automatic => keep travelmate in an active state (default: '1', enabled)
+ * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (default: '30')
* trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3')
- * trm\_timeout => timeout in seconds for "active mode" (default: '60')
+ * trm\_timeout => timeout in seconds for "automatic mode" (default: '60')
* trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
* trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
- * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled)
+ * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: wan wwan)
+
+
+## Runtime information
+
+**receive travelmate information via ubus:**
+<pre><code>
+ubus call service get_data '{"name":"travelmate"}'
+This will output the current connection status, e.g.:
+{
+ "travelmate": {
+ "travelmate": {
+ "last_rundate": "02.04.2017 07:22:03",
+ "online_status": "true",
+ "station_interface": "wwan",
+ "station_radio": "radio1",
+ "station_ssid": "blackhole",
+ "system": "LEDE Reboot SNAPSHOT r3888-8fb39f1682",
+ "travelmate_version": "0.6.0"
+ }
+ }
+}
+</code></pre>
## Setup
**1. configure a wwan interface in /etc/config/network:**
config travelmate 'global'
option trm_enabled '0'
option trm_debug '0'
- option trm_active '0'
+ option trm_iface 'wwan'
+ option trm_automatic '1'
option trm_maxwait '30'
option trm_maxretry '3'
option trm_timeout '60'
START=85
USE_PROCD=1
+trm_init="/etc/init.d/travelmate"
trm_script="/usr/bin/travelmate.sh"
boot()
{
local iface="$(uci -q get travelmate.global.trm_iface)"
- if [ -z "${iface}" ]
- then
- procd_add_raw_trigger "interface.*.down" 1000 /etc/init.d/travelmate start
- else
- for name in ${iface}
- do
- procd_add_interface_trigger "interface.*.down" "${name}" /etc/init.d/travelmate start
- done
- fi
- procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start
+ for name in ${iface}
+ do
+ procd_add_interface_trigger "interface.*.down" "${name}" "${trm_init}" start
+ done
+ procd_add_config_trigger "config.change" "travelmate" "${trm_init}" start
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="0.4.2"
+trm_ver="0.6.0"
trm_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
-trm_enabled=1
+trm_enabled=0
trm_debug=0
-trm_active=0
+trm_automatic=0
trm_maxwait=30
trm_maxretry=3
trm_timeout=60
trm_iw=1
+# source required system library
+#
+if [ -r "/lib/functions.sh" ]
+then
+ . "/lib/functions.sh"
+else
+ f_log "error" "required system library not found"
+fi
+
# f_envload: load travelmate environment
#
f_envload()
{
- # source required system libraries
+ # initialize lists
#
- if [ -r "/lib/functions.sh" ]
- then
- . "/lib/functions.sh"
- else
- f_log "error" "required system library not found"
- fi
+ trm_aplist=""
+ trm_stalist=""
+ trm_radiolist=""
# load uci config and check 'enabled' option
#
cnt=$((cnt+1))
sleep 1
done
- f_log "debug" "mode: ${mode}, name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}, max-wait: ${trm_maxwait}"
+ f_log "debug" "mode: ${mode}, name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}, max-wait: ${trm_maxwait}, automatic: ${trm_automatic}"
}
-# f_active: keep travelmate in an active state
+# f_ubus: update ubus service
#
-f_active()
+f_ubus()
{
- if [ ${trm_active} -eq 1 ]
- then
- (sleep ${trm_timeout}; /etc/init.d/travelmate start >/dev/null 2>&1) &
- fi
+ local active_triggers iface="${1}" radio="${2}" ssid="${3}"
+
+ for name in ${trm_iface}
+ do
+ active_triggers="${active_triggers}[\"interface.*.down\",[\"if\",[\"eq\",\"interface\",\"${name}\"],[\"run_script\",\"/etc/init.d/travelmate\",\"start\"],1000]],"
+ done
+ active_triggers="${active_triggers}[\"config.change\",[\"if\",[\"eq\",\"package\",\"travelmate\"],[\"run_script\",\"/etc/init.d/travelmate\",\"start\"],1000]]"
+
+ ubus call service add "{\"name\":\"travelmate\",
+ \"instances\":{\"travelmate\":{\"command\":[\"/usr/bin/travelmate.sh\"],
+ \"data\":{\"travelmate_version\":\"${trm_ver}\",
+ \"station_interface\":\"${iface}\",
+ \"station_radio\":\"${radio}\",
+ \"station_ssid\":\"${ssid}\",
+ \"last_rundate\":\"$(/bin/date "+%d.%m.%Y %H:%M:%S")\",
+ \"online_status\":\"${trm_ifstatus}\",
+ \"system\":\"${trm_sysver}\"}}},
+ \"triggers\":[${active_triggers}]}"
}
-# f_log: function to write to syslog
+# f_log: write to syslog, exit on error
#
f_log()
{
if [ "${class}" = "error" ]
then
logger -t "travelmate-[${trm_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
- f_active
exit 255
fi
fi
#
f_main()
{
- local ssid_list config ap_radio sta_radio ssid cnt=1
+ local config ssid_list ap ap_radio sta_ssid sta_radio sta_iface cnt=1
f_check "initial"
if [ "${trm_ifstatus}" != "true" ]
then
uci -q commit wireless
ubus call network reload
+ sleep 5
fi
f_check "ap"
f_log "debug" "ap-list: ${trm_aplist}, sta-list: ${trm_stalist}"
do
config="${sta%%_*}"
sta_radio="${sta##*_}"
- ssid="\"$(uci -q get wireless."${config}".ssid)\""
- if [ -n "$(printf "${ssid_list}" | grep -Fo "${ssid}")" ] && [ "${ap_radio}" = "${sta_radio}" ]
+ sta_ssid="$(uci -q get wireless."${config}".ssid)"
+ sta_iface="$(uci -q get wireless."${config}".network)"
+ if [ -n "$(printf "${ssid_list}" | grep -Fo "\"${sta_ssid}\"")" ] && [ "${ap_radio}" = "${sta_radio}" ]
then
uci -q set wireless."${config}".disabled=0
ubus call network reload
if [ "${trm_ifstatus}" = "true" ]
then
uci -q commit wireless
- f_log "info " "wwan interface connected to uplink ${ssid} (${trm_sysver})"
+ f_log "info " "interface '${sta_iface}' on '${sta_radio}' connected to uplink '${sta_ssid}' (${trm_sysver})"
sleep 5
+ f_ubus "${sta_iface}" "${sta_radio}" "${sta_ssid}"
return 0
else
uci -q revert wireless
ubus call network reload
- f_log "info " "wwan interface can't connect to uplink ${ssid} (${trm_sysver})"
+ f_log "info " "interface '${sta_iface}' on '${sta_radio}' can't connect to uplink '${sta_ssid}' (${trm_sysver})"
+ f_ubus "${sta_iface}" "${sta_radio}" "${sta_ssid}"
fi
fi
done
f_envload
f_main
-f_active
+while [ ${trm_automatic} -eq 1 ]
+do
+ sleep ${trm_timeout}
+ f_envload
+ f_main
+done
exit 0
$(TARGET_CONFIGURE_OPTS) \
$(VARIANT_MAKE_OPTS) \
TARGET=Linux \
- CFLAGS="$(TARGET_CFLAGS) $(VARIANT_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(VARIANT_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(VARIANT_LDFLAGS)"
$(STRIP) $(PKG_BUILD_DIR)/src/uanytun
endef
PKG_NAME:=ulogd
PKG_VERSION:=2.0.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
--- /dev/null
+From e0c75c9d20b76ff3d496a776ce43341c752914c3 Mon Sep 17 00:00:00 2001
+From: Eric Leblond <eric@regit.org>
+Date: Tue, 21 Mar 2017 21:49:46 +0100
+Subject: [PATCH] ulogd: use strncpy instead of memcpy
+
+On some architecture, ulogd is not starting due to a
+crash in memcpy. This patch switches to strncpy to
+avoid the problem.
+
+Reported-by: Alexandru Ardelean <ardeleanalex@gmail.com>
+Signed-off-by: Eric Leblond <eric@regit.org>
+---
+ src/ulogd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ulogd.c b/src/ulogd.c
+index 5b9a586..919a317 100644
+--- a/src/ulogd.c
++++ b/src/ulogd.c
+@@ -668,7 +668,7 @@ pluginstance_alloc_init(struct ulogd_plugin *pl, char *pi_id,
+ INIT_LLIST_HEAD(&pi->plist);
+ pi->plugin = pl;
+ pi->stack = stack;
+- memcpy(pi->id, pi_id, sizeof(pi->id));
++ strncpy(pi->id, pi_id, ULOGD_MAX_KEYLEN);
+
+ ptr = (void *)pi + sizeof(*pi);
+
+--
+2.7.4
+
PKG_NAME:=unbound
PKG_VERSION:=1.6.1
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
/^#/ {
# We need to pick out DHCP v4 or v6 records
- net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ;
+ net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ; adr2 = $10
cdr = adr ;
+ cdr2 = adr2 ;
sub( /\/.*/, "", adr ) ;
sub( /.*\//, "", cdr ) ;
+ sub( /\/.*/, "", adr2 ) ;
+ sub( /.*\//, "", cdr2 ) ;
if ( bisolt == 1 ) {
print ( x "\n" y ) > hostfile ;
}
}
+
+ if (( cdr2 == 128 ) && ( hst != "-" )) {
+ if ( bconf == 1 ) {
+ x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr2 "\"" ) ;
+ y = ( "local-data-ptr: \"" adr2 " 120 " fqdn "\"" ) ;
+ print ( x "\n" y ) > hostfile ;
+ }
+
+ else {
+ # odhcp puts GA and ULA on the same line (position 9 and 10)
+ qpr2 = ipv6_ptr( adr2 ) ;
+ x = ( fqdn ". 120 IN AAAA " adr2 ) ;
+ y = ( qpr2 ". 120 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
+ }
+ }
}
}
#
##############################################################################
-START=60
+START=19
+STOP=50
USE_PROCD=1
PROG=/usr/sbin/unbound
##############################################################################
+boot() {
+ UNBOUND_BOOT=1
+ start "$@"
+}
+
+##############################################################################
+
start_service() {
- # WAIT! Unbound often takes its time writing closure stats to syslog
- pidof $PROG && sleep 1
+ if [ -n "$UNBOUND_BOOT" ] ; then
+ # Load procd triggers (rc) and use event IFUP to really start
+ return 0
+ fi
# complex UCI work
unbound_start
stop_service() {
unbound_stop
+
+ # Wait! on restart Unbound may take time writing closure stats to syslog
+ pidof $PROG && sleep 1
}
##############################################################################
service_triggers() {
+ # use soft reload to prevent continuous stop-start and cache flush
procd_add_reload_trigger "unbound"
- procd_add_raw_trigger "interface.*" 2000 /etc/init.d/unbound restart
+ procd_add_raw_trigger "interface.*.up" 2000 /etc/init.d/unbound reload
}
##############################################################################
if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
/etc/init.d/unbound enabled && /etc/init.d/unbound restart
+ # Yes, hard RESTART. We need to be absolutely sure to enable DNSSEC.
fi
##############################################################################
# Debian-like package dns-root-data
cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE
- else
+ elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
logger -t unbound -s "iterator will use built-in root hints"
fi
fi
elif [ -x $UNBOUND_ANCHOR ] ; then
$UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
- else
+ elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
logger -t unbound -s "validator will use built-in trust anchor"
fi
fi
echo
} >> $UNBOUND_CONFFILE
- else
+ elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
logger -t unbound -s "default memory resource consumption"
fi
;;
*)
- logger -t unbound -s "default recursion configuration"
+ if [ ! -f "$UNBOUND_TIMEFILE" ] ; then
+ logger -t unbound -s "default recursion configuration"
+ fi
;;
esac
if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then
UNBOUND_D_DHCP_LINK=dnsmasq
- logger -t unbound -s "Please use 'dhcp_link' selector instead"
+
+
+ if [ ! -f "$UNBOUND_TIMEFILE" ] ; then
+ logger -t unbound -s "Please use 'dhcp_link' selector instead"
+ fi
fi
fi
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
+ if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then
logger -t unbound -s "cannot forward to dnsmasq"
fi
fi
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
+ if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then
logger -t unbound -s "cannot receive records from odhcpd"
fi
fi
include $(TOPDIR)/rules.mk
PKG_NAME:=vnstat
-PKG_VERSION:=1.12
+PKG_VERSION:=1.17
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://humdi.net/vnstat
-PKG_MD5SUM:=a154b2196771e06a8accd1c24374009c
+PKG_HASH:=18e4c53576ca9e1ef2f0e063a6d83b0c44e3b1cf008560d658745df5c9aa7971
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_INSTALL:=1
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat
$(INSTALL_DIR) $(1)/etc/init.d
+++ /dev/null
---- a/cfg/vnstat.conf
-+++ b/cfg/vnstat.conf
-@@ -78,13 +78,13 @@ DaemonUser ""
- DaemonGroup ""
-
- # how often (in seconds) interface data is updated
--UpdateInterval 30
-+UpdateInterval 60
-
- # how often (in seconds) interface status changes are checked
--PollInterval 5
-+PollInterval 30
-
- # how often (in minutes) data is saved to file
--SaveInterval 5
-+SaveInterval 30
-
- # how often (in minutes) data is saved when all interface are offline
- OfflineSaveInterval 30
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -66,11 +66,11 @@ install:
-
- # install everything else
- install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5
-- install -s -m 755 src/vnstat $(BIN)
-- install -s -m 755 src/vnstatd $(SBIN)
-+ install -m 755 src/vnstat $(BIN)
-+ install -m 755 src/vnstatd $(SBIN)
- @if [ -f "src/vnstati" ]; \
-- then echo install -s -m 755 src/vnstati $(BIN); \
-- install -s -m 755 src/vnstati $(BIN); \
-+ then echo install -m 755 src/vnstati $(BIN); \
-+ install -m 755 src/vnstati $(BIN); \
- fi
-
- # update man pages, gzip it if previous version was done so
-@@ -139,12 +139,12 @@ bsdinstall:
-
- # install binaries
- install -d -m 755 $(DESTDIR)/var/db/vnstat
-- install -s -m 755 src/vnstat $(BIN_BSD)
-- install -s -m 755 src/vnstatd $(SBIN_BSD)
-+ install -m 755 src/vnstat $(BIN_BSD)
-+ install -m 755 src/vnstatd $(SBIN_BSD)
-
- @if [ -f "src/vnstati" ]; \
-- then echo install -s -m 755 src/vnstati $(BIN_BSD); \
-- install -s -m 755 src/vnstati $(BIN_BSD); \
-+ then echo install -m 755 src/vnstati $(BIN_BSD); \
-+ install -m 755 src/vnstati $(BIN_BSD); \
- fi
-
- # install default config if such doesn't exist
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -33,12 +33,6 @@ debug:
- install:
- @echo "Installing vnStat..."
-
--# check that system is really Linux
-- @if [ `uname` != "Linux" ]; \
-- then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \
-- false; \
-- fi
--
- # check that there's something to install
- @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \
- then echo "Nothing to install, run make first."; \
+++ /dev/null
---- a/src/common.h
-+++ b/src/common.h
-@@ -22,6 +22,7 @@
- #include <pwd.h>
- #include <grp.h>
- #include <libgen.h>
-+#include <fcntl.h>
-
- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
- #include <sys/param.h>
--- /dev/null
+From: Jo-Philipp Wich <jo@mein.io>
+Date: Thu, 26 Jan 2017 15:30:00 +0100
+Subject: [PATCH] config: adjust default values
+
+Adjust the default interval settings to be better suited for slower embedded
+devices.
+
+Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+
+--- a/cfg/vnstat.conf
++++ b/cfg/vnstat.conf
+@@ -87,13 +87,13 @@ DaemonUser ""
+ DaemonGroup ""
+
+ # how often (in seconds) interface data is updated
+-UpdateInterval 30
++UpdateInterval 60
+
+ # how often (in seconds) interface status changes are checked
+-PollInterval 5
++PollInterval 30
+
+ # how often (in minutes) data is saved to file
+-SaveInterval 5
++SaveInterval 30
+
+ # how often (in minutes) data is saved when all interface are offline
+ OfflineSaveInterval 30
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
vsftpd
endef
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
vsftpd
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=webui-aria2
+PKG_SOURCE_DATE:=2017-04-02
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ziahamza/webui-aria2.git
-PKG_SOURCE_DATE:=2017-02-12
-PKG_SOURCE_VERSION:=68c8ad4f86b87a8b713e13f70b4a3a3c7b86c83e
+PKG_SOURCE_URL:=https://github.com/ziahamza/webui-aria2
+PKG_SOURCE_VERSION:=d2a662849a792bb8d7b83519bac1eeee0fcec4e9
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_NAME:=wireguard
-PKG_VERSION:=0.0.20170324
+PKG_VERSION:=0.0.20170409
PKG_RELEASE:=1
PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=2ec08a5d74cb3a63576f06d3cae695b6b8995acd9665e2fa4da91927b467ca51
+PKG_HASH:=31473b4d14178f82d6ff46df019d57982c210c03d1a985d54db35bdd76efbb18
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=znc
-PKG_VERSION:=1.6.4
+PKG_VERSION:=1.6.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://znc.in/releases \
http://znc.in/releases/archive
-PKG_MD5SUM:=431097eb17860bfc980f3e68fdd75f98af4bdeecd793c84835c6cb11c3320d1c
+PKG_MD5SUM:=2f0225d49c53a01f8d94feea4619a6fe92857792bb3401a4eb1edd65f0342aca
PKG_MAINTAINER:=Jonas Gorski <jogo@openwrt.org>
PKG_LICENSE:=Apache-2.0
ifeq ($(BUILD_VARIANT),full)
TARGET_CFLAGS+= -DLINKALL
+ TARGET_LDFLAGS+= -lvorbis -logg
endif
define Package/squeezelite/install
URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
endef
-TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE -DIPPORT_TFTP=69
+TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE
ifeq ($(CONFIG_BIG_ENDIAN),y)
TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
endif
--- /dev/null
+Index: ap51-flash-2016-10-16/proto.c
+===================================================================
+--- ap51-flash-2016-10-16.orig/proto.c
++++ ap51-flash-2016-10-16/proto.c
+@@ -29,6 +29,10 @@
+ #include "router_redboot.h"
+ #include "router_tftp_client.h"
+
++#ifndef IPPORT_TFTP
++#define IPPORT_TFTP 69
++#endif
++
+ #define TFTP_SRC_PORT 13337
+ #define REDBOOT_TELNET_SPORT 13337
+ #define REDBOOT_TELNET_DPORT 9000
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
- DEPENDS:=+libopenssl
+ DEPENDS:=+libopenssl +USE_GLIBC:libbsd
endef
define Package/hfsfsck
$(MAKE) -C $(PKG_BUILD_DIR) \
-f Makefile.lnx \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS+="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1" \
+ CFLAGS+="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1" \
+ LDFLAGS+="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_GLIBC),-lbsd)" \
all
endef
--- /dev/null
+#
+# 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:=lcdproc
+# PKG_VERSION:=0.5.8
+PKG_BASE_VERSION:=0.5.8
+PKG_VERSION:=$(PKG_BASE_VERSION)+git2070222
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/lcdproc/lcdproc.git
+PKG_SOURCE_VERSION:=156983afab6d8f49d9a84e2a0929874eac569cc3
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_BASE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_BASE_VERSION)
+
+#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+#PKG_SOURCE_URL:=https://github.com/lcdproc/lcdproc/releases/download/v$(PKG_VERSION)/
+#PKG_MD5SUM:=1dd25676946c61184c6f51cc0a75379e
+PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>, \
+ Philip Prindeville <philipp@redfish-solutions.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lcdproc/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ URL:=http://lcdproc.org/
+endef
+
+define Package/lcdproc/Default-description
+LCDProc is a daemon and clients for displaying system information
+on various LCD displays
+endef
+
+
+define Package/lcdproc-clients
+ $(call Package/lcdproc/Default)
+ TITLE:=LCD Display clients
+endef
+
+define Package/lcdproc-clients/description
+$(call Package/lcdproc/Default-description)
+
+This package contains the clients distributed by the official lcdproc
+project:
+* lcdproc -- displays system information
+* lcdexec -- displays a menu structure to execute commands
+* lcdvc -- shows the content of the system console
+endef
+
+define Package/lcdproc-clients/conffiles
+/etc/lcdproc.conf
+/etc/lcdexec.conf
+/etc/lcdvc.conf
+endef
+
+
+define Package/lcdproc-server
+ $(call Package/lcdproc/Default)
+ TITLE:=LCD Display server
+ DEPENDS:=+libpthread
+endef
+
+define LCDPROC_CORE_DRIVERS_TEXT
+bayrad CFontzPacket CFontz CwLnx ea65 EyeboxOne glk icp_a106 imonlcd
+imon irtrans joy lb216 lcdm001 lcterm linux_input MD8800 ms6931
+mtc_s16209x MtxOrb NoritakeVFD Olimex_MOD_LCD1x9 pyramid rawserial
+serialPOS serialVFD sli SureElec text tyan vlsys_m428 yard2LCD
+endef
+
+LCDPROC_CORE_DRIVERS:=$(strip $(LCDPROC_CORE_DRIVERS_TEXT))
+
+define Package/lcdproc-server/description
+$(call Package/lcdproc/Default-description)
+
+This package contains the server and a core set of display drivers
+without external dependencies:
+$(LCDPROC_CORE_DRIVERS_TEXT)
+endef
+
+define Package/lcdproc-server/conffiles
+/etc/LCDd.conf
+endef
+
+
+define Package/lcdproc-drivers
+ $(call Package/lcdproc/Default)
+ TITLE:=LCD Display extra drivers
+ DEPENDS:=+lcdproc-server +libncurses +libusb-1.0 +libusb-compat +libftdi1 \
+ +GPIO_SUPPORT:libugpio
+endef
+
+define LCDPROC_OTHER_DRIVERS_TEXT
+curses futaba glcd hd44780 IOWarrior i2500vfd lis picolcd shuttleVFD ula200
+endef
+
+ifeq ($(CONFIG_PACKAGE_kmod-lp),y)
+LCDPROC_OTHER_DRIVERS_TEXT+=sdeclcd sed1330 sed1520 stv5730 t6963
+endif
+
+LCDPROC_OTHER_DRIVERS:=$(strip $(LCDPROC_OTHER_DRIVERS_TEXT))
+
+define Package/lcdproc-drivers/description
+$(call Package/lcdproc/Default-description)
+
+This package contains display drivers with external dependencies:
+$(LCDPROC_OTHER_DRIVERS_TEXT)
+endef
+
+
+# not everything groks --disable-nls
+DISABLE_NLS:=
+
+CONFIGURE_ARGS += \
+ --disable-libX11 \
+ --disable-libhid \
+ --disable-libpng \
+ --disable-freetype \
+ --enable-drivers='all,!g15,!g15driver,!glcdlib,!irman,!lirc,!mdm166a,!mx5000,!svga,!xosd'
+
+# can't use -Wformat=2 because MUSL is somewhat broken
+TARGET_CFLAGS+=-Wall
+
+MAKE_FLAGS += \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDLAGS)"
+
+
+define Package/lcdproc-clients/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc $(1)/usr/bin/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc.conf $(1)/etc/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec.conf $(1)/etc/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc.conf $(1)/etc/
+ $(INSTALL_BIN) ./files/lcd* $(1)/etc/init.d/
+endef
+
+define Package/lcdproc-server/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/lib/lcdproc
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/LCDd $(1)/usr/sbin/
+ $(CP) $(foreach driver,$(LCDPROC_CORE_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
+ $(CP) -p $(PKG_BUILD_DIR)/LCDd.conf $(PKG_BUILD_DIR)/LCDd.conf.orig
+ sed -i -r \
+ -e 's!^(DriverPath=).*$$$$!\1/usr/lib/lcdproc/!' \
+ -e 's!^(Driver=)curses$$$$!\1sdeclcd!' \
+ $(PKG_BUILD_DIR)/LCDd.conf
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/LCDd.conf $(1)/etc/
+ $(INSTALL_BIN) ./files/LCDd $(1)/etc/init.d/
+endef
+
+define Package/lcdproc-drivers/install
+ $(INSTALL_DIR) $(1)/usr/lib/lcdproc
+ $(CP) $(foreach driver,$(LCDPROC_OTHER_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
+endef
+
+
+$(eval $(call BuildPackage,lcdproc-clients))
+$(eval $(call BuildPackage,lcdproc-server))
+$(eval $(call BuildPackage,lcdproc-drivers))
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=22
+USE_PROCD=1
+PROG=/usr/sbin/LCDd
+
+config_file=/etc/LCDd.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -f -c $config_file
+ procd_close_instance
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=50
+USE_PROCD=1
+PROG=/usr/bin/lcdexec
+
+config_file=/etc/lcdexec.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -f -c $config_file
+ procd_close_instance
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=50
+USE_PROCD=1
+PROG=/usr/bin/lcdproc
+
+config_file=/etc/lcdproc.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -f -c $config_file
+ procd_close_instance
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=50
+USE_PROCD=1
+PROG=/usr/bin/lcdvc
+
+config_file=/etc/lcdvc.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -f -c $config_file
+ procd_close_instance
+}
+
include $(TOPDIR)/rules.mk
PKG_NAME:=mmc-utils
-PKG_VERSION=2016-09-11-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
-PKG_SOURCE_VERSION:=2cb6695e8dec00d887bdd5309d1b57d836fcd214
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_DATE:=2017-03-20
+PKG_SOURCE_VERSION:=37c86e60c0442fef570b75cd81aeb1db4d0cbafd
+PKG_MIRROR_HASH:=fc49fce4f592ffdc2a9c8f453ea96b28eb3ece0c6303ed73462cc61fb5b63318
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ PERLSCRIPTS=vidir vipe ts combine zrun chronic
+ MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1 errno.1
+ CFLAGS?=-O2 -g -Wall
+-INSTALL_BIN?=install -s
++INSTALL_BIN?=install
+ PREFIX?=/usr
+
+ ifneq (,$(findstring CYGWIN,$(shell uname)))
--- /dev/null
+Index: mpack-1.6/unixos.c
+===================================================================
+--- mpack-1.6.orig/unixos.c
++++ mpack-1.6/unixos.c
+@@ -25,6 +25,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -39,8 +40,6 @@
+ #endif
+
+ extern int errno;
+-extern char *malloc();
+-extern char *getenv();
+
+ int overwrite_files = 0;
+ int didchat;
+Index: mpack-1.6/xmalloc.c
+===================================================================
+--- mpack-1.6.orig/xmalloc.c
++++ mpack-1.6/xmalloc.c
+@@ -24,7 +24,7 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
+-extern char *malloc(), *realloc();
++#include <stdlib.h>
+
+ char *xmalloc (int size)
+ {
PKG_NAME:=shadow
PKG_VERSION:=4.2.1
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
include $(INCLUDE_DIR)/nls.mk
SHADOW_APPLETS := \
- chage groupadd groupdel groupmod groups passwd su \
- useradd userdel usermod
+ chage chpasswd chfn chsh expiry faillog gpasswd \
+ groupadd groupdel groupmems groupmod groups \
+ lastlog login newgrp nologin passwd su \
+ useradd userdel usermod vipw
CONFIGURE_ARGS += \
--without-audit \
include $(TOPDIR)/rules.mk
PKG_NAME:=ttyd
-PKG_VERSION:=1.3.1
+PKG_VERSION:=1.3.2+git-f60398
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/tsl0922/ttyd.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=f60398fb0976d5a682f2a28c2e8f8b90ec1c4c2c
+PKG_MIRROR_HASH=687499f46471f018aadce1d71c72de8a7fdd2ea04b926d8eb9eaeb747e1f4388
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
archives
endef
+MAKE_FLAGS += \
+ LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
+
ifeq ($(BUILD_VARIANT),lib)
define Build/Compile
$(call Build/Compile/Default,lib)