include $(TOPDIR)/rules.mk
PKG_NAME:=luajit
-PKG_VERSION:=2016-06-05-8e5d7be
+PKG_VERSION:=2017-01-17-71ff7ef
PKG_RELEASE:=1
PKG_MAINTAINER:=Morteza Milani <milani@pichak.co>
PKG_LICENSE:=MIT
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/LuaJIT/LuaJIT.git
-PKG_SOURCE_VERSION:=8e5d7bec0d110aa4ccd7e8492f697ff2a88a55ed
+PKG_SOURCE_VERSION:=71ff7ef8a7e0592dedb3527d4aacc68bf04af0bd
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
endef
define Package/luajit/description
- LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
+ LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. *** Requires GCC Multilib on host system to build! ***
endef
TARGET_CFLAGS += $(FPIC) -std=gnu99
--- /dev/null
+From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Mon, 12 Sep 2016 14:40:44 +0200
+Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CURL_STRICTER leaked into curl-constants.c when building against
+curl-7.50.2. This is a preprocessor only macro without a value.
+
+CPAN RT#117793
+
+Signed-off-by: Petr PÃsaÅ™ <ppisar@redhat.com>
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index f9170bb..ad2bd3d 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -127,7 +127,7 @@ if (!defined($curl_h)) {
+ close H;
+
+ for my $e (sort @syms) {
+- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) {
++ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) {
+ next;
+ }
+ my ($group) = $e =~ m/^([^_]+_)/;
+--
+2.7.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.1.0
+PKG_VERSION:=7.1.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=cf36039303c47f493100afea522a8f53
-PKG_HASH:=a810b3f29c21407c24caa88f50649320d20ba6892ae1923132598b8a0ca145b6
+PKG_MD5SUM:=65eef256f6e7104a05361939f5e23ada
+PKG_HASH:=b3565b0c1441064eba204821608df1ec7367abff881286898d900c2c2a5ffe70
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \
php_cv_cc_rpath="no" \
iconv_impl_name="gnu_libiconv" \
- ac_cv_php_xml2_config_path="$(STAGING_DIR_HOSTPKG)/bin/xml2-config" \
+ ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
define Package/php7/conffiles
/etc/php.ini
SG(request_info).no_headers = 1;
}
#if ZEND_DEBUG
-- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
#else
-- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
goto out;
case 'v': /* show php version & quit */
-- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s",
+- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s",
- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s",
++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s",
+ PHP_VERSION, cli_sapi_module.name,
#if ZTS
"ZTS "
SG(request_info).no_headers = 1;
#if ZEND_DEBUG
-- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
#else
-- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
phpdbg_do_help_cmd(exec);
} else if (show_version) {
phpdbg_out(
-- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
-+ "phpdbg %s\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
+- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s",
++ "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s",
PHPDBG_VERSION,
- __DATE__,
- __TIME__,
+++ /dev/null
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-pip
-PKG_VERSION:=8.1.2
-PKG_RELEASE:=1
-
-PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
-PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/python-pip-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/python-pip-$(PKG_VERSION)
-HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-PKG_USE_MIPS16:=0
-
-HOST_BUILD_DEPENDS:=python python/host python-setuptools/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python-host.mk)
-
-define Package/python-pip
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Tool for installing Python packages.
- URL:=https://pip.pypa.io
- DEPENDS:=+python +python-setuptools +ca-certificates
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-endef
-
-define Package/python-pip/description
- A tool for installing and managing Python packages.
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,\
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
- --single-version-externally-managed \
- )
-endef
-
-define PyPackage/python-pip/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/pip/_vendor/distlib/*.exe
-endef
-
-define PyPackage/python-pip/install
- $(INSTALL_DIR) $(1)/usr/bin $(1)/etc
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
- $(INSTALL_CONF) ./files/pip.conf $(1)/etc/
-endef
-
-define Host/Compile
- $(call Build/Compile/HostPyMod,,\
- install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
- --single-version-externally-managed \
- )
-endef
-
-define Host/Install
-endef
-
-$(eval $(call HostBuild))
-
-$(eval $(call PyPackage,python-pip))
-$(eval $(call BuildPackage,python-pip))
+++ /dev/null
-[global]
-cache-dir=/tmp/.cache
-log-file=/tmp/pip-log.txt
+++ /dev/null
-#
-# Copyright (C) 2014-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-setuptools
-PKG_VERSION:=27.2.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/87/ba/54197971d107bc06f5f3fbdc0d728a7ae0b10cafca46acfddba65a0899d8/
-PKG_MD5SUM:=b39715612fdc0372dbfd7b3fcf5d4fe5
-
-HOST_BUILD_DEPENDS:=python python/host
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
-HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python-host.mk)
-
-define Package/python-setuptools
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Tool for installing Python packages.
- URL:=https://bitbucket.org/pypa/setuptools
- DEPENDS:=+python +ca-certificates
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-endef
-
-define Package/python-setuptools/description
- Easily download, build, install, upgrade, and uninstall Python packages
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,\
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
- --single-version-externally-managed \
- )
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(PYTHON_LIB_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(PYTHON_LIB_DIR)
-endef
-
-define PyPackage/python-setuptools/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
-endef
-
-define Host/Compile
- $(call Build/Compile/HostPyMod,,\
- install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
- --single-version-externally-managed \
- )
-endef
-
-define Host/Install
-endef
-
-$(eval $(call HostBuild))
-
-$(eval $(call PyPackage,python-setuptools))
-$(eval $(call BuildPackage,python-setuptools))
-
+++ /dev/null
-diff --git a/setuptools/dist.py b/setuptools/dist.py
-index b004f92..66b9d89 100644
---- a/setuptools/dist.py
-+++ b/setuptools/dist.py
-@@ -17,7 +17,6 @@ from setuptools.extern.six.moves import map
- from pkg_resources.extern import packaging
-
- from setuptools.depends import Require
--from setuptools import windows_support
- from setuptools.monkey import get_unpatched
- import pkg_resources
-
-@@ -383,7 +382,6 @@ class Distribution(_Distribution):
- egg_cache_dir = os.path.join(os.curdir, '.eggs')
- if not os.path.exists(egg_cache_dir):
- os.mkdir(egg_cache_dir)
-- windows_support.hide_file(egg_cache_dir)
- readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
- with open(readme_txt_filename, 'w') as f:
- f.write('This directory contains eggs that were downloaded '
+++ /dev/null
-diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index e8b90c7..8598c44 100755
---- a/setuptools/command/easy_install.py
-+++ b/setuptools/command/easy_install.py
-@@ -1946,6 +1946,8 @@ class CommandSpec(list):
- Construct a CommandSpec from a parameter to build_scripts, which may
- be None.
- """
-+ if os.environ.get('__PYVENV_LAUNCHER__'):
-+ return cls.from_environment()
- if isinstance(param, cls):
- return param
- if isinstance(param, list):
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
the development of higher quality, more maintainable code.
endef
+define Package/python-pip-conf
+$(call Package/python/Default)
+ TITLE:=Configuration file for pip/pip3
+ URL:=https://pip.pypa.io
+endef
+
+define Package/python-pip-conf/description
+ Configuration file for pip/pip3
+endef
+
define Package/python-base
$(call Package/python/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
endif
PYTHON_LIB_FILES_DEL+=$(2)
define PyPackage/$(1)/filespec
- $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
+ ifneq ($(2),)
+ $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
+ endif
endef
endef
--without-cxx-main \
--with-threads \
--with-system-ffi \
+ --with-ensurepip=no \
--without-pymalloc \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
$(ENABLE_IPV6) \
$(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
endef
+ifdef CONFIG_PACKAGE_python-setuptools
+define Build/Compile/python-setuptools
+ $(STAGING_DIR_HOSTPKG)/bin/pip install \
+ --ignore-installed \
+ --root=$(PKG_BUILD_DIR)/install-setuptools --prefix=. \
+ $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-*.whl
+endef
+endif # CONFIG_PACKAGE_python-setuptools
+
+ifdef CONFIG_PACKAGE_python-pip
+define Build/Compile/python-pip
+ $(STAGING_DIR_HOSTPKG)/bin/pip install \
+ --ignore-installed \
+ --root=$(PKG_BUILD_DIR)/install-pip --prefix=. \
+ $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-*.whl
+endef
+endif # CONFIG_PACKAGE_python-pip
+
+define Build/Compile
+ $(call Build/Compile/Default)
+ # Use host pip to install python-setuptools
+ $(call Build/Compile/python-setuptools)
+ $(call Build/Compile/python-pip)
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/mk/
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
-|$(PYTHON_PKG_DIR)
endef
+define Package/python-pip-conf/install
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) ./files/pip.conf $(1)/etc
+endef
+
HOST_LDFLAGS += \
$$$$(pkg-config --static --libs libcrypto libssl)
--exec-prefix=$(HOST_PYTHON_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
--with-system-ffi=no \
+ --with-ensurepip=install \
CONFIG_SITE=
define Host/Install
$(eval $(call PyPackage,python-light))
$(eval $(call PyPackage,python))
+$(eval $(call BuildPackage,python-pip-conf))
+
$(eval $(call BuildPackage,python-base))
$(eval $(call BuildPackage,python-light))
$(eval $(call BuildPackage,python))
--- /dev/null
+[global]
+cache-dir=/tmp/.cache
+log-file=/tmp/pip-log.txt
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python-pip
+$(call Package/python/Default)
+ TITLE:=Python $(PYTHON_VERSION) pip module
+ DEPENDS:=+python +python-setuptools +python-pip-conf
+endef
+
+define PyPackage/python-pip/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+ # Adjust shebang to proper python location on target
+ sed "1s/.*/#\!\/usr\/bin\/python$(PYTHON_VERSION)/" -i $(PKG_BUILD_DIR)/install-pip/bin/*
+ $(CP) $(PKG_BUILD_DIR)/install-pip/bin/* $(1)/usr/bin
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip \
+ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/
+endef
+
+$(eval $(call PyBasePackage,python-pip, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python-setuptools
+$(call Package/python/Default)
+ TITLE:=Python $(PYTHON_VERSION) setuptools module
+ DEPENDS:=+python
+endef
+
+define PyPackage/python-setuptools/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+ # Adjust shebang to proper python location on target
+ sed "1s/.*/#\!\/usr\/bin\/python$(PYTHON_VERSION)/" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
+ $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/* $(1)/usr/bin
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
+ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+endef
+
+$(eval $(call PyBasePackage,python-setuptools, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
+++ /dev/null
-#
-# Copyright (C) 2014-2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python3-pip
-PKG_VERSION:=8.1.2
-PKG_RELEASE:=1
-
-PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
-PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
-
-PKG_LICENSE:=MIT
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/python3-pip-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-PKG_USE_MIPS16:=0
-
-include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
-
-define Package/python3-pip
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Tool for installing Python $(PYTHON3_VERSION) packages.
- URL:=https://pip.pypa.io
- DEPENDS:=+python3 +python3-dev +python3-lib2to3 +python3-setuptools
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-endef
-
-define Package/python3-pip/description
- A tool for installing and managing Python $(PYTHON3_VERSION) packages.
-endef
-
-define Build/Compile
- $(call Build/Compile/Py3Mod,,\
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
- --single-version-externally-managed \
- )
-endef
-
-define Py3Package/python3-pip/filespec
-+|$(PYTHON3_PKG_DIR)
--|$(PYTHON3_PKG_DIR)/_vendor/distlib/*.exe
--|$(PYTHON3_PKG_DIR)/utils/outdated.py
-endef
-
-define Py3Package/python3-pip/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin
- $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
-endef
-
-$(eval $(call Py3Package,python3-pip))
-$(eval $(call BuildPackage,python3-pip))
+++ /dev/null
-From 771a1407b15538697a7f38209e40dbbf58828d33 Mon Sep 17 00:00:00 2001
-From: Florian Fieber <florian@florianfieber.de>
-Date: Tue, 9 Jun 2015 15:59:04 +0200
-Subject: [PATCH] Remove self version checking
-
-Signed-off-by: Florian Fieber <florian@florianfieber.de>
----
- pip/basecommand.py | 10 ----------
- pip/cmdoptions.py | 10 ----------
- 2 files changed, 20 deletions(-)
-
-diff --git a/pip/basecommand.py b/pip/basecommand.py
-index 854d113..c2337a4 100644
---- a/pip/basecommand.py
-+++ b/pip/basecommand.py
-@@ -22,7 +22,6 @@ from pip.status_codes import (
- from pip.utils import get_prog, normalize_path
- from pip.utils.deprecation import RemovedInPip8Warning
- from pip.utils.logging import IndentingFormatter
--from pip.utils.outdated import pip_version_check
-
-
- __all__ = ['Command']
-@@ -237,15 +236,6 @@ class Command(object):
- logger.critical('Exception:', exc_info=True)
-
- return UNKNOWN_ERROR
-- finally:
-- # Check if we're using the latest version of pip available
-- if (not options.disable_pip_version_check and not
-- getattr(options, "no_index", False)):
-- with self._build_session(
-- options,
-- retries=0,
-- timeout=min(5, options.timeout)) as session:
-- pip_version_check(session)
-
- return SUCCESS
-
-diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py
-index 9a0446a..4fa29d3 100644
---- a/pip/cmdoptions.py
-+++ b/pip/cmdoptions.py
-@@ -514,15 +514,6 @@ no_clean = partial(
- default=False,
- help="Don't clean up build directories.")
-
--disable_pip_version_check = partial(
-- Option,
-- "--disable-pip-version-check",
-- dest="disable_pip_version_check",
-- action="store_true",
-- default=False,
-- help="Don't periodically check PyPI to determine whether a new version "
-- "of pip is available for download. Implied with --no-index.")
--
- # Deprecated, Remove later
- always_unzip = partial(
- Option,
-@@ -560,7 +551,6 @@ general_group = {
- client_cert,
- cache_dir,
- no_cache,
-- disable_pip_version_check,
- ]
- }
-
---
-2.6.2
-
+++ /dev/null
-#
-# Copyright (C) 2014-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python3-setuptools
-PKG_VERSION:=27.2.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/87/ba/54197971d107bc06f5f3fbdc0d728a7ae0b10cafca46acfddba65a0899d8/
-PKG_MD5SUM:=b39715612fdc0372dbfd7b3fcf5d4fe5
-
-PKG_LICENSE:=PSF
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/python3-setuptools-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-
-include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
-
-define Package/python3-setuptools
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Tool for installing Python $(PYTHON3_VERSION) packages.
- URL:=https://bitbucket.org/pypa/setuptools
- DEPENDS:=+python3 +python3-dev +python3-lib2to3
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-endef
-
-define Package/python3-setuptools/description
- Easily download, build, install, upgrade, and uninstall Python $(PYTHON3_VERSION) packages
-endef
-
-define Build/Compile
- $(call Build/Compile/Py3Mod,,\
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
- --single-version-externally-managed \
- )
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(PYTHON3_LIB_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* \
- $(PYTHON3_LIB_DIR)
-endef
-
-define Py3Package/python3-setuptools/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/
- $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install3
-endef
-
-$(eval $(call Py3Package,python3-setuptools))
-$(eval $(call BuildPackage,python3-setuptools))
+++ /dev/null
-diff --git a/setuptools/dist.py b/setuptools/dist.py
-index b004f92..66b9d89 100644
---- a/setuptools/dist.py
-+++ b/setuptools/dist.py
-@@ -17,7 +17,6 @@ from setuptools.extern.six.moves import map
- from pkg_resources.extern import packaging
-
- from setuptools.depends import Require
--from setuptools import windows_support
- from setuptools.monkey import get_unpatched
- import pkg_resources
-
-@@ -383,7 +382,6 @@ class Distribution(_Distribution):
- egg_cache_dir = os.path.join(os.curdir, '.eggs')
- if not os.path.exists(egg_cache_dir):
- os.mkdir(egg_cache_dir)
-- windows_support.hide_file(egg_cache_dir)
- readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
- with open(readme_txt_filename, 'w') as f:
- f.write('This directory contains eggs that were downloaded '
+++ /dev/null
-diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index e8b90c7..8598c44 100755
---- a/setuptools/command/easy_install.py
-+++ b/setuptools/command/easy_install.py
-@@ -1946,6 +1946,8 @@ class CommandSpec(list):
- Construct a CommandSpec from a parameter to build_scripts, which may
- be None.
- """
-+ if os.environ.get('__PYVENV_LAUNCHER__'):
-+ return cls.from_environment()
- if isinstance(param, cls):
- return param
- if isinstance(param, list):
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=4
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
endif
PYTHON3_LIB_FILES_DEL+=$(2)
define Py3Package/$(1)/filespec
- $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
+ ifneq ($(2),)
+ $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
+ endif
endef
endef
LD="$(TARGET_CC)" \
PGEN=pgen3
-ifeq ($(ARCH),i386)
-MAKE_FLAGS+=PYTHON_DECIMAL_WITH_MACHINE=ansi32
-endif
-
EXTRA_CFLAGS+= \
-DNDEBUG -fno-inline
EXTRA_LDFLAGS+= \
--without-cxx-main \
--with-threads \
--with-system-ffi \
- --without-pymalloc \
--with-ensurepip=no \
+ --without-pymalloc \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
$(ENABLE_IPV6) \
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
$(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
endef
+ifdef CONFIG_PACKAGE_python3-setuptools
+define Build/Compile/python3-setuptools
+ $(STAGING_DIR_HOSTPKG)/bin/pip3 install \
+ --ignore-installed \
+ --root=$(PKG_BUILD_DIR)/install-setuptools --prefix=. \
+ $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-*.whl
+endef
+endif # CONFIG_PACKAGE_python3-setuptools
+
+ifdef CONFIG_PACKAGE_python3-pip
+define Build/Compile/python3-pip
+ $(STAGING_DIR_HOSTPKG)/bin/pip3 install \
+ --ignore-installed \
+ --root=$(PKG_BUILD_DIR)/install-pip --prefix=. \
+ $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-*.whl
+endef
+endif # CONFIG_PACKAGE_python3-pip
+
+define Build/Compile
+ $(call Build/Compile/Default)
+ # Use host pip to install python-setuptools
+ $(call Build/Compile/python3-setuptools)
+ $(call Build/Compile/python3-pip)
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/mk/
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
-|$(PYTHON3_PKG_DIR)
endef
+HOST_LDFLAGS += \
+ $$$$(pkg-config --static --libs libcrypto libssl)
+
HOST_CONFIGURE_ARGS+= \
--without-cxx-main \
--without-pymalloc \
--prefix=$(HOST_PYTHON3_DIR) \
--exec-prefix=$(HOST_PYTHON3_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
- --with-system-ffi \
- --with-ensurepip=no \
- CONFIG_SITE= \
- CFLAGS="$(HOST_CFLAGS)"
+ --with-system-ffi=no \
+ --with-ensurepip=install \
+ CONFIG_SITE=
define Host/Compile
- +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
- +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
endef
define Host/Install
)
endef
-ifeq ($(BUILD_VARIANT),python3)
-define Host/Compile
- $(call HostPy3/Compile/Default)
-endef
-
-define Host/Install
-endef
-endif # python3
-
endif # __python3_host_mk_inc
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-pip
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) pip module
+ DEPENDS:=+python3 +python3-setuptools +python-pip-conf
+endef
+
+define Py3Package/python3-pip/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+ # Adjust shebang to proper python location on target
+ sed "1s/.*/#\!\/usr\/bin\/python$(PYTHON3_VERSION)/" -i $(PKG_BUILD_DIR)/install-pip/bin/*
+ $(CP) $(PKG_BUILD_DIR)/install-pip/bin/pip3* $(1)/usr/bin
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \
+ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
+endef
+
+$(eval $(call Py3BasePackage,python3-pip, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-setuptools
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) setuptools module
+ DEPENDS:=+python3
+endef
+
+define Py3Package/python3-setuptools/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+ # Adjust shebang to proper python location on target
+ sed "1s/.*/#\!\/usr\/bin\/python$(PYTHON3_VERSION)/" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
+ $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/easy_install-* $(1)/usr/bin
+ $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
+ $(CP) \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
+ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
+ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+endef
+
+$(eval $(call Py3BasePackage,python3-setuptools, \
+ , \
+ DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
+++ /dev/null
-diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
-index 75f62a7..4d6c9f2 100755
---- a/Modules/_ctypes/libffi/configure
-+++ b/Modules/_ctypes/libffi/configure
-@@ -17257,20 +17257,12 @@ case "$host" in
- fi
- ;;
-
-- i?86-*-* | x86_64-*-*)
-- TARGETDIR=x86
-- if test $ac_cv_sizeof_size_t = 4; then
-- case "$host" in
-- *-gnux32)
-- TARGET=X86_64
-- ;;
-- *)
-- TARGET=X86
-- ;;
-- esac
-- else
-- TARGET=X86_64;
-- fi
-+ i?86-*-*)
-+ TARGET=X86; TARGETDIR=x86
-+ ;;
-+
-+ x86_64-*-*)
-+ TARGET=X86_64; TARGETDIR=x86
- ;;
-
- ia64*-*-*)
+++ /dev/null
-diff --git a/setup.py b/setup.py
-index 2779658..b6d3d61 100644
---- a/setup.py
-+++ b/setup.py
-@@ -693,8 +693,8 @@ class PyBuildExt(build_ext):
- # use the same library for the readline and curses modules.
- if 'curses' in readline_termcap_library:
- curses_library = readline_termcap_library
-- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-- curses_library = 'ncursesw'
-+ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-+ # curses_library = 'ncursesw'
- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
- curses_library = 'ncurses'
- elif self.compiler.find_library_file(lib_dirs, 'curses'):
# See /LICENSE for more information.
#
# To Do:
-# - dirs not removed when uninstalling!
+# - dirs not removed when uninstalling! opkg bug?
#
include $(TOPDIR)/rules.mk
PKG_VERSION:=2.4.0
PKG_RELEASE:=1
-PKG_LIBVER:=2.4
+# First two numbes
+PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
+PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
PKG_MD5SUM:=440bbbdc49d08d3650f340dccb35986d9399177ad69a204def56e5d3954600cf
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
-# it will fix when some LD_FLAGS is needef for libraries. As side effect, it will
+# it will fix when some LD_FLAGS is needed for libraries. As side effect, it will
# duplicate ld args for binaries.
CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
define Package/ruby/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
- $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
- $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_ABI_VERSION)
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-bin
$(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
- $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
- $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/
+ $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_ABI_VERSION)%" $(1)/usr/bin/ruby
+ $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-bin%" $(1)/usr/bin/ruby
endef
define Package/libruby
CATEGORY:=Libraries
TITLE+= (shared library)
DEPENDS+= +libpthread +librt +libgmp
- ABI_VERSION:=$(PKG_LIBVER)
+ ABI_VERSION:=$(PKG_ABI_VERSION)
endef
define Package/libruby/install
$(INSTALL_DIR) $(1)/usr/lib
endef
define Package/ruby-bigdecimal/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so
-/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec
endef
define Package/ruby-cgi/files
-/usr/lib/ruby/$(PKG_LIBVER)/cgi
-/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/cgi/escape.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi
+/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/cgi/escape.so
endef
define Package/ruby-csv/files
-/usr/lib/ruby/$(PKG_LIBVER)/csv.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb
endef
define Package/ruby-datetime/files
-/usr/lib/ruby/$(PKG_LIBVER)/time.rb
-/usr/lib/ruby/$(PKG_LIBVER)/date.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/date.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/date_core.so
endef
define Package/ruby-dbm/description
endef
define Package/ruby-dbm/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/dbm.so
endef
define Package/ruby-debuglib/files
-/usr/lib/ruby/$(PKG_LIBVER)/profile.rb
-/usr/lib/ruby/$(PKG_LIBVER)/profiler.rb
-/usr/lib/ruby/$(PKG_LIBVER)/debug.rb
-/usr/lib/ruby/$(PKG_LIBVER)/tracer.rb
-/usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/profile.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/profiler.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/debug.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/objspace.so
endef
define Package/ruby-did-you-mean/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/did_you_mean-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/did_you_mean-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/
endef
define Package/ruby-did-you-mean/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/benchmark
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/doc
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/evaluation
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/test
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/*.md
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/benchmark
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/doc
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/evaluation
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/test
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/*.md
endef
define Package/ruby-digest/description
endef
define Package/ruby-digest/files
-/usr/lib/ruby/$(PKG_LIBVER)/digest
-/usr/lib/ruby/$(PKG_LIBVER)/digest.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/digest/*
+/usr/lib/ruby/$(PKG_ABI_VERSION)/digest
+/usr/lib/ruby/$(PKG_ABI_VERSION)/digest.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest/*
endef
define Package/ruby-drb/files
-/usr/lib/ruby/$(PKG_LIBVER)/drb.rb
-/usr/lib/ruby/$(PKG_LIBVER)/drb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/drb.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/drb
endef
define Package/ruby-enc/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_*.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/encdb.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/iso_8859_1.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/utf_*.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/euc_jp.so
endef
define Package/ruby-enc-extra/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/enc
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc
endef
define Package/ruby-enc-extra/files-excluded
$(call Package/ruby-enc/files)
define Package/ruby-erb/files
/usr/bin/erb
-/usr/lib/ruby/$(PKG_LIBVER)/erb.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/erb.rb
endef
define Package/ruby-fiddle/files
-/usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb
-/usr/lib/ruby/$(PKG_LIBVER)/fiddle/
-/usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle/
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiddle.so
endef
define Package/ruby-filelib/files
-/usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb
-/usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb
-/usr/lib/ruby/$(PKG_LIBVER)/pathname.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so
-/usr/lib/ruby/$(PKG_LIBVER)/find.rb
-/usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tmpdir.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tempfile.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/pathname.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pathname.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/find.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb
endef
define Package/ruby-gdbm/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so
endef
define Package/ruby-gems/files
-/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb
-/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb
-/usr/lib/ruby/$(PKG_LIBVER)/rubygems
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ubygems.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems
endef
define Package/ruby-gems/files-excluded
-/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
-/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
-/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/test_case.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/package/tar_test_case.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/installer_test_case.rb
endef
define Package/ruby-gems/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
- $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/doc
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/cache
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/extensions
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/build_info
$(call RubyBuildPackage/install,gems,$(1))
endef
define Package/ruby-io-console/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so
-/usr/lib/ruby/$(PKG_LIBVER)/io/console/
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/console.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/io/console/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/io-console-*.gemspec
endef
define Package/ruby-irb/files
-/usr/lib/ruby/$(PKG_LIBVER)/irb
-/usr/lib/ruby/$(PKG_LIBVER)/irb.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/irb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb
endef
define Package/ruby-irb/install
$(INSTALL_DIR) $(1)/usr/bin
endef
define Package/ruby-json/files
-/usr/lib/ruby/$(PKG_LIBVER)/json.rb
-/usr/lib/ruby/$(PKG_LIBVER)/json
-/usr/lib/ruby/$(PKG_LIBVER)/*/json
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec
+/usr/lib/ruby/$(PKG_ABI_VERSION)/json.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/json
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/json
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/json-*.gemspec
endef
define Package/ruby-json/files-excluded
$(call Package/ruby-psych/files)
endef
define Package/ruby-logger/files
-/usr/lib/ruby/$(PKG_LIBVER)/logger.rb
-/usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so
endef
define Package/ruby-math/files
-/usr/lib/ruby/$(PKG_LIBVER)/prime.rb
-/usr/lib/ruby/$(PKG_LIBVER)/mathn.rb
-/usr/lib/ruby/$(PKG_LIBVER)/cmath.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/mathn
-/usr/lib/ruby/$(PKG_LIBVER)/matrix.rb
-/usr/lib/ruby/$(PKG_LIBVER)/matrix
+/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/mathn.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/cmath.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/mathn
+/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix
endef
define Package/ruby-minitest/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/minitest-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*
endef
define Package/ruby-minitest/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.rdoc
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/test
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.rdoc
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.txt
endef
define Package/ruby-misc/files
-/usr/lib/ruby/$(PKG_LIBVER)/English.rb
-/usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb
-/usr/lib/ruby/$(PKG_LIBVER)/base64.rb
-/usr/lib/ruby/$(PKG_LIBVER)/delegate.rb
-/usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb
-/usr/lib/ruby/$(PKG_LIBVER)/expect.rb
-/usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb
-/usr/lib/ruby/$(PKG_LIBVER)/open3.rb
-/usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb
-/usr/lib/ruby/$(PKG_LIBVER)/scanf.rb
-/usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb
-/usr/lib/ruby/$(PKG_LIBVER)/set.rb
-/usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb
-/usr/lib/ruby/$(PKG_LIBVER)/tsort.rb
-/usr/lib/ruby/$(PKG_LIBVER)/weakref.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/etc.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/pty.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/English.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/abbrev.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/base64.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/expect.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/scanf.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/securerandom.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/set.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/shellwords.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tsort.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/weakref.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/continuation.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/coverage.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/etc.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fcntl.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiber.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pty.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/stringio.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/strscan.so
endef
define Package/ruby-mkmf/files
-/usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb
-/usr/lib/ruby/$(PKG_LIBVER)/un.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/mkmf.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/un.rb
endef
define Package/ruby-multithread/files
-/usr/lib/ruby/$(PKG_LIBVER)/monitor.rb
-/usr/lib/ruby/$(PKG_LIBVER)/timeout.rb
-/usr/lib/ruby/$(PKG_LIBVER)/thwait.rb
-/usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb
-/usr/lib/ruby/$(PKG_LIBVER)/sync.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so
-/usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/monitor.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/wait.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so
endef
define Package/ruby-net/files
-/usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb
-/usr/lib/ruby/$(PKG_LIBVER)/net/*
+/usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/net/*
endef
define Package/ruby-net-telnet/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/net-telnet-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/net-telnet-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/
endef
define Package/ruby-net-telnet/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.md
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.txt
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.md
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.txt
endef
define Package/ruby-nkf/files
-/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/kconv.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/nkf.so
endef
define Package/ruby-openssl/files
-/usr/lib/ruby/$(PKG_LIBVER)/openssl
-/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/openssl-*.gemspec
+/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl
+/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/openssl.so
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/openssl-*.gemspec
endef
define Package/ruby-optparse/files
-/usr/lib/ruby/$(PKG_LIBVER)/optparse.rb
-/usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb
-/usr/lib/ruby/$(PKG_LIBVER)/optparse
+/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/optionparser.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse
endef
define Package/ruby-patterns/files
-/usr/lib/ruby/$(PKG_LIBVER)/observer.rb
-/usr/lib/ruby/$(PKG_LIBVER)/singleton.rb
-/usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb
-/usr/lib/ruby/$(PKG_LIBVER)/forwardable
+/usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable
endef
define Package/ruby-powerassert/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/power_assert-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-*
endef
define Package/ruby-powerassert/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-*/test
endef
define Package/ruby-prettyprint/files
-/usr/lib/ruby/$(PKG_LIBVER)/pp.rb
-/usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/pp.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb
endef
define Package/ruby-pstore/files
-/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb
endef
define Package/ruby-psych/files
-/usr/lib/ruby/$(PKG_LIBVER)/psych
-/usr/lib/ruby/$(PKG_LIBVER)/psych.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec
+/usr/lib/ruby/$(PKG_ABI_VERSION)/psych
+/usr/lib/ruby/$(PKG_ABI_VERSION)/psych.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/psych.so
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/psych-*.gemspec
endef
define Package/ruby-racc/files
-/usr/lib/ruby/$(PKG_LIBVER)/racc
-/usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/racc
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/racc/*.so
endef
define Package/ruby-rake/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/rake-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/
endef
define Package/ruby-rake/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/doc
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.rdoc
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/doc
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/*.rdoc
endef
define Package/ruby-rake/install
$(INSTALL_DIR) $(1)/usr/bin
endef
define Package/ruby-rbconfig/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb
-/usr/lib/ruby/$(PKG_LIBVER)/rbconfig/*
-/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rbconfig/*
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig/*.so
endef
define Package/ruby-rdoc/files
- /usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb
- /usr/lib/ruby/$(PKG_LIBVER)/rdoc
- /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-*
- /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec
+ /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc.rb
+ /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc
+ /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rdoc-*
+ /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rdoc-*.gemspec
endef
define Package/ruby-rdoc/files-excluded
- /usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
- /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
- /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
+ /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/test_case.rb
+ /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/formatter_test_case.rb
+ /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/text_formatter_test_case.rb
endef
define Package/ruby-rdoc/install
$(INSTALL_DIR) $(1)/usr/bin
endef
define Package/ruby-readline/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/readline.so
endef
define Package/ruby-rexml/files
-/usr/lib/ruby/$(PKG_LIBVER)/rexml
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rexml
endef
define Package/ruby-rinda/files
-/usr/lib/ruby/$(PKG_LIBVER)/rinda
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rinda
endef
define Package/ruby-ripper/files
-/usr/lib/ruby/$(PKG_LIBVER)/ripper.rb
-/usr/lib/ruby/$(PKG_LIBVER)/ripper
-/usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/ripper.so
endef
define Package/ruby-rss/files
-/usr/lib/ruby/$(PKG_LIBVER)/rss
-/usr/lib/ruby/$(PKG_LIBVER)/rss.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rss
+/usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb
endef
define Package/ruby-sdbm/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/sdbm.so
endef
define Package/ruby-shell/files
-/usr/lib/ruby/$(PKG_LIBVER)/shell.rb
-/usr/lib/ruby/$(PKG_LIBVER)/shell
+/usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/shell
endef
define Package/ruby-socket/files
-/usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb
-/usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb
-/usr/lib/ruby/$(PKG_LIBVER)/resolv.rb
-/usr/lib/ruby/$(PKG_LIBVER)/socket.rb
-/usr/lib/ruby/$(PKG_LIBVER)/*/socket.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ipaddr.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv-replace.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/socket.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/socket.so
endef
define Package/ruby-testunit/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/test-unit-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*
endef
define Package/ruby-testunit/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/doc
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/*.md
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/doc
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/test
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/sample
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/*.md
endef
define Package/ruby-unicodenormalize/files
-/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb
-/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize
+/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize
endef
define Package/ruby-uri/files
-/usr/lib/ruby/$(PKG_LIBVER)/uri.rb
-/usr/lib/ruby/$(PKG_LIBVER)/uri
+/usr/lib/ruby/$(PKG_ABI_VERSION)/uri.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/uri
endef
define Package/ruby-webrick/files
-/usr/lib/ruby/$(PKG_LIBVER)/webrick
-/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick
+/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick.rb
endef
define Package/ruby-xmlrpc/files
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/xmlrpc-*
-/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/xmlrpc-*.gemspec
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-*
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/xmlrpc-*.gemspec
endef
define Package/ruby-xmlrpc/files-excluded
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/xmlrpc-0.2.1/*.md
-/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/xmlrpc-0.2.1/*.txt
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.md
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.txt
endef
define Package/ruby-yaml/files
-/usr/lib/ruby/$(PKG_LIBVER)/yaml
-/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml
+/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml.rb
endef
define Package/ruby-zlib/files
-/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/zlib.so
endef
RUBY_FILES = $(strip $(call Package/ruby-$(1)/files))
include $(TOPDIR)/rules.mk
PKG_NAME:=freetype
-PKG_VERSION:=2.5.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/freetype
-PKG_MD5SUM:=2a7a314927011d5030903179cf183be0
+PKG_MD5SUM:=be4601619827b7935e1d861745923a68
PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
include $(TOPDIR)/rules.mk
PKG_NAME:=libcap
-PKG_VERSION:=2.24
+PKG_VERSION:=2.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
-PKG_MD5SUM:=d43ab9f680435a7fff35b4ace8d45b80
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_MD5SUM:=6666b839e5d46c2ad33fc8aa2ceb5f77
+PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
PKG_INSTALL:=1
LDFLAGS="$(TARGET_LDFLAGS) -shared" \
INDENT="| true" \
PAM_CAP="no" \
- LIBATTR="no" \
+ RAISE_SETFCAP="no" \
DYNAMIC="yes" \
lib="lib"
--without-iconv
CONFIGURE_VARS += \
- LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \
ac_cv_header_iconv_h=no
define Build/InstallDev
include $(TOPDIR)/rules.mk
PKG_NAME:=liboping
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.9.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=LGPL-2.1+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://verplant.org/liboping/files
-PKG_MD5SUM:=64a6f31310093d2517cfe7f05aa011e0
+PKG_SOURCE_URL:=https://noping.cc/files
+PKG_MD5SUM:=9c9f65bfd297d7e7092c7f219c31f66a
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=pcre
-PKG_VERSION:=8.39
+PKG_VERSION:=8.40
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
-PKG_MD5SUM:=e3fca7650a0556a2647821679d81f585
+PKG_MD5SUM:=41a842bf7dcecd6634219336e2167d1d
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=BSD-3-Clause
PKG_NAME:=nail
PKG_VERSION:=12.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz
--- /dev/null
+--- a/openssl.c
++++ b/openssl.c
+@@ -216,11 +216,17 @@ ssl_select_method(const char *uhp)
+
+ cp = ssl_method_string(uhp);
+ if (cp != NULL) {
++#ifndef OPENSSL_NO_SSL2
+ if (equal(cp, "ssl2"))
+ method = SSLv2_client_method();
+- else if (equal(cp, "ssl3"))
++ else
++#endif
++#ifndef OPENSSL_NO_SSL3
++ if (equal(cp, "ssl3"))
+ method = SSLv3_client_method();
+- else if (equal(cp, "tls1"))
++ else
++#endif
++ if (equal(cp, "tls1"))
+ method = TLSv1_client_method();
+ else {
+ fprintf(stderr, catgets(catd, CATSET, 244,
+++ /dev/null
---- a/openssl.c
-+++ b/openssl.c
-@@ -216,9 +216,12 @@ ssl_select_method(const char *uhp)
-
- cp = ssl_method_string(uhp);
- if (cp != NULL) {
-+#ifndef OPENSSL_NO_SSL2
- if (equal(cp, "ssl2"))
- method = SSLv2_client_method();
-- else if (equal(cp, "ssl3"))
-+ else
-+#endif
-+ if (equal(cp, "ssl3"))
- method = SSLv3_client_method();
- else if (equal(cp, "tls1"))
- method = TLSv1_client_method();
--with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config"
+# Manually edit configure in case both vorbis and tremor host packages are installed
+define Build/Configure
+ $(SED) 's,-lvorbis -lm,-lvorbisidec -logg ,g' $(PKG_BUILD_DIR)/configure
+ $(call Build/Configure/Default)
+endef
+
define Package/icecast/install
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
return NULL;
}
-+/* Some additional functions from vorbis missing from tremore */
++/* Some additional functions from vorbis missing from tremor */
+
+static void _v_writestring(oggpack_buffer *o,char *s, int bytes)
+{
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=2.1.1
+PKG_VERSION:=2.1.5
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* procd based hotplug support, the adblock start will be triggered by interface triggers
* suspend & resume adblock actions temporarily without block list reloading
* runtime statistics via ubus service call
-* query function to quickly identify blocked (sub-)domains, i.e. for whitelisting
+* query function to quickly identify blocked (sub-)domains, e.g. for whitelisting
* automatic block list backup & restore, backups will be (de-)compressed and restored on the fly
* add new adblock sources on your own via uci config
* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer) and with current trunk (Designated Driver)
* [LEDE project](https://www.lede-project.org), tested with trunk > r98
* a usual setup with an enabled dns server at minimum - dump AP modes without a working dns server are _not_ supported
-* a download utility: 'wget', 'aria2c', 'uclient-fetch' or 'curl' are supported (only full versions with ssl support). Normally you should use the pre-configured default 'wget'. If you need a smaller memory footprint try 'uclient-fetch' without openssl dependency.
+* a download utility: full versions (with ssl support) of 'wget', 'uclient-fetch', 'aria2c' or 'curl' are supported - the Chaos Calmer built-in busybox wget is not
+ * Chaos Calmer: download & install the external 'wget' package
+ * Designated Driver/Trunk: use built-in 'uclient-fetch' or download & install the external 'wget' package
+ * for more configuration options see examples below
## OpenWrt / LEDE trunk Installation & Usage
* install 'adblock' (_opkg install adblock_) and that's it - the adblock start will be automatically triggered by procd interface triggers
* **debug output:** for script debugging please set the config option 'adb\_debug' to '1' and check the runtime output with _logread -e "adblock"_
* **storage expansion:** to process and store all block list sources at once it might helpful to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
* **add white-/blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below)
-* **backup & restore block lists:** enable this feature, to restore automatically the latest compressed backup of your block lists in case of any processing error (i.e. a single block list source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this
+* **backup & restore block lists:** enable this feature, to restore automatically the latest compressed backup of your block lists in case of any processing error (e.g. a single block list source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this
* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
* **restrict/disable procd interface trigger:** to restrict the procd interface trigger to a (list of) certain wan interface(s) or to disable it at all, set 'adb\_iface' to an existing interface like 'wan' or to a non-existing like 'false'
* **suspend & resume adblocking:** to quickly switch the adblock service 'on' or 'off', simply use _/etc/init.d/adblock [suspend|resume]_
option adb_fetch '/usr/bin/aria2c'
option adb_fetchparm '-q --max-tries=1 --timeout=5 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o'
-uclient-fetch:
+uclient-fetch (not supported in Chaos Calmer):
option adb_fetch '/bin/uclient-fetch'
option adb_fetchparm '-q --timeout=5 --no-check-certificate -O'
**receive adblock statistics via ubus:**
<pre><code>
ubus call service list '{"name":"adblock_stats"}'
-This will output the active block lists and other runtime information as JSON, i.e.:
+This will output the active block lists and other runtime information as JSON, e.g.:
{
"adblock_stats": {
"instances": {
www.adwhere.com
</code></pre>
-**query active block lists for a certain (sub-)domain, i.e. for whitelisting:**
+**query active block lists for a certain (sub-)domain, e.g. for whitelisting:**
<pre><code>
-/etc/init.d/adblock query "example.www.doubleclick.net"
-:: distinct results for domain 'example.www.doubleclick.net' (overall 0)
- no matches in active block lists
-:: distinct results for domain 'www.doubleclick.net' (overall 1)
- adb_list.securemecca : www.doubleclick.net
-:: distinct results for domain 'doubleclick.net' (overall 127)
- adb_list.adaway : ad-g.doubleclick.net
- adb_list.securemecca : 1168945.fls.doubleclick.net
+/etc/init.d/adblock query example.www.doubleclick.net
+::: distinct results for domain 'example.www.doubleclick.net'
+ no match
+::: distinct results for domain 'www.doubleclick.net'
+ adb_list.sysctl : www.doubleclick.net
+::: distinct results for domain 'doubleclick.net'
+ adb_list.adaway : ad-g.doubleclick.net
+ adb_list.securemecca : 1168945.fls.doubleclick.net
+ adb_list.sysctl : 1435575.fls.doubleclick.net
+ adb_list.whocares : 3ad.doubleclick.net
The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain(s).
For every domain it returns the overall count plus a distinct list of active block lists with the first relevant result.
resume Resume adblock processing
query <DOMAIN> Query active blocklists for specific domain"
-exec 2>/dev/null
adb_script="/usr/bin/adblock.sh"
-adb_iface="$(uci -q get adblock.global.adb_iface)"
boot()
{
if [ -n "${wanif4}" ] || [ -n "${wanif6}" ]
then
rc_procd start_service
- else
- rc_procd service_triggers
+ return 0
fi
fi
+ rc_procd service_triggers
}
start_service()
service_triggers()
{
- local iface
+ local iface="$(uci -q get adblock.global.adb_iface)"
- procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
- if [ -z "${adb_iface}" ]
+ if [ -z "${iface}" ]
then
procd_add_raw_trigger "interface.*.up" 1000 /etc/init.d/adblock start
else
- for iface in ${adb_iface}
+ for name in ${iface}
do
- procd_add_interface_trigger "interface.*.up" "${iface}" /etc/init.d/adblock start
+ procd_add_interface_trigger "interface.*.up" "${name}" /etc/init.d/adblock start
done
fi
+
+ procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="2.1.1"
+adb_ver="2.1.5"
adb_enabled=1
adb_debug=0
adb_whitelist="/etc/adblock/adblock.whitelist"
f_log "error" "status ::: system library not found"
fi
- # set dns server environment
+ # set dns backend environment
#
adb_dns="$(uci -q get adblock.global.adb_dns)"
if [ "${adb_dns}" = "unbound" ]
# check fetch utility
#
- if [ -z "${adb_fetch}" ] || [ ! -f "${adb_fetch}" ]
+ if [ -z "${adb_fetch}" ] || [ -z "${adb_fetchparm}" ] || [ ! -f "${adb_fetch}" ] || [ "$(readlink -fn "${adb_fetch}")" = "/bin/busybox" ]
then
- f_log "error" "status ::: no download utility with ssl support found/configured"
+ f_log "error" "status ::: required download utility with ssl support not found, e.g. install full 'wget' package"
+ fi
+ if [ "${adb_fetch}" = "/usr/bin/wget" ] && [ "$(readlink -fn "${adb_fetch}")" = "/bin/uclient-fetch" ]
+ then
+ adb_fetch="/bin/uclient-fetch"
+ adb_fetchparm="-q --timeout=5 --no-check-certificate -O"
fi
# create dns hideout directory
if [ ! -d "${adb_dnshidedir}" ]
then
mkdir -p -m 660 "${adb_dnshidedir}"
- chown -R "${adb_dns}":"${adb_dns}" "${adb_dnshidedir}"
+ chown -R "${adb_dns}":"${adb_dns}" "${adb_dnshidedir}" 2>/dev/null
else
rm -f "${adb_dnshidedir}/${adb_dnsprefix}"*
fi
ubus call service delete "{\"name\":\"adblock_stats\",\"instances\":\"stats\"}" 2>/dev/null
}
-# f_dnsrestart: restart the dns server
+# f_dnsrestart: restart the dns backend
#
f_dnsrestart()
{
printf "%s\n" "::: no active block lists found, please start adblock first"
elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
then
- printf "%s\n" "::: invalid domain input, please submit a specific (sub-)domain, i.e. 'www.abc.xyz'"
+ printf "%s\n" "::: invalid domain input, please submit a specific (sub-)domain, e.g. 'www.abc.xyz'"
else
cd "${adb_dnsdir}"
while [ "${domain}" != "${tld}" ]
logger -t "adblock-[${adb_ver}] ${class}" "${log_msg}"
if [ "${class}" = "error" ]
then
+ logger -t "adblock-[${adb_ver}] ${class}" "Please also check the online documentation 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
f_rmtemp
f_rmdns
f_dnsrestart
}
# f_debug: gather memory & space information
+#
f_debug()
{
local mem_total=0 mem_free=0 mem_swap=0 tmp_space=0 backup_space=0
fi
done
- # restart dns server and write statistics
+ # restart the dns backend and write statistics to procd service instance
#
chown "${adb_dns}":"${adb_dns}" "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null
f_dnsrestart
return 0
fi
f_debug
- f_log "error" "status ::: dns server restart with active block lists failed (${sysver})"
+ f_log "error" "status ::: dns backend restart with active block lists failed (${sysver})"
}
# handle different adblock actions
;;
esac
fi
-exit 0
\ No newline at end of file
+exit 0
--- /dev/null
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@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:=bitlbee
+PKG_VERSION:=3.4.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://get.bitlbee.org/src/ \
+ http://distcache.FreeBSD.org/local-distfiles/brix/
+PKG_MD5SUM:=69c85554def74f314e3b6e390389a30b0e748f23ef37883e9d7545ee2c45ea57
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/bitlbee
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Instant Messaging
+ TITLE:=An IRC to other chat networks gateway
+ URL:=http://www.bitlbee.org/
+ DEPENDS:=+glib2 +libopenssl $(ICONV_DEPENDS) $(INTL_DEPENDS)
+endef
+
+define Package/bitlbee/description
+ This program can be used as an IRC server which forwards everything you
+ say to people on other chat networks: Jabber (which includes Google Talk
+ and Facebook Chat), ICQ, AIM, MSN, Yahoo! and Twitter/Identica/Status.net.
+endef
+
+define Package/bitlbee/conffiles
+/etc/bitlbee/bitlbee.conf
+/etc/bitlbee/motd.txt
+endef
+
+CONFIGURE_ARGS = \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=$(CONFIGURE_PREFIX) \
+ --etcdir=/etc/bitlbee \
+ --ssl=openssl \
+ --msn=0
+
+define Build/Install
+ $(call Build/Install/Default,install install-etc)
+endef
+
+define Package/bitlbee/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bitlbee $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/bitlbee
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/bitlbee/{bitlbee.conf,motd.txt} $(1)/etc/bitlbee
+endef
+
+$(eval $(call BuildPackage,bitlbee))
PKG_VERSION:=2.7.6
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=11
+PKG_RELEASE:=12
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
get_local_ip () {
# $1 Name of Variable to store local IP (LOCAL_IP)
local __CNT=0 # error counter
- local __RUNPROG __DATA __URL __ERR
+ local __RUNPROG __DATA __URL __ERR __TMP
[ $# -ne 1 ] && write_log 12 "Error calling 'get_local_ip()' - wrong number of parameters"
write_log 7 "Detect local IP on '$ip_source'"
__ERR=$?
if [ $__ERR -eq 0 ]; then
# DATFILE (sample)
+ # 10: l2tp-inet: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1456 qdisc fq_codel state UNKNOWN qlen 3\ link/ppp
+ # 10: l2tp-inet inet 95.30.176.51 peer 95.30.176.1/32 scope global l2tp-inet\ valid_lft forever preferred_lft forever
# 5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000\ link/ether 08:00:27:d0:10:32 brd ff:ff:ff:ff:ff:ff
# 5: eth1 inet 172.27.10.128/24 brd 172.27.10.255 scope global eth1\ valid_lft forever preferred_lft forever
# 5: eth1 inet 172.55.55.155/24 brd 172.27.10.255 scope global eth1\ valid_lft 12345sec preferred_lft 12345sec
# 5: eth1 inet6 fd43:5368:6f6d:6500:a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec
# 5: eth1 inet6 2002:b0c7:f326::a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec
- # remove remove remove replace remove remove
- # BROADCAST inet6 fxxx sec forever=>-1 between / and pref.. linestart to inet
- sed -i "/BROADCAST/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\/.*preferred_lft//g; s/^.*$ip_interface *//g" $DATFILE
+ # remove remove remove replace replace
+ # link inet6 fxxx sec forever=>-1 / => ' ' to separate subnet from ip
+ sed "/link/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\// /g" $DATFILE | \
+ awk '{ print $3" "$4" "$NF }' > ${DATFILE}_tmp
+ # we only need inet? IP prefered time
local __TIME4=0; local __TIME6=0
local __TYP __ADR __TIME
__DATA4="$__ADR"
__TIME4="$__TIME"
}
- done < $DATFILE
+ done < ${DATFILE}_tmp
+ rm ${DATFILE}_tmp
else
write_log 3 "ip Error: '$__ERR'"
write_log 7 "$(cat $ERRFILE)" # report error
--- /dev/null
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@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:=fping
+PKG_VERSION:=3.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://fping.org/dist/
+PKG_MD5SUM:=4bb28efd1cb3d1240ae551dadc20daa852b1ba71bafe32e49ca629c1848e5720
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=BSD-4-Clause
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fping
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
+ URL:=http://fping.org/
+endef
+
+
+define Package/fping/description
+ fping is a ping like program which uses the Internet Control Message Protocol
+ (ICMP) echo request to determine if a target host is responding. fping
+ differs from ping in that you can specify any number of targets on the command
+ line, or specify a file containing the lists of targets to ping. Instead of
+ sending to one target until it times out or replies, fping will send out a
+ ping packet and move on to the next target in a round-robin fashion.
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-ipv4 \
+ --enable-ipv6
+
+define Package/fping/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{fping,fping6} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,fping))
--- /dev/null
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@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:=ifstat
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://gael.roualland.free.fr/ifstat/
+PKG_MD5SUM:=8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ifstat
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=InterFace STATistics Monitoring
+ URL:=http://gael.roualland.free.fr/ifstat/
+ DEPENDS:=+libnetsnmp
+endef
+
+define Package/ifstat/description
+ ifstat is a tool to report network interfaces bandwidth just like
+ vmstat/iostat do for other system counters. It can monitor local
+ interfaces by polling the kernel counters, or remote hosts
+ interfaces using SNMP.
+endef
+
+define Package/ifstat/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifstat $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,ifstat))
#
-# Copyright (C) 2008-2016 OpenWrt.org
+# Copyright (C) 2008-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=knxd
-PKG_VERSION=2016-10-08
+PKG_VERSION=2017-01-18
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
-PKG_SOURCE_VERSION:=43e90c6ee3028194c8ce6d7776e7dedbe1032dc1
+PKG_SOURCE_VERSION:=8255bf08b6e1a972c1489012b570bf0ff8679cb0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
SECTION:=net
CATEGORY:=Network
TITLE:=EIB KNX daemon
- DEPENDS:=+pthsem +libusb-1.0
+ DEPENDS:=+libusb-1.0 +libstdcpp +libev
endef
define Package/knxd/description
SECTION:=net
CATEGORY:=Network
TITLE:=EIB KNX Utils
+ DEPENDS:=+libstdcpp +libev
endef
define Package/knxd-tools/description
EIB KNX Tools
endef
-TARGET_CXXFLAGS+= -fno-rtti
+TARGET_CXXFLAGS+= -std=c++0x
TARGET_CXX=$(TARGET_CC)
CONFIGURE_ARGS+= \
- --disable-ft12 \
--enable-eibnetip \
--enable-eibnetiptunnel \
--enable-eibnetipserver \
- --enable-usb \
- --enable-tpuarts \
- --disable-pei16s \
- --enable-groupcache \
- --without-pth-test \
- --disable-systemd \
- --without-libstdc
+ --disable-systemd
EXTRA_LDFLAGS+= \
- -fno-builtin -largp
+ -largp -lstdc++
define Package/knxd/install
$(INSTALL_DIR) $(1)/usr/bin
option Discovery 1
# EIBADDR set our EIB address to EIBADDR (default 0.0.1)
option eibaddr "0.0.1"
+ # CLIENT-ADDRS assign addresses ADDRSTART through ADDRSTART+n
+ option client-addrs "0.0.2:10"
# LEVEL set error level
option error 0
# PORT listen at TCP port PORT (default 6720)
option listen_tcp "6720"
- # wait for L_Data_ind while sending (for all EMI based backends)
- option no_emisend_queuing 0
+ # Interface to use
+ option Interface ""
+ # wait while sending
+ option send-delay ""
# SERVERNAME name of the EIBnet/IP server (default is 'knxd')
option Name "OpenWrt"
- # do not assume KNXnet/IP Tunneling bus interface can handle parallel cEMI requests
- option no_tunnel_client_queuing 0
# the next Layer2 interface may not enter monitor mode
option no_monitor 0
# enable EIBnet/IP Routing in the EIBnet/IP server
local options url
config_load knxd
append_parm args eibaddr "eibaddr" "0.0.1"
+ append_parm args client-addrs "client-addrs" "0.0.2:10"
append_parm args layer2 "layer2"
append_bool args GroupCache "GroupCache" 0
append_parm args daemon "daemon" "/var/log/knxd.log"
append_bool args Discovery "Discovery" 1
append_parm args error "error" # "5"
append_parm args listen_tcp "listen-tcp" "6720"
- append_bool args no_emisend_queuing "no-emisend-queuing" 0
+ append_parm args Interface "Interface" # "eth0"
+ append_parm args send-delay "send-delay" # "50"
append_parm args Name "Name" "OpenWrt"
- append_bool args no_tunnel_client_queuing "no-tunnel-client-queuing" 0
append_bool args no_monitor "no-monitor" 0
append_bool args Routing "Routing" 0
append_parm args trace "trace" # "7"
config MOSQUITTO_LWS
bool "libwebsockets support"
- depends on PACKAGE_mosquitto
+ depends on PACKAGE_mosquitto-ssl
default y
help
Includes websockets support in the broker, via libwebsockets
config MOSQUITTO_PASSWD
bool "Include mosquitto_passwd utility"
- depends on PACKAGE_mosquitto
+ depends on PACKAGE_mosquitto-ssl
default y
help
mosquitto_passwd is a tool for managing password files for mosquitto.
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)/default
+define Package/mosquitto/default
SECTION:=net
CATEGORY:=Network
TITLE:=mosquitto - an MQTT message broker
USERID:=mosquitto=200:mosquitto=200
endef
-define Package/$(PKG_NAME)
+define Package/mosquitto-ssl
$(call Package/mosquitto/default)
TITLE+= (with SSL support)
DEPENDS+= +libopenssl +MOSQUITTO_LWS:libwebsockets-openssl
PROVIDES:=mosquitto
endef
-define Package/$(PKG_NAME)-nossl
- $(call Package/$(PKG_NAME)/default)
+define Package/mosquitto-nossl
+ $(call Package/mosquitto/default)
TITLE+= (without SSL support)
VARIANT:=nossl
PROVIDES:=mosquitto
endef
-define Package/$(PKG_NAME)/config
+define Package/mosquitto-ssl/config
source "$(SOURCE)/Config.in"
endef
-define Package/$(PKG_NAME)/default/description
+define Package/mosquitto/default/description
Mosquitto is an open source (BSD licensed) message broker that implements
the MQTT protocol version 3.1 and 3.1.1. MQTT provides a lightweight
method of carrying out messaging using a publish/subscribe model.
This package also includes some basic support for configuring via UCI
endef
-define Package/$(PKG_NAME)/description
- $(call Package/$(PKG_NAME)/default/description)
+define Package/mosquitto-ssl/description
+ $(call Package/mosquitto/default/description)
This package is built with SSL support
endef
-define Package/$(PKG_NAME)-nossl/description
- $(call Package/$(PKG_NAME)/default/description)
+define Package/mosquitto-nossl/description
+ $(call Package/mosquitto/default/description)
This package is built WITHOUT SSL support.
endef
define Package/mosquitto-client
$(call Package/mosquitto-client/default)
TITLE+= (With SSL support)
- DEPENDS+=+libmosquitto
+ DEPENDS+=+libmosquitto-ssl
VARIANT:=ssl
endef
define Package/mosquitto-client-nossl
PROVIDES:=libmosquitto
endef
-define Package/libmosquitto
+define Package/libmosquitto-ssl
$(call Package/libmosquitto/default)
TITLE+= (With SSL Support)
DEPENDS+= +libopenssl
server, such as IBM's RSMB, in addition to Mosquitto
endef
-define Package/libmosquitto/description
+define Package/libmosquitto-ssl/description
$(call Package/libmosquitto/default/description)
This package is built with SSL support
endef
define Package/libmosquittopp
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libmosquitto +libstdcpp
+ DEPENDS:=+libmosquitto-ssl +libstdcpp
TITLE:= mosquitto - client c++ library
endef
C++ Library wrapper for libmosquitto.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/mosquitto-ssl/conffiles
/etc/mosquitto/mosquitto.conf
/etc/config/mosquitto
endef
-Package/$(PKG_NAME)-nossl/conffiles = $(Package/$(PKG_NAME)/conffiles)
+Package/mosquitto-nossl/conffiles = $(Package/mosquitto-ssl/conffiles)
define Package/mosquitto/install/default
$(INSTALL_DIR) $(1)/usr/sbin
$(call Package/mosquitto/install/default,$(1))
endef
-define Package/mosquitto/install
+define Package/mosquitto-ssl/install
$(call Package/mosquitto/install/default,$(1))
ifeq ($(CONFIG_MOSQUITTO_PASSWD),y)
$(INSTALL_DIR) $(1)/usr/bin
endef
# This installs files on the target. Compare with Build/InstallDev
-define Package/libmosquitto/install
+define Package/libmosquitto-ssl/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libmosquitto.so.1 $(1)/usr/lib/
$(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
endef
-Package/libmosquitto-nossl/install = $(Package/libmosquitto/install)
+Package/libmosquitto-nossl/install = $(Package/libmosquitto-ssl/install)
define Package/libmosquittopp/install
$(INSTALL_DIR) $(1)/usr/lib
MAKE_FLAGS += WITH_WEBSOCKETS=$(if $(CONFIG_MOSQUITTO_LWS),"yes","no")
endif
-$(eval $(call BuildPackage,$(PKG_NAME)))
-$(eval $(call BuildPackage,$(PKG_NAME)-nossl))
-$(eval $(call BuildPackage,libmosquitto))
+$(eval $(call BuildPackage,mosquitto-ssl))
+$(eval $(call BuildPackage,mosquitto-nossl))
+$(eval $(call BuildPackage,libmosquitto-ssl))
$(eval $(call BuildPackage,libmosquitto-nossl))
$(eval $(call BuildPackage,libmosquittopp))
$(eval $(call BuildPackage,mosquitto-client))
#
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=nmap
-PKG_VERSION:=7.31
+PKG_VERSION:=7.40
PKG_RELEASE:=1
PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://nmap.org/dist/
-PKG_MD5SUM:=f2f6660142a777862342a58cc54258ea
+PKG_MD5SUM:=9c5a28bfb46228bade82b238408c065e
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+++ /dev/null
-diff --git a/ncat/ncat_ssl.c b/ncat/ncat_ssl.c
-index ee8ca97..9ff495c 100644
---- a/ncat/ncat_ssl.c
-+++ b/ncat/ncat_ssl.c
-@@ -128,7 +128,9 @@
-
- #include <stdio.h>
- #include <openssl/ssl.h>
-+#include <openssl/bn.h>
- #include <openssl/err.h>
-+#include <openssl/rsa.h>
- #include <openssl/rand.h>
- #include <openssl/x509.h>
- #include <openssl/x509v3.h>
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
- $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/ntpd.hotplug-helper
+ $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
#!/bin/sh
-HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
-
while true
do
- STATUS="$(ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
+ STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ]
then
include $(TOPDIR)/rules.mk
PKG_NAME:=pen
-PKG_VERSION:=0.29.0
+PKG_VERSION:=0.34.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://siag.nu/pub/pen/
-PKG_MD5SUM:=6040c43d80d62536afb4d4b1cf40c127
+PKG_HASH:=a3306bfb02619b103ff431002bb91079048bf2dd24f739bf38e373860558cd27
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
sc_cv_sys_tabdly_shift=11 \
sc_cv_sys_csize_shift=4
+TARGET_CFLAGS += \
+ -include stddef.h
+
define Package/socat/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
include $(TOPDIR)/rules.mk
PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=699f5d014b23790a3ac4e8280a14ac740cd5c3e4
-PKG_VERSION:=1.1.0
+PKG_SOURCE_VERSION:=70a22d6d19d4411f004c5257ee15fb1f103b46c9
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_LICENSE:=GPLv2
define Package/sqm-scripts
SECTION:=net
CATEGORY:=Base system
- DEPENDS:=+tc +kmod-sched +kmod-ifb +iptables \
+ DEPENDS:=+tc +kmod-sched +kmod-sched-cake +kmod-ifb +iptables \
+iptables-mod-ipopt +iptables-mod-conntrack-extra
TITLE:=SQM Scripts (QoS)
PKGARCH:=all
endef
define Package/luci-app-sqm/description
- Control the simple_qos SQM script
+ Luci interface for the SQM scripts queue management configuration package.
endef
define Package/luci-app-sqm/install
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=0.3.1
+PKG_VERSION:=0.3.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
USE_PROCD=1
trm_script="/usr/bin/travelmate.sh"
-trm_iface="$(uci -q get travelmate.global.trm_iface)"
boot()
{
service_triggers()
{
- local iface
+ local iface="$(uci -q get travelmate.global.trm_iface)"
- procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start
- if [ -z "${trm_iface}" ]
+ if [ -z "${iface}" ]
then
procd_add_raw_trigger "interface.*.down" 1000 /etc/init.d/travelmate start
else
- for iface in ${trm_iface}
+ for name in ${iface}
do
- procd_add_interface_trigger "interface.*.down" "${iface}" /etc/init.d/travelmate start
+ procd_add_interface_trigger "interface.*.down" "${name}" /etc/init.d/travelmate start
done
fi
+
+ procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="0.3.1"
+trm_ver="0.3.2"
trm_enabled=1
trm_debug=0
trm_maxwait=20
then
. "/lib/functions.sh"
else
- f_log "error" "required system library not found"
+ f_log "error" "status ::: required system library not found"
fi
# load uci config and check 'enabled' option
while [ ${cnt} -le ${trm_maxwait} ]
do
- ifname="$(ubus -S call network.wireless status | jsonfilter -l 1 -e "@.*.interfaces[@.config.mode=\"${mode}\"].ifname")"
- if [ "${mode}" = "sta" ]
+ if [ "${mode}" = "ap" ]
then
- trm_ifstatus="$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.device=\"${ifname}\"].up")"
- else
trm_ifstatus="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.up')"
+ else
+ ifname="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
+ if [ -n "${ifname}" ]
+ then
+ trm_ifstatus="$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.device=\"${ifname}\"].up")"
+ fi
fi
- if [ "${trm_ifstatus}" = "true" ]
+ if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
then
break
fi
cnt=$((cnt+1))
sleep 1
done
- f_log "debug" "check ::: name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}"
+ f_log "debug" "check ::: mode: ${mode}, name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}, max-wait: ${trm_maxwait}"
}
# function to write to syslog
f_main()
{
local ap_list ssid_list config network ssid cnt=1
+ local sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
- f_check "sta"
+ f_check "initial"
if [ "${trm_ifstatus}" != "true" ]
then
config_load wireless
f_log "debug" "main ::: ap-list: ${ap_list}, sta-list: ${trm_stalist}"
if [ -z "${ap_list}" ] || [ -z "${trm_stalist}" ]
then
- f_log "error" "main ::: no usable AP/STA configuration found"
+ f_log "error" "status ::: no usable AP/STA configuration found"
fi
for ap in ${ap_list}
do
f_check "sta"
if [ "${trm_ifstatus}" = "true" ]
then
- f_log "info " "main ::: wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry})"
+ f_log "info " "status ::: wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})"
+ sleep 5
return 0
else
uci -q set wireless."${config}".disabled=1
uci -q commit wireless
ubus call network reload
- f_log "info " "main ::: wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry})"
+ f_log "info " "status ::: wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})"
fi
fi
done
+ else
+ f_log "info " "status ::: empty uplink list (${cnt}/${trm_maxretry}, ${sysver})"
fi
cnt=$((cnt+1))
sleep 5
done
done
- f_log "info " "main ::: no wwan uplink found"
+ f_log "info " "status ::: no wwan uplink found (${sysver})"
+ else
+ f_log "info " "status ::: wwan uplink still connected (${sysver})"
fi
}
PKG_NAME:=unbound
PKG_VERSION:=1.6.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
define Package/unbound/conffiles
/etc/config/unbound
/etc/unbound/unbound.conf
+/etc/unbound/unbound_ext.conf
+/etc/unbound/unbound_srv.conf
endef
define Build/InstallDev
$(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
$(1)/etc/unbound/unbound.conf
$(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
+ $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
+ $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
- $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
+ $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
$(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
- $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
+ $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
+ $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
$(INSTALL_DIR) $(1)/usr/lib/unbound
+ $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
+ $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
$(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
$(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
$(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
$(eval $(call BuildPackage,unbound-control-setup))
$(eval $(call BuildPackage,unbound-host))
$(eval $(call BuildPackage,libunbound))
+
This package builds on Unbounds capabilities with OpenWrt UCI. Not every Unbound option is in UCI, but rather, UCI simplifies the combination of related options. Unbounds native options are bundled and balanced within a smaller set of choices. Options include resources, DNSSEC, access control, and some TTL tweaking. The UCI also provides an escape option and work at the raw "unbound.conf" level.
-## Work with dnsmasq
-Some UCI options will help Unbound and dnsmasq work together in **parallel**. The default DHCP and DNS stub resolver in OpenWrt is dnsmasq, and it will continue to serve this purpose. The following partial examples will make Unbound the primary DNS server, and make dnsmasq only provide DNS to local DHCP.
+## HOW TO Integrate with DHCP
+Some UCI options and scripts help Unbound to work with DHCP servers to load the local DNS. The examples provided here are serial dnsmasq-unbound, parallel dnsmasq-unbound, and unbound scripted with odhcpd.
+
+### Serial dnsmasq
+In this case, dnsmasq is not changed *much* with respect to the default OpenWRT/LEDE configuration. Here dnsmasq is forced to use the local Unbound instance as the lone upstream DNS server, instead of your ISP. This may be the easiest implementation, but performance degradation can occur in high volume networks. dnsmasq and Unbound effectively have the same information in memory, and all transfers are double handled.
**/etc/config/unbound**:
config unbound
- option dnsmasq_link_dns '1'
+ option add_local_fqdn '0'
+ option add_wan_fqdn '0'
+ option dhcp_link 'none'
+ # dnsmasq should not forward your domain to unbound, but if...
+ option domain 'yourdomain'
+ option domain_type 'refuse'
+ option listen_port '1053'
...
**/etc/config/dhcp**:
config dnsmasq
- option option noresolv '1'
- option resolvfile '<empty>'
+ option noresolv '0'
+ option resolvfile '/tmp/resolv.conf.auto'
+ option port '53'
+ list server '127.0.0.1#1053'
+ list server '::1#1053'
+ ...
+
+### Parallel dnsmasq
+In this case, Unbound serves your local network directly for all purposes. It will look over to dnsmasq for DHCP-DNS resolution. Unbound is generally accessible on port 53, and dnsmasq is only accessed at 127.0.0.1:1053 by Unbound. Although you can dig/drill/nslookup remotely with the proper directives.
+
+**/etc/config/unbound**:
+
+ config unbound
+ option dhcp_link 'dnsmasq'
+ option listen_port '53'
+ ...
+
+**/etc/config/dhcp**:
+
+ config dnsmasq
+ option domain 'yourdomain'
+ option noresolv '1'
+ option resolvfile '/tmp/resolv.conf.auto'
option port '1053'
...
- config dhcp '<name>'
+ config dhcp 'lan'
list dhcp_option 'option:dns-server,0.0.0.0'
...
-Alternatives are mentioned here for completeness. DHCP event scripts which write host records are difficult to formulate for Unbound, NSD, or Bind. These programs sometimes need to be forcefully reloaded with host configuration, and reloads can bust cache. **Serial** configuration between dnsmasq and Unbound can be made on 127.0.0.1 with an off-port like #1053. This may double cache storage and incur unnecessary transfer delay.
+### Only odhcpd
+Why use dnsmasq you might ask? Well test, try, and review. You can have Unbound and odhcpd only. When odhcpd configures as DHCP lease, it will call a script. The script provided with Unbound will read the lease file and enter DHCP-DNS records as much as dnsmasq once did.
+
+*note: You must install unbound-control. The lease file loads are done without starting, stopping, or re-writing conf files.*
+
+*note: if you run the default LEDE/OpenWrt setup with dnsmasq and odhcpd, then use the link to dnsmasq. Unbound will pole dnsmasq. dnsmasq merges its lease file and odhcpd lease file.*
+
+**/etc/config/unbound**:
+
+ config unbound
+ # name your router in DNS
+ option add_local_fqdn '1'
+ option add_wan_fqdn '1'
+ option dhcp_link 'odhcpd'
+ # add SLAAC inferred from DHCPv4
+ option dhcp4_slaac6 '1'
+ option domain 'lan'
+ option domain_type 'static'
+ option listen_port '53'
+ option rebind_protection '1'
+ # install unbound-control and set this
+ option unbound_control '1'
+ ...
+
+**/etc/config/dhcp**:
+
+ config dhcp 'lan'
+ option dhcpv4 'server'
+ option dhcpv6 'server'
+ option interface 'lan'
+ # short times help renew events to refresh dns
+ option leasetime '4h'
+ option ra 'server'
+ option ra_management '1'
+ # issue your ULA and avoid default [fe80::]
+ list dns 'fdxx:xxxx:xxxx::1'
+
+ config odhcpd 'odhcpd'
+ option maindhcp '1'
+ option leasefile '/var/lib/odhcpd/dhcp.leases'
+ # this is where the magic happens
+ option leasetrigger '/usr/lib/unbound/odhcpd.sh'
## Back to Manual Configuration
-You don't want UCI, but don't worry. We have UCI for that. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM.
+Yes, there is a UCI to disable the rest of Unbound UCI. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM.
-All of `/etc/unbound` (persistent, ROM) is copied to `/var/lib/unbound` (tmpfs, RAM). Edit your manual `/etc/unbound/unbound.conf` to reference this `/var/lib/unbound` location for included files. Note in preparation for a jail, `/var/lib/unbound` is `chown unbound`. Configure for security in`/etc/unbound/unbound.conf` with options `username:unbound` and `chroot:/var/lib/unbound`.
+### Completely Manual (almost)
+All of `/etc/unbound` (persistent, ROM) is copied to `/var/lib/unbound` (tmpfs, RAM). Edit your manual `/etc/unbound/unbound.conf` to reference this `/var/lib/unbound` location for included files. Note in preparation for a jail, `/var/lib/unbound` is `chown unbound`. Configure for security in`/etc/unbound/unbound.conf` with options `username:unbound` and `chroot:/var/lib/unbound`.
-Finally, `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider this UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash). Keep the DNSKEY updated with your choice of flash activity.
+Keep the DNSKEY updated with your choice of flash activity. `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider the age UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash).
**/etc/config/unbound**:
option manual_conf '1'
option root_age '30'
+### Hybrid Manual/UCI
+You like the UCI. Yet, you need to add some difficult to standardize options, or just are not ready to make a UCI request yet. The files `/etc/unbound/unbound_srv.conf` and `/etc/unbound/unbound_ext.conf` will be copied to Unbounds chroot directory and included during auto generation.
+
+The former will be added to the end of the `server:` clause. The later will be added to the end of the file for extended `forward:` and `view:` clauses. You can also disable unbound-control in the UCI which only allows "localhost" connections unencrypted, and then add an encrypted remote `control:` clause.
+
## Complete List of UCI Options
**/etc/config/unbound**:
config unbound
Currently only one instance is supported.
+ option add_local_fqdn '0'
+ Level. This puts your routers host name in the LAN (local) DNS.
+ Each level is more detailed and comprehensive.
+ 0 - Disabled
+ 1 - Host Name on only the primary address
+ 2 - Host Name on all addresses found (except link)
+ 3 - FQDN and host name on all addresses (except link)
+ 4 - Above and interfaces named <iface>.<hostname>.<domain>
+
+ option add_wan_fqdn '0'
+ Level. Same as previous option only this applies to the WAN. WAN
+ are inferred by a UCI `config dhcp` entry that contains the line
+ option ignore '1'.
+
option dns64 '0'
Boolean. Enable DNS64 through Unbound in order to bridge networks
that are IPV6 only and IPV4 only (see RFC6052).
option dns64_prefix '64:ff9b::/96'
IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64.
- You should use RFC6052 "well known" address, unless you also
+ You should use RFC6052 "well known" address, unless you also
redirect to a proxy or gateway for your NAT64.
- option dnsmasq_gate_name '0'
- Boolean. Forward PTR records for interfaces not serving DHCP.
- Assume these are WAN. Example dnsmasq option here to provide
- logs with a name when your ISP won't link DHCP-DNS.
- "dnsmasq.conf: interface-name=way-out.myrouter.lan,eth0.1"
-
- option dnsmasq_link_dns '0'
- Boolean. Master link to dnsmasq. Parse /etc/config/dhcp for dnsmasq
- options. Forward domain such as "lan" and PTR records for DHCP
- interfaces and their deligated subnets, IP4 and IP6.
-
- option dnsmasq_only_local '0'
- TODO: not yet implemented
- Boolean. Restrict link to dnsmasq. DNS only to local host. Obscure
- names of other connected hosts on the network. Example:
- "drill -x 198.51.100.17 ~ IN PTR way-out.myrouter.lan"
- "drill -x 192.168.10.1 ~ IN PTR guest-wifi.myrouter.lan"
- "drill -x 192.168.10.201 ~ NODATA" (insted of james-laptop.lan)
+ option dhcp_link 'none'
+ Program Name. Link to one of the supported programs we have scripts
+ for. You may also need to install a trigger script in the DHCP
+ servers configuration. See HOW TO above.
+
+ option dhcp4_slaac6 '0'
+ Boolean. Some DHCP servers do this natively (dnsmasq). Otherwise
+ the script provided with this package will try to fabricate SLAAC
+ IP6 addresses from DHCPv4 MAC records.
+
+ option domain 'lan'
+ Unbound local-zone: <domain> <type>. This is used to suffix all
+ host records, and maintain a local zone. When dnsmasq is dhcp_link
+ however, then this option is ignored (dnsmasq does it all).
+
+ option domain_type 'static'
+ Unbound local-zone: <domain> <type>. This allows you to lock
+ down or allow forwarding of your domain, your router host name
+ without suffix, and leakage of RFC6762 "local."
option edns_size '1280'
- Bytes. Extended DNS is necessary for DNSSEC. However, it can run
+ Bytes. Extended DNS is necessary for DNSSEC. However, it can run
into MTU issues. Use this size in bytes to manage drop outs.
option hide_binddata '1'
- Boolean. If enabled version.server, version.bind, id.server, and
+ Boolean. If enabled version.server, version.bind, id.server, and
hostname.bind queries are refused.
option listen_port '53'
configuration. Make changes to /etc/unbound/unbound.conf.
option protocol 'mixed'
- Unbound can limit its protocol: "ip4_only" for ISP behind the time,
- "ip6_only" for testing, "ip6_prefer" for ISP with good IP6 support,
- or default-all "mixed." This affects the protocol used to
- communicate. The DNS responses always include hosts respective IP4
- and IP6 data.
+ Unbound can limit its protocol used for recursive queries.
+ Set 'ip4_only' to avoid issues if you do not have native IP6.
+ Set 'ip6_prefer' to possibly improve performance as well as
+ not consume NAT paths for the client computers.
+ Do not use 'ip6_only' unless testing.
option query_minimize '0'
Boolean. Enable a minor privacy option. Don't let each server know
List. Domains or pointers that you wish to skip DNSSEC. Your DHCP
domains and pointers in dnsmasq will get this automatically.
+## Deprecated UCI
+The dnsmasq specific UCI will still work as well as they did, but please use `option dhcp_link 'dnsmasq'` above. Local host name and WAN host name will be lifted and configured from DHCP UCI subpart dnsmasq. (`dnsmasq_gate_name`, `dnsmasq_link_dns`, `dnsmasq_only_local`)
+
#
##############################################################################
-create_local_zone() {
+dnsmasq_local_zone() {
local cfg="$1"
- local fwd_port fwd_domain
+ local fwd_port fwd_domain wan_fqdn
+ # dnsmasq domain and interface assignment settings will control config
config_get fwd_domain "$cfg" domain
- config_get fwd_port "$cfg" port
+ config_get fwd_port "$cfg" port
+ config_get wan_fqdn "$cfg" add_wan_fqdn
+
+
+ if [ -n "$wan_fqdn" ] ; then
+ UNBOUND_D_WAN_FQDN=$wan_fqdn
+ fi
if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "$fwd_port" -eq 53 ] ; then
##############################################################################
-create_local_arpa() {
+dnsmasq_local_arpa() {
local cfg="$1"
local logint dhcpv4 dhcpv6 ignore
local subnets subnets4 subnets6
forward=""
elif [ "$ignore" -gt 0 ] ; then
- if [ "$UNBOUND_B_GATE_NAME" -gt 0 ] ; then
+ if [ "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then
# Only forward the one gateway host.
forward="host"
##############################################################################
-forward_local_zone() {
+dnsmasq_forward_zone() {
if [ -n "$UNBOUND_N_FWD_PORTS" -a -n "$UNBOUND_TXT_FWD_ZONE" ] ; then
for fwd_domain in $UNBOUND_TXT_FWD_ZONE ; do
{
- # This is derived of create_local_zone/arpa
+ # This is derived of dnsmasq_local_zone/arpa
# but forward: clauses need to be seperate
echo "forward-zone:"
echo " name: \"$fwd_domain.\""
##############################################################################
dnsmasq_link() {
- ####################
- # UCI @ dhcp #
- ####################
-
-
- if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then
- # Forward to dnsmasq on same host for DHCP lease hosts
- echo " do-not-query-localhost: no" >> $UNBOUND_CONFFILE
- # Look at dnsmasq settings
- config_load dhcp
- # Zone for DHCP / SLAAC-PING DOMAIN
- config_foreach create_local_zone dnsmasq
- # Zone for DHCP / SLAAC-PING ARPA
- config_foreach create_local_arpa dhcp
- # Now create ALL seperate forward: clauses
- forward_local_zone
- fi
+ # Forward to dnsmasq on same host for DHCP lease hosts
+ echo " do-not-query-localhost: no" >> $UNBOUND_CONFFILE
+ # Look at dnsmasq settings
+ config_load dhcp
+ # Zone for DHCP / SLAAC-PING DOMAIN
+ config_foreach dnsmasq_local_zone dnsmasq
+ # Zone for DHCP / SLAAC-PING ARPA
+ config_foreach dnsmasq_local_arpa dhcp
+ # Now create ALL seperate forward: clauses
+ dnsmasq_forward_zone
}
##############################################################################
--- /dev/null
+#!/usr/bin/awk
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# Turn DHCP records into meaningful A, AAAA, and PTR records. Also lift a
+# function from dnsmasq and use DHCPv4 MAC to find IPV6 SLAAC hosts.
+#
+# External Parameters
+# "hostfile" = where this script will cache host DNS data
+# "domain" = text domain suffix
+# "bslaac" = boolean, use DHCPv4 MAC to find GA and ULA IPV6 SLAAC
+# "bisolt" = boolean, format <host>.<network>.<domain>. so you can isolate
+#
+##############################################################################
+
+/^#/ {
+ # We need to pick out DHCP v4 or v6 records
+ net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ;
+ cdr = adr ;
+ sub( /\/.*/, "", adr ) ;
+ sub( /.*\//, "", cdr ) ;
+
+
+ if ( bisolt == 1 ) {
+ # TODO: this might be better with a substituion option,
+ # or per DHCP pool do-not-DNS option, but its getting busy here.
+ fqdn = net
+ fqdn = sub( /\./, "-", fqdn ) ;
+ fqdn = tolower( hst "." fqdn "." domain ) ;
+ }
+
+ else {
+ fqdn = tolower( hst "." domain ) ;
+ }
+
+
+ if ( cls == "ipv4" ) {
+ if ( NF == 8 ) {
+ # odhcpd errata in field format without host name
+ adr = $8 ; hst = "-" ; cdr = adr ;
+ sub( /\/.*/, "", adr ) ;
+ sub( /.*\//, "", cdr ) ;
+ }
+
+
+ if (( cdr == 32 ) && ( hst != "-" )) {
+ # only for provided hostnames and full /32 assignments
+ ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ;
+ slaac = slaac_eui64( id ) ;
+ for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; }
+
+ # DHCP A and PTR records with FQDN
+ x = ( fqdn ". 120 IN A " adr ) ;
+ y = ( qpr "in-addr.arpa. 120 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
+
+
+ if ((bslaac == 1) && (slaac != 0)) {
+ # UCI option to discover IPV6 routed SLAAC addresses
+ # NOT TODO - ping probe take too long when added in awk-rule loop
+ cmd = ( "ip -6 --oneline route show dev " net ) ;
+
+
+ while ( ( cmd | getline adr ) > 0 ) {
+ if ( substr( adr, 1, 5 ) <= "fd00:" ) {
+ # GA or ULA routed addresses only (not LL or MC)
+ sub( /\/.*/, "", adr ) ;
+ adr = ( adr slaac ) ;
+ if ( split( adr, tmp0, ":" ) >= 8 ) { sub( "::", ":", adr ) ; }
+ qpr = ipv6_ptr( adr ) ;
+ x = ( fqdn ". 120 IN AAAA " adr ) ;
+ y = ( qpr " 120 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
+ }
+ }
+
+
+ close( cmd ) ;
+ }
+ }
+ }
+
+ else {
+ if (( cdr == 128 ) && ( hst != "-" )) {
+ # only for provided hostnames and full /128 assignments
+ qpr = ipv6_ptr( adr ) ;
+ x = ( fqdn ". 120 IN AAAA " adr ) ;
+ y = ( qpr " 120 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
+ }
+ }
+}
+
+##############################################################################
+
+function ipv6_ptr( ipv6, arpa, ary, end, i, j, new6, sz, start ) {
+ # IPV6 colon flexibility is a challenge when creating [ptr].ip6.arpa.
+ sz = split( ipv6, ary, ":" ) ; end = 9 - sz ;
+
+
+ for( i=1; i<=sz; i++ ) {
+ if( length(ary[i]) == 0 ) {
+ for( j=1; j<=end; j++ ) { ary[i] = ( ary[i] "0000" ) ; }
+ }
+
+ else {
+ ary[i] = substr( ( "0000" ary[i] ), length( ary[i] )+5-4 ) ;
+ }
+ }
+
+
+ new6 = ary[1] ;
+ for( i = 2; i <= sz; i++ ) { new6 = ( new6 ary[i] ) ; }
+ start = length( new6 ) ;
+ for( i=start; i>0; i-- ) { arpa = ( arpa substr( new6, i, 1 ) ) ; } ;
+ gsub( /./, "&\.", arpa ) ; arpa = ( arpa "ip6.arpa" ) ;
+
+ return arpa ;
+}
+
+##############################################################################
+
+function slaac_eui64( mac, ary, glbit, eui64 ) {
+ if ( length(mac) >= 12 ) {
+ # RFC2373 and use DHCPv4 registered MAC to find SLAAC addresses
+ split( mac , ary , "" ) ;
+ glbit = ( "0x" ary[2] ) ;
+ glbit = sprintf( "%d", glbit ) ;
+ glbit = or( glbit, 2 ) ;
+ ary[2] = sprintf( "%x", glbit ) ;
+ eui64 = ( ary[1] ary[2] ary[3] ary[4] ":" ary[5] ary[6] "ff:fe" ) ;
+ eui64 = ( eui64 ary[7] ary[8] ":" ary[9] ary[10] ary[11] ary[12] ) ;
+ }
+
+ else {
+ eui64 = 0 ;
+ }
+
+
+ return eui64 ;
+}
+
+##############################################################################
+
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# This script facilitates alternate installation of Unbound+odhcpd and no
+# need for dnsmasq. There are some limitations, but it works and is small.
+# The lease file is parsed to make "zone-data:" and "local-data:" entries.
+#
+# config odhcpd 'odhcpd'
+# option leasetrigger '/usr/lib/unbound/odhcpd.sh'
+#
+##############################################################################
+
+# Common file location definitions
+. /usr/lib/unbound/unbound.sh
+
+##############################################################################
+
+odhcpd_settings() {
+ # This trigger is out of normal init context, so we need to read some UCI.
+ local cfg="$1"
+ config_get UNBOUND_D_DHCP_LINK "$cfg" dhcp_link none
+ config_get_bool UNBOUND_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0
+}
+
+##############################################################################
+
+odhcpd_zonedata() {
+ local dns_ls_add=$UNBOUND_VARDIR/dhcp_dns.add
+ local dns_ls_del=$UNBOUND_VARDIR/dhcp_dns.del
+ local dhcp_ls_new=$UNBOUND_VARDIR/dhcp_lease.new
+ local dhcp_ls_old=$UNBOUND_VARDIR/dhcp_lease.old
+ local dhcp_ls_add=$UNBOUND_VARDIR/dhcp_lease.add
+ local dhcp_ls_del=$UNBOUND_VARDIR/dhcp_lease.del
+ local dhcp_origin=$( uci get dhcp.@odhcpd[0].leasefile )
+
+ config_load unbound
+ config_foreach odhcpd_settings unbound
+
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a -f "$dhcp_origin" ] ; then
+ # Capture the lease file which could be changing often,
+ # and unbound-control only for changes in hosts (or else...)
+ cat $dhcp_origin | sort > $dhcp_ls_new
+ touch $dhcp_ls_old
+ sort $dhcp_ls_new $dhcp_ls_old $dhcp_ls_old | uniq -u > $dhcp_ls_add
+ sort $dhcp_ls_old $dhcp_ls_new $dhcp_ls_new | uniq -u > $dhcp_ls_del
+
+ # Go through the messy business of coding up A, AAAA, and PTR records.
+ awk -v hostfile=$dns_ls_del -v domain=$UNBOUND_TXT_DOMAIN \
+ -v bslaac=$UNBOUND_B_SLAAC6_MAC -v bisolt=0 \
+ -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_del
+
+ awk -v hostfile=$dns_ls_add -v domain=$UNBOUND_TXT_DOMAIN \
+ -v bslaac=$UNBOUND_B_SLAAC6_MAC -v bisolt=0 \
+ -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_add
+
+
+ if [ -f "$dns_ls_del" ] ; then
+ cat $dns_ls_del | $UNBOUND_CONTROL_CFG local_datas_remove
+ fi
+
+
+ if [ -f "$dns_ls_add" ] ; then
+ cat $dns_ls_add | $UNBOUND_CONTROL_CFG local_datas
+ fi
+
+
+ # prepare next round
+ mv $dhcp_ls_new $dhcp_ls_old
+ rm -f $dns_ls_del $dns_ls_add
+ fi
+}
+
+##############################################################################
+
+odhcpd_zonedata
+
+##############################################################################
+
##############################################################################
start_service() {
- unbound_prepare
+ # complex UCI work
+ unbound_start
+ # standard procd clause
procd_open_instance
procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
procd_set_param respawn
##############################################################################
stop_service() {
- rootzone_update
+ unbound_stop
}
##############################################################################
service_triggers() {
- procd_add_reload_trigger "dhcp"
- procd_add_reload_trigger "network"
- procd_add_reload_trigger "unbound"
+ procd_add_reload_trigger "dhcp" "network" "unbound"
}
##############################################################################
##############################################################################
-if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] \
- && /etc/init.d/unbound enabled ; then
- #
+if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
- /etc/init.d/unbound restart
+ /etc/init.d/unbound enabled && /etc/init.d/unbound restart
fi
##############################################################################
##############################################################################
UNBOUND_B_CONTROL=0
-UNBOUND_B_DNSMASQ=0
+UNBOUND_B_SLAAC6_MAC=0
UNBOUND_B_DNSSEC=0
UNBOUND_B_DNS64=0
UNBOUND_B_GATE_NAME=0
UNBOUND_B_HIDE_BIND=1
UNBOUND_B_LOCL_BLCK=0
-UNBOUND_B_LOCL_NAME=0
UNBOUND_B_LOCL_SERV=1
UNBOUND_B_MAN_CONF=0
UNBOUND_B_NTP_BOOT=1
UNBOUND_B_QUERY_MIN=0
UNBOUND_B_QRY_MINST=0
-UNBOUND_IP_DNS64="64:ff9b::/96"
-
+UNBOUND_D_DOMAIN_TYPE=static
+UNBOUND_D_DHCP_LINK=none
+UNBOUND_D_LAN_FQDN=0
+UNBOUND_D_PROTOCOL=mixed
UNBOUND_D_RESOURCE=small
UNBOUND_D_RECURSION=passive
-UNBOUND_D_PROTOCOL=mixed
+UNBOUND_D_WAN_FQDN=0
-UNBOUND_TXT_FWD_ZONE=""
-UNBOUND_TTL_MIN=120
+UNBOUND_IP_DNS64="64:ff9b::/96"
UNBOUND_N_EDNS_SIZE=1280
UNBOUND_N_FWD_PORTS=""
UNBOUND_N_RX_PORT=53
UNBOUND_N_ROOT_AGE=28
-##############################################################################
+UNBOUND_TTL_MIN=120
+
+UNBOUND_TXT_DOMAIN=lan
+UNBOUND_TXT_FWD_ZONE=""
+UNBOUND_TXT_HOSTNAME=thisrouter
-UNBOUND_ANCHOR=/usr/bin/unbound-anchor
-UNBOUND_CONTROL=/usr/bin/unbound-control
+##############################################################################
UNBOUND_LIBDIR=/usr/lib/unbound
+UNBOUND_VARDIR=/var/lib/unbound
UNBOUND_PIDFILE=/var/run/unbound.pid
-UNBOUND_VARDIR=/var/lib/unbound
+UNBOUND_SRV_CONF=$UNBOUND_VARDIR/unbound_srv.conf
+UNBOUND_EXT_CONF=$UNBOUND_VARDIR/unbound_ext.conf
UNBOUND_CONFFILE=$UNBOUND_VARDIR/unbound.conf
+
UNBOUND_KEYFILE=$UNBOUND_VARDIR/root.key
UNBOUND_HINTFILE=$UNBOUND_VARDIR/root.hints
UNBOUND_TIMEFILE=$UNBOUND_VARDIR/unbound.time
-UNBOUND_CHECKFILE=$UNBOUND_VARDIR/unbound.check
+
+##############################################################################
+
+UNBOUND_ANCHOR=/usr/sbin/unbound-anchor
+UNBOUND_CONTROL=/usr/sbin/unbound-control
+UNBOUND_CONTROL_CFG="$UNBOUND_CONTROL -c $UNBOUND_CONFFILE"
##############################################################################
##############################################################################
+create_interface_dns() {
+ local cfg="$1"
+ local ipcommand logint ignore ifname ifdashname
+ local name names address addresses
+ local ulaprefix if_fqdn host_fqdn mode mode_ptr
+
+ # Create local-data: references for this hosts interfaces (router).
+ config_get logint "$cfg" interface
+ config_get_bool ignore "$cfg" ignore 0
+ network_get_device ifname "$cfg"
+
+ ifdashname="${ifname//./-}"
+ ipcommand="ip -o address show $ifname"
+ addresses="$($ipcommand | awk '/inet/{sub(/\/.*/,"",$4); print $4}')"
+ ulaprefix="$(uci_get network @globals[0] ula_prefix)"
+ host_fqdn="$UNBOUND_TXT_HOSTNAME.$UNBOUND_TXT_DOMAIN"
+ if_fqdn="$ifdashname.$host_fqdn"
+
+
+ if [ "$ignore" -gt 0 ] ; then
+ mode="$UNBOUND_D_WAN_FQDN"
+
+ else
+ mode="$UNBOUND_D_LAN_FQDN"
+ fi
+
+
+ case "$mode" in
+ 3)
+ mode_ptr="$host_fqdn"
+ names="$host_fqdn $UNBOUND_TXT_HOSTNAME"
+ ;;
+
+ 4)
+ mode_ptr="$if_fqdn"
+ names="$if_fqdn $host_fqdn $UNBOUND_TXT_HOSTNAME"
+ ;;
+
+ *)
+ mode_ptr="$UNBOUND_TXT_HOSTNAME"
+ names="$UNBOUND_TXT_HOSTNAME"
+ ;;
+ esac
+
+
+ if [ "$mode" -gt 1 ] ; then
+ {
+ for address in $addresses ; do
+ case $address in
+ fe80:*|169.254.*)
+ echo " # note link address $address"
+ ;;
+
+ [1-9a-f]*:*[0-9a-f])
+ # GA and ULA IP6 for HOST IN AAA records (ip command is robust)
+ for name in $names ; do
+ echo " local-data: \"$name. 120 IN AAAA $address\""
+ done
+ echo " local-data-ptr: \"$address 120 $mode_ptr\""
+ ;;
+
+ [1-9]*.*[0-9])
+ # Old fashioned HOST IN A records
+ for name in $names ; do
+ echo " local-data: \"$name. 120 IN A $address\""
+ done
+ echo " local-data-ptr: \"$address 120 $mode_ptr\""
+ ;;
+ esac
+ done
+ echo
+ } >> $UNBOUND_CONFFILE
+
+ elif [ "$mode" -gt 0 ] ; then
+ {
+ for address in $addresses ; do
+ case $address in
+ fe80:*|169.254.*)
+ echo " # note link address $address"
+ ;;
+
+ "${ulaprefix%%:/*}"*)
+ # Only this networks ULA and only hostname
+ echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN AAAA $address\""
+ echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\""
+ ;;
+
+ [1-9]*.*[0-9])
+ echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN A $address\""
+ echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\""
+ ;;
+ esac
+ done
+ echo
+ } >> $UNBOUND_CONFFILE
+ fi
+}
+
+##############################################################################
+
create_access_control() {
local cfg="$1"
local subnets subnets4 subnets6
##############################################################################
unbound_mkdir() {
- mkdir -p $UNBOUND_VARDIR
- touch $UNBOUND_CONFFILE
+ local resolvsym=0
+ local dhcp_origin=$( uci get dhcp.@odhcpd[0].leasefile )
+ local dhcp_dir=$( dirname "$dhcp_origin" )
- if [ -f /etc/unbound/root.hints ] ; then
- # Your own local copy of root.hints
- cp -p /etc/unbound/root.hints $UNBOUND_HINTFILE
+ if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then
+ resolvsym=1
+ else
+ /etc/init.d/dnsmasq enabled || resolvsym=1
+ fi
- elif [ -f /usr/share/dns/root.hints ] ; then
- # Debian-like package dns-root-data
- cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE
- else
- logger -t unbound -s "iterator will use built-in root hints"
+ if [ "$resolvsym" -gt 0 ] ; then
+ rm -f /tmp/resolv.conf
+
+
+ {
+ # Set resolver file to local but not if /etc/init.d/dnsmasq will do it.
+ echo "nameserver 127.0.0.1"
+ echo "nameserver ::1"
+ echo "search $UNBOUND_TXT_DOMAIN"
+ } > /tmp/resolv.conf
+ fi
+
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a ! -d "$dhcp_dir" ] ; then
+ # make sure odhcpd has a directory to write (not done itself, yet)
+ mkdir -p "$dhcp_dir"
fi
- if [ -f /etc/unbound/root.key ] ; then
- # Your own local copy of a root.key
- cp -p /etc/unbound/root.key $UNBOUND_KEYFILE
+ mkdir -p $UNBOUND_VARDIR
+ rm -f $UNBOUND_VARDIR/dhcp_*
+ touch $UNBOUND_CONFFILE
+ touch $UNBOUND_SRV_CONF
+ touch $UNBOUND_EXT_CONF
+ cp -p /etc/unbound/* $UNBOUND_VARDIR/
- elif [ -f /usr/share/dns/root.key ] ; then
- # Debian-like package dns-root-data
- cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE
- elif [ -x "$UNBOUND_ANCHOR" ] ; then
- $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
+ if [ ! -f $UNBOUND_HINTFILE ] ; then
+ if [ -f /usr/share/dns/root.hints ] ; then
+ # Debian-like package dns-root-data
+ cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE
- else
- logger -t unbound -s "validator will use built-in trust anchor"
+ else
+ logger -t unbound -s "iterator will use built-in root hints"
+ fi
fi
-}
-##############################################################################
-unbound_conf() {
- local cfg=$1
- local rt_mem rt_conn modulestring
+ if [ ! -f $UNBOUND_KEYFILE ] ; then
+ if [ -f /usr/share/dns/root.key ] ; then
+ # Debian-like package dns-root-data
+ cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE
- {
- # Make fresh conf file
- echo "# $UNBOUND_CONFFILE generated by UCI $( date )"
- echo
- } > $UNBOUND_CONFFILE
+ elif [ -x "$UNBOUND_ANCHOR" ] ; then
+ $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
+
+ else
+ logger -t unbound -s "validator will use built-in trust anchor"
+ fi
+ fi
+
+
+ # Ensure access and prepare to jail
+ chown -R unbound:unbound $UNBOUND_VARDIR
+ chmod 775 $UNBOUND_VARDIR
+ chmod 664 $UNBOUND_VARDIR/*
+}
+##############################################################################
+unbound_control() {
if [ "$UNBOUND_B_CONTROL" -gt 0 ] ; then
{
# Enable remote control tool, but only at local host for security
+ # You can hand write fancier encrypted access with /etc/..._ext.conf
echo "remote-control:"
echo " control-enable: yes"
echo " control-use-cert: no"
echo " control-interface: ::1"
echo
} >> $UNBOUND_CONFFILE
-
- else
- {
- # "control:" clause is seperate before "server:" so we can append
- # dnsmasq "server:" parts and "forward:" cluases towards the end.
- echo "remote-control:"
- echo " control-enable: no"
- echo
- } >> $UNBOUND_CONFFILE
fi
+ {
+ # Amend your own extended clauses here like forward zones or disable
+ # above (local, no encryption) and amend your own remote encrypted control
+ echo
+ echo "include: $UNBOUND_EXT_CONF" >> $UNBOUND_CONFFILE
+ echo
+ } >> $UNBOUND_CONFFILE
+}
+
+##############################################################################
+
+unbound_conf() {
+ local cfg="$1"
+ local rt_mem rt_conn modulestring
+
+
+ {
+ # Make fresh conf file
+ echo "# $UNBOUND_CONFFILE generated by UCI $( date )"
+ echo
+ } > $UNBOUND_CONFFILE
+
+
{
# No threading
echo "server:"
fi
- # Domain Exceptions
+ # Except and accept domains as insecure (DNSSEC); work around broken domains
config_list_foreach "$cfg" "domain_insecure" create_domain_insecure
echo >> $UNBOUND_CONFFILE
+}
+##############################################################################
- ####################
- # UCI @ network #
- ####################
+unbound_access() {
+ # TODO: Unbound 1.6.0 added "tags" and "views", so we can add tags to
+ # each access-control IP block, and then divert access.
+ # -- "guest" WIFI will not be allowed to see local zone data
+ # -- "child" LAN can black whole a list of domains to http~deadpixel
if [ "$UNBOUND_B_LOCL_SERV" -gt 0 ] ; then
config_load network
config_foreach create_access_control interface
+
{
echo " access-control: 127.0.0.0/8 allow"
echo " access-control: ::1/128 allow"
echo
} >> $UNBOUND_CONFFILE
fi
+
+
+ {
+ # Amend your own "server:" stuff here
+ echo
+ echo "include: $UNBOUND_SRV_CONF"
+ echo
+ } >> $UNBOUND_CONFFILE
+}
+
+##############################################################################
+
+unbound_hostname() {
+ if [ -n "$UNBOUND_TXT_DOMAIN" ] ; then
+ {
+ # TODO: Unbound 1.6.0 added "tags" and "views" and we could make
+ # domains by interface to prevent DNS from "guest" to "home"
+ echo " local-zone: $UNBOUND_TXT_DOMAIN. $UNBOUND_D_DOMAIN_TYPE"
+ echo " domain-insecure: $UNBOUND_TXT_DOMAIN"
+ echo " private-domain: $UNBOUND_TXT_DOMAIN"
+ echo
+ echo " local-zone: $UNBOUND_TXT_HOSTNAME. $UNBOUND_D_DOMAIN_TYPE"
+ echo " domain-insecure: $UNBOUND_TXT_HOSTNAME"
+ echo " private-domain: $UNBOUND_TXT_HOSTNAME"
+ echo
+ } >> $UNBOUND_CONFFILE
+
+
+ case "$UNBOUND_D_DOMAIN_TYPE" in
+ deny|inform_deny|refuse|static)
+ {
+ # avoid upstream involvement in RFC6762 like responses (link only)
+ echo " local-zone: local. $UNBOUND_D_DOMAIN_TYPE"
+ echo " domain-insecure: local"
+ echo " private-domain: local"
+ echo
+ } >> $UNBOUND_CONFFILE
+ ;;
+ esac
+
+
+ if [ "$UNBOUND_D_LAN_FQDN" -gt 0 -o "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then
+ config_load dhcp
+ config_foreach create_interface_dns dhcp
+ fi
+ fi
}
##############################################################################
unbound_uci() {
- local cfg=$1
- local dnsmasqpath
-
- ####################
- # UCI @ unbound #
- ####################
-
- config_get_bool UNBOUND_B_DNS64 "$cfg" dns64 0
- config_get_bool UNBOUND_B_GATE_NAME "$cfg" dnsmasq_gate_name 0
- config_get_bool UNBOUND_B_DNSMASQ "$cfg" dnsmasq_link_dns 0
- config_get_bool UNBOUND_B_HIDE_BIND "$cfg" hide_binddata 1
- config_get_bool UNBOUND_B_LOCL_NAME "$cfg" dnsmasq_only_local 0
- config_get_bool UNBOUND_B_LOCL_SERV "$cfg" localservice 1
- config_get_bool UNBOUND_B_MAN_CONF "$cfg" manual_conf 0
- config_get_bool UNBOUND_B_QUERY_MIN "$cfg" query_minimize 0
- config_get_bool UNBOUND_B_QRY_MINST "$cfg" query_min_strict 0
- config_get_bool UNBOUND_B_PRIV_BLCK "$cfg" rebind_protection 1
- config_get_bool UNBOUND_B_LOCL_BLCK "$cfg" rebind_localhost 0
- config_get_bool UNBOUND_B_CONTROL "$cfg" unbound_control 0
- config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0
- config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1
+ local cfg="$1"
+ local dnsmasqpath hostnm
+
+ hostnm="$(uci_get system.@system[0].hostname | awk '{print tolower($0)}')"
+ UNBOUND_TXT_HOSTNAME=${hostnm:-thisrouter}
+
+ config_get_bool UNBOUND_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0
+ config_get_bool UNBOUND_B_DNS64 "$cfg" dns64 0
+ config_get_bool UNBOUND_B_HIDE_BIND "$cfg" hide_binddata 1
+ config_get_bool UNBOUND_B_LOCL_SERV "$cfg" localservice 1
+ config_get_bool UNBOUND_B_MAN_CONF "$cfg" manual_conf 0
+ config_get_bool UNBOUND_B_QUERY_MIN "$cfg" query_minimize 0
+ config_get_bool UNBOUND_B_QRY_MINST "$cfg" query_min_strict 0
+ config_get_bool UNBOUND_B_PRIV_BLCK "$cfg" rebind_protection 1
+ config_get_bool UNBOUND_B_LOCL_BLCK "$cfg" rebind_localhost 0
+ config_get_bool UNBOUND_B_CONTROL "$cfg" unbound_control 0
+ config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0
+ config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1
config_get UNBOUND_IP_DNS64 "$cfg" dns64_prefix "64:ff9b::/96"
config_get UNBOUND_N_RX_PORT "$cfg" listen_port 53
config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 7
- config_get UNBOUND_D_PROTOCOL "$cfg" protocol mixed
- config_get UNBOUND_D_RECURSION "$cfg" recursion passive
- config_get UNBOUND_D_RESOURCE "$cfg" resource small
+ config_get UNBOUND_D_DOMAIN_TYPE "$cfg" domain_type static
+ config_get UNBOUND_D_DHCP_LINK "$cfg" dhcp_link none
+ config_get UNBOUND_D_LAN_FQDN "$cfg" add_local_fqdn 0
+ config_get UNBOUND_D_PROTOCOL "$cfg" protocol mixed
+ config_get UNBOUND_D_RECURSION "$cfg" recursion passive
+ config_get UNBOUND_D_RESOURCE "$cfg" resource small
+ config_get UNBOUND_D_WAN_FQDN "$cfg" add_wan_fqdn 0
config_get UNBOUND_TTL_MIN "$cfg" ttl_min 120
+ config_get UNBOUND_TXT_DOMAIN "$cfg" domain lan
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
+ config_get_bool UNBOUND_B_DNSMASQ "$cfg" dnsmasq_link_dns 0
- if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then
- dnsmasqpath=$( which dnsmasq )
+
+ if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then
+ UNBOUND_D_DHCP_LINK=dnsmasq
+ logger -t unbound -s "Please use 'dhcp_link' selector instead"
+ fi
+ fi
- if [ ! -x "$dnsmasqpath" ] ; then
+ if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then
+ if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then
+ UNBOUND_D_DHCP_LINK=none
+ else
+ /etc/init.d/dnsmasq enabled || UNBOUND_D_DHCP_LINK=none
+ fi
+
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
logger -t unbound -s "cannot forward to dnsmasq"
- UNBOUND_B_DNSMASQ=0
+ fi
+ fi
+
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" ] ; then
+ if [ ! -x /usr/sbin/odhcpd -o ! -x /etc/init.d/odhcpd ] ; then
+ UNBOUND_D_DHCP_LINK=none
+ else
+ /etc/init.d/odhcpd enabled || UNBOUND_D_DHCP_LINK=none
+ fi
+
+
+ if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
+ logger -t unbound -s "cannot receive records from odhcpd"
fi
fi
# that could have had awful side effects
UNBOUND_TTL_MIN=300
fi
-
-
- if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then
- # Don't want this being triggered. Maybe we could, but then the
- # base conf you provide would need to be just right.
- UNBOUND_B_DNSMASQ=0
-
- else
- unbound_conf $cfg
- fi
}
##############################################################################
-unbound_own () {
- # Debug UCI
- {
- echo "# $UNBOUND_CHECKFILE generated by UCI $( date )"
- echo
- set | grep ^UNBOUND_
- } > $UNBOUND_CHECKFILE
+unbound_start() {
+ config_load unbound
+ config_foreach unbound_uci unbound
+ unbound_mkdir
- if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then
- # You are doing your own thing, so just copy /etc/ to /var/
- cp -p /etc/unbound/* $UNBOUND_VARDIR/
- fi
+ if [ "$UNBOUND_B_MAN_CONF" -eq 0 ] ; then
+ unbound_conf
+ unbound_access
+ if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then
+ dnsmasq_link
+ else
+ unbound_hostname
+ fi
- # Ensure access and prepare to jail
- chown -R unbound:unbound $UNBOUND_VARDIR
- chmod 775 $UNBOUND_VARDIR
- chmod 664 $UNBOUND_VARDIR/*
+ unbound_control
+ fi
}
##############################################################################
-unbound_prepare() {
- # Make a home for Unbound in /var/lib/unbound
- unbound_mkdir
+unbound_stop() {
+ local resolvsym=0
- # Load up the chunks of UCI
- config_load unbound
- config_foreach unbound_uci unbound
+ rootzone_update
+
+
+ if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then
+ resolvsym=1
+ else
+ /etc/init.d/dnsmasq enabled || resolvsym=1
+ fi
+
+
+ if [ "$resolvsym" -gt 0 ] ; then
+ # set resolver file to normal, but don't stomp on dnsmasq
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ fi
- # Unbound primary DNS, and dnsmasq side service DHCP-DNS (dnsmasq.sh)
- dnsmasq_link
- # Unbound needs chroot ownership
- unbound_own
+ # Unbound has a log dump which takes time; don't overlap a "restart"
+ sleep 1
}
##############################################################################
config unbound
+ option add_local_fqdn '1'
+ option add_wan_fqdn '0'
+ option dhcp_link 'none'
+ option dhcp4_slaac6 '0'
option dns64 '0'
option dns64_prefix '64:ff9b::/96'
- option dnsmasq_gate_name '0'
- option dnsmasq_link_dns '0'
- option dnsmasq_only_local '0'
+ option domain 'lan'
+ option domain_type 'static'
option edns_size '1280'
option hide_binddata '1'
option listen_port '53'
--- /dev/null
+##############################################################################
+# UNBOUND UCI USER ADDED CLAUSES
+#
+# Put your own forward:, view:, stub:, and control: clauses here. This file is
+# appended to the end of UCI auto generated 'unbound.conf'. This is done with
+# include: statement. Notice, it is outside of the server: clause.
+##############################################################################
+
--- /dev/null
+##############################################################################
+# UNBOUND UCI USER ADDED SERVER OPTIONS
+#
+# Put your own choice options here when not covered by UCI. These are all part
+# of the server: clause only. Most likely are hardening options or local-zone:
+# This is in an include: statement towards the end of the server: cluase.
+##############################################################################
+
include $(TOPDIR)/rules.mk
PKG_NAME:=vallumd
-PKG_VERSION:=0.1.1
+PKG_VERSION:=0.1.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/stintel/vallumd/archive/$(PKG_VERSION)/
-PKG_MD5SUM:=86001a781df58af2db6c71160a281ac1f4e16c3048ad17e7cee83d959c563277
+PKG_MD5SUM:=d48df2ca8043d4eec4787bec2bba5dbb87d7a8325ac3b136c05dcd1a48d81ae4
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@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:=wakeonlan
+PKG_VERSION:=0.41
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
+PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/w/wakeonlan/
+PKG_MD5SUM:=581b1b27a7e810ab72668cce4bd9aa9b3e0cea34b2db24dd1a44c09d63ddda98
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=Artistic-1.0-Perl
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wakeonlan
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Sends 'magic packets' to wake-on-LAN enabled ethernet adapters
+ URL:=http://gsd.di.uminho.pt/jpo/software/wakeonlan/
+ DEPENDS:=+perl +perlbase-getopt +perlbase-net +perlbase-socket
+endef
+
+define Package/wakeonlan/description
+ With this package you can remotely wake up and power on machines which have
+ motherboards or network cards that support 'Wake-on-Lan' packets.
+ .
+ The tool allows you to wake up a single machine, or a group of machines.
+ .
+ You need the MAC addresses of machines to construct the WOL packets, but,
+ in contrast to 'etherwake', you do not need root privileges to use the
+ program itself as UDP packets are used.
+endef
+
+define Build/Compile
+endef
+
+define Package/wakeonlan/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wakeonlan $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,wakeonlan))
include $(TOPDIR)/rules.mk
PKG_NAME:=pulseaudio
-PKG_VERSION:=9.0
+PKG_VERSION:=10.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
-PKG_MD5SUM:=da7162541b3a9bc20576dbd0d7d1489a
+PKG_HASH:=a3186824de9f0d2095ded5d0d0db0405dc73133983c2fbb37291547e37462f57
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=GPL LICENSE
define Package/pulseaudio-daemon
$(call Package/pulseaudio/Default)
- DEPENDS+= +libjson-c
endef
define Package/pulseaudio/Default/description
PKG_NAME:=coreutils
PKG_VERSION:=8.23
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/coreutils
DEPENDS_expr = +libgmp
DEPENDS_factor = +libgmp
DEPENDS_cp = +libacl
-DEPENDS_dir = +libacl
+DEPENDS_dir = +libacl +libcap
DEPENDS_install = +libacl
-DEPENDS_ls = +libacl
+DEPENDS_ls = +libacl +libcap
DEPENDS_mv = +libacl
-DEPENDS_vdir = +libacl
+DEPENDS_vdir = +libacl +libcap
define Package/coreutils/Default
SECTION:=utils
include $(TOPDIR)/rules.mk
PKG_NAME:=flent-tools
-PKG_VERSION:=0.15.0
+PKG_VERSION:=1.0.1
PKG_LICENSE:=GPLv3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tohojo/flent
-PKG_REV:=fd4c41cf4667fb5203e41e7eaa805ae54820218b
+PKG_REV:=03c72cc340def354024351b6500774b11170d5ba
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
include $(TOPDIR)/rules.mk
PKG_NAME:=gpsd
-PKG_VERSION:=3.15
-PKG_RELEASE:=2
+PKG_VERSION:=3.16
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
-PKG_MD5SUM:=afd79b87337fadf38ee2a7c4314dac79
+PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
+PKG_MD5SUM:=68691b5de4c94f82ec4062b042b5eb63
PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
PKG_LICENSE:=BSD-3-Clause
include $(INCLUDE_DIR)/scons.mk
define Package/gpsd/Default
- DEPENDS:=+librt +libncurses
+ DEPENDS+= +libusb-1.0
URL:=http://catb.org/gpsd/
endef
define Package/gpsd
$(call Package/gpsd/Default)
- SECTION:=net
- CATEGORY:=Network
- DEPENDS+= +libgps +libusb-1.0
+ SECTION:=utils
+ CATEGORY:=Utilities
TITLE:=An interface daemon for GPS receivers
endef
define Package/gpsd-clients
$(call Package/gpsd/Default)
- SECTION:=net
- CATEGORY:=Network
- DEPENDS+= +libgps +libncurses +libusb-1.0
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS+= +libncurses
TITLE:=GPS tools and clients
endef
$(call Package/gpsd/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS+= +libcap
TITLE:=C service library for communicating with the GPS daemon
endef
$(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
- $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
- $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
endef
-config gpsd core
- option device "/dev/ttyUSB0"
- option port "2947"
- option listen_globally "false"
- option enabled "false"
+config gpsd 'core'
+ option enabled '0'
+ option device '/dev/ttyUSB0'
+ option port '2947'
+ option listen_globally '0'
+++ /dev/null
-case "$ACTION" in
- add)
- # start process
- # only pl2303 devices are handled
- if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then
- sleep 3 && /etc/init.d/gpsd start
- fi
- ;;
- remove)
- # stop process
- # only pl2303 devices are handled
- if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then
- /etc/init.d/gpsd stop
- fi
- ;;
-esac
# Copyright (C) 2009-2011 OpenWrt.org
START=50
+USE_PROCD=1
+PROG=/usr/sbin/gpsd
NAME=gpsd
-PIDF=/var/run/$NAME.pid
-PROG=/usr/sbin/$NAME
-
-start() {
- config_load gpsd
- config_get device core device
- config_get port core port
- config_get_bool listen_globally core listen_globally
- config_get_bool enabled core enabled
- [ "$enabled" != "1" ] && exit
- logger -t "$NAME" "Starting..."
- [ ! -c "$device" ] && {
- logger -t "$NAME" "Unable to find device $device. Exiting."
- exit 1
- }
- [ "$listen_globally" != "0" ] && append args "-G"
- $PROG -n -P $PIDF -S $port $args $device
+
+validate_section_gpsd()
+{
+ uci_validate_section gpsd gpsd "${1}" \
+ 'enable:bool:1' \
+ 'device:string' \
+ 'listen_globally:bool:0' \
+ 'port:port:2947'
+}
+
+gpsd_instance()
+{
+ local device enable listen_globally port
+
+ validate_section_gpsd "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+
+ procd_open_instance
+ procd_set_param command "$PROG" -N -n
+
+ [ "${listen_globally}" -ne 0 ] && procd_append_param command -G
+ procd_append_param command -S "${port}"
+ procd_append_param command "${device}"
+ procd_set_param respawn
+
+ procd_close_instance
}
-stop() {
- logger -t "$NAME" "Stopping..."
- [ -f "$PIDF" ] && {
- read PID < "$PIDF"
- kill -9 $PID
- rm $PIDF
- }
+start_service()
+{
+ config_load "${NAME}"
+ config_foreach gpsd_instance gpsd
}
+++ /dev/null
-From 95c99f69e026e8c57aecba545e51c97f3b284e75 Mon Sep 17 00:00:00 2001
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Tue, 23 Jun 2015 14:36:26 -0700
-Subject: [PATCH] Remove a BSD-ism.
-
-CTRL('L') is a BSD-ism. CTRL() is defined in sys/ttydefaults.h
-which does not always exist. Instead of adding scons tests for
-needing CTRL() and its include files just replace with a simple
-constant.
-
-Needed for musl and found by Baruch Siach <baruch@tkos.co.il>
----
- gpsmon.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gpsmon.c b/gpsmon.c
-index c3001c8..58c8300 100644
---- a/gpsmon.c
-+++ b/gpsmon.c
-@@ -583,6 +583,9 @@ static void select_packet_monitor(struct gps_device_t *device)
- (void)wnoutrefresh(devicewin);
- }
-
-+/* Control-L character */
-+#define CTRL_L 0x0C
-+
- static char *curses_get_command(void)
- /* char-by-char nonblocking input, return accumulated command line on \n */
- {
-@@ -591,7 +594,8 @@ static char *curses_get_command(void)
- int c;
-
- c = wgetch(cmdwin);
-- if (c == CTRL('L')) {
-+ if (CTRL_L == c) {
-+ /* ^L is to repaint the screen */
- (void)clearok(stdscr, true);
- if (active != NULL && (*active)->initialize != NULL)
- (void)(*active)->initialize();
---
-2.6.0
-
--- /dev/null
+Index: gpsd-3.16/SConstruct
+===================================================================
+--- gpsd-3.16.orig/SConstruct
++++ gpsd-3.16/SConstruct
+@@ -543,6 +543,10 @@ else:
+ ncurseslibs = pkg_config('ncurses')
+ if config.CheckPKG('tinfo'):
+ ncurseslibs += pkg_config('tinfo')
++ elif WhereIs('ncurses6-config'):
++ ncurseslibs = ['!ncurses6-config --libs --cflags']
++ elif WhereIs('ncursesw6-config'):
++ ncurseslibs = ['!ncursesw6-config --libs --cflags']
+ elif WhereIs('ncurses5-config'):
+ ncurseslibs = ['!ncurses5-config --libs --cflags']
+ elif WhereIs('ncursesw5-config'):
--- /dev/null
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@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:=progress
+PKG_VERSION:=0.13.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/Xfennec/progress.git
+PKG_SOURCE_VERSION:=f6894b827c638af5cf8c5c622e66491c179ba2eb
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/progress
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Coreutils Progress Viewer (formerly known as 'cv')
+ URL:=https://github.com/Xfennec/progress
+ DEPENDS:=+libncursesw
+endef
+
+define Package/progress/description
+ This tool can be described as a Tiny, Dirty, Linux-and-OSX-Only
+ C command that looks for coreutils basic commands (cp, mv, dd, tar,
+ gzip/gunzip, cat, etc.) currently running on your system and
+ displays the percentage of copied data. It can also show estimated
+ time and throughput, and provide a "top-like" mode (monitoring).
+ .
+ It simply scans `/proc` for interesting commands, and then looks at
+ directories `fd` and `fdinfo` to find opened files and seek positions,
+ and reports status for the largest file.
+ .
+ It's very light, and compatible with virtually any command.
+ This program was formerly known as 'cv' on github.
+endef
+
+define Package/progress/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/progress $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,progress))
--- /dev/null
+--- a/Makefile 2016-11-26 01:24:23.392903433 -0800
++++ b/Makefile 2016-11-26 01:24:41.084939184 -0800
+@@ -1,19 +1,6 @@
+ OBJ = progress
+ override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
+-override LDFLAGS += -lm
+-UNAME := $(shell uname)
+-ifeq ($(UNAME), Linux)
+- ifeq (, $(shell which pkg-config 2> /dev/null))
+- $(error "pkg-config command not found")
+- endif
+- ifeq (, $(shell pkg-config ncurses --libs 2> /dev/null))
+- $(error "ncurses package not found")
+- endif
+- override LDFLAGS += $(shell pkg-config ncurses --libs)
+-endif
+-ifeq ($(UNAME), Darwin)
+- override LDFLAGS += -lncurses
+-endif
++override LDFLAGS += -lm -lncursesw
+ PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/share/man/man1
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=unzip
PKG_REV:=60
PKG_VERSION:=6.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
PKG_SOURCE_URL:=@SF/infozip
--- /dev/null
+From: "Steven M. Schweda" <sms@antinode.info>
+Subject: Fix CVE-2014-9913, buffer overflow in unzip
+Bug: https://sourceforge.net/p/infozip/bugs/27/
+Bug-Debian: https://bugs.debian.org/847485
+Bug-Ubuntu: https://launchpad.net/bugs/387350
+X-Debian-version: 6.0-21
+
+--- a/list.c
++++ b/list.c
+@@ -339,7 +339,18 @@ int list_files(__G) /* return PK-type
+ G.crec.compression_method == ENHDEFLATED) {
+ methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3];
+ } else if (methnum >= NUM_METHODS) {
+- sprintf(&methbuf[4], "%03u", G.crec.compression_method);
++ /* 2013-02-26 SMS.
++ * http://sourceforge.net/p/infozip/bugs/27/ CVE-2014-9913.
++ * Unexpectedly large compression methods overflow
++ * &methbuf[]. Use the old, three-digit decimal format
++ * for values which fit. Otherwise, sacrifice the
++ * colon, and use four-digit hexadecimal.
++ */
++ if (G.crec.compression_method <= 999) {
++ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method);
++ } else {
++ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method);
++ }
+ }
+
+ #if 0 /* GRR/Euro: add this? */
--- /dev/null
+From: "Steven M. Schweda" <sms@antinode.info>
+Subject: Fix CVE-2016-9844, buffer overflow in zipinfo
+Bug-Debian: https://bugs.debian.org/847486
+Bug-Ubuntu: https://launchpad.net/bugs/1643750
+X-Debian-version: 6.0-21
+
+--- a/zipinfo.c
++++ b/zipinfo.c
+@@ -1921,7 +1921,18 @@ static int zi_short(__G) /* return PK-
+ ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3);
+ methbuf[3] = dtype[dnum];
+ } else if (methnum >= NUM_METHODS) { /* unknown */
+- sprintf(&methbuf[1], "%03u", G.crec.compression_method);
++ /* 2016-12-05 SMS.
++ * https://launchpad.net/bugs/1643750
++ * Unexpectedly large compression methods overflow
++ * &methbuf[]. Use the old, three-digit decimal format
++ * for values which fit. Otherwise, sacrifice the "u",
++ * and use four-digit hexadecimal.
++ */
++ if (G.crec.compression_method <= 999) {
++ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method);
++ } else {
++ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method);
++ }
+ }
+
+ for (k = 0; k < 15; ++k)