include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=1.16.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.17.1
+PKG_RELEASE:=1
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
PKG_LICENSE:=GPL-3.0-or-later
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/netdata/netdata/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=94492108a6e24e8b39c011ae35ff6f50a848d816af396fdf2b44655cecd78672
+PKG_HASH:=032f9001e2b7f774989a200519feeafa3a4d9b7c9e8fb0cfa43e68a8da6ad1bf
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+++ /dev/null
---- a/collectors/python.d.plugin/python.d.plugin.in
-+++ b/collectors/python.d.plugin/python.d.plugin.in
-@@ -1,10 +1,4 @@
--#!/usr/bin/env bash
--'''':;
--if [[ "$OSTYPE" == "darwin"* ]]; then
-- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
--fi
--exec "$(command -v python || command -v python3 || command -v python2 ||
--echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
-+#!/usr/bin/python3
-
- # -*- coding: utf-8 -*-
- # Description:
+++ /dev/null
-From 893bfc98d3f33d02ce6d6a3a48fb02c964156fb5 Mon Sep 17 00:00:00 2001
-From: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com>
-Date: Wed, 14 Aug 2019 11:55:50 +0300
-Subject: [PATCH] Stop configure.ac from linking against dbengine and https
- libraries when dbengine or https are disabled
-
----
- configure.ac | 28 +++++++++++++---------------
- 1 file changed, 13 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 56e484cc2c..8dbdcaa17f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -280,9 +280,6 @@ AC_CHECK_LIB(
- [UV_LIBS="-luv"]
- )
-
--OPTIONAL_UV_CFLAGS="${UV_CFLAGS}"
--OPTIONAL_UV_LIBS="${UV_LIBS}"
--
-
- # -----------------------------------------------------------------------------
- # lz4 Extremely Fast Compression algorithm
-@@ -293,9 +290,6 @@ AC_CHECK_LIB(
- [LZ4_LIBS="-llz4"]
- )
-
--OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
--OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
--
-
- # -----------------------------------------------------------------------------
- # Judy General purpose dynamic array
-@@ -306,9 +300,6 @@ AC_CHECK_LIB(
- [JUDY_LIBS="-lJudy"]
- )
-
--OPTIONAL_JUDY_CFLAGS="${JUDY_CFLAGS}"
--OPTIONAL_JUDY_LIBS="${JUDY_LIBS}"
--
-
- # -----------------------------------------------------------------------------
- # zlib
-@@ -356,9 +347,6 @@ AC_CHECK_LIB(
- [SSL_LIBS="-lcrypto -lssl"]
- )
-
--OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
--OPTIONAL_SSL_LIBS="${SSL_LIBS}"
--
- # -----------------------------------------------------------------------------
- # JSON-C library
-
-@@ -391,6 +379,14 @@ AC_MSG_CHECKING([if netdata dbengine should be used])
- if test "${enable_dbengine}" != "no" -a "${UV_LIBS}" -a "${LZ4_LIBS}" -a "${JUDY_LIBS}" -a "${SSL_LIBS}"; then
- enable_dbengine="yes"
- AC_DEFINE([ENABLE_DBENGINE], [1], [netdata dbengine usability])
-+ OPTIONAL_UV_CFLAGS="${UV_CFLAGS}"
-+ OPTIONAL_UV_LIBS="${UV_LIBS}"
-+ OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
-+ OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
-+ OPTIONAL_JUDY_CFLAGS="${JUDY_CFLAGS}"
-+ OPTIONAL_JUDY_LIBS="${JUDY_LIBS}"
-+ OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
-+ OPTIONAL_SSL_LIBS="${SSL_LIBS}"
- else
- enable_dbengine="no"
- fi
-@@ -399,10 +395,12 @@ AM_CONDITIONAL([ENABLE_DBENGINE], [test "${enable_dbengine}" = "yes"])
-
- AC_MSG_CHECKING([if netdata https should be used])
- if test "${enable_https}" != "no" -a "${SSL_LIBS}"; then
-- enable_https="yes"
-- AC_DEFINE([ENABLE_HTTPS], [1], [netdata HTTPS usability])
-+ enable_https="yes"
-+ AC_DEFINE([ENABLE_HTTPS], [1], [netdata HTTPS usability])
-+ OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
-+ OPTIONAL_SSL_LIBS="${SSL_LIBS}"
- else
-- enable_https="no"
-+ enable_https="no"
- fi
- AC_MSG_RESULT([${enable_https}])
- AM_CONDITIONAL([ENABLE_HTTPS], [test "${enable_https}" = "yes"])
PKG_HASH:=af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:automake
PKG_INSTALL:=1
PKG_FIXUP:=libtool
PKG_BUILD_PARALLEL:=1
+PKG_CPE_ID:=cpe:/a:gnu:gcc
+
ifeq ($(PKG_VERSION),7.3.0)
PKG_HASH:=832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c
endif
PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:libtool
+
PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_HASH:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:m4
PKG_INSTALL:=1
PKG_HASH:=d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:make
PKG_INSTALL:=1
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE.txt
PKG_MAINTAINER:=Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
+PKG_CPE_ID:=cpe:/a:erlang:erlang
PKG_BUILD_DEPENDS:=erlang/host openssl
PKG_USE_MIPS16:=0
GO_VERSION_MAJOR_MINOR:=1.13
-GO_VERSION_PATCH:=
+GO_VERSION_PATCH:=1
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122
+PKG_HASH:=81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
CATEGORY:=Languages
TITLE:=A compact Java Virtual Machine
URL:=http://jamvm.sourceforge.net/
- DEPENDS:=+zlib +libpthread +librt +CONFIG_powerpc64:libffi @!arc
+ DEPENDS:=+zlib +libpthread +librt +CONFIG_powerpc64:libffi @!arc @!aarch64
endef
define Package/jamvm/description
PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat
PKG_HASH:=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3
+PKG_CPE_ID:=cpe:/a:matthewwild:luaexpat
+
include $(INCLUDE_DIR)/package.mk
define Package/luaexpat
PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:derrick_oswald:html-parser
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION)
PKG_NAME:=perl-www-curl
PKG_VERSION:=4.17
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/
PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz
--- /dev/null
+--- a/Curl.xs
++++ b/Curl.xs
+@@ -70,7 +70,7 @@
+
+
+ typedef struct {
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ struct CURLM *curlm;
+ #else
+ struct void *curlm;
+@@ -234,7 +234,7 @@
+ {
+ perl_curl_multi *self;
+ Newz(1, self, 1, perl_curl_multi);
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ self->curlm=curl_multi_init();
+ #else
+ croak("curl version too old to support curl_multi_init()");
+@@ -245,7 +245,7 @@
+ /* delete the multi */
+ static void perl_curl_multi_delete(perl_curl_multi *self)
+ {
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ if (self->curlm)
+ curl_multi_cleanup(self->curlm);
+ Safefree(self);
+@@ -1065,7 +1065,7 @@
+ WWW::Curl::Multi curlm
+ WWW::Curl::Easy curl
+ CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ curl_multi_add_handle(curlm->curlm, curl->curl);
+ #endif
+
+@@ -1074,7 +1074,7 @@
+ WWW::Curl::Multi curlm
+ WWW::Curl::Easy curl
+ CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ curl_multi_remove_handle(curlm->curlm, curl->curl);
+ #endif
+
+@@ -1149,7 +1149,7 @@
+ PREINIT:
+ int remaining;
+ CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+ while(CURLM_CALL_MULTI_PERFORM ==
+ curl_multi_perform(self->curlm, &remaining));
+ RETVAL = remaining;
PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:search.cpan:libwww-perl
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION)
PKG_LICENSE_FILES:=Copying Artistic README
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
Philip Prindeville <philipp@redfish-solutions.com>
+PKG_CPE_ID:=cpe:/a:perl:perl
# Build settings
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.2.22
+PKG_VERSION:=7.2.23
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=eb597fcf8dc0a6211a42a6346de4f63ee166829a6df6d8ed767fe14be8d1c3a3
+PKG_HASH:=74e045ec8ff26290db6a3688826dcdf43b87bc509e508e9cb76dab742804ca14
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
--with-gd=shared \
--with-jpeg-dir="$(STAGING_DIR)/usr" \
--with-png-dir="$(STAGING_DIR)/usr" \
+ --with-webp-dir="$(STAGING_DIR)/usr" \
--without-xpm-dir \
--enable-gd-native-ttf \
--disable-gd-jis-conv
$(eval $(call BuildModule,exif,EXIF))
$(eval $(call BuildModule,fileinfo,Fileinfo))
$(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl))
-$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PHP7_LIBFREETYPE:libfreetype))
+$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PACKAGE_php7-mod-gd:libwebp +PHP7_LIBFREETYPE:libfreetype))
$(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full))
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp))
$(eval $(call BuildModule,hash,Hash))
include $(TOPDIR)/rules.mk
PKG_NAME:=Flask
-PKG_VERSION:=1.0.3
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/F/Flask
-PKG_HASH:=ad7c6d841e64296b962296c2c2dabc6543752985727af86a975072dea984b6f3
+PKG_HASH:=13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_CPE_ID:=cpe:/a:palletsprojects:flask
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- TITLE:=python3-flask
- URL:=https://github.com/pallets/flask/
+ TITLE:=Flask
+ URL:=https://palletsprojects.com/p/flask/
DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \
+python3-itsdangerous +python3-jinja2 +python3 +python3-logging \
+python3-markupsafe +python3-multiprocessing +python3-setuptools \
endef
define Package/python3-flask/description
-Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
-intentions. And before you ask: It.s BSD licensed!
+ Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
+ intentions. And before you ask: It.s BSD licensed!
endef
$(eval $(call Py3Package,python3-flask))
$(eval $(call BuildPackage,python3-flask))
+$(eval $(call BuildPackage,python3-flask-src))
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pocoo:jinja2
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=Werkzeug
-PKG_VERSION:=0.15.2
+PKG_VERSION:=0.16.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/W/Werkzeug
-PKG_HASH:=0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a
+PKG_HASH:=7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_BUILD_DEPENDS:=python python3
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_LICENSE_FILES:=LICENSE.rst
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Werkzeug
URL:=https://palletsprojects.com/p/werkzeug/
- TITLE:=python3-werkzeug
DEPENDS:=+python3-light +python3-email
VARIANT:=python3
endef
define Package/python3-werkzeug/description
-Werkzeug
-
-The Python WSGI Utility Library
+ The comprehensive WSGI web application library.
endef
$(eval $(call Py3Package,python3-werkzeug))
$(eval $(call BuildPackage,python3-werkzeug))
+$(eval $(call BuildPackage,python3-werkzeug-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=django
-PKG_VERSION:=1.11.17
-PKG_RELEASE=4
+PKG_VERSION:=1.11.24
+PKG_RELEASE:=1
PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
-PKG_HASH:=a787ee66f4b4cf8ed753661cabcec603989677fa3a107fcb7f15511a44bdb483
-PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
+PKG_HASH:=215c27453f775b6b1add83a185f76c2e2ab711d17786a6704bd62eabd93f89e3
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE LICENSE.python
PKG_CPE_ID:=cpe:/a:djangoproject:django
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
-
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
PKG_NAME:=gunicorn
PKG_VERSION:=19.9.0
PKG_RELEASE=2
-PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/gunicorn/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=WSGI HTTP Server for UNIX
+ URL:=https://gunicorn.org
+endef
+
+define Package/python-gunicorn
+$(call Package/gunicorn/Default)
+ DEPENDS:=+python
+ VARIANT:=python
+endef
+
+define Package/python-gunicorn/description
+ WSGI HTTP Server for UNIX (libraries)
+endef
+
+define PyPackage/python-gunicorn/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/gunicorn/workers/_gaiohttp.py
+endef
+
+define Package/python3-gunicorn
+$(call Package/gunicorn/Default)
+ DEPENDS:=+python3
+ VARIANT:=python3
+endef
+
+define Package/python3-gunicorn/description
+$(call define Package/python-gunicorn/description)
+.
+(Variant for Python3)
+endef
+
+# Make sure that the binaries are not installed with the libraries
+# That means adding some empty Py[3]Package/gunicorn[3]/install rules
+define PyPackage/python-gunicorn/install
+ :
+endef
+
+define Py3Package/python3-gunicorn/install
+ :
+endef
define Package/gunicorn
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=WSGI HTTP Server for UNIX
- URL:=https://gunicorn.org
- DEPENDS:=+python +python-setuptools
+$(call Package/gunicorn/Default)
+ DEPENDS:=+python +python-pkg-resources +python-gunicorn
endef
define Package/gunicorn/description
- WSGI HTTP Server for UNIX
+ WSGI HTTP Server for UNIX (daemon)
+endef
+
+define Package/gunicorn/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(call PyShebang,$(1)/usr/bin/*)
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/gunicorn3
+$(call Package/gunicorn/Default)
+ DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn
endef
-define Package/gunicorn/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+define Package/gunicorn3/description
+$(call define Package/gunicorn/description)
+.
+(Variant for Python3)
+endef
+
+define Package/gunicorn3/install
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \
- $(1)/usr/bin
- # fix python exec path in scripts
- $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn*
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/gunicorn \
+ $(1)/usr/bin/gunicorn3
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \
+ $(1)/usr/bin/gunicorn3_paster
+ $(call Py3Shebang,$(1)/usr/bin/*)
endef
+$(eval $(call PyPackage,python-gunicorn))
+$(eval $(call BuildPackage,python-gunicorn))
+$(eval $(call BuildPackage,python-gunicorn-src))
$(eval $(call BuildPackage,gunicorn))
+
+$(eval $(call Py3Package,python3-gunicorn))
+$(eval $(call BuildPackage,python3-gunicorn))
+$(eval $(call BuildPackage,python3-gunicorn-src))
+$(eval $(call BuildPackage,gunicorn3))
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=HPND
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:python:pillow
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-certifi
-PKG_VERSION:=2019.6.16
+PKG_VERSION:=2019.9.11
PKG_RELEASE:=1
PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
-PKG_HASH:=945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695
+PKG_HASH:=e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-certifi-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptodome
-PKG_VERSION:=3.8.2
+PKG_VERSION:=3.9.0
PKG_RELEASE:=1
PKG_SOURCE:=pycryptodome-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodome
-PKG_HASH:=5bc40f8aa7ba8ca7f833ad2477b9d84e1bfd2630b22a46d9bbd221982f8c3ac0
+PKG_HASH:=dbeb08ad850056747aa7d5f33273b7ce0b9a77910604a1be7b7a6f2ef076213f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.rst
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+PKG_CPE_ID:=cpe:/a:pycryptodome:pycryptodome
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptodomex
-PKG_VERSION:=3.8.2
+PKG_VERSION:=3.9.0
PKG_RELEASE:=1
PKG_SOURCE:=pycryptodomex-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodomex
-PKG_HASH:=e50b15af6bbdc6b5f8bd70d818cb846b15303ffa6c371b799db561a403a21607
+PKG_HASH:=8b604f4fa1de456d6d19771b01c2823675a75a2c60e51a6b738f71fdfe865370
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
PKG_VERSION:=4.3.2
PKG_RELEASE:=1
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_CPE_ID:=cpe:/a:python:decorator
PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_CPE_ID:=cpe:/a:debian:python-dns
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION)
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=enum/LICENSE
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_CPE_ID:=cpe:/a:python:enum34
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_CPE_ID:=cpe:/a:python-gnupg_project:python-gnupg
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=LICENSES.txt
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_CPE_ID:=cpe:/a:lxml:lxml
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
mode="$5"
filespec="$6"
-SED="${SED:-sed -e}"
-
find "$src_dir" -name "*.exe" -delete
process_filespec "$src_dir" "$dst_dir" "$filespec" || {
exit 1
}
-usr_bin_dir="$dst_dir/usr/bin"
-
-if [ -d "$usr_bin_dir" ] ; then
- $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/*
-fi
-
if [ "$mode" == "sources" ] ; then
# Copy only python source files
find "$dst_dir" -not -type d -not -name "*.py" -delete
exit 0
fi
-legacy=
-[ "$ver" == "3" ] && legacy="-b"
+if [ "$ver" == "3" ] ; then
+ legacy="-b"
+fi
# default max recursion is 10
max_recursion_level=20
TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
endif
+define PyShebang
+$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python2," -i --follow-symlinks $(1)
+endef
+
define PyPackage
define Package/$(1)-src
define Package/$(1)/install
$$(call PyPackage/$(1)/install,$$(1))
- SED="$(SED)" \
$(SHELL) $(python_mk_path)python-package-install.sh "2" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)"
+ "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" && \
+ if [ -d "$$(1)/usr/bin" ]; then \
+ $(call PyShebang,$$(1)/usr/bin/*) ; \
+ fi
endef
define Package/$(1)-src/install
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_CPE_ID:=cpe:/a:pyopenssl_project:pyopenssl
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyopenssl-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyrsistent
-PKG_VERSION:=0.15.3
+PKG_VERSION:=0.15.4
PKG_RELEASE:=1
PKG_SOURCE:=pyrsistent-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyrsistent/
-PKG_HASH:=50cffebc87ca91b9d4be2dcc2e479272bcb466b5a0487b6c271f7ddea6917e14
+PKG_HASH:=34b47fa169d6006b32e99d4b3c4031f155e6e68ebcc107d6454852e8e0ee6533
PKG_BUILD_DIR:=$(BUILD_DIR)/pyrsistent-$(PKG_VERSION)
PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
-PKG_CPE_ID:=cpe:/a:python-requests:requests
-
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-sentry-sdk
-PKG_VERSION:=0.11.2
+PKG_VERSION:=0.12.2
PKG_RELEASE:=1
PKG_SOURCE:=sentry-sdk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/sentry-sdk/
-PKG_HASH:=b4edcb1296fee107439345d0f8b23432b8732b7e28407f928367d0a4a36301a9
+PKG_HASH:=2529ab6f93914d01bcd80b1b16c15a025902350ab19af2033aa5ff797c1600ad
PKG_BUILD_DIR:=$(BUILD_DIR)/sentry-sdk-$(PKG_VERSION)
PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_NAME:=python-simplejson
PKG_VERSION:=3.16.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=MIT
+PKG_CPE_ID:=cpe:/a:simplejson_project:simplejson
PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
define Package/python-simplejson
$(call Package/python-simplejson/Default)
TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
- DEPENDS:=+PACKAGE_python-simplejson:python-light
+ DEPENDS:=+PACKAGE_python-simplejson:python-light +PACKAGE_python-simplejson:python-decimal
VARIANT:=python
endef
define Package/python3-simplejson
$(call Package/python-simplejson/Default)
TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3
- DEPENDS:=+PACKAGE_python3-simplejson:python3-light
+ DEPENDS:=+PACKAGE_python3-simplejson:python3-light +PACKAGE_python3-simplejson:python3-decimal
VARIANT:=python3
endef
PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:sqlalchemy:sqlalchemy
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-urllib3
-PKG_VERSION:=1.25.3
+PKG_VERSION:=1.25.6
PKG_RELEASE:=1
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
-PKG_HASH:=dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232
+PKG_HASH:=9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-urllib3-$(PKG_VERSION)
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
+ CONFIG_PACKAGE_python-pkg-resources \
CONFIG_PACKAGE_python-setuptools CONFIG_PACKAGE_python-pip \
CONFIG_PYTHON_BLUETOOTH_SUPPORT
endef
ifdef CONFIG_PACKAGE_python-setuptools
+PYTHON_SETUPTOOLS_BUILD:=1
+endif
+
+ifdef CONFIG_PACKAGE_python-pkg-resources
+PYTHON_SETUPTOOLS_BUILD:=1
+endif
+
+ifeq ($(PYTHON_SETUPTOOLS_BUILD),1)
define Build/Compile/python-setuptools
$(HOST_PYTHON_PIP) \
--disable-pip-version-check \
--- /dev/null
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python-pkg-resources
+$(call Package/python/Default)
+ TITLE:=Python $(PYTHON_VERSION) pkg_resources module (part of etuptools)
+ VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
+ LICENSE:=MIT
+ LICENSE_FILES:=LICENSE
+# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
+ DEPENDS:=+python
+endef
+
+define PyPackage/python-pkg-resources/install
+ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
+ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+endef
+
+$(eval $(call PyBasePackage,python-pkg-resources, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
LICENSE:=MIT
LICENSE_FILES:=LICENSE
# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
- DEPENDS:=+python
+ DEPENDS:=+python +python-pkg-resources
endef
define PyPackage/python-setuptools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
$(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin
$(CP) \
- $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
include $(TOPDIR)/rules.mk
PKG_NAME:=maxminddb
-PKG_VERSION:=1.4.1
+PKG_VERSION:=1.5.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/maxminddb/
-PKG_HASH:=df1451bcd848199905ac0de4631b3d02d6a655ad28ba5e5a4ca29a23358db712
+PKG_HASH:=449a1713d37320d777d0db286286ab22890f0a176492ecf3ad8d9319108f2f79
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
PKG_LICENSE:=Apache-2.0
TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
endif
+define Py3Shebang
+$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1)
+endef
+
define Py3Package
define Package/$(1)-src
define Package/$(1)/install
$$(call Py3Package/$(1)/install,$$(1))
- SED="$(SED)" \
$(SHELL) $(python3_mk_path)python-package-install.sh "3" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)"
- endef
+ "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" && \
+ if [ -d "$$(1)/usr/bin" ]; then \
+ $(call Py3Shebang,$$(1)/usr/bin/*) ; \
+ fi
+ endef
define Package/$(1)-src/install
$$(call Package/$(1)/install,$$(1),sources)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
+ CONFIG_PACKAGE_python3-pkg-resources \
CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip \
CONFIG_PYTHON3_BLUETOOTH_SUPPORT
endef
ifdef CONFIG_PACKAGE_python3-setuptools
+PYTHON3_SETUPTOOLS_BUILD:=1
+endif
+
+ifdef CONFIG_PACKAGE_python3-pkg-resources
+PYTHON3_SETUPTOOLS_BUILD:=1
+endif
+
+ifeq ($(PYTHON3_SETUPTOOLS_BUILD),1)
define Build/Compile/python3-setuptools
$(HOST_PYTHON3_PIP) \
--disable-pip-version-check \
--- /dev/null
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-pkg-resources
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) pkg_resources module (part of setuptools)
+ VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
+ LICENSE:=MIT
+ LICENSE_FILES:=LICENSE
+# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
+ DEPENDS:=+python3
+endef
+
+define Py3Package/python3-pkg-resources/install
+ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
+ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
+endef
+
+$(eval $(call Py3BasePackage,python3-pkg-resources, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
LICENSE:=MIT
LICENSE_FILES:=LICENSE
# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
- DEPENDS:=+python3
+ DEPENDS:=+python3 +python3-pkg-resources
endef
define Py3Package/python3-setuptools/install
$(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
$(CP) \
- $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
--- /dev/null
+From 391511ccaaf0050970dfbe95bf2df1bcf6c33440 Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Wed, 17 Jul 2019 10:02:05 -0700
+Subject: [PATCH] bpo-37461: Fix infinite loop in parsing of specially crafted
+ email headers (GH-14794)
+
+* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.
+
+Some crafted email header would cause the get_parameter method to run in an
+infinite loop causing a DoS attack surface when parsing those headers. This
+patch fixes that by making sure the DQUOTE character is handled to prevent
+going into an infinite loop.
+(cherry picked from commit a4a994bd3e619cbaff97610a1cee8ffa87c672f5)
+
+Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
+---
+ Lib/email/_header_value_parser.py | 3 +++
+ Lib/test/test_email/test__header_value_parser.py | 7 +++++++
+ .../next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst | 2 ++
+ 3 files changed, 12 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
+
+--- a/Lib/email/_header_value_parser.py
++++ b/Lib/email/_header_value_parser.py
+@@ -2387,6 +2387,9 @@ def get_parameter(value):
+ while value:
+ if value[0] in WSP:
+ token, value = get_fws(value)
++ elif value[0] == '"':
++ token = ValueTerminal('"', 'DQUOTE')
++ value = value[1:]
+ else:
+ token, value = get_qcontent(value)
+ v.append(token)
+--- a/Lib/test/test_email/test__header_value_parser.py
++++ b/Lib/test/test_email/test__header_value_parser.py
+@@ -2621,6 +2621,13 @@ class Test_parse_mime_parameters(TestPar
+ # Defects are apparent missing *0*, and two 'out of sequence'.
+ [errors.InvalidHeaderDefect]*3),
+
++ # bpo-37461: Check that we don't go into an infinite loop.
++ 'extra_dquote': (
++ 'r*="\'a\'\\"',
++ ' r="\\""',
++ 'r*=\'a\'"',
++ [('r', '"')],
++ [errors.InvalidHeaderDefect]*2),
+ }
+
+ @parameterize
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
+@@ -0,0 +1,2 @@
++Fix an inifite loop when parsing specially crafted email headers. Patch by
++Abhilash Raj.
--- /dev/null
+From ea21389dda401457198fb214aa2c981a45ed9528 Mon Sep 17 00:00:00 2001
+From: Ashwin Ramaswami <aramaswamis@gmail.com>
+Date: Tue, 3 Sep 2019 09:42:53 -0700
+Subject: [PATCH] [3.7] bpo-37764: Fix infinite loop when parsing unstructured
+ email headers. (GH-15239) (GH-15654)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+…aders. (GH-15239)
+
+Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
+- a case without trailing whitespace
+- an invalid encoded word
+
+https://bugs.python.org/issue37764
+
+This fix should also be backported to 3.7 and 3.8
+
+https://bugs.python.org/issue37764
+(cherry picked from commit c5b242f87f31286ad38991bc3868cf4cfbf2b681)
+
+Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
+
+
+
+
+
+https://bugs.python.org/issue37764
+---
+ Lib/email/_header_value_parser.py | 19 ++++++++++++++---
+ .../test_email/test__header_value_parser.py | 16 ++++++++++++++
+ Lib/test/test_email/test_email.py | 21 +++++++++++++++++++
+ Misc/ACKS | 1 +
+ .../2019-08-27-01-13-05.bpo-37764.qv67PQ.rst | 1 +
+ 5 files changed, 55 insertions(+), 3 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-08-27-01-13-05.bpo-37764.qv67PQ.rst
+
+--- a/Lib/email/_header_value_parser.py
++++ b/Lib/email/_header_value_parser.py
+@@ -931,6 +931,10 @@ class EWWhiteSpaceTerminal(WhiteSpaceTer
+ return ''
+
+
++class _InvalidEwError(errors.HeaderParseError):
++ """Invalid encoded word found while parsing headers."""
++
++
+ # XXX these need to become classes and used as instances so
+ # that a program can't change them in a parse tree and screw
+ # up other parse trees. Maybe should have tests for that, too.
+@@ -1035,7 +1039,10 @@ def get_encoded_word(value):
+ raise errors.HeaderParseError(
+ "expected encoded word but found {}".format(value))
+ remstr = ''.join(remainder)
+- if len(remstr) > 1 and remstr[0] in hexdigits and remstr[1] in hexdigits:
++ if (len(remstr) > 1 and
++ remstr[0] in hexdigits and
++ remstr[1] in hexdigits and
++ tok.count('?') < 2):
+ # The ? after the CTE was followed by an encoded word escape (=XX).
+ rest, *remainder = remstr.split('?=', 1)
+ tok = tok + '?=' + rest
+@@ -1047,7 +1054,7 @@ def get_encoded_word(value):
+ try:
+ text, charset, lang, defects = _ew.decode('=?' + tok + '?=')
+ except ValueError:
+- raise errors.HeaderParseError(
++ raise _InvalidEwError(
+ "encoded word format invalid: '{}'".format(ew.cte))
+ ew.charset = charset
+ ew.lang = lang
+@@ -1097,9 +1104,12 @@ def get_unstructured(value):
+ token, value = get_fws(value)
+ unstructured.append(token)
+ continue
++ valid_ew = True
+ if value.startswith('=?'):
+ try:
+ token, value = get_encoded_word(value)
++ except _InvalidEwError:
++ valid_ew = False
+ except errors.HeaderParseError:
+ # XXX: Need to figure out how to register defects when
+ # appropriate here.
+@@ -1121,7 +1131,10 @@ def get_unstructured(value):
+ # Split in the middle of an atom if there is a rfc2047 encoded word
+ # which does not have WSP on both sides. The defect will be registered
+ # the next time through the loop.
+- if rfc2047_matcher.search(tok):
++ # This needs to only be performed when the encoded word is valid;
++ # otherwise, performing it on an invalid encoded word can cause
++ # the parser to go in an infinite loop.
++ if valid_ew and rfc2047_matcher.search(tok):
+ tok, *remainder = value.partition('=?')
+ vtext = ValueTerminal(tok, 'vtext')
+ _validate_xtext(vtext)
+--- a/Lib/test/test_email/test__header_value_parser.py
++++ b/Lib/test/test_email/test__header_value_parser.py
+@@ -383,6 +383,22 @@ class TestParser(TestParserMixin, TestEm
+ [errors.InvalidHeaderDefect],
+ '')
+
++ def test_get_unstructured_without_trailing_whitespace_hang_case(self):
++ self._test_get_x(self._get_unst,
++ '=?utf-8?q?somevalue?=aa',
++ 'somevalueaa',
++ 'somevalueaa',
++ [errors.InvalidHeaderDefect],
++ '')
++
++ def test_get_unstructured_invalid_ew(self):
++ self._test_get_x(self._get_unst,
++ '=?utf-8?q?=somevalue?=',
++ '=?utf-8?q?=somevalue?=',
++ '=?utf-8?q?=somevalue?=',
++ [],
++ '')
++
+ # get_qp_ctext
+
+ def test_get_qp_ctext_only(self):
+--- a/Lib/test/test_email/test_email.py
++++ b/Lib/test/test_email/test_email.py
+@@ -5367,6 +5367,27 @@ Content-Type: application/x-foo;
+ eq(language, 'en-us')
+ eq(s, 'My Document For You')
+
++ def test_should_not_hang_on_invalid_ew_messages(self):
++ messages = ["""From: user@host.com
++To: user@host.com
++Bad-Header:
++ =?us-ascii?Q?LCSwrV11+IB0rSbSker+M9vWR7wEDSuGqmHD89Gt=ea0nJFSaiz4vX3XMJPT4vrE?=
++ =?us-ascii?Q?xGUZeOnp0o22pLBB7CYLH74Js=wOlK6Tfru2U47qR?=
++ =?us-ascii?Q?72OfyEY2p2=2FrA9xNFyvH+fBTCmazxwzF8nGkK6D?=
++
++Hello!
++""", """From: ����� �������� <xxx@xxx>
++To: "xxx" <xxx@xxx>
++Subject: ��� ���������� ����� ����� � ��������� �� ����
++MIME-Version: 1.0
++Content-Type: text/plain; charset="windows-1251";
++Content-Transfer-Encoding: 8bit
++
++�� ����� � ���� ������ ��� ��������
++"""]
++ for m in messages:
++ with self.subTest(m=m):
++ msg = email.message_from_string(m)
+
+
+ # Tests to ensure that signed parts of an email are completely preserved, as
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -1305,6 +1305,7 @@ Burton Radons
+ Abhilash Raj
+ Shorya Raj
+ Dhushyanth Ramasamy
++Ashwin Ramaswami
+ Jeff Ramnani
+ Bayard Randel
+ Varpu Rantala
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-08-27-01-13-05.bpo-37764.qv67PQ.rst
+@@ -0,0 +1 @@
++Fixes email._header_value_parser.get_unstructured going into an infinite loop for a specific case in which the email header does not have trailing whitespace, and the case in which it contains an invalid encoded word. Patch by Ashwin Ramaswami.
+\ No newline at end of file
--- /dev/null
+From 39a0c7555530e31c6941a78da19b6a5b61170687 Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Fri, 27 Sep 2019 13:18:14 -0700
+Subject: [PATCH] bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
+
+Escape the server title of xmlrpc.server.DocXMLRPCServer
+when rendering the document page as HTML.
+(cherry picked from commit e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa)
+
+Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
+---
+ Lib/test/test_docxmlrpc.py | 16 ++++++++++++++++
+ Lib/xmlrpc/server.py | 3 ++-
+ .../2019-09-25-13-21-09.bpo-38243.1pfz24.rst | 3 +++
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+
+--- a/Lib/test/test_docxmlrpc.py
++++ b/Lib/test/test_docxmlrpc.py
+@@ -1,5 +1,6 @@
+ from xmlrpc.server import DocXMLRPCServer
+ import http.client
++import re
+ import sys
+ import threading
+ from test import support
+@@ -193,6 +194,21 @@ class DocXMLRPCHTTPGETServer(unittest.Te
+ b'method_annotation</strong></a>(x: bytes)</dt></dl>'),
+ response.read())
+
++ def test_server_title_escape(self):
++ # bpo-38243: Ensure that the server title and documentation
++ # are escaped for HTML.
++ self.serv.set_server_title('test_title<script>')
++ self.serv.set_server_documentation('test_documentation<script>')
++ self.assertEqual('test_title<script>', self.serv.server_title)
++ self.assertEqual('test_documentation<script>',
++ self.serv.server_documentation)
++
++ generated = self.serv.generate_html_documentation()
++ title = re.search(r'<title>(.+?)</title>', generated).group()
++ documentation = re.search(r'<p><tt>(.+?)</tt></p>', generated).group()
++ self.assertEqual('<title>Python: test_title<script></title>', title)
++ self.assertEqual('<p><tt>test_documentation<script></tt></p>', documentation)
++
+
+ if __name__ == '__main__':
+ unittest.main()
+--- a/Lib/xmlrpc/server.py
++++ b/Lib/xmlrpc/server.py
+@@ -108,6 +108,7 @@ from xmlrpc.client import Fault, dumps,
+ from http.server import BaseHTTPRequestHandler
+ from functools import partial
+ from inspect import signature
++import html
+ import http.server
+ import socketserver
+ import sys
+@@ -894,7 +895,7 @@ class XMLRPCDocGenerator:
+ methods
+ )
+
+- return documenter.page(self.server_title, documentation)
++ return documenter.page(html.escape(self.server_title), documentation)
+
+ class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+ """XML-RPC and documentation request handler class.
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+@@ -0,0 +1,3 @@
++Escape the server title of :class:`xmlrpc.server.DocXMLRPCServer`
++when rendering the document page as HTML.
++(Contributed by Dong-hee Na in :issue:`38243`.)
PKG_LICENSE:=TCL
PKG_LICENSE_FILES:=license.terms
PKG_MAINTAINER:=Joe Mistachkin <joe@mistachkin.com>
+PKG_CPE_ID:=cpe:/a:tcl_tk:tcl_tk
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=vala
-PKG_VERSION:=0.46.0
+PKG_VERSION:=0.46.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/vala/0.46
-PKG_HASH:=a10a3b9d60bdfe3349afd3778cd4518b1eb517b59134a70ab5ac845432220c17
+PKG_HASH:=92070393e8102da29e07b29fcb808d021600a25f8a2a69c852470ec8d97740bc
-PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
HOST_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/vala
PKG_HASH:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
+PKG_CPE_ID:=cpe:/a:apache:apr-util
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
PKG_NAME:=avro-c
PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e
PKG_MAINTAINER:=John Clark <inindev@gmail.com>
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
This package contains the Apache Avro C library.
endef
-CMAKE_OPTIONS += \
- -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/{lib,include}
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.{a,so*} $(1)/usr/lib/
-endef
-
define Package/avro-c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
--- /dev/null
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -121,9 +121,8 @@ endif(WIN32)
+
+ # Install pkg-config file
+
+-set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(VERSION ${AVRO_VERSION})
+-configure_file(avro-c.pc.in avro-c.pc)
++configure_file(avro-c.pc.in avro-c.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
+ DESTINATION lib/pkgconfig)
+
+--- a/src/avro-c.pc.in
++++ b/src/avro-c.pc.in
+@@ -1,7 +1,12 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
+ Name: avro-c
+ Description: C library for parsing Avro data
+ Version: @VERSION@
+ URL: http://avro.apache.org/
+-Libs: -L@prefix@/lib -lavro
+-Cflags: -I@prefix@/include
++Libs: -L${libdir} -lavro
++Cflags: -I${includedir}
+ Requires: @CODEC_PKG@
PKG_NAME:=boost
PKG_VERSION:=1.71.0
PKG_SOURCE_VERSION:=1_71_0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE_1_0.txt
+PKG_CPE_ID:=cpe:/a:boost:boost
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
# Invisible config dependency
config boost-context-exclude
bool
- default y if (mips64 || arc || arc700)
+ default y if (TARGET_arc700 || TARGET_archs38 || TARGET_octeon || TARGET_octeontx)
default n
config boost-coroutine-exclude
config boost-fiber-exclude
bool
- default y if (TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || mips32 || mips64 || boost-coroutine-exclude)
+ default y if (TARGET_ar7 || TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || TARGET_lantiq_ase || TARGET_rb532 || mips32 || mips64 || boost-coroutine-exclude)
default n
menu "Select Boost Options"
( cd $(HOST_BUILD_DIR) ; \
./bootstrap.sh --prefix=$(STAGING_DIR_HOSTPKG) \
- --with-libraries=atomic,chrono,date_time,filesystem,headers,thread,system ;\
+ --with-libraries=atomic,context,date_time,filesystem,headers,program_options,regex,system,thread ;\
./b2 --ignore-site-config install )
endef
PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:classpath
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_HASH:=a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b
PKG_MAINTAINER:=
PKG_LICENSE:=ISC
+PKG_CPE_ID:=cpe:/a:libconfuse_project:libconfuse
include $(INCLUDE_DIR)/package.mk
PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0
PKG_HASH:=985c3fadb9789d2815e50f4ff714511c79c2710ac27a4aaaf5c0c2662141426d
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:audiocoding:faad2
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=fbthrift
-PKG_VERSION:=2019.06.10.00
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-09-22
+PKG_SOURCE_VERSION:=2f9839604e2569120cc4876c667388da6d7342f2
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0897c66564a2742b24dd6ae77812b42987c3493944d1d5d40d4005d71deb7cb5
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=339a73610ad19070d33151127966aaf56e5df3640c238292fc74658c3075da3a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
HOST_BUILD_DEPENDS:=libmstch/host
-PKG_BUILD_DEPENDS:=fbthrift/host
+PKG_BUILD_DEPENDS:=fbthrift/host libwangle librsocket-cpp
HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/cmake.mk
define Package/fbthrift
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
- DEPENDS:=+libwangle +libfmt +librsocket-cpp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
+ URL:=https://github.com/facebook/fbthrift
+ DEPENDS:=+libfmt +libfolly
endef
define Package/fbthrift/description
- Facebook's branch of Apache Thrift, including a new C++ server.
+ Facebook's branch of Apache Thrift, including a new C++ server.
endef
CMAKE_HOST_OPTIONS += \
- -DBoost_NO_BOOST_CMAKE=ON \
- -DCMAKE_SKIP_RPATH=FALSE \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" \
-Dcompiler_only=ON
CMAKE_OPTIONS += \
- -DBoost_NO_BOOST_CMAKE=ON \
- -DBUILD_SHARED_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DCXX_STD=c++14 \
-Dlib_only=ON \
-DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
- -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/"
+ -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/" \
+ -Dpython-six_DIR=OFF
-define Package/fbthrift/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
-endef
+# This should not be necessary as it is supposed to be done above.
+# Someone broke something.
+HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
+
+# GCC9 bug
+TARGET_LDFLAGS += -fno-lto
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
$(eval $(call BuildPackage,fbthrift))
$(eval $(call HostBuild))
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,11 @@ endif(MSVC)
+ find_package(
+ Boost 1.54.0 REQUIRED #1.54.0 or greater
+ COMPONENTS
++ context
++ date_time
+ filesystem
++ program_options
++ regex
+ system
+ thread
+ )
PKG_NAME:=fbzmq
PKG_VERSION:=2019.06.10.00
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbzmq/tar.gz/v$(PKG_VERSION)?
PKG_LICENSE_FILES:=LICENSE
CMAKE_SOURCE_SUBDIR:=fbzmq
+PKG_BUILD_DEPENDS:=fbthrift
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/cmake.mk
define Package/fbzmq
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Facebook ZeroMQ wrappers.
- DEPENDS:=+fbthrift +libzmq +libsigar
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Facebook ZeroMQ wrappers.
+ URL:=https://github.com/facebook/fbzmq
+ DEPENDS:=+libfolly +libzmq +libsigar
endef
define Package/fbzmq/description
- Facebook ZeroMQ wrappers.
+ Facebook ZeroMQ wrappers.
endef
CMAKE_OPTIONS += \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTS=OFF \
- -DBUILD_SHARED_LIBS=ON \
-DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
-DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/"
TARGET_CXXFLAGS += -faligned-new
-
-define Package/fbzmq/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfbzmq.so* $(1)/usr/lib/
-endef
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
$(eval $(call BuildPackage,fbzmq))
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
+PKG_CPE_ID:=cpe:/a:gnome:glib
+
PKG_FIXUP:=autoreconf
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
PKG_NAME:=jsoncpp
PKG_VERSION:=1.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+
PKG_MAINTAINER:=
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include
- $(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
-endef
-
$(eval $(call BuildPackage,jsoncpp))
--- /dev/null
+From 63dc2f77e33e9ff559e051cd2964960b9d3e761e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 16 Sep 2019 18:38:24 -0700
+Subject: [PATCH] pkgconfig: Fix for cross compilation
+
+exec_ and prefix must be overridden in such a case.
+
+Makes the .pc file more consistent with other projects.
+---
+ pkg-config/jsoncpp.pc.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
+index dea51f51..d4fa9ef2 100644
+--- a/pkg-config/jsoncpp.pc.in
++++ b/pkg-config/jsoncpp.pc.in
+@@ -1,5 +1,7 @@
+-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: jsoncpp
+ Description: A C++ library for interacting with JSON
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=
+PKG_CPE_ID:=cpe:/a:nlnetlabs:ldns
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_HASH:=ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:audiofile:audiofile
PKG_FIXUP:=autoreconf
PKG_INSTALL=1
PKG_NAME:=libcap
PKG_VERSION:=2.27
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sys
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(SED) 's,exec_prefix=,exec_prefix=/usr,g' $(1)/usr/lib/pkgconfig/libcap.pc
+ $(SED) 's,/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcap.pc
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcap.pc
endef
define Package/libcap/install
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE.txt
+PKG_CPE_ID:=cpe:/a:apple:cups
include $(INCLUDE_DIR)/package.mk
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libexif:libexif
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libfizz
-PKG_VERSION:=2019.09.09.00
+PKG_VERSION:=2019.09.22.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c8e0317fb16b283784ef8607440d0077b4425d1a28d74ea6b083a385bcfb14f6
-PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=0ccff0813dea8d3f730d9c3a1b80e6936522d3f3
+PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=32a8de32e7a83e53ad44931ac637f6e17ce7f81bd65bc835f14d59442041e7f6
+PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:facebook:fizz
PKG_BUILD_PARALLEL:=1
CMAKE_SOURCE_SUBDIR:=fizz
endef
CMAKE_OPTIONS += \
- -DBoost_NO_BOOST_CMAKE=ON \
-DBUILD_EXAMPLES=OFF
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
include $(TOPDIR)/rules.mk
PKG_NAME:=libfolly
-PKG_VERSION:=2019.09.09.00
-PKG_RELEASE:=2
+PKG_VERSION:=2019.09.22.00
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=1aac1bb5c2e22fea68780734069ee73188523c5ede8cd210e3fa81a1ae56bfe0
-PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=af2373b9858c61685eb6eb2f1db99d9a31edd58e
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=fbf25a96e5487fcd959ff50ff1c5413c8e18b8aaa9af3d2406156d750167affd
+PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
PKG_LICENSE:=Apache-2.0
-DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT=OFF \
-DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \
-DHAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT=OFF \
- -DBUILD_SHARED_LIBS=ON \
- -DBoost_NO_BOOST_CMAKE=ON
+ -DBUILD_SHARED_LIBS=ON
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
PKG_NAME:=libftdi
PKG_VERSION:=0.20
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
PKG_HASH:=3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=LGPL-2.0
PKG_LICENSE_FILES:=COPYING.LIB
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
The library is linked with your program in userspace, no kernel driver required.
endef
-CMAKE_OPTIONS += -DBoost_NO_BOOST_CMAKE=ON
+CMAKE_OPTIONS += \
+ -DBoost_NO_BOOST_CMAKE=ON \
+ -DEXAMPLES=OFF
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc
- $(SED) \
- 's,/usr/include,$$$${prefix}/include,g' \
- $(1)/usr/lib/pkgconfig/libftdi.pc
- $(SED) \
- 's,/usr/lib,$$$${prefix}/lib,g' \
- $(1)/usr/lib/pkgconfig/libftdi.pc
+ $(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+ $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
endef
define Package/libftdi/install
PKG_NAME:=libftdi1
PKG_VERSION:=1.4
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
define Build/InstallDev
$(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
- $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
+ $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
- $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
endef
define Package/libftdi1/install
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libgd:gd_graphics_library
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
index 00000000..fb828882
--- /dev/null
+++ b/config/gdlib.pc.cmake
-@@ -0,0 +1,9 @@
-+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
-+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+@@ -0,0 +1,11 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: gd
+Description: GD graphics library
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -89,8 +89,6 @@
+ GV_LT(VERSION GDLIB_LIB_VERSION)
+ MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})")
+
+- SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include")
+-
+ include(CheckIncludeFiles)
+ include(CheckIncludeFile)
+
PKG_LICENSE:=GPL-2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:media-libs:libid3tag
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3
+PKG_CPE_ID:=cpe:/a:libidn2_project:libidn2
PKG_SOURCE_URL:=@GNU/libidn
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(TOPDIR)/rules.mk
PKG_NAME:=liblz4
-PKG_VERSION:=1.9.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=f8377c89dad5c9f266edc0be9b73595296ecafd5bfa1000de148096c50052dc4
+PKG_HASH:=658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc
PKG_BUILD_DIR:=$(BUILD_DIR)/lz4-$(PKG_VERSION)
PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:mcrypt:libmcrypt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/mcrypt
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:libmms_project:libmms
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libogg
-PKG_VERSION:=1.3.3
+PKG_VERSION:=1.3.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://downloads.xiph.org/releases/ogg/
-PKG_HASH:=4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_HASH:=c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
-
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libogg
- URL:=http://xiph.org/ogg/
+ URL:=https://xiph.org/ogg/
+ ABI_VERSION:=0
endef
define Package/libogg/description
streams into a single physical bitstream.
endef
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ogg/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/ogg/* $(1)/usr/include/ogg/
define Package/libogg/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libogg))
include $(TOPDIR)/rules.mk
PKG_NAME:=librsocket-cpp
-PKG_SOURCE_DATE:=2019-09-12
-PKG_SOURCE_VERSION:=9226988e3da89eff8cd55952ccae61fcac0881fa
+PKG_SOURCE_DATE:=2019-09-22
+PKG_SOURCE_VERSION:=b268907312af589828634c143b9f35b58cd6cfea
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rsocket/rsocket-cpp/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=3273012c1ffa149fddfac2b547315834e9a02ff0d8d1357196fec95391150ed6
+PKG_HASH:=7ab4655d3d8148ce689f74a116ae7393d9e802f91d0dfd697ffd8daeff800e61
PKG_BUILD_DIR:=$(BUILD_DIR)/rsocket-cpp-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
SECTION:=libs
CATEGORY:=Libraries
TITLE:=C++ implementation of RSocket
+ URL:=https://rsocket.io/
DEPENDS:=+libyarpl
endef
SECTION:=libs
CATEGORY:=Libraries
TITLE:=yarpl: Yet Another Reactive Programming Library
+ URL:=https://rsocket.io/
DEPENDS:=+libfolly
endef
CMAKE_OPTIONS += \
-DBUILD_BENCHMARKS=OFF \
-DBUILD_EXAMPLES=OFF \
- -DBUILD_TESTS=OFF
+ -DBUILD_TESTS=OFF \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
$(eval $(call BuildPackage,librsocket-cpp))
$(eval $(call BuildPackage,libyarpl))
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -194,6 +194,9 @@ find_package(Gflags REQUIRED)
+ # find glog::glog to satisfy the folly dep.
+ find_package(Glog REQUIRED)
+
++find_package(Boost REQUIRED COMPONENTS system thread filesystem regex context
++ date_time program_options)
++
+ include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
+
+ include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
PKG_HASH:=1ca3735249af66a1b2f762fe6e710fcc294ad7185f1cc961e5bd83f9988006e8
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
+PKG_CPE_ID:=cpe:/a:libseccomp_project:libseccomp
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libshout:libshout
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libsndfile_project:libsndfile
PKG_INSTALL:=1
PKG_NAME:=libsoxr
PKG_VERSION:=0.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=@SF/project/soxr/
PKG_SOURCE:=soxr-$(PKG_VERSION)-Source.tar.xz
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Mike Brady <mikebrady@eircom.net>
-
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:sox:sox
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=The SoX Resampler library
- URL:=http://sourceforge.net/projects/soxr/
+ URL:=https://sourceforge.net/projects/soxr/
DEPENDS:= +libpthread
endef
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/include/soxr.h $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
-endef
-
define Package/libsoxr/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
--- /dev/null
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -88,7 +88,7 @@ if (BUILD_FRAMEWORK)
+ set_target_properties (${PROJECT_NAME} PROPERTIES FRAMEWORK TRUE)
+ elseif (NOT WIN32)
+ set (TARGET_PCS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
+- configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS})
++ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS} @ONLY)
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+ endif ()
+
+@@ -112,7 +112,7 @@ if (WITH_LSR_BINDINGS)
+ set_target_properties (${LSR} PROPERTIES FRAMEWORK TRUE)
+ elseif (NOT WIN32)
+ set (TARGET_PCS "${TARGET_PCS} ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc")
+- configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc)
++ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc @ONLY)
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+ endif ()
+ endif ()
+--- a/src/soxr-lsr.pc.in
++++ b/src/soxr-lsr.pc.in
+@@ -1,5 +1,10 @@
+-Name: ${LSR}
+-Description: ${DESCRIPTION_SUMMARY} (with libsamplerate-like bindings)
+-Version: ${PROJECT_VERSION}
+-Libs: -L${LIB_INSTALL_DIR} -l${LSR}
+-Cflags: -I${INCLUDE_INSTALL_DIR}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: @LSR@
++Description: @DESCRIPTION_SUMMARY@ (with libsamplerate-like bindings)
++Version: @PROJECT_VERSION@
++Libs: -L${libdir} -l@LSR@
++Cflags: -I${includedir}
+--- a/src/soxr.pc.in
++++ b/src/soxr.pc.in
+@@ -1,5 +1,10 @@
+-Name: ${PROJECT_NAME}
+-Description: ${DESCRIPTION_SUMMARY}
+-Version: ${PROJECT_VERSION}
+-Libs: -L${LIB_INSTALL_DIR} -l${PROJECT_NAME}
+-Cflags: -I${INCLUDE_INSTALL_DIR}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: @PROJECT_NAME@
++Description: @DESCRIPTION_SUMMARY@
++Version: @PROJECT_VERSION@
++Libs: -L${libdir} -l@PROJECT_NAME@
++Cflags: -I${includedir}
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:gnu:libtasn1
#PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libudev-fbsd
-
-PKG_RELEASE:=1
-PKG_VERSION:=20171216
+PKG_SOURCE_DATE:=2017-12-16
PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=d4638099fd288a293a165304541eb9c01e828bb358a0091caa02c1327c20964b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git
+PKG_MIRROR_HASH:=dac2d960191fe970c974f022d008ef3b712ad331e2426a51debd5aa2e208f02b
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CONFLICTS:=libudev eudev udev
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
-endef
-
define Package/libudev-fbsd/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
PKG_SOURCE_URL:=@SF/pupnp
PKG_HASH:=188d3f786d92fe14191f17634d2d87847eee7d2b568a5257ea23262fec9973d6
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:portable_sdk_for_upnp_project:portable_sdk_for_upnp
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
CATEGORY:=Libraries
TITLE:=User-space Read-Copy-Update library
URL:=https://lttng.org/
- DEPENDS:=+libpthread @!arc
+ DEPENDS:=+libpthread @!TARGET_arc770 @!TARGET_archs38
endef
define Package/liburcu/description
include $(TOPDIR)/rules.mk
PKG_NAME:=libuv
-PKG_VERSION:=1.29.1
+PKG_VERSION:=1.32.0
PKG_RELEASE:=1
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
-
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=1486043da5ccaf86d451a5fe93920c5b66770b132d92b6d0a15d636346ca570c
-
+PKG_HASH:=203927683d53d1b82eee766c8ffecfa8ed0e392679c15d5ad3a23504eda0ed1f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:libuv_project:libuv
+
+CMAKE_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=out/cmake
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libuv
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Cross-platform asychronous I/O library
- URL:=https://github.com/libuv/libuv
+ URL:=https://libuv.org/
DEPENDS:=+libpthread +librt
+ ABI_VERSION:=1
endef
define Package/libuv/description
pyuv, and others.
endef
-define Build/Configure
- ( cd $(PKG_BUILD_DIR); ./autogen.sh )
- $(call Build/Configure/Default)
-endef
+CMAKE_OPTIONS += -DBUILD_TESTING=OFF
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/* \
- $(1)/usr/include/
-
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libuv.so* \
- $(1)/usr/lib/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libuv.a \
- $(1)/usr/lib/
-
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libuv.pc \
- $(1)/usr/lib/pkgconfig/
+ $(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libuv.pc
+ $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libuv.pc
endef
define Package/libuv/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libuv.so* \
- $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuv.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libuv))
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xiph.org:libvorbis
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libwangle
-PKG_VERSION:=2019.09.09.00
+PKG_VERSION:=2019.09.22.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b790ba6b975b90d7935e4ae12f84c77d6be9f9a94308a3e0b974d83cf0e01d8b
-PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=fb79e25af6d4e184587b62475fb3444643ae8867
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=e973cad492d025c93af49c245b1f77b484df09a4d70ade069648d633d5a85e0e
+PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
PKG_LICENSE:=Apache-2.0
URL:=https://github.com/facebook/wangle
endef
-CMAKE_OPTIONS += \
- -DBoost_NO_BOOST_CMAKE=ON
-
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lttng:ust
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
include $(TOPDIR)/rules.mk
PKG_NAME:=measurement-kit
-PKG_VERSION:=0.10.5
-PKG_RELEASE:=2
+PKG_VERSION:=0.10.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=8b83f04f4d3c653f93bcee5a6cc5e32e6595a3feb99526017d78099fd90d4a75
+PKG_HASH:=5ec94e522c3bc43cbf749659c18d4b13bcfbb2874db4d6b4e21b160d76dd5bd0
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE_URL:=https://web.archive.org/web/20170923042221/http://webdav.org:80/neon/
PKG_HASH:=db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
+PKG_CPE_ID:=cpe:/a:webdav:neon
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_HASH:=d9523ffcab5cd14b709fcf3cb4d04e8bc76bb8970113255f372bc74954c6074d
PKG_LICENSE:=OLDAP-2.8
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:openldap:openldap
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.16.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.23.17
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
-PKG_HASH:=4b34e92ae36fa493e0d94366c767f06d5f9951e3d8581d10fd935d738db1574d
+PKG_HASH:=5447b25d66c05f86cce5bc8856f7a074be84c186730e32c74069ca03386d7c1e
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
PKG_LICENSE:=BSD-3-Clause
+++ /dev/null
---- a/common/compat.c
-+++ b/common/compat.c
-@@ -97,8 +97,12 @@
- #include <unistd.h>
-
- #if defined (HAVE_PROGRAM_INVOCATION_SHORT_NAME) && !HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
-+#ifdef __UCLIBC__
-+extern const char *program_invocation_short_name;
-+#else
- extern char *program_invocation_short_name;
- #endif
-+#endif
-
- #if defined (HAVE___PROGNAME) && !HAVE_DECL___PROGNAME
- extern char *__progname;
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:pcre:pcre
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:pcre:pcre
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pocoproject:poco
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
+PKG_CPE_ID:=cpe:/a:postgresql:postgresql
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=\
PKG_NAME:=libprotobuf-c
PKG_VERSION:=1.3.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DEPENDS:=protobuf-c/host
HOST_BUILD_DEPENDS:=protobuf/host
+PKG_BUILD_DEPENDS:=protobuf
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build-cmake
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libprotobuf-c
TITLE:=Protocol Buffers library
internal RPC protocols and file formats.
endef
-CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
- --disable-protoc
+CMAKE_HOST_OPTIONS += \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
-endef
+CMAKE_OPTIONS += \
+ -DBUILD_SHARED_LIBS=ON
define Package/libprotobuf-c/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libprotobuf-c))
--- /dev/null
+--- a/build-cmake/CMakeLists.txt
++++ b/build-cmake/CMakeLists.txt
+@@ -1,7 +1,10 @@
+ SET(PACKAGE protobuf-c)
+ SET(PACKAGE_NAME protobuf-c)
+ SET(PACKAGE_VERSION 1.3.2)
++set(PACKAGE_URL https://github.com/protobuf-c/protobuf-c)
++set(PACKAGE_DESCRIPTION "Protocol Buffers implementation in C")
+
++include(GNUInstallDirs)
+
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
+
+@@ -137,6 +140,9 @@ IF(CMAKE_HOST_UNIX)
+ INSTALL(CODE "EXECUTE_PROCESS (COMMAND ln -sf protoc-gen-c protoc-c WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)")
+ ENDIF()
+
++CONFIGURE_FILE ("libprotobufc.pc.in" "libprotobufc.pc" @ONLY)
++INSTALL (FILES "../libprotobufc.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++
+ INCLUDE(Dart)
+
+ SET(DART_TESTING_TIMEOUT 5)
+--- /dev/null
++++ b/build-cmake/libprotobufc.pc.in
+@@ -0,0 +1,14 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: @PACKAGE_NAME@
++Version: @PACKAGE_VERSION@
++Description: @PACKAGE_DESCRIPTION@
++URL: @PACKAGE_URL@
++Requires:
++Libs: -L${libdir} -lprotobuf-c
++Libs.private:
++Cflags: -I${includedir}
PKG_NAME:=protobuf
PKG_VERSION:=3.8.0
-PKG_RELEASE:=1
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
PKG_MAINTAINER:=Ken Keys <kkeys@caida.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:google:protobuf
-PKG_BUILD_DEPENDS:=protobuf/host
+HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+CMAKE_SOURCE_SUBDIR:=cmake
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/protobuf/Default
SECTION:=libs
endef
-CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
+CMAKE_HOST_OPTIONS += \
+ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \
+ -Dprotobuf_BUILD_TESTS=OFF \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
-define Build/InstallDev
- $(INSTALL_DIR) \
- $(1)/usr/lib \
- $(1)/usr/include
+CMAKE_OPTIONS += \
+ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \
+ -Dprotobuf_BUILD_TESTS=OFF \
+ -Dprotobuf_WITH_ZLIB=ON \
+ -DBUILD_SHARED_LIBS=ON
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/* \
- $(1)/usr/include/
+TARGET_LDFLAGS += -latomic
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/* \
- $(1)/usr/lib/
+define Build/InstallDev
+ $(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf.pc
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc
endef
define Package/protobuf-lite/install
--- /dev/null
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -16,8 +16,8 @@ foreach(_library ${_protobuf_libraries})
+ $<BUILD_INTERFACE:${protobuf_source_dir}/src>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+ if (UNIX AND NOT APPLE)
+- set_property(TARGET ${_library}
+- PROPERTY INSTALL_RPATH "$ORIGIN")
++# set_property(TARGET ${_library}
++# PROPERTY INSTALL_RPATH "$ORIGIN")
+ elseif (APPLE)
+ set_property(TARGET ${_library}
+ PROPERTY INSTALL_RPATH "@loader_path")
+@@ -32,8 +32,8 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+ install(TARGETS protoc EXPORT protobuf-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+ if (UNIX AND NOT APPLE)
+- set_property(TARGET protoc
+- PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
++# set_property(TARGET protoc
++# PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
+ elseif (APPLE)
+ set_property(TARGET protoc
+ PROPERTY INSTALL_RPATH "@loader_path/../lib")
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:pivotal_software:redis
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=serdisplib
+PKG_VERSION:=2.01
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/serdisplib
+PKG_HASH:=a0a4eb6339de33f694e8eec1731bbe31789493434f747998a8788c2d0e6c324b
+PKG_LICENSE:=GPL-2.0
+PLG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS += --enable-dynloading --disable-statictools
+
+define Package/serdisplib
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=serdisplib
+ URL:=http://serdisplib.sourceforge.net/
+endef
+
+define Package/serdisplib/description
+ serdisplib started as a library to drive serial displays with
+ built-in controllers. It can optionally dynamically link with
+ libusb-compat, libgd and libpthread, some features require having
+ those packages installed as well.
+endef
+
+define Package/serdisplib-tools
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=serdisplib tools
+ URL:=http://serdisplib.sourceforge.net/
+ DEPENDS:=+serdisplib +libgd
+endef
+
+define Package/serdisplib-tools/description
+ serdisplib started as a library to drive serial displays with
+ built-in controllers. This package contains tools for serdisplib:
+ * l4m132c_tool
+ * l4m320t_tool
+ * multidisplay
+ * sdcmegtron_tool
+ * touchscreen_tool
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/serdisplib
+ $(CP) $(PKG_BUILD_DIR)/include/serdisplib/*.h $(1)/usr/include/serdisplib
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/*.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/serdisplib/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/serdisplib-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/l4m132c_tool $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/l4m320t_tool $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/multidisplay $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/sdcmegtron_tool $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/touchscreen_tool $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,serdisplib))
+$(eval $(call BuildPackage,serdisplib-tools))
--- /dev/null
+Index: serdisplib-2.01/src/Makefile.in
+===================================================================
+--- serdisplib-2.01.orig/src/Makefile.in
++++ serdisplib-2.01/src/Makefile.in
+@@ -28,7 +28,7 @@ includedir = @includedir@
+ datarootdir = @datarootdir@
+
+ CC=@CC@
+-AR=@AR@ -r
++AR=@AR@
+ LN_S=@LN_S@
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -180,7 +180,7 @@ programs: $(PROGRAMS)
+
+ $(LIB_DIR)/$(LIB_STATIC): $(LIB_OBJECTS)
+ $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
+- $(AR) $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
++ $(AR) -r -- $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
+
+ $(LIB_DIR)/$(LIB_SHARED): $(LIB_OBJECTS)
+ $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
--- /dev/null
+Index: serdisplib-2.01/src/serdisp_specific_framebuffer.c
+===================================================================
+--- serdisplib-2.01.orig/src/serdisp_specific_framebuffer.c
++++ serdisplib-2.01/src/serdisp_specific_framebuffer.c
+@@ -306,13 +306,15 @@ serdisp_t* serdisp_framebuffer_setup(con
+
+ if (fb_success) {
+ /* check if colour mode is supported */
+- if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
++ if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
+ sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel);
+ fb_success = 0;
+ }
+ }
+-
+- dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
++ if (vinfo.bits_per_pixel == 1)
++ dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
++ else
++ dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
+
+ if (fb_success) {
+ /* map framebuffer device to memory */
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_CPE_ID:=cpe:/a:xiph:speex
+
include $(INCLUDE_DIR)/package.mk
define Package/libspeex
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:vips:vips
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:bogofilter:bogofilter
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/bogofilter
PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
+PKG_CPE_ID:=cpe:/a:dovecot:dovecot
PKG_BUILD_DEPENDS:=libiconv
PKG_CONFIG_DEPENDS:= \
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.12.1
+PKG_VERSION:=1.12.2
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://bitbucket.org/mutt/mutt/downloads/ \
http://ftp.mutt.org/pub/mutt/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=01c565406ec4ffa85db90b45ece2260b25fac3646cc063bbc20a242c6ed4210c
+PKG_HASH:=bc42750ce8237742b9382f2148fc547a8d8601aa4a7cd28c55fe7ca045196882
PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=GPL
+PKG_CPE_ID:=cpe:/a:mutt:mutt
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.5.5
+PKG_VERSION_PLUGIN:=0.5.7.2
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
PKG_RELEASE:=1
PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
-PKG_HASH:=cbaa106e1c2b23824420efdd6a9f8572c64c8dccf75a3101a899b6ddb25149a5
+PKG_HASH:=d59d0c5c5225a126e5b98bf95d75e8dd368bdeeb3da2e9766dbe4fddaa9411b0
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
+PKG_CPE_ID:=cpe:/a:dovecot:pigeonhole
PKG_BUILD_DIR:=$(BUILD_DIR)/dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN)
PKG_INSTALL:=1
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=IPL-1.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:postfix:postfix
+
PKG_BUILD_DEPENDS:=POSTFIX_CDB:tinycdb
PKG_CONFIG_DEPENDS:= \
CONFIG_POSTFIX_TLS \
PKG_LICENSE:=Sendmail
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:sendmail:sendmail
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=openssl
PKG_RELEASE:=7
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:ssmtp:ssmtp
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=Copyright.txt
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+PKG_CPE_ID:=cpe:/a:graphicsmagick:graphicsmagick
PKG_BUILD_PARALLEL:=1
DISABLE_NLS:=
PKG_SOURCE_URL:=@GNOME/grilo-plugins/0.3/
PKG_HASH:=fc2f3bbc319136e53e1efb6659fa65b6af45db114b6621008f9abba64fad6820
-PKG_BUILD_DEPENDS:=glib2
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_LICENSE:=LGPLv2 GPLv2
PKG_LICENSE_FILES:=COPYING.LIB COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer:gst-plugins-base
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
PKG_LICENSE:=LGPLv2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer:good_plug-ins
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
PKG_LICENSE:=LGPLv2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer_project:gstreamer
PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
PKG_NAME:=lcdgrilo
PKG_VERSION:=0.0.12
-PKG_RELEASE:=2
-
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.flyn.org/projects/lcdgrilo
PKG_HASH:=2e5028fff7a90b1a3688c466f048e978a52d9a4da20a382546d5e5bd42e2fc6a
-PKG_BUILD_DEPENDS:=vala/host
-PKG_INSTALL:=1
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=vala/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
CATEGORY:=Multimedia
DEPENDS:=+grilo +grilo-plugins +libgee +libgstreamer1
TITLE:=lcdgrilo
- URL:=http://www.flyn.org/projects/lcdgrilo/
+ URL:=https://www.flyn.org/projects/lcdgrilo/
endef
define Package/lcdgrilo/decription
--- /dev/null
+--- a/src/lcdgrilo.vala
++++ b/src/lcdgrilo.vala
+@@ -47,7 +47,7 @@ private class LCDPlayer {
+ private int current = 0;
+ private Transitions transitions;
+ private MainLoop loop;
+- private Gee.ArrayList<Grl.Source> sources = new Gee.ArrayList<unowned Grl.Source> ();
++ private Gee.ArrayList<weak Grl.Source> sources = new Gee.ArrayList<unowned Grl.Source> ();
+ private uint watch_id = 0;
+
+ public LCDPlayer () {
+++ /dev/null
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-
-if PACKAGE_mjpg-streamer
-
-config MJPG_STREAMER_V4L2
- bool "Build input_uvc with libv4l2 (camera controls)"
- default n
- select PACKAGE_libv4l
-
-config MJPG_STREAMER_INPUT_FILE
- bool "Install input file plugin"
- default n
-
-config MJPG_STREAMER_INPUT_UVC
- bool "Install input uvc plugin"
- default y
-
-config MJPG_STREAMER_INPUT_HTTP
- bool "Install input HTTP plugin"
- default n
-
-config MJPG_STREAMER_OUTPUT_RTSP
- bool "Install output RTSP plugin"
- default n
-
-config MJPG_STREAMER_OUTPUT_UDP
- bool "Install output UDP plugin"
- default n
-
-config MJPG_STREAMER_OUTPUT_FILE
- bool "Install output file plugin"
- default n
-
-config MJPG_STREAMER_OUTPUT_HTTP
- bool "Install output HTTP plugin"
- default y
-
-config MJPG_STREAMER_WWW
- bool "Install complete Web UI files (includes cambozola)"
- default n
-
-endif
PKG_NAME:=mjpg-streamer
PKG_VERSION:=2018-10-25
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
-PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l
+PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l zmq protobuf-c/host
define Package/mjpg-streamer
SECTION:=multimedia
TITLE:=MJPG-streamer
DEPENDS:=+libpthread +libjpeg +MJPG_STREAMER_V4L2:libv4l
URL:=https://github.com/jacksonliam/mjpg-streamer
- MENU:=1
endef
-define Package/mjpg-streamer/description
+define Package/mjpg-streamer/Default/description
Streaming application for Linux-UVC compatible webcams
endef
-define Package/mjpg-streamer/config
- source "$(SOURCE)/Config.in"
+define Package/mjpg-streamer/description
+$(call Package/mjpg-streamer/Default/description)
endef
define Package/mjpg-streamer/conffiles
/etc/config/mjpg-streamer
endef
+define Package/mjpg-streamer/config
+if PACKAGE_mjpg-streamer-input-uvc
+
+config MJPG_STREAMER_V4L2
+ bool "Build input_uvc with libv4l2 (camera controls)"
+ default n
+ select PACKAGE_libv4l
+endif
+endef
+
+define Package/mjpg-streamer/Default
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE:=MJPG-streamer
+ URL:=https://github.com/jacksonliam/mjpg-streamer
+ DEPENDS:=mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-file
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (file input)
+endef
+
+define Package/mjpg-streamer-input-file/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the file input plugin.
+endef
+
+define Package/mjpg-streamer-input-uvc
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (UVC input)
+endef
+
+define Package/mjpg-streamer-input-uvc/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the UVC input plugin.
+endef
+
+define Package/mjpg-streamer-input-http
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (HTTP input)
+endef
+
+define Package/mjpg-streamer-input-http/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the http input plugin.
+endef
+
+define Package/mjpg-streamer-output-rtsp
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (RTSP output)
+endef
+
+define Package/mjpg-streamer-output-rtsp/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the RTSP output plugin.
+endef
+
+define Package/mjpg-streamer-output-udp
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (UDP output)
+endef
+
+define Package/mjpg-streamer-output-udp/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the UDP output plugin.
+endef
+
+define Package/mjpg-streamer-output-file
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (file output)
+endef
+
+define Package/mjpg-streamer-output-file/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the file output plugin.
+endef
+
+define Package/mjpg-streamer-output-http
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (HTTP output)
+endef
+
+define Package/mjpg-streamer-output-http/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the HTTP output plugin.
+endef
+
+define Package/mjpg-streamer-output-zmq
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (zmq output)
+ DEPENDS+= +libzmq +libprotobuf-c
+endef
+
+define Package/mjpg-streamer-output-zmq/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the ZeroMQ output plugin.
+endef
+
+define Package/mjpg-streamer-www
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (full www)
+ CONFLICTS:=mjpg-streamer-www-simple
+endef
+
+define Package/mjpg-streamer-www/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides full version of the web content.
+Includes cambozola applet.
+endef
+
+define Package/mjpg-streamer-www-simple
+$(call Package/mjpg-streamer/Default)
+ TITLE+= (simple www)
+endef
+
+define Package/mjpg-streamer-www-simple/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides simple version of the web content.
+endef
+
CAMBOZOLA:=cambozola-0.936.tar.gz
# Distribution URL doesn't always have the correct version
$(Build/Patch)
# Fetch latest cambozola that works with latest Java(s)
# Yes, I know this is ugly
- ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
+ ifneq ($(CONFIG_PACKAGE_mjpg-streamer-www),)
$(eval $(call Download,cambozola))
$(TAR) -xf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
-C $(PKG_BUILD_DIR)/www */dist/cambozola.jar
define Build/Configure
$(RM) $(PKG_BUILD_DIR)/plugins/input_uvc/uvcvideo.h
+$(call Build/Configure/Default)
endef
- TARGET_LDFLAGS+= -ljpeg
+TARGET_LDFLAGS+= -ljpeg
ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y)
TARGET_CFLAGS+= -DUSE_LIBV4L2
define Package/mjpg-streamer/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mjpg_streamer $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/config
$(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
$(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
- $(INSTALL_DIR) $(1)/usr/lib
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_FILE),y)
- $(CP) $(PKG_BUILD_DIR)/input_file.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
- $(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_HTTP),y)
- $(CP) $(PKG_BUILD_DIR)/input_http.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_RTSP),y)
- $(CP) $(PKG_BUILD_DIR)/output_rtsp.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_UDP),y)
- $(CP) $(PKG_BUILD_DIR)/output_udp.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
- $(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_HTTP),y)
- $(CP) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib
+endef
+
+define Package/mjpg-streamer-input-file/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_file.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-uvc/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_uvc.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-http/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_http.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-rtsp/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_rtsp.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-udp/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_udp.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-file/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_file.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-http/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_http.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-zmq/install
+ $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_zmqserver.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-www/install
$(INSTALL_DIR) $(1)/www/webcam
- ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam
- else
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/stream_simple.html $(1)/www/webcam/index.html
- endif
-endif
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/* $(1)/www/webcam
+endef
+
+define Package/mjpg-streamer-www-simple/install
+ $(INSTALL_DIR) $(1)/www/webcam
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/stream_simple.html $(1)/www/webcam/index.html
endef
$(eval $(call BuildPackage,mjpg-streamer))
+$(eval $(call BuildPackage,mjpg-streamer-input-file))
+$(eval $(call BuildPackage,mjpg-streamer-input-uvc))
+$(eval $(call BuildPackage,mjpg-streamer-input-http))
+$(eval $(call BuildPackage,mjpg-streamer-output-rtsp))
+$(eval $(call BuildPackage,mjpg-streamer-output-file))
+$(eval $(call BuildPackage,mjpg-streamer-output-http))
+$(eval $(call BuildPackage,mjpg-streamer-output-zmq))
+$(eval $(call BuildPackage,mjpg-streamer-www))
+$(eval $(call BuildPackage,mjpg-streamer-www-simple))
include $(TOPDIR)/rules.mk
PKG_NAME:=motion
-PKG_VERSION:=4.2.1
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.2
+PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lavrsen:motion
PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
-PKG_HASH:=d97ec6ae766adfd478b6f7f9cc0da5f2fe21faa9366d98664be255714c1cf81d
+PKG_HASH:=c8d40976b41da8eb9f9f7128599403a312fc26b7226bf3787d75f78cb5a6cc6e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
--without-mysql \
--without-pgsql \
--without-sqlite3 \
- --without-bktr
+ --without-bktr \
+ --without-webp
define Package/motion/install
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/
-
endef
$(eval $(call BuildPackage,motion))
include $(TOPDIR)/rules.mk
PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.9.12.1
+PKG_VERSION:=2019.9.28
PKG_RELEASE:=1
PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
-PKG_HASH:=d61dd64e81a4cc026726b25981faf8ef8453363598483d51f7dc6f6d5580a78f
+PKG_HASH:=4f4668392f9675d19bc9bd0d5d40017d2f3f43ae8be3e5b9926101d18a374f1c
PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
-# dns based ad/abuse domain blocking
+# DNS based ad/abuse domain blocking
## Description
-A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the dns server, a condition called the 'NXDOMAIN' occurred.
+A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the DNS server on your router receives DNS requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the DNS server, a condition called the 'NXDOMAIN' occurred.
## Main Features
-* support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
+* Support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
* [adaway](https://adaway.org)
- * => infrequent updates, approx. 400 entries (enabled by default)
+ * Infrequent updates, approx. 400 entries (enabled by default)
* [adguard](https://adguard.com)
- * => numerous updates on the same day, approx. 12.000 entries
+ * Numerous updates on the same day, approx. 12.000 entries
* [bitcoin](https://github.com/hoshsadiq/adblock-nocoin-list)
- * => infrequent updates, approx. 15 entries
+ * Infrequent updates, approx. 15 entries
* [blacklist]()
- * => static local blacklist, located by default in '/etc/adblock/adblock.blacklist'
+ * Static local blacklist, located by default in `/etc/adblock/adblock.blacklist`
* [disconnect](https://disconnect.me)
- * => numerous updates on the same day, approx. 6.500 entries (enabled by default)
+ * Numerous updates on the same day, approx. 6.500 entries (enabled by default)
* [dshield](http://dshield.org)
- * => daily updates, approx. 4.500 entries
+ * Daily updates, approx. 4.500 entries
* [hphosts](https://hosts-file.net)
- * => monthly updates, approx. 50.000 entries
+ * Monthly updates, approx. 50.000 entries
* [malwaredomains](http://malwaredomains.com)
- * => daily updates, approx. 16.000 entries
+ * Daily updates, approx. 16.000 entries
* [malwaredomainlist](http://www.malwaredomainlist.com)
- * => daily updates, approx. 1.500 entries
+ * Daily updates, approx. 1.500 entries
* [openphish](https://openphish.com)
- * => numerous updates on the same day, approx. 1.800 entries
+ * Numerous updates on the same day, approx. 1.800 entries
* [ransomware tracker](https://ransomwaretracker.abuse.ch)
- * => daily updates, approx. 150 entries
+ * Daily updates, approx. 150 entries
* [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
- * => regional blocklist for China, daily updates, approx. 1.600 entries
+ * Regional blocklist for China, daily updates, approx. 1.600 entries
* [reg_cz](https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list)
- * => regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries
+ * Regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries
* [reg_de](https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt)
- * => regional blocklist for Germany, daily updates, approx. 9.200 entries
+ * Regional blocklist for Germany, daily updates, approx. 9.200 entries
* [reg_id](https://easylist-downloads.adblockplus.org/abpindo+easylist.txt)
- * => regional blocklist for Indonesia, daily updates, approx. 800 entries
+ * Regional blocklist for Indonesia, daily updates, approx. 800 entries
* [reg_nl](https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt)
- * => regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
+ * Regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
* [reg_pl](http://adblocklist.org)
- * => regional blocklist for Poland, daily updates, approx. 50 entries
+ * 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
+ * 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
+ * Regional blocklist for Russia, weekly updates, approx. 2.000 entries
* [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
- * => daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
+ * Daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
* [spam404](http://www.spam404.com)
- * => infrequent updates, approx. 5.000 entries
+ * Infrequent updates, approx. 5.000 entries
* [sysctl/cameleon](http://sysctl.org/cameleon)
- * => weekly updates, approx. 21.000 entries
+ * Weekly updates, approx. 21.000 entries
* [ut_capitole](https://dsi.ut-capitole.fr/blacklists) (categories "cryptojacking" "ddos" "malware" "phishing" "warez" enabled by default)
- * => daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
+ * Daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
* [whocares](http://someonewhocares.org)
- * => weekly updates, approx. 12.000 entries
+ * Weekly updates, approx. 12.000 entries
* [winhelp](http://winhelp2002.mvps.org)
- * => infrequent updates, approx. 15.000 entries
+ * Infrequent updates, approx. 15.000 entries
* [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
- * => infrequent updates, approx. 120 entries
+ * Infrequent updates, approx. 120 entries
* [yoyo](http://pgl.yoyo.org/adservers)
- * => weekly updates, approx. 2.500 entries (enabled by default)
-* zero-conf like automatic installation & setup, usually no manual changes needed
-* simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that
-* support four different dns backends: dnsmasq, unbound, named (bind) and kresd
-* support two different dns blocking variants: 'nxdomain' (default, supported by all backends), 'null' (supported only by dnsmasq)
-* support six different download utilities: uclient-fetch, wget, curl, aria2c, wget-nossl, busybox-wget
-* fast downloads & list processing as they are handled in parallel running background jobs (see 'Download Queue')
-* provide 'http only' mode without installed ssl library for all non-SSL blocklist sources
-* support a wide range of router modes, even AP modes are supported
-* full IPv4 and IPv6 support
-* provide top level domain compression ('tld compression'), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the dns backend
-* provide a 'DNS File Reset', where the final DNS blockfile will be purged after DNS backend loading to save storage space
-* blocklist source parsing by fast & flexible regex rulesets
-* overall duplicate removal in central blocklist 'adb_list.overall'
-* additional blacklist for manual overrides, located by default in /etc/adblock/adblock.blacklist or in LuCI
-* additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist or in LuCI
-* quality checks during blocklist 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/query/status)
+ * Weekly updates, approx. 2.500 entries (enabled by default)
+* Zero-conf like automatic installation & setup, usually no manual changes needed
+* Simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that
+* Support four different DNS backends: `dnsmasq`, `unbound`, `named` (bind) and `kresd`
+* Support two different DNS blocking variants: `nxdomain` (default, supported by all backends), `null` (supported only by `dnsmasq`)
+* Support six different download utilities: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl`, `busybox-wget`
+* Fast downloads & list processing as they are handled in parallel running background jobs (see 'Download Queue')
+* Provide `http only` mode without installed SSL library for all non-SSL blocklist sources
+* Support a wide range of router modes, even AP modes are supported
+* Full IPv4 and IPv6 support
+* Provide top level domain compression (`tld compression`), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the DNS backend
+* Provide a 'DNS File Reset', where the final DNS blockfile will be purged after DNS backend loading to save storage space
+* Blocklist source parsing by fast & flexible regex rulesets
+* Overall duplicate removal in central blocklist `adb_list.overall`
+* Additional blacklist for manual overrides, located by default in `/etc/adblock/adblock.blacklist` or in LuCI
+* Additional whitelist for manual overrides, located by default in `/etc/adblock/adblock.whitelist` or in LuCI
+* Quality checks during blocklist 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/query/status`)
* procd network interface trigger support or classic time based startup
-* keep the dns cache intact after adblock processing (currently supported by unbound, named and kresd)
-* suspend & resume adblock actions temporarily without blocklist reloading
-* provide comprehensive runtime information via LuCI or via 'status' init command
-* provide a detailed DNS Query Report with dns related information about client requests, top (blocked) domains and more
-* provide a query function to quickly identify blocked (sub-)domains, e.g. for whitelisting. This function is also able to search in adblock backups and black-/whitelist, to get back the set of blocking lists sources for a certain domain
-* option to force dns requests to the local resolver
-* automatic blocklist backup & restore, these backups will be used in case of download errors and during startup
-* send notification E-Mails in case of a processing error or if the overall domain count is ≤ 0
-* add new adblock sources on your own, see example below
-* strong LuCI support for all options
+* Keep the DNS cache intact after adblock processing (currently supported by unbound, named and kresd)
+* Suspend & resume adblock actions temporarily without blocklist reloading
+* Provide comprehensive runtime information via LuCI or via `status` init command
+* Provide a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more
+* Provide a query function to quickly identify blocked (sub-)domains, e.g. for whitelisting. This function is also able to search in adblock backups and black-/whitelist, to get back the set of blocking lists sources for a certain domain
+* Option to force DNS requests to the local resolver
+* Automatic blocklist backup & restore, these backups will be used in case of download errors and during startup
+* Send notification emails in case of a processing error or if the overall domain count is ≤ 0
+* Add new adblock sources on your own, see example below
+* Strong LuCI support for all options
-## Prerequisites
+## Installation & Usage
+### Prerequisites
* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07) and with the latest 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:
- * 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 'http only' option and supports wget-nossl and uclient-fetch (without libustream-ssl) as well
- * for more configuration options see examples below
-* E-Mail notification (optional): for E-Mail notification support you need the additional 'msmtp' package
-* DNS Query Report (optional): for this detailed report you need the additional package 'tcpdump' or 'tcpdump-mini'
+* A usual setup with an enabled DNS backend at minimum - dump AP modes without a working DNS backend are _not_ supported
+* A download utility:
+ * To support all blocklist sources and in order to run the default configuration of `adblock`, a full version (with SSL support) of `wget`, `uclient-fetch` with one of the `libustream-*` SSL libraries, `aria2c` or `curl` is required
+ * The package used by default is probably `uclient-fetch` so in order to make `adblock` work with its default configuration it is needed to install one of the `libustream-*` SSL libraries. Example: `opkg install libustream-openssl`
+ * For limited devices with real memory constraints, adblock provides also a `http only` option and supports `wget-nossl` and `uclient-fetch` (without `libustream-ssl`) as well
+ * For more configuration options see examples below
+* Email notification (optional): For email notification support you need the additional `msmtp` package
+* DNS Query Report (optional): For this detailed report you need the additional package `tcpdump` or `tcpdump-mini`
-## Installation & Usage
-* install 'adblock' (_opkg install adblock_)
-* at minimum configure the appropriate dns backend ('dnsmasq' by default), the download utility and enable the adblock service in _/etc/config/adblock_
-* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend
+### Installation of the core package
+* Install `adblock` (`opkg install adblock`)
-## LuCI adblock companion package
-* it's strongly recommended to use the LuCI frontend to easily configure all powerful aspects of adblock
-* install 'luci-app-adblock' (_opkg install luci-app-adblock_)
-* the application is located in LuCI under the 'Services' menu
+### LuCI adblock companion package
+* It is strongly recommended to use the LuCI frontend to easily configure all powerful aspects of adblock
+* Install `luci-app-adblock` (`opkg install luci-app-adblock`)
+* The application is located in LuCI under the `Services` menu
-## Tweaks
-* **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 blocklist sources at once it might be helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://openwrt.org/docs/guide-user/storage/fstab) for further details
-* **coreutils sort:** To speedup adblock processing in particular with many enabled blocklist sources it's recommended to install the additional package 'coreutils-sort'
-* **add white- / blacklist entries:** add domain black- or whitelist entries to always-deny or -allow 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). You need to refresh your blocklists after changes to these static lists.
-* **download queue size:** for further download & list processing performance improvements you can raise the 'adb\_maxqueue' value, e.g. '8' or '16' should be safe
-* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
-* **change startup behaviour:** by default the startup will be triggered by the 'wan' procd interface trigger. Choose 'none' to disable automatic startups, 'timed' to use a classic timeout (default 30 sec.) or select another trigger interface
-* **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 blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
-* **add new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
+### Configuration and controlling
+* At minimum configure the appropriate DNS backend (`dnsmasq` by default), the download utility and enable the adblock service in `/etc/config/adblock`
+* Control the adblock service manually with `/etc/init.d/adblock` `start/stop/restart/reload/suspend/resume/status` or use the LuCI frontend
-## Further adblock config options
-* usually the pre-configured adblock setup works quite well and no manual overrides are needed
-* the following options apply to the 'global' config section:
- * adb\_enabled => main switch to enable/disable adblock service (default: '0', disabled)
- * adb\_dns => select the dns backend for your environment: 'dnsmasq', 'unbound', 'named' or 'kresd' (default: 'dnsmasq')
- * adb\_dnsvariant => select the blocking variant: 'nxdomain' (default, supported by all backends), 'null (IPv4)' and 'null (IPv4/IPv6)' both options are only supported by dnsmasq
- * adb\_fetchutil => name of the used download utility: 'uclient-fetch', 'wget', 'curl', 'aria2c', 'wget-nossl'. 'busybox' (default: 'uclient-fetch')
- * adb\_fetchparm => special config options for the download utility (default: not set)
- * adb\_trigger => set the startup trigger to a certain interface, to 'timed' or to 'none' (default: 'wan')
-* the following options apply to the 'extra' config section:
- * adb\_debug => enable/disable adblock debug output (default: '0', disabled)
- * adb\_nice => set the nice level of the adblock process and all sub-processes (int/default: '0', standard priority)
- * adb\_forcedns => force dns requests to local resolver (bool/default: '0', disabled)
- * adb\_maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '8')
- * adb\_dnsfilereset => the final DNS blockfile will be purged after DNS backend loading to save storage space (bool/default: 'false', disabled)
- * adb\_report => enable the background tcpdump gathering process to provide a detailed DNS Query Report (bool/default: '0', disabled)
- * adb\_repdir => target directory for dns related report files generated by tcpdump (default: '/tmp')
- * adb\_backupdir => target directory for adblock backups (default: '/tmp')
- * adb\_mail => send notification E-Mails in case of a processing errors or if the overall domain count is ≤ 0 (bool/default: '0', disabled)
- * adb\_mreceiver => receiver address for adblock notification E-Mails (default: not set)
-* the following options could be added via "Additional Field" in LuCI and apply to the 'extra' config section as well:
- * adb\_dnsdir => target directory for the generated blocklist 'adb_list.overall' (default: not set, use dns backend default)
- * adb\_blacklist => full path to the static blacklist file (default: '/etc/adblock/adblock.blacklist')
- * adb\_whitelist => full path to the static whitelist file (default: '/etc/adblock/adblock.whitelist')
- * adb\_triggerdelay => additional trigger delay in seconds before adblock processing begins (int/default: '2')
- * adb\_maxtld => disable the tld compression, if the number of blocked domains is greater than this value (int/default: '100000')
- * adb\_portlist => space separated list of fw ports which should be redirected locally (default: '53 853 5353')
- * adb\_dnsinotify => disable adblock triggered restarts and the 'DNS File Reset' for dns backends with autoload features (bool/default: 'false', disabled)
- * adb\_dnsflush => flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: '0', disabled)
- * adb\_repiface => reporting interface used by tcpdump, set to 'any' for multiple interfaces (default: 'br-lan')
- * adb\_replisten => space separated list of reporting port(s) used by tcpdump (default: '53')
- * adb\_repchunkcnt => report chunk count used by tcpdump (default: '5')
- * adb\_repchunksize => report chunk size used by tcpdump in MB (int/default: '1')
- * adb\_msender => sender address for adblock notification E-Mails (default: 'no-reply@adblock')
- * adb\_mtopic => topic for adblock notification E-Mails (default: 'adblock notification')
- * adb\_mprofile => mail profile used in 'msmtp' for adblock notification E-Mails (default: 'adb_notify')
- * adb\_mcnt => raise the minimum domain count E-Mmail notification trigger (int/default: '0')
+#### Tweaks
+* **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 blocklist sources at once it might be helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://openwrt.org/docs/guide-user/storage/fstab) for further details
+* **coreutils sort:** To speedup adblock processing in particular with many enabled blocklist sources it is recommended to install the additional package `coreutils-sort`
+* **Add white- / blacklist entries:** Add domain black- or whitelist entries to always-deny or -allow 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). You need to refresh your blocklists after changes to these static lists.
+* **Download queue size:** For further download & list processing performance improvements you can raise the `adb\_maxqueue` value, e.g. `8` or `16` should be safe
+* **Scheduled list updates:** For a scheduled call of the adblock service add an appropriate crontab entry (see example below)
+* **Change startup behaviour:** By default the startup will be triggered by the `wan` procd interface trigger. Choose `none` to disable automatic startups, `timed` to use a classic timeout (default 30 sec.) or select another trigger interface
+* **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 blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
+* **Add new list sources:** You can add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
-## Examples
-**change default dns backend to 'unbound':**
+#### Further adblock config options
+* Usually the pre-configured adblock setup works quite well and no manual overrides are needed
+* The following options apply to the `global` config section:
+ * `adb\_enabled` => Main switch to enable/disable adblock service (default: `0`, disabled)
+ * `adb\_dns` => Select the DNS backend for your environment: `dnsmasq`, `unbound`, `named` or `kresd` (default: `dnsmasq`)
+ * `adb\_dnsvariant` => Select the blocking variant: `nxdomain` (default, supported by all backends), `null (IPv4)` and `null (IPv4/IPv6)` both options are only supported by `dnsmasq`
+ * `adb\_fetchutil` => Name of the used download utility: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl` or `busybox` (default: `uclient-fetch`)
+ * `adb\_fetchparm` => Special config options for the download utility (default: not set)
+ * `adb\_trigger` => Set the startup trigger to a certain interface, to `timed` or to `none` (default: `wan`)
+* The following options apply to the `extra` config section:
+ * `adb\_debug` => Enable/disable adblock debug output (default: `0`, disabled)
+ * `adb\_nice` => Set the nice level of the adblock process and all sub-processes (int/default: `0`, standard priority)
+ * `adb\_forcedns` => Force DNS requests to local resolver (bool/default: `0`, disabled)
+ * `adb\_maxqueue` => Size of the download queue to handle downloads & list processing in parallel (int/default: `8`)
+ * `adb\_dnsfilereset` => The final DNS blockfile will be purged after DNS backend loading to save storage space (bool/default: `false`, disabled)
+ * `adb\_report` => Enable the background tcpdump gathering process to provide a detailed DNS Query Report (bool/default: `0`, disabled)
+ * `adb\_repdir` => Target directory for DNS related report files generated by tcpdump (default: `/tmp`)
+ * `adb\_backupdir` => Target directory for adblock backups (default: `/tmp`)
+ * `adb\_mail` => Send notification emails in case of a processing errors or if the overall domain count is ≤ 0 (bool/default: `0`, disabled)
+ * `adb\_mreceiver` => Receiver address for adblock notification emails (default: not set)
+* The following options could be added via "Additional Field" in LuCI and apply to the `extra` config section as well:
+ * `adb\_dnsdir` => Target directory for the generated blocklist `adb_list.overall` (default: not set, use DNS backend default)
+ * `adb\_blacklist` => Full path to the static blacklist file (default: `/etc/adblock/adblock.blacklist`)
+ * `adb\_whitelist` => Full path to the static whitelist file (default: `/etc/adblock/adblock.whitelist`)
+ * `adb\_triggerdelay` => Additional trigger delay in seconds before adblock processing begins (int/default: `2`)
+ * `adb\_maxtld` => Disable the tld compression, if the number of blocked domains is greater than this value (int/default: `100000`)
+ * `adb\_portlist` => Space separated list of fw ports which should be redirected locally (default: `53 853 5353`)
+ * `adb\_dnsinotify` => Disable adblock triggered restarts and the 'DNS File Reset' for DNS backends with autoload features (bool/default: `false`, disabled)
+ * `adb\_dnsflush` => Flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: `0`, disabled)
+ * `adb\_repiface` => Reporting interface used by tcpdump, set to `any` for multiple interfaces (default: `br-lan`)
+ * `adb\_replisten` => Space separated list of reporting port(s) used by tcpdump (default: `53`)
+ * `adb\_repchunkcnt` => Report chunk count used by tcpdump (default: `5`)
+ * `adb\_repchunksize` => Report chunk size used by tcpdump in MB (int/default: `1`)
+ * `adb\_msender` => Sender address for adblock notification emails (default: `no-reply@adblock`)
+ * `adb\_mtopic` => Topic for adblock notification emails (default: `adblock notification`)
+ * `adb\_mprofile` => Email profile used in `msmtp` for adblock notification emails (default: `adb_notify`)
+ * `adb\_mcnt` => Raise the minimum domain count email notification trigger (int/default: `0`)
-Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' where unbound can find them in its jail, no further configuration needed.
-To preserve the DNS cache after adblock processing you need to install 'unbound-control'.
-
-**change default dns backend to 'named' (bind):**
+#### Examples
+**Change default DNS backend to `unbound`:**
-Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/bind'.
-To preserve the DNS cache after adblock processing you need to install & configure 'bind-rdnc'.
-To use the blocklist please modify '/etc/bind/named.conf':
-<pre><code>
-in the 'options' namespace add:
- response-policy { zone "rpz"; };
+Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/unbound` where unbound can find them in its jail, no further configuration needed.
+To preserve the DNS cache after adblock processing you need to install `unbound-control`.
+
+**Change default DNS backend to `named` (bind):**
-and at the end of the file add:
+Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/bind`.
+To preserve the DNS cache after adblock processing you need to install & configure `bind-rdnc`.
+To use the blocklist please modify `/etc/bind/named.conf`:
+* In the `options` namespace add:
+```
+ response-policy { zone "rpz"; };
+```
+* And at the end of the file add:
+```
zone "rpz" {
type master;
file "/var/lib/bind/adb_list.overall";
allow-query { none; };
allow-transfer { none; };
};
-</code></pre>
-
-**change default dns backend to 'kresd':**
+```
+
+**Change default DNS backend to `kresd`:**
The knot-resolver (kresd) is only available on Turris Omnia devices.
-Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed.
+Adblock deposits the final blocklist `adb_list.overall` in `/etc/kresd`, no further configuration needed.
-**enable E-Mail notification via msmtp:**
+**Enable email notification via msmtp:**
-To use the email notification you have to install & configure the package 'msmtp'.
-Modify the file '/etc/msmtprc':
-<pre><code>
+To use the email notification you have to install & configure the package `msmtp`.
+Modify the file `/etc/msmtprc`:
+```
[...]
defaults
auth on
from dev.adblock@gmail.com
user dev.adblock
password xxx
-</code></pre>
-Finally enable E-Mail support and add a valid E-Mail address in LuCI.
+```
+Finally enable email support and add a valid email address in LuCI.
-**receive adblock runtime information:**
+**Receive adblock runtime information:**
-<pre><code>
+```
/etc/init.d/adblock status
::: adblock runtime information
+ adblock_status : enabled
+ backup_dir : /mnt/data/adblock
+ last_rundate : 15.08.2019 08:43:16
+ system_release : GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10720-ccb4b96b8a
-</code></pre>
+```
-**receive adblock DNS Query Report information:**
-<pre><code>
+**Receive adblock DNS Query Report information:**
+```
/etc/init.d/adblock report
:::
::: Adblock DNS-Query Report
+ 2 ::: settings-win.data.microsoft.com
+ 2 ::: nexusrules.officeapps.live.com
[...]
-</code></pre>
+```
-**cronjob for a regular block list update (/etc/crontabs/root):**
+**Cronjob for a regular block list update (`/etc/crontabs/root`):**
-<pre><code>
+```
0 06 * * * /etc/init.d/adblock reload
-</code></pre>
+```
-**blacklist entry (/etc/adblock/adblock.blacklist):**
+**Blacklist entry (`/etc/adblock/adblock.blacklist`):**
-<pre><code>
+```
ads.example.com
This entry blocks the following (sub)domains:
This entry does not block:
http://ads.example.com.ua/foo.gif
http://example.com/
-</code></pre>
+```
-**whitelist entry (/etc/adblock/adblock.whitelist):**
+**Whitelist entry (`/etc/adblock/adblock.whitelist`):**
-<pre><code>
+```
here.com
This entry removes the following (sub)domains from the blocklist:
This entry does not remove:
where.com
www.adwhere.com
-</code></pre>
+```
-**query the active blocklist, the backups and black-/whitelist for a certain (sub-)domain, e.g. for whitelisting:**
+**Query the active blocklist, the backups and black-/whitelist for a certain (sub-)domain, e.g. for whitelisting:**
The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain. For every (sub-)domain it returns the first ten relevant results.
-<pre><code>
+```
/etc/init.d/adblock query google.com
:::
::: results for domain 'google.com' in active blocklist
+ adb_list.yoyo.gz analytics.google.com
+ adb_list.yoyo.gz pagead.l.google.com
+ adb_list.yoyo.gz [...]
-</code></pre>
-
-**add a new blocklist source:**
+```
+
+**Add a new blocklist source:**
-1. the easy way ...
-example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
-Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only
-the source name, the url and the description - that's all!
-<pre><code>
+1. The easy way ...
+Example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
+Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only the source name, the url and the description - that's all!
+```
config source 'reg_ro'
option enabled '0'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
-</code></pre>
+```
-2. a bit harder ...
-To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets 'adb_src_rset' in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source.
+2. A bit harder ...
+To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets `adb_src_rset` in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source.
## Support
-Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by mail <dev@brenken.org>
+Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by email <dev@brenken.org>
Have fun!
Dirk
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:aircrack-ng:aircrack-ng
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
PKG_NAME:=apcupsd
PKG_VERSION:=3.14.14
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/apcupsd
PKG_HASH:=db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867
+PKG_CPE_ID:=cpe:/a:apc:apcupsd
PKG_BUILD_DEPENDS:=libgd
URL:=http://www.apcupsd.org/
endef
-CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt SCRIPTSHELL=/bin/sh WALL=/bin/true APCUPSD_MAIL=/bin/true
define Build/Configure
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
Hsing-Wang Liao <kuoruan@gmail.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tatsuhiro_tsujikawa:aria2
PKG_CONFIG_DEPENDS := \
CONFIG_ARIA2_NOSSL \
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:wildbit:beanstalkd
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.14.4
+PKG_VERSION:=9.14.6
PKG_RELEASE:=1
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
-PKG_LICENSE := MPL-2.0
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:isc:bind
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
https://ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_HASH:=312efb82a6889074f31ef2849af498b3ec97ca69acd5c4e5e4b4045a8fe6b83f
+PKG_HASH:=8967a040ed900e1800293b9874357fc2f267f33c723aa617268e163bd921edfe
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:bitlbee:bitlbee
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tuxfamily:chrony
PKG_BUILD_DEPENDS:=pps-tools
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:debian:cifs-utils
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=coova-chilli
PKG_VERSION:=1.4
-PKG_RELEASE:=10
+PKG_RELEASE:=11
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
#option fg
# Include this flag to include debug information.
- #option debug 9
+ #option debug 1
# Re-read configuration file at this interval. Will also cause new domain
# name lookups to be performed. Value is given in seconds.
}
config_cb() {
- local chilli_inst="$2"
- if [ "$chilli_inst" != "" ]; then
- chilli_conf="/var/run/chilli_${chilli_inst}.conf"
- if [ -e "$chilli_conf" ]; then
- rm -f "$chilli_conf"
- fi
- eval "start_chilli_$chilli_inst=1"
- fi
+ chilli_conf="/var/run/chilli_${2}.conf"
+ [ -e "$chilli_conf" ] && rm -f "$chilli_conf"
}
option_cb() {
case "$1" in
+ # ignored/internal settings
+ disabled)
+ ;;
# UCI settings
network)
. /lib/functions/network.sh
network_get_device ifname "$2"
echo "dhcpif=\"$ifname\"" >> "$chilli_conf"
;;
- disabled)
- [ "$(config_get_bool "$1")" = "1" ] && eval "start_chilli_$chilli_inst=0"
- ;;
# boolean settings
- debug|dhcpbroadcast|nodynip|vlanlocation|locationstopstart|locationcopycalled|locationimmediateupdate|locationopt82|coanoipcheck|noradallow|proxymacaccept|proxyonacct|dhcpmacset|dhcpradius|noc2c|eapolenable|uamanydns|uamanyip|uamnatanyip|nouamsuccess|nowispr1|nowispr2|domaindnslocal|radsec|macauth|macreauth|macauthdeny|macallowlocal|strictmacauth|strictdhcp|ieee8021q|only8021q|radiusoriginalurl|swapoctets|statusfilesave|wpaguests|openidauth|papalwaysok|mschapv2|chillixml|acctupdate|dnsparanoia|seskeepalive|usetap|noarpentries|framedservice|scalewin|redir|injectwispr|redirurl|routeonetone|nousergardendata|uamgardendata|uamotherdata|withunixipc|uamallowpost|redirssl|uamuissl|layer3|patricia|redirdnsreq|dhcpnotidle|ipv6|ipv6only)
+ acctupdate|chillixml|coanoipcheck|debug|dhcpbroadcast|dhcpmacset|dhcpnotidle|\
+ dhcpradius|dnsparanoia|domaindnslocal|eapolenable|fg|forgiving|framedservice|\
+ ieee8021q|injectwispr|ipv6|ipv6only|layer3|locationcopycalled|\
+ locationimmediateupdate|locationopt82|locationstopstart|macallowlocal|\
+ macauth|macauthdeny|macreauth|mmapring|mschapv2|noarpentries|noc2c|nochallenge|\
+ nodynip|noradallow|nosystemdns|nouamsuccess|nousergardendata|nowispr1|nowispr2|\
+ only8021q|openidauth|papalwaysok|patricia|postauthproxyssl|proxymacaccept|\
+ proxyonacct|radiusoriginalurl|radsec|redir|redirdnsreq|redirssl|redirurl|reload|\
+ routeonetone|scalewin|seskeepalive|statusfilesave|strictdhcp|strictmacauth|\
+ swapoctets|uamallowpost|uamanydns|uamanyip|uamauthedallowed|uamgardendata|\
+ uamnatanyip|uamotherdata|uamuissl|usetap|vlanlocation|wpaguests)
[ "$2" = "true" -o "$2" = "1" ] && echo "$1" >> "$chilli_conf"
;;
*)
start_chilli() {
local cfg="$1"
- local start_chilli=$(eval "echo \$start_chilli_$cfg")
- [ "$start_chilli" = "0" ] && return
local base="/var/run/chilli_${cfg}"
+ config_get_bool disabled "$1" 'disabled' 1
+ [ $disabled = 1 ] && return
+
procd_open_instance "$cfg"
procd_set_param command /usr/sbin/chilli
- procd_set_param file "${base}.conf"
- procd_append_param command --fg --conf "${base}.conf" --pidfile "${base}.pid" --cmdsocket "${base}.sock" --unixipc "${base}.ipc"
+ procd_set_param file "$chilli_conf"
+ procd_append_param command \
+ --fg \
+ --conf "${base}.conf" \
+ --pidfile "${base}.pid" \
+ --cmdsocket "${base}.sock" \
+ --unixipc "${base}.ipc"
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
include $(TOPDIR)/rules.mk
PKG_NAME:=cshark
-PKG_VERSION=2018-08-20-$(PKG_SOURCE_VERSION)
-PKG_RELEASE=1
+PKG_SOURCE_DATE:=2018-08-20
+PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
-PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=bc448bb4e910e771a5a8a39af7cfa09a79b59c595f15cdcae9d0103ce09be019
+PKG_MIRROR_HASH:=b09822e93d7de7f4aa9fa018c304ebc52dd3419de3dd2eff463986d3a3b8ca71
+
+PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_LICENSE:=BSD-2-Clause
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SECTION:=net
CATEGORY:=Network
TITLE:=CloudShark capture tool
- URL:=http://www.cloudshark.org/
+ URL:=https://cloudshark.io/
DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-mbedtls
- MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef
CMAKE_OPTIONS = \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DWITH_DEBUG=OFF \
+ -DWITH_DEBUG=OFF
define Package/cshark/conffiles
/etc/config/cshark
PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
PKG_LICENSE:=GPL-3
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:davfs2:davfs2
PKG_FIXUP:=gettext-version autoreconf
PKG_BUILD_PARALLEL:=1
--- /dev/null
+# Description
+
+This directory contains package files for including Dual Channel Wi-Fi (dcwifi) components in an OpenWrt build.
+
+# dcwifi Packages
+
+The dcwifi packages can be found in the menuconfig in the following locations:
+
+ * dcstad: `Network -> Routing and Redirection`
+ * dcwapd: `Network -> Routing and Redirection`
+ * libdcwproto: `Libraries -> Networking`
+ * libdcwsocket: `Libraries -> Networking`
+ * macremapper: `Kernel modules -> Network Support` (listed as `kmod-macremapper`)
+ * mrmctl: `Utilities`
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dcstad
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3b146ea22bc5480d8264c5ea269831d25993673aa90a9e82dc2dc601a111da55
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dcstad
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Dual-Channel WiFi client daemon
+ URL:=https://www.edgewaterwireless.com
+ DEPENDS:=+libdcwsocket +libdcwproto
+endef
+
+define Package/dcstad/description
+Implementation of the Dual-Channel WiFi client daemon
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections
+
+define Package/dcstad/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dcstad $(1)/bin/
+endef
+
+$(eval $(call BuildPackage,dcstad))
--- /dev/null
+--- a/src/main.c
++++ b/src/main.c
+@@ -190,7 +190,7 @@ main( int argc, char *argv[] ) {
+ rv = 1; /* failure unless proven otherwise */
+
+ /* first initialize and parse the command line */
+- bzero(&cfg, sizeof(cfg));
++ memset(&cfg, 0, sizeof(cfg));
+ parse_cmdline(&cfg, argc, argv);
+
+ dcwloginfof("%s\n", "DCW Station Daemon Starting Up...");
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dcwapd
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=750a08abccd88d9aeda942307f76ce5711181c06f9f3e8fded5cb5ce42bac323
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dcwapd
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Dual-Channel WiFi AP daemon
+ URL:=https://www.edgewaterwireless.com
+ DEPENDS:=$(CXX_DEPENDS) +kmod-macremapper +libdcwsocket +libdcwproto +mrmctl +libuci
+endef
+
+define Package/dcwapd/description
+Implementation of the Dual-Channel WiFi AP daemon
+endef
+
+CONFIGURE_ARGS += \
+ --enable-platform=linuxjsonstatic \
+ --enable-shared
+
+TARGET_CXXFLAGS += -std=c++11 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=0 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -ldcwproto -ldcwsocket -lmrmfilterparser -luci -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/dcwapd/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+
+# Utility files
+ $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
+ $(INSTALL_DATA) ./files/*.inc $(1)/etc/$(PKG_NAME)/
+ $(INSTALL_BIN) ./files/*.sh $(1)/etc/$(PKG_NAME)/
+# UCI config file copy - this is here for convenience and reference only
+ $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/$(PKG_NAME)/
+
+# UCI config file
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/config/dcwapd
+
+# Init script
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dcwapd.init.d $(1)/etc/init.d/dcwapd
+endef
+$(eval $(call BuildPackage,dcwapd))
--- /dev/null
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+# necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+verbose=1
+
+uciconfig=dcwapd
+
+result=
+
+# NOTE: all functions write the result to the $result variable
+
+get_channelsets()
+{
+ # default to empty
+ result=
+ channelsets=$(uci show $uciconfig | grep "=channel-set$")
+ for channelset in $channelsets; do
+ channelset=$(echo "$channelset" | sed -rn "s/$uciconfig\.(.*)=.*/\1/p")
+ result="$result $channelset"
+ done
+ if [ $verbose -eq 1 ]; then
+ echo "Channel Sets: $result" 2>&1 | logger
+ fi
+}
+
+# $1 : the channel set name
+get_channelset_enabled()
+{
+ # default to disabled
+ result=0
+ if [ -n "$1" ]; then
+ result=$(uci get $uciconfig."$1".enabled)
+ fi
+ if [ $verbose -eq 1 ]; then
+ echo "Channel Set \"$1\" Enabled: $result" 2>&1 | logger
+ fi
+}
+
+# $1 : the channel set name
+get_primary_bridge()
+{
+ result=
+ if [ -n "$1" ]; then
+ result=$(uci get $uciconfig."$1".bridge)
+ fi
+ if [ $verbose -eq 1 ]; then
+ echo "Channel Set \"$1\" Primary Bridge: $result" 2>&1 | logger
+ fi
+}
+
+# $1 : the channel set name
+get_datachannels()
+{
+ # default to empty
+ result=
+ if [ -n "$1" ]; then
+ result=$(uci get $uciconfig."$1".data_channels)
+ fi
+ if [ $verbose -eq 1 ]; then
+ echo "Channel Set \"$1\" Data Channels: $result" 2>&1 | logger
+ fi
+}
+
+# $1 : the wlan interface name
+get_wifi_iface_num()
+{
+ result=
+ if [ -n "$1" ];then
+ #result=$(echo "$1" | sed -n "s/wlan//p")
+ result=$(echo "$1" | sed -rn "s/wlan([0-9]*).*/\1/p")
+ fi
+}
+
+# $1 : the bridge name
+get_bridge_network_name()
+{
+ result=
+ if [ -n "$1" ];then
+ result=$(echo "$1" | sed -n "s/br-//p")
+ fi
+}
+
+# $1 : the wlan interface name
+set_iface_init_state()
+{
+ result=
+ if [ -n "$1" ]; then
+ iface=$1
+ # need to extract the "X" from wlanX
+ get_wifi_iface_num "$iface"
+ iface_num=$result
+ if [ -n "$iface_num" ]; then
+ # get the iface network
+ init_net=$(uci get wireless.@wifi-iface[$iface_num].network)
+ if [ -n "$init_net" ]; then
+ # if the iface network is a bridge, but doesn't start with "br-"
+ # I think we need to prepend it?
+ net_type=$(uci get network."$init_net".type)
+ if [ -n "$net_type" ] && [ "$net_type" = "bridge" ]; then
+ prefix_ok=$(echo "$init_net" | grep "^br-")
+ if [ -z "$prefix_ok" ]; then
+ init_net="br-$init_net"
+ fi
+ fi
+ fi
+
+ # make sure that the init_net section exists
+ init_net_section=$(uci get dcwapd.init_net)
+ if [ "$init_net_section" != "init_net" ]; then
+ # the section did not exist
+ uci set dcwapd.init_net=init_net
+ fi
+
+ # save the initial network
+ if [ $verbose -eq 1 ]; then
+ echo "Saving '$iface' initial network '$init_net'" 2>&1 | logger
+ fi
+ uci set $uciconfig.init_net."$iface"="$init_net"
+ uci commit
+
+ # save the initial network in the result variable
+ result=$init_net
+ fi
+ fi
+}
+
+# $1 : the wlan interface name
+get_iface_init_state()
+{
+ result=
+ if [ -n "$1" ];then
+ init_net=$(uci get $uciconfig.init_net."$iface")
+
+ # if the response starts with "uci: ", it was an error not the real result
+ err=$(echo "$init_net" | grep "^uci: ")
+ if [ -z "$err" ]; then
+ # no error, set the result
+ result=$init_net
+
+ if [ $verbose -eq 1 ]; then
+ echo "Got '$iface' initial network '$init_net'" 2>&1 | logger
+ fi
+ fi
+ fi
+}
+
+# $1 : the name of the data channel name to bring up
+datachannel_up()
+{
+ if [ -n "$1" ]; then
+ bridge=$(uci get $uciconfig."$1".bridge)
+ interfaces=$(uci get $uciconfig."$1".interfaces)
+ if [ $verbose -eq 1 ]; then
+ echo "Creating Data Channel Bridge: $bridge" 2>&1 | logger
+ fi
+
+ get_bridge_network_name "$bridge"
+ netname=$result
+ if [ -n "$netname" ]; then
+ uci set network."$netname"=interface
+ uci set network."$netname".type=bridge
+ uci set network."$netname".proto=static
+ uci set network."$netname".bridge_empty='1'
+ fi
+
+ # create the bridge
+ uci commit
+ /etc/init.d/network reload
+
+ for iface in $interfaces; do
+ # if iface is in a bridge, the bridge name should be stored in result
+ set_iface_init_state "$iface"
+ init_bridge=$result
+
+ # update uci with the new bridge info
+ get_wifi_iface_num "$iface"
+ iface_num=$result
+ if [ -n "$iface_num" ]; then
+ uci set wireless.@wifi-iface[$iface_num].network="$netname"
+ fi
+
+ # manually put the interface into the data bridge
+ # if iface is in a bridge, remove it before adding it to the data bridge
+ if [ -n "$init_bridge" ]; then
+ brctl delif "$init_bridge" "$iface" 2>&1 | logger
+ fi
+ brctl addif "$bridge" "$iface" 2>&1 | logger
+ done
+
+ # commit uci changes and reload the network
+ uci commit
+ /etc/init.d/network reload
+ #/etc/init.d/network restart
+ # while [ 1 ]; do
+ # ifconfig "$bridge" > /dev/null 2>&1
+ # if [ $? == 0 ]; then
+ # break;
+ # fi
+ # sleep 1
+ # done
+ fi
+}
+
+# $1 : the name of the data channel to bring down
+datachannel_down()
+{
+ if [ -n "$1" ]; then
+ bridge=$(uci get $uciconfig."$1".bridge)
+ interfaces=$(uci get $uciconfig."$1".interfaces)
+ for iface in $interfaces; do
+ if [ $verbose -eq 1 ]; then
+ echo "Deconfiguring Data Channel Interface: $iface" 2>&1 | logger
+ fi
+
+ # manually remove the interface from the data bridge
+ brctl delif "$bridge" "$iface" 2>&1 | logger
+
+ get_iface_init_state "$iface"
+ init_bridge=$result
+ if [ -n "$init_bridge" ]; then
+ # manually move the interface back to the original bridge
+ brctl addif "$init_bridge" "$iface" 2>&1 | logger
+
+ # update uci with the new bridge and interface configuration
+ get_wifi_iface_num "$iface"
+ iface_num=$result
+ get_bridge_network_name "$init_bridge"
+ netname=$result
+ if [ -n "$iface_num" ] && [ -n "$netname" ]; then
+ uci set wireless.@wifi-iface[$iface_num].network="$netname"
+ fi
+ fi
+ done
+ if [ $verbose -eq 1 ]; then
+ echo "Deconfiguring Data Channel Bridge: $bridge" 2>&1 | logger
+ fi
+
+ # delete the bridge from uci
+ get_bridge_network_name "$bridge"
+ netname=$result
+ if [ -n "$netname" ]; then
+ uci delete network."$netname"
+ fi
+
+ # commit uci changes and reload the network
+ uci commit
+ /etc/init.d/network reload
+ #`/etc/init.d/network restart`
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+# Setting the stop value makes the restart script unreliable when invoked by LuCI
+#STOP=0
+
+scriptdir=/etc/dcwapd
+
+#validate_section_dcwapd() {
+# uci_validate_section dcwapd general "${1}" \
+# 'enabled:bool:1'
+#}
+
+start() {
+# validate_section_dcwapd dcwapd
+
+ # only run the start script if the enabled uci option is set properly
+ enabled=$(uci get dcwapd.general.enabled)
+ if [ "${enabled}" = "1" ]; then
+ ${scriptdir}/start_dcwapd.sh
+ else
+ echo "dcwapd is disabled in UCI"
+ return 1
+ fi
+}
+
+stop() {
+ ${scriptdir}/stop_dcwapd.sh
+ # Add a sleep after stopping because an immediate restat will fail otherwise
+ sleep 1
+}
--- /dev/null
+######################################################
+# Copyright 2018 EWSI
+#
+# Licensed to the public under the Apache License 2.0.
+######################################################
+# Dual Channel Wi-Fi AP Daemon configuration
+
+###################
+# General Options #
+###################
+# The "enabled" option controls the run state of the Dual Channel Wi-Fi AP Daemon
+# 0 - disabled, 1 - enabled
+# The "tmpdir" option MUST be specified
+# option tmpdir '<path_of_temp_dir>'
+
+config general 'general'
+ option enabled 0
+ option tmpdir '/tmp/dcwapd'
+
+################
+# Channel Sets #
+################
+# Sections of type "channel-set" define a Dual Channel Wi-Fi primary channel,
+# along with it's associated data channels
+#
+# The "data_channels" option is a space-delimited list of "datachannel"-typed instance names
+
+config channel-set 'channelset0'
+ option enabled 0
+# option enabled 1
+ option ssid 'OpenWrt'
+ option bridge 'br-lan'
+ option data_channels 'datachannel0'
+
+#config channel-set 'channelset1'
+# option enabled 0
+# option ssid 'OpenWrt2'
+# option bridge 'br-lan'
+# option data_channels 'datachannel1'
+
+#################
+# Data Channels #
+#################
+# Sections of type "datachannel" define a Dual Channel Wi-Fi data channel,
+# along with it's associated bridge and wireless interfaces
+#
+# The "interfaces" option is a space-delimited list of wireless interface names
+
+config datachannel 'datachannel0'
+ option ssid 'DCW0'
+ option bridge 'br-dc0'
+ option interfaces 'wlan2 wlan5'
+
+#config datachannel 'datachannel1'
+# option ssid 'DCW1'
+# option bridge 'br-dc1'
+# option interfaces 'wlan4'
+
+####################
+# Init Net Options #
+####################
+# The "init_net" section MUST be specified
+# This section will be used to save and restore the state of the data interfaces
+config init_net 'init_net'
+
+###############
+# Filter Sets #
+###############
+# Sections of type "filter-set" define a Dual Channel Wi-Fi group of filters,
+# along with it's associated MAC address and filter rules
+#
+# The "TFP_Default" filter set MUST be defined, although it is not required
+# to have any associated filter rules
+# The "TFP_Default" filter mac option can have the value of '*', meaning match
+# all MAC addresses
+#
+# The "filters" option is a space-delimited list of "filter"-typed instance names
+
+config filter-set 'TFP_Default'
+ option mac '*'
+ option filters 'filter0 filter1'
+
+#config filter-set 'filterset0'
+# option mac '00:00:BE:EF:F0:0D'
+# option filters 'filter2'
+
+
+################
+# Filter Rules #
+################
+# Sections of type "filter" define a Dual Channel Wi-Fi filter,
+# along with it's associated filter parameters
+#
+# Any or all of the filter options may be set to '*' to match
+# all values
+
+config filter 'filter0'
+ option packet_size '*'
+ option source_ip '*'
+ option source_port '80'
+ option protocol 'tcp'
+ option dest_port '*'
+
+config filter 'filter1'
+ option packet_size '*'
+ option source_ip '*'
+ option source_port '443'
+ option protocol 'tcp'
+ option dest_port '*'
+
+#config filter 'filter2'
+# option packet_size '*'
+# option source_ip '*'
+# option source_port '22'
+# option protocol 'tcp'
+# option dest_port '*'
--- /dev/null
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+# necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+# Note - shellcheck cannot deal with the dynamic sourcing
+# shellcheck disable=SC1090
+# which also messes with variables defined in the sourced file
+# shellcheck disable=SC2154
+scriptdir=$(dirname -- "$(readlink -f -- "$0")")
+. "$scriptdir"/dcwapd.inc
+
+get_channelsets
+# get the list of channel sets
+channelsets=$result
+
+for channelset in $channelsets; do
+ if [ -n "$channelset" ]; then
+ get_channelset_enabled "$channelset"
+ enabled=$result
+ if [ "$enabled" = "1" ]; then
+ # the channel set is enabled
+
+ # get the list of data channels used by the channel set
+ get_datachannels "$channelset"
+ datachannels=$result
+ for datachannel in $datachannels; do
+ datachannel_up "$datachannel"
+ done
+ fi
+ fi
+done
+
+# start dcwapd, sending stdout and stderr to the system log
+dcwapd 2>&1 | logger &
--- /dev/null
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+# necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+# Note - shellcheck cannot deal with the dynamic sourcing
+# shellcheck disable=SC1090
+# which also messes with variables defined in the sourced file
+# shellcheck disable=SC2154
+scriptdir=$(dirname -- "$(readlink -f -- "$0")")
+. "$scriptdir"/dcwapd.inc
+
+pid=$(pidof dcwapd)
+if [ -n "$pid" ]; then
+ if [ "$verbose" -eq "1" ]; then
+ echo "Stopping dcwapd..." 2>&1 | logger
+ fi
+ kill "$pid"
+fi
+
+get_channelsets
+# get the list of channel sets
+channelsets=$result
+
+for channelset in $channelsets; do
+ if [ -n "$channelset" ]; then
+# we don't care if it is enabled, tear it down
+# get_channelset_enabled $channelset
+# enabled=$result
+# if [ $enabled = "1" ]; then
+# # the channel set is enabled
+
+ # get the list of data channels used by the channel set
+ get_datachannels "$channelset"
+ datachannels=$result
+ for datachannel in $datachannels; do
+ datachannel_down "$datachannel"
+ done
+# fi
+ fi
+done
--- /dev/null
+--- a/dev/null
++++ b/dcwlinux/uci_configuration_provider.h
+@@ -0,0 +1,104 @@
++#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#define UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++
++#include "./ap_configuration.h"
++
++namespace dcwlinux {
++
++class UciConfigurationProvider : public APConfigurationProvider {
++
++ static const char *SECTION_TYPE_GENERAL;
++ static const char *SECTION_TYPE_CHANNEL_SET;
++ static const char *SECTION_TYPE_DATA_CHANNEL;
++ static const char *SECTION_TYPE_FILTER_SET;
++ static const char *SECTION_TYPE_FILTER;
++ static const char *DEFAULT_FILTER_SET_NAME;
++
++ static const char *OPTION_TMPDIR;
++ static const char *OPTION_ENABLED;
++ static const char *OPTION_SSID;
++ static const char *OPTION_BRIDGE;
++ static const char *OPTION_DATA_CHANNELS;
++ static const char *OPTION_INTERFACES;
++ static const char *OPTION_MAC_ADDRESS;
++ static const char *OPTION_FILTERS;
++ static const char *OPTION_PACKET_SIZE;
++ static const char *OPTION_SOURCE_IP;
++ static const char *OPTION_SOURCE_PORT;
++ static const char *OPTION_PROTOCOL;
++ static const char *OPTION_DEST_PORT;
++
++ static const char *FILTER_FILE_EXTENSION;
++
++ UciConfigurationProvider(const UciConfigurationProvider&); //no copy
++
++ typedef std::map<std::string, std::string> DataChannelBridgeMap;
++ struct PrimaryChannel {
++ std::string bridgeName;
++ DataChannelBridgeMap dataChannels;
++ };
++ typedef std::map<std::string, PrimaryChannel> PrimaryChannelMap;
++ typedef std::map<dcw::MacAddress, std::string> StationFilterMap;
++
++ struct uci_context *_uciContext;
++ struct uci_package *_uciPackage;
++ const char *_uciConfig;
++
++ std::string _filterDirectory;
++ PrimaryChannelMap _primaryChannels;
++ StationFilterMap _stationFilters;
++
++public:
++ UciConfigurationProvider(const char * const uciConfig); // the "config" part of UCI commands
++ virtual ~UciConfigurationProvider();
++
++ virtual void InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const;
++ virtual void GetPrimarySsids(SsidSet& output) const;
++ virtual void GetDataSsids(SsidSet& output, const char * const primarySsid) const;
++ virtual const char *GetSsidIfname(const char * const ssid) const;
++ virtual void GetStationTrafficFilterProfiles(StationTFPMap& output) const;
++};
++
++}; //namespace dcwlinux {
++
++#endif //#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#define UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++
++#include "./ap_configuration.h"
++
++namespace dcwlinux {
++
++class UciConfigurationProvider : public APConfigurationProvider {
++ UciConfigurationProvider(const UciConfigurationProvider&); //no copy
++
++ typedef std::map<std::string, std::string> DataChannelBridgeMap;
++ struct PrimaryChannel {
++ std::string bridgeName;
++ DataChannelBridgeMap dataChannels;
++ };
++ typedef std::map<std::string, PrimaryChannel> PrimaryChannelMap;
++ typedef std::map<dcw::MacAddress, std::string> StationFilterMap;
++
++ struct uci_context *_uciContext;
++ struct uci_package *_uciPackage;
++ const char *_uciConfig;
++
++ PrimaryChannelMap _primaryChannels;
++ StationFilterMap _stationFilters;
++ CFTFPList _defaultFilters;
++
++public:
++ UciConfigurationProvider(const char * const uciConfig); // the "config" part of UCI commands
++ virtual ~UciConfigurationProvider();
++
++ virtual void InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const;
++ virtual void GetPrimarySsids(SsidSet& output) const;
++ virtual void GetDataSsids(SsidSet& output, const char * const primarySsid) const;
++ virtual const char *GetSsidIfname(const char * const ssid) const;
++ virtual void GetStationTrafficFilterProfiles(StationTFPMap& output) const;
++};
++
++}; //namespace dcwlinux {
++
++#endif //#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
+--- a/dev/null
++++ b/dcwlinux/uci_configuration_provider.cxx
+@@ -0,0 +1,365 @@
++
++#include <uci.h>
++#include <string.h>
++
++#include <stdlib.h>
++#include <stdexcept>
++#include <sys/stat.h>
++#include <cerrno>
++#include <iostream>
++#include <fstream>
++
++#include "./uci_configuration_provider.h"
++
++#include "dcwposix/filterdirscanner.h"
++#include "dcw/macaddress.h"
++#include "dcw/dcwlog.h"
++
++using namespace dcwlinux;
++
++ const char *UciConfigurationProvider::SECTION_TYPE_GENERAL = "general";
++ const char *UciConfigurationProvider::SECTION_TYPE_CHANNEL_SET = "channel-set";
++ const char *UciConfigurationProvider::SECTION_TYPE_DATA_CHANNEL = "datachannel";
++ const char *UciConfigurationProvider::SECTION_TYPE_FILTER_SET = "filter-set";
++ const char *UciConfigurationProvider::SECTION_TYPE_FILTER = "filter";
++ const char *UciConfigurationProvider::DEFAULT_FILTER_SET_NAME = "TFP_Default";
++
++ const char *UciConfigurationProvider::OPTION_TMPDIR = "tmpdir";
++ const char *UciConfigurationProvider::OPTION_ENABLED = "enabled";
++ const char *UciConfigurationProvider::OPTION_SSID = "ssid";
++ const char *UciConfigurationProvider::OPTION_BRIDGE = "bridge";
++ const char *UciConfigurationProvider::OPTION_DATA_CHANNELS = "data_channels";
++ const char *UciConfigurationProvider::OPTION_INTERFACES = "interfaces";
++ const char *UciConfigurationProvider::OPTION_MAC_ADDRESS = "mac";
++ const char *UciConfigurationProvider::OPTION_FILTERS = "filters";
++ const char *UciConfigurationProvider::OPTION_PACKET_SIZE = "packet_size";
++ const char *UciConfigurationProvider::OPTION_SOURCE_IP = "source_ip";
++ const char *UciConfigurationProvider::OPTION_SOURCE_PORT = "source_port";
++ const char *UciConfigurationProvider::OPTION_PROTOCOL = "protocol";
++ const char *UciConfigurationProvider::OPTION_DEST_PORT = "dest_port";
++
++ const char *UciConfigurationProvider::FILTER_FILE_EXTENSION = ".tfp";
++
++ UciConfigurationProvider::UciConfigurationProvider(const char * const uciConfig) : _uciConfig(uciConfig) {
++
++ //printf("*** Start UciConfigurationProvider(%s)\n", _uciConfig);
++ //printf("*** About to uci_alloc_context()\n");
++
++ _uciContext = uci_alloc_context();
++
++ //printf("*** uci_alloc_context() complete\n");
++ //printf("*** About to uci_load()\n");
++
++ if (_uciContext == NULL)
++ {
++ std::string err = "Error creating UCI context ";
++ throw std::runtime_error(err);
++ }
++
++ uci_load(_uciContext, _uciConfig, &_uciPackage);
++
++ //printf("*** uci_load complete()\n");
++
++ if (_uciPackage == NULL)
++ {
++ std::string err = "Error loading UCI package " + std::string(_uciConfig);
++ throw std::runtime_error(err);
++ }
++
++ uci_section *generalSection = uci_lookup_section(_uciContext, _uciPackage, UciConfigurationProvider::SECTION_TYPE_GENERAL);
++ if (generalSection == NULL)
++ {
++ std::string err = "Error: A general section (" + std::string(UciConfigurationProvider::SECTION_TYPE_GENERAL) + ") must be specified!";
++ throw std::runtime_error(err);
++ }
++
++ uci_option *opt_tmpdir = uci_lookup_option(_uciContext, generalSection, UciConfigurationProvider::OPTION_TMPDIR);
++ if (opt_tmpdir == NULL)
++ {
++ std::string err = "Error: A temporary directory (" + std::string(UciConfigurationProvider::OPTION_TMPDIR) + ") must be specified!";
++ throw std::runtime_error(err);
++ }
++ char *tmpdir = opt_tmpdir->v.string;
++ //printf(" *** Set tmpdir: %s\n", tmpdir);
++
++ // make sure that tmpdir exists
++ int status = mkdir(tmpdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
++ if ((status != 0) && // failure
++ (errno != EEXIST)) // the failure was not that the directory already existed
++ {
++ std::string err = "Error: Unable to create the temporary directory (tmpdir), error # " + errno;
++ throw std::runtime_error(err);
++ }
++ _filterDirectory = std::string(tmpdir);
++
++ if (uci_lookup_section(_uciContext, _uciPackage, UciConfigurationProvider::DEFAULT_FILTER_SET_NAME) == NULL)
++ {
++ std::string err = "Error: A default traffic filter profile named " + std::string(UciConfigurationProvider::DEFAULT_FILTER_SET_NAME) + " MUST exist!";
++ throw std::runtime_error(err);
++ }
++
++ // iterate over all of the sections in the package
++ uci_element *elem;
++ uci_foreach_element(&_uciPackage->sections, elem)
++ {
++ //printf("--==-- element.type: %d\n", elem->type);
++ //printf("--==-- element.name: %s\n", elem->name);
++
++ if (elem->type == UCI_TYPE_SECTION)
++ {
++ // look up the section and get it's type
++
++ uci_section *section = NULL;
++ //printf("*** Looking up section: %s\n", elem->name);
++
++ section = uci_lookup_section(_uciContext, _uciPackage, elem->name);
++
++ if ((section != NULL) && (section->type != NULL))
++ {
++ //printf(" *** Section type: %s\n", section->type);
++ if (strcmp(elem->name, UciConfigurationProvider::SECTION_TYPE_GENERAL) == 0)
++ {
++ // we already processed the general section for the tmpdir
++ }
++ else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_CHANNEL_SET) == 0)
++ {
++ // the section is a channel set, populate it with the specified values
++
++ uci_option *enabled = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_ENABLED);
++ if ((enabled == NULL) || (strcmp(enabled->v.string, "1") != 0))
++ {
++ // found a disabled channel set, ignore it
++ continue;
++ }
++
++ uci_option *ssid = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_SSID);
++ uci_option *bridge = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_BRIDGE);
++ uci_option *dataChannels = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_DATA_CHANNELS);
++
++ if ((ssid != NULL) && (bridge != NULL) && (dataChannels != NULL))
++ {
++ PrimaryChannel &pc = _primaryChannels[ssid->v.string];
++ pc.bridgeName = bridge->v.string;
++
++ char dataChannels_list[255];
++ // The dataChannels option is not a list
++ //if (dataChannels->type == UCI_TYPE_LIST)
++ if (dataChannels->v.string != NULL)
++ {
++ strcpy(dataChannels_list, dataChannels->v.string);
++ std::string str_dataChannels = dataChannels->v.string;
++ size_t start_pos = 0;
++ size_t pos = 0;
++ while(start_pos != std::string::npos)
++ {
++ pos = str_dataChannels.find(" ", start_pos);
++ //printf("****** start_pos: %u, pos: %u\n", start_pos, pos);
++ std::string str_dataChannel = str_dataChannels.substr(start_pos,
++ pos == std::string::npos ? pos : pos-start_pos);
++ //printf("*** dataChannel: %s\n", str_dataChannel.c_str());
++
++ // update the start position for next loop
++ start_pos = (pos == std::string::npos ? pos : pos+1);
++
++ uci_section *dcSection = uci_lookup_section(_uciContext, _uciPackage, str_dataChannel.c_str());
++ if (dcSection != NULL)
++ {
++ uci_option *dcSsid = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_SSID);
++ uci_option *dcBridge = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_BRIDGE);
++
++ // TODO: configure dcBridge and dcInterfaces
++ //uci_option *dcInterfaces = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_INTERFACES);
++
++ if ((dcSsid != NULL) && (dcBridge != NULL))
++ {
++ pc.dataChannels[dcSsid->v.string];
++ pc.dataChannels[dcSsid->v.string] = dcBridge->v.string;
++ }
++ }
++ }
++ }
++
++ //printf("Section: %s, SSID: %s, Bridge: %s, Data Channels: %s\n", section->e.name, ssid->v.string, bridge->v.string, dataChannels_list);
++ }
++ }
++ else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_DATA_CHANNEL) == 0)
++ {
++ // data channels are processed by the channel set
++ }
++ else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_FILTER_SET) == 0)
++ {
++ // the section is a filter set, populate it with the specified values
++ //printf("*** filter set: %s\n", elem->name);
++
++ // create a tfp file for the sectionName
++ std::ofstream tfpFile;
++ std::string tfpFilePath =
++ tmpdir + std::string("/") +
++ std::string(elem->name) +
++ std::string(UciConfigurationProvider::FILTER_FILE_EXTENSION);
++ tfpFile.open(tfpFilePath.c_str(), std::ios::out | std::ios::trunc);
++ if (!tfpFile.is_open())
++ {
++ std::string err = "Error: Unable to open the filter file: " + tfpFilePath;
++ throw std::runtime_error(err);
++ }
++
++ const char *filterDelimiter = "\n";
++ char sFilterContents[2048];
++ sFilterContents[0] = '\0';
++
++ uci_option *filters = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_FILTERS);
++ // The filters option is not a list
++ //if ((filters != NULL) && (filters->type == UCI_TYPE_LIST))
++ if (filters != NULL)
++ {
++ //printf("*** %s.filters is a list.\n", elem->name);
++ //struct uci_element *e;
++ //uci_foreach_element(&filters->v.list, e)
++
++ std::string str_filters = filters->v.string;
++ //printf("*** STR_FILTERS: %s\n", str_filters.c_str());
++ size_t start_pos = 0;
++ size_t pos = 0;
++ while(start_pos != std::string::npos)
++ {
++ pos = str_filters.find(" ", start_pos);
++ //printf("****** start_pos: %u, pos: %u\n", start_pos, pos);
++ std::string str_filter = str_filters.substr(start_pos,
++ pos == std::string::npos ? pos : pos-start_pos);
++ //printf("*** Looking for filter section named: %s ...\n", str_filter.c_str());
++
++ // update the start position for next loop
++ start_pos = (pos == std::string::npos ? pos : pos+1);
++
++ uci_section *fSection = uci_lookup_section(_uciContext, _uciPackage, str_filter.c_str());
++ if (fSection != NULL)
++ {
++ uci_option *fPacketSize = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_PACKET_SIZE);
++ uci_option *fSourceIp = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_SOURCE_IP);
++ uci_option *fSourcePort = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_SOURCE_PORT);
++ uci_option *fProtocol = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_PROTOCOL);
++ uci_option *fDestPort = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_DEST_PORT);
++
++ if ((fPacketSize != NULL) &&
++ (fSourceIp != NULL) &&
++ (fSourcePort != NULL) &&
++ (fProtocol != NULL) &&
++ (fDestPort != NULL))
++ {
++ //printf("*** filter: %s %s:%s:%s:%s:%s\n", e->name,
++ // fPacketSize->v.string, fSourceIp->v.string, fSourcePort->v.string,
++ // fProtocol->v.string, fDestPort->v.string);
++
++ strcpy(sFilterContents, fPacketSize->v.string);
++ strcat(sFilterContents, ":");
++ strcat(sFilterContents, fSourceIp->v.string);
++ strcat(sFilterContents, ":");
++ strcat(sFilterContents, fSourcePort->v.string);
++ strcat(sFilterContents, ":");
++ strcat(sFilterContents, fProtocol->v.string);
++ strcat(sFilterContents, ":");
++ strcat(sFilterContents, fDestPort->v.string);
++ strcat(sFilterContents, filterDelimiter);
++
++ //printf("*** Writing filter contents to file: %s\n", sFilterContents);
++ tfpFile << sFilterContents;
++ }
++ else
++ {
++ std::string err = "Error parsing filter: " + str_filter;
++ throw std::runtime_error(err);
++ }
++ }
++ }
++ }
++ tfpFile.close();
++
++ // if there is a MAC address for the filter set, we need to add it to the station filters list
++ uci_option *mac = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_MAC_ADDRESS);
++ if (mac != NULL)
++ {
++ // ignore wildcard MAC address
++ if (strcmp(mac->v.string,"*") != 0)
++ {
++ //printf(" *** MAC Address: %s\n", mac->v.string);
++ _stationFilters[::dcw::MacAddress(mac->v.string)] = elem->name;
++ }
++ }
++ }
++ else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_FILTER) == 0)
++ {
++ // filters are processed by the filter set
++ }
++ else
++ {
++ //std::string err = "Error: Unknown UCI section type: " + std::string(section->type);
++ //throw std::runtime_error(err);
++
++ // Don't throw an exception. It is fine for UCI to contain things that we do not know about
++ // that it may use for other purposes, like UI or internal state
++ dcwlogdbgf("Ignoring UCI section type: %s\n", section->type);
++ }
++ }
++ }
++ }
++ }
++
++ UciConfigurationProvider::~UciConfigurationProvider() {
++ uci_free_context(_uciContext);
++ }
++
++ void UciConfigurationProvider::InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const {
++ ::dcwposix::FilterdirScanner::FileFilterProfileList ffpl;
++ ::dcwposix::FilterdirScanner dirScanner(_filterDirectory.c_str());
++ dirScanner.Scan(ffpl);
++
++ for (::dcwposix::FilterdirScanner::FileFilterProfileList::const_iterator i = ffpl.begin(); i != ffpl.end(); i++) {
++ output.push_back(new ::dcw::FileTrafficFilterProfile(*i));
++ }
++ }
++
++
++ void UciConfigurationProvider::GetPrimarySsids(SsidSet& output) const {
++ for (PrimaryChannelMap::const_iterator i = _primaryChannels.begin(); i != _primaryChannels.end(); i++) {
++ output.insert(i->first);
++ }
++ }
++
++ void UciConfigurationProvider::GetDataSsids(SsidSet& output, const char * const primarySsid) const {
++ const PrimaryChannelMap::const_iterator pssid = _primaryChannels.find(primarySsid);
++ if (pssid == _primaryChannels.end()) return;
++
++ for (DataChannelBridgeMap::const_iterator i = pssid->second.dataChannels.begin(); i != pssid->second.dataChannels.end(); i++) {
++ output.insert(i->first);
++ }
++ }
++
++ const char *UciConfigurationProvider::GetSsidIfname(const char * const ssid) const {
++ PrimaryChannelMap::const_iterator pssid = _primaryChannels.find(ssid);
++ if (pssid != _primaryChannels.end()) {
++ if (pssid->second.bridgeName.empty()) {
++ return NULL;
++ }
++ return pssid->second.bridgeName.c_str();
++ }
++
++ for (pssid = _primaryChannels.begin(); pssid != _primaryChannels.end(); pssid++) {
++ const DataChannelBridgeMap& dataChannels = pssid->second.dataChannels;
++ const DataChannelBridgeMap::const_iterator dc = dataChannels.find(ssid);
++ if (dc == dataChannels.end()) continue;
++ if (dc->second.empty()) {
++ return NULL;
++ }
++ return dc->second.c_str();
++ }
++
++ return NULL;
++ }
++
++ void UciConfigurationProvider::GetStationTrafficFilterProfiles(StationTFPMap& output) const {
++ for (StationFilterMap::const_iterator i = _stationFilters.begin(); i != _stationFilters.end(); i++) {
++ output[i->first] = i->second;
++ }
++
++ }
--- /dev/null
+--- a/dcwapd.linuxjsonstatic/main.cxx
++++ b/dcwapd.linuxjsonstatic/main.cxx
+@@ -10,6 +10,7 @@
+ #include "dcwlinux/ap_configuration.h"
+ #include "dcwlinux/vap_manager.h"
+ #include "dcwlinux/json_configuration_provider.h"
++#include "dcwlinux/uci_configuration_provider.h"
+
+ #include "dcw/dcwlog.h"
+
+@@ -19,7 +20,8 @@ int
+ main( void ) {
+
+ try {
+- dcwlinux::JsonConfigurationProvider configProvider("./dcwapdconf.json");
++ //dcwlinux::JsonConfigurationProvider configProvider("./dcwapdconf.json");
++ dcwlinux::UciConfigurationProvider configProvider("dcwapd");
+
+ dcwposix::ProcessSignalManager sigman;
+ dcwposix::SelectEventReactor eventReactor;
--- /dev/null
+--- a/dcwlinux/Makefile.am
++++ b/dcwlinux/Makefile.am
+@@ -6,6 +6,7 @@ libdcwlinux_la_SOURCES =
+ ap_configuration.cxx \
+ brctlnetwork.cxx \
+ json_configuration_provider.cxx \
++ uci_configuration_provider.cxx \
+ macremapper_driver.cxx \
+ vap_manager.cxx \
+ virtual_ap.cxx
--- /dev/null
+--- a/dcw/controller.cxx
++++ b/dcw/controller.cxx
+@@ -195,7 +195,7 @@ void Controller::OnStationUnjoin(const MacAddress& primaryMacAddr, const Message
+ //remove any channel bondings matching the provided data channel mac addresses
+ for (unsigned i = 0; i < m.data_macaddr_count; i++) {
+ const ::dcw::MacAddress dcaddr(m.data_macaddrs[i]);
+- const ::dcw::TrafficPolicy::DataChannelMap::iterator dcmEntry = state.policy.dataChannels.find(dcaddr);
++ ::dcw::TrafficPolicy::DataChannelMap::iterator dcmEntry = state.policy.dataChannels.find(dcaddr);
+ if (dcmEntry == state.policy.dataChannels.end()) continue;
+ if (dcmEntry->second == NULL) {
+ dcwlogwarnf("Data channel MAC address %s on client %s is not currently bonded\n", dcaddr.ToString().c_str(), primaryMacAddr.ToString().c_str());
+@@ -238,7 +238,7 @@ void Controller::OnStationAck(const MacAddress& primaryMacAddr, const Message& m
+ dcwlogdbgf("Got a station ACK from %s\n", primaryMacAddr.ToString().c_str());
+
+ // first make sure this client has actually sent a join first...
+- const ClientStateMap::iterator client = _clients.find(primaryMacAddr);
++ ClientStateMap::iterator client = _clients.find(primaryMacAddr);
+ if (client == _clients.end()) {
+ dcwlogerrf("Got a client ACK without a station join from %s\n", primaryMacAddr.ToString().c_str());
+ Message reply(DCWMSG_AP_REJECT_STA);
+--- a/dcwposix/processsignalmanager.cxx
++++ b/dcwposix/processsignalmanager.cxx
+@@ -40,7 +40,7 @@ ProcessSignalManager::~ProcessSignalManager() {
+ }
+
+ void ProcessSignalManager::RegisterEventHandler(const int signum, ::dcwposix::ProcessSignalManager::EventHandler& eventHandler) {
+- const SignalMap::iterator i = _sigmap.find(signum);
++ SignalMap::iterator i = _sigmap.find(signum);
+ if (i == _sigmap.end()) {
+ //be sure to preseve the old signal when inserting a new "unseen" signal
+ _sigmap[signum].insert(&eventHandler);
+@@ -53,7 +53,7 @@ void ProcessSignalManager::RegisterEventHandler(const int signum, ::dcwposix::Pr
+ }
+
+ void ProcessSignalManager::UnRegisterEventHandler(const int signum, ::dcwposix::ProcessSignalManager::EventHandler& eventHandler) {
+- const SignalMap::iterator i = _sigmap.find(signum);
++ SignalMap::iterator i = _sigmap.find(signum);
+
+ if (i == _sigmap.end()) {
+ dcwlogwarnf("Attempting to unregister handler %p non-registered process signal #%d\n", &eventHandler, signum);
\ No newline at end of file
--- /dev/null
+--- a/dcwlinux/macremapper_driver.cxx
++++ b/dcwlinux/macremapper_driver.cxx
+@@ -174,7 +174,7 @@ void MacRemapperDriver::ApplyClientTrafficPolicy(const dcw::MacAddress& primaryA
+ }
+
+ //populate our remap ioctl()
+- bzero(&re, sizeof(re));
++ memset(&re, 0, sizeof(re));
+ strncpy(re.filter_name, policy.trafficFilterProfile->GetName(), sizeof(re.filter_name));
+ memcpy(re.match_macaddr, primaryAddr.Value, sizeof(re.match_macaddr));
+
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libdcwproto
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=5bda395c648aa12eb90515c29024029738fde1a8f73a2cbc553be1c6962c2629
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libdcwproto
+ SECTION:=libs
+ CATEGORY:=Libraries
+ SUBMENU:=Networking
+ TITLE:=Dual-Channel WiFi messaging library
+ URL:=https://www.edgewaterwireless.com
+ DEPENDS:=+kmod-macremapper
+endef
+
+define Package/libdcwproto/description
+ Platform-independent C library for marshaling and serializing DCW messages
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+define Package/libdcwproto/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libdcwproto))
--- /dev/null
+--- a/src/dcwproto.c
++++ b/src/dcwproto.c
+@@ -20,12 +20,8 @@
+
+
+
+-#ifdef WIN32
+-#define bzero(ptr, size) memset(ptr, 0, size)
+-#else
+ #include <config.h>
+ #include <strings.h>
+-#endif
+ #include <dcwproto.h>
+
+ #include <string.h>
+@@ -95,7 +91,7 @@ dcwmsg_marshal_sta_ack(struct dcwmsg_sta_ack * const output, const unsigned char
+
+ /* copy in the data ssid string bytes */
+ if (buf_len < copy_size) return 0;
+- bzero(output->bonded_data_channels[i].ssid, sizeof(output->bonded_data_channels[i].ssid));
++ memset(output->bonded_data_channels[i].ssid, 0, sizeof(output->bonded_data_channels[i].ssid));
+ memcpy(output->bonded_data_channels[i].ssid, buf, copy_size);
+ buf_len -= copy_size;
+ buf += copy_size;
+@@ -134,7 +130,7 @@ dcwmsg_marshal_ap_accept_sta(struct dcwmsg_ap_accept_sta * const output, const u
+
+ /* copy in the data ssid string bytes */
+ if (buf_len < copy_size) return 0;
+- bzero(output->data_ssids[i], sizeof(output->data_ssids[i]));
++ memset(output->data_ssids[i], 0, sizeof(output->data_ssids[i]));
+ memcpy(output->data_ssids[i], buf, copy_size);
+ buf_len -= copy_size;
+ buf += copy_size;
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libdcwsocket
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_HASH:=c7f6c69a5246fe1f184c21585f0805ceaca09c3c087ae439ded7ed4d25c7a3fa
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libdcwsocket
+ SECTION:=libs
+ CATEGORY:=Libraries
+ SUBMENU:=Networking
+ TITLE:=Dual-Channel socket library
+ URL:=https://www.edgewaterwireless.com
+endef
+
+define Package/libdcwsocket/description
+ User-land C library for sending and receiving DCW "EtherType"d messages
+endef
+
+TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+define Package/libdcwsocket/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libdcwsocket))
--- /dev/null
+--- a/src/dcwsocket.c.linux
++++ b/src/dcwsocket.c.linux
+@@ -100,10 +100,10 @@ dcwsock_open(const char * const ifname) {
+ }
+
+ /* sanitize our data structs... defensive */
+- bzero(rv, sizeof(*rv));
+- bzero(&ifr, sizeof(ifr));
+- bzero(&sall, sizeof(sall));
+- bzero(&sfp, sizeof(sfp));
++ memset(rv, 0, sizeof(*rv));
++ memset(&ifr, 0, sizeof(ifr));
++ memset(&sall, 0, sizeof(sall));
++ memset(&sfp, 0, sizeof(sfp));
+
+ /* open a raw socket... "ETH_P_ALL" says take EVERYTHING
+ (this means that it is IMPERATIVE to apply a filter)
+diff --git a/src/dcwsocket.c.osx b/src/dcwsocket.c.osx
+index abead10..75cda2f 100644
+--- a/src/dcwsocket.c.osx
++++ b/src/dcwsocket.c.osx
+@@ -90,10 +90,10 @@ dcwsock_open(const char * const ifname) {
+ }
+
+ /* sanitize our data structs... defensive */
+- bzero(rv, sizeof(*rv));
+- bzero(&dmx_desc, sizeof(dmx_desc));
+- bzero(&proto_desc, sizeof(proto_desc));
+- bzero(&snd, sizeof(snd));
++ memset(rv, 0, sizeof(*rv));
++ memset(&dmx_desc, 0, sizeof(dmx_desc));
++ memset(&proto_desc, 0, sizeof(proto_desc));
++ memset(&snd, 0, sizeof(snd));
+
+ /* open a "NDRV" socket... */
+ rv->fd = socket(PF_NDRV, SOCK_RAW, 0);
+@@ -201,7 +201,7 @@ dcwsock_send( dcw_socket_t s, const void * const buf, const unsigned buf_size, c
+ fill out a link-level sockaddr cause we can only
+ use sendto() with PF_NDRV...
+ */
+- bzero(&sdl, sizeof(sdl));
++ memset(&sdl, 0, sizeof(sdl));
+ sdl.sdl_len = sizeof(sdl);
+ sdl.sdl_index = 0;
+ sdl.sdl_type = IFT_ETHER;
--- /dev/null
+--- a/src/dcwsocket.c.linux
++++ b/src/dcwsocket.c.linux
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
++#include <linux/if.h>
+ #include <linux/if_packet.h>
+ #include <linux/if_ether.h>
+ #include <linux/filter.h>
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=macremapper
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f054201dd805ce005b89606a507b58a5717d383a4339c69dfdc02f0202935437
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=kernelmod/COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/macremapper
+ SUBMENU:=Network Support
+ URL:=https://www.edgewaterwireless.com
+ VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
+ TITLE:=Dual Channel Wi-Fi macremapper Module
+ DEPENDS:= +kmod-cfg80211 +kmod-br-netfilter
+ FILES:=$(PKG_BUILD_DIR)/kernelmod/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoProbe,macremapper)
+endef
+
+define KernelPackage/macremapper/description
+ Linux kernel module for implementation the DCW filtering mechanism
+endef
+
+MAKE_FLAGS += KERNEL_SRC=$(LINUX_DIR)
+MAKE_PATH:=kernelmod
+
+$(eval $(call KernelPackage,macremapper))
--- /dev/null
+--- a/kernelmod/main.c
++++ b/kernelmod/main.c
+@@ -91,8 +91,11 @@ modinit( void ) {
+
+ rv = mrm_rcdb_init();
+ if (rv != 0) return rv;
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+ nf_register_hook(&_hops);
++#else
++ nf_register_net_hook(&init_net, &_hops);
++#endif
+ mrm_init_ctlfile(); /* XXX not checking for failure! */
+
+ printk(KERN_INFO "MRM The MAC Address Re-Mapper is now in the kernel\n");
+@@ -103,7 +106,11 @@ modinit( void ) {
+ static void __exit
+ modexit( void ) {
+ mrm_destroy_ctlfile();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+ nf_unregister_hook(&_hops);
++#else
++ nf_unregister_net_hook(&init_net, &_hops);
++#endif
+ mrm_rcdb_destroy(); /* imperative that this happens last */
+ printk(KERN_INFO "MRM The MAC Address Re-Mapper gone bye-bye\n");
+ }
--- /dev/null
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mrmctl
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=macremapper-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/macremapper/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f054201dd805ce005b89606a507b58a5717d383a4339c69dfdc02f0202935437
+PKG_BUILD_DIR:=$(BUILD_DIR)/macremapper-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=userland/COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mrmctl
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=mrmctl utility (macremapper kernel module)
+ URL:=https://www.edgewaterwireless.com
+ DEPENDS:= +kmod-macremapper
+endef
+
+define Package/mrmctl/description
+ Command-line utility to manually manipulate the macremapper kernel module
+endef
+
+MAKE_PATH:=userland
+CONFIGURE_PATH:=userland
+CONFIGURE_ARGS += \
+ --enable-shared
+
+TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/mrmctl/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,mrmctl))
--- /dev/null
+--- a/userland/mrmctl/mrmctl.c
++++ b/userland/mrmctl/mrmctl.c
+@@ -139,7 +139,7 @@ remap(int argc, char **argv) {
+ if (argc < 5) return 1; /* defensive */
+
+ /* initialize variables and put things into human-readable variable names */
+- bzero(&re, sizeof(re));
++ memset(&re, 0, sizeof(re));
+ filter_name = argv[2];
+ match_macaddr = argv[3];
+
+diff --git a/userland/mrmfilterparser/mrm_filter_conf_parser.c b/userland/mrmfilterparser/mrm_filter_conf_parser.c
+index 926fa76..f5c54c1 100644
+--- a/userland/mrmfilterparser/mrm_filter_conf_parser.c
++++ b/userland/mrmfilterparser/mrm_filter_conf_parser.c
+@@ -319,7 +319,7 @@ filter_file_loadf(struct mrm_filter_config * const output, FILE * const f) {
+ return -1;
+
+ output->rules_active = 0;
+- bzero(output->rules, sizeof(output->rules)); /* defensive */
++ memset(output->rules, 0, sizeof(output->rules)); /* defensive */
+
+ for (linenum = 1; fgets(buf, sizeof(buf), f) != NULL; linenum++) {
+
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=
+PKG_CPE_ID:=cpe:/a:roy_marples:dhcpcd
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy2
-PKG_VERSION:=2.0.25
+PKG_VERSION:=2.0.27
PKG_RELEASE:=1
PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/jedisct1/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=774696004c9e306e1723b4cbbe66a961128a335543d318d0786492ce69b906fa
+PKG_HASH:=a501f44af39cb43e00489ef9e6678aa8adba2bc98f9042dd61ce60e9ad074d5a
PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
--- /dev/null
+#
+# Copyright (C) 2019 Mister Benjamin <144dbspl@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=etherwake-nfqueue
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/mister-benjamin/etherwake-nfqueue.git
+PKG_SOURCE_DATE:=2019-09-28
+PKG_SOURCE_VERSION:=f71c269b58585e93575fa3e9fcc1793806fb3080
+PKG_MIRROR_HASH:=4960dc592abc4ca06504c92ca09fc736c678353df0dcc32d4081e17b137a9164
+
+PKG_MAINTAINER:=Mister Benjamin <144dbspl@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/etherwake-nfqueue
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libnetfilter-queue +iptables-mod-nfqueue
+ TITLE:=Wake up computers on netfilter match
+ URL:=https://github.com/mister-benjamin/etherwake-nfqueue
+endef
+
+define Package/etherwake-nfqueue/description
+ Fork of etherwake with additional support for sending WOL packets
+ when a router added a filtered packet to an NFQUEUE.
+endef
+
+define Package/etherwake-nfqueue/conffiles
+/etc/config/etherwake-nfqueue
+endef
+
+define Package/etherwake-nfqueue/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etherwake-nfqueue $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+endef
+
+$(eval $(call BuildPackage,etherwake-nfqueue))
--- /dev/null
+# OpenWrt package feed for etherwake-nfqueue
+
+
+## Wake up computers on netfilter match
+
+This repository contains the OpenWrt package feed for
+[etherwake-nfqueue](https://github.com/mister-benjamin/etherwake-nfqueue),
+a fork of the **etherwake** Wake-on-LAN client, with support to send magic
+packets only after a queued packet is received from the Linux *nfnetlink_queue*
+subsystem.
+
+When running **etherwake-nfqueue** on a residential gateway or other type of
+router, it can wake up hosts on its network based on packet filtering rules.
+
+For instance, when your set-top box wants to record a TV programme and
+tries to access a network share on your NAS, which is in sleep or standby mode,
+**etherwake-nfqueue** can wake up your NAS. Or when you set up port forwarding
+to a host on your home network, **etherwake-nfqueue** can wake up your host
+when you try to access it over the Internet.
+
+The documentation below is mostly OpenWrt specific. For more information on
+etherwake-nfqueue itself and use case examples, please consult its
+[Readme](https://github.com/mister-benjamin/etherwake-nfqueue/blob/master/README.md).
+
+
+## Building the package
+
+Currently, no pre-built packages are provided. The following assumes that you
+already have a working OpenWrt build system for your target device.
+
+If you haven't, you can follow one of these guides:
+
+* If you only want to compile packages, and no firmware image:
+ [Build system – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) and
+ [Using the SDK](https://openwrt.org/docs/guide-developer/using_the_sdk)
+
+* To quickly build a firmware image off a development snapshot:
+ [Quick Image Building Guide](https://openwrt.org/docs/guide-developer/quickstart-build-images)
+
+* Or when you are completely new to using build systems:
+ [Beginners guide to building your own firmware](https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide)
+
+### Dependencies
+
+**etherwake-nfqueue** depends on these OpenWrt packages:
+
+* libnetfilter-queue
+* iptables-mod-nfqueue
+
+They will be automatically selected and compiled for you. If they are not
+installed on your target device, *opkg* will try to resolve dependencies with
+packages in the repositories.
+
+### Adding the package feed
+
+First, you need to add the **etherwake-nfqueue** package feed to your build
+system. In the root directory of your OpenWrt build system, find the file
+*feeds.conf* (or *feeds.conf.default* if the former shouldn't exist) and add
+the following line to it:
+
+```
+src-git ethernfq https://github.com/mister-benjamin/etherwake-nfqueue-openwrt.git
+```
+
+Then update and install the package feed:
+```
+user@host:~/openwrt$ scripts/feeds update ethernfq
+user@host:~/openwrt$ scripts/feeds install -a -p ethernfq
+```
+
+After that, enter OpenWrt's configuration menu
+```
+user@host:~/openwrt$ make menuconfig
+```
+and enable **etherwake-nfqueue** in the **Network** sub-menu. It can either be selected
+as built-in (\*) or module (M), depending on your decision to include it into a
+firmware image or just build the *opkg* package for installation.
+
+Then you should be able to compile the package:
+```
+user@host:~/openwrt$ make package/etherwake-nfqueue/compile
+```
+
+The path of the resulting package depends on your selected *Target System*.
+In case of the Linksys WRT1200AC, it can be found here:
+```
+bin/packages/arm_cortex-a9_vfpv3/ethernfq/etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk
+```
+
+
+## Installation
+
+One way to install the package is by simply copying it over to the device with *scp*:
+```
+user@host:~$ scp etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk root@gateway:~
+```
+And then, install it on the device:
+```
+root@gateway:~# opkg install etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk
+```
+
+
+## Configuration
+
+### WoL Targets
+
+After a fresh installation, no target is configured. Targets are referred
+to as the hosts to wake up. Multiple targets can coexist.
+
+Targets can be configured with OpenWrt's UCI.
+
+For example, to add a target called **nas**, with MAC address
+ **00:25:90:00:d5:fd**, which is reachable over the VLAN configured
+on **eth0.3**, issue this command sequence on your router:
+
+```
+uci add etherwake-nfqueue target
+uci set etherwake-nfqueue.@target[-1].name=nas
+uci set etherwake-nfqueue.@target[-1].mac=00:25:90:00:d5:fd
+uci set etherwake-nfqueue.@target[-1].interface=eth0.3
+uci commit
+```
+
+For each target, one instance of **etherwake-nfqueue** will be started.
+
+Each instance should bind to a different *nfnetlink_queue*. A queue can
+be referenced by its queue number. Counting starts from 0, which is the default.
+To use a different queue, provide the **nfqueue_num** option. The
+following could have been added to the sequence above to use queue 1 instead
+of 0:
+
+```
+uci set etherwake-nfqueue.@target[-1].nfqueue_num=1
+```
+
+The necessity of a queue number will probably become clear, when the iptables
+rules are configured in section [Setup firewall rules](#setup-firewall-rules).
+
+The full list of options for a target is:
+
+| Option | Required | Description |
+| ----------- | -------- | ------------------------------------------------ |
+| name | no | Name of the target, e.g. name=example |
+| mac | yes | MAC address of the host to wake up, e.g. mac=00:22:44:66:88:aa |
+| nfqueue_num | no | The queue number used for receiving filtered packets, default is nfqueue_num=0 |
+| interface | no | The interface used for sending the magic packet, default is interface=eth0 |
+| broadcast | no | Send magic packet to broadcast address, default is broadcast=off |
+| password | no | Set a password (required by some adapters), e.g. password=00:22:44:66:88:aa or 192.168.1.1 |
+| enabled | no | Optionally disable the target, default is enabled=true |
+
+After committing your changes, the settings are persisted to
+*/etc/config/etherwake-nfqueue*. This is an illustrative example:
+```
+config etherwake-nfqueue 'setup'
+ option sudo 'off'
+ option debug 'off'
+
+config target
+ option name 'nas'
+ option mac '00:25:90:00:d5:fd'
+ option interface 'eth0.3'
+
+config target
+ option name 'xyz-board'
+ option mac '00:25:90:00:d5:fc'
+ option nfqueue_num '1'
+ option enabled 'false'
+
+config target
+ option name 'ip-camera'
+ option mac '00:25:90:00:d5:fb'
+ option nfqueue_num '2'
+ option interface 'eth0.3'
+ option broadcast 'on'
+ option password '00:25:90:00:d5:fb'
+```
+
+When all target(s) are configured, restart the *etherwake-nfqueue* service:
+```
+/etc/init.d/etherwake-nfqueue restart
+```
+
+### Setting up filters
+
+Without any firewall rules which tell the kernel to match and add packets
+to a *nfnetlink_queue*, **etherwake-nfqueue** will never send out a magic
+packet to wake its target.
+
+#### Prerequisites
+
+In order to let the *netfilter* framework of the kernel see the packets,
+they need to pass through the router. This is usually not the case when
+hosts are on the same subnet and don't require network layer routing.
+The data will only pass through the router's switch on the link layer.
+
+As a consequence, we can only use packets as a trigger which need to be
+routed or bridged by the router. Packets being forwarded between WAN
+and LAN are of that type. For other SOHO use cases, partitioning your
+network by means of subnets or VLANs might be necessary. The latter
+is often used to set up a DMZ.
+
+For VLANs:
+
+* There's a mini howto referring to the **LuCI Web Interface**
+ *(Network -> Switch)* way of configuring VLANs:
+ [How-To: Creating an additional virtual switch on a typical home router](https://openwrt.org/docs/guide-user/network/vlan/creating_virtual_switches)
+
+* The manual approach is documented here:
+ [VLAN](https://openwrt.org/docs/guide-user/network/vlan/switch_configuration)
+
+Guides to setup a DMZ can be found here:
+
+* [Guide to set up DMZ via LUCI](https://forum.openwrt.org/t/guide-to-set-up-dmz-via-luci/21616)
+
+* [fw3 DMZ Configuration Using VLANs](https://openwrt.org/docs/guide-user/firewall/fw3_configurations/fw3_dmz)
+
+The physical switch layout is device specific. E.g. the layout for the Linksys
+WRT AC Series is documented
+[here](https://oldwiki.archive.openwrt.org/toh/linksys/wrt_ac_series#switch_layout).
+
+
+Using two LANs or VLANs with the same network address and bridging them again
+is a trick to setup a transparent (or bridging) firewall on the same subnet.
+This way, packets can be seen by *netfilter* on the router even if the
+packets are not routed. Unfortunately this doesn't help when the host
+which we want to wake up is offline, as the ARP requests for the destination
+IP address are not answered and thus the client trying to reach out to its
+destination will not send any *network layer* packets. We could use *arptables*
+instead to wake the host when someone requests its MAC address, but this
+would probably happen too often and no fine-grained control would be possible.
+
+As a workaround, it might be possible to configure a static ARP entry on your
+router (untested), e.g. with:
+```
+ip neigh add 192.168.0.10 lladdr 00:25:90:00:d5:fd nud permanent dev eth0.3
+```
+Note that this requires the *ip-full* OpenWrt package to be installed.
+
+To make your firewall rules work with bridging, you need to install the
+*kmod-br-netfilter* package and add `net.bridge.bridge-nf-call-iptables=1`
+to */etc/sysctl.conf*.
+
+
+#### Setup firewall rules
+
+One way to setup custom firewall rules in OpenWrt is through its
+*/etc/firewall.user* script. This file can also be edited by means of
+the **LuCI Web Interface** *(Network -> Firewall -> Custom Rules)*.
+
+The file is interpreted as a shell script, so we can simply use **iptables**
+to add our custom firewall rules.
+
+Notice the comment
+```
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
+```
+
+Refer to [Packet flow](https://oldwiki.archive.openwrt.org/doc/uci/firewall#packet_flow)
+for usable chains. In the example below, the chains *forwarding_lan_rule* and
+*forwarding_wan_rule* are used. To inspect the rule sets of the different tables, one can
+use
+
+```
+iptables --list # default is --table filter
+iptables --table nat --list
+iptables --table mangle --list
+iptables --table raw --list # requires kmod-ipt-raw
+```
+
+The following is an example of what could be added to */etc/firewall.user*:
+
+```
+iptables --insert forwarding_lan_rule\
+ --protocol tcp --in-interface=br-lan --out-interface=eth0.3\
+ --destination 192.168.0.10 --destination-port 445\
+ --match conntrack --ctstate NEW\
+ --match limit --limit 3/hour --limit-burst 1\
+ --jump NFQUEUE --queue-num 0 --queue-bypass\
+ --match comment --comment "Wake up NAS on LAN SMB"
+iptables --insert forwarding_lan_rule\
+ --protocol tcp --in-interface=br-lan --out-interface=eth0.3\
+ --destination 192.168.0.11 --match multiport --destination-ports 515,54921,631\
+ --match conntrack --ctstate NEW\
+ --match limit --limit 3/hour --limit-burst 1\
+ --jump NFQUEUE --queue-num 0 --queue-bypass\
+ --match comment --comment "Wake up NAS on print request"
+iptables --insert forwarding_lan_rule\
+ --protocol udp --in-interface=br-lan --out-interface=eth0.3\
+ --destination 192.168.0.11 --destination-port 161\
+ --match conntrack --ctstate NEW\
+ --match limit --limit 3/hour --limit-burst 1\
+ --jump NFQUEUE --queue-num 0 --queue-bypass\
+ --match comment --comment "Wake up NAS on print request"
+iptables --insert forwarding_wan_rule\
+ --protocol tcp --in-interface=eth1.2 --out-interface=eth0.3\
+ --destination 192.168.0.10 --destination-port 22\
+ --match conntrack --ctstate NEW\
+ --match limit --limit 3/hour --limit-burst 1\
+ --jump NFQUEUE --queue-num 0 --queue-bypass\
+ --match comment --comment "Wake up NAS on WAN SSH"
+```
+
+In this example, packets are filtered based on the protocol, their input
+and output interfaces, their destination (IP address) and their destination
+port(s).
+
+The option `--match conntrack --ctstate NEW` only matches packets of a new
+connection and `--match limit --limit 3/hour --limit-burst 1` limits the
+amount of packets that are matched. The latter option roughly matches
+only one packet per 20 minutes. The intention here is to not be too intrusive
+and avoid sending a lot of magic packets.
+
+The `--jump NFQUEUE --queue-num 0` options tell the *netfilter*
+framework to enqueue a matching packet to the NFQUEUE number 0. In this
+example, all four rules send the matching packets into queue 0. The
+additional option `--queue-bypass` helps in the situation, when
+**etherwake-nfqueue** isn't running. Packets will then be handled
+as if the rule wasn't present.
+
+
+## Disabling targets
+
+To disable targets, first find their index:
+```
+uci show etherwake-nfqueue
+```
+
+Then set its *enabled* option to false and restart the service.
+For index 0, it can be done like this:
+```
+uci set etherwake-nfqueue.@target[0].enabled=false
+/etc/init.d/etherwake-nfqueue restart
+```
+
+
+## Troubleshooting
+
+### Debug mode
+
+In order to see what's going on in syslog and get some debug output when
+starting the service, enable etherwake-nfqueue's debug mode:
+```
+uci set etherwake-nfqueue.setup.debug=on
+```
+In another user session tail the log:
+```
+logread -f
+```
+And then restart the service:
+```
+/etc/init.d/etherwake-nfqueue restart
+```
+
+### Inspect netfilter
+
+To inspect the working of your firewall rules, you can print statistics
+of the chains you used, e.g.:
+```
+iptables --verbose --list forwarding_lan_rule
+```
+
+If you happen to have the *procps-ng-watch* package installed, you can watch
+them:
+```
+watch iptables --verbose --list forwarding_lan_rule
+```
+
+To see, if your queues are in place, use:
+```
+cat /proc/net/netfilter/nfnetlink_queue
+```
+
+## Potential improvements
+
+* Add **LuCI Web Interface** configuration frontend for *targets* and *filter rules*
+* Add an option to set *nice* values for instances
--- /dev/null
+config etherwake-nfqueue 'setup'
+ option sudo 'off'
+ option debug 'off'
+
+# You can add targets with uci:
+# # uci add etherwake-nfqueue target
+# Set a name for the target
+# # uci set etherwake-nfqueue.@target[-1].name=example
+# Set MAC address of the host to wake up
+# # uci set etherwake-nfqueue.@target[-1].mac=00:22:44:66:88:aa
+# Set the nfqueue num used for receiving filtered packets, defaults to 0
+# # uci set etherwake-nfqueue.@target[-1].nfqueue_num=0
+# Set the interface used for sending the magic packet, defaults to 'eth0'
+# # uci set etherwake-nfqueue.@target[-1].interface=eth0
+# Configure if it should be sent to broadcast address, defaults to off
+# # uci set etherwake-nfqueue.@target[-1].broadcast=off
+# Optionally provide a password (required by some adapters)
+# e.g. 00:22:44:66:88:aa or 192.168.1.1
+# # uci set etherwake-nfqueue.@target[-1].password=00:22:44:66:88:aa
+# Optionally disable the target, by default it is enabled
+# # uci set etherwake-nfqueue.@target[-1].enabled=false
--- /dev/null
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 Mister Benjamin <144dbspl@gmail.com>
+
+NAME='etherwake-nfqueue'
+
+START=60
+USE_PROCD=1
+
+PROGRAM=${NAME}
+
+start_service()
+{
+ local value
+
+ config_load ${NAME}
+
+ config_get_bool value setup sudo 0
+ [ "${value}" -ne 0 ] && PROGRAM="sudo ${PROGRAM}"
+
+ config_get_bool value setup debug 0
+ if [ "${value}" -ne 0 ]; then
+ PROCD_DEBUG=1
+ append PROGRAM '-D'
+ fi
+
+ config_foreach start_instance target
+}
+
+start_instance()
+{
+ local section="$1"
+ local value name mac
+
+ config_get_bool value "${section}" enabled 1
+ [ "${value}" -ne 1 ] && return 0
+
+ config_get value "${section}" name
+ [ -z "${value}" ] && value="{section}"
+ name=${value}
+
+ config_get mac "${section}" mac
+ [ -z "${mac}" ] && {
+ echo "${initscript}: Target ${name} has no MAC address"
+ return 1
+ }
+
+ procd_open_instance ${name}
+ procd_set_param command ${PROGRAM}
+ procd_set_param respawn
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+
+ config_get_bool value "${section}" broadcast 0
+ [ "${value}" -ne 0 ] && procd_append_param command -b
+
+ config_get value "${section}" interface
+ [ -n "${value}" ] && procd_append_param command -i "${value}"
+
+ config_get value "${section}" password
+ [ -n "${value}" ] && procd_append_param command -p "${value}"
+
+ config_get value "${section}" nfqueue_num 0
+ procd_append_param command -q "${value}"
+
+ procd_append_param command "${mac}"
+
+ procd_close_instance
+}
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYRIGHT LICENSE
+PKG_CPE_ID:=cpe:/a:freeradius:freeradius
PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=frp
-PKG_VERSION:=0.28.0
+PKG_VERSION:=0.29.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=61afbd0e84fc1ab92eacce5a642e2590d1b8c1a972a78f6499165c1778aa62cf
+PKG_HASH:=5d7980b81cfd055e3e5bb7a120098f94342656f647cb906ea075912f63568816
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
PKG_LICENSE:=Apache-2.0
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+PKG_NAME:=frr
+PKG_VERSION:=7.1
+PKG_RELEASE:=2
+
+PKG_SOURCE_URL:=https://github.com/FRRouting/frr/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=2a4210565e7b41d366f7b9f5f745917d67a0b159f3b6bd49d75f9e730557db2f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_IPV6 \
+ CONFIG_PACKAGE_frr-babeld \
+ CONFIG_PACKAGE_frr-bfdd \
+ CONFIG_PACKAGE_frr-bgpd \
+ CONFIG_PACKAGE_frr-eigrpd \
+ CONFIG_PACKAGE_frr-fabricd \
+ CONFIG_PACKAGE_frr-isisd \
+ CONFIG_PACKAGE_frr-ldpd \
+ CONFIG_PACKAGE_frr-libfrr \
+ CONFIG_PACKAGE_frr-nhrpd \
+ CONFIG_PACKAGE_frr-ospfd \
+ CONFIG_PACKAGE_frr-ospf6d \
+ CONFIG_PACKAGE_frr-pbrd \
+ CONFIG_PACKAGE_frr-pimd \
+ CONFIG_PACKAGE_frr-ripd \
+ CONFIG_PACKAGE_frr-ripngd \
+ CONFIG_PACKAGE_frr-staticd \
+ CONFIG_PACKAGE_frr-vtysh \
+ CONFIG_PACKAGE_frr-watchfrr \
+ CONFIG_PACKAGE_frr-zebra
+
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=python3/host
+PKG_FIXUP:=autoreconf
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/frr/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ DEPENDS:=frr
+ TITLE:=The FRRouting (FRR) Software Routing Suite
+ URL:=https://www.frrouting.org/
+endef
+
+define Package/frr
+ $(call Package/frr/Default)
+ DEPENDS:=+librt
+ MENU:=1
+endef
+
+define Package/frr/description
+ FRRouting is free software that implements and manages various IPv4 and IPv6
+ routing protocols.
+
+ Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng,
+ IS-IS, PIM-SM/MSDP, LDP and Babel as well as very early support for EIGRP and
+ NHRP.
+endef
+
+define Package/frr-babeld
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=BABEL routing engine
+endef
+
+define Package/frr-bfdd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=BFD routing engine
+ CONFLICTS:=bfdd
+endef
+
+define Package/frr-bgpd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
+ CONFLICTS:=quagga-bgpd
+endef
+
+define Package/frr-eigrpd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=EIGRPD routing engine
+endef
+
+define Package/frr-fabricd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=OpenFabric routing engine
+endef
+
+define Package/frr-isisd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=IS-IS routing engine
+ CONFLICTS:=quagga-isisd
+endef
+
+define Package/frr-ldpd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=LDP routing engine
+endef
+
+define Package/frr-libfrr
+ $(call Package/frr/Default)
+ TITLE:=zebra library
+ DEPENDS+=+libjson-c +libyang
+ CONFLICTS:=quagga-libzebra
+endef
+
+define Package/frr-nhrpd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr +libcares
+ TITLE:=NHRP routing engine
+endef
+
+define Package/frr-ospfd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=OSPFv2 routing engine
+ CONFLICTS:=quagga-ospfd
+endef
+
+define Package/frr-ospf6d
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr @IPV6
+ TITLE:=OSPFv3 routing engine
+ CONFLICTS:=quagga-ospf6d
+endef
+
+define Package/frr-pbrd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=PBRD routing daemon
+endef
+
+define Package/frr-pimd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=PIM routing engine
+endef
+
+define Package/frr-ripd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=RIP routing engine
+ CONFLICTS:=quagga-ripd
+endef
+
+define Package/frr-ripngd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr @IPV6
+ TITLE:=RIPNG routing engine
+ CONFLICTS:=quagga-ripngd
+endef
+
+define Package/frr-staticd
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr
+ TITLE:=STATICD routing engine
+endef
+
+define Package/frr-vtysh
+ $(call Package/frr/Default)
+ DEPENDS+=+frr-libfrr +libreadline +libncurses
+ TITLE:=integrated shell for frr routing software
+ CONFLICTS:=quagga-vtysh
+endef
+
+define Package/frr-watchfrr
+ $(call Package/frr/Default)
+ TITLE:=frr watchdog
+ DEPENDS+=+frr-libfrr
+ DEFAULT:=y if PACKAGE_frr
+endef
+
+define Package/frr-zebra
+ $(call Package/frr/Default)
+ TITLE:=Zebra daemon
+ DEPENDS+=+frr-libfrr
+ DEFAULT:=y if PACKAGE_frr
+ CONFLICTS:=quagga-zebra
+endef
+
+define Package/frr-libfrr/conffiles
+/etc/frr/
+endef
+
+define Build/Prepare
+ $(Build/Prepare/Default)
+ mkdir -p $(PKG_BUILD_DIR)/build/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/command.h $(PKG_BUILD_DIR)/build/lib/
+endef
+
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR)/build/ ; \
+ cd build ; \
+ ../configure \
+ --host="$(GNU_TARGET_NAME)" \
+ --build="$(GNU_HOST_NAME)" \
+ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+ HOST_CFLAGS="$(HOST_CFLAGS)" \
+ HOST_LDFLAGS="$(HOST_LDFLAGS)" \
+ BUILD_CPPFLAGS="$(TARGET_CPPLAGS)" \
+ BUILD_CFLAGS="$(TARGET_CFLAGS)" \
+ BUILD_LDFLAGS="$(TARGET_LDFLAGS)" \
+ --prefix=/usr \
+ --enable-shared \
+ --disable-static \
+ --enable-user=network \
+ --enable-group=network \
+ --enable-multipath=16 \
+ --disable-capabilities \
+ --disable-ospfclient \
+ --disable-doc \
+ --disable-backtrace \
+ --with-vtysh-pager=cat \
+ --localstatedir=/var/run/frr \
+ --sysconfdir=/etc/frr/ \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-babeld,babeld) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-bfdd,bfdd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-bgpd,bgpd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-eigrpd,eigrpd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-fabricd,fabricd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-isisd,isisd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-ldpd,ldpd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-nhrpd,nhrpd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-ospfd,ospfd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-ospf6d,ospf6d) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-pbrd,pbrd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-pimd,pimd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-staticd,staticd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-ripd,ripd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-ripngd,ripngd) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-vtysh,vtysh) \
+ $(call autoconf_bool,CONFIG_PACKAGE_frr-libfrr,zebra) \
+)
+endef
+
+# just speed it up
+NUM_CORES ?= $(shell grep -c "vendor_id" /proc/cpuinfo)
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/build -j$(NUM_CORES)
+endef
+
+define Package/frr/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/frrcommon.sh $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/frr $(1)/etc/init.d/
+endef
+
+define Package/frr-watchfrr/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/watchfrr.sh $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/watchfrr/.libs/watchfrr $(1)/usr/sbin/
+endef
+
+define Package/frr-zebra/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/zebra/.libs/zebra $(1)/usr/sbin/
+endef
+
+define Package/frr-babeld/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/babeld/.libs/babeld $(1)/usr/sbin/
+endef
+
+define Package/frr-bfdd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bfdd/.libs/bfdd $(1)/usr/sbin/
+endef
+
+define Package/frr-bgpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bgpd/.libs/bgpd $(1)/usr/sbin/
+endef
+
+define Package/frr-eigrpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/eigrpd/.libs/eigrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-fabricd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/fabricd $(1)/usr/sbin/
+endef
+
+define Package/frr-isisd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/isisd $(1)/usr/sbin/
+endef
+
+define Package/frr-ldpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ldpd/.libs/ldpd $(1)/usr/sbin/
+endef
+
+define Package/frr-nhrpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/nhrpd/.libs/nhrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-ospfd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospfd/.libs/ospfd $(1)/usr/sbin/
+endef
+
+define Package/frr-ospf6d/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospf6d/.libs/ospf6d $(1)/usr/sbin/
+endef
+
+define Package/frr-pbrd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pbrd/.libs/pbrd $(1)/usr/sbin/
+endef
+
+define Package/frr-pimd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pimd/.libs/pimd $(1)/usr/sbin/
+endef
+
+define Package/frr-ripd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripd/.libs/ripd $(1)/usr/sbin/
+endef
+
+define Package/frr-ripngd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripngd/.libs/ripngd $(1)/usr/sbin/
+endef
+
+define Package/frr-staticd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/staticd/.libs/staticd $(1)/usr/sbin/
+endef
+
+define Package/frr-vrrpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vrrpd/.libs/vrrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-vtysh/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vtysh/.libs/vtysh $(1)/usr/bin/
+endef
+
+define Package/frr-libfrr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/build/lib/.libs/libfrr.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/etc/frr
+ chmod 0750 $(1)/etc/frr
+ $(INSTALL_CONF) ./files/{frr.conf,daemons} $(1)/etc/frr/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,frr))
+$(eval $(call BuildPackage,frr-babeld))
+$(eval $(call BuildPackage,frr-bfdd))
+$(eval $(call BuildPackage,frr-bgpd))
+$(eval $(call BuildPackage,frr-eigrpd))
+$(eval $(call BuildPackage,frr-fabricd))
+$(eval $(call BuildPackage,frr-isisd))
+$(eval $(call BuildPackage,frr-ldpd))
+$(eval $(call BuildPackage,frr-libfrr))
+$(eval $(call BuildPackage,frr-nhrpd))
+$(eval $(call BuildPackage,frr-ospfd))
+$(eval $(call BuildPackage,frr-ospf6d))
+$(eval $(call BuildPackage,frr-pbrd))
+$(eval $(call BuildPackage,frr-pimd))
+$(eval $(call BuildPackage,frr-ripd))
+$(eval $(call BuildPackage,frr-ripngd))
+$(eval $(call BuildPackage,frr-staticd))
+$(eval $(call BuildPackage,frr-vtysh))
+$(eval $(call BuildPackage,frr-watchfrr))
+$(eval $(call BuildPackage,frr-zebra))
--- /dev/null
+# The watchfrr and zebra daemons are always started.
+#
+bgpd=no
+ospfd=no
+#ospfd_instances=1,20
+ospf6d=no
+ripd=no
+ripngd=no
+isisd=no
+pimd=no
+ldpd=no
+nhrpd=no
+eigrpd=no
+babeld=no
+sharpd=no
+pbrd=no
+bfdd=no
+fabricd=no
+vrrpd=no
+
+#
+# If this option is set the /etc/init.d/frr script automatically loads
+# the config via "vtysh -b" when the servers are started.
+# Check /etc/pam.d/frr if you intend to use "vtysh"!
+#
+vtysh_enable=yes
+zebra_options=" -A 127.0.0.1 -s 90000000"
+bgpd_options=" -A 127.0.0.1"
+ospfd_options=" -A 127.0.0.1"
+ospf6d_options=" -A ::1"
+ripd_options=" -A 127.0.0.1"
+ripngd_options=" -A ::1"
+isisd_options=" -A 127.0.0.1"
+pimd_options=" -A 127.0.0.1"
+ldpd_options=" -A 127.0.0.1"
+nhrpd_options=" -A 127.0.0.1"
+eigrpd_options=" -A 127.0.0.1"
+babeld_options=" -A 127.0.0.1"
+sharpd_options=" -A 127.0.0.1"
+pbrd_options=" -A 127.0.0.1"
+staticd_options="-A 127.0.0.1"
+bfdd_options=" -A 127.0.0.1"
+fabricd_options="-A 127.0.0.1"
+vrrpd_options=" -A 127.0.0.1"
+
+# The list of daemons to watch is automatically generated by the init script.
+#watchfrr_options=""
+
+# for debugging purposes, you can specify a "wrap" command to start instead
+# of starting the daemon directly, e.g. to use valgrind on ospfd:
+# ospfd_wrap="/usr/bin/valgrind"
+# or you can use "all_wrap" for all daemons, e.g. to use perf record:
+# all_wrap="/usr/bin/perf record --call-graph -"
+# the normal daemon command is added to this at the end.
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=95
+
+log_success_msg() {
+ echo "$@"
+}
+log_warning_msg() {
+ echo "$@" >&2
+}
+log_failure_msg() {
+ echo "$@" >&2
+}
+
+self="`dirname $0`"
+if [ -r "$self/frrcommon.sh" ]; then
+ . "$self/frrcommon.sh"
+else
+ . "/usr/sbin/frrcommon.sh"
+fi
+
+
+start() {
+ daemon_list daemons
+ watchfrr_options="$watchfrr_options $daemons"
+ daemon_start watchfrr
+}
+stop() {
+ daemon_stop watchfrr
+ all_stop --reallyall
+ exit ${still_running:-0}
+}
+
+restart() {
+ daemon_stop watchfrr
+ all_stop --reallyall
+
+ daemon_list daemons
+ watchfrr_options="$watchfrr_options $daemons"
+ daemon_start watchfrr
+}
+
+status() {
+ fail=0
+ print_status watchfrr || fail=1
+ all_status || fail=1
+ exit $fail
+}
+
+reload() {
+ if [ ! -x "$RELOAD_SCRIPT" ]; then
+ log_failure_msg "The frr-pythontools package is required for reload functionality."
+ exit 1
+ fi
+
+ # restart watchfrr to pick up added daemons.
+ # NB: This will NOT cause the other daemons to be restarted.
+ daemon_list daemons
+ watchfrr_options="$watchfrr_options $daemons"
+ daemon_stop watchfrr && \
+ daemon_start watchfrr
+
+ NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}"
+ [ ! -r $NEW_CONFIG_FILE ] && log_failure_msg "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
+ "$RELOAD_SCRIPT" --reload "$NEW_CONFIG_FILE"
+ exit $?
+}
+
--- /dev/null
+password zebra
+!
+!router eigrp 1
+! network 10.0.0.0/8
+! network 192.168.1.0/24
+!
+!router ospf
+!ospf router-id 172.16.0.2
+!network 192.168.1.0/24 area 0
+!neighbor 172.16.0.1
+!
+!router rip
+! network 10.0.0.0/8
+! network 192.168.1.0/24
+!
+log syslog
+!
+access-list vty permit 127.0.0.0/8
+access-list vty deny any
+!
+line vty
+ access-class vty
--- /dev/null
+#!/bin/sh
+#
+#
+# This is a "library" of sorts for use by the other FRR shell scripts. It
+# has most of the daemon start/stop logic, but expects the following shell
+# functions/commands to be provided by the "calling" script:
+#
+# log_success_msg
+# log_warning_msg
+# log_failure_msg
+#
+# (coincidentally, these are LSB standard functions.)
+#
+# Sourcing this file in a shell script will load FRR config variables but
+# not perform any action. Note there is an "exit 1" if the main config
+# file does not exist.
+#
+# This script should be installed in /usr/sbin/frrcommon.sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+D_PATH="/usr/sbin" # /usr/lib/frr
+C_PATH="/etc/frr" # /etc/frr
+V_PATH="/var/run/frr" # /var/run/frr
+VTYSH="/usr/bin/vtysh" # /usr/bin/vtysh
+FRR_USER="network" # frr
+FRR_GROUP="network" # frr
+FRR_VTY_GROUP="" # frrvty
+
+# ORDER MATTERS FOR $DAEMONS!
+# - keep zebra first
+# - watchfrr does NOT belong in this list
+
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd fabricd vrrpd"
+RELOAD_SCRIPT="$D_PATH/frr-reload.py"
+
+#
+# general helpers
+#
+
+debug() {
+ [ -n "$watchfrr_debug" ] || return 0
+
+ printf '%s %s(%s):' "`date +%Y-%m-%dT%H:%M:%S.%N`" "$0" $$ >&2
+ # this is to show how arguments are split regarding whitespace & co.
+ # (e.g. for use with `debug "message" "$@"`)
+ while [ $# -gt 0 ]; do
+ printf ' "%s"' "$1" >&2
+ shift
+ done
+ printf '\n' >&2
+}
+
+chownfrr() {
+ [ -n "$FRR_USER" ] && chown "$FRR_USER" "$1"
+ [ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1"
+}
+
+vtysh_b () {
+ [ "$1" = "watchfrr" ] && return 0
+ [ -r "$C_PATH/frr.conf" ] || return 0
+ if [ -n "$1" ]; then
+ "$VTYSH" -b -n -d "$1"
+ else
+ "$VTYSH" -b -n
+ fi
+}
+
+daemon_inst() {
+ # note this sets global variables ($dmninst, $daemon, $inst)
+ dmninst="$1"
+ daemon="${dmninst%-*}"
+ inst=""
+ [ "$daemon" != "$dmninst" ] && inst="${dmninst#*-}"
+}
+
+daemon_list() {
+ # note $1 and $2 specify names for global variables to be set
+ local enabled disabled evar dvar
+ enabled=""
+ disabled=""
+ evar="$1"
+ dvar="$2"
+
+ for daemon in $DAEMONS; do
+ eval cfg=\$$daemon
+ eval inst=\$${daemon}_instances
+ [ "$daemon" = zebra -o "$daemon" = staticd ] && cfg=yes
+ if [ -n "$cfg" -a "$cfg" != "no" -a "$cfg" != "0" ]; then
+ if ! daemon_prep "$daemon" "$inst"; then
+ continue
+ fi
+ debug "$daemon enabled"
+ enabled="$enabled $daemon"
+ if [ -n "$inst" ]; then
+ debug "$daemon multi-instance $inst"
+ oldifs="${IFS}"
+ IFS="${IFS},"
+ for i in $inst; do
+ enabled="$enabled $daemon-$i"
+ done
+ IFS="${oldifs}"
+ fi
+ else
+ debug "$daemon disabled"
+ disabled="$disabled $daemon"
+ fi
+ done
+
+ enabled="${enabled# }"
+ disabled="${disabled# }"
+ [ -z "$evar" ] && echo "$enabled"
+ [ -n "$evar" ] && eval $evar="\"$enabled\""
+ [ -n "$dvar" ] && eval $dvar="\"$disabled\""
+}
+
+#
+# individual daemon management
+#
+
+daemon_prep() {
+ local daemon inst cfg
+ daemon="$1"
+ inst="$2"
+ [ "$daemon" = "watchfrr" ] && return 0
+ [ -x "$D_PATH/$daemon" ] || {
+ log_failure_msg "cannot start $daemon${inst:+ (instance $inst)}: daemon binary not installed"
+ return 1
+ }
+ [ -r "$C_PATH/frr.conf" ] && return 0
+
+ cfg="$C_PATH/$daemon${inst:+-$inst}.conf"
+ if [ ! -r "$cfg" ]; then
+ touch "$cfg"
+ chownfrr "$cfg"
+ fi
+ return 0
+}
+
+daemon_start() {
+ local dmninst daemon inst args instopt wrap bin
+ daemon_inst "$1"
+
+ ulimit -n $MAX_FDS > /dev/null 2> /dev/null
+ daemon_prep "$daemon" "$inst" || return 1
+ if test ! -d "$V_PATH"; then
+ mkdir -p "$V_PATH"
+ chown frr "$V_PATH"
+ fi
+
+ eval wrap="\$${daemon}_wrap"
+ bin="$D_PATH/$daemon"
+ instopt="${inst:+-n $inst}"
+ eval args="\$${daemon}_options"
+
+ if eval "$all_wrap $wrap $bin -d $instopt $args"; then
+ log_success_msg "Started $dmninst"
+ vtysh_b "$daemon"
+ else
+ log_failure_msg "Failed to start $dmninst!"
+ fi
+}
+
+daemon_stop() {
+ local dmninst daemon inst pidfile vtyfile pid cnt fail
+ daemon_inst "$1"
+
+ pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
+ vtyfile="$V_PATH/$daemon${inst:+-$inst}.vty"
+
+ [ -r "$pidfile" ] || fail="pid file not found"
+ [ -z "$fail" ] && pid="`cat \"$pidfile\"`"
+ [ -z "$fail" -a -z "$pid" ] && fail="pid file is empty"
+ [ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running"
+
+ if [ -n "$fail" ]; then
+ log_failure_msg "Cannot stop $dmninst: $fail"
+ return 1
+ fi
+
+ debug "kill -2 $pid"
+ kill -2 "$pid"
+ cnt=1200
+ while kill -0 "$pid" 2>/dev/null; do
+ sleep 1
+ [ $(( cnt -= 1 )) -gt 0 ] || break
+ done
+ if kill -0 "$pid" 2>/dev/null; then
+ log_failure_msg "Failed to stop $dmninst, pid $pid still running"
+ still_running=1
+ return 1
+ else
+ log_success_msg "Stopped $dmninst"
+ rm -f "$pidfile"
+ return 0
+ fi
+}
+
+daemon_status() {
+ local dmninst daemon inst pidfile pid fail
+ daemon_inst "$1"
+
+ pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
+
+ [ -r "$pidfile" ] || return 3
+ pid="`cat \"$pidfile\"`"
+ [ -z "$pid" ] && return 1
+ kill -0 "$pid" 2>/dev/null || return 1
+ return 0
+}
+
+print_status() {
+ daemon_status "$1"
+ rv=$?
+ if [ "$rv" -eq 0 ]; then
+ log_success_msg "Status of $1: running"
+ else
+ log_failure_msg "Status of $1: FAILED"
+ fi
+ return $rv
+}
+
+#
+# all-daemon commands
+#
+
+all_start() {
+ daemon_list daemons
+ for dmninst in $daemons; do
+ daemon_start "$dmninst"
+ done
+}
+
+all_stop() {
+ local pids reversed
+
+ daemon_list daemons disabled
+ [ "$1" = "--reallyall" ] && daemons="$daemons $disabled"
+
+ reversed=""
+ for dmninst in $daemons; do
+ reversed="$dmninst $reversed"
+ done
+
+ for dmninst in $reversed; do
+ daemon_stop "$dmninst" &
+ pids="$pids $!"
+ done
+ for pid in $pids; do
+ wait $pid
+ done
+}
+
+all_status() {
+ local fail
+
+ daemon_list daemons
+ fail=0
+ for dmninst in $daemons; do
+ print_status "$dmninst" || fail=1
+ done
+ return $fail
+}
+
+#
+# config sourcing
+#
+
+load_old_config() {
+ oldcfg="$1"
+ [ -r "$oldcfg" ] || return 0
+ [ -s "$oldcfg" ] || return 0
+ grep -v '^[[:blank:]]*\(#\|$\)' "$oldcfg" > /dev/null || return 0
+
+ log_warning_msg "Reading deprecated $oldcfg. Please move its settings to $C_PATH/daemons and remove it."
+
+ # save off settings from daemons for the OR below
+ for dmn in $DAEMONS; do eval "_new_$dmn=\${$dmn:-no}"; done
+
+ . "$oldcfg"
+
+ # OR together the daemon enabling options between config files
+ for dmn in $DAEMONS; do eval "test \$_new_$dmn != no && $dmn=\$_new_$dmn; unset _new_$dmn"; done
+}
+
+[ -r "$C_PATH/daemons" ] || {
+ log_failure_msg "cannot run $@: $C_PATH/daemons does not exist"
+ exit 1
+}
+. "$C_PATH/daemons"
+
+load_old_config "$C_PATH/daemons.conf"
+load_old_config "/etc/default/frr"
+load_old_config "/etc/sysconfig/frr"
+
+if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then
+ log_warning_msg "watchfrr_options contains a bash array value." \
+ "The configured value is intentionally ignored since it is likely wrong." \
+ "Please remove or fix the setting."
+ unset watchfrr_options
+fi
+
+#
+# other defaults and dispatch
+#
+
+frrcommon_main() {
+ local cmd
+
+ debug "frrcommon_main" "$@"
+
+ cmd="$1"
+ shift
+
+ if [ "$1" = "all" -o -z "$1" ]; then
+ case "$cmd" in
+ start) all_start;;
+ stop) all_stop;;
+ restart)
+ all_stop
+ all_start
+ ;;
+ *) $cmd "$@";;
+ esac
+ else
+ case "$cmd" in
+ start) daemon_start "$@";;
+ stop) daemon_stop "$@";;
+ restart)
+ daemon_stop "$@"
+ daemon_start "$@"
+ ;;
+ *) $cmd "$@";;
+ esac
+ fi
+}
--- /dev/null
+#!/bin/sh
+#
+# This is NOT the init script! This is the watchfrr start/stop/restart
+# command handler, passed to watchfrr with the -s/-r/-k commands. It is used
+# internally by watchfrr to start the protocol daemons with the appropriate
+# options.
+#
+# This script should be installed in /usr/sbin/watchfrr.sh
+
+log_success_msg() {
+ :
+}
+
+log_warning_msg() {
+ echo "$@" >&2
+ [ -x /usr/bin/logger ] && echo "$@" \
+ | /usr/bin/logger -t watchfrr.sh -p daemon.warn
+}
+
+log_failure_msg() {
+ echo "$@" >&2
+ [ -x /usr/bin/logger ] && echo "$@" \
+ | /usr/bin/logger -t watchfrr.sh -p daemon.err
+}
+
+self="`dirname $0`"
+if [ -r "$self/frrcommon.sh" ]; then
+ . "$self/frrcommon.sh"
+else
+ . "/usr/sbin/frrcommon.sh"
+fi
+
+chownfrr $V_PATH
+
+frrcommon_main "$@"
--- /dev/null
+--- a/lib/prefix.h 2017-12-03 22:02:41.642317377 +0200
++++ b/lib/prefix.h 2017-12-03 22:03:30.011320262 +0200
+@@ -24,12 +24,12 @@
+
+ #ifdef SUNOS_5
+ #include <sys/ethernet.h>
+-#else
++/*#else
+ #ifdef GNU_LINUX
+ #include <net/ethernet.h>
+ #else
+ #include <netinet/if_ether.h>
+-#endif
++#endif*/
+ #endif
+ #include "sockunion.h"
+ #include "ipaddr.h"
PKG_HASH:=f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:cipherdyne:fwknop
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
+PKG_CPE_ID:=cpe:/a:git:git
+
include $(INCLUDE_DIR)/package.mk
define Package/git/Default
PKG_HASH:=2166a61b14de19e605b14f4a13a070fbfd5ecd247b6fd725108f111198a2c121
PKG_SOURCE_URL:=https://codeload.github.com/sitaramc/gitolite/tar.gz/v$(PKG_VERSION)?
+PKG_CPE_ID:=cpe:/a:sitaram_chamarty:gitolite
+
include $(INCLUDE_DIR)/package.mk
define Package/gitolite
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_CPE_ID:=cpe:/a:gnunet:gnunet
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=gettext-version
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=2.0.5
+PKG_VERSION:=2.0.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.haproxy.org/download/2.0/src
-PKG_HASH:=3f2e0d40af66dd6df1dc2f6055d3de106ba62836d77b4c2e497a82a4bdbc5422
+PKG_HASH:=01e1da09452010111107ca1b3a8b7f1927731ba0fe4380bacae1c626fdc521e4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
Christian Lachner <gladiac@gmail.com>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:haproxy:haproxy
include $(INCLUDE_DIR)/package.mk
#!/bin/sh
CLONEURL=https://git.haproxy.org/git/haproxy-2.0.git
-BASE_TAG=v2.0.5
+BASE_TAG=v2.0.6
TMP_REPODIR=tmprepo
PATCHESDIR=patches
--- /dev/null
+commit be17bb8fc37db4e12ea24c9480ff6442017ff656
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Fri Sep 13 15:15:56 2019 +0200
+
+ BUG/MEDIUM: stick-table: Properly handle "show table" with a data type argument
+
+ Since the commit 1b8e68e8 ("MEDIUM: stick-table: Stop handling stick-tables as
+ proxies."), the target field into the table context of the CLI applet was not
+ anymore a pointer to a proxy. It was replaced by a pointer to a stktable. But,
+ some parts of the code was not updated accordingly. the function
+ table_prepare_data_request() still tries to cast it to a pointer to a proxy. The
+ result is totally undefined. With a bit of luck, when the "show table" command
+ is used with a data type, we failed to find a table and the error "Data type not
+ stored in this table" is returned. But crashes may also be experienced.
+
+ This patch fixes the issue #262. It must be backported to 2.0.
+
+ (cherry picked from commit 4e9a83349a9b523830f79f9632ef777ab0bfcc9d)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/stick_table.c b/src/stick_table.c
+index 4b04f18c..8528baa0 100644
+--- a/src/stick_table.c
++++ b/src/stick_table.c
+@@ -3601,8 +3601,7 @@ static int table_prepare_data_request(struct appctx *appctx, char **args)
+ return 1;
+ }
+
+- if (!((struct proxy *)appctx->ctx.table.target)->table ||
+- !((struct proxy *)appctx->ctx.table.target)->table->data_ofs[appctx->ctx.table.data_type]) {
++ if (!((struct stktable *)appctx->ctx.table.target)->data_ofs[appctx->ctx.table.data_type]) {
+ appctx->ctx.cli.severity = LOG_ERR;
+ appctx->ctx.cli.msg = "Data type not stored in this table\n";
+ appctx->st0 = CLI_ST_PRINT;
+++ /dev/null
-commit 3a761682a65e7e7f7baf172f58b15e567a685387
-Author: Willy Tarreau <w@1wt.eu>
-Date: Wed Aug 21 14:12:19 2019 +0200
-
- MINOR: debug: indicate the applet name when the task is task_run_applet()
-
- This allows to figure what applet is currently being executed (and likely
- hung).
-
- (cherry picked from commit a512b02f67a30ab5519d04f8c8b1263415321c85)
- [wt: backported to improve troubleshooting when the watchdog fires]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/debug.c b/src/debug.c
-index 3077e97c..36cc9e71 100644
---- a/src/debug.c
-+++ b/src/debug.c
-@@ -90,6 +90,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid)
- void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
- {
- const struct stream *s = NULL;
-+ const struct appctx __maybe_unused *appctx = NULL;
-
- if (!task) {
- chunk_appendf(buf, "0\n");
-@@ -110,7 +111,7 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
- task->call_date ? " ns ago" : "");
-
- chunk_appendf(buf, "%s"
-- " fct=%p (%s) ctx=%p\n",
-+ " fct=%p (%s) ctx=%p",
- pfx,
- task->process,
- task->process == process_stream ? "process_stream" :
-@@ -119,6 +120,11 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
- "?",
- task->context);
-
-+ if (task->process == task_run_applet && (appctx = task->context))
-+ chunk_appendf(buf, "(%s)\n", appctx->applet->name);
-+ else
-+ chunk_appendf(buf, "\n");
-+
- if (task->process == process_stream && task->context)
- s = (struct stream *)task->context;
- else if (task->process == task_run_applet && task->context)
--- /dev/null
+commit 0e01256a314a6f432ab9826dc9b862e8159dbc48
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Wed Sep 18 11:07:20 2019 +0200
+
+ BUG/MINOR: mux-h2: Be sure to have a connection to unsubcribe
+
+ When the mux is released, It must own the connection to unsubcribe.
+ This patch must be backported to 2.0.
+
+ (cherry picked from commit 21d849f52fc64c51e5abf5a8bd69f2aeff8b3125)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/mux_h2.c b/src/mux_h2.c
+index 984a81bd..e6bfd03d 100644
+--- a/src/mux_h2.c
++++ b/src/mux_h2.c
+@@ -677,9 +677,9 @@ static void h2_release(struct h2c *h2c)
+ }
+ if (h2c->wait_event.tasklet)
+ tasklet_free(h2c->wait_event.tasklet);
+- if (h2c->wait_event.events != 0)
++ if (conn && h2c->wait_event.events != 0)
+ conn->xprt->unsubscribe(conn, conn->xprt_ctx, h2c->wait_event.events,
+- &h2c->wait_event);
++ &h2c->wait_event);
+
+ pool_free(pool_head_h2c, h2c);
+ }
+++ /dev/null
-commit fe575b5ca645d6751fba56efa907952eda200b09
-Author: Willy Tarreau <w@1wt.eu>
-Date: Wed Aug 21 13:17:37 2019 +0200
-
- MINOR: tools: add append_prefixed_str()
-
- This is somewhat related to indent_msg() except that this one places a
- known prefix at the beginning of each line, allows to replace the EOL
- character, and not to insert a prefix on the first line if not desired.
- It works with a normal output buffer/chunk so it doesn't need to allocate
- anything nor to modify the input string. It is suitable for use in multi-
- line backtraces.
-
- (cherry picked from commit a2c9911ace8537e0a350daf8d981170a001b6c7a)
- [wt: backported to improve troubleshooting when the watchdog fires]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/include/common/standard.h b/include/common/standard.h
-index 0f4b1870..cdefc9f5 100644
---- a/include/common/standard.h
-+++ b/include/common/standard.h
-@@ -1238,6 +1238,7 @@ char *memprintf(char **out, const char *format, ...)
- * free(err);
- */
- char *indent_msg(char **out, int level);
-+int append_prefixed_str(struct buffer *out, const char *in, const char *pfx, char eol, int first);
-
- /* removes environment variable <name> from the environment as found in
- * environ. This is only provided as an alternative for systems without
-diff --git a/src/standard.c b/src/standard.c
-index 2f205f74..717c14a9 100644
---- a/src/standard.c
-+++ b/src/standard.c
-@@ -3709,6 +3709,41 @@ char *indent_msg(char **out, int level)
- return ret;
- }
-
-+/* makes a copy of message <in> into <out>, with each line prefixed with <pfx>
-+ * and end of lines replaced with <eol> if not 0. The first line to indent has
-+ * to be indicated in <first> (starts at zero), so that it is possible to skip
-+ * indenting the first line if it has to be appended after an existing message.
-+ * Empty strings are never indented, and NULL strings are considered empty both
-+ * for <in> and <pfx>. It returns non-zero if an EOL was appended as the last
-+ * character, non-zero otherwise.
-+ */
-+int append_prefixed_str(struct buffer *out, const char *in, const char *pfx, char eol, int first)
-+{
-+ int bol, lf;
-+ int pfxlen = pfx ? strlen(pfx) : 0;
-+
-+ if (!in)
-+ return 0;
-+
-+ bol = 1;
-+ lf = 0;
-+ while (*in) {
-+ if (bol && pfxlen) {
-+ if (first > 0)
-+ first--;
-+ else
-+ b_putblk(out, pfx, pfxlen);
-+ bol = 0;
-+ }
-+
-+ lf = (*in == '\n');
-+ bol |= lf;
-+ b_putchr(out, (lf && eol) ? eol : *in);
-+ in++;
-+ }
-+ return lf;
-+}
-+
- /* removes environment variable <name> from the environment as found in
- * environ. This is only provided as an alternative for systems without
- * unsetenv() (old Solaris and AIX versions). THIS IS NOT THREAD SAFE.
--- /dev/null
+commit 96b88f2e605e76f2a472cf9fa83398ff242d47bb
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Mon Sep 23 15:28:20 2019 +0200
+
+ BUG/MAJOR: mux-h2: Handle HEADERS frames received after a RST_STREAM frame
+
+ As stated in the RFC7540#5.1, an endpoint that receives any frame other than
+ PRIORITY after receiving a RST_STREAM MUST treat that as a stream error of type
+ STREAM_CLOSED. However, frames carrying compression state must still be
+ processed before being dropped to keep the HPACK decoder synchronized. This had
+ to be the purpose of the commit 8d9ac3ed8b ("BUG/MEDIUM: mux-h2: do not abort
+ HEADERS frame before decoding them"). But, the test on the frame type was
+ inverted.
+
+ This bug is major because desynchronizing the HPACK decoder leads to mixup
+ indexed headers in messages. From the time an HEADERS frame is received and
+ ignored for a closed stream, wrong headers may be sent to the following streams.
+
+ This patch may fix several bugs reported on github (#116, #290, #292). It must
+ be backported to 2.0 and 1.9.
+
+ (cherry picked from commit 6884aa3eb00d1a5eb6f9c81a3a00288c13652938)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/mux_h2.c b/src/mux_h2.c
+index e6bfd03d..eb773a26 100644
+--- a/src/mux_h2.c
++++ b/src/mux_h2.c
+@@ -2106,6 +2106,9 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
+ */
+ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
+ {
++ struct buffer rxbuf = BUF_NULL;
++ unsigned long long body_len = 0;
++ uint32_t flags = 0;
+ int error;
+
+ if (!b_size(&h2c->dbuf))
+@@ -2114,7 +2117,18 @@ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
+ if (b_data(&h2c->dbuf) < h2c->dfl && !b_full(&h2c->dbuf))
+ return NULL; // incomplete frame
+
+- error = h2c_decode_headers(h2c, &h2s->rxbuf, &h2s->flags, &h2s->body_len);
++ if (h2s->st != H2_SS_CLOSED) {
++ error = h2c_decode_headers(h2c, &h2s->rxbuf, &h2s->flags, &h2s->body_len);
++ }
++ else {
++ /* the connection was already killed by an RST, let's consume
++ * the data and send another RST.
++ */
++ error = h2c_decode_headers(h2c, &rxbuf, &flags, &body_len);
++ h2s_error(h2s, H2_ERR_STREAM_CLOSED);
++ h2c->st0 = H2_CS_FRAME_E;
++ goto send_rst;
++ }
+
+ /* unrecoverable error ? */
+ if (h2c->st0 >= H2_CS_ERROR)
+@@ -2150,6 +2164,15 @@ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
+ }
+
+ return h2s;
++
++ send_rst:
++ /* make the demux send an RST for the current stream. We may only
++ * do this if we're certain that the HEADERS frame was properly
++ * decompressed so that the HPACK decoder is still kept up to date.
++ */
++ h2_release_buf(h2c, &rxbuf);
++ h2c->st0 = H2_CS_FRAME_E;
++ return h2s;
+ }
+
+ /* processes a DATA frame. Returns > 0 on success or zero on missing data.
+@@ -2459,7 +2482,7 @@ static void h2_process_demux(struct h2c *h2c)
+ goto strm_err;
+ }
+
+- if (h2s->flags & H2_SF_RST_RCVD && h2_ft_bit(h2c->dft) & H2_FT_HDR_MASK) {
++ if (h2s->flags & H2_SF_RST_RCVD && !(h2_ft_bit(h2c->dft) & H2_FT_HDR_MASK)) {
+ /* RFC7540#5.1:closed: an endpoint that
+ * receives any frame other than PRIORITY after
+ * receiving a RST_STREAM MUST treat that as a
+++ /dev/null
-commit 83a5ff403a2cd625832f01032c0feb8bf9c2a89e
-Author: Willy Tarreau <w@1wt.eu>
-Date: Wed Aug 21 14:14:50 2019 +0200
-
- MINOR: lua: export applet and task handlers
-
- The current functions are seen outside from the debugging code and are
- convenient to export so that we can improve the thread dump output :
-
- void hlua_applet_tcp_fct(struct appctx *ctx);
- void hlua_applet_http_fct(struct appctx *ctx);
- struct task *hlua_process_task(struct task *task, void *context, unsigned short state);
-
- Of course they are only available when USE_LUA is defined.
-
- (cherry picked from commit 60409db0b1743d670e54244425f6e08c389b7dde)
- [wt: backported to improve troubleshooting when the watchdog fires;
- while in 2.0 we also have hlua_applet_htx_fct(), it's not
- visible outside hlua_applet_http_fct() so we don't care]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/include/proto/hlua.h b/include/proto/hlua.h
-index 7ad5a99e..32468b77 100644
---- a/include/proto/hlua.h
-+++ b/include/proto/hlua.h
-@@ -27,6 +27,9 @@
- void hlua_ctx_destroy(struct hlua *lua);
- void hlua_init();
- int hlua_post_init();
-+void hlua_applet_tcp_fct(struct appctx *ctx);
-+void hlua_applet_http_fct(struct appctx *ctx);
-+struct task *hlua_process_task(struct task *task, void *context, unsigned short state);
-
- #else /* USE_LUA */
-
-diff --git a/src/hlua.c b/src/hlua.c
-index d2708f87..813aa724 100644
---- a/src/hlua.c
-+++ b/src/hlua.c
-@@ -6237,7 +6237,7 @@ __LJMP static int hlua_set_nice(lua_State *L)
- * Task wrapper are longjmp safe because the only one Lua code
- * executed is the safe hlua_ctx_resume();
- */
--static struct task *hlua_process_task(struct task *task, void *context, unsigned short state)
-+struct task *hlua_process_task(struct task *task, void *context, unsigned short state)
- {
- struct hlua *hlua = context;
- enum hlua_exec status;
-@@ -7045,7 +7045,7 @@ static int hlua_applet_tcp_init(struct appctx *ctx, struct proxy *px, struct str
- return 1;
- }
-
--static void hlua_applet_tcp_fct(struct appctx *ctx)
-+void hlua_applet_tcp_fct(struct appctx *ctx)
- {
- struct stream_interface *si = ctx->owner;
- struct stream *strm = si_strm(si);
-@@ -7417,7 +7417,7 @@ static void hlua_applet_htx_fct(struct appctx *ctx)
- goto done;
- }
-
--static void hlua_applet_http_fct(struct appctx *ctx)
-+void hlua_applet_http_fct(struct appctx *ctx)
- {
- struct stream_interface *si = ctx->owner;
- struct stream *strm = si_strm(si);
--- /dev/null
+commit b143711afe833f9824a7372b88ef9435ff240e9a
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Sep 3 18:55:02 2019 +0200
+
+ BUG/MEDIUM: check/threads: make external checks run exclusively on thread 1
+
+ See GH issues #141 for all the context. In short, registered signal
+ handlers are not inherited by other threads during startup, which is
+ normally not a problem, except that we need that the same thread as
+ the one doing the fork() cleans up the old process using waitpid()
+ once its death is reported via SIGCHLD, as happens in external checks.
+
+ The only simple solution to this at the moment is to make sure that
+ external checks are exclusively run on the first thread, the one
+ which registered the signal handlers on startup. It will be far more
+ than enough anyway given that external checks must not require to be
+ load balanced on multiple threads! A more complex solution could be
+ designed over the long term to let each thread deal with all signals
+ but it sounds overkill.
+
+ This must be backported as far as 1.8.
+
+ (cherry picked from commit 6dd4ac890b5810b0f0fe81725fda05ad3d052849)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/checks.c b/src/checks.c
+index 7b55abda..b088da2e 100644
+--- a/src/checks.c
++++ b/src/checks.c
+@@ -2175,7 +2175,7 @@ static struct task *process_chk_proc(struct task *t, void *context, unsigned sho
+ /* a success was detected */
+ check_notify_success(check);
+ }
+- task_set_affinity(t, MAX_THREADS_MASK);
++ task_set_affinity(t, 1);
+ check->state &= ~CHK_ST_INPROGRESS;
+
+ pid_list_del(check->curpid);
+@@ -2423,8 +2423,13 @@ static int start_check_task(struct check *check, int mininter,
+ int nbcheck, int srvpos)
+ {
+ struct task *t;
++ unsigned long thread_mask = MAX_THREADS_MASK;
++
++ if (check->type == PR_O2_EXT_CHK)
++ thread_mask = 1;
++
+ /* task for the check */
+- if ((t = task_new(MAX_THREADS_MASK)) == NULL) {
++ if ((t = task_new(thread_mask)) == NULL) {
+ ha_alert("Starting [%s:%s] check: out of memory.\n",
+ check->server->proxy->id, check->server->id);
+ return 0;
+++ /dev/null
-commit 4856b36cba80a259a78645753520323caca78d0f
-Author: Willy Tarreau <w@1wt.eu>
-Date: Wed Aug 21 14:16:02 2019 +0200
-
- MEDIUM: debug: make the thread dump code show Lua backtraces
-
- When we dump a thread's state (show thread, panic) we don't know if
- anything is happening in Lua, which can be problematic especially when
- calling external functions. With this patch, the thread dump code can
- now detect if we're running in a global Lua task (hlua_process_task),
- or in a TCP or HTTP Lua service (task_run_applet and applet.fct ==
- hlua_applet_tcp_fct or http_applet_http_fct), or a fetch/converter
- from an analyser (s->hlua != NULL). In such situations, it's able to
- append a formatted Lua backtrace of the Lua execution path with
- function names, file names and line numbers.
-
- Note that a shorter alternative could be to call "luaL_where(hlua->T,0)"
- which only prints the current location, but it's not necessarily sufficient
- for complex code.
-
- (cherry picked from commit 78a7cb648ca33823c06430cedc6859ea7e7cd5df)
- [wt: backported to improve troubleshooting when the watchdog fires]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/debug.c b/src/debug.c
-index 36cc9e71..79bea884 100644
---- a/src/debug.c
-+++ b/src/debug.c
-@@ -26,6 +26,7 @@
-
- #include <proto/cli.h>
- #include <proto/fd.h>
-+#include <proto/hlua.h>
- #include <proto/stream_interface.h>
- #include <proto/task.h>
-
-@@ -91,6 +92,7 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
- {
- const struct stream *s = NULL;
- const struct appctx __maybe_unused *appctx = NULL;
-+ struct hlua __maybe_unused *hlua = NULL;
-
- if (!task) {
- chunk_appendf(buf, "0\n");
-@@ -117,6 +119,9 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
- task->process == process_stream ? "process_stream" :
- task->process == task_run_applet ? "task_run_applet" :
- task->process == si_cs_io_cb ? "si_cs_io_cb" :
-+#ifdef USE_LUA
-+ task->process == hlua_process_task ? "hlua_process_task" :
-+#endif
- "?",
- task->context);
-
-@@ -134,6 +139,30 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
-
- if (s)
- stream_dump(buf, s, pfx, '\n');
-+
-+#ifdef USE_LUA
-+ hlua = NULL;
-+ if (s && (hlua = s->hlua)) {
-+ chunk_appendf(buf, "%sCurrent executing Lua from a stream analyser -- ", pfx);
-+ }
-+ else if (task->process == hlua_process_task && (hlua = task->context)) {
-+ chunk_appendf(buf, "%sCurrent executing a Lua task -- ", pfx);
-+ }
-+ else if (task->process == task_run_applet && (appctx = task->context) &&
-+ (appctx->applet->fct == hlua_applet_tcp_fct && (hlua = appctx->ctx.hlua_apptcp.hlua))) {
-+ chunk_appendf(buf, "%sCurrent executing a Lua TCP service -- ", pfx);
-+ }
-+ else if (task->process == task_run_applet && (appctx = task->context) &&
-+ (appctx->applet->fct == hlua_applet_http_fct && (hlua = appctx->ctx.hlua_apphttp.hlua))) {
-+ chunk_appendf(buf, "%sCurrent executing a Lua HTTP service -- ", pfx);
-+ }
-+
-+ if (hlua) {
-+ luaL_traceback(hlua->T, hlua->T, NULL, 0);
-+ if (!append_prefixed_str(buf, lua_tostring(hlua->T, -1), pfx, '\n', 1))
-+ b_putchr(buf, '\n');
-+ }
-+#endif
- }
-
- /* This function dumps all profiling settings. It returns 0 if the output
+++ /dev/null
-commit 9a408abbb8559df5718bc696bd9c3934c6500d63
-Author: Willy Tarreau <w@1wt.eu>
-Date: Fri Aug 23 08:11:36 2019 +0200
-
- BUG/MEDIUM: mux-h1: do not truncate trailing 0CRLF on buffer boundary
-
- The H1 message parser calls the various message block parsers with an
- offset indicating where in the buffer to start from, and only consumes
- the data at the end of the parsing. The headers and trailers parsers
- have a condition detecting if a headers or trailers block is too large
- to fit into the buffer. This is detected by an incomplete block while
- the buffer is full. Unfortunately it doesn't take into account the fact
- that the block may be parsed after other blocks that are still present
- in the buffer, resulting in aborting some transfers early as reported
- in issue #231. This typically happens if a trailers block is incomplete
- at the end of a buffer full of data, which typically happens with data
- sizes multiple of the buffer size minus less than the trailers block
- size. It also happens with the CRLF that follows the 0-sized chunk of
- any transfer-encoded contents is itself on such a boundary since this
- CRLF is technically part of the trailers block. This can be reproduced
- by asking a server to retrieve exactly 31532 or 31533 bytes of static
- data using chunked encoding with curl, which reports:
-
- transfer closed with outstanding read data remaining
-
- This issue was revealed in 2.0 and does not affect 1.9 because in 1.9
- the trailers block was processed at once as part of the data block
- processing, and would simply give up and wait for the rest of the data
- to arrive.
-
- It's interesting to note that the headers block parsing is also affected
- by this issue but in practice it has a much more limited impact since a
- headers block is normally only parsed at the beginning of a buffer. The
- only case where it seems to matter is when dealing with a response buffer
- full of 100-continue header blocks followed by a regular header block,
- which will then be rejected for the same reason.
-
- This fix must be backported to 2.0 and partially to 1.9 (the headers
- block part).
-
- (cherry picked from commit 347f464d4e5a8a2bf3acd2411a6c8228e605e7f6)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/mux_h1.c b/src/mux_h1.c
-index fa694c41..01f225a2 100644
---- a/src/mux_h1.c
-+++ b/src/mux_h1.c
-@@ -995,10 +995,11 @@ static size_t h1_process_headers(struct h1s *h1s, struct h1m *h1m, struct htx *h
- ret = h1_headers_to_hdr_list(b_peek(buf, *ofs), b_tail(buf),
- hdrs, sizeof(hdrs)/sizeof(hdrs[0]), h1m, &h1sl);
- if (ret <= 0) {
-- /* Incomplete or invalid message. If the buffer is full, it's an
-- * error because headers are too large to be handled by the
-- * parser. */
-- if (ret < 0 || (!ret && !buf_room_for_htx_data(buf)))
-+ /* Incomplete or invalid message. If the input buffer only
-+ * contains headers and is full, which is detected by it being
-+ * full and the offset to be zero, it's an error because
-+ * headers are too large to be handled by the parser. */
-+ if (ret < 0 || (!ret && !*ofs && !buf_room_for_htx_data(buf)))
- goto error;
- goto end;
- }
-@@ -1339,10 +1340,11 @@ static size_t h1_process_trailers(struct h1s *h1s, struct h1m *h1m, struct htx *
- ret = h1_headers_to_hdr_list(b_peek(buf, *ofs), b_tail(buf),
- hdrs, sizeof(hdrs)/sizeof(hdrs[0]), &tlr_h1m, NULL);
- if (ret <= 0) {
-- /* Incomplete or invalid trailers. If the buffer is full, it's
-- * an error because traliers are too large to be handled by the
-- * parser. */
-- if (ret < 0 || (!ret && !buf_room_for_htx_data(buf)))
-+ /* Incomplete or invalid trailers. If the input buffer only
-+ * contains trailers and is full, which is detected by it being
-+ * full and the offset to be zero, it's an error because
-+ * trailers are too large to be handled by the parser. */
-+ if (ret < 0 || (!ret && !*ofs && !buf_room_for_htx_data(buf)))
- goto error;
- goto end;
- }
--- /dev/null
+commit cfdef9f428869f1570d51a5bd8975d8a42f31eab
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Mon Sep 23 15:57:29 2019 +0200
+
+ BUG/MINOR: stream-int: Process connection/CS errors first in si_cs_send()
+
+ Errors on the connections or the conn-stream must always be processed in
+ si_cs_send(), even if the stream-interface is already subscribed on
+ sending. This patch does not fix any concrete bug per-se. But it is required by
+ the following one to handle those errors during synchronous sends.
+
+ This patch must be backported with the following one to 2.0 and probably to 1.9
+ too, but with caution because the code is really different.
+
+ (cherry picked from commit 328ed220a8c5211aa8b6f37b982f319cf6b3f3d1)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/stream_interface.c b/src/stream_interface.c
+index 7d89cc90..4130444e 100644
+--- a/src/stream_interface.c
++++ b/src/stream_interface.c
+@@ -652,10 +652,6 @@ int si_cs_send(struct conn_stream *cs)
+ int ret;
+ int did_send = 0;
+
+- /* We're already waiting to be able to send, give up */
+- if (si->wait_event.events & SUB_RETRY_SEND)
+- return 0;
+-
+ if (conn->flags & CO_FL_ERROR || cs->flags & (CS_FL_ERROR|CS_FL_ERR_PENDING)) {
+ /* We're probably there because the tasklet was woken up,
+ * but process_stream() ran before, detected there were an
+@@ -669,6 +665,10 @@ int si_cs_send(struct conn_stream *cs)
+ return 1;
+ }
+
++ /* We're already waiting to be able to send, give up */
++ if (si->wait_event.events & SUB_RETRY_SEND)
++ return 0;
++
+ /* we might have been called just after an asynchronous shutw */
+ if (conn->flags & CO_FL_SOCK_WR_SH || oc->flags & CF_SHUTW)
+ return 1;
+++ /dev/null
-commit 620381599324e15403002270637a3b677c3fe7e5
-Author: Willy Tarreau <w@1wt.eu>
-Date: Fri Aug 23 09:29:29 2019 +0200
-
- BUG/MEDIUM: mux-h1: do not report errors on transfers ending on buffer full
-
- If a receipt ends with the HTX buffer full and everything is completed except
- appending the HTX EOM block, we end up detecting an error because the H1
- parser did not switch to H1_MSG_DONE yet while all conditions for an end of
- stream and end of buffer are met. This can be detected by retrieving 31532
- or 31533 chunk-encoded bytes over H1 and seeing haproxy log "SD--" at the
- end of a successful transfer.
-
- Ideally the EOM part should be totally independent on the H1 message state
- since the block was really parsed and finished. So we should switch to a
- last state requiring to send only EOM. However this needs a few risky
- changes. This patch aims for simplicity and backport safety, thus it only
- adds a flag to the H1 stream indicating that an EOM is still needed, and
- excludes this condition from the ones used to detect end of processing. A
- cleaner approach needs to be studied, either by adding a state before DONE
- or by setting DONE once the various blocks are parsed and before trying to
- send EOM.
-
- This fix must be backported to 2.0. The issue does not seem to affect 1.9
- though it is not yet known why, probably that it is related to the different
- encoding of trailers which always leaves a bit of room to let EOM be stored.
-
- (cherry picked from commit 0bb5a5c4b5ad375b1254c2e8bec2dd5ea85d6ebb)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/mux_h1.c b/src/mux_h1.c
-index 01f225a2..b9a37ce5 100644
---- a/src/mux_h1.c
-+++ b/src/mux_h1.c
-@@ -67,7 +67,8 @@
- #define H1S_F_BUF_FLUSH 0x00000100 /* Flush input buffer and don't read more data */
- #define H1S_F_SPLICED_DATA 0x00000200 /* Set when the kernel splicing is in used */
- #define H1S_F_HAVE_I_TLR 0x00000800 /* Set during input process to know the trailers were processed */
--/* 0x00001000 .. 0x00002000 unused */
-+#define H1S_F_APPEND_EOM 0x00001000 /* Send EOM to the HTX buffer */
-+/* 0x00002000 .. 0x00002000 unused */
- #define H1S_F_HAVE_O_CONN 0x00004000 /* Set during output process to know connection mode was processed */
-
- /* H1 connection descriptor */
-@@ -954,9 +955,12 @@ static size_t h1_eval_htx_res_size(struct h1m *h1m, union h1_sl *h1sl, struct ht
- */
- static size_t h1_process_eom(struct h1s *h1s, struct h1m *h1m, struct htx *htx, size_t max)
- {
-- if (max < sizeof(struct htx_blk) + 1 || !htx_add_endof(htx, HTX_BLK_EOM))
-+ if (max < sizeof(struct htx_blk) + 1 || !htx_add_endof(htx, HTX_BLK_EOM)) {
-+ h1s->flags |= H1S_F_APPEND_EOM;
- return 0;
-+ }
-
-+ h1s->flags &= ~H1S_F_APPEND_EOM;
- h1m->state = H1_MSG_DONE;
- h1s->cs->flags |= CS_FL_EOI;
- return (sizeof(struct htx_blk) + 1);
-@@ -1472,7 +1476,8 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
- else if (h1s_data_pending(h1s) && !htx_is_empty(htx))
- h1s->cs->flags |= CS_FL_RCV_MORE | CS_FL_WANT_ROOM;
-
-- if ((h1s->flags & H1S_F_REOS) && (!h1s_data_pending(h1s) || htx_is_empty(htx))) {
-+ if (((h1s->flags & (H1S_F_REOS|H1S_F_APPEND_EOM)) == H1S_F_REOS) &&
-+ (!h1s_data_pending(h1s) || htx_is_empty(htx))) {
- h1s->cs->flags |= CS_FL_EOS;
- if (h1m->state > H1_MSG_LAST_LF && h1m->state < H1_MSG_DONE)
- h1s->cs->flags |= CS_FL_ERROR;
--- /dev/null
+commit a80c11777b09ea494b5da76a5bcb096851fb6097
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Mon Sep 23 16:11:57 2019 +0200
+
+ BUG/MEDIUM: stream-int: Process connection/CS errors during synchronous sends
+
+ If an error occurred on the connection or the conn-stream, no syncrhonous send
+ is performed. If the error was not already processed and there is no more I/O,
+ it will never be processed and the stream will never be notified of this
+ error. This may block the stream until a timeout is reached or infinitly if
+ there is no timeout.
+
+ Concretly, this bug can be triggered time to time with h2spec, running the test
+ "http2/5.1.1/2".
+
+ This patch depends on the commit 328ed220a "BUG/MINOR: stream-int: Process
+ connection/CS errors first in si_cs_send()". Both must be backported to 2.0 and
+ probably to 1.9. In 1.9, the code is totally different, so this patch would have
+ to be adapted.
+
+ (cherry picked from commit e55a5a41713b629d349ba020183744a38129b892)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/stream_interface.c b/src/stream_interface.c
+index 4130444e..ef0fea7f 100644
+--- a/src/stream_interface.c
++++ b/src/stream_interface.c
+@@ -922,12 +922,6 @@ void si_sync_send(struct stream_interface *si)
+ if (!cs)
+ return;
+
+- if (cs->flags & (CS_FL_ERROR|CS_FL_ERR_PENDING))
+- return;
+-
+- if (cs->conn->flags & CO_FL_ERROR)
+- return;
+-
+ si_cs_send(cs);
+ }
+
--- /dev/null
+commit 489bbd321e46c110ab9d92fb91725870d7c40491
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Sep 24 10:43:03 2019 +0200
+
+ BUG/MEDIUM: checks: make sure the connection is ready before trying to recv
+
+ As identified in issue #278, the backport of commit c594039225 ("BUG/MINOR:
+ checks: do not uselessly poll for reads before the connection is up")
+ introduced a regression in 2.0 when default checks are enabled (not
+ "option tcp-check"), but it did not affect 2.1.
+
+ What happens is that in 2.0 and earlier we have the fd cache which makes
+ a speculative call to the I/O functions after an attempt to connect, and
+ the __event_srv_chk_r() function was absolutely not designed to be called
+ while a connection attempt is still pending. Thus what happens is that the
+ test for success/failure expects the verdict to be final before waking up
+ the check task, and since the connection is not yet validated, it fails.
+ It will usually work over the loopback depending on scheduling, which is
+ why it doesn't fail in reg tests.
+
+ In 2.1 after the failed connect(), we subscribe to polling and usually come
+ back with a validated connection, so the function is not expected to be
+ called before it completes, except if it happens as a side effect of some
+ spurious wake calls, which should not have any effect on such a check.
+
+ The other check types are not impacted by this issue because they all
+ check for a minimum data length in the buffer, and wait for more data
+ until they are satisfied.
+
+ This patch fixes the issue by explicitly checking that the connection
+ is established before trying to read or to give a verdict. This way the
+ function becomes safe to call regardless of the connection status (even
+ if it's still totally ugly).
+
+ This fix must be backported to 2.0.
+
+ (cherry picked from commit 0f0393fc0d2badc5ea329844691f06ba28827f78)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/checks.c b/src/checks.c
+index b088da2e..06f47ad9 100644
+--- a/src/checks.c
++++ b/src/checks.c
+@@ -875,6 +875,9 @@ static void __event_srv_chk_r(struct conn_stream *cs)
+ }
+ }
+
++ /* the rest of the code below expects the connection to be ready! */
++ if (!(conn->flags & CO_FL_CONNECTED) && !done)
++ goto wait_more_data;
+
+ /* Intermediate or complete response received.
+ * Terminate string in b_head(&check->bi) buffer.
+++ /dev/null
-commit 7c80af0fb53f2a1d93a597f7d97cc67996e36be2
-Author: n9@users.noreply.github.com <n9@users.noreply.github.com>
-Date: Fri Aug 23 11:21:05 2019 +0200
-
- DOC: fixed typo in management.txt
-
- replaced fot -> for
- added two periods
-
- (cherry picked from commit 25a1c8e4539c12c19a3fe04aabe563cdac5e36db)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/doc/management.txt b/doc/management.txt
-index 616a040b..ad6011e5 100644
---- a/doc/management.txt
-+++ b/doc/management.txt
-@@ -1549,8 +1549,8 @@ enable agent <backend>/<server>
- level "admin".
-
- enable dynamic-cookie backend <backend>
-- Enable the generation of dynamic cookies fot the backend <backend>
-- A secret key must also be provided
-+ Enable the generation of dynamic cookies for the backend <backend>.
-+ A secret key must also be provided.
-
- enable frontend <frontend>
- Resume a frontend which was temporarily stopped. It is possible that some of
+++ /dev/null
-commit f259fcc00a04e633a7a64f894a719f78f3644867
-Author: Willy Tarreau <w@1wt.eu>
-Date: Mon Aug 26 10:37:39 2019 +0200
-
- BUG/MINOR: mworker: disable SIGPROF on re-exec
-
- If haproxy is built with profiling enabled with -pg, it is possible to
- see the master quit during a reload while it's re-executing itself with
- error code 155 (signal 27) saying "Profile timer expired)". This happens
- if the SIGPROF signal is delivered during the execve() call while the
- handler was already unregistered. The issue itself is not directly inside
- haproxy but it's easy to address. This patch disables this signal before
- calling execvp() during a master reload. A simple test for this consists
- in running this little script with haproxy started in master-worker mode :
-
- $ while usleep 50000; do killall -USR2 haproxy; done
-
- This fix should be backported to all versions using the master-worker
- model.
-
- (cherry picked from commit e0d86e2c1caaaa2141118e3309d479de5f67e855)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/haproxy.c b/src/haproxy.c
-index f6f00fc1..c93b0d13 100644
---- a/src/haproxy.c
-+++ b/src/haproxy.c
-@@ -695,6 +695,7 @@ void mworker_reload()
- }
-
- ha_warning("Reexecuting Master process\n");
-+ signal(SIGPROF, SIG_IGN);
- execvp(next_argv[0], next_argv);
-
- ha_warning("Failed to reexecute the master process [%d]: %s\n", pid, strerror(errno));
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -327,6 +327,15 @@ ifeq ($(TARGET),linux-glibc)
+ USE_GETADDRINFO)
+ endif
+
++# For linux >= 2.6.28 and uclibc
++ifeq ($(TARGET),linux-uclibc)
++ set_target_defaults = $(call default_opts, \
++ USE_POLL USE_TPROXY USE_DL USE_RT USE_NETFILTER \
++ USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY \
++ USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO \
++ USE_GETADDRINFO)
++endif
++
+ # Solaris 8 and above
+ ifeq ($(TARGET),solaris)
+ # We also enable getaddrinfo() which works since solaris 8.
+++ /dev/null
-commit b10c8d7641cc8ceae6fba4506b7f987d66109bd9
-Author: Willy Tarreau <w@1wt.eu>
-Date: Mon Aug 26 10:55:52 2019 +0200
-
- BUG/MEDIUM: listener/threads: fix an AB/BA locking issue in delete_listener()
-
- The delete_listener() function takes the listener's lock before taking
- the proto_lock, which is contrary to what other functions do, possibly
- causing an AB/BA deadlock. In practice the two only places where both
- are taken are during protocol_enable_all() and delete_listener(), the
- former being used during startup and the latter during stop. In practice
- during reload floods, it is technically possible for a thread to be
- initializing the listeners while another one is stopping. While this
- is too hard to trigger on 2.0 and above due to the synchronization of
- all threads during startup, it's reasonably easy to do in 1.9 by having
- hundreds of listeners, starting 64 threads and flooding them with reloads
- like this :
-
- $ while usleep 50000; do killall -USR2 haproxy; done
-
- Usually in less than a minute, all threads will be deadlocked. The fix
- consists in always taking the proto_lock before the listener lock. It
- seems to be the only place where these two locks were reversed. This
- fix needs to be backported to 2.0, 1.9, and 1.8.
-
- (cherry picked from commit 6ee9f8df3bfbb811526cff3313da5758b1277bc6)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/listener.c b/src/listener.c
-index b5fe2ac2..54c09960 100644
---- a/src/listener.c
-+++ b/src/listener.c
-@@ -595,17 +595,17 @@ int create_listeners(struct bind_conf *bc, const struct sockaddr_storage *ss,
- */
- void delete_listener(struct listener *listener)
- {
-+ HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
- HA_SPIN_LOCK(LISTENER_LOCK, &listener->lock);
- if (listener->state == LI_ASSIGNED) {
- listener->state = LI_INIT;
-- HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
- LIST_DEL(&listener->proto_list);
- listener->proto->nb_listeners--;
-- HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);
- _HA_ATOMIC_SUB(&jobs, 1);
- _HA_ATOMIC_SUB(&listeners, 1);
- }
- HA_SPIN_UNLOCK(LISTENER_LOCK, &listener->lock);
-+ HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);
- }
-
- /* Returns a suitable value for a listener's backlog. It uses the listener's,
--- /dev/null
+--- a/include/common/openssl-compat.h
++++ b/include/common/openssl-compat.h
+@@ -217,7 +217,8 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey)
+ #define TLSEXT_signature_ecdsa 3
+ #endif
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20700000L))
+ #define X509_getm_notBefore X509_get_notBefore
+ #define X509_getm_notAfter X509_get_notAfter
+ #endif
+++ /dev/null
-commit 4db294bc0b7988607f2dfdb9d57974b2ba47cbc3
-Author: Jerome Magnin <jmagnin@haproxy.com>
-Date: Mon Aug 26 11:44:21 2019 +0200
-
- BUG/MEDIUM: url32 does not take the path part into account in the returned hash.
-
- The url32 sample fetch does not take the path part of the URL into
- account. This is because in smp_fetch_url32() we erroneously modify
- path.len and path.ptr before testing their value and building the
- path based part of the hash.
-
- This fixes issue #235
-
- This must be backported as far as 1.9, when HTX was introduced.
-
- (cherry picked from commit 2dd26ca9ff8e642611b8b012d6aee45ea45196bc)
- [wt: adjusted context, we still have legacy in 2.0]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
-
-diff --git a/src/http_fetch.c b/src/http_fetch.c
-index e372a122..6448bde9 100644
---- a/src/http_fetch.c
-+++ b/src/http_fetch.c
-@@ -2735,10 +2735,6 @@ static int smp_fetch_url32(const struct arg *args, struct sample *smp, const cha
- /* now retrieve the path */
- sl = http_get_stline(htx);
- path = http_get_path(htx_sl_req_uri(sl));
-- while (path.len > 0 && *(path.ptr) != '?') {
-- path.ptr++;
-- path.len--;
-- }
- if (path.len && *(path.ptr) == '/') {
- while (path.len--)
- hash = *(path.ptr++) + (hash << 6) + (hash << 16) - hash;
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -327,6 +327,15 @@ ifeq ($(TARGET),linux-glibc)
- USE_GETADDRINFO)
- endif
-
-+# For linux >= 2.6.28 and uclibc
-+ifeq ($(TARGET),linux-uclibc)
-+ set_target_defaults = $(call default_opts, \
-+ USE_POLL USE_TPROXY USE_DL USE_RT USE_NETFILTER \
-+ USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY \
-+ USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO \
-+ USE_GETADDRINFO)
-+endif
-+
- # Solaris 8 and above
- ifeq ($(TARGET),solaris)
- # We also enable getaddrinfo() which works since solaris 8.
+++ /dev/null
---- a/include/common/openssl-compat.h
-+++ b/include/common/openssl-compat.h
-@@ -217,7 +217,8 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey)
- #define TLSEXT_signature_ecdsa 3
- #endif
-
--#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
-+ (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20700000L))
- #define X509_getm_notBefore X509_get_notBefore
- #define X509_getm_notAfter X509_get_notAfter
- #endif
include $(TOPDIR)/rules.mk
PKG_NAME:=hcxdumptool
-PKG_VERSION:=5.2.0
+PKG_VERSION:=5.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxdumptool/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=9da9c8c20b93f6a0a262436a862e376bd3cfd05fb879efcf480ad962a14496c7
+PKG_HASH:=b091171fe5e6f926ace3997219dfc5a84ce6d1f2080d3320d456f88282019057
PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
PKG_LICENSE:=MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=hcxtools
-PKG_VERSION:=5.2.0
+PKG_VERSION:=5.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxtools/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=1e8120c5451a38645ade0be4255d3c7f4a837b7611b44d4a5a066e563ad8a112
+PKG_HASH:=a2dd9559e1cc541f07f7a4c2451c295896355a94cfc970dc5cdceb40e605ee7e
PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
PKG_LICENSE:=MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
-PKG_VERSION:=2.26.0
+PKG_VERSION:=2.28.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=2ae18978c8796bb6b45bc8cfe4e1f25377e0cfc9fcf9f46054b09dc3384eef63
+PKG_HASH:=181327edc7cf5b3c25ee51ecc518a4da90fa9e421eca2107996791038a514a21
PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
PKG_LICENSE:=BSD-3-Clause
/etc/config/i2pd
/etc/i2pd/i2pd.conf
/etc/i2pd/tunnels.conf
+ /etc/i2pd/tunnels.d/*
endef
TARGET_LDFLAGS+=-latomic
s/datadir = \/var\/lib/datadir = \/etc/ \
' $(1)/etc/i2pd/i2pd.conf
$(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
+ $(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf $(1)/etc/i2pd/tunnels.d
+ # subscriptions.txt deprecated, see #8088
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
endef
config i2pd
- # Set where i2pd should store its data (netDB, certificates, addresses, etc)
- # By default we store it in RAM so no data is written to ROM.
- # IMPORTANT!
- # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
- # die.
+ # Set where i2pd should store its data (netDB, certificates, addresses,
+ # etc). By default we store it in RAM so no data is written to ROM.
+ # If you store data permanently, you may want to enable
+ # 'profiles = true' and 'addressbook = true' in i2pd.conf
+ #### IMPORTANT! ####
+ # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash
+ # will die.
option data_dir '/var/lib/i2pd'
- # If you don't store i2pd data permanently, you can still choose to store only
- # addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
- # every start. Storing addressbook may be useful if HTTP reseeding is not
- # possible or blocked (by censorship).
- # Even addressbook doesn't take up too much space, extroot is still strongly
- # recommended to avoid flash wear-out.
+ # If you don't store i2pd data permanently, you can still choose to
+ # store only addressbooks. If not, i2pd will be forced to do HTTP
+ # reseeding on every start. Storing addressbook may be useful
+ # if HTTP reseeding is not possible or blocked (by censorship).
+ # Even addressbook doesn't take up too much space, extroot is still
+ # strongly recommended to avoid flash wear-out.
+ # Enable 'addressbook = true' in i2pd.conf to make it take effect.
#option addressbook_dir '/etc/i2pd/addressbook'
USER="i2pd"
GROUP="i2pd"
PIDFILE=/var/run/i2pd.pid
-#DATADIR=/var/lib/i2pd
+DATADIR=/var/lib/i2pd
CONFFILE=/etc/i2pd/i2pd.conf
. /lib/functions.sh
local data_dir
local addressbook_dir
- config_get data_dir "$cfg" data_dir
+ config_get data_dir "$cfg" data_dir "$DATADIR"
config_get addressbook_dir "$cfg" addressbook_dir
## Setting up data dir
if [ ! -d "$data_dir" ]; then
mkdir -p "$data_dir"
ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
- ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
if [ -n "$addressbook_dir" ]; then
if [ ! -d "$addressbook_dir" ]; then
mkdir -p "$addressbook_dir"
procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
## Don't know about i2pd user's HOME
procd_set_param env "HOME=$DATADIR"
+ ## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern
+ # echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern
+ # procd_set_param limits core="unlimited unlimited"
procd_set_param limits nofile=4096
procd_set_param stdout 1
procd_set_param stderr 1
--- /dev/null
+diff -u -r a/contrib/i2pd.conf b/contrib/i2pd.conf
+--- a/contrib/i2pd.conf 2019-09-04 11:00:27.660713504 +0800
++++ b/contrib/i2pd.conf 2019-09-04 11:07:53.669745273 +0800
+@@ -8,12 +8,12 @@
+
+ ## Tunnels config file
+ ## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
+-# tunconf = /var/lib/i2pd/tunnels.conf
++tunconf = /etc/i2pd/tunnels.conf
+
+ ## Tunnels config files path
+ ## Use that path to store separated tunnels in different config files.
+ ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
+-# tunnelsdir = /var/lib/i2pd/tunnels.conf.d
++tunnelsdir = /etc/i2pd/tunnels.conf.d
+
+ ## Where to write pidfile (don't write by default)
+ # pidfile = /var/run/i2pd.pid
+@@ -25,12 +25,12 @@
+ ## * stdout - print log entries to stdout
+ ## * file - log entries to a file
+ ## * syslog - use syslog, see man 3 syslog
+-# log = file
++log = syslog
+ ## Path to logfile (default - autodetect)
+ # logfile = /var/log/i2pd.log
+ ## Log messages above this level (debug, *info, warn, error, none)
+ ## If you set it to none, logging will be disabled
+-# loglevel = info
++loglevel = error
+ ## Write full CLF-formatted date and time to log (default: write only time)
+ # logclftime = true
+
+@@ -61,7 +61,7 @@
+ # ifname6 =
+
+ ## Enable NTCP transport (default = true)
+-# ntcp = true
++ntcp = false
+ ## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option
+ ## Should be http://address:port or socks://address:port
+ # ntcpproxy = http://127.0.0.1:8118
+@@ -81,7 +81,7 @@
+
+ ## Router will not accept transit tunnels, disabling transit traffic completely
+ ## (default = false)
+-# notransit = true
++notransit = true
+
+ ## Router will be floodfill
+ # floodfill = true
+@@ -91,8 +91,10 @@
+ ## Uncomment and set to 'false' to disable Web Console
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
++# address = ::
+ port = 7070
++# strictheaders = false
+ ## Path to web console, default "/"
+ # webroot = /
+ ## Uncomment following lines to enable Web Console authentication
+@@ -104,7 +106,7 @@
+ ## Uncomment and set to 'false' to disable HTTP Proxy
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
+ port = 4444
+ ## Optional keys file for proxy local destination
+ # keys = http-proxy-keys.dat
+@@ -118,7 +120,7 @@
+ ## Uncomment and set to 'false' to disable SOCKS Proxy
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
+ port = 4447
+ ## Optional keys file for proxy local destination
+ # keys = socks-proxy-keys.dat
+@@ -228,4 +230,5 @@
+
+ [persist]
+ ## Save peer profiles on disk (default: true)
+-# profiles = true
++profiles = false
++addressbook = false
PKG_MAINTAINER:=Uwe Kleine-König <uwe+openwrt@kleine-koenig.org>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=README
+PKG_CPE_ID:=cpe:/a:kryo:iodine
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=irssi
-PKG_VERSION:=1.2.1
+PKG_VERSION:=1.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.2.1/
-PKG_HASH:=5466a1ed9612cfa707d9a37d60b29d027b4ac7d83c74ceb1a410e2b59edba92c
+PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/$(PKG_VERSION)/
+PKG_HASH:=6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
+PKG_CPE_ID:=cpe:/a:isc:dhcp
PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
endef
define Package/isc-dhcp-relay-ipv4/description
-$(call Package/isc-dhcp-relay-ipv6/description)
+$(call Package/isc-dhcp-relay/description)
This package is compiled with IPv4 support only.
endef
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=jool
-PKG_VERSION:=3.5.7
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/NICMx/Jool/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b8e95d1526cd2434dedbae292afd2d17f0780ac2dca2be21264712b41eb76a3d
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/Jool-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/NICMx/Jool/releases/download/v$(PKG_VERSION)
+PKG_HASH:=b61ae37d7a71e28530765bdfd9a62f89e7878e3ea9c15dabbcefcd144891100d
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING
+PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
-
-PKG_FIXUP:=autoreconf
+PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
include $(INCLUDE_DIR)/package.mk
-MAKE_PATH:=usr
-CONFIGURE_PATH:=usr
-
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
KERNEL_DIR="$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
- SUBDIRS="$(PKG_BUILD_DIR)/mod/stateful" \
+ SUBDIRS="$(PKG_BUILD_DIR)/src/mod/nat64" \
V="$(V)" \
modules
$(MAKE) -C "$(LINUX_DIR)" \
KERNEL_DIR="$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
- SUBDIRS="$(PKG_BUILD_DIR)/mod/stateless" \
+ SUBDIRS="$(PKG_BUILD_DIR)/src/mod/siit" \
V="$(V)" \
modules
$(call Build/Compile/Default)
@IPV6 \
+kmod-crypto-md5 \
+kmod-nf-conntrack \
- +kmod-nf-conntrack6
+ +kmod-nf-conntrack6 \
+ +kmod-nf-ipt
FILES:= \
- $(PKG_BUILD_DIR)/mod/stateful/jool.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/mod/stateless/jool_siit.$(LINUX_KMOD_SUFFIX)
+ $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \
+ $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/jool/description
define Package/jool-tools
$(call Package/jool/Default)
TITLE:=Jool userspace control programs
- DEPENDS:=+libnl +ethtool
+ DEPENDS:=+libnl +libxtables +ethtool
endef
define Package/jool-tools/description
This package provides the userspace control programs for Jool.
endef
+CONFIGURE_ARGS += \
+ --disable-shared \
+ --without-bash-completion-dir
+
+CONFIGURE_VARS += \
+ ac_cv_func_memset=yes \
+ ac_cv_func_strcasecmp=yes
+
define Package/jool-tools/install
- $(INSTALL_DIR) $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateful/jool $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateless/jool_siit $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit $(1)/usr/bin/
endef
$(eval $(call BuildPackage,jool))
+++ /dev/null
-From 831486ea6c7d7adfbdc453587a65bcba247d698b Mon Sep 17 00:00:00 2001
-From: Alberto Leiva Popper <ydahhrk@gmail.com>
-Date: Fri, 6 Jul 2018 13:19:21 -0500
-Subject: [PATCH 1/2] Add support for kernel 4.17
-
-Fixes #266.
----
- mod/common/hash_table.c | 14 +++-----------
- mod/stateful/fragment_db.c | 4 +---
- 2 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/mod/common/hash_table.c b/mod/common/hash_table.c
-index 25ddd7a6..4e9272f8 100644
---- a/mod/common/hash_table.c
-+++ b/mod/common/hash_table.c
-@@ -23,8 +23,7 @@
- * @macro HTABLE_NAME name of the hash table structure to generate. Optional; Default: hash_table.
- * @macro KEY_TYPE data type of the table's keys.
- * @macro VALUE_TYPE data type of the table's values.
-- * @macro HASH_TABLE_SIZE The size of the internal array, in slots. Optional;
-- * Default = Max = 64k - 1.
-+ * @macro HASH_TABLE_SIZE The size of the internal array, in slots. MUST be a power of 2.
- * @macro GENERATE_PRINT just define it if you want the print function; otherwise it will not be
- * generated.
- * @macro GENERATE_FOR_EACH just define it if you want the for_each function; otherwise it will not
-@@ -44,13 +43,6 @@
- #define HTABLE_NAME hash_table
- #endif
-
--#ifndef HASH_TABLE_SIZE
--/**
-- * This number should not exceed unsigned int's maximum.
-- */
--#define HASH_TABLE_SIZE (64 * 1024 - 1)
--#endif
--
- /** Creates a token name by concatenating prefix and suffix. */
- #define CONCAT_AUX(prefix, suffix) prefix ## suffix
- /** Seems useless, but if not present, the compiler won't expand the HTABLE_NAME macro... */
-@@ -131,7 +123,7 @@ static struct KEY_VALUE_PAIR *GET_AUX(struct HTABLE_NAME *table, const KEY_TYPE
- if (WARN(!table, "The table is NULL."))
- return NULL;
-
-- hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
-+ hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
- hlist_for_each(current_node, &table->table[hash_code]) {
- current_pair = hlist_entry(current_node, struct KEY_VALUE_PAIR, hlist_hook);
- if (table->equals_function(key, ¤t_pair->key))
-@@ -210,7 +202,7 @@ static int PUT(struct HTABLE_NAME *table, KEY_TYPE *key, VALUE_TYPE *value)
- key_value->value = value;
-
- /* Insert the key-value to the table. */
-- hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
-+ hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
- hlist_add_head(&key_value->hlist_hook, &table->table[hash_code]);
- list_add_tail(&key_value->list_hook, &table->list);
-
-diff --git a/mod/stateful/fragment_db.c b/mod/stateful/fragment_db.c
-index 44f966aa..ef0b1f5a 100644
---- a/mod/stateful/fragment_db.c
-+++ b/mod/stateful/fragment_db.c
-@@ -90,10 +90,8 @@ static bool equals_function(const struct packet *k1, const struct packet *k2)
- static unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
- const struct in6_addr *daddr, u32 rnd)
- {
-- u32 c;
-- c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
-+ return jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
- (__force u32)id, rnd);
-- return c & (INETFRAGS_HASHSZ - 1);
- }
- #endif
-
---
-2.19.1
-
--- /dev/null
+--- a/src/usr/argp/main.c
++++ b/src/usr/argp/main.c
+@@ -8,6 +8,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <getopt.h>
+
+ #include "command.h"
+ #include "log.h"
+--- a/src/usr/iptables/Makefile
++++ b/src/usr/iptables/Makefile
+@@ -34,9 +34,9 @@ uninstall:
+ rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL_SIIT.so
+ rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL.so
+ lib%.so: lib%.o
+- gcc -shared -fPIC ${LDFLAGS} -o $@ $^;
++ ${CC} -shared -fPIC ${LDFLAGS} -o $@ $^;
+ lib%.o: lib%.c
+- gcc ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<;
++ ${CC} ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<;
+ clean distclean:
+ rm -f *.so
+ distdir:
+++ /dev/null
-From f9e62248f252accb0609243958fb51f0f99a5bf3 Mon Sep 17 00:00:00 2001
-From: Ricardo Salveti <ricardo@foundries.io>
-Date: Mon, 1 Oct 2018 22:45:17 -0300
-Subject: [PATCH 2/2] packet: rename offset_to_ptr to skb_offset_to_ptr to
- avoid conflicts with newer kernel
-
-Rename offset_to_ptr to skb_offset_to_ptr to avoid definition conflict
-when building jool against linux >= 4.19.
-
-Fixes:
-| mod/stateful/../common/packet.c:73:14: error: conflicting types for 'offset_to_ptr'
-| static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
-| ^~~~~~~~~~~~~
-| In file included from kernel-source/include/linux/export.h:45,
-| from kernel-source/include/linux/linkage.h:7,
-| from kernel-source/include/linux/kernel.h:7,
-| from kernel-source/include/linux/skbuff.h:17,
-| from mod/stateful/../../include/nat64/mod/common/packet.h:81,
-| from mod/stateful/../common/packet.c:1:
-| kernel-source/include/linux/compiler.h:297:21: note: previous definition of 'offset_to_ptr' was here
-| static inline void *offset_to_ptr(const int *off)
-| ^~~~~~~~~~~~~
-
-Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
----
- mod/common/packet.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/mod/common/packet.c b/mod/common/packet.c
-index 9b4fbcd6..1b094fcc 100644
---- a/mod/common/packet.c
-+++ b/mod/common/packet.c
-@@ -70,7 +70,7 @@ static int inhdr4(struct sk_buff *skb, const char *msg)
- return -EINVAL;
- }
-
--static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
-+static void *skb_offset_to_ptr(struct sk_buff *skb, unsigned int offset)
- {
- return ((void *) skb->data) + offset;
- }
-@@ -368,9 +368,9 @@ int pkt_init_ipv6(struct packet *pkt, struct sk_buff *skb)
- pkt->l4_proto = meta.l4_proto;
- pkt->is_inner = 0;
- pkt->is_hairpin = false;
-- pkt->hdr_frag = meta.has_frag_hdr ? offset_to_ptr(skb, meta.frag_offset) : NULL;
-+ pkt->hdr_frag = meta.has_frag_hdr ? skb_offset_to_ptr(skb, meta.frag_offset) : NULL;
- skb_set_transport_header(skb, meta.l4_offset);
-- pkt->payload = offset_to_ptr(skb, meta.payload_offset);
-+ pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
- pkt->original_pkt = pkt;
-
- return 0;
-@@ -530,7 +530,7 @@ int pkt_init_ipv4(struct packet *pkt, struct sk_buff *skb)
- pkt->is_hairpin = false;
- pkt->hdr_frag = NULL;
- skb_set_transport_header(skb, meta.l4_offset);
-- pkt->payload = offset_to_ptr(skb, meta.payload_offset);
-+ pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
- pkt->original_pkt = pkt;
-
- return 0;
---
-2.19.1
-
PKG_RELEASE:=1
PKG_LICENSE:=LGPLv2.1
+PKG_CPE_ID:=cpe:/a:kismet:kismet
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.kismetwireless.net/code
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=2.8.3
+PKG_VERSION:=2.8.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=8a62d81e5cf3df938f469b60ed4e46d9161007c2b89fbf7ae07525fa68368bad
+PKG_HASH:=541e7e43503765c91405c5797b3838103bb656154712e69b3f959c6ab0e700a9
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
+PKG_CPE_ID:=cpe:/a:knot-dns:knot_dns
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=NOTICE
+PKG_CPE_ID:=cpe:/a:mit:kerberos
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:alexander_v._lukyanov:lftp
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
PKG_RELEASE:=1
PKG_LICENSE:=LGPL-2.1
PKG_MAINTAINER:=Thomas Guyot-Sionnest <tguyot@gmail.com>
+PKG_CPE_ID:=cpe:/a:libndp:libndp
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://libndp.org/files/
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com>
+PKG_CPE_ID:=cpe:/a:lynx:lynx
PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://invisible-mirror.net/archives/lynx/tarballs/ \
https://ftp.icm.edu.pl/packages/lynx/tarballs/ \
PKG_HASH:=b3a76fd35cf2d561546c2fbeaea1e5998b7e04b8330afb918ea5fbdeb202162c
PKG_MAINTAINER:=
PKG_LICENSE:=Apache-2.0
+PKG_CPE_ID:=cpe:/a:apple:mdnsresponder
PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION)
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:memcachedb:memcached
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpc
-PKG_VERSION:=2.1.20190625
+PKG_VERSION:=2.1.20190824
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
-PKG_HASH:=8723f5d7fd7970de23635547700878cd29a5c2bb708b5e5475b2d1d2510317fb
+PKG_HASH:=1fadefea0ecdceb3e35bb5d901f0db880c826740e93148ddfb087b4b4389e165
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
-PKG_LICENSE:=BSD-3c
+PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnp
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
TARGET_CFLAGS += $(FPIC)
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/miniupnpc
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \
- $(1)/usr/include/miniupnpc/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
- $(1)/usr/lib/
-endef
-
define Package/miniupnpc/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpc-shared $(1)/usr/bin/upnpc
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnpd
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/version.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=1.6.4
+PKG_VERSION:=1.6.7
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://mosquitto.org/files/source/
-PKG_HASH:=a3d5822c249f6a6e13311b1b09eff6807ea01608a5a77934e1769842e9d146ef
+PKG_HASH:=bcd31a8fbbd053fee328986fadd8666d3058357ded56b9782f7d4f19931d178e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:matt_kimball_and_roger_wolff:mtr
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_HASH:=b4466412f13e057659f25d35e1e8e181afd62c7179bff22a6add81445ecb8690
PKG_LICENSE:=GPL-2.0-or-later
PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
+PKG_CPE_ID:=cpe:/a:network_block_device:nbd
PKG_INSTALL:=1
# -liconv due to glib2, to be revisited later
include $(INCLUDE_DIR)/nls.mk
-PKG_BUILD_DEPENDS:=glib2 gettext
-
define Package/nbd
SECTION:=net
CATEGORY:=Network
PKG_HASH:=b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
PKG_LICENSE:=MIT BSD-3-Clause-Clear
+PKG_CPE_ID:=cpe:/a:net-snmp:net-snmp
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_CPE_ID:=cpe:/a:netatalk:netatalk
+
PKG_BUILD_DEPENDS:=libevent2
include $(INCLUDE_DIR)/package.mk
PKG_HASH:=b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb
PKG_MAINTAINER:=Adam Gensler <openwrt@a.gnslr.us>
PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:netcat:netcat
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/
PKG_HASH:=842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a
+PKG_CPE_ID:=cpe:/a:netperf:netperf
+
include $(INCLUDE_DIR)/package.mk
define Package/netperf
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
Ansuel Smith <ansuelsmth@gmail.com>
PKG_LICENSE:=2-clause BSD-like license
+PKG_CPE_ID:=cpe:/a:nginx:nginx
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:ngircd:ngircd
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_HASH:=847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nmap:nmap
PKG_INSTALL:=1
PKG_NAME:=ola
PKG_VERSION:=0.10.7
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
+PKG_MAINTAINER:=Christian Beier <dontmind@freeshell.org>
PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=libtool
-
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
CATEGORY:=Network
TITLE:=Open Lighting Architecture Daemon
URL:=https://www.openlighting.org/
- MAINTAINER:=Christian Beier <dontmind@freeshell.org>
DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
endef
--disable-fatal-warnings \
--disable-unittests \
--without-dns-sd \
- --with-ola-protoc-plugin=$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin
+ --with-ola-protoc-plugin="$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin"
HOST_CONFIGURE_ARGS += \
--disable-all-plugins \
--disable-doxygen-html \
--disable-doxygen-doc
+HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
+
# only build the ola_protoc thingy
define Host/Compile
cd $(HOST_BUILD_DIR); \
PKG_NAME:=openconnect
PKG_VERSION:=8.04
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING.LGPL
+PKG_CPE_ID:=cpe:/a:infradead:openconnect
PKG_CONFIG_DEPENDS:= \
CONFIG_OPENCONNECT_GNUTLS \
# Juniper vpn support
#option juniper '1'
+ # Authentication form responses
+ #list form_entry FORM:OPT=VAL
+
The additional files are also used:
/etc/openconnect/user-cert-vpn-MYVPN.pem: The user certificate
/etc/openconnect/user-key-vpn-MYVPN.pem: The user private key
proto_config_add_string "token_script"
proto_config_add_string "os"
proto_config_add_string "csd_wrapper"
+ proto_config_add_array 'form_entry:regex("[^:]+:[^=]+=.*")'
no_device=1
available=1
}
+proto_openconnect_add_form_entry() {
+ [ -n "$1" ] && append cmdline "--form-entry $1"
+}
+
proto_openconnect_setup() {
local config="$1"
- json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper
+ json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper form_entry
grep -q tun /proc/modules || insmod tun
ifname="vpn-$config"
[ -n "$os" ] && append cmdline "--os=$os"
[ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append cmdline "--csd-wrapper=$csd_wrapper"
+ json_for_each_item proto_openconnect_add_form_entry form_entry
+
proto_export INTERFACE="$config"
logger -t openconnect "executing 'openconnect $cmdline'"
PKG_LICENSE:=BSD ISC
PKG_LICENSE_FILES:=LICENCE
-
+PKG_CPE_ID:=cpe:/a:openssh:openssh
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_REMOVE_FILES:=
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:openvswitch:openvswitch
PKG_BUILD_DEPENDS+=python3/host python-six/host
PKG_USE_MIPS16:=0
+IPV6:kmod-nf-nat6 \
+kmod-nf-conntrack \
+IPV6:kmod-nf-conntrack6 \
- +(!LINUX_4_9&&!LINUX_4.14):kmod-nsh \
- +(!LINUX_4_9&&!LINUX_4.14):kmod-ipt-conntrack-extra \
+ +(!LINUX_4_9&&!LINUX_4_14):kmod-nsh \
+ +(!LINUX_4_9&&!LINUX_4_14):kmod-ipt-conntrack-extra \
ovs_kmod_openvswitch_files:=$(ovs_kmod_upstream_dir)/openvswitch.ko
$(eval $(call OvsKmodPackageTemplate,openvswitch))
+kmod-nf-nat \
+IPV6:kmod-nf-nat6 \
+kmod-nf-conntrack \
- +(IPV6&&(LINUX_4_9||LINUX_4.14)):kmod-nf-conntrack6 \
- +(LINUX_4_9||LINUX_4.14):kmod-gre \
- +(IPV6&&(LINUX_4_9||LINUX_4.14)):kmod-gre6 \
- +(!LINUX_4_9&&!LINUX_4.14):kmod-udptunnel4 \
- +(!LINUX_4_9&&!LINUX_4.14):kmod-ipt-conntrack-extra \
+ +(IPV6&&(LINUX_4_9||LINUX_4_14)):kmod-nf-conntrack6 \
+ +(LINUX_4_9||LINUX_4_14):kmod-gre \
+ +(IPV6&&(LINUX_4_9||LINUX_4_14)):kmod-gre6 \
+ +(!LINUX_4_9&&!LINUX_4_14):kmod-udptunnel4 \
+ +(!LINUX_4_9&&!LINUX_4_14):kmod-ipt-conntrack-extra \
ovs_kmod_openvswitch-intree_files:= $(ovs_kmod_intree_dir)/openvswitch.ko
$(eval $(call OvsKmodPackageTemplate,openvswitch-intree))
PKG_NAME:=pdns
PKG_VERSION:=4.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
--sysconfdir=/etc/powerdns \
--libdir=/usr/lib/powerdns \
--with-dynmodules="$(foreach backend,$(PDNS_BACKENDS),$(if $(CONFIG_PACKAGE_pdns-backend-$(backend)),$(PDNS_BACKEND_$(backend)_LIB),))" \
+ --with-lua="lua" \
--with-modules="bind random" \
--with-mysql-lib=$(STAGING_DIR)/usr \
--with-mysql-includes=$(STAGING_DIR)/usr \
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nccgroup/phantap
-PKG_MIRROR_HASH:=bee0ed1ab620c740764009722d1281778371c48a85697d1189498a269b548fc5
-PKG_SOURCE_DATE:=2019.08.28
-PKG_SOURCE_VERSION:=758fba1b7d48080ad14a1dc0062b86667b298ecb
+PKG_MIRROR_HASH:=a8bbcdeb3520384ad7a7ff26324143dfd2e1baaf04e32396501dbfc78819287c
+PKG_SOURCE_DATE:=2019.09.18
+PKG_SOURCE_VERSION:=7cc6017ee445885a99d52e556406c07093aa2bb1
PKG_MAINTAINER:=Diana Dragusin <diana.dragusin@nccgroup.com>, \
Etienne Champetier <champetier.etienne@gmail.com>
PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/$(PKG_NAME)/
PKG_HASH:=a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015
+PKG_CPE_ID:=cpe:/a:pps.jussieu:polipo
+
include $(INCLUDE_DIR)/package.mk
define Package/polipo
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+PKG_CPE_ID:=cpe:/a:poptop:pptp_server
+
include $(INCLUDE_DIR)/package.mk
define Package/pptpd
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:privoxy:privoxy
PKG_MAINTAINER:=
--- /dev/null
+#
+# Copyright (C) 2019 Daniel Bermond
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=proxychains-ng
+PKG_VERSION:=4.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/proxychains-ng/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=ab31626af7177cc2669433bb244b99a8f98c08031498233bb3df3bcc9711a9cc
+
+PKG_MAINTAINER:=Daniel Bermond <dbermond@archlinux.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/proxychains-ng
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
+ URL:=https://github.com/rofl0r/proxychains/
+endef
+
+define Package/proxychains-ng/description
+ A hook preloader that allows to redirect TCP traffic of
+ existing dynamically linked programs through one or more
+ SOCKS or HTTP proxies.
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default,all)
+endef
+
+define Build/Install
+ $(call Build/Install/Default,install install-config)
+endef
+
+define Package/proxychains-ng/conffiles
+/etc/proxychains.conf
+endef
+
+define Package/proxychains-ng/install
+ # binary executable
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/proxychains4 $(1)/usr/bin/
+ $(LN) proxychains4 $(1)/usr/bin/proxychains
+
+ # library
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libproxychains4.so $(1)/usr/lib/
+
+ # config
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/proxychains.conf $(1)/etc/
+endef
+
+$(eval $(call BuildPackage,proxychains-ng))
--- a/core/Makefile
+++ b/core/Makefile
-@@ -49,7 +49,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS)
+@@ -49,7 +49,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI
quasselc-connector.o: CFLAGS:=$(CFLAGS)
$(TARGET): $(OBJECTS)
+ LDFLAGS += $(shell pkg-config --libs quasselc)
endif
- CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
+ CFLAGS+=-std=gnu11 -Wall -Wextra -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
core/quassel-net.c | 64 ++++++++++++++++++++++++++++++++++++++--------
2 files changed, 53 insertions(+), 10 deletions(-)
-diff --git a/core/Makefile b/core/Makefile
-index c1c65fc..987bd7b 100644
--- a/core/Makefile
+++ b/core/Makefile
-@@ -16,7 +16,6 @@ SSL_CFLAGS=$(shell pkg-config --cflags openssl)
+@@ -16,7 +16,6 @@ SSL_CFLAGS=$(shell pkg-config --cflags o
SSL_LDLAGS=$(shell pkg-config --libs openssl)
OBJECTS:=quasselc-connector.o quassel-core.o
OBJECTS+=quassel-net.o quassel-msgs.o quassel-cmds.o
OBJECTS+=quassel-fe-window.o quassel-fe-level.o quassel-cfg.o
LDFLAGS ?=
-diff --git a/core/quassel-net.c b/core/quassel-net.c
-index 8a6eb55..5db7fe0 100644
--- a/core/quassel-net.c
+++ b/core/quassel-net.c
-@@ -132,10 +132,10 @@ static SERVER_REC* quassel_server_init_connect(SERVER_CONNECT_REC* conn) {
+@@ -132,10 +132,10 @@ static SERVER_REC* quassel_server_init_c
ret->got = 0;
server_connect_ref(SERVER_CONNECT(conn));
ret->channels_join = quassel_irssi_channels_join;
ret->send_message = quassel_irssi_send_message;
-@@ -161,12 +161,59 @@ void quassel_net_init(CHAT_PROTOCOL_REC* rec) {
+@@ -161,12 +161,59 @@ void quassel_net_init(CHAT_PROTOCOL_REC*
signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
}
}
void quassel_irssi_init_nack(void *arg) {
---
-2.17.1
-
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:radicale:radicale
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-package.mk
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:radicale:radicale
PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale/
PKG_LICENSE:=BSD-3-CLAUSE
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:uninett:radsecproxy
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_VERSION:=3.12
PKG_RELEASE:=7
PKG_LICENSE:=LGPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:roaring_penguin:pppoe
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:rsync:rsync
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:rsyslog:rsyslog
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:samba:samba
# samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
HOST_BUILD_DEPENDS:=python/host nfs-kernel-server/host e2fsprogs/host
include $(TOPDIR)/rules.mk
PKG_NAME:=simple-adblock
-PKG_VERSION:=1.8.0
-PKG_RELEASE:=4
+PKG_VERSION:=1.8.1
+PKG_RELEASE:=7
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
PKG_LICENSE:=GPL-3.0-or-later
## Features
- Super-fast due to the nature of supported block lists and parallel downloading/processing of the blacklists.
-- Supports both hosts files and domains lists for blocking (to keep it lean and fast).
+- Supports hosts files and domains lists for blocking.
- Everything is configurable from Web UI.
- Allows you to easily add your own domains to whitelist or blacklist.
-- Allows you to easily add URLs to your own blocked hosts or domains lists to block/whitelist (just put whitelisted domains one per line).
-- Requires no configuration for the download utility wherever you want to use wget/libopenssl or uclient-fetch/libustream-mbedtls.
-- Installs dependencies automatically.
-- Doesn't stay in memory -- creates the list of blocked domains and then uses DNSMASQ/Unbound and firewall rules to serve NXDOMAIN or 127.0.0.1 (depending on settings) reply for blocked domains.
+- Allows you to easily add URLs to your own blocked hosts or domains lists to block/whitelist (just put whitelisted domains one per line in the file you're linking).
+- Supports multiple modes of AdBlocking implementations with DNSMASQ and Unbound.
+- Doesn't stay in memory -- creates the list of blocked domains and then uses DNSMASQ/Unbound and firewall rules to serve NXDOMAIN or 127.0.0.1 reply or to reject access (depending on settings) for blocked domains.
- As some of the default lists are using https, reliably works with either wget/libopenssl, uclient-fetch/libustream-mbedtls or curl.
- Very lightweight and easily hackable, the whole script is just one ```/etc/init.d/simple-adblock``` file.
- Retains the downloaded/sorted AdBlocking list on service stop and reuses it on service start (use ```dl``` command if you want to force re-download of the list).
+- Has an option to store a compressed copy of the AdBlocking list in persistent memory which survives reboots.
- Blocks ads served over https (unlike PixelServ-derived solutions).
+- Blocks ads inside browsers with [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in, like [Mozilla Firefox](https://support.mozilla.org/en-US/kb/firefox-dns-over-https#w_about-dns-over-https) or [Google Chrome/Chromium](https://blog.chromium.org/2019/09/experimenting-with-same-provider-dns.html) -- with the ```dnsmasq.ipset``` option.
- Proudly made in Canada, using locally-sourced electrons.
If you want a more robust AdBlocking, supporting free memory detection and complex block lists, supporting IDN, check out [net/adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
-## Screenshot (luci-app-simple-adblock)
+## Screenshots (luci-app-simple-adblock)
-![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot07.png "screenshot")
+Service Status
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-status.png "Service Status")
+
+Configuration - Basic Configuration
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-config-basic.png "Configuration - Basic Configuration")
+
+Configuration - Advanced Configuration
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-config-advanced.png "Configuration - Advanced Configuration")
+
+Whitelist and Blocklist Management
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-lists.png "Whitelist and Blocklist Management")
## Requirements
To satisfy the requirements for connect to your router via ssh and run the following commands:
+### How to use DNSMASQ ipset
+
+The ```dnsmasq.ipset``` option requires you to install ```ipset``` and ```dnsmasq-full``` instead of the ```dnsmasq```. To do that, connect to your router via ssh and run the following command:
+
+```sh
+opkg update; opkg remove dnsmasq; opkg install dnsmasq-full ipset;
+```
+
### OpenWrt 15.05.1 Requirements
```sh
| --- | --- |
|```dnsmasq.addnhosts```|Creates the DNSMASQ additional hosts file ```/var/run/simple-adblock.addnhosts``` and modifies DNSMASQ settings, so that DNSMASQ resolves all blocked domains to "local machine": 127.0.0.1. This option doesn't allow block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), so it results in a much larger block-list file, but, unlike other DNSMASQ-based options, it has almost no effect on the DNS look up speed. This option also allows quick reloads of DNSMASQ on block-list updates.|
|```dnsmasq.conf```|Creates the DNSMASQ config file ```/var/dnsmasq.d/simple-adblock``` so that DNSMASQ replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option will slow down DNS look up speed somewhat.|
+|```dnsmasq.ipset```|Creates the DNSMASQ ipset file ```/var/dnsmasq.d/simple-adblock.ipset``` and the firewall rule to reject the matching requests. This is the only option for AdBlocking if you're using a browser with [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in, like [Mozilla Firefox](https://support.mozilla.org/en-US/kb/firefox-dns-over-https#w_about-dns-over-https) or [Google Chrome/Chromium](https://blog.chromium.org/2019/09/experimenting-with-same-provider-dns.html). This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option requires you install ```dnsmasq-full``` and ```ipset``` [as described here](#how-to-use-dnsmasq-ipset).<br/>PLEASE NOTE, that unlike other options which are truly domain name based blocking, this is essentially an IP address based blocking, ie: if you try to block ```google-analytics.com``` with this option, it may also block/break things like YouTube, Hangouts and other Google services if they share IP address(es) with ```google-analytics.com```.|
|```dnsmasq.servers```|Creates the DNSMASQ servers file ```/var/run/simple-adblock.servers``` and modifies DNSMASQ settings so that DNSMASQ replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option will slow down DNS look up speed somewhat. This is a default setting as it results in the smaller block-file and allows quick reloads of DNSMASQ.|
|```unbound.adb_list```|Creates the Unbound config file ```/var/lib/unbound/adb_list.simple-adblock``` so that Unbound replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file.|
## Thanks
-I'd like to thank everyone who helped create, test and troubleshoot this service. Special thanks to [@hnyman](https://github.com/hnyman) for general package/luci guidance, [@dibdot](https://github.com/dibdot) for general guidance and block-list optimization code, [@ckuethe](https://github.com/ckuethe) for the curl support, non-ASCII filtering and compressed cache code, [@EricLuehrsen](https://github.com/EricLuehrsen) for the Unbound support information and [@phasecat](https://forum.openwrt.org/u/phasecat/summary) for submitting bugs and testing.
+I'd like to thank everyone who helped create, test and troubleshoot this service. Special thanks to [@hnyman](https://github.com/hnyman) for general package/luci guidance, [@dibdot](https://github.com/dibdot) for general guidance and block-list optimization code, [@ckuethe](https://github.com/ckuethe) for the curl support, non-ASCII filtering and compressed cache code, [@EricLuehrsen](https://github.com/EricLuehrsen) for the Unbound support information, [@mushoz]( https://github.com/mushoz) for performance testing and [@phasecat](https://forum.openwrt.org/u/phasecat/summary) for submitting various bugs and testing.
config simple-adblock 'config'
option enabled '0'
option dns 'dnsmasq.servers'
+ option dns_instance '0'
option verbosity '2'
option force_dns '1'
option led 'none'
option curl_retry '3'
option parallel_downloads '1'
option debug '0'
- option allow_non_ascii '0'
option compressed_cache '0'
list whitelist_domain 'raw.githubusercontent.com'
# list blacklist_hosts_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
export USE_PROCD=1
export LC_ALL=C
-export EXTRA_COMMANDS="check dl killcache status"
-export EXTRA_HELP=" check Checks if specified domain is found in current blacklist
+export EXTRA_COMMANDS='check dl killcache status'
+export EXTRA_HELP=' check Checks if specified domain is found in current blacklist
dl Force-redownloads all the list
- status Shows the service last-run status"
+ status Shows the service last-run status'
-readonly packageName="simple-adblock"
+readonly packageName='simple-adblock'
readonly serviceName="$packageName $PKG_VERSION"
readonly addnhostsFile="/var/run/${packageName}.addnhosts"
readonly addnhostsCache="/var/run/${packageName}.addnhosts.cache"
readonly dnsmasqCache="/var/run/${packageName}.dnsmasq.cache"
readonly dnsmasqGzip="/etc/${packageName}.dnsmasq.gz"
readonly dnsmasqOutputFilter='s|^|local=/|;s|$|/|'
+readonly ipsetFile="/var/dnsmasq.d/${packageName}.ipset"
+readonly ipsetCache="/var/run/${packageName}.ipset.cache"
+readonly ipsetGzip="/etc/${packageName}.ipset.gz"
+readonly ipsetOutputFilter='s|^|ipset=/|;s|$|/adb|'
readonly serversFile="/var/run/${packageName}.servers"
readonly serversCache="/var/run/${packageName}.servers.cache"
readonly serversGzip="/etc/${packageName}.servers.gz"
readonly statusProcessing='Processing'
readonly statusStopped='Stopped'
readonly sharedMemoryError="/dev/shm/$packageName-error"
+readonly sharedMemoryOutput="/dev/shm/$packageName-output"
create_lock() { [ -e "$PIDFile" ] && return 1; touch "$PIDFile"; }
remove_lock() { [ -e "$PIDFile" ] && rm -f "$PIDFile"; }
trap remove_lock EXIT
output_ok() { output 1 "$_OK_"; output 2 "$__OK__\\n"; }
output_okn() { output 1 "$_OK_\\n"; output 2 "$__OK__\\n"; }
-output_fail() { output 1 "$_FAIL_\\n"; output 2 "$__FAIL__\\n"; }
-output_failn() { output 1 "$_FAIL_"; output 2 "$__FAIL__\\n"; }
+output_fail() { output 1 "$_FAIL_"; output 2 "$__FAIL__\\n"; }
+output_failn() { output 1 "$_FAIL_\\n"; output 2 "$__FAIL__\\n"; }
str_replace() { echo "$1" | sed -e "s/$2/$3/g"; }
-str_contains() { [ "$1" != "$(str_replace "$1" "$2" "")" ]; }
-readonly sharedMemoryOutput="/dev/shm/$packageName-output"
+str_contains() { test "$1" != "$(str_replace "$1" "$2" '')"; }
+compare_versions() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
+is_chaos_calmer() { ubus -S call system board | grep -q 'Chaos Calmer'; }
+is_ipset_procd() { compare_versions "$(sed -ne 's/^Version: //p' /usr/lib/opkg/info/firewall.control)" "2019-09-18"; }
+led_on(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo 'default-on' > "${1}/trigger" 2>&1; fi; }
+led_off(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo 'none' > "${1}/trigger" 2>&1; fi; }
+dnsmasq_kill() { killall -q -HUP dnsmasq; }
+dnsmasq_restart() { /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
+unbound_restart() { /etc/init.d/unbound restart >/dev/null 2>&1; }
+
output() {
# Can take a single parameter (text) to be output at any verbosity
# Or target verbosity level and text to be output at specifc verbosity
printf "%b" "$msg" >> "$sharedMemoryOutput"
fi
}
-led_on(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo "default-on" > "${1}/trigger" 2>&1; fi; }
-led_off(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo "none" > "${1}/trigger" 2>&1; fi; }
-
-export serviceEnabled
-export forceDNS
-export parallelDL
-export debug
-export allowNonAscii
-export compressedCache
-export targetDNS
-export bootDelay
-export dlTimeout
-export curlRetry
-export verbosity
-export led
-export whitelist_domains
-export blacklist_domains
-export whitelist_domains_urls
-export blacklist_domains_urls
-export blacklist_hosts_urls
+
+export serviceEnabled forceDNS parallelDL debug allowIDN compressedCache
+export targetDNS bootDelay dlTimeout curlRetry verbosity led dnsInstance
+export whitelist_domains blacklist_domains
+export whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls
export wan_if wan_gw wanphysdev dl_command serviceStatus dl_flag
export outputFilter outputFilterIPv6 outputFile outputGzip outputCache ipv6Enabled
load_package_config() {
config_load "$packageName"
- config_get_bool serviceEnabled "config" "enabled" 1
- config_get_bool forceDNS "config" "force_dns" 1
- config_get_bool parallelDL "config" "parallel_downloads" 1
- config_get_bool debug "config" "debug" 0
- config_get_bool allowNonAscii "config" "allow_non_ascii" 0
- config_get_bool compressedCache "config" "compressed_cache" 0
- config_get_bool ipv6Enabled "config" "ipv6_enabled" 0
- config_get bootDelay "config" "boot_delay" "120"
- config_get dlTimeout "config" "download_timeout" "20"
- config_get curlRetry "config" "curl_retry" "3"
- config_get verbosity "config" "verbosity" "2"
- config_get led "config" "led"
- config_get targetDNS "config" "dns" "dnsmasq.servers"
- config_get whitelist_domains "config" "whitelist_domain"
- config_get blacklist_domains "config" "blacklist_domain"
- config_get whitelist_domains_urls "config" "whitelist_domains_url"
- config_get blacklist_domains_urls "config" "blacklist_domains_url"
- config_get blacklist_hosts_urls "config" "blacklist_hosts_url"
-
- if [ "$targetDNS" != "dnsmasq.addnhosts" ] && [ "$targetDNS" != "dnsmasq.conf" ] && \
- [ "$targetDNS" != "dnsmasq.servers" ] && [ "$targetDNS" != "unbound.adb_list" ]; then
- targetDNS="dnsmasq.servers"
+ config_get_bool serviceEnabled 'config' 'enabled' 1
+ config_get_bool forceDNS 'config' 'force_dns' 1
+ config_get_bool parallelDL 'config' 'parallel_downloads' 1
+ config_get_bool debug 'config' 'debug' 0
+ config_get_bool compressedCache 'config' 'compressed_cache' 0
+ config_get_bool ipv6Enabled 'config' 'ipv6_enabled' 0
+ config_get bootDelay 'config' 'boot_delay' '120'
+ config_get dlTimeout 'config' 'download_timeout' '20'
+ config_get curlRetry 'config' 'curl_retry' '3'
+ config_get verbosity 'config' 'verbosity' '2'
+ config_get led 'config' 'led'
+ config_get targetDNS 'config' 'dns' 'dnsmasq.servers'
+ config_get dnsInstance 'config' 'dns_instance' '0'
+ config_get whitelist_domains 'config' 'whitelist_domain'
+ config_get blacklist_domains 'config' 'blacklist_domain'
+ config_get whitelist_domains_urls 'config' 'whitelist_domains_url'
+ config_get blacklist_domains_urls 'config' 'blacklist_domains_url'
+ config_get blacklist_hosts_urls 'config' 'blacklist_hosts_url'
+
+ if [ "$targetDNS" != 'dnsmasq.addnhosts' ] && [ "$targetDNS" != 'dnsmasq.conf' ] && \
+ [ "$targetDNS" != 'dnsmasq.servers' ] && [ "$targetDNS" != 'unbound.adb_list' ] && \
+ [ "$targetDNS" != 'dnsmasq.ipset' ] ; then
+ targetDNS='dnsmasq.servers'
fi
case "$targetDNS" in
outputGzip="$addnhostsGzip"
[ "$ipv6Enabled" -gt 0 ] && outputFilterIPv6="$addnhostsOutputFilterIPv6"
rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+ rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
rm -f "$serversFile" "$serversCache" "$serversGzip"
rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
;;
outputCache="$dnsmasqCache"
outputGzip="$dnsmasqGzip"
rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+ rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
+ rm -f "$serversFile" "$serversCache" "$serversGzip"
+ rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
+ ;;
+ dnsmasq.ipset)
+ outputFilter="$ipsetOutputFilter"
+ outputFile="$ipsetFile"
+ outputCache="$ipsetCache"
+ outputGzip="$ipsetGzip"
+ rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+ rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
rm -f "$serversFile" "$serversCache" "$serversGzip"
rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
;;
outputGzip="$serversGzip"
rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+ rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
;;
unbound.adb_list)
outputFile="$unboundFile"
outputCache="$unboundCache"
outputGzip="$unboundGzip"
- rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+ rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+ rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
rm -f "$serversFile" "$serversCache" "$serversGzip"
;;
esac
return 1
fi
+ case $targetDNS in
+ dnsmasq.addnhosts | dnsmasq.conf | dnsmasq.ipset | dnsmasq.servers)
+ if dnsmasq -v 2>/dev/null | grep -q 'no-IDN' || ! dnsmasq -v 2>/dev/null | grep -q -w 'IDN'; then
+ allowIDN=0
+ else
+ allowIDN=1
+ fi
+ ;;
+ unbound.adb_list)
+ allowIDN=1;;
+ esac
+
+ case $targetDNS in
+ dnsmasq.ipset)
+ if dnsmasq -v 2>/dev/null | grep -q 'no-ipset' || ! dnsmasq -v 2>/dev/null | grep -q -w 'ipset'; then
+ output "$_ERROR_: DNSMASQ ipset support is enabled in $packageName, but DNSMASQ is either not installed or installed DNSMASQ does not support ipsets!\\n"
+ targetDNS='dnsmasq.servers'
+ fi
+ if ! ipset help hash:net >/dev/null 2>&1; then
+ output "$_ERROR_: DNSMASQ ipset support is enabled in $packageName, but ipset is either not installed or installed ipset does not support 'hash:net' type!\\n"
+ targetDNS='dnsmasq.servers'
+ fi
+ ;;
+ esac
+
[ ! -d "${outputFile%/*}" ] && mkdir -p "${outputFile%/*}"
[ ! -d "${outputCache%/*}" ] && mkdir -p "${outputFile%/*}"
[ ! -d "${outputGzip%/*}" ] && mkdir -p "${outputFile%/*}"
output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
}
-dnsmasq_kill() { killall -q -HUP dnsmasq; }
-dnsmasq_restart() { /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
-unbound_restart() { /etc/init.d/unbound restart >/dev/null 2>&1; }
reload_resolver() {
local param output_text
case $1 in
fi
case "$targetDNS" in
dnsmasq.addnhosts)
- uci -q del_list dhcp.@dnsmasq[0].addnhosts="$addnhostsFile"
- uci add_list dhcp.@dnsmasq[0].addnhosts="$addnhostsFile"
- if [ -n "$(uci changes dhcp)" ]; then
- uci commit dhcp
- param=dnsmasq_restart
- output_text="Restarting DNSMASQ"
- else
- param=dnsmasq_kill
- output_text="Reloading DNSMASQ"
+ if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+ uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
fi
+ if ! uci -q get dhcp.@dnsmasq["$dnsInstance"].addnhosts | grep -q "$addnhostsFile"; then
+ uci add_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+ fi
+ param=dnsmasq_kill
+ output_text='Reloading DNSMASQ'
;;
dnsmasq.conf)
+ uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+ if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+ uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+ fi
+ param=dnsmasq_restart
+ output_text='Restarting DNSMASQ'
+ ;;
+ dnsmasq.ipset)
+ uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+ if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+ uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+ fi
param=dnsmasq_restart
- output_text="Restarting DNSMASQ"
+ output_text='Restarting DNSMASQ'
;;
dnsmasq.servers)
- if [ "$(uci -q get dhcp.@dnsmasq[0].serversfile)" != "$serversFile" ]; then
- uci set dhcp.@dnsmasq[0].serversfile="$serversFile"
- uci commit dhcp
- param=dnsmasq_restart
- output_text="Restarting DNSMASQ"
- else
- param=dnsmasq_kill
- output_text="Reloading DNSMASQ"
+ uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+ if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" != "$serversFile" ]; then
+ uci set dhcp.@dnsmasq["$dnsInstance"].serversfile="$serversFile"
fi
+ param=dnsmasq_kill
+ output_text='Reloading DNSMASQ'
;;
unbound.adb_list)
+ uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+ if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+ uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+ fi
param=unbound_restart
- output_text="Restarting Unbound"
+ output_text='Restarting Unbound'
;;
esac
+ if [ -n "$(uci changes dhcp)" ]; then
+ uci commit dhcp
+ if [ "$param" = 'unbound_restart' ]; then
+ param='dnsmasq_restart; unbound_restart;'
+ output_text='Restarting Unbound/DNSMASQ'
+ else
+ param=dnsmasq_restart
+ output_text='Restarting DNSMASQ'
+ fi
+ fi
output 1 "$output_text "
output 2 "$output_text "
tmpfs set message "$output_text"
cacheOps 'create'
case "$targetDNS" in
dnsmasq.addnhosts | dnsmasq.servers)
- if [ -n "$(uci changes dhcp)" ]; then
- uci -q commit dhcp
- param=dnsmasq_restart
- else
- param=dnsmasq_kill
- fi
+ param=dnsmasq_kill
;;
- dnsmasq.conf)
+ dnsmasq.conf | dnsmasq.ipset)
param=dnsmasq_restart
;;
unbound.adb_list)
param=unbound_restart
;;
esac
+ if [ -n "$(uci changes dhcp)" ]; then
+ uci -q commit dhcp
+ if [ "$param" = 'unbound_restart' ]; then
+ param='dnsmasq_restart; unbound_restart;'
+ else
+ param=dnsmasq_restart
+ fi
+ fi
eval "$param"
return $?
;;
quiet)
case "$targetDNS" in
- dnsmasq.addnhosts | dnsmasq.servers | dnsmasq.conf)
+ dnsmasq.addnhosts | dnsmasq.conf | dnsmasq.ipset | dnsmasq.servers)
param=dnsmasq_restart
;;
unbound.adb_list)
stats)
echo "$stats"; return;;
triggers)
- curReload="$allowNonAscii $parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
+ curReload="$parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
curRestart="$compressedCache $forceDNS $led"
if [ "$curReload" != "$readReload" ]; then
- ret="download"
+ ret='download'
elif [ "$curRestart" != "$readRestart" ]; then
- ret="restart"
+ ret='restart'
fi
echo "$ret"
return;;
;;
del)
case "$instance" in
+ all)
+ unset status;
+ unset message;
+ unset error;
+ unset stats;
+ ;;
status)
unset status;;
message)
stats)
stats="$value";;
triggers)
- readReload="$allowNonAscii $parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
+ readReload="$parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
readRestart="$compressedCache $forceDNS $led"
;;
esac
;;
esac
json_init
- json_add_object "data"
+ json_add_object 'data'
json_add_string version "$PKG_VERSION"
json_add_string status "$status"
json_add_string message "$message"
esac
}
-is_chaos_calmer() { ubus -S call system board | grep -q "Chaos Calmer"; }
-
-remove_fw3_redirect() {
- local name
- config_get name "$1" "name"
-# shellcheck disable=SC2154
- if [ -n "$name" ] && str_contains "$name" "simple-adblock"; then
- uci -q del "firewall.$1"
- fi
-}
-
-fw3_setup() {
- config_load "firewall"
- config_foreach remove_fw3_redirect "redirect"
- if [ "$1" = "start" ]; then
- uci -q add firewall redirect >/dev/null 2>&1
- uci -q set firewall.@redirect[-1].name="simple_adblock_dns_hijack"
- uci -q set firewall.@redirect[-1].target="DNAT"
- uci -q set firewall.@redirect[-1].src="lan"
- uci -q set firewall.@redirect[-1].proto="tcpudp"
- uci -q set firewall.@redirect[-1].src_dport="53"
- uci -q set firewall.@redirect[-1].dest_port="53"
- uci -q set firewall.@redirect[-1].dest_ip="$2"
- uci -q set firewall.@redirect[-1].reflection="0"
- fi
+fw3Ops() {
+ local action="$1" param="$2" _restart
+ case "$action" in
+ reload) /etc/init.d/firewall reload >/dev/null 2>&1;;
+ restart) /etc/init.d/firewall restart >/dev/null 2>&1;;
+ remove)
+ case "$param" in
+ dns_redirect) uci -q del firewall.simple_adblock_dns_redirect;;
+ ipset) uci -q del firewall.simple_adblock_ipset
+ uci -q del firewall.simple_adblock_ipset_rule;;
+ *)
+ uci -q del firewall.simple_adblock_dns_redirect
+ uci -q del firewall.simple_adblock_ipset
+ uci -q del firewall.simple_adblock_ipset_rule
+ ;;
+ esac
+ ;;
+ insert)
+ case "$param" in
+ dns_redirect)
+ if ! uci -q get firewall.simple_adblock_dns_redirect >/dev/null; then
+ uci -q set firewall.simple_adblock_dns_redirect=redirect
+ uci -q set firewall.simple_adblock_dns_redirect.name=simple_adblock_dns_hijack
+ uci -q set firewall.simple_adblock_dns_redirect.target=DNAT
+ uci -q set firewall.simple_adblock_dns_redirect.src=lan
+ uci -q set firewall.simple_adblock_dns_redirect.proto=tcpudp
+ uci -q set firewall.simple_adblock_dns_redirect.src_dport=53
+ uci -q set firewall.simple_adblock_dns_redirect.dest_port=53
+ fi
+ ;;
+ ipset)
+ if ! uci -q get firewall.simple_adblock_ipset >/dev/null; then
+ uci -q set firewall.simple_adblock_ipset=ipset
+ uci -q set firewall.simple_adblock_ipset.name=adb
+ uci -q set firewall.simple_adblock_ipset.match=dest_net
+ uci -q set firewall.simple_adblock_ipset.storage=hash
+ uci -q set firewall.simple_adblock_ipset.enabled=1
+ _restart=1
+ fi
+ if ! uci -q get firewall.simple_adblock_ipset_rule >/dev/null; then
+ uci -q set firewall.simple_adblock_ipset_rule=rule
+ uci -q set firewall.simple_adblock_ipset_rule.name=simple_adblock_ipset_rule
+ uci -q set firewall.simple_adblock_ipset_rule.ipset=adb
+ uci -q set firewall.simple_adblock_ipset_rule.src=lan
+ uci -q set firewall.simple_adblock_ipset_rule.dest='*'
+ uci -q set firewall.simple_adblock_ipset_rule.proto=tcpudp
+ uci -q set firewall.simple_adblock_ipset_rule.target=REJECT
+ uci -q set firewall.simple_adblock_ipset_rule.enabled=1
+ fi
+ ;;
+ *)
+ if ! uci -q get firewall.simple_adblock_dns_redirect >/dev/null; then
+ uci -q set firewall.simple_adblock_dns_redirect=redirect
+ uci -q set firewall.simple_adblock_dns_redirect.name=simple_adblock_dns_hijack
+ uci -q set firewall.simple_adblock_dns_redirect.target=DNAT
+ uci -q set firewall.simple_adblock_dns_redirect.src=lan
+ uci -q set firewall.simple_adblock_dns_redirect.proto=tcpudp
+ uci -q set firewall.simple_adblock_dns_redirect.src_dport=53
+ uci -q set firewall.simple_adblock_dns_redirect.dest_port=53
+ fi
+ if ! uci -q get firewall.simple_adblock_ipset >/dev/null; then
+ uci -q set firewall.simple_adblock_ipset=ipset
+ uci -q set firewall.simple_adblock_ipset.name=adb
+ uci -q set firewall.simple_adblock_ipset.match=dest_net
+ uci -q set firewall.simple_adblock_ipset.storage=hash
+ uci -q set firewall.simple_adblock_ipset.enabled=1
+ _restart=1
+ fi
+ if ! uci -q get firewall.simple_adblock_ipset_rule >/dev/null; then
+ uci -q set firewall.simple_adblock_ipset_rule=rule
+ uci -q set firewall.simple_adblock_ipset_rule.name=simple_adblock_ipset_rule
+ uci -q set firewall.simple_adblock_ipset_rule.ipset=adb
+ uci -q set firewall.simple_adblock_ipset_rule.src=lan
+ uci -q set firewall.simple_adblock_ipset_rule.dest='*'
+ uci -q set firewall.simple_adblock_ipset_rule.proto=tcpudp
+ uci -q set firewall.simple_adblock_ipset_rule.target=REJECT
+ uci -q set firewall.simple_adblock_ipset_rule.enabled=1
+ fi
+ ;;
+ esac
+ esac
if [ -n "$(uci changes firewall)" ]; then
uci -q commit firewall
- /etc/init.d/firewall restart >/dev/null 2>&1
+ if [ -z "$_restart" ]; then
+ fw3Ops 'reload'
+ else
+ fw3Ops 'restart'
+ fi
fi
}
local label type D_TMP R_TMP
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then return 1; fi
label="${1##*//}"; label="${label%%/*}";
- if [ "$2" = "hosts" ]; then
+ if [ "$2" = 'hosts' ]; then
label="Hosts: $label"; filter="$hostsFilter";
else
label="Domains: $label"; filter="$domainsFilter";
fi
- if [ "$3" = "blocked" ]; then
- type="Blocked"; D_TMP="$B_TMP";
+ if [ "$3" = 'blocked' ]; then
+ type='Blocked'; D_TMP="$B_TMP";
else
- type="Allowed"; D_TMP="$A_TMP";
+ type='Allowed'; D_TMP="$A_TMP";
fi
while [ -z "$R_TMP" ] || [ -e "$R_TMP" ]; do
R_TMP="$(mktemp -u -q -t ${packageName}_tmp.XXXXXXXX)"
if ! $dl_command "$1" $dl_flag "$R_TMP" 2>/dev/null || [ ! -s "$R_TMP" ]; then
output 1 "$_FAIL_"
output 2 "[DL] $type $label $__FAIL__\\n"
- printf "%b" "Error: downloading '${1}'.\\n" >> "$sharedMemoryError"
+ echo "Error: downloading '${1}'." >> "$sharedMemoryError"
else
sed -i "$filter" "$R_TMP"
if [ ! -s "$R_TMP" ]; then
output 1 "$_FAIL_"
output 2 "[DL] $type $label $__FAIL__\\n"
- printf "%b" "Error: parsing '${1}'.\\n" >> "$sharedMemoryError"
+ echo "Error: parsing '${1}'." >> "$sharedMemoryError"
else
cat "${R_TMP}" >> "$D_TMP"
output 1 "$_OK_"
tmpfs set message "${statusDownloading}..."
rm -f "$A_TMP" "$B_TMP" "$outputFile" "$outputCache" "$outputGzip"
if [ "$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo")" -lt 32 ]; then
- output 3 "Low free memory, restarting resolver... "
+ output 3 'Low free memory, restarting resolver... '
if reload_resolver 'quiet'; then
output_okn
else
fi
fi
touch $A_TMP; touch $B_TMP;
- output 1 "Downloading lists "
+ output 1 'Downloading lists '
rm -f "$sharedMemoryError"
if [ -n "$blacklist_hosts_urls" ]; then
for hf in ${blacklist_hosts_urls}; do
if [ "$parallelDL" -gt 0 ]; then
- process_url "$hf" "hosts" "blocked" &
+ process_url "$hf" 'hosts' 'blocked' &
else
- process_url "$hf" "hosts" "blocked"
+ process_url "$hf" 'hosts' 'blocked'
fi
done
fi
if [ -n "$blacklist_domains_urls" ]; then
for hf in ${blacklist_domains_urls}; do
if [ "$parallelDL" -gt 0 ]; then
- process_url "$hf" "domains" "blocked" &
+ process_url "$hf" 'domains' 'blocked' &
else
- process_url "$hf" "domains" "blocked"
+ process_url "$hf" 'domains' 'blocked'
fi
done
fi
if [ -n "$whitelist_domains_urls" ]; then
for hf in ${whitelist_domains_urls}; do
if [ "$parallelDL" -gt 0 ]; then
- process_url "$hf" "domains" "allowed" &
+ process_url "$hf" 'domains' 'allowed' &
else
- process_url "$hf" "domains" "allowed"
+ process_url "$hf" 'domains' 'allowed'
fi
done
fi
wait
[ -s "$sharedMemoryError" ] && tmpfs add error "$(cat "$sharedMemoryError")"
rm -f "$sharedMemoryError"
- output 1 "\\n"
+ output 1 '\n'
[ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$domainsFilter" >> $B_TMP; done
whitelist_domains="${whitelist_domains}
$(cat $A_TMP)"
- [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo "$hf" | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
+ [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
[ ! -s "$B_TMP" ] && return 1
- output 1 "Processing downloads "
- output 2 "Sorting combined list "
+ output 1 'Processing downloads '
+ output 2 'Sorting combined list '
tmpfs set message "$statusProcessing: sorting combined list"
- if [ "$allowNonAscii" -gt 0 ]; then
- if sort "$B_TMP" | uniq > "$A_TMP"; then
+ if [ "$allowIDN" -gt 0 ]; then
+ if sort -u "$B_TMP" > "$A_TMP"; then
output_ok
else
output_failn
- tmpfs add error "Error: Sorting error."
+ tmpfs add error 'Error: Sorting error.'
fi
else
- if sort "$B_TMP" | uniq | grep -E -v '[^a-zA-Z0-9=/.-]' > "$A_TMP"; then
+ if sort -u "$B_TMP" | grep -E -v '[^a-zA-Z0-9=/.-]' > "$A_TMP"; then
output_ok
else
output_failn
- tmpfs add error "Error: Sorting error."
+ tmpfs add error 'Error: Sorting error.'
fi
fi
- if [ "$targetDNS" = "dnsmasq.conf" ] || \
- [ "$targetDNS" = "dnsmasq.servers" ] || \
- [ "$targetDNS" = "unbound.adb_list" ]; then
+ if [ "$targetDNS" = 'dnsmasq.conf' ] || \
+ [ "$targetDNS" = 'dnsmasq.ipset' ] || \
+ [ "$targetDNS" = 'dnsmasq.servers' ] || \
+ [ "$targetDNS" = 'unbound.adb_list' ]; then
# TLD optimization written by Dirk Brenken (dev@brenken.org)
- output 2 "Optimizing combined list "
+ output 2 'Optimizing combined list '
tmpfs set message "$statusProcessing: optimizing combined list"
+# sed -E 'G;:t;s/(.*)(\.)(.*)(\n)(.*)/\1\4\5\2\3/;tt;s/(.*)\n(\.)(.*)/\3\2\1/' is actually slower than awk
if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
if sort "$B_TMP" > "$A_TMP"; then
if awk '{if(NR=1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
- if sort "$A_TMP" | uniq > "$B_TMP"; then
+ if sort -u "$A_TMP" > "$B_TMP"; then
output_ok
else
output_failn
- tmpfs add error "Error: Data file optimization."
+ tmpfs add error 'Error: Data file optimization.'
mv "$A_TMP" "$B_TMP"
fi
else
output_failn
- tmpfs add error "Error: Data file optimization."
+ tmpfs add error 'Error: Data file optimization.'
fi
else
output_failn
- tmpfs add error "Error: Data file optimization."
+ tmpfs add error 'Error: Data file optimization.'
mv "$A_TMP" "$B_TMP"
fi
else
output_failn
- tmpfs add error "Error: Data file optimization."
+ tmpfs add error 'Error: Data file optimization.'
fi
else
output_failn
- tmpfs add error "Error: Data file optimization."
+ tmpfs add error 'Error: Data file optimization.'
mv "$A_TMP" "$B_TMP"
fi
else
mv "$A_TMP" "$B_TMP"
fi
- output 2 "Whitelisting domains "
+ output 2 'Whitelisting domains '
tmpfs set message "$statusProcessing: whitelisting domains"
if sed -i "$w_filter" "$B_TMP"; then
output_ok
else
output_failn
- tmpfs add error "Error: Whitelist processing."
+ tmpfs add error 'Error: Whitelist processing.'
fi
- output 2 "Formatting merged file "
+ output 2 'Formatting merged file '
tmpfs set message "$statusProcessing: formatting merged file"
if [ -z "$outputFilterIPv6" ]; then
if sed "$outputFilter" "$B_TMP" > "$A_TMP"; then
output_ok
else
output_failn
- tmpfs add error "Error: Data file formatting."
+ tmpfs add error 'Error: Data file formatting.'
fi
else
- if sed "$outputFilter" "$B_TMP" > "$A_TMP" && \
- sed "$outputFilterIPv6" "$B_TMP" >> "$A_TMP"; then
- output_ok
- else
- output_failn
- tmpfs add error "Error: Data file formatting."
- fi
+ case "$targetDNS" in
+ dnsmasq.addnhosts)
+ if sed "$outputFilter" "$B_TMP" > "$A_TMP" && \
+ sed "$outputFilterIPv6" "$B_TMP" >> "$A_TMP"; then
+ output_ok
+ else
+ output_failn
+ tmpfs add error 'Error: Data file formatting.'
+ fi
+ ;;
+ esac
fi
case "$targetDNS" in
dnsmasq.addnhosts)
- output 2 "Creating DNSMASQ addnhosts file "
+ output 2 'Creating DNSMASQ addnhosts file '
tmpfs set message "$statusProcessing: creating DNSMASQ addnhosts file"
;;
dnsmasq.conf)
- output 2 "Creating DNSMASQ config file "
+ output 2 'Creating DNSMASQ config file '
tmpfs set message "$statusProcessing: creating DNSMASQ config file"
;;
+ dnsmasq.ipset)
+ output 2 'Creating DNSMASQ ipset file '
+ tmpfs set message "$statusProcessing: creating DNSMASQ ipset file"
+ ;;
dnsmasq.servers)
- output 2 "Creating DNSMASQ servers file "
+ output 2 'Creating DNSMASQ servers file '
tmpfs set message "$statusProcessing: creating DNSMASQ servers file"
;;
unbound.adb_list)
- output 2 "Creating Unbound adb_list file "
+ output 2 'Creating Unbound adb_list file '
tmpfs set message "$statusProcessing: creating Unbound adb_list file"
;;
esac
tmpfs add error "Error: moving data file '${A_TMP}' to '${outputFile}'."
fi
if [ "$compressedCache" -gt 0 ]; then
- output 2 "Creating compressed cache "
+ output 2 'Creating compressed cache '
tmpfs set message "$statusProcessing: creating compressed cache"
if cacheOps 'createGzip'; then
output_ok
else
output_failn
- tmpfs add error "Error: creating compressed cache."
+ tmpfs add error 'Error: creating compressed cache.'
fi
else
rm -f "$outputGzip"
fi
- output 2 "Removing temporary files "
+ output 2 'Removing temporary files '
tmpfs set message "$statusProcessing: removing temporary files"
rm -f "/tmp/${packageName}_tmp.*" "$A_TMP" "$B_TMP" "$outputCache" || j=1
if [ $j -eq 0 ]; then
output_ok
else
output_failn
- tmpfs add error "Error: removing temporary files."
+ tmpfs add error 'Error: removing temporary files.'
fi
- output 1 "\\n"
+ output 1 '\n'
}
boot() {
start_service() {
is_enabled 'on_start' || return 1
- local ip action status error message stats
+ local action status error message stats
if create_lock; then
- procd_open_instance "main"
- procd_set_param command /bin/true
- procd_set_param stdout 1
- procd_set_param stderr 1
- network_get_ipaddr ip "lan"
-# shellcheck disable=SC2154
- if [ "$forceDNS" -ne 0 ] && [ -n "$ip" ]; then
- if is_chaos_calmer; then
- fw3_setup "start" "$ip"
+ if is_chaos_calmer || ! is_ipset_procd; then
+ if [ "$forceDNS" -ne 0 ]; then
+ fw3Ops 'insert' 'dns_redirect'
+ else
+ fw3Ops 'remove' 'dns_redirect'
+ fi
+ if [ "$targetDNS" = 'dnsmasq.ipset' ]; then
+ fw3Ops 'insert' 'ipset'
else
- procd_open_data
- json_add_array firewall
- json_add_object ""
+ fw3Ops 'remove' 'ipset'
+ fi
+ procd_open_instance 'main'
+ procd_set_param command /bin/true
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+ else
+ procd_open_instance 'main'
+ procd_set_param command /bin/true
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_open_data
+ json_add_array firewall
+ if [ "$forceDNS" -ne 0 ]; then
+ json_add_object ''
json_add_string type redirect
- json_add_string target "DNAT"
- json_add_string src "lan"
- json_add_string dest "lan"
- json_add_string proto "tcpudp"
- json_add_string src_dport "53"
- json_add_string dest_port "53"
- json_add_string dest_ip "$ip"
- json_add_string name "simple-adblock-dns-hijack"
- json_add_string reflection "0"
+ json_add_string name simple_adblock_dns_redirect
+ json_add_string target DNAT
+ json_add_string src lan
+ json_add_string proto tcpudp
+ json_add_string src_dport 53
+ json_add_string dest_port 53
+ json_add_string reflection 0
json_close_object
- json_close_array
- procd_close_data
fi
+ if [ "$targetDNS" = 'dnsmasq.ipset' ]; then
+ json_add_object ''
+ json_add_string type ipset
+ json_add_string name adb
+ json_add_string match dest_net
+ json_add_string storage hash
+ json_add_string enabled 1
+ json_close_object
+ json_add_object ''
+ json_add_string type rule
+ json_add_string name simple_adblock_ipset_rule
+ json_add_string ipset adb
+ json_add_string src lan
+ json_add_string dest '*'
+ json_add_string proto tcpudp
+ json_add_string target REJECT
+ json_add_string enabled 1
+ json_close_object
+ fi
+ json_close_array
+ procd_close_data
+ procd_close_instance
fi
- procd_close_instance
status="$(tmpfs get status)"
error="$(tmpfs get error)"
action="$(tmpfs get triggers)"
case "$1" in
- download) action="download";;
+ download) action='download';;
restart|*)
- if [ "$1" != "restart" ] && [ -s "$outputFile" ] && [ -n "$status" ]; then
+ if [ -s "$outputFile" ] && [ -n "$status" ]; then
status
exit 0
elif [ ! -s "$outputFile" ] && ! cacheOps 'test' && ! cacheOps 'testGzip'; then
- action="download"
+ action='download'
elif cacheOps 'test' || cacheOps 'testGzip'; then
- action="start"
+ action='start'
fi
if [ -n "$error" ]; then
- action="download"
+ action='download'
fi
action="${action:-$1}"
;;
esac
- tmpfs del status
- tmpfs del error
- tmpfs del message
- tmpfs del stats
+ tmpfs del all
tmpfs set triggers
case $action in
reload_resolver 'on_start'
;;
restart|start)
- if [ "$action" = "restart" ]; then
+ if [ "$action" = 'restart' ]; then
output 0 "Restarting $serviceName... "
output 3 "Restarting $serviceName...\\n"
tmpfs set status "$statusRestarting"
tmpfs set status "$statusStarting"
fi
if cacheOps 'testGzip' && ! cacheOps 'test' && [ ! -s "$outputFile" ]; then
- output 3 "Found compressed cache file, unpacking it "
- tmpfs set message "found compressed cache file, unpacking it."
+ output 3 'Found compressed cache file, unpacking it '
+ tmpfs set message 'found compressed cache file, unpacking it.'
if cacheOps 'unpackGzip'; then
output_okn
else
output_fail
output "$_ERROR_: $serviceName failed to unpack compressed cache!\\n"
- tmpfs add error "Error: Failed to unpack compressed cache."
+ tmpfs add error 'Error: Failed to unpack compressed cache.'
return 1
fi
fi
if cacheOps 'test' && [ ! -s "$outputFile" ]; then
- output 3 "Found cache file, reusing it "
- tmpfs set message "found cache file, reusing it."
+ output 3 'Found cache file, reusing it '
+ tmpfs set message 'found cache file, reusing it.'
if cacheOps 'restore'; then
output_okn
else
if [ -s "$outputFile" ] && [ "$(tmpfs get status)" != "$statusFail" ]; then
output 0 "$__OK__\\n";
c="$(wc -l < "$outputFile")"
- output 3 "$serviceName is blocking $c domains "; output_okn
+ output 3 "$serviceName is blocking $c domains (with ${targetDNS}) "; output_okn
tmpfs del message
tmpfs set status "$statusSuccess: $c domains blocked (with ${targetDNS})."
error="$(tmpfs get error)"
else
output 0 "$__FAIL__\\n";
tmpfs set status "$statusFail"
- tmpfs add error "Error: Failed to create blocklist."
+ tmpfs add error 'Error: Failed to create blocklist.'
fi
remove_lock
else
fi
}
-service_started() { procd_set_config_changed firewall; }
-service_stopped() { procd_set_config_changed firewall; }
-restart_service() { rc_procd start_service "restart"; }
+service_started() { is_ipset_procd && procd_set_config_changed firewall; }
+service_stopped() { is_ipset_procd && procd_set_config_changed firewall; }
+restart_service() { rc_procd start_service 'restart'; }
reload_service() { restart_service; }
restart() { restart_service; }
reload() { restart_service; }
-dl() { rc_procd start_service "download"; }
+dl() { rc_procd start_service 'download'; }
killcache() {
rm -f "$addnhostsCache" "$addnhostsGzip"
rm -f "$dnsmasqCache" "$dnsmasqGzip"
+ rm -f "$ipsetCache" "$ipsetGzip"
rm -f "$serversCache" "$serversGzip"
rm -f "$unboundCache" "$unboundGzip"
return 0
stop_service() {
load_package_config
- if is_chaos_calmer; then
- fw3_setup 'stop'
- fi
+ fw3Ops 'remove' 'all'
if [ -s "$outputFile" ]; then
output "Stopping $serviceName... "
tmpfs del triggers
check() {
load_package_config
- local string="$1"
+ local string="$1"
+ local c="$(grep -c "$string" "$outputFile")"
if [ ! -f "$outputFile" ]; then
echo "No blacklist ('$outputFile') found."
elif [ -z "$string" ]; then
- echo "Usage: /etc/init.d/${packageName} check domain"
- elif grep -m1 -q "$string" "$outputFile"; then
- echo "Found $(grep -c "$string" "$outputFile") matches for '$string' in '$outputFile':"
+ echo "Usage: /etc/init.d/${packageName} check string"
+ elif [ "$c" -gt 0 ]; then
+ if [ "$c" -gt 1 ]; then
+ echo "Found $c matches for '$string' in '$outputFile':"
+ else
+ echo "Found 1 match for '$string' in '$outputFile':"
+ fi
case "$targetDNS" in
dnsmasq.addnhosts)
grep "$string" "$outputFile" | sed 's|^127.0.0.1 ||;s|^:: ||;';;
dnsmasq.conf)
grep "$string" "$outputFile" | sed 's|local=/||;s|/$||;';;
+ dnsmasq.ipset)
+ grep "$string" "$outputFile" | sed 's|ipset=/||;s|/adb$||;';;
dnsmasq.servers)
grep "$string" "$outputFile" | sed 's|server=/||;s|/$||;';;
unbound.adb_list)
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_CPE_ID:=cpe:/a:snort:snort
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
PKG_NAME:=snort3
PKG_VERSION:=3.0.0-beta
PKG_VERSION_SHORT:=3.0.0
-PKG_RELEASE:=3
-
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_RELEASE:=4
PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
-
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:snort:snort
+
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0-or-later OpenSSL
PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL
+PKG_CPE_ID:=cpe:/a:dest-unreach:socat
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:squid-cache:squid
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_HASH:=d9af70acea5c054952ad1584916c1bf231b064eb6c8a9791dcb6ae90a769990c
PKG_LICENSE:=GPL-2.0-or-later
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
+PKG_CPE_ID:=cpe:/a:strongswan:strongswan
PKG_MOD_AVAILABLE:= \
addrblock \
include $(TOPDIR)/rules.mk
-PKG_LICENSE:=ASL-2.0
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
PKG_NAME:=sysrepo
PKG_VERSION:=0.7.7
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=2bf8cb4d810d19231eba1e549f58f3a0ce068d170a5e7b212b927396098560e4
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
define Package/libsysrepo
SECTION:=utils
CATEGORY:=Utilities
- URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store library
+ URL:=https://www.sysrepo.org/
DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
MENU:=1
endef
define Package/sysrepo
SECTION:=utils
CATEGORY:=Utilities
- URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store daemon and plugin
+ URL:=https://www.sysrepo.org/
DEPENDS:=+libsysrepo
endef
define Package/sysrepoctl
SECTION:=utils
CATEGORY:=Utilities
- URL:=$(PKG_SOURCE_URL)
TITLE:=sysrepo cli tool
+ URL:=https://www.sysrepo.org/
DEPENDS:=+libsysrepo
endef
define Package/sysrepocfg
SECTION:=utils
CATEGORY:=Utilities
- URL:=$(PKG_SOURCE_URL)
TITLE:=sysrepo configuration tool
+ URL:=https://www.sysrepo.org/
DEPENDS:=+libsysrepo
endef
-Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
-===================================================================
--- /dev/null
-+++ sysrepo-0.7.5/src/common/sysrepo.pb-c.c
++++ b/src/common/sysrepo.pb-c.c
@@ -0,0 +1,10537 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: sysrepo.proto */
+ sr__operation__value_ranges,
+ NULL,NULL,NULL,NULL /* reserved[1234] */
+};
-Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.h
-===================================================================
--- /dev/null
-+++ sysrepo-0.7.5/src/common/sysrepo.pb-c.h
++++ b/src/common/sysrepo.pb-c.h
@@ -0,0 +1,4238 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: sysrepo.proto */
-Index: sysrepo-0.7.5/CMakeLists.txt
-===================================================================
---- sysrepo-0.7.5.orig/CMakeLists.txt
-+++ sysrepo-0.7.5/CMakeLists.txt
-@@ -303,7 +303,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -310,7 +310,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
# install NACM YANG module
if(ENABLE_NACM)
endif(ENABLE_NACM)
find_package(PkgConfig QUIET)
-@@ -327,9 +327,9 @@ if(WITH_SYSTEMD)
+@@ -334,9 +334,9 @@ if(WITH_SYSTEMD)
FILES_MATCHING PATTERN "*.service")
endif()
+#INSTALL_YANG("nc-notifications" "" "666")
+#INSTALL_YANG("notifications" "" "666")
- if(GEN_LANGUAGE_BINDINGS)
- add_subdirectory(swig)
+ # uninstall
+ add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_MODULE_PATH}/uninstall.cmake")
-Index: sysrepo-0.7.5/src/clientlib/client_library.c
-===================================================================
---- sysrepo-0.7.5.orig/src/clientlib/client_library.c
-+++ sysrepo-0.7.5/src/clientlib/client_library.c
+--- a/src/clientlib/client_library.c
++++ b/src/clientlib/client_library.c
@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
if (opts & SR_CONN_DAEMON_REQUIRED) {
if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) {
-Index: sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
-===================================================================
---- sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/common/sr_utils.c
-+++ sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
-@@ -460,14 +460,24 @@ sr_fd_set_nonblock(int fd)
+--- a/src/common/sr_utils.c
++++ b/src/common/sr_utils.c
+@@ -477,14 +477,24 @@ sr_fd_set_nonblock(int fd)
#if defined(SO_PEERCRED)
-Index: sysrepo-0.7.7/src/common/sysrepo.pb-c.c
-===================================================================
---- sysrepo-0.7.7.orig/src/common/sysrepo.pb-c.c
-+++ sysrepo-0.7.7/src/common/sysrepo.pb-c.c
+--- a/src/common/sysrepo.pb-c.c
++++ b/src/common/sysrepo.pb-c.c
@@ -8013,7 +8013,7 @@ const ProtobufCMessageDescriptor sr__eve
(ProtobufCMessageInit) sr__event_notif_replay_resp__init,
NULL,NULL,NULL /* reserved[123] */
sr__data_provide_req__field_descriptors,
sr__data_provide_req__field_indices_by_name,
3, sr__data_provide_req__number_ranges,
-Index: sysrepo-0.7.7/src/common/sysrepo.pb-c.h
-===================================================================
---- sysrepo-0.7.7.orig/src/common/sysrepo.pb-c.h
-+++ sysrepo-0.7.7/src/common/sysrepo.pb-c.h
+--- a/src/common/sysrepo.pb-c.h
++++ b/src/common/sysrepo.pb-c.h
@@ -1630,10 +1630,11 @@ struct _Sr__DataProvideReq
char *subscriber_address;
uint32_t subscription_id;
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=docs/LICENSE
+PKG_CPE_ID:=cpe:/a:appneta:tcpreplay
PKG_FIXUP:=libtool
PKG_INSTALL:=1
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=GPL-2.0-only
+PKG_CPE_ID:=cpe:/a:zaal:tgt
PKG_USE_MIPS16:=0
PKG_INSTALL:=1
PKG_SOURCE_URL:=https://www.tinc-vpn.org/packages
PKG_HASH:=18c83b147cc3e2133a7ac2543eeb014d52070de01c7474287d3ccecc9b16895e
+PKG_CPE_ID:=cpe:/a:tinc:tinc
+
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_HASH:=be559b54eb4772a703ad35239d1cb59d32f7cf8a739966742622d57df88b896e
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_CPE_ID:=cpe:/a:banu:tinyproxy
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control
-PKG_SOURCE_DATE:=2019-04-16
-PKG_SOURCE_VERSION:=a747a87babb246b0d3e6dd108ad7b4c19462cfe6
-PKG_MIRROR_HASH:=90a2e33bd799a13504881e26980823fa181b47918900fc4ef03ae3daf0625f14
+PKG_SOURCE_DATE:=2019-07-24
+PKG_SOURCE_VERSION:=c27e3ba9f08148f79fb4121d8a1f5906640ff8d6
+PKG_MIRROR_HASH:=6de823b9b8229b176fbb5c9f33f326c0fb23553ae00a36f60d019fdcdf90a712
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_NAME:=transmission
PKG_VERSION:=2.94
-PKG_RELEASE:=5
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
PKG_HASH:=35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
SECTION:=net
CATEGORY:=Network
TITLE:=BitTorrent client
- URL:=http://www.transmissionbt.com
+ URL:=https://www.transmissionbt.com
DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib
endef
endef
Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
CONFIGURE_ARGS += \
IFS="$LIST_SEP"
for v in $v; do
[ -n "$v" ] && (
- echo "\"$p\": $v," | sed -e 's|_|-|g' >> $config_file
- )
+ echo "\"$p\": $v," | sed -e 's|_|-|g'
+ ) >> "$config_file"
done
unset IFS
done
IFS="$LIST_SEP"
for v in $v; do
[ -n "$v" ] && (
- echo -n "\"$p" | sed -e 's|/|\\/|g;s|_|-|g' >> $config_file; \
- echo "\": \"$v\"," >> $config_file
- )
+ printf "\"%s" "$p" | sed -e 's|/|\\/|g;s|_|-|g'; \
+ echo "\": \"$v\","
+ ) >> "$config_file"
done
unset IFS
done
local download_dir config_dir
local mem_percentage
local nice
- local cmdline
local web_home
section_enabled "$section" || return 1
fi
config_file="$config_dir/settings.json"
- [ -d $config_dir ] || {
- mkdir -p $config_dir
- chmod 0755 $config_dir
- touch $config_file
- [ -z "$user" ] || chown -R "$user:$group" $config_dir
+ [ -d "$config_dir" ] || {
+ mkdir -p "$config_dir"
+ chmod 0755 "$config_dir"
+ touch "$config_file"
+ [ -z "$user" ] || chown -R "$user:$group" "$config_dir"
}
[ "$config_overwrite" = 0 ] || {
- echo "{" > $config_file
+ echo "{" > "$config_file"
append_params "$cfg" \
alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir
- echo "\"invalid-key\": false" >> $config_file
- echo "}" >> $config_file
-
+ {
+ echo "\"invalid-key\": false"
+ echo "}"
+ } >> "$config_file"
}
- cmdline="transmission-daemon -g $config_dir -f"
procd_open_instance
- procd_set_param command $cmdline
- procd_set_param user $user
- procd_set_param group $group
- procd_set_param nice $nice
- procd_set_param respawn retry=60
-
- if test -z $USE; then
+ procd_set_param command "/usr/bin/transmission-daemon"
+ procd_append_param command -f --log-error -g "$config_dir"
+ procd_set_param user "$user"
+ procd_set_param group "$group"
+ procd_set_param nice "$nice"
+ procd_set_param stderr 1
+ procd_set_param respawn
+
+ if [ -z "$USE" ]; then
procd_set_param limits core="0 0"
else
procd_set_param limits core="0 0" as="$USE $USE"
fi
procd_add_jail transmission log
- procd_add_jail_mount $config_file
- procd_add_jail_mount_rw $download_dir
+ procd_add_jail_mount "$config_file"
+ procd_add_jail_mount_rw "$download_dir"
procd_close_instance
}
+# Transmission requests large buffers by default
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
+
+# Some firewalls block SYN packets that are too small
+net.ipv4.tcp_adv_win_scale = 4
+++ /dev/null
-From a2991e22434352a3114bf437674070a135b723fd Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 27 May 2018 13:38:27 -0700
-Subject: [PATCH] portcheck: Switch to HTTPS
-
-Useful for testing TLS verification.
----
- libtransmission/rpcimpl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c
-index 46fd3192c..dcd96df59 100644
---- a/libtransmission/rpcimpl.c
-+++ b/libtransmission/rpcimpl.c
-@@ -1455,7 +1455,7 @@ portTest (tr_session * session,
- struct tr_rpc_idle_data * idle_data)
- {
- const int port = tr_sessionGetPeerPort (session);
-- char * url = tr_strdup_printf ("http://portcheck.transmissionbt.com/%d", port);
-+ char * url = tr_strdup_printf ("https://portcheck.transmissionbt.com/%d", port);
- tr_webRun (session, url, portTested, idle_data);
- tr_free (url);
- return NULL;
---
-2.17.0
-
+++ /dev/null
-From 81d584b9027b2b2ddd3209c1582c9ec73c26cc3e Mon Sep 17 00:00:00 2001
-From: Simon Wells <simonrwells@gmail.com>
-Date: Sun, 27 May 2018 13:44:41 -0700
-Subject: [PATCH] Change TR_CURL_SSL_VERIFY to TR_CURL_SSL_NO_VERIFY
-
-use secure by default and change the env var to match curl -k behaviour
-
-Closes: #179
----
- libtransmission/web.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/web.c b/libtransmission/web.c
-index 997a151b5..ce41e342a 100644
---- a/libtransmission/web.c
-+++ b/libtransmission/web.c
-@@ -392,7 +392,7 @@ tr_webThreadFunc (void * vsession)
- web->taskLock = tr_lockNew ();
- web->tasks = NULL;
- web->curl_verbose = tr_env_key_exists ("TR_CURL_VERBOSE");
-- web->curl_ssl_verify = tr_env_key_exists ("TR_CURL_SSL_VERIFY");
-+ web->curl_ssl_verify = !tr_env_key_exists ("TR_CURL_SSL_NO_VERIFY");
- web->curl_ca_bundle = tr_env_get_string ("CURL_CA_BUNDLE", NULL);
- if (web->curl_ssl_verify)
- {
---
-2.17.0
-
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=1.4.12
+PKG_VERSION:=1.4.13
PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
--- /dev/null
+#!/bin/sh
+
+cmd="$(command -v curl)"
+url="http://example.com/"
+success_string="Thank you!"
+
+if [ ! -x "${cmd}" ]
+then
+ exit 1
+fi
+
+
+response="$("${cmd}" $url -d "password=$2&pwd=$2&username=$1" \
+ --header "Content-Type:application/x-www-form-urlencoded" -s)"
+
+if echo "${response}" | grep -q "${success_string}";
+then
+ exit 0
+else
+ exit 2
+fi
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.4.12"
+trm_ver="1.4.13"
trm_enabled=0
trm_debug=0
trm_iface="trm_wwan"
#
f_check()
{
- local IFS ifname radio dev_status config sta_essid sta_bssid result uci_essid uci_bssid login_command wait_time mode="${1}" status="${2:-"false"}" cp_domain="${3:-"false"}"
+ local IFS ifname radio dev_status config sta_essid sta_bssid result uci_essid uci_bssid login_command login_command_args wait_time mode="${1}" status="${2:-"false"}" cp_domain="${3:-"false"}"
if [ "${mode}" != "initial" ] && [ "${status}" = "false" ]
then
login_command="$(uci_get "travelmate" "${uci_essid}${uci_bssid}" "command")"
if [ -x "${login_command}" ]
then
- "${login_command}" >/dev/null 2>&1
+ login_command_args="$(uci_get "travelmate" "${uci_essid}${uci_bssid}" "command_args")"
+ "${login_command}" ${login_command_args} >/dev/null 2>&1
rc=${?}
- f_log "info" "captive portal login '${login_command:0:40}' for '${cp_domain}' has been executed with rc '${rc}'"
+ f_log "info" "captive portal login '${login_command:0:40} ${login_command_args}' for '${cp_domain}' has been executed with rc '${rc}'"
if [ "${rc}" -eq 0 ]
then
result="$(f_net)"
PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
PKG_HASH:=e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=autoreconf
-
PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/umurmur/Default
SECTION:=net
SUBMENU:=Instant Messaging
TITLE:=uMurmur
DEPENDS:=+libconfig +libprotobuf-c
- URL:=http://umurmur.net
+ URL:=https://umurmur.net
endef
define Package/umurmur/Default/description
Uses the mbed TLS library for SSL and crypto.
endef
-define Build/Compile
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- $(MAKE) -C $(PKG_BUILD_DIR)/src all
-endef
-
define Package/umurmur-openssl/conffiles
/etc/umurmur.conf
endef
define Package/umurmur-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/umurmurd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
-ifeq ($(BUILD_VARIANT),openssl)
- CONFIGURE_ARGS += \
- --with-ssl=openssl
-endif
+CMAKE_OPTIONS += \
+ -DLIBCONFIG_INCLUDE_DIR="$(STAGING_DIR)/include" \
+ -DLIBCONFIG_LIBRARIES="$(STAGING_DIR)/lib" \
+ -DLIBCONFIG_LIB_DIR="$(STAGING_DIR)/lib" \
+ -DPROTOBUFC_INCLUDE_DIR="$(STAGING_DIR)/include" \
+ -DPROTOBUFC_LIBRARIES="$(STAGING_DIR)/lib" \
+ -DPROTOBUFC_LIB_DIR="$(STAGING_DIR)/lib"
-ifeq ($(BUILD_VARIANT),mbedtls)
- CONFIGURE_ARGS += \
- --with-ssl=mbedtls
+ifeq ($(BUILD_VARIANT),openssl)
+CMAKE_OPTIONS += -DSSL=openssl
+else
+CMAKE_OPTIONS += -DSSL=mbedtls \
+ -DMBEDTLS_INCLUDE_DIR="$(STAGING_DIR)/include/mbedtls" \
+ -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/lib" \
+ -DMBEDTLS_LIB_DIR="$(STAGING_DIR)/lib"
endif
$(eval $(call BuildPackage,umurmur-openssl))
PKG_HASH:=bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3
PKG_LICENSE:=xinetd
PKG_LICENSE_FILES:=COPYRIGHT
+PKG_CPE_ID:=cpe:/a:xinetd:xinetd
PKG_INSTALL:=1
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=xtables-addons
-PKG_VERSION:=3.3
+PKG_VERSION:=3.5
PKG_RELEASE:=1
-PKG_HASH:=efa62c7df6cd3b82d7195105bf6fe177b605f91f3522e4114d2f4e0ad54320d6
+PKG_HASH:=189ff57a0b8960969bd99141a6c79c345efa67e4461f450e2f162c9bd3d17da6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/xtables-addons
$(eval $(call BuildTemplate,logmark,LOGMARK,xt_LOGMARK,xt_LOGMARK,+kmod-ipt-compat-xtables))
$(eval $(call BuildTemplate,lscan,lscan,xt_lscan,xt_lscan,))
$(eval $(call BuildTemplate,lua,Lua PacketScript,xt_LUA,LUA/xt_LUA,+kmod-ipt-conntrack-extra))
+$(eval $(call BuildTemplate,proto,PROTO,xt_PROTO,xt_PROTO,))
$(eval $(call BuildTemplate,psd,psd,xt_psd,xt_psd,))
$(eval $(call BuildTemplate,quota2,quota2,xt_quota2,xt_quota2,))
$(eval $(call BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables +kmod-crypto-hash))
index 7631f6b..0d3aa72 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -59,7 +59,7 @@ if test -n "$kbuilddir"; then
- echo "$kmajor.$kminor.$kmicro.$kstable in $kbuilddir";
- if test "$kmajor" -gt 5 -o "$kmajor" -eq 5 -a "$kminor" -gt 0; then
+@@ -61,7 +61,7 @@ if test -n "$kbuilddir"; then
echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+ elif test "$kmajor" -eq 5 -a "$kminor" -ge 0; then
+ :
- elif test "$kmajor" -eq 4 -a "$kminor" -ge 18; then
+ elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
:
index 0d3aa72..1cea354 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -59,7 +59,7 @@ if test -n "$kbuilddir"; then
- echo "$kmajor.$kminor.$kmicro.$kstable in $kbuilddir";
- if test "$kmajor" -gt 5 -o "$kmajor" -eq 5 -a "$kminor" -gt 0; then
+@@ -61,7 +61,7 @@ if test -n "$kbuilddir"; then
echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+ elif test "$kmajor" -eq 5 -a "$kminor" -ge 0; then
+ :
- elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
+ elif test "$kmajor" -eq 4 -a "$kminor" -ge 9; then
:
index 618de5e..221f342 100644
--- a/extensions/xt_DELUDE.c
+++ b/extensions/xt_DELUDE.c
-@@ -146,7 +146,13 @@ delude_tg(struct sk_buff *skb, const struct xt_action_param *par)
+@@ -151,7 +151,13 @@ delude_tg(struct sk_buff *skb, const struct xt_action_param *par)
* a problem, as that is supported since Linux 2.6.35. But since we do not
* actually want to have a connection open, we are still going to drop it.
*/
index cb98e9e..b78683c 100644
--- a/extensions/xt_TARPIT.c
+++ b/extensions/xt_TARPIT.c
-@@ -431,7 +431,12 @@ tarpit_tg4(struct sk_buff *skb, const struct xt_action_param *par)
+@@ -436,7 +436,12 @@ tarpit_tg4(struct sk_buff *skb, const struct xt_action_param *par)
/* We are not interested in fragments */
if (iph->frag_off & htons(IP_OFFSET))
return NF_DROP;
return NF_DROP;
}
-@@ -472,7 +477,12 @@ tarpit_tg6(struct sk_buff *skb, const struct xt_action_param *par)
+@@ -477,7 +482,12 @@ tarpit_tg6(struct sk_buff *skb, const struct xt_action_param *par)
pr_debug("addr is not unicast.\n");
return NF_DROP;
}
+module_exit(fini);
--- a/extensions/Kbuild
+++ b/extensions/Kbuild
-@@ -26,6 +26,7 @@ obj-${build_lscan} += xt_lscan.o
+@@ -27,6 +27,7 @@ obj-${build_lscan} += xt_lscan.o
obj-${build_pknock} += pknock/
obj-${build_psd} += xt_psd.o
obj-${build_quota2} += xt_quota2.o
-include ${M}/Kbuild.*
--- a/mconfig
+++ b/mconfig
-@@ -22,3 +22,4 @@ build_lscan=m
+@@ -23,3 +23,4 @@ build_lscan=m
build_pknock=m
build_psd=m
build_quota2=m
+
--- a/extensions/Kbuild
+++ b/extensions/Kbuild
-@@ -27,6 +27,7 @@ obj-${build_pknock} += pknock/
+@@ -28,6 +28,7 @@ obj-${build_pknock} += pknock/
obj-${build_psd} += xt_psd.o
obj-${build_quota2} += xt_quota2.o
obj-${build_rtsp} += rtsp/
-include ${M}/Kbuild.*
--- a/extensions/Mbuild
+++ b/extensions/Mbuild
-@@ -22,3 +22,4 @@ obj-${build_pknock} += pknock/
+@@ -23,3 +23,4 @@ obj-${build_pknock} += pknock/
obj-${build_psd} += libxt_psd.so
obj-${build_quota2} += libxt_quota2.so
obj-${build_gradm} += libxt_gradm.so
+obj-${build_LUA} += LUA/
--- a/mconfig
+++ b/mconfig
-@@ -23,3 +23,4 @@ build_pknock=m
+@@ -24,3 +24,4 @@ build_pknock=m
build_psd=m
build_quota2=m
build_rtsp=m
include $(TOPDIR)/rules.mk
PKG_NAME:=yggdrasil
-PKG_VERSION:=0.3.8
-PKG_RELEASE:=2
+PKG_VERSION:=0.3.9
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=56eebbb63cf2d14897141ce037fb9aec407430718908cfeeb34fff355f08f9af
+PKG_HASH:=34780dbdbcb486320097274ef9d3c606165c44132f250e481671f99686c77b73
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
+++ /dev/null
-commit 174ebceaacae482df95e7bb96f0848bb1588a4ff
-Author: Neil Alexander <neilalexander@users.noreply.github.com>
-Date: Sun Sep 1 21:32:40 2019 +0100
-
- Fix hjson-go import in go.mod/go.sum
-
-diff --git a/go.mod b/go.mod
-index d2ca6b7..6703d5b 100644
---- a/go.mod
-+++ b/go.mod
-@@ -4,7 +4,7 @@ require (
- github.com/Arceliar/phony v0.0.0-20190831214819-9b642ea019ad
- github.com/gologme/log v0.0.0-20181207131047-4e5d8ccb38e8
- github.com/hashicorp/go-syslog v1.0.0
-- github.com/hjson/hjson-go v0.0.0-20181010104306-a25ecf6bd222
-+ github.com/hjson/hjson-go v3.0.1-0.20190209023717-9147687966d9+incompatible
- github.com/kardianos/minwinsvc v0.0.0-20151122163309-cad6b2b879b0
- github.com/mitchellh/mapstructure v1.1.2
- github.com/songgao/packets v0.0.0-20160404182456-549a10cd4091
-diff --git a/go.sum b/go.sum
-index f0fbaca..60e6090 100644
---- a/go.sum
-+++ b/go.sum
-@@ -6,6 +6,8 @@ github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwM
- github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
- github.com/hjson/hjson-go v0.0.0-20181010104306-a25ecf6bd222 h1:xmvkbxXDeN1ffWq8kvrhyqVYAO2aXuRBsbpxVTR+JyU=
- github.com/hjson/hjson-go v0.0.0-20181010104306-a25ecf6bd222/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio=
-+github.com/hjson/hjson-go v3.0.1-0.20190209023717-9147687966d9+incompatible h1:bLQ2Ve+eW65id3b8xEMQiAwJT4qGZeywAEMLvXjznvw=
-+github.com/hjson/hjson-go v3.0.1-0.20190209023717-9147687966d9+incompatible/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio=
- github.com/kardianos/minwinsvc v0.0.0-20151122163309-cad6b2b879b0 h1:YnZmFjg0Nvk8851WTVWlqMC1ecJH07Ctz+Ezxx4u54g=
- github.com/kardianos/minwinsvc v0.0.0-20151122163309-cad6b2b879b0/go.mod h1:rUi0/YffDo1oXBOGn1KRq7Fr07LX48XEBecQnmwjsAo=
- github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
-
PKG_NAME:=forked-daapd
PKG_VERSION:=26.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
--- /dev/null
+From 20f5118f7505e2e82be3504624ac934b8837d25b Mon Sep 17 00:00:00 2001
+From: Scott Shambarger <devel@shambarger.net>
+Date: Tue, 11 Jun 2019 20:10:04 -0700
+Subject: [PATCH] [alsa] asoundlib.h should be alsa/asoundlib.h
+
+---
+ configure.ac | 2 +-
+ src/outputs/alsa.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9ec5eb101..98068bf11 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,7 +238,7 @@ AC_CHECK_SIZEOF([void *])
+ dnl --- Begin configuring the options ---
+ dnl ALSA
+ FORK_ARG_WITH_CHECK([FORKED_OPTS], [ALSA support], [alsa], [ALSA],
+- [alsa], [snd_mixer_open], [asoundlib.h])
++ [alsa], [snd_mixer_open], [alsa/asoundlib.h])
+ AM_CONDITIONAL([COND_ALSA], [[test "x$with_alsa" = "xyes"]])
+
+ dnl PULSEAUDIO
+diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c
+index b696f0c3d..1a32aad19 100644
+--- a/src/outputs/alsa.c
++++ b/src/outputs/alsa.c
+@@ -30,7 +30,7 @@
+ #include <inttypes.h>
+
+ #include <event2/event.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include "misc.h"
+ #include "conffile.h"
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:mpg123:mpg123
PKG_INSTALL:=1
PKG_NAME:=pulseaudio
PKG_VERSION:=12.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=GPL LICENSE
+PKG_CPE_ID:=cpe:/a:pulseaudio:pulseaudio
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
--disable-jack \
--disable-asyncns \
--disable-lirc \
+ --disable-tests \
--disable-udev \
--without-fftw \
--without-soxr \
--- /dev/null
+From 993d3fd89e5611997f1e165bf03edefb0204b0a4 Mon Sep 17 00:00:00 2001
+From: Olaf Hering <olaf@aepfle.de>
+Date: Wed, 27 Mar 2019 09:35:05 +0100
+Subject: [PATCH] alsa: Use correct header path
+
+Consumers are expected to use <alsa/asoundlib.h> instead of
+<asoundlib.h>.
+
+This is in preparation of an change to pkgconfig(alsa) to
+not pollute CFLAGS with -I/usr/include/alsa anymore.
+
+Signed-off-by: Olaf Hering <olaf@aepfle.de>
+---
+ src/modules/alsa/alsa-mixer.c | 2 +-
+ src/modules/alsa/alsa-mixer.h | 2 +-
+ src/modules/alsa/alsa-sink.c | 2 +-
+ src/modules/alsa/alsa-source.c | 2 +-
+ src/modules/alsa/alsa-ucm.c | 2 +-
+ src/modules/alsa/alsa-util.c | 2 +-
+ src/modules/alsa/alsa-util.h | 2 +-
+ src/modules/alsa/module-alsa-source.c | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
+index 5cb99c8fd..cd99a75f8 100644
+--- a/src/modules/alsa/alsa-mixer.c
++++ b/src/modules/alsa/alsa-mixer.c
+@@ -23,7 +23,7 @@
+ #endif
+
+ #include <sys/types.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <math.h>
+
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
+index 3ea4d7329..65b071165 100644
+--- a/src/modules/alsa/alsa-mixer.h
++++ b/src/modules/alsa/alsa-mixer.h
+@@ -21,7 +21,7 @@
+ along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <pulse/sample.h>
+ #include <pulse/mainloop-api.h>
+diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
+index 28143402a..4b46708ce 100644
+--- a/src/modules/alsa/alsa-sink.c
++++ b/src/modules/alsa/alsa-sink.c
+@@ -25,7 +25,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
+index 8129220b0..c8bf649e1 100644
+--- a/src/modules/alsa/alsa-source.c
++++ b/src/modules/alsa/alsa-source.c
+@@ -25,7 +25,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <pulse/rtclock.h>
+ #include <pulse/timeval.h>
+diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
+index 341c8012e..0a40ca8fe 100644
+--- a/src/modules/alsa/alsa-ucm.c
++++ b/src/modules/alsa/alsa-ucm.c
+@@ -27,7 +27,7 @@
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <limits.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
+index e8d712e72..bd0a47e50 100644
+--- a/src/modules/alsa/alsa-util.c
++++ b/src/modules/alsa/alsa-util.c
+@@ -23,7 +23,7 @@
+ #endif
+
+ #include <sys/types.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <pulse/sample.h>
+ #include <pulse/xmalloc.h>
+diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
+index 6b27339ec..4ceaa06ee 100644
+--- a/src/modules/alsa/alsa-util.h
++++ b/src/modules/alsa/alsa-util.h
+@@ -21,7 +21,7 @@
+ along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <pulse/sample.h>
+ #include <pulse/channelmap.h>
+diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
+index af6800dd2..747ba9342 100644
+--- a/src/modules/alsa/module-alsa-source.c
++++ b/src/modules/alsa/module-alsa-source.c
+@@ -24,7 +24,7 @@
+
+ #include <stdio.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+--
+2.22.0
+
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tedfelix:acpid
include $(INCLUDE_DIR)/package.mk
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:gnu:bash
PKG_INSTALL:=1
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=
+PKG_CPE_ID:=cpe:/a:bluez:bluez
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_NAME:=collectd
PKG_VERSION:=5.9.0
-PKG_RELEASE:=5
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>, Hannu Nyman <hannu.nyman@iki.fi>
+PKG_CPE_ID:=cpe:/a:collectd:collectd
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
fi
}
+process_curl() {
+ printf "<Plugin curl>\n" >> "$COLLECTD_CONF"
+ config_foreach process_curl_page curl_page
+ printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_curl_page() {
+ local cfg="$1"
+
+ local name url
+
+ config_get name "$cfg" name
+ [ -z "$name" ] && {
+ $LOG notice "No name option in config $cfg defined"
+ return 0
+ }
+
+ config_get url "$cfg" url
+ [ -z "$url" ] && {
+ $LOG notice "No URL option in config $cfg defined"
+ return 0
+ }
+
+ printf "\\t<Page \"%s\">\n" "${name}" >> "$COLLECTD_CONF"
+ printf "\\t\\tURL \"%s\"\n" "${url}" >> "$COLLECTD_CONF"
+ printf "\\t\\tMeasureResponseTime true\n" >> "$COLLECTD_CONF"
+ printf "\\t</Page>\n" >> "$COLLECTD_CONF"
+}
+
+process_network() {
+ local cfg="$1"
+
+ local TimeToLive Forward CacheFlush
+
+ printf "<Plugin network>\n" >> "$COLLECTD_CONF"
+ config_foreach process_network_sections network_listen "listen"
+ config_foreach process_network_sections network_server "server"
+
+ config_get TimeToLive "$cfg" TimeToLive
+ [ -z "$TimeToLive" ] || {
+ printf "\\tTimeToLive %s\n" "${TimeToLive}" >> "$COLLECTD_CONF"
+ }
+
+ config_get CacheFlush "$cfg" CacheFlush
+ [ -z "$CacheFlush" ] || {
+ printf "\\tCacheFlush %s\n" "${CacheFlush}" >> "$COLLECTD_CONF"
+ }
+
+ config_get_bool Forward "$cfg" Forward
+ if [ "$value" = "0" ]; then
+ printf "\\tForward false\n" >> "$COLLECTD_CONF"
+ else
+ printf "\\tForward true\n" >> "$COLLECTD_CONF"
+ fi
+
+ printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_network_sections() {
+ local cfg="$1"
+ local section="$2"
+
+ local host port output
+
+ config_get host "$cfg" host
+ [ -z "$host" ] && {
+ $LOG notice "No host option in config $cfg defined"
+ return 0
+ }
+
+ if [ "$section" = "server" ]; then
+ output="Server \"$host\""
+ else
+ output="Listen \"$host\""
+ fi
+
+ config_get port "$cfg" port
+ if [ -z "$port" ]; then
+ printf "\\t%s\n" "${output}" >> "$COLLECTD_CONF"
+ else
+ printf "\\t%s \"%s\"\n" "${output}" "${port}" >> "$COLLECTD_CONF"
+ fi
+}
+
+process_iptables() {
+ local cfg="$1"
+
+ printf "<Plugin iptables>\n" >> "$COLLECTD_CONF"
+ config_foreach process_iptables_sections iptables_match
+ printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_iptables_sections() {
+ local cfg="$1"
+
+ local table chain
+
+ config_get table "$cfg" table
+ [ -z "$table" ] && {
+ $LOG notice "No table option in config $cfg defined"
+ return 0
+ }
+
+ config_get chain "$cfg" chain
+ [ -z "$chain" ] && {
+ $LOG notice "No chain option in config $cfg defined"
+ return 0
+ }
+
+ config_get index "$cfg" index
+ [ -z "$index" ] && {
+ $LOG notice "No index option in config $cfg defined"
+ return 0
+ }
+
+ config_get name "$cfg" name
+ if [ -z "$name" ]; then
+ printf "\\tChain %s %s %s\n" "${table}" "${chain}" "${index}" >> "$COLLECTD_CONF"
+ else
+ printf "\\tChain %s %s %s \"%s\"\n" "${table}" "${chain}" "${index}" "${name}">> "$COLLECTD_CONF"
+ fi
+}
+
CONFIG_LIST=""
add_list_option() {
local value="$1"
CONFIG_STRING=""
process_exec
;;
+ curl)
+ CONFIG_STRING=""
+ process_curl
+ ;;
+ network)
+ CONFIG_STRING=""
+ process_network "$cfg"
+ ;;
+ iptables)
+ CONFIG_STRING=""
+ process_iptables
+ ;;
*)
CONFIG_STRING=""
process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
config_foreach process_plugins plugin
}
+service_triggers()
+{
+ procd_add_reload_trigger "collectd"
+}
+
start_service() {
process_config
procd_set_param respawn
procd_close_instance
}
+
+reload_service() {
+ restart "$@"
+}
# option Interval '30'
# option ReadThreads '2'
+#config plugin 'apcups'
+# option enable '0'
+# option Host 'localhost'
+# option Port '3551'
+
#config plugin 'conntrack'
# option enable '0'
# option StoreRates '0'
# option DataDir '/tmp'
+#config plugin 'curl'
+# option enable '0'
+
+#config curl_page
+# option name 'test'
+# option url 'http://finance.google.com/finance?q=NYSE%3AAMD%22'
+
#config plugin 'df'
# option enable '0'
# list Device '/dev/mtdblock/4'
# list Interface 'br-lan'
# option IgnoreSelected '0'
+#config plugin 'iptables'
+# option enable '1'
+
+#config iptables_match
+# option table 'nat'
+# option chain 'zone_wan_postrouting'
+# option index '1'
+# option name 'WLAN-Clients traffic'
+
#config plugin 'irq'
# option enable '0'
# list Irq '2'
# list VerboseInterface 'br-lan'
# list QDisc 'br-lan'
+#config plugin 'network'
+# option enable '1'
+# option TimeToLive '128'
+# option Forward '1'
+# option CacheFlush '86400'
+
+#config network_listen
+# option host '0.0.0.0'
+# option port '25826'
+
+#config network_server
+# option host '1.1.1.1'
+# option port '25826'
+
#config plugin 'nut'
# option enable '0'
# option UPS 'myupsname'
--- /dev/null
+{
+ "string": [
+ "Host",
+ "Port"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "LogLevel",
+ "File"
+ ],
+ "bool": [
+ "Timestamp"
+ ]
+}
PKG_SOURCE_URL:=@GNU/coreutils
PKG_HASH:=e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_CPE_ID:=cpe:/a:gnu:coreutils
PKG_BUILD_PARALLEL:=1
PKG_HASH:=9546f226011a1e5d9d77245fe5549ef25af4694053189d624d0d6ac127ecf5f8
PKG_MAINTAINER:=
PKG_LICENSE:=AFL-2.1
+PKG_CPE_ID:=cpe:/a:freedesktop:dbus
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_NAME:=domoticz
PKG_VERSION_MAJOR:=4
-PKG_VERSION_PATCH:=9700
+PKG_VERSION_PATCH:=10717
PKG_COMMIT:=
PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=4
+PKG_RELEASE:=1
ifeq ($(PKG_COMMIT),)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_COMMIT)/$(PKG_SOURCE)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_COMMIT)
endif
-PKG_HASH:=c31f185a1ffac01b86a77bf33e059a4403d814e826c9d6639c63c2e9afa55a46
+PKG_HASH:=c053a2161942529f56b748945ec297dcd67f449e68029fc886893a528891ad86
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=License.txt
+++ /dev/null
-From 9d226dab339f5767ec01ea1bcc9043ceee185cca Mon Sep 17 00:00:00 2001
-From: Rob Peters <info@domoticz.com>
-Date: Mon, 25 Mar 2019 08:50:23 +0100
-Subject: [PATCH] Fix for boot 1.70 get_io_service, fixed #3117
-
----
- hardware/Pinger.cpp | 10 ++++++++--
- hardware/TCPProxy/tcpproxy_server.cpp | 8 +++++++-
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
-index 01a955ba4..184378738 100644
---- a/hardware/Pinger.cpp
-+++ b/hardware/Pinger.cpp
-@@ -18,6 +18,12 @@
-
- #include <iostream>
-
-+#if BOOST_VERSION >= 107000
-+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
-+#else
-+#define GET_IO_SERVICE(s) ((s).get_io_service())
-+#endif
-+
- class pinger
- : private domoticz::noncopyable
- {
-@@ -76,7 +82,7 @@ class pinger
- num_tries_++;
- if (num_tries_ > 4)
- {
-- resolver_.get_io_service().stop();
-+ GET_IO_SERVICE(resolver_).stop();
- }
- else
- {
-@@ -118,7 +124,7 @@ class pinger
- if (num_replies_++ == 0)
- timer_.cancel();
- m_PingState = true;
-- resolver_.get_io_service().stop();
-+ GET_IO_SERVICE(resolver_).stop();
- }
- else
- {
-diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
-index fddac08de..60445d9c2 100644
---- a/hardware/TCPProxy/tcpproxy_server.cpp
-+++ b/hardware/TCPProxy/tcpproxy_server.cpp
-@@ -15,6 +15,12 @@
- #include "stdafx.h"
- #include "tcpproxy_server.h"
-
-+#if BOOST_VERSION >= 107000
-+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
-+#else
-+#define GET_IO_SERVICE(s) ((s).get_io_service())
-+#endif
-+
- namespace tcp_proxy
- {
- bridge::bridge(boost::asio::io_service& ios)
-@@ -38,7 +44,7 @@ namespace tcp_proxy
- boost::asio::ip::tcp::endpoint end;
-
-
-- boost::asio::io_service &ios=downstream_socket_.get_io_service();
-+ boost::asio::io_service &ios= GET_IO_SERVICE(downstream_socket_);
- boost::asio::ip::tcp::resolver resolver(ios);
- boost::asio::ip::tcp::resolver::query query(upstream_host, upstream_port, boost::asio::ip::resolver_query_base::numeric_service);
- boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
main/WebServerHelper.cpp | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/main/WebServerHelper.cpp b/main/WebServerHelper.cpp
-index 98ebcf7b4..0a028595c 100644
--- a/main/WebServerHelper.cpp
+++ b/main/WebServerHelper.cpp
@@ -37,7 +37,9 @@ namespace http {
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:dosfstools_project:dosfstools
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=dump1090
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.7.2
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/flightaware/dump1090
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=d7ed250d624eae2eec6c0a2dd410986f42230bf929dab67893ea3bf1cab8a203
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/flightaware/dump1090/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=a4f8edd051e0a663a92b848bde4ab7c47cb8bce812bb368cba42bbb4b5c83f71
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:findutils
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:fishshell:fish
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_SOURCE_URL:=http://fontconfig.org/release/
PKG_HASH:=dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99
+PKG_CPE_ID:=cpe:/a:fontconfig_project:fontconfig
+
PKG_FIXUP:=libtool
PKG_INSTALL:=1
PKG_NAME:=gpsd
PKG_VERSION:=3.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
PKG_HASH:=27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39
-PKG_BUILD_DEPENDS:=scons/host
-
PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:berlios:gps_daemon
+
+PKG_BUILD_DEPENDS:=scons/host
include $(INCLUDE_DIR)/package.mk
include ../../devel/scons/scons.mk
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
- $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps.pc $(1)/usr/lib/pkgconfig
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libgps.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libgps.pc
endef
define Package/gpsd/install
PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:grep
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE_URL:=@GNU/gzip
PKG_HASH:=8425ccac99872d544d4310305f915f5ea81e04d0f437ef1a230dc9d1c819d7c0
PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:gzip
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=haveged
-PKG_VERSION:=1.9.6
-PKG_RELEASE:=1
+PKG_VERSION:=1.9.8
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/jirka-h/haveged/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4d4c046755476d3734ffb78772c242c25913ff0eb7509c143671dae6ec9d1189
+PKG_HASH:=99aa1996c6e39ea2459cfc37addfb8b1eecc63f3a2b6da9db17b22e76b6851ae
PKG_BUILD_DIR:=$(BUILD_DIR)/haveged-$(PKG_VERSION)
PKG_LICENSE:=GPLv3
#!/bin/sh /etc/rc.common
-# Copyright (C) 2012 OpenWrt.org
START=13
+USE_PROCD=1
HAVEGED_THRESHOLD=1024
HAVEGED_DCACHE=32
HAVEGED_ICACHE=32
-start() {
- service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
-}
-
-stop() {
- service_stop /usr/sbin/haveged
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/haveged
+ procd_append_param command -F -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
}
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
PKG_LICENCE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:joseph_allen:joe
include $(INCLUDE_DIR)/package.mk
Philip Prindeville <philipp@redfish-solutions.com>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lcdproc:lcdproc
include $(INCLUDE_DIR)/package.mk
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
+PKG_CPE_ID:=cpe:/a:gnu:less
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
+PKG_CPE_ID:=cpe:/a:lm_sensors:lm_sensors
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gentoo:logrotate
include $(INCLUDE_DIR)/package.mk
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.lib
+PKG_CPE_ID:=cpe:/a:heinz_mauelshagen:lvm2
include $(INCLUDE_DIR)/package.mk
PKG_RELEASE:=2
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:midnight_commander:midnight_commander
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:minicom:minicom
PKG_FIXUP:=autoreconf
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, Hannu Nyman <hannu.nyman@iki.fi>
+PKG_CPE_ID:=cpe:/a:gnu:nano
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0 LGPL-2.0
PKG_LICENSE_FILES:=COPYING COPYING.LIB
+PKG_CPE_ID:=cpe:/a:ntfs-3g:ntfs-3g
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:owfs:owfs
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:muscle:pcsc-lite
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_NAME:=procps-ng
PKG_VERSION:=3.3.15
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/procps-ng
$(call Package/procps-ng/Default)
DEPENDS:=procps-ng
TITLE:=Applet $(2) from the procps-ng package
- DEFAULT:=y
+ DEFAULT:=n
ALTERNATIVES:=200:$(3)/$(2):$(3)/$(1)
endef
PKG_NAME:=prometheus-node-exporter-lua
PKG_VERSION:=2019.08.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
dsl_max_datarate({direction="up"}, dsl_stat.max_data_rate_up)
-- dsl errors
- dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fec_near)
- dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.errors_fec_far)
+ dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fecs_near)
+ dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.errors_fecs_far)
dsl_error_seconds_total({err="errored",loc="near"}, dsl_stat.errors_es_near)
dsl_error_seconds_total({err="errored",loc="far"}, dsl_stat.errors_es_near)
dsl_error_seconds_total({err="severely errored",loc="near"}, dsl_stat.errors_ses_near)
PKG_NAME:=qemu
PKG_VERSION:=4.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6
PKG_SOURCE_URL:=http://download.qemu.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+PKG_CPE_ID:=cpe:/a:qemu:qemu
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+From c59279437eda91841b9d26079c70b8a540d41204 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Mon, 26 Aug 2019 00:55:03 +0200
+Subject: [PATCH] ip_reass: Fix use after free
+
+Using ip_deq after m_free might read pointers from an allocation reuse.
+
+This would be difficult to exploit, but that is still related with
+CVE-2019-14378 which generates fragmented IP packets that would trigger this
+issue and at least produce a DoS.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+---
+Taken from https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943
+
+ slirp/src/ip_input.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
+index 7364ce0..aa514ae 100644
+--- a/slirp/src/ip_input.c
++++ b/slirp/src/ip_input.c
+@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+ */
+ while (q != (struct ipasfrag *)&fp->frag_link &&
+ ip->ip_off + ip->ip_len > q->ipf_off) {
++ struct ipasfrag *prev;
+ i = (ip->ip_off + ip->ip_len) - q->ipf_off;
+ if (i < q->ipf_len) {
+ q->ipf_len -= i;
+@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+ m_adj(dtom(slirp, q), i);
+ break;
+ }
++ prev = q;
+ q = q->ipf_next;
+- m_free(dtom(slirp, q->ipf_prev));
+- ip_deq(q->ipf_prev);
++ ip_deq(prev);
++ m_free(dtom(slirp, prev));
+ }
+
+ insert:
+--
+2.22.0
+
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:screen
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_HASH:=0998c8d84242a231ab0acb7f8613927ff5bcff095f8aa6b79478893a03f05583
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=BSD-3-Clause
+PKG_CPE_ID:=cpe:/a:debian:shadow
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_RELEASE:=6
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_CPE_ID:=cpe:/a:sysstat:sysstat
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=Copyright
+PKG_CPE_ID:=cpe:/a:tcsh:tcsh
PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nicholas_marriott:tmux
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING.GPLv2
+PKG_CPE_ID:=cpe:/a:nikias_bassen:usbmuxd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL=https://codeload.github.com/libimobiledevice/usbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
time_now="${time_now%%.*}"
time_lastcheck="$time_now"
- for host in "$pinghosts"
+ for host in $pinghosts
do
if ping -c 1 "$host" &> /dev/null
then
include $(TOPDIR)/rules.mk
PKG_NAME:=zstd
-PKG_VERSION:=1.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7a6e1dad34054b35e2e847eb3289be8820a5d378228802239852f913c6dcf6a7
+PKG_HASH:=5eda3502ecc285c3c92ee0cc8cd002234dee39d539b3f692997a0e80de1d33de
PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
PKG_LICENSE:=GPL-2.0-or-later