Merge pull request #16194 from miska/snort3-master
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Tue, 3 Aug 2021 10:02:03 +0000 (12:02 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Aug 2021 10:02:03 +0000 (12:02 +0200)
net/snort3: Include default configs and snort2lua

186 files changed:
admin/muninlite/Makefile
devel/gitlab-runner/Makefile
lang/lua-curl-v3/Makefile [new file with mode: 0644]
lang/node/Makefile
lang/node/patches/003-path.patch
lang/perl-net-dns/Makefile
lang/php7/Makefile
lang/php8/Makefile
lang/php8/test.sh [new file with mode: 0644]
lang/python/Flask/Makefile
lang/python/Jinja2/Makefile
lang/python/MarkupSafe/Makefile
lang/python/Werkzeug/Makefile
lang/python/click/Makefile
lang/python/host-pip-requirements/Cython.txt
lang/python/itsdangerous/Makefile
lang/python/numpy/Makefile
lang/python/pyodbc/Makefile
lang/python/python-apipkg/Makefile
lang/python/python-atomicwrites/Makefile
lang/python/python-augeas/Makefile
lang/python/python-bidict/Makefile
lang/python/python-dateutil/Makefile
lang/python/python-engineio/Makefile
lang/python/python-eventlet/Makefile
lang/python/python-execnet/Makefile
lang/python/python-flask-httpauth/Makefile
lang/python/python-flask-login/Makefile
lang/python/python-flask-socketio/Makefile
lang/python/python-greenlet/Makefile
lang/python/python-iniconfig/Makefile
lang/python/python-more-itertools/Makefile
lang/python/python-msgpack/Makefile
lang/python/python-packaging/Makefile
lang/python/python-pluggy/Makefile
lang/python/python-psutil/Makefile
lang/python/python-py/Makefile
lang/python/python-pyparsing/Makefile
lang/python/python-pysocks/Makefile
lang/python/python-pytest-forked/Makefile
lang/python/python-pytest-xdist/Makefile
lang/python/python-pytest/Makefile
lang/python/python-requests/Makefile
lang/python/python-requests/patches/0001-idna-dependency-bump.patch [deleted file]
lang/python/python-requests/patches/0002-idna-dependency-bump.patch [deleted file]
lang/python/python-socketio/Makefile
lang/python/python-toml/Makefile
lang/python/python-typing-extensions/Makefile
lang/python/python-wcwidth/Makefile
lang/python/python-zipp/Makefile
lang/python/python3-maxminddb/Makefile
libs/alsa-lib/Makefile
libs/alsa-ucm-conf/Makefile
libs/cyrus-sasl/Makefile
libs/czmq/Makefile
libs/gpgme/Makefile
libs/jsoncpp/Makefile
libs/libinput/Makefile
libs/libksba/Makefile
libs/libmaxminddb/Makefile
libs/libndpi/Makefile
libs/librouteros/Makefile
libs/librouteros/patches/010-no-doc.patch [new file with mode: 0644]
libs/libudev-zero/Makefile
libs/libyaml-cpp/Makefile
libs/lmdb/Makefile
libs/openblas/Makefile [new file with mode: 0644]
libs/p11-kit/Makefile
libs/p11-kit/patches/010-stdint.patch [deleted file]
libs/pcre2/Makefile
libs/postgresql/Makefile
libs/redis/Makefile
net/adblock/Makefile
net/adblock/files/adblock.sh
net/atlas-probe/Makefile
net/atlas-sw-probe/Makefile
net/curl/Config.in
net/dawn/Makefile
net/dnsproxy/Makefile
net/dnsproxy/files/dnsproxy.config [new file with mode: 0644]
net/dnsproxy/files/dnsproxy.init [new file with mode: 0644]
net/dnstap/Makefile
net/gateway-go/Makefile
net/git-lfs/Makefile
net/hs20/Makefile
net/https-dns-proxy/Makefile
net/https-dns-proxy/files/https-dns-proxy.hotplug.iface [new file with mode: 0644]
net/https-dns-proxy/files/https-dns-proxy.init
net/iperf/Makefile
net/iperf/patches/0003-fix-non-ipv6-builds.patch [deleted file]
net/iperf/patches/010-libcxx.patch [deleted file]
net/iperf/patches/020-math.patch [deleted file]
net/irssi/Makefile
net/irssi/test.sh [new file with mode: 0644]
net/knot-resolver/Makefile
net/lksctp-tools/Makefile
net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch [deleted file]
net/nextdns/Makefile
net/onionshare-cli/Makefile
net/ooniprobe/Makefile
net/opentracker/Makefile
net/opentracker/patches/100-makefile.patch
net/openvswitch/Config.in [new file with mode: 0644]
net/openvswitch/Makefile
net/openvswitch/README.md
net/openvswitch/files/openvswitch.config
net/openvswitch/files/openvswitch.init
net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
net/openvswitch/patches/0004-build-trim-build.patch
net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch
net/pdns/Makefile
net/pdns/files/pdns.conf-dist
net/pdns/patches/010-time_t-check.patch [new file with mode: 0644]
net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch
net/simple-adblock/Makefile
net/simple-adblock/files/simple-adblock.init
net/sshfs/Makefile
net/tailscale/Makefile
net/tor-hs/Makefile
net/torsocks/Makefile
net/transmission/Makefile
net/transmission/patches/001-apply-dscp-to-udp-sockets.patch [new file with mode: 0644]
net/travelmate/Makefile
net/travelmate/files/chs-hotel.login
net/travelmate/files/db-bahn.login
net/travelmate/files/generic-user-pass.login
net/travelmate/files/h-hotels.login
net/travelmate/files/julianahoeve.login [new file with mode: 0755]
net/travelmate/files/telekom.login [new file with mode: 0755]
net/travelmate/files/travelmate.init
net/travelmate/files/travelmate.mail
net/travelmate/files/travelmate.sh
net/travelmate/files/travelmate.vpn
net/travelmate/files/travelmate_ntp.hotplug
net/travelmate/files/vodafone.login [new file with mode: 0755]
net/travelmate/files/wifionice.login
net/vpn-policy-routing/Makefile
net/vpn-policy-routing/files/vpn-policy-routing.aws.user
net/vpn-policy-routing/files/vpn-policy-routing.conf [deleted file]
net/vpn-policy-routing/files/vpn-policy-routing.config [new file with mode: 0644]
net/vpn-policy-routing/files/vpn-policy-routing.init
net/vpn-policy-routing/files/vpn-policy-routing.netflix.user
sound/alsa-utils/Makefile
utils/augeas/Makefile
utils/bash/Makefile
utils/bash/patches/101-bash51-001.patch [deleted file]
utils/bash/patches/102-bash51-002.patch [deleted file]
utils/bash/patches/103-bash51-003.patch [deleted file]
utils/bash/patches/104-bash51-004.patch [deleted file]
utils/bluez/Makefile
utils/bluez/patches/201-readline.patch
utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch
utils/canutils/Makefile
utils/ccid/Makefile
utils/checksec/Makefile
utils/clocate/Makefile [new file with mode: 0644]
utils/cryptsetup/Makefile
utils/ctop/Makefile
utils/fish/Makefile
utils/gptfdisk/Makefile
utils/i2c-tools/Makefile
utils/minicom/Makefile
utils/minicom/patches/100-fix_iconv_include.patch [deleted file]
utils/minicom/patches/101-fix_music_includes.patch [deleted file]
utils/minicom/patches/102-fix_musl_compatibility.patch [deleted file]
utils/minicom/patches/110-reproducible-builds.patch
utils/minicom/patches/200-gcc10.patch [deleted file]
utils/ncdu/Makefile
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
utils/rrdtool1/Makefile
utils/rrdtool1/patches/050-no-doc.patch [new file with mode: 0644]
utils/spi-tools/Makefile
utils/squashfs-tools/Makefile
utils/squashfs-tools/patches/010-gcc10.patch [deleted file]
utils/ssdeep/Makefile
utils/triggerhappy/Makefile
utils/uvol/Makefile
utils/uvol/files/common.sh [new file with mode: 0644]
utils/uvol/files/lvm.sh
utils/uvol/files/ubi.sh
utils/uvol/files/uvol.init
utils/yara/Makefile
utils/yara/patches/010-openssl.patch [deleted file]
utils/ykclient/Makefile
utils/yq/Makefile

index f02a1083addde29689b227302c2c1595d62207b4..d7f0918b47db3fc2f3ddc2fba6127d8bdb85406e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=muninlite
-PKG_VERSION:=2.1.1
+PKG_VERSION:=2.1.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/munin-monitoring/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
-PKG_HASH:=427295fe29ac9a7d99d31aa98f3d5dfd382b7e131d0e1193899d54487ca589af
+PKG_HASH:=5a49da30944f3b85a0030b661a27e84c06c7f640050802e799304b11cc635ffc
 
 PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
index 1d572aa5d667a6dfb7a2c62ff886dddaedacd648..e9cc886e97dbdfae54eb8b276bed9fc08d96c482 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gitlab-runner
-PKG_VERSION:=13.12.0
-PKG_RELEASE:=1
+PKG_VERSION:=14.0.1
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$(PKG_VERSION)
-PKG_HASH:=5cf7c2af3a3682f1044ef374dfe7f014febba6e5a53fa442b7f114b10811831e
+PKG_HASH:=22fe41816bb288c6f6513214f0d1d68d33d298aeaa9cd3a4f0a8393e6b20415f
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
diff --git a/lang/lua-curl-v3/Makefile b/lang/lua-curl-v3/Makefile
new file mode 100644 (file)
index 0000000..5855b61
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2021 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:=lua-curl-v3
+PKG_VERSION:=0.3.13-snapshot
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE_URL:=https://github.com/Lua-cURL/Lua-cURLv3.git
+PKG_MIRROR_HASH:=84a12b287cafc984df3e58b438b2b2d1092054e002144f225dee1c2efb18c8d3
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9f8b6dba8b5ef1b26309a571ae75cda4034279e5
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-curl-v3
+    SUBMENU:=Lua
+    SECTION:=lang
+    CATEGORY:=Languages
+    TITLE:=Lua-curl
+    DEPENDS:=+libcurl +lua
+    MAINTAINER:=Rainer Poisel <rainer.poisel@gmail.com>
+endef
+
+define Package/lua-curl-v3/description
+       Lua bindings to libcurl (Lua-cURLv3)
+endef
+
+define Package/lua-curl-v3/install
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lcurl.so $(1)/usr/lib/lua
+       $(CP) $(PKG_BUILD_DIR)/src/lua/* $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-curl-v3))
+
index 9b86e7aef030a1e400cb13dc8f2ffd4c172a2d4e..660ed31c174c30fcf90443a3dbdc329539c725c9 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v14.17.1
+PKG_VERSION:=v14.17.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
-PKG_HASH:=ddf1d2d56ddf35ecd98c5ea5ddcd690b245899f289559b4330c921255f5a247f
+PKG_HASH:=ae7bf4e784f8c8027ffa1e3757f37d2bd5925d0c48988c4d7f07e4515853cf2c
 
 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>, Adrian Panella <ianchi74@outlook.com>
 PKG_LICENSE:=MIT
index 8110a4a4679c115a85f08caf34d89a130dc456a0..2572c5f9cd0fe9f9039dfe23fb223966969600c7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/internal/modules/cjs/loader.js
 +++ b/lib/internal/modules/cjs/loader.js
-@@ -1202,7 +1202,8 @@ Module._initPaths = function() {
+@@ -1189,7 +1189,8 @@ Module._initPaths = function() {
      path.resolve(process.execPath, '..') :
      path.resolve(process.execPath, '..', '..');
  
index a91db7322bb86c3ace328159103e0603a3503458..0871602c9a53b2ffc83b19292b0308770009e39c 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-net-dns
-PKG_VERSION:=1.30
+PKG_VERSION:=1.32
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_NAME:=Net-DNS
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.net-dns.org/download
-PKG_HASH:=055e70b67255615724d91ec41788f75af317561c519971f6e6e384273b30a5da
+PKG_HASH:=b890a7b44d573f27cc713caadf1e12eaaa4478a6504d1157194df614316b5b50
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
 
index b525f4db4b9be26e40e1b50097aa8227ccc4da76..4b1667897a62abb4967999e7941df135e8c752dc 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.4.21
+PKG_VERSION:=7.4.22
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=cf43384a7806241bc2ff22022619baa4abb9710f12ec1656d0173de992e32a90
+PKG_HASH:=8e078cd7d2f49ac3fcff902490a5bb1addc885e7e3b0d8dd068f42c68297bde8
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
index 2907a9941defb8353f88229b0fc2fe25f00dbb0d..ff3e112fd9f7a30f4ac158d2d796359864ccd62d 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=8.0.8
+PKG_VERSION:=8.0.9
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=dc1668d324232dec1d05175ec752dade92d29bb3004275118bc3f7fc7cbfbb1c
+PKG_HASH:=71a01b2b56544e20e28696ad5b366e431a0984eaa39aa5e35426a4843e172010
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
diff --git a/lang/php8/test.sh b/lang/php8/test.sh
new file mode 100644 (file)
index 0000000..7b2de6e
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+case "$1" in
+       php8-cgi)
+               php8-cgi -v | grep "$2"
+               ;;
+       php8-cli)
+               php8-cli -v | grep "$2"
+               ;;
+       php8-fpm)
+               php8-fpm -v | grep "$2"
+               ;;
+       php8-mod-*)
+               PHP_MOD="${1#php8-mod-}"
+               PHP_MOD="${PHP_MOD//-/_}"
+
+               opkg install php8-cli
+
+               php8-cli -m | grep -i "$PHP_MOD"
+               ;;
+       *)
+               ;;
+esac
index 82c0b1c01369539f203e6f3b0bad8632b4c59aac..4b5aa476ffbc65fc1cc7d73cb19ad517fe036a6b 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Flask
-PKG_VERSION:=1.1.2
+PKG_VERSION:=2.0.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060
+PKG_HASH:=1c4c257b1892aec1398784c63791cbaa43062f1f7aeb555c4da961b20ee68f55
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index a3bc52c83be09b859546223ffa727543b19fc7c0..0ee931e9948b28a71628cc3bd1af38d684f5328a 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Jinja2
-PKG_VERSION:=2.11.3
+PKG_VERSION:=3.0.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6
+PKG_HASH:=703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index cd9518545550ef270aacdbd1382a2605e759533c..9b18d857a042caddbd676e914f9372b3ff7a9390 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=MarkupSafe
-PKG_VERSION:=1.1.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=$(AUTORELEASE)
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b
+PKG_HASH:=594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index 1d2951f6460d3361d6e71fd4f997d478d77d74e3..252c2d35de15bddfc83c784bce6a3c8367fdc0f4 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Werkzeug
-PKG_VERSION:=1.0.1
+PKG_VERSION:=2.0.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c
+PKG_HASH:=1de1db30d010ff1af14a009224ec49ab2329ad2cde454c8a708130642d579c42
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index 97c6307bf16998eb740b112272a7417933016d5e..004973f3a5f0101c4fa411dc66794adddd3385c5 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=click
-PKG_VERSION:=7.1.2
+PKG_VERSION:=8.0.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=click
-PKG_HASH:=d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a
+PKG_HASH:=8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index fb7a7f4726ee8e98725ff2b1254ee7770743e009..bf3e501140f758cab1ea84e2f797c9ff2d04d8a6 100644 (file)
@@ -1 +1 @@
-Cython==0.29.21 --hash=sha256:e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad
+Cython==0.29.23 --hash=sha256:6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e
index 65d49d5d5030d1bac9848af1d0c94483677f02de..423d80adcfae79258bd383e6510e63cb058e1d9f 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=itsdangerous
-PKG_VERSION:=1.1.0
-PKG_RELEASE:=3
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=$(AUTORELEASE)
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19
+PKG_HASH:=9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index 6b417a775cfeacd303c31846d5e114d0fe7dc586..f3b38a819dea503b57da99e5a0d7c216c9a29a86 100644 (file)
@@ -6,11 +6,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=numpy
-PKG_VERSION:=1.20.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.21.1
+PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee
+PKG_HASH:=dff4af63638afcc57a3dfb9e4b26d434a7a602d225b42d746ea7fe2edf1342fd
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
@@ -18,6 +18,9 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_CPE_ID:=cpe:/a:numpy:numpy
 
+PKG_CONFIG_DEPENDS:= \
+        CONFIG_NUMPY_OPENBLAS_SUPPORT
+
 # yes, zip... sigh
 PYPI_SOURCE_EXT:=zip
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython
@@ -32,7 +35,38 @@ define Package/python3-numpy
   CATEGORY:=Languages
   TITLE:=The fundamental package for scientific computing with Python
   URL:=https://www.numpy.org/
-  DEPENDS:=@!SOFT_FLOAT +INSTALL_GFORTRAN:libgfortran +python3
+  DEPENDS:=@!SOFT_FLOAT +INSTALL_GFORTRAN:libgfortran +python3 \
+          +NUMPY_OPENBLAS_SUPPORT:openblas
+endef
+
+# We need to duplicate the omitted arhitectures same as openblas
+define Package/python3-numpy/config
+menu "Configuration"
+depends on !powerpc
+depends on !arc
+
+config NUMPY_OPENBLAS_SUPPORT
+        bool "Enable OpenBLAS support"
+        default n
+
+endmenu
+endef
+
+ifdef CONFIG_NUMPY_OPENBLAS_SUPPORT
+define Build/Prepare/numpy-sitecfg
+       echo "[DEFAULT]"                                 >  $(PKG_BUILD_DIR)/site.cfg
+       echo "library_dirs = $(STAGING_DIR)/usr/lib"     >> $(PKG_BUILD_DIR)/site.cfg
+       echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(PKG_BUILD_DIR)/site.cfg
+       echo                                             >> $(PKG_BUILD_DIR)/site.cfg
+       echo "[openblas]"                                >> $(PKG_BUILD_DIR)/site.cfg
+       echo "libraries = openblas"                      >> $(PKG_BUILD_DIR)/site.cfg
+       echo "runtime_library_dirs = /usr/lib"           >> $(PKG_BUILD_DIR)/site.cfg
+endef
+endif
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(call Build/Prepare/numpy-sitecfg)
 endef
 
 define Package/python3-numpy/description
index c554015c8e8cd33e9e3cf26f8f14161f0cdcc4df..047c6c6b29b214c2cc00e6a1ab53660f930b99e6 100644 (file)
@@ -5,11 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.30
+PKG_VERSION:=4.0.31
 PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=852b5deeeb3366af8b4408efed993501708be45d221881bce60c9aac54be726a
+PKG_HASH:=89256e79d23415887cacf0a821f9f94baa5d833080521d456687d5e88c40c226
 PKG_BUILD_DEPENDS:=python3 unixodbc
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
index ee2e05d9d20e825f450b3c0c2d77703955c736ce..2e905a8932190d5fc5cb9dfdba0f903110227d1c 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PYPI_NAME:=apipkg
 PKG_HASH:=37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index e29d0ec7d25d681163a5d2d35a5b16430fab5610..0a9481a400eb459755cb6d08881b0121c8a53353 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=atomicwrites
 PKG_HASH:=ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 09f8fdcf027db15b8175447a1e15a0c9b46a4733..dab2d5e91e50ec2c108c11d1757d1e9484cd4c0c 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=python-augeas
 PKG_HASH:=5194a49e86b40ffc57055f73d833f87e39dce6fce934683e7d0d5bbb8eff3b8c
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
index 78066a53a8a83de8498a6421088dfb84f45af52f..b6735b82fa7289eecfd1960024b8aff7f44bfa14 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=bidict
 PKG_HASH:=4fa46f7ff96dc244abfc437383d987404ae861df797e2fd5b190e233c302be09
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index 7c8de816788d3b648d87a44233fb2b31735ad933..394a307b6fd29708b2ea5b3722e2e34db27a5142 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dateutil
-PKG_VERSION:=2.8.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.8.2
+PKG_RELEASE:=1
 PKG_LICENSE:=BSD-2-Clause
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c
+PKG_HASH:=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
index d819dc585b8ab67a7502b19e906cc9fcf0f6fb4c..ab4b4490897e41a3fc75c646f39225178f8d0d53 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=python-engineio
 PKG_HASH:=21e1bcc62f5573a4bb1c805e69915c5a4c5aa953005dde6c2f707c24554c1020
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 286a5f325ed7509446d8fec4bab9edf309334bd6..a2d364aad4c4a199f3c148b22348e757499f53ac 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=eventlet
 PKG_HASH:=1811b122d9a45eb5bafba092d36911bca825f835cb648a862bbf984030acff9d
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 76b5d0f0626f325ea6aed1d5f791d4034ea4b756..1b45788d4746fc185e33a5aea3b1e7e1b17a44cc 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=execnet
 PKG_HASH:=b73c5565e517f24b62dea8a5ceac178c661c4309d3aa0c3e420856c072c411b4
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 6dc8ed6675c23d79c6ddd2d8dde95a846a7df59c..dd8536c5aed4526572532675be049e67f084afdd 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=Flask-HTTPAuth
 PKG_HASH:=8c7e49e53ce7dc14e66fe39b9334e4b7ceb8d0b99a6ba1c3562bb528ef9da84a
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 283622760ebf418b3e6fc4c4ab22695b568d2045..4678edb508f4503ebecb0255f0feaf333b9d6b85 100644 (file)
@@ -15,7 +15,7 @@ PKG_RELEASE:=2
 PYPI_NAME:=Flask-Login
 PKG_HASH:=6d33aef15b5bcead780acc339464aae8a6e28f13c90d8b1cf9de8b549d1c0b4b
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 945d57aa34bb9fd6c8abbdef37e6908afdc9e7b1..385cb8a9c536e3e226789a041e0b6742939ef1b7 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=Flask-SocketIO
 PKG_HASH:=5c4319f5214ada20807857dc8fdf3dc7d2afe8d6dd38f5c516c72e2be47d2227
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index efcaf901ae3f9242a6607de707fb946d4aa1a288..a9d16df504dcc5847bf02d8e537d56924ff94545 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PYPI_NAME:=greenlet
 PKG_HASH:=719e169c79255816cdcf6dccd9ed2d089a72a9f6c42273aae12d55e8d35bdcf8
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 # FIXME: remove when GCC10 is the oldest supported compiler, or the issue goes away
index b5d196748dc80a93b1c3803f1780df37f336ebd3..5d5da76172f9e23406a846ae8f4763b0dba93c6c 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=iniconfig
 PKG_HASH:=bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 59eddc31e64799e9d53e006f5b51217554ba66b8..2b007627a1efd26d3e059a4a8097b6755d013d06 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=more-itertools
 PKG_HASH:=c5d6da9ca3ff65220c3bfd2a8db06d698f05d4d2b9be57e1deb2be5a45019713
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index c872c3e4e42d6a01acea73135544fa245cee0552..00dd55db4dbeed732badec8926fdc166dce627ad 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=msgpack
 PKG_HASH:=fae04496f5bc150eefad4e9571d1a76c55d021325dcd484ce45065ebbdd00984
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=COPYING
 
index 96465e5c7a944764354c44bf112dad7b15e3f380..6a0eaad75fbb4bd381fd47a50373066cd7c29077 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=packaging
 PKG_HASH:=5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=Apache-2.0 BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
 
index ca9fea4a741f7f6e5ffb3b195c65c819223f7bdd..f9d3c39d611298e8413515e44b4b78294e4a43fc 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=4
 PYPI_NAME:=pluggy
 PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 2a7aacc476425ac366a460754c4795e3f8dd04c7..cf3e2f86c2c20dc611cd7479b0144e58ff51a35d 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=psutil
 PKG_HASH:=0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
index 35c9389e45e1989fc1b890538b9657de10e58dc3..ca20dbba6c63d789eea15373fdb5b62792262061 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=py
 PKG_HASH:=21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 0c4365c18760224199b6602356429f5266ceef35..6862e087db1a40916b32f39ed3d9f46b138cbd68 100644 (file)
@@ -15,7 +15,7 @@ PKG_RELEASE:=2
 PYPI_NAME:=pyparsing
 PKG_HASH:=c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 56ad797416cc5cbd800369d583ca6611a57221fb..cf3e05bb2154ecf21b96bd18450214b1c71ee743 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=PySocks
 PKG_HASH:=3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 60b162e8fa693b276ad84690c173714a6dfec169..dba2daa8fb977ab1a94a9fe63adc933b4da311ba 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PYPI_NAME:=pytest-forked
 PKG_HASH:=6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index a872a9c4527cd72eb5b6081cf6b207fb2ee58f6f..c73229bee5ba6dc5d06b65b0094b6d036f7b66ed 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=pytest-xdist
 PKG_HASH:=718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 44b7b2704e9da978f133ef20505881160feaecdb..7a91b4f637cc76684d4e5513902a963a4889997b 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=pytest
 PKG_HASH:=671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index a32e590a551fe9e42a37bc56d91ba98e3dba6f4c..5853897beee9ab025199239178f05eaee901b1c0 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests
-PKG_VERSION:=2.25.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.26.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=Apache-2.0
@@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:python-requests:requests
 
 PYPI_NAME:=requests
-PKG_HASH:=27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804
+PKG_HASH:=b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-requests/patches/0001-idna-dependency-bump.patch b/lang/python/python-requests/patches/0001-idna-dependency-bump.patch
deleted file mode 100644 (file)
index 72ffb45..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 9484e13c7da927119fe82794bb5571cec144b6d7 Mon Sep 17 00:00:00 2001
-From: Naor Livne <naorlivne@gmail.com>
-Date: Fri, 1 Jan 2021 14:31:14 +0200
-Subject: [PATCH 1/2] bump idna has version 3.0 was released
-
-Fixes issue (https://github.com/psf/requests/issues/5710):
-pkg_resources.ContextualVersionConflict: (idna 3.0 (/usr/lib/python3.9/site-packages), Requirement.parse('idna<3,>=2.5'), {'requests'})
-Origin of this patch:
-https://github.com/psf/requests/pull/5711
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/setup.py
-+++ b/setup.py
-@@ -43,7 +43,7 @@ packages = ['requests']
- requires = [
-     'chardet>=3.0.2,<5',
--    'idna>=2.5,<3',
-+    'idna>=2.5,<4',
-     'urllib3>=1.21.1,<1.27',
-     'certifi>=2017.4.17'
diff --git a/lang/python/python-requests/patches/0002-idna-dependency-bump.patch b/lang/python/python-requests/patches/0002-idna-dependency-bump.patch
deleted file mode 100644 (file)
index 9df2ddc..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From d3e00a4958af046879f24de365d5589d861ea6ef Mon Sep 17 00:00:00 2001
-From: Naor Livne <naorlivne@gmail.com>
-Date: Tue, 5 Jan 2021 16:31:15 +0200
-Subject: [PATCH 2/2] Update setup.py
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
----
- setup.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/setup.py
-+++ b/setup.py
-@@ -43,7 +43,8 @@ packages = ['requests']
- requires = [
-     'chardet>=3.0.2,<5',
--    'idna>=2.5,<4',
-+    'idna>=2.5,<3 ; python_version < "3"',
-+    'idna>=2.5,<4 ; python_version >= "3"',
-     'urllib3>=1.21.1,<1.27',
-     'certifi>=2017.4.17'
index 8e19f41ecbdb9040114ba81e212fb6cd93d15ea8..9fde114aec2443059268f0f6979fd78529b3c8cf 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=python-socketio
 PKG_HASH:=356a8a480fa316295b439d63a5f35a7a59fe65cee1ae35dee28e87d00e5aead6
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index aecc9bd643f4b9d6a928d587cfeb45042fb1d5bf..262ac066a923591acff36cdbcd8f922d44c6d3cf 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=toml
 PKG_HASH:=b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 498ef32106cda93958764fc4dfd42b7c6ed4158d..b60c9ad10c59ec6d14abf3a7c7026fe2f1973324 100644 (file)
@@ -15,7 +15,7 @@ PYPI_NAME:=typing-extensions
 PYPI_SOURCE_NAME:=typing_extensions
 PKG_HASH:=50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=PSF-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index b6adea101837d3b38f714784386394e0d127f369..6ded8e065a1d740bf790422c6abef18a85716926 100644 (file)
@@ -15,7 +15,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=wcwidth
 PKG_HASH:=c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
index 365fe6a32ef0e272c9c2547343176daf00fc8320..17c442952f7797b00ca085648cf45500bc68657a 100644 (file)
@@ -7,7 +7,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=zipp
 PKG_HASH:=3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 7cf914710fdfbd8745ac7fd48400332124325f80..8310f4a24f4c8553ac87732c8c4a9d291978ffd4 100644 (file)
@@ -15,7 +15,7 @@ PKG_RELEASE:=1
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=47e86a084dd814fac88c99ea34ba3278a74bc9de5a25f4b815b608798747c7dc
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index 691ab4fbfe7ba15f7fe3ef9c40649043c3db7bbb..c7ca612eaa409a6ccde019e27f8d04977d05bbad 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.2.5
+PKG_VERSION:=1.2.5.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=9092894a8c083b33acf8d6deb901b58f5d20d6da583789f814e8e46f2850ef18
+PKG_HASH:=628421d950cecaf234de3f899d520c0a6923313c964ad751ffac081df331438e
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
@@ -100,10 +100,13 @@ define Package/alsa-lib/install
                $(PKG_INSTALL_DIR)/usr/lib/libatopology.so.* \
                $(1)/usr/lib/
 
-       $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm}
+       $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,ctl,pcm}
        $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf \
                $(1)/usr/share/alsa/
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/alsa/ctl/* \
+               $(1)/usr/share/alsa/ctl/
        $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/share/alsa/pcm/* \
                $(1)/usr/share/alsa/pcm/
index d30b3cd97d96526828e2d6166e2e3e970cba8903..7b4984ab79158326036b2b813c1af91f087ddea2 100644 (file)
@@ -6,13 +6,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-ucm-conf
-PKG_VERSION:=1.2.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.2.5.1
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=2c3b535c77dcb9aaf62a61f4f8324f1ab184162f105f7ec9ed1e37c742fcd340
+PKG_HASH:=5841a444166dcbf479db751303dbc3556f685085ac7e00f0c9e7755676195d97
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=BSD-3-Clause
index f0ae3c21851b62a0a5d53b86ea5a1bd907389f5f..5d517140062ec939bff5b2d295d9252f46d2faff 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cyrus-sasl
 PKG_VERSION:=2.1.27
-PKG_RELEASE:=3
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -28,12 +28,23 @@ PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 config/libtool.m4
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/libsasl2
+define Package/libsasl2/Default
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=A general purpose authentication library
   URL:=http://asg.web.cmu.edu/sasl/
+endef
+
+define Package/libsasl2
+  $(call Package/libsasl2/Default)
   DEPENDS:=+libopenssl
+  TITLE+= (libraries)
+endef
+
+define Package/libsasl2-sasldb
+  $(call Package/libsasl2/Default)
+  DEPENDS:=+libsasl2 +libdb47
+  TITLE+= (sasldb libraries)
 endef
 
 TARGET_CFLAGS += $(FPIC)
@@ -47,7 +58,7 @@ CONFIGURE_ARGS += \
        --disable-checkapop \
        --enable-cram \
        --enable-digest \
-       --without-auth-sasldb \
+       --enable-auth-sasldb \
        --disable-otp \
        --disable-srp \
        --disable-srp-setpass \
@@ -60,7 +71,7 @@ CONFIGURE_ARGS += \
        --disable-ntlm \
        --disable-sql \
        --disable-ldapdb \
-       --without-dblib \
+       --with-dblib=berkeley \
        --without-gdbm \
        --with-devrandom="/dev/urandom" \
        --without-pam \
@@ -109,7 +120,17 @@ define Package/libsasl2/install
        $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/sasl2
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so* $(1)/usr/lib/sasl2/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libanonymous.so* $(1)/usr/lib/sasl2/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libplain.so* $(1)/usr/lib/sasl2/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libcrammd5.so* $(1)/usr/lib/sasl2/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libdigestmd5.so* $(1)/usr/lib/sasl2/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libscram.so* $(1)/usr/lib/sasl2/
+endef
+
+define Package/libsasl2-sasldb/install
+       $(INSTALL_DIR) $(1)/usr/lib/sasl2
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libsasldb.so* $(1)/usr/lib/sasl2/
 endef
 
 $(eval $(call BuildPackage,libsasl2))
+$(eval $(call BuildPackage,libsasl2-sasldb))
index 45b74bfb4094b709c1158b1988cfd12a21d17c8b..857f0ceeacc11b704e006f0af2d68dce6e712bc3 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
 PKG_HASH:=5d720a204c2a58645d6f7643af15d563a712dad98c9d32c1ed913377daa6ac39
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index 74209fe3957450d0d0394aff2172eb7e93db94e9..54b7c155074520e17c814eaa1def4f3b4897e06a 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpgme
-PKG_VERSION:=1.15.1
+PKG_VERSION:=1.16.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/$(PKG_NAME)
-PKG_HASH:=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+PKG_HASH:=6c8cc4aedb10d5d4c905894ba1d850544619ee765606ac43df7405865de29ed0
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-3.0-or-later
index 75f4a85681a561c377da47de7280f0185948fc9e..94d31a86d1aa43644f5f7a85b6bdf1629f877278 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=e34a628a8142643b976c7233ef381457efad79468c67cb1ae0b83a33d7493999
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
index 0b47b6c4aafc90b88f52ef37b82120cb46b7e9fa..b95ab1d7814b9b31fe526710c6f3a280580d0634 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libinput
-PKG_VERSION:=1.17.1
+PKG_VERSION:=1.18.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput
-PKG_HASH:=e51c50f3ce253961bed452d9f93102cc26128406975ab88ff9ec9e6c3b875137
+PKG_HASH:=18c6a286583268d39841348e561fbb4713bde0c643b360f5d8a3f27800afdb9a
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=MIT
index 56dc53706a3baa5a80816b9307338d7cb291ce58..f918290051163f606e2b11fa919e4271a7f95f51 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libksba
-PKG_VERSION:=1.5.1
+PKG_VERSION:=1.6.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/$(PKG_NAME)
-PKG_HASH:=b0f4c65e4e447d9a2349f6b8c0e77a28be9531e4548ba02c545d1f46dc7bf921
+PKG_HASH:=dad683e6f2d915d880aa4bed5cea9a115690b8935b78a1bbe01669189307a48b
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=LGPL-3.0-or-later GPL-2.0-or-later
index d142967bf350f074e04d754b98427f08ea44d985..fae54ba515900bbad15c96f20cf817b872132da1 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/
 PKG_HASH:=7620ac187c591ce21bcd7bf352376a3c56a933e684558a1f6bef4bd4f3f98267
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index bc4437dfa5652e1f640536dd21d43970e9250791..772c2d76bd92de7f3b205851ead37bd8110a4fb1 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libndpi
-PKG_VERSION:=3.4
-PKG_RELEASE:=2
+PKG_VERSION:=4.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=dc9b291c7fde94edb45fb0f222e0d93c93f8d6d37f4efba20ebd9c655bfcedf9
+PKG_HASH:=99e0aba6396fd633c3840f30e4942f6591a08066d037f560b65ba64e7310f4d6
 PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>, Toni Uhlig <matzeton@googlemail.com>
@@ -31,12 +31,16 @@ ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
 CONFIGURE_ARGS += --disable-gcrypt
 endif
 
+ifneq ($(CONFIG_LIBNDPI_MAXMINDDB),)
+CONFIGURE_ARGS += --with-maxminddb
+endif
+
 define Package/libndpi
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Library for deep-packet inspection
   URL:=https://github.com/ntop/nDPI
-  DEPENDS:=+LIBNDPI_GCRYPT:libgcrypt +libpcap +libjson-c
+  DEPENDS:=+LIBNDPI_GCRYPT:libgcrypt +LIBNDPI_MAXMINDDB:libmaxminddb +libpcap +libjson-c
 endef
 
 define Package/libndpi/description
@@ -52,6 +56,15 @@ config LIBNDPI_GCRYPT
        help
          This option enables QUIC client hello decryption.
          Disabled by default.
+
+config LIBNDPI_MAXMINDDB
+       bool "Maxmind GeoIP support"
+       depends on PACKAGE_libndpi
+       default n
+       help
+         This options enables geographical information processing
+         and serialization based on IP addresses.
+         Disabled by default.
 endef
 
 define Build/Prepare
index 2908de07749e8f88dfaf7fc610396848013f71aa..1d5a6b454db44c38a1b365cd1a1170173ef57517 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=librouteros
 PKG_SOURCE_DATE:=2018-07-19
 PKG_SOURCE_VERSION:=c485c777ffbbbd87c3d72d843af36ba016803cae
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Sven Roederer <devel-sven@geroedel.de>
 PKG_LICENSE:=ISC
diff --git a/libs/librouteros/patches/010-no-doc.patch b/libs/librouteros/patches/010-no-doc.patch
new file mode 100644 (file)
index 0000000..8a07e30
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,3 +1,3 @@
+-SUBDIRS = src doc
++SUBDIRS = src
+ README:       README.md
index ec64e34b21926e56b39f478f14760486208b3631..e903932a74dccd2f7a82046248aab859fd19ccd5 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libudev-zero
-PKG_VERSION:=0.4.8
+PKG_VERSION:=0.5.2
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/illiliti/libudev-zero/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=19e8af430997283a8a830797634757c299da13e9ca5a151bb919d45b46f5e95d
+PKG_HASH:=23f1046f13403ec217665193e78dad6cdb0af54e105a9aaf8440a846e66a1d62
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=MIT
index e50f6d709e85b7c31f6e56b418aaa72e0502a187..829ec7dd5b31d5f80362c2801c29ece814eb9a8e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libyaml-cpp
-PKG_VERSION:=0.6.3
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=yaml-cpp-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-$(PKG_VERSION)?
-PKG_HASH:=77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed
+PKG_HASH:=43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3
 PKG_BUILD_DIR:=$(BUILD_DIR)/yaml-cpp-yaml-cpp-$(PKG_VERSION)
 
 PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
@@ -32,7 +32,7 @@ define Package/libyaml-cpp
   TITLE:=libyaml-cpp
   URL:=https://github.com/jbeder/yaml-cpp
   DEPENDS:=+libstdcpp
-  ABI_VERSION:=0.6
+  ABI_VERSION:=0.7
 endef
 
 define Package/libyaml-cpp/description
index c888338d749f65a23719064c6fb2542d7e5a0bfd..b32dcb7fe0bb0a376acdf649322188eae8adcb87 100644 (file)
@@ -9,7 +9,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/LMDB/lmdb/tar.gz/LMDB_$(PKG_VERSION)
 PKG_HASH:=22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb
 PKG_BUILD_DIR:=$(BUILD_DIR)/lmdb-LMDB_$(PKG_VERSION)
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=OLDAP-2.8
 PKG_LICENSE_FILES:=LICENSE
 
diff --git a/libs/openblas/Makefile b/libs/openblas/Makefile
new file mode 100644 (file)
index 0000000..1bc6d81
--- /dev/null
@@ -0,0 +1,106 @@
+#
+# Copyright (C) 2021 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=OpenBLAS
+PKG_VERSION:=0.3.17
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE:=OpenBLAS-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/xianyi/OpenBLAS/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f
+PKG_LICENSE:=BSD 3-Clause
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openblas
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=An optimized library for BLAS (Basic Linear Algebra Subprograms)
+  URL:=https://www.openblas.net/
+  DEPENDS:= \
+       @!arc \
+       @!powerpc \
+       +INSTALL_GFORTRAN:libgfortran
+endef
+
+define Package/openblas/description
+  OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library
+  based on GotoBLAS2 1.13 BSD version.
+endef
+
+define Package/openblas/config
+menu "Configuration"
+depends on PACKAGE_openblas
+
+config OPENBLAS_TARGET_OVERRIDE
+       string
+       prompt "Manual CPU target override (from the OpenBLAS TargetList.txt file)"
+
+endmenu
+endef
+
+OPENBLAS_TARGET=$(call qstrip,$(CONFIG_OPENBLAS_TARGET_OVERRIDE))
+
+ifeq ($(OPENBLAS_TARGET),)
+ifeq ($(ARCH),aarch64)
+  OPENBLAS_TARGET:=ARMV8
+else ifeq ($(ARCH),arm)
+  OPENBLAS_TARGET:=ARMV5
+else ifeq ($(ARCH),mips)
+  OPENBLAS_TARGET:=MIPS24K
+else ifeq ($(ARCH),mipsel)
+  OPENBLAS_TARGET:=MIPS24K
+else ifeq ($(ARCH),powerpc)
+  OPENBLAS_TARGET:=PPC440
+else ifeq ($(ARCH),mips64)
+  OPENBLAS_TARGET:=I6400
+else ifeq ($(ARCH),mips64el)
+  OPENBLAS_TARGET:=I6400
+else ifeq ($(ARCH),i386)
+  OPENBLAS_TARGET:=GENERIC
+else ifeq ($(ARCH),x86_64)
+  OPENBLAS_TARGET:=GENERIC
+endif
+endif # ifeq ($(OPENBLAS_TARGET),)
+
+ifeq ($(CONFIG_ARCH_64BIT),y)
+OPENBLAS_BINARY:=64
+else
+OPENBLAS_BINARY:=32
+endif
+
+MAKE_FLAGS += \
+       CROSS=1 \
+       HOSTCC=$(HOSTCC_NOCACHE) \
+       CROSS_SUFFIX=$(TARGET_CROSS) \
+       BINARY=$(OPENBLAS_BINARY) \
+       NUM_THREADS=2 \
+       PREFIX=/usr \
+       COMMON_OPT="" \
+       TARGET=$(call qstrip,$(OPENBLAS_TARGET))
+
+ifneq ($(CONFIG_INSTALL_GFORTRAN),y)
+MAKE_FLAGS += NOFORTRAN=1
+endif
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/openblas/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenblas*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,openblas))
index 21c63ac19fb5c45a516e7286a20a0d69588b1694..bf5724144d5cf01a8e902d2f3319be40384421d7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.22
-PKG_RELEASE:=1
+PKG_VERSION:=0.24.0
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
-PKG_HASH:=8a8f40153dd5a3f8e7c03e641f8db400133fb2a6a9ab2aee1b6d0cb0495ec6b6
+PKG_HASH:=81e6140584f635e4e956a1b93a32239acf3811ff5b2d3a5c6094e94e99d2c685
 
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/libs/p11-kit/patches/010-stdint.patch b/libs/p11-kit/patches/010-stdint.patch
deleted file mode 100644 (file)
index 546c062..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From 507c394cfcf4edffc5e4450c5d737e545c26b857 Mon Sep 17 00:00:00 2001
-From: Daniel Engberg <daniel.engberg.lists@pyret.net>
-Date: Sat, 12 Dec 2020 18:56:38 +0100
-Subject: [PATCH] p11-kit/lists.c: Add stdint.h to fix compilation
-
-Add stdint.h otherwise compilation fails on FreeBSD 13-CURRENT with "use of undeclared identifier 'SIZE_MAX'"
-
-Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
----
- p11-kit/lists.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/p11-kit/lists.c
-+++ b/p11-kit/lists.c
-@@ -39,6 +39,7 @@
- #include <assert.h>
- #include <ctype.h>
-+#include <stdint.h>
- #include <string.h>
- #include <stdio.h>
- #include <stdlib.h>
index 4d4ffb110127237451399a5a37c58993e427b20e..4e75a1cda97f04c448713c6188393a086c09773d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcre2
-PKG_VERSION:=10.36
-PKG_RELEASE:=1
+PKG_VERSION:=10.37
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=a9ef39278113542968c7c73a31cfcb81aca1faa64690f400b907e8ab6b4a665c
+PKG_HASH:=4d95a96e8b80529893b4562be12648d798b957b1ba1aae39606bbc2ab956d270
 
 PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
index b94fd5205c7d466bb2ff4b4a89e322c67d00d142..dd40d884731366733edf69a3aa3778929fa26666 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
-PKG_VERSION:=13.2
+PKG_VERSION:=13.3
 PKG_RELEASE:=$(AUTORELEASE)
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=PostgreSQL
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=\
        http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
        ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
 
-PKG_HASH:=5fd7fcd08db86f5b2aed28fcfaf9ae0aca8e9428561ac547764c2a2b0f41adfc
+PKG_HASH:=3cd9454fa8c7a6255b6743b767700925ead1b9ab0d7a0f9dcb1151010f8eb4a1
 
 PKG_USE_MIPS16:=0
 PKG_FIXUP:=autoreconf
index 9e06370d3fc60abf8593ac2f1987304bf6ab11f9..845a0cd7e4736bbe897028a287b92a86a547d40e 100644 (file)
@@ -8,7 +8,7 @@ PKG_SOURCE_URL:=http://download.redis.io/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=ba32c406a10fc2c09426e2be2787d74ff204eb3a2e496d87cff76a476b6ae16e
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:pivotal_software:redis
index 3d3b2940e946c4d2d5c4090b164c1d460186691a..c8e0e536b0f839cf7e6e6c7eeb68a66016a2af6d 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 139aefb4f2ddab2a3464546e23e257e3e7b3c75a..916de3c1fdeec627e41089286cbeabf056691485 100755 (executable)
@@ -916,7 +916,7 @@ f_list()
                "safesearch")
                        case "${src_name}" in
                                "google")
-                                       rset="/^(\\.[[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}"
+                                       rset="/^\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}"
                                        safe_url="https://www.google.com/supported_domains"
                                        safe_cname="forcesafesearch.google.com"
                                        safe_domains="${adb_tmpdir}/tmp.load.safesearch.${src_name}"
index eafebcde91a669438f742349c5e66a837218fa38..4833328ee7727e3c6ecd6d86faf6467316f6590c 100644 (file)
@@ -17,7 +17,7 @@ PKG_HASH:=c5a3aca026cd1a3b93a77b159b36cd7a1098eb6d90e9ae4a69872cd7a419a87b
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/ripe-atlas-probe-busybox-$(PKG_VERSION)
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
index 13f224a4f78ff874d7f9d5df7e99ac4bd1379f9a..445d7ff586e42f8abc704082501e89fd2182d7e8 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE:=ripe-atlas-software-probe-$(PKG_VERSION).tar.gz
 PKG_MIRROR_HASH:=846aa20ff4bc938c07526a9893dcae4ac7dfa41982a5b2bcfe2dd53c974ecdc9
 PKG_SOURCE_VERSION:=edee49c942b726a1d8865d91c8d7f32843bc8ad1
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
index 0c4fcb7cf0159ccdfdc4a4430cc171c624a97cca..afb7f815190e6bbf794c7091b1d2398ad9271e2b 100644 (file)
@@ -103,7 +103,7 @@ config LIBCURL_TFTP
 
 config LIBCURL_NGHTTP2
        bool "HTTP2 protocol"
-       default n
+       default y
 
 comment "Miscellaneous"
 
index c260ad9ebd88e7f93537637800e55964ddb76e08..99eeb351cb8e60785fd8669331573031fd460f9f 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dawn
-PKG_SOURCE_DATE:=2021-07-11
+PKG_SOURCE_DATE:=2021-07-27
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/berlin-open-wireless-lab/DAWN.git
-PKG_SOURCE_VERSION:=ec9a3a96e8c708a0ad85287fd3ed42cc0527e869
-PKG_MIRROR_HASH:=75e9ede98a04f6a740edb98426e891cc51923df1fb96ed24c244ae84a8cbe9e7
+PKG_SOURCE_VERSION:=276ca169a7c5c07932e54c03f4aa05c9eb192b38
+PKG_MIRROR_HASH:=4abc5b0aa14553c8b9787641da009efbf7fc4f2994720c2ccf1b2b31fc949ca5
 
 PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
 PKG_LICENSE:=GPL-2.0-only
index 3b5557b52d06f52af5f2f3d40ef52774a2b4e2b1..7afc83b3562ca0b06ec1095aef5c802ee659fd7b 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsproxy
-PKG_VERSION:=0.38.2
+PKG_VERSION:=0.39.1
 PKG_RELEASE:=$(AUTORELESE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=cc240be1e6975cc782155427f45a3753beb647d0de44f2e9f734486fc19db379
+PKG_HASH:=dcd87517ebb88b899b1f89314cfe2c32d6cb202f9b3f7a6f3173cf951f1c3734
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=Apache-2.0
@@ -34,6 +34,7 @@ define Package/dnsproxy
   TITLE:=Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
   URL:=https://github.com/AdguardTeam/dnsproxy
   DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
+  USERID:=dnsproxy=411:dnsproxy=411
 endef
 
 define Package/dnsproxy/description
@@ -42,5 +43,14 @@ define Package/dnsproxy/description
   work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.
 endef
 
+define Package/dnsproxy/install
+       $(call GoPackage/Package/Install/Bin,$(1))
+
+       $(INSTALL_DIR) $(1)/etc/config/
+       $(INSTALL_CONF) $(CURDIR)/files/dnsproxy.config $(1)/etc/config/dnsproxy
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) $(CURDIR)/files/dnsproxy.init $(1)/etc/init.d/dnsproxy
+endef
+
 $(eval $(call GoBinPackage,dnsproxy))
 $(eval $(call BuildPackage,dnsproxy))
diff --git a/net/dnsproxy/files/dnsproxy.config b/net/dnsproxy/files/dnsproxy.config
new file mode 100644 (file)
index 0000000..a9fa020
--- /dev/null
@@ -0,0 +1,41 @@
+
+# For documents, please see https://github.com/AdguardTeam/dnsproxy#usage
+
+config dnsproxy 'global'
+       option enabled '0'
+       option listen_addr '127.0.0.1'
+       option listen_port '5353'
+       option log_file ''
+       option all_servers '0'
+       option fastest_addr '0'
+       option insecure '0'
+       option ipv6_disabled '0'
+       option max_go_routines ''
+       option rate_limit ''
+       option refuse_any '0'
+       option udp_buf_size ''
+       option verbose '0'
+
+config dnsproxy 'bogus_nxdomain'
+       list ip_addr ''
+
+config dnsproxy 'cache'
+       option enabled '0'
+       option cache_optimistic '0'
+       option size '65535'
+       option min_ttl ''
+       option max_ttl ''
+
+config dnsproxy 'dns64'
+       option enabled '0'
+       option dns64_prefix '64:ff9b::'
+
+config dnsproxy 'edns'
+       option enabled '0'
+       option edns_addr ''
+
+config dnsproxy 'servers'
+       list bootstrap 'tls://8.8.8.8'
+       list fallback 'tls://9.9.9.9'
+       list upstream 'tls://1.1.1.1'
+
diff --git a/net/dnsproxy/files/dnsproxy.init b/net/dnsproxy/files/dnsproxy.init
new file mode 100644 (file)
index 0000000..9ac2751
--- /dev/null
@@ -0,0 +1,115 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2021 Tianling Shen <cnsztl@immortalwrt.org>
+
+USE_PROCD=1
+START=90
+
+CONF="dnsproxy"
+PROG="/usr/bin/dnsproxy"
+
+is_enabled() {
+       local enabled
+       config_get enabled "$1" "$2" "0"
+       if [ "$enabled" -eq "1" ]; then
+               return 0
+       else
+               return 1
+       fi
+}
+
+is_empty() {
+       local empty
+       config_get empty "$1" "$2" $3
+       if [ -z "$empty" ]; then
+               return 0
+       else
+               return 1
+       fi
+}
+
+append_param() {
+       procd_append_param command "$1" $2
+}
+
+append_param_arg() {
+       local value
+       config_get value "$1" "$2" $4
+       [ -n "$value" ] && append_param "$3" "$value"
+}
+
+append_param_bool() {
+       is_enabled "$1" "$2" && append_param "--${2//_/-}"
+}
+
+load_config_arg() {
+       append_param_bool "$1" "all_servers"
+       append_param_bool "$1" "fastest_addr"
+       append_param_bool "$1" "insecure"
+       append_param_bool "$1" "ipv6_disabled"
+       append_param_bool "$1" "refuse_any"
+       append_param_bool "$1" "verbose"
+}
+
+load_config_list() {
+       is_empty "bogus_nxdomain" "ip_addr" || config_list_foreach "bogus_nxdomain" "ip_addr" "append_param '--bogus-nxdomain'"
+
+       for i in "bootstrap" "fallback" "upstream"; do
+               is_empty "servers" "$i" || config_list_foreach "servers" "$i" "append_param '--$i'"
+       done
+}
+
+load_config_param() {
+       append_param_arg "global" "listen_addr" "--listen" "127.0.0.1"
+       append_param_arg "global" "listen_port" "--port" "5353"
+       append_param_arg "global" "log_file" "--output"
+       append_param_arg "global" "max_go_routines" "--max-go-routines"
+       append_param_arg "global" "rate_limit" "--ratelimit"
+       append_param_arg "global" "udp_buf_size" "--udp-buf-size"
+
+       is_enabled "cache" "enabled" && {
+               append_param "--cache"
+               append_param_bool "cache" "cache_optimistic"
+               append_param_arg "cache" "size" "--cache-size"
+               append_param_arg "cache" "min_ttl" "--cache-min-ttl"
+               append_param_arg "cache" "max_ttl" "--cache-max-ttl"
+       }
+
+       is_enabled "dns64" "enabled" && {
+               append_param "--dns64"
+               append_param_arg "dns64" "dns64_prefix" "--dns64-prefix"
+       }
+
+       is_enabled "edns" "enabled" && {
+               append_param "--edns"
+               append_param_arg "edns" "edns_addr" "--edns-addr"
+       }
+}
+
+start_service() {
+       config_load "$CONF"
+
+       is_enabled "global" "enabled" || exit 1
+
+       procd_open_instance "$CONF"
+       procd_set_param command "$PROG"
+
+       load_config_arg "global"
+       load_config_list
+       load_config_param
+
+       procd_set_param respawn
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_set_param user dnsproxy
+
+       procd_close_instance
+}
+
+reload_service() {
+       stop
+       start
+}
+
+service_triggers() {
+       procd_add_reload_trigger "$CONF"
+}
index b9c553cd5ce7a8172ba470f7555c5a464eb5a344..774c84a4c2412ed860313185e8a493379e76d33a 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=golang-dnstap-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/dnstap/golang-dnstap/archive/v$(PKG_VERSION)/
 PKG_HASH:=bf59ae30d81dd022b81d946254e2818b397011aec1e0a5bea0c0df9abe1f1f83
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index 465d86755db55ad35f18b226b3026a5474e48f8e..dd84303931b6e55fc60bc2a50029b0160dcc9ed1 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gateway-go
-PKG_VERSION:=0.1.95
+PKG_VERSION:=0.2.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/OpenIoTHub/gateway-go/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=50a1c0e997664ae71da5b7394b792634832df50e8eba90ba8be7afd64e65a866
+PKG_HASH:=7d04d923ae39c2c9ffb4c5de2a3f335798ff167992a6d89d9538d0bf3867b6f8
 
 PKG_MAINTAINER:=Yu Fang <newfarry@126.com>
 PKG_LICENSE:=MIT
index 55cc0c0fbb02b063bc3df8c829c6b5642292900f..150ce3301a1b8d91bcc8843b3f540e058d96cbbc 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/git-lfs/git-lfs/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=f8bd7a06e61e47417eb54c3a0db809ea864a9322629b5544b78661edab17b950
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.md
 
index 330fb335ac8dddcbd0a92bc71dfdaf97e4a6d7dd..e244f50a1c3abf0509524fa55e35b6ada550495c 100644 (file)
@@ -12,6 +12,7 @@ PKG_SOURCE_NAME:=hostapd
 PKG_MIRROR_HASH:=1b2a4947034142587a3f81eac2ea27dd64650e77f8943d973623b47533be2393
 PKG_MIRROR_VERSION:=$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_MIRROR_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_SOURCE_NAME)-$(PKG_MIRROR_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_SOURCE_NAME)-$(PKG_MIRROR_VERSION)
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
index 73d0a07cf4c475ff0f22c672f1aa386d6273a323..aa7e2f31c3a110d5b7df1f98b6e7a0a14e54907e 100644 (file)
@@ -1,14 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=https-dns-proxy
-PKG_VERSION:=2021-06-03
+PKG_VERSION:=2021-07-29
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy
-PKG_SOURCE_DATE:=2021-06-03
-PKG_SOURCE_VERSION:=5651b984f770a8bcecb14aeffc224703f8f82586
-PKG_MIRROR_HASH:=b65161936269aa3117debad0fcfce157024726b78d7e7da77c226f7aa8da5b4d
+PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
+PKG_SOURCE_DATE:=2021-07-29
+PKG_SOURCE_VERSION:=750c4dbdfe3d3c65edcd57349df181ffd1f6ceeb
+PKG_MIRROR_HASH:=88f487d80f8f20b83d1f9940c30ad1d5b6a4eda6be48fbaea196c69e90c5429e
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
@@ -38,11 +38,12 @@ define Package/https-dns-proxy/conffiles
 endef
 
 define Package/https-dns-proxy/install
-       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d ${1}/etc/config
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d ${1}/etc/config $(1)/etc/hotplug.d/iface
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/https_dns_proxy $(1)/usr/sbin/https-dns-proxy
        $(INSTALL_BIN) ./files/https-dns-proxy.init $(1)/etc/init.d/https-dns-proxy
        $(SED) "s|^\(PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/https-dns-proxy
        $(INSTALL_CONF) ./files/https-dns-proxy.config $(1)/etc/config/https-dns-proxy
+       $(INSTALL_DATA) ./files/https-dns-proxy.hotplug.iface $(1)/etc/hotplug.d/iface/90-https-dns-proxy
 endef
 
 $(eval $(call BuildPackage,https-dns-proxy))
diff --git a/net/https-dns-proxy/files/https-dns-proxy.hotplug.iface b/net/https-dns-proxy/files/https-dns-proxy.hotplug.iface
new file mode 100644 (file)
index 0000000..542a8b3
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "$ACTION" = 'ifup' ] && [ "$INTERFACE" = 'wan' ]; then
+       logger -t "https-dns-proxy" "Reloading https-dns-proxy due to $ACTION of $INTERFACE"
+       /etc/init.d/https-dns-proxy reload
+fi
index 8b868076364c86139165c88a3456e1eb259f3056..7cefff92e8593ac5b906ddf3983b0c21e083883f 100755 (executable)
@@ -16,8 +16,14 @@ else
 fi
 
 readonly PROG=/usr/sbin/https-dns-proxy
+readonly DEFAULT_BOOTSTRAP='1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844'
 dnsmasqConfig=''; forceDNS=''; forceDNSPorts='';
 
+str_contains() { [ -n "$2" ] && [ "${1//$2}" != "$1" ]; }
+is_mac_address() { expr "$1" : '[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]$' >/dev/null; }
+is_ipv4() { expr "$1" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; }
+is_ipv6() { ! is_mac_address "$1" && str_contains "$1" ":"; }
+
 version() { echo "$PKG_VERSION"; }
 
 xappend() { param="$param $1"; }
@@ -26,11 +32,10 @@ append_bool() {
        local section="$1"
        local option="$2"
        local value="$3"
-       local default="$4"
+       local default="${4:-0}"
        local _loctmp
-       [ -z "$default" ] && default="0"
        config_get_bool _loctmp "$section" "$option" "$default"
-       [ "$_loctmp" != "0" ] && xappend "$value"
+       [ "$_loctmp" -ne 0 ] && xappend "$value"
 }
 
 append_parm() {
@@ -40,73 +45,66 @@ append_parm() {
        local default="$4"
        local _loctmp
        config_get _loctmp "$section" "$option" "$default"
+       [ -n "$_loctmp" ] && xappend "$switch $_loctmp"
+}
+
+append_counter() {
+       local section="$1"
+       local option="$2"
+       local switch="$3"
+       local default="${4:-0}"
+       local _loctmp i
+       config_get _loctmp "$section" "$option" "$default"
+# shellcheck disable=SC2086,SC2154
+       for i in $(seq 1 $_loctmp); do
+               xappend '-v'
+       done
+}
+
+append_bootstrap() {
+       local section="$1"
+       local option="$2"
+       local switch="$3"
+       local default="$4"
+       local _old_ifs="$IFS"
+       local _loctmp _newtmp i
+       config_get _loctmp "$section" "$option" "$default"
        [ -z "$_loctmp" ] && return 0
-       xappend "$switch $_loctmp"
+       IFS=" ,"
+       for i in $_loctmp; do
+               if { [ "$ipv6_resolvers_only" -eq 0 ] && is_ipv4 "$i"; } || \
+                       { [ "$ipv6_resolvers_only" -ne 0 ] && is_ipv6 "$i"; }; then
+                       [ -z "$_newtmp" ] && _newtmp="$i" || _newtmp="${_newtmp},${i}"
+               fi
+       done
+       IFS="$_old_ifs"
+       [ -n "$_newtmp" ] && xappend "$switch $_newtmp"
+       [ "$ipv6_resolvers_only" -eq 0 ] && xappend '-4'
 }
 
 start_instance() {
-       local cfg="$1" param listen_addr listen_port i
+       local cfg="$1" param listen_addr listen_port i ipv6_resolvers_only
+       config_get_bool ipv6_resolvers_only "$cfg" 'use_ipv6_resolvers_only' '0'
        append_parm "$cfg" 'resolver_url' '-r'
        append_parm "$cfg" 'polling_interval' '-i'
        append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1'
        append_parm "$cfg" 'listen_port' '-p' "$p"
        append_parm "$cfg" 'dscp_codepoint' '-c'
-       append_parm "$cfg" 'bootstrap_dns' '-b'
+       append_bootstrap "$cfg" 'bootstrap_dns' '-b' "$DEFAULT_BOOTSTRAP"
        append_parm "$cfg" 'user' '-u' 'nobody'
        append_parm "$cfg" 'group' '-g' 'nogroup'
        append_parm "$cfg" 'proxy_server' '-t'
        append_parm "$cfg" 'logfile' '-l'
        append_bool "$cfg" 'use_http1' '-x'
-       config_get_bool ipv6_resolvers_only "$cfg" 'use_ipv6_resolvers_only' '0'
-       config_get verbosity "$cfg" 'verbosity' '0'
-
-# shellcheck disable=SC2086,SC2154
-       for i in $(seq 1 $verbosity); do
-               xappend '-v'
-       done
-# shellcheck disable=SC2154
-       if [ "$ipv6_resolvers_only" = 0 ]; then
-               xappend '-4'
-       fi
+       append_counter "$cfg" 'verbosity' '-v' '0'
 
        procd_open_instance
 # shellcheck disable=SC2086
-       procd_set_param command ${PROG} ${param}
+       procd_set_param command $PROG $param
        procd_set_param stderr 1
        procd_set_param stdout 1
        procd_set_param respawn
-       procd_close_instance
-
-       config_get listen_addr "$cfg" 'listen_addr' '127.0.0.1'
-       config_get listen_port "$cfg" 'listen_port' "$p"
-
-       if [ "$dnsmasqConfig" = "*" ]; then
-               config_load 'dhcp'
-               config_foreach dnsmasq_add_doh_server 'dnsmasq' "${listen_addr}" "${listen_port}"
-       elif [ -n "$dnsmasqConfig" ]; then
-               for i in $dnsmasqConfig; do
-                       dnsmasq_add_doh_server "@dnsmasq[${i}]" "${listen_addr}" "${listen_port}"
-               done
-       fi
-       p="$((p+1))"
-}
-
-is_force_dns_active() { iptables-save | grep -q -w -- '--dport 53'; }
-
-start_service() {
-       local p=5053 c
-       config_load 'https-dns-proxy'
-       config_get dnsmasqConfig        'config' 'update_dnsmasq_config' '*'
-       config_get_bool forceDNS        'config' 'force_dns' '1'
-       config_get forceDNSPorts        'config' 'force_dns_port' '53 853'
-       dhcp_backup 'create'
-       config_load 'https-dns-proxy'
-       config_foreach start_instance 'https-dns-proxy'
        if [ "$forceDNS" -ne 0 ]; then
-               procd_open_instance 'main'
-               procd_set_param command /bin/true
-               procd_set_param stdout 1
-               procd_set_param stderr 1
                procd_open_data
                json_add_array firewall
                for c in $forceDNSPorts; do
@@ -133,8 +131,35 @@ start_service() {
                done
                json_close_array
                procd_close_data
-               procd_close_instance
+               forceDNS='0'
+       fi
+       procd_close_instance
+
+       config_get listen_addr "$cfg" 'listen_addr' '127.0.0.1'
+       config_get listen_port "$cfg" 'listen_port' "$p"
+
+       if [ "$dnsmasqConfig" = "*" ]; then
+               config_load 'dhcp'
+               config_foreach dnsmasq_add_doh_server 'dnsmasq' "${listen_addr}" "${listen_port}"
+       elif [ -n "$dnsmasqConfig" ]; then
+               for i in $dnsmasqConfig; do
+                       dnsmasq_add_doh_server "@dnsmasq[${i}]" "${listen_addr}" "${listen_port}"
+               done
        fi
+       p="$((p+1))"
+}
+
+is_force_dns_active() { iptables-save | grep -q -w -- '--dport 53'; }
+
+start_service() {
+       local p=5053 c
+       config_load 'https-dns-proxy'
+       config_get dnsmasqConfig        'config' 'update_dnsmasq_config' '*'
+       config_get_bool forceDNS        'config' 'force_dns' '1'
+       config_get forceDNSPorts        'config' 'force_dns_port' '53 853'
+       dhcp_backup 'create'
+       config_load 'https-dns-proxy'
+       config_foreach start_instance 'https-dns-proxy'
        if [ -n "$(uci -q changes dhcp)" ]; then
                uci -q commit dhcp
                [ -x /etc/init.d/dnsmasq ] && /etc/init.d/dnsmasq restart >/dev/null 2>&1
index 5757875966d4a46bc50dba076974ec12cb262742..d071d0c03158826f157d9f1683e3bfb1072bc79b 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
-PKG_VERSION:=2.0.13
-PKG_RELEASE:=3
+PKG_VERSION:=2.1.3
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=c88adec966096a81136dda91b4bd19c27aae06df4d45a7f547a8e50d723778ad
+PKG_HASH:=dfe2197e2842fe9c9d9677bf1cb20a5a9ccfcb9a9de79f9927c39f73204ba003
 PKG_SOURCE_URL:=@SF/iperf2
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
diff --git a/net/iperf/patches/0003-fix-non-ipv6-builds.patch b/net/iperf/patches/0003-fix-non-ipv6-builds.patch
deleted file mode 100644 (file)
index c6afa3e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/Listener.cpp
-+++ b/src/Listener.cpp
-@@ -723,6 +723,7 @@ int Listener::L2_setup (void) {
-     // Now optimize packet flow up the raw socket
-     // Establish the flow BPF to forward up only "connected" packets to this raw socket
-+#ifdef HAVE_IPV6
-     if (l->sa_family == AF_INET6) {
- #ifdef HAVE_IPV6
-       struct in6_addr *v6peer = SockAddr_get_in6_addr(&server->peer);
-@@ -740,6 +741,9 @@ int Listener::L2_setup (void) {
-       return -1;
- #endif /* HAVE_IPV6 */
-     } else {
-+#else
-+    {
-+#endif
-       rc = SockAddr_v4_Connect_BPF(server->mSock, ((struct sockaddr_in *)(l))->sin_addr.s_addr, ((struct sockaddr_in *)(p))->sin_addr.s_addr, ((struct sockaddr_in *)(l))->sin_port, ((struct sockaddr_in *)(p))->sin_port);
-       WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf");
-     }
diff --git a/net/iperf/patches/010-libcxx.patch b/net/iperf/patches/010-libcxx.patch
deleted file mode 100644 (file)
index cf01242..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/config.h.in
-+++ b/config.h.in
-@@ -360,7 +360,9 @@
- #undef _REENTRANT
- /* */
-+#ifndef __cplusplus
- #undef bool
-+#endif
- /* Define to empty if `const' does not conform to ANSI C. */
- #undef const
diff --git a/net/iperf/patches/020-math.patch b/net/iperf/patches/020-math.patch
deleted file mode 100644 (file)
index da255c2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/src/pdfs.c
-+++ b/src/pdfs.c
-@@ -80,7 +80,7 @@ float box_muller(void) {
-           fprintf(stderr, "pdf box_muller() rand() error\n");
-           return 0;
-       } else {
--          w = sqrt( (-2.0 * log( w ) ) / w );
-+          w = sqrt( (-2.0 * logf( w ) ) / w );
-           y1 = x1 * w;
-           y2 = x2 * w;
-       }
-@@ -93,8 +93,8 @@ float normal(float mean, float variance)
- }
- float lognormal(float mu, float sigma) {
--    float phi = sqrt((mu * mu) + (sigma * sigma));
--    float mu_prime = log(((mu * mu)/phi));
--    float sigma_prime = sqrt(log((phi * phi)/(mu * mu)));
--    return (exp(normal(mu_prime,sigma_prime)));
-+    float phi = sqrtf((mu * mu) + (sigma * sigma));
-+    float mu_prime = logf(((mu * mu)/phi));
-+    float sigma_prime = sqrtf(logf((phi * phi)/(mu * mu)));
-+    return (expf(normal(mu_prime,sigma_prime)));
- }
index 95e841f4847feb925746a5940fede0c9ec7a7a1e..554f3115deaf35e6948325f176bd9f70b44e8734 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irssi
-PKG_VERSION:=1.2.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.2.3
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/$(PKG_VERSION)/
-PKG_HASH:=6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578
+PKG_HASH:=a647bfefed14d2221fa77b6edac594934dc672c4a560417b1abcbbc6b88d769f
 
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:irssi:irssi
 
diff --git a/net/irssi/test.sh b/net/irssi/test.sh
new file mode 100644 (file)
index 0000000..31804af
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+irssi --version 2>&1 | grep "$2"
index dc215d4dd81f285de8104e0781563e33f738bfba..ea78b89ab98717854565ade51bd6dd48a539cef7 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-resolver
 PKG_HASH:=8b6f447d5fe93422d4c129a2d4004a977369c3aa6e55258ead1cbd488bc01436
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-later
 PKG_LICENSE_FILES:=COPYING
 
index a57c336d68cac90b12afa882c63be32096a487e6..1cb4ea9731fdaf31bc256cdd79d1b1e2be9652b7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lksctp-tools
-PKG_VERSION:=1.0.18
-PKG_RELEASE:=1
+PKG_VERSION:=1.0.19
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/sctp/lksctp-tools/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3e9ab5b3844a8b65fc8152633aafe85f406e6da463e53921583dfc4a443ff03a
+PKG_HASH:=9251b1368472fb55aaeafe4787131bdde4e96758f6170620bc75b638449cef01
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
diff --git a/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch b/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch
deleted file mode 100644 (file)
index 389138a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 378560050a8f93786c590cc99a55461666205b61 Mon Sep 17 00:00:00 2001
-From: Xin Long <lucien.xin@gmail.com>
-Date: Fri, 24 Aug 2018 01:13:32 +0800
-Subject: [PATCH] build: fix netinet/sctp.h not to be installed
-
-After libcnetinet_HEADERS was set to sctp.h.in, netinet/sctp.h can
-no longer be installed into ${includedir}.
-
-Since "AC_CONFIG_HEADERS([src/include/netinet/sctp.h])" is already
-added into configure.ac, there's no need to generate sctp.h by
-automake.
-
-So we simply set libcnetinet_HEADERS back to sctp.h.
-
-Fixes: 9607dd85e70a ("netinet/sctp.h: dynamically build based on system setup")
-Signed-off-by: Xin Long <lucien.xin@gmail.com>
-Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
----
- src/include/netinet/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/src/include/netinet/Makefile.am
-+++ b/src/include/netinet/Makefile.am
-@@ -11,5 +11,4 @@ libcnetinetdir = $(includedir)/netinet
- # API.
- include_HEADERS =
--libcnetinet_HEADERS = sctp.h.in
--BUILT_SOURCES = sctp.h
-+libcnetinet_HEADERS = sctp.h
index c2cdd7f704b35f0f668e21b1ddb3576470cf1827..850f90aa1f4751cc27b296a5784e02259f74c24f 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nextdns
-PKG_VERSION:=1.34.2
+PKG_VERSION:=1.35.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE_URL:=https://codeload.github.com/nextdns/nextdns/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7e0a296aa3cd53404b243ae6597ebce21879a3168f959be1cb3030fc6c73ed21
+PKG_HASH:=b0b5cc73d660b13f2bc9825f0a19983f7206dde1edde7abda683a6392dc355c7
 
 PKG_MAINTAINER:=Olivier Poitrey <rs@nextdns.io>
 PKG_LICENSE:=MIT
index 6ee595865b2305d5d26fba4c3a59b7c6eefc5b3c..60e7b3b1221bc86a7b13bb15f215212973633adc 100644 (file)
@@ -15,7 +15,7 @@ PYPI_NAME:=onionshare-cli
 PYPI_SOURCE_NAME:=onionshare_cli
 PKG_HASH:=47320a5f270b3629586c249fb2ae1c2f67682cb53c5013a8af9702d0d6e50193
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
index b766983757f38a9a8d9b701fd46d243504ede992..1860f4bfa8d380e61f76519de951b1b5cd885200 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=probe-cli-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ooni/probe-cli/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=d34dc096dfdebceaa027716fdf675eb9ab7f0085defb4235f52685d064bd5afa
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.md
 
index 26faa0ac29c43884e79c4131a8f3afb165ee32f1..56000668684b09b707ccec895df2812ab30cf75e 100644 (file)
@@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://erdgeist.org/gitweb/opentracker
-PKG_SOURCE_DATE:=2021-04-25
-PKG_SOURCE_VERSION:=0178c27662bd70640ee17f4659f1f6c482d465be
-PKG_MIRROR_HASH:=2fefe5704a66fba2bd6e33d88e9c66b800e0b45038d97cd82ff84f0ac94473b1
+PKG_SOURCE_DATE:=2021-07-27
+PKG_SOURCE_VERSION:=9a20ebe3f2ee5c4aebb8b5abb679ede92dddb90c
+PKG_MIRROR_HASH:=106993b5ddda3b7c8a33c871909128db2964778f2090e7d4aa0208529274b23e
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=Beerware
index c48320224a113eb266618b84010dcb9a0eccab6b..ff597d6613d4a29f6c933cc399cdc2128ef97bf0 100644 (file)
  
  BINDIR?=$(PREFIX)/bin
  
-@@ -71,7 +71,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $
- $(BINARY): $(OBJECTS) $(HEADERS)
-       $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
--      strip $@
-+      $(STRIP) $@
- $(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
-       $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
- proxy: $(OBJECTS_proxy) $(HEADERS)
diff --git a/net/openvswitch/Config.in b/net/openvswitch/Config.in
new file mode 100644 (file)
index 0000000..ba17072
--- /dev/null
@@ -0,0 +1,8 @@
+menu "Configuration"
+       depends on PACKAGE_openvswitch
+
+       config  OPENVSWITCH_WITH_LIBUNBOUND
+               bool
+               default y
+               prompt "Build with libunbound library."
+endmenu
index 312cae4638f74c1a941b7426a3ca2009e729f9df..6883ba4ba2185c1ac60e25e30d9a69f32e53531b 100644 (file)
@@ -17,7 +17,7 @@ include ./openvswitch.mk
 #
 PKG_NAME:=openvswitch
 PKG_VERSION:=$(ovs_version)
-PKG_RELEASE:=1
+PKG_RELEASE:=6
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
 PKG_HASH:=7d5797f2bf2449c6a266149e88f72123540f7fe7f31ad52902057ae8d8f88c38
@@ -40,6 +40,9 @@ include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-host.mk
 include ../../lang/python/python3-package.mk
 
+define Package/openvswitch/config
+source "$(SOURCE)/Config.in"
+endef
 
 ovs_kmod_packages:=
 ovs_kmod_intree_kernel_patchver_min:=3.10
@@ -150,8 +153,11 @@ $(eval $(call OvsKmodPackageTemplate,openvswitch-lisp-intree))
 #
 ovs_libopenvswitch_title:=Open vSwitch (libopenvswitch.so)
 ovs_libopenvswitch_hidden:=1
-ovs_libopenvswitch_depends:=+libopenssl +libunbound +!(arc||arceb):libunwind
+ovs_libopenvswitch_depends:=+libopenssl +!(arc||arceb):libunwind
 ovs_libopenvswitch_depends+=+libatomic
+ifeq ($(CONFIG_KEEPALIVED_ROUTES),y)
+ovs_libopenvswitch_depends+=+libunbound
+endif
 ovs_libopenvswitch_files:=usr/lib/libopenvswitch*.so*
 $(eval $(call OvsPackageTemplate,libopenvswitch))
 
@@ -243,6 +249,7 @@ CONFIGURE_ARGS+= \
        --disable-silent-rules \
 
 CONFIGURE_VARS += \
+       $(if $(CONFIG_OPENVSWITCH_WITH_LIBUNBOUND),,ac_cv_lib_unbound_ub_ctx_create=no) \
        ovs_cv_flake8=no \
        ovs_cv_python3=$(PYTHON3) \
        ovs_cv_python3_host=$(HOST_PYTHON3_BIN) \
index 9008a886b82c5e235737be46e80946e7cf3493ce..5cc8bbffe544401f1592ce97f331d31480effe14 100644 (file)
@@ -63,17 +63,42 @@ E.g. replace in-tree datapath module with upstream version
 
 # UCI configuration options
 
-There are 4 config section types in package openvswitch:
+There are 5 config section types in package openvswitch:
 ovs ovn_northd, ovn_controller & ovs_bridge.
 
 Each of these supports a disabled option, which should be 
 set to 0 to launch the respective daemons.
 
+The ovs section section also supports the options below, to configure a set of
+SSL CA, certificate and private key. After adding these to Open vSwitch, you
+may specify ssl: connection methods for e.g. the OpenFlow controller. Note that
+Open vSwitch only reads these files during startup, so it needs to be restarted
+after adding or changing these options.
+
+| Name     | Type    | Required | Default | Description                       |
+|----------|---------|----------|---------|-----------------------------------|
+| disabled | boolean | no       | 0       | If set to 1, do not configure SSL |
+| ca       | string  | no       | (none)  | Path to CA certificate            |
+| cert     | string  | no       | (none)  | Path to certificate               |
+| key      | string  | no       | (none)  | Path to private key               |
+
 The ovs_bridge section also supports the options below,
 for initialising a virtual bridge with an OpenFlow controller.
 
-| Name       | Type    | Required | Default                        | Description                                                |
-|------------|---------|----------|--------------------------------|------------------------------------------------------------|
-| disabled   | boolean | no       | 0                              | If set to true, disable initialisation of the named bridge |
-| name       | string  | no       | Inherits UCI config block name | The name of the switch in the OVS daemon                   |
-| controller | string  | no       | (none)                         | The endpoint of an OpenFlow controller for this bridge     |
+| Name        | Type    | Required | Default                        | Description                                                |
+|-------------|---------|----------|--------------------------------|------------------------------------------------------------|
+| disabled    | boolean | no       | 0                              | If set to true, disable initialisation of the named bridge |
+| name        | string  | no       | Inherits UCI config block name | The name of the switch in the OVS daemon                   |
+| controller  | string  | no       | (none)                         | The endpoint of an OpenFlow controller for this bridge     |
+| datapath_id | string  | no       | (none)                         | The OpenFlow datapath ID for this bridge                   |
+
+The ovs_port section can be used to add ports to a bridge. It supports the options below.
+
+| Name     | Type    | Required | Default | Description
+| ---------|---------|----------|---------|------------------------------------------------|
+| disabled | boolean | no       | 0       | If set to 1, do not add the port to the bridge |
+| bridge   | string  | yes      | (none)  | Name of the bridge to add the port to          |
+| port     | string  | yes      | (none)  | Name of the port to add to the bridge          |
+| ofport   | integer | no       | (none)  | OpenFlow port number to be used by the port    |
+| tag      | integer | no       | (none)  | 802.1Q VLAN tag to set on the port             |
+| type     | string  | no       | (none)  | Port type, e.g. internal, erspan, type, ...    |
index 88c2ebc254b83c5125046d106584f69ca7ea453c..c812b7dd67fcae9c1517fe0da66f7f4ecd91dd88 100644 (file)
@@ -1,5 +1,8 @@
 config ovs ovs
        option disabled 1
+       option ca '/etc/openvswitch/example_ca.crt'
+       option cert '/etc/openvswitch/example_cert.crt'
+       option key '/etc/openvswitch/example_key.crt'
 
 config ovn_northd north
        option disabled 1
@@ -10,4 +13,13 @@ config ovn_controller controller
 config ovs_bridge
        option disabled 1
        option name 'my-bridge'
-       option controller 'tcp:192.168.0.1'
\ No newline at end of file
+       option controller 'tcp:192.168.0.1'
+       option datapath_id ''
+
+config ovs_port
+       option disabled 1
+       option bridge 'my-bridge'
+       option port 'ovs-port1'
+       option ofport '1'
+       option tag '123'
+       option type 'internal'
index 23b75c38f72c7ec2e92ca7c60bf8eeecb2e5dbc8..229e6869b9a6c532cf89f337ab961f5a3ad62dca 100755 (executable)
@@ -7,6 +7,8 @@
 . /lib/functions/procd.sh
 START=15
 
+basescript=$(readlink "$initscript")
+
 ovs_ctl="/usr/share/openvswitch/scripts/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
 ovn_ctl="/usr/share/ovn/scripts/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
 
@@ -59,7 +61,12 @@ ovs_action() {
                config_foreach "ovs_xx" "$cfgtype" "$action" "$cfgtype"
        done
 
-       config_foreach ovs_bridge_init "ovs_bridge"
+       case "$action" in
+               restart|start)
+                       config_foreach ovs_bridge_init "ovs_bridge"
+                       ;;
+       esac
+
 }
 
 ovs_xx() {
@@ -83,6 +90,7 @@ ovs_xx() {
                ovs)
                        "$ovs_ctl" "$action" \
                                --system-id=random 1000>&-
+                       ovs_set_ssl
                        ;;
                ovn_*)
                        "$ovn_ctl" "${action}_${cfgtype#ovn_}"
@@ -116,6 +124,47 @@ ovs_bridge_port_add() {
        __port_list="$__port_list ${port} "
 }
 
+ovs_bridge_port_add_complex() {
+       local cfg="$1"
+       local cur_bridge="$2"
+
+       local bridge disabled ofport port tag type
+       local cur_tag cur_type del_port
+
+       config_get_bool disabled "$cfg" disabled 0
+       [ "$disabled" = "0" ] || return
+
+       config_get bridge "$cfg" bridge
+       [ "$bridge" = "$cur_bridge" ] || return
+       ovs-vsctl br-exists "$bridge" || return
+
+       config_get port "$cfg" port
+       [ -n "$port" ] || return
+
+       config_get ofport "$cfg" ofport
+
+       config_get tag "$cfg" tag
+       if [ -n "$tag" ]; then
+               if cur_tag="$(ovs-vsctl get port "$port" tag 2>/dev/null)"; then
+                       [ "$tag" = "$cur_tag" ] || del_port=1
+               fi
+       fi
+
+       config_get type "$cfg" type
+       if [ -n "$type" ]; then
+               if cur_type="$(ovs-vsctl get interface "$port" type 2>/dev/null)"; then
+                       [ "$type" = "$cur_type" ] || del_port=1
+               fi
+       fi
+
+       [ "${del_port:-0}" -eq 1 ] && ovs-vsctl --if-exists del-port "$bridge" "$port"
+
+       ovs-vsctl --may-exist add-port "$bridge" "$port" ${tag:+tag="$tag"} \
+               ${ofport:+ -- set interface "$port" ofport_request="$ofport"} \
+               ${type:+ -- set interface "$port" type="$type"}
+       __port_list="$__port_list ${port} "
+}
+
 ovs_bridge_port_cleanup() {
        for port in `ovs-vsctl list-ports "$name"`; do
                case "$__port_list" in
@@ -125,12 +174,26 @@ ovs_bridge_port_cleanup() {
        done
 }
 
+ovs_bridge_validate_datapath_id() {
+       local dpid="$1"
+
+       if expr "$dpid" : '[[:xdigit:]]\{16\}$' > /dev/null; then
+               return 0
+       elif expr "$dpid" : '0x[[:xdigit:]]\{1,16\}$' > /dev/null; then
+               return 0
+       else
+               logger -t openvswitch "invalid datapath_id: $dpid"
+               return 1
+       fi
+}
+
 ovs_bridge_init() {
        local cfg="$1"
 
        local disabled
        local name
        local controller
+       local datapath_id
 
        config_get_bool disabled "$cfg" disabled 0
        [ "$disabled" == "0" ] || return
@@ -138,7 +201,15 @@ ovs_bridge_init() {
        config_get name "$cfg" name $cfg
        ovs-vsctl --may-exist add-br "$name"
 
+       config_get datapath_id "$cfg" datapath_id
+       [ -n "$datapath_id" ] && {
+               ovs_bridge_validate_datapath_id "$datapath_id" && {
+                       ovs-vsctl --if-exists set bridge "$name" other-config:datapath-id="$datapath_id"
+               }
+       }
+
        config_list_foreach "$cfg" "ports" ovs_bridge_port_add
+       config_foreach ovs_bridge_port_add_complex ovs_port "$name"
        config_get_bool drop "$cfg" "drop_unknown_ports" 0
        [ "$drop" == 1 ] && ovs_bridge_port_cleanup
 
@@ -146,3 +217,14 @@ ovs_bridge_init() {
        [ -n "$controller" ] && \
                ovs-vsctl set-controller "$name" "$controller"
 }
+
+ovs_set_ssl() {
+       local ca="$(uci -q get openvswitch.ovs.ca)"
+       [ -f "$ca" ] || return
+       local cert="$(uci get openvswitch.ovs.cert)"
+       [ -f "$cert" ] || return
+       local key="$(uci get openvswitch.ovs.key)"
+       [ -f "$key" ] || return
+
+       ovs-vsctl set-ssl "$key" "$cert" "$ca"
+}
index 2c86a3048f7f861985bd198ab663b601c0e0b654..434b56e670e5944c575ce19969dda33c73866f62 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  BUILT_SOURCES =
 --- a/m4/openvswitch.m4
 +++ b/m4/openvswitch.m4
-@@ -383,6 +383,8 @@ else:
+@@ -372,6 +372,8 @@ else:
       AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
     fi
     AC_ARG_VAR([PYTHON3])
index 19ea959ef6a6892ac232299073727e80d60720af..3e0eca5158e1a7e6f7fd399b03b58523831f1dcc 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
 
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -475,12 +475,10 @@ dist-docs:
+@@ -477,12 +477,10 @@ dist-docs:
        VERSION=$(VERSION) MAKE='$(MAKE)' $(srcdir)/build-aux/dist-docs $(srcdir) $(docs)
  .PHONY: dist-docs
  
index 86c1d41bff9bf536bf95c7ea54aff84d1c1b467a..1491af51d5cc254090b4bbe950be125adebdf146 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  Cflags: -I${includedir}/openvswitch
 --- a/m4/openvswitch.m4
 +++ b/m4/openvswitch.m4
-@@ -657,7 +657,8 @@ AC_DEFUN([OVS_CHECK_UNBOUND],
+@@ -646,7 +646,8 @@ AC_DEFUN([OVS_CHECK_UNBOUND],
    [AC_CHECK_LIB(unbound, ub_ctx_create, [HAVE_UNBOUND=yes], [HAVE_UNBOUND=no])
     if test "$HAVE_UNBOUND" = yes; then
       AC_DEFINE([HAVE_UNBOUND], [1], [Define to 1 if unbound is detected.])
@@ -42,7 +42,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
     fi
     AM_CONDITIONAL([HAVE_UNBOUND], [test "$HAVE_UNBOUND" = yes])
     AC_SUBST([HAVE_UNBOUND])])
-@@ -669,7 +670,8 @@ AC_DEFUN([OVS_CHECK_UNWIND],
+@@ -658,7 +659,8 @@ AC_DEFUN([OVS_CHECK_UNWIND],
     [HAVE_UNWIND=no])
     if test "$HAVE_UNWIND" = yes; then
       AC_DEFINE([HAVE_UNWIND], [1], [Define to 1 if unwind is detected.])
index 4b0a2e7fd4843b485560ca0a83f4b0f4ef6ea557..55a663294c0fe851fcf31ea4e1ace988b265bee1 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pdns
-PKG_VERSION:=4.4.1
+PKG_VERSION:=4.5.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
-PKG_HASH:=03fa7c181c666a5fc44a49affe7666bd385d46c1fe15088caff175967e85ab6c
+PKG_HASH:=74d63c7aa0474de3c2137bb808164691a1a3a62942d2a9a70b648cd277923f9b
 
 PKG_MAINTAINER:=Peter van Dijk <peter.van.dijk@powerdns.com>
 PKG_LICENCE:=GPL-2.0-only
@@ -171,6 +171,8 @@ define Package/pdns/conffiles
 /etc/init.d/pdns
 endef
 
+TARGET_CXX+=-std=c++17
+
 CONFIGURE_ARGS+= \
        --sysconfdir=/etc/powerdns \
        --libdir=/usr/lib/powerdns  \
index 3d416adb0bfd143527c6760cfe6094733ac2e4e8..12e805e19d78ca949be3c10ff6b48443ef389ee6 100644 (file)
@@ -1,4 +1,10 @@
 # Autogenerated configuration file template
+
+#################################
+# ignore-unknown-settings      Configuration settings to ignore if they are unknown
+#
+# ignore-unknown-settings=
+
 #################################
 # 8bit-dns     Allow 8bit dns queries
 #
 # allow-notify-from=0.0.0.0/0,::/0
 
 #################################
-# allow-unsigned-notify        Allow unsigned notifications for TSIG secured domains
+# allow-unsigned-autoprimary   Allow autoprimaries to create zones without TSIG signed NOTIFY
+#
+# allow-unsigned-autoprimary=yes
+
+#################################
+# allow-unsigned-notify        Allow unsigned notifications for TSIG secured zones
 #
 # allow-unsigned-notify=yes
 
@@ -30,7 +41,7 @@
 # allow-unsigned-supermaster=yes
 
 #################################
-# also-notify  When notifying a domain, also notify these nameservers
+# also-notify  When notifying a zone, also notify these nameservers
 #
 # also-notify=
 
 #
 # api-key=
 
+#################################
+# autosecondary        Act as an autosecondary (formerly superslave)
+#
+# autosecondary=no
+
 #################################
 # axfr-fetch-timeout   Maximum time in seconds for inbound AXFR to start or be idle after starting
 #
@@ -65,7 +81,7 @@
 # cache-ttl=20
 
 #################################
-# carbon-instance      If set overwrites the the instance name default
+# carbon-instance      If set overwrites the instance name default
 #
 # carbon-instance=auth
 
 #
 # config-name=
 
+#################################
+# consistent-backends  Assume individual zones are not divided over backends. Send only ANY lookup operations to the backend to reduce the number of lookups
+#
+# consistent-backends=yes
+
 #################################
 # control-console      Debugging switch - don't use
 #
 # default-ksk-size=0
 
 #################################
-# default-soa-edit     Default SOA-EDIT value
+# default-publish-cdnskey      Default value for PUBLISH-CDNSKEY
 #
-# default-soa-edit=
+# default-publish-cdnskey=
 
 #################################
-# default-soa-edit-signed      Default SOA-EDIT value for signed zones
+# default-publish-cds  Default value for PUBLISH-CDS
 #
-# default-soa-edit-signed=
+# default-publish-cds=
+
+#################################
+# default-soa-content  Default SOA content
+#
+# default-soa-content=a.misconfigured.dns.server.invalid hostmaster.@ 0 10800 3600 604800 3600
 
 #################################
-# default-soa-mail     mail address to insert in the SOA record if none set in the backend
+# default-soa-edit     Default SOA-EDIT value
 #
-# default-soa-mail=
+# default-soa-edit=
 
 #################################
-# default-soa-name     name to insert in the SOA record if none set in the backend
+# default-soa-edit-signed      Default SOA-EDIT value for signed zones
 #
-# default-soa-name=a.misconfigured.powerdns.server
+# default-soa-edit-signed=
 
 #################################
 # default-ttl  Seconds a result is valid if not set otherwise
 # dnsupdate=no
 
 #################################
-# do-ipv6-additional-processing        Do AAAA additional processing
+# domain-metadata-cache-ttl    Seconds to cache zone metadata from the database
 #
-# do-ipv6-additional-processing=yes
-
-#################################
-# domain-metadata-cache-ttl    Seconds to cache domain metadata from the database
-#
-# domain-metadata-cache-ttl=60
+# domain-metadata-cache-ttl=
 
 #################################
 # edns-subnet-processing       If we should act on EDNS Subnet options
 # expand-alias=no
 
 #################################
-# forward-dnsupdate    A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master.
+# forward-dnsupdate    A global setting to allow DNS update packages that are for a Slave zone, to be forwarded to the master.
 #
 # forward-dnsupdate=yes
 
 #################################
 # local-address        Local IP addresses to which we bind
 #
-# local-address=0.0.0.0
+# local-address=0.0.0.0, ::
 
 #################################
 # local-address-nonexist-fail  Fail to start if one or more of the local-address's do not exist on this server
 #
 # local-address-nonexist-fail=yes
 
-#################################
-# local-ipv6   Local IP address to which we bind
-#
-# local-ipv6=::
-
-#################################
-# local-ipv6-nonexist-fail     Fail to start if one or more of the local-ipv6 addresses do not exist on this server
-#
-# local-ipv6-nonexist-fail=yes
-
 #################################
 # local-port   The port on which we listen
 #
 #
 # lua-dnsupdate-policy-script=
 
+#################################
+# lua-health-checks-expire-delay       Stops doing health checks after the record hasn't been used for that delay (in seconds)
+#
+# lua-health-checks-expire-delay=3600
+
+#################################
+# lua-health-checks-interval   LUA records health checks monitoring interval in seconds
+#
+# lua-health-checks-interval=5
+
 #################################
 # lua-prequery-script  Lua script with prequery handler (DO NOT USE)
 #
 # lua-records-exec-limit=1000
 
 #################################
-# master       Act as a master
+# master       Act as a primary
 #
 # master=no
 
 #
 # max-ent-entries=100000
 
+#################################
+# max-generate-steps   Maximum number of $GENERATE steps when loading a zone from a file
+#
+# max-generate-steps=0
+
 #################################
 # max-nsec3-iterations Limit the number of NSEC3 hash iterations
 #
-# max-nsec3-iterations=500
+# max-nsec3-iterations=100
 
 #################################
 # max-packet-cache-entries     Maximum number of entries in the packet cache
 # prevent-self-notification=yes
 
 #################################
-# query-cache-ttl      Seconds to store query results in the QueryCache
+# primary      Act as a primary
 #
-# query-cache-ttl=20
+# primary=no
 
 #################################
-# query-local-address  Source IP address for sending queries
+# query-cache-ttl      Seconds to store query results in the QueryCache
 #
-# query-local-address=0.0.0.0
+# query-cache-ttl=20
 
 #################################
-# query-local-address6 Source IPv6 address for sending queries
+# query-local-address  Source IP addresses for sending queries
 #
-# query-local-address6=::
+# query-local-address=0.0.0.0 ::
 
 #################################
 # query-logging        Hint backends that queries should be logged
 # rng=auto
 
 #################################
-# security-poll-suffix Domain name from which to query security update notifications
+# secondary    Act as a secondary
+#
+# secondary=no
+
+#################################
+# secondary-do-renotify        If this secondary should send out notifications after receiving zone transfers from a primary
+#
+# secondary-do-renotify=no
+
+#################################
+# security-poll-suffix Zone name from which to query security update notifications
 #
 # security-poll-suffix=secpoll.powerdns.com.
 
 #################################
-# send-signed-notify   Send TSIG secured NOTIFY if TSIG key is configured for a domain
+# send-signed-notify   Send TSIG secured NOTIFY if TSIG key is configured for a zone
 #
 # send-signed-notify=yes
 
 # signing-threads=3
 
 #################################
-# slave        Act as a slave
+# slave        Act as a secondary
 #
 # slave=no
 
 # slave-cycle-interval=60
 
 #################################
-# slave-renotify       If we should send out notifications for slaved updates
+# slave-renotify       If we should send out notifications for secondaried updates
 #
 # slave-renotify=no
 
 #################################
-# soa-expire-default   Default SOA expire
-#
-# soa-expire-default=604800
-
-#################################
-# soa-minimum-ttl      Default SOA minimum ttl
-#
-# soa-minimum-ttl=3600
-
-#################################
-# soa-refresh-default  Default SOA refresh
+# socket-dir   Where the controlsocket will live, /var/run/pdns when unset and not chrooted. Set to the RUNTIME_DIRECTORY environment variable when that variable has a value (e.g. under systemd).
 #
-# soa-refresh-default=10800
-
-#################################
-# soa-retry-default    Default SOA retry
-#
-# soa-retry-default=3600
+# socket-dir=
 
 #################################
-# socket-dir   Where the controlsocket will live, /var/run when unset and not chrooted
+# superslave   Act as a autosecondary
 #
-# socket-dir=
+# superslave=no
 
 #################################
-# superslave   Act as a superslave
+# svc-autohints        Transparently fill ipv6hint=auto ipv4hint=auto SVC params with AAAA/A records for the target name of the record (if within the same zone)
 #
-# superslave=no
+# svc-autohints=no
 
 #################################
 # tcp-control-address  If set, PowerDNS can be controlled over TCP on this address
 #
 # udp-truncation-threshold=1232
 
+#################################
+# upgrade-unknown-types        Transparently upgrade known TYPExxx records. Recommended to keep off, except for PowerDNS upgrades until data sources are cleaned up
+#
+# upgrade-unknown-types=no
+
 #################################
 # version-string       PowerDNS version in packets - full, anonymous, powerdns or custom
 #
 #
 # write-pid=yes
 
+#################################
+# xfr-cycle-interval   Schedule primary/secondary SOA freshness checks once every .. seconds
+#
+# xfr-cycle-interval=60
+
 #################################
 # xfr-max-received-mbytes      Maximum number of megabytes received from an incoming XFR
 #
 # xfr-max-received-mbytes=100
 
+#################################
+# zone-cache-refresh-interval  Seconds to cache list of known zones
+#
+# zone-cache-refresh-interval=300
+
+#################################
+# zone-metadata-cache-ttl      Seconds to cache zone metadata from the database
+#
+# zone-metadata-cache-ttl=60
 
diff --git a/net/pdns/patches/010-time_t-check.patch b/net/pdns/patches/010-time_t-check.patch
new file mode 100644 (file)
index 0000000..ba477c5
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,6 @@ AC_PROG_CC
+ AC_PROG_CXX
+ AC_LANG([C++])
+-PDNS_CHECK_TIME_T
+ PDNS_CHECK_BISON
+ PDNS_CHECK_FLEX
index 9ac7ab8e7afe08114fb7919f5835b18a0318a0c0..d32d84aa9eed67508dcf557516385363dfddcaf6 100644 (file)
@@ -1,14 +1,14 @@
 --- a/pdns/Makefile.am
 +++ b/pdns/Makefile.am
 @@ -71,7 +71,6 @@ CLEANFILES = \
+       backends/gsql/gsqlbackend.gcda \
        backends/gsql/gsqlbackend.gcno \
        backends/gsql/gsqlbackend.gcov \
-       dnsmessage.pb.cc dnsmessage.pb.h \
 -      pdns.conf-dist \
-       apidocfiles.h \
-       api-swagger.yaml \
-       api-swagger.json
-@@ -99,7 +98,6 @@ apidocfiles.h: api-swagger.yaml api-swag
+       apidocfiles.h
+ if !HAVE_API_SWAGGER_JSON
+@@ -105,7 +104,6 @@ apidocfiles.h: api-swagger.yaml api-swag
        ./incfiles $^ > $@
  
  noinst_SCRIPTS = pdns.init
@@ -16,7 +16,7 @@
  
  sbin_PROGRAMS = pdns_server
  bin_PROGRAMS = \
-@@ -139,7 +137,7 @@ if IXFRDIST
+@@ -146,7 +144,7 @@ if IXFRDIST
  bin_PROGRAMS += \
        ixfrdist
  
@@ -25,9 +25,9 @@
        ixfrdist.example.yml
  endif
  
-@@ -1278,9 +1276,6 @@ dnspcap2protobuf_LDADD = \
- endif
- endif
+@@ -1299,9 +1297,6 @@ dnspcap2protobuf_LDADD = \
+       $(BOOST_PROGRAM_OPTIONS_LIBS) \
+       $(RT_LIBS)
  
 -pdns.conf-dist: pdns_server
 -      $(AM_V_GEN)./pdns_server --config=default 2>/dev/null > $@
index f9b4d235b4e2c3992485205de20de24436cb67c9..d521a2e80c0039797ea4f88e210c37d0b26f3424 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
 PKG_VERSION:=1.8.7
-PKG_RELEASE:=3
+PKG_RELEASE:=6
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 PKG_LICENSE:=GPL-3.0-or-later
 
index 211412069ee326a4c779be240bb71a94f5bffbcd..7999877056826261263834ebaf24b897cf9731e8 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh /etc/rc.common
 # Copyright 2017-2020 Stan Grishin (stangri@melmac.net)
-# shellcheck disable=SC2039,SC1091,SC2016
+# shellcheck disable=SC2039,SC1091,SC2016,SC3043,SC3057,SC3060
 PKG_VERSION='dev-test'
 
 # shellcheck disable=SC2034
@@ -9,12 +9,20 @@ START=94
 USE_PROCD=1
 LC_ALL=C
 
-extra_command 'check' 'Checks if specified domain is found in current block-list'
-extra_command 'dl' 'Force-downloads all enabled block-list'
-extra_command 'killcache' 'Delete all cached files'
-extra_command 'sizes' 'Displays the file-sizes of enabled block-listo'
-extra_command 'show' 'Shows the service last-run status'
-extra_command 'version' 'Show version information'
+if type extra_command 1>/dev/null 2>&1; then
+       extra_command 'check' 'Checks if specified domain is found in current block-list'
+       extra_command 'dl' 'Force-downloads all enabled block-list'
+       extra_command 'killcache' 'Delete all cached files'
+       extra_command 'sizes' 'Displays the file-sizes of enabled block-lists'
+       extra_command 'version' 'Show version information'
+else
+# shellcheck disable=SC2034
+       EXTRA_COMMANDS='check dl killcache sizes status_service version'
+# shellcheck disable=SC2034
+       EXTRA_HELP='    check   Checks if specified domain is found in current block-list
+       dl      Force-downloads all enabled block-list
+       sizes   Displays the file-sizes of enabled block-lists'
+fi
 
 readonly packageName='simple-adblock'
 readonly serviceName="$packageName $PKG_VERSION"
@@ -574,7 +582,7 @@ process_url() {
        else
                type='Allowed'; D_TMP="$A_TMP";
        fi
-       if [ "${1:0:5}" == "https" ] && [ -z "$isSSLSupported" ]; then
+       if [ "${1:0:5}" = "https" ] && [ -z "$isSSLSupported" ]; then
                output 1 "$_FAIL_"
                output 2 "[DL] $type $label $__FAIL__\\n"
                echo "errorNoSSLSupport|${1}" >> "$sharedMemoryError"
@@ -867,7 +875,7 @@ start_service() {
        elif [ "$action" = 'restart' ] || [ "$1" = 'restart' ]; then
                action='restart'
        elif [ -s "$outputFile" ] && [ "$status" = "statusSuccess" ] && [ -z "$error" ]; then
-               showstatus
+               status_service
                exit 0
        else
                action='download'
@@ -986,12 +994,12 @@ start_service() {
                jsonOps del message
                jsonOps set status "statusSuccess"
                jsonOps set stats "$serviceName is blocking $(wc -l < "$outputFile") domains (with ${targetDNS})"
-               showstatus
+               status_service
        else
                output 0 "$__FAIL__\\n";
                jsonOps set status "statusFail"
                jsonOps add error "errorOhSnap"
-               showstatus
+               status_service
        fi
 }
 
@@ -1014,10 +1022,10 @@ killcache() {
        return 0
 }
 
-show() { showstatus; }
-status_service() { showstatus; }
-showstatus() {
+status_service() {
        local c url status message error stats
+       config_load "$packageName"
+       config_get verbosity 'config' 'verbosity' '2'
        status="$(jsonOps get status)"
        message="$(jsonOps get message)"
        error="$(jsonOps get error)"
@@ -1041,7 +1049,7 @@ showstatus() {
                                *)
                                        output "$_ERROR_: $(getErrorText "$c")!\\n";;
                        esac
-                       let n=n+1
+                       n=$((n+1))
                done
        fi
 }
index df165e5e0931f7153e64d5f6d6d7b772f7c66248..0dcc741d7906b46d7e67c9ccff8f8c68cbeed5a7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sshfs
-PKG_VERSION:=3.7.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.7.2
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/libfuse/sshfs/releases/download/$(PKG_NAME)-$(PKG_VERSION)
-PKG_HASH:=fe5d3436d61b46974889e0c4515899c21a9d67851e3793c209989f72353d7750
+PKG_HASH:=1c596d42724d13aeba9f49ee127b8ef2fdeb813e25c6018f92d0c9ec4754fa2d
 
 PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
 PKG_LICENSE:=GPL-2.0-only
index 8a8993e34a8fc9a44849b2217fbabcc31676acb3..7aeb513cb7757b16fbba3b4ab04e159b907e1072 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE:=tailscale-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/tailscale/tailscale/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=afb4b4f6f53e6fc00e43546e9b4e82b9c1ac7bdef688247d7fb64a028b8db487
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
index 18979bc3caf4e5087854e26f790fd3932ade82e5..047ba3efa56b342853cc37652a98c4da68deb229 100644 (file)
@@ -11,7 +11,7 @@ PKG_NAME:=tor-hs
 PKG_VERSION:=0.0.1
 PKG_RELEASE:=3
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
index 7cd132396283f1709817429413a89c68a3e2efa5..b0bcbedb14218307ca56a668ddb5d04b49d3751c 100644 (file)
@@ -15,7 +15,7 @@ PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=LICENSE
 
index 4fafe228b5c5294e6b5d396b484d6fd751e08c96..14b4daf2f3ee1c25af8065a1d30e8ed6c14ec3eb 100644 (file)
@@ -9,13 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=3.00
-PKG_RELEASE:=12
+PKG_RELEASE:=13
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
 PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
 
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
diff --git a/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch b/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch
new file mode 100644 (file)
index 0000000..a3fd634
--- /dev/null
@@ -0,0 +1,68 @@
+From 98da2afa58b7bdf5350de16fd99905ddb04e1b0d Mon Sep 17 00:00:00 2001
+From: Dan Walters <dan@walters.io>
+Date: Sun, 13 Oct 2019 10:08:36 -0500
+Subject: [PATCH] Apply the configured peer socket TOS to UDP sockets, not just
+ TCP.
+
+---
+ libtransmission/session.c |  2 ++
+ libtransmission/tr-udp.c  | 20 ++++++++++++++++++++
+ libtransmission/tr-udp.h  |  1 +
+ 3 files changed, 23 insertions(+)
+
+--- a/libtransmission/session.c
++++ b/libtransmission/session.c
+@@ -2274,6 +2274,8 @@ static void toggle_utp(void* data)
+     tr_udpSetSocketBuffers(session);
++    tr_udpSetSocketTOS(session);
++
+     /* But don't call tr_utpClose -- see reset_timer in tr-utp.c for an
+        explanation. */
+ }
+--- a/libtransmission/tr-udp.c
++++ b/libtransmission/tr-udp.c
+@@ -125,6 +125,24 @@ void tr_udpSetSocketBuffers(tr_session*
+     }
+ }
++void tr_udpSetSocketTOS(tr_session* session)
++{
++    if (session->peerSocketTOS == 0)
++    {
++        return;
++    }
++
++    if (session->udp_socket != TR_BAD_SOCKET)
++    {
++        tr_netSetTOS(session->udp_socket, session->peerSocketTOS, TR_AF_INET);
++    }
++
++    if (session->udp6_socket != TR_BAD_SOCKET)
++    {
++        tr_netSetTOS(session->udp6_socket, session->peerSocketTOS, TR_AF_INET6);
++    }
++}
++
+ /* BEP-32 has a rather nice explanation of why we need to bind to one
+    IPv6 address, if I may say so myself. */
+@@ -363,6 +381,8 @@ ipv6:
+     tr_udpSetSocketBuffers(ss);
++    tr_udpSetSocketTOS(ss);
++
+     if (ss->isDHTEnabled)
+     {
+         tr_dhtInit(ss);
+--- a/libtransmission/tr-udp.h
++++ b/libtransmission/tr-udp.h
+@@ -30,5 +30,6 @@ THE SOFTWARE.
+ void tr_udpInit(tr_session*);
+ void tr_udpUninit(tr_session*);
+ void tr_udpSetSocketBuffers(tr_session*);
++void tr_udpSetSocketTOS(tr_session*);
+ bool tau_handle_message(tr_session* session, uint8_t const* msg, size_t msglen);
index 8a31e5e16763ced3238811309a92ae94a956d2cc..00caaf467bd362806fb7735bf017822e35ae3e11 100644 (file)
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=2.0.3
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.4
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 3b23f467c501fae1b7270f13e02ea219349cc594..905824ad79680e7a71b1c3c101441c2e7d346e99 100755 (executable)
@@ -1,43 +1,40 @@
 #!/bin/sh
-# captive portal auto-login script for german chs hotels
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# captive portal auto-login script for chs hotels (DE)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2181,3040
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
        . "/lib/functions.sh"
 fi
 
 trm_domain="hotspot.internet-for-guests.com"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
 trm_fetch="$(command -v curl)"
 
-# initial get request to receive & extract valid security tokens
+# get security tokens
 #
-"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait/6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "https://${trm_domain}/logon/cgi/index.cgi"
-if [ -r "/tmp/${trm_domain}.cookie" ]
-then
-       lg_id="$(awk '/LGNSID/{print $7}' "/tmp/${trm_domain}.cookie")"
-       ta_id="$(awk '/ta_id/{print $7}' "/tmp/${trm_domain}.cookie")"
-       cl_id="$(awk '/cl_id/{print $7}' "/tmp/${trm_domain}.cookie")"
-       rm -f "/tmp/${trm_domain}.cookie"
-else
-       exit 2
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait / 6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "https://${trm_domain}/logon/cgi/index.cgi"
+lg_id="$(awk '/LGNSID/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+ta_id="$(awk '/ta_id/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+cl_id="$(awk '/cl_id/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${lg_id}" ] || [ -z "${ta_id}" ] || [ -z "${cl_id}" ]; then
+       exit 1
 fi
 
-# final post request/login with valid session cookie/security token
+# final login request
 #
-if [ -n "${lg_id}" ] && [ -n "${ta_id}" ] && [ -n "${cl_id}" ]
-then
-       "${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}/logon/cgi/index.cgi" --silent --connect-timeout $((trm_maxwait/6)) --header "Cookie: LGNSID=${lg_id}; lang=en_US; use_mobile_interface=0; ta_id=${ta_id}; cl_id=${cl_id}" --data "accept_termsofuse=&freeperperiod=1&device_infos=1125:2048:1152:2048" --output /dev/null "https://${trm_domain}/logon/cgi/index.cgi"
-else
-       exit 3
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}/logon/cgi/index.cgi" --silent --connect-timeout $((trm_maxwait / 6)) --header "Cookie: LGNSID=${lg_id}; lang=en_US; use_mobile_interface=0; ta_id=${ta_id}; cl_id=${cl_id}" --data "accept_termsofuse=&freeperperiod=1&device_infos=1125:2048:1152:2048" --output /dev/null "https://${trm_domain}/logon/cgi/index.cgi"
+if [ "${?}" != "0" ]; then
+       exit 2
 fi
index a0ab505b50929d111247cd4b0d48002783b690bc..2b4bf30f5223ced9299e5e638ccca3e53db7c6dc 100755 (executable)
@@ -1,65 +1,49 @@
 #!/bin/sh
-# captive portal auto-login script for german DB hotspots via portal login API
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# captive portal auto-login script for DB hotspots (DE)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2181,3040
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
        . "/lib/functions.sh"
 fi
 
 trm_domain="wifi.bahn.de"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
 trm_fetch="$(command -v curl)"
 
-# initial get request to receive all header information
-#
-"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait/6)) --include --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "http://${trm_domain}"
-
-# extract the session cookie and the hotspot location
+# get all header information
 #
-if [ -s "/tmp/${trm_domain}.cookie" ]
-then
-       sec_token="$(awk 'BEGIN{FS="[ ;]"}/^Set-Cookie:/{print $2}' "/tmp/${trm_domain}.cookie")"
-       location="$(awk '/^Location:/{print $2}' "/tmp/${trm_domain}.cookie")"
-       rm -f "/tmp/${trm_domain}.cookie"
-else
-       exit 2
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait / 6)) --include --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "http://${trm_domain}"
+sec_token="$(awk 'BEGIN{FS="[ ;]"}/^Set-Cookie:/{print $2}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+location="$(awk '/^Location:/{print $2}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${sec_token}" ] || [ -z "${location}" ]; then
+       exit 1
 fi
 
 # post request to subscribe to the portal API
 #
-if [ -n "${sec_token}" ] && [ -n "${location}" ]
-then
-       "${trm_fetch}" --user-agent "${trm_useragent}" --referer "${location}" --silent  --connect-timeout $((trm_maxwait/6)) --include --cookie-jar "/tmp/${trm_domain}.cookie" --header "Cookie: ${sec_token}" --data "action=subscribe&type=one&connect_policy_accept=false&user_login=&user_password=&user_password_confirm=&email_address=&prefix=&phone=&policy_accept=false&gender=&interests=" --output /dev/null "https://${trm_domain}/portal_api.php"
-else
-       exit 3
-fi
-
-# extract additional login and password information from the portal API
-#
-if [ -s "/tmp/${trm_domain}.cookie" ]
-then
-       login="$(awk 'BEGIN{FS="[\"]"}/^\{\"info/{print $12}' "/tmp/${trm_domain}.cookie")"
-       password="$(awk 'BEGIN{FS="[\"]"}/^\{\"info/{print $16}' "/tmp/${trm_domain}.cookie")"
-       rm -f "/tmp/${trm_domain}.cookie"
-else
-       exit 4
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "${location}" --silent --connect-timeout $((trm_maxwait / 6)) --include --cookie-jar "/tmp/${trm_domain}.cookie" --header "Cookie: ${sec_token}" --data "action=subscribe&type=one&connect_policy_accept=false&user_login=&user_password=&user_password_confirm=&email_address=&prefix=&phone=&policy_accept=false&gender=&interests=" --output /dev/null "https://${trm_domain}/portal_api.php"
+login="$(awk 'BEGIN{FS="[\"]"}/^\{\"info/{print $12}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+password="$(awk 'BEGIN{FS="[\"]"}/^\{\"info/{print $16}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${login}" ] && [ -z "${password}" ]; then
+       exit 2
 fi
 
 # final post request to authenticate to the portal API
 #
-if [ -n "${login}" ] && [ -n "${password}" ]
-then
-       "${trm_fetch}" --user-agent "${trm_useragent}" --referer "${location}" --silent --connect-timeout $((trm_maxwait/6)) --header "Cookie: ${sec_token}" --data "action=authenticate&login=${login}&password=${password}&policy_accept=false&from_ajax=true&wispr_mode=false" "https://${trm_domain}/portal_api.php"
-else
-       exit 5
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "${location}" --silent --connect-timeout $((trm_maxwait / 6)) --header "Cookie: ${sec_token}" --data "action=authenticate&login=${login}&password=${password}&policy_accept=false&from_ajax=true&wispr_mode=false" "https://${trm_domain}/portal_api.php"
+if [ "${?}" != "0" ]; then
+       exit 3
 fi
index 60c3b5a92c762a65108ab8e69960bfcee5bbf9f0..687a183589326203de8a7e32a23b51b51795d699 100755 (executable)
@@ -1,35 +1,32 @@
 #!/bin/sh
 # captive portal auto-login script template with credentials as parameters
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2039,3040
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
        . "/lib/functions.sh"
 fi
 
-trm_domain="example.com"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
-trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
-trm_fetch="$(command -v curl)"
-
 user="${1}"
 password="${2}"
 success="Thank you!"
+trm_domain="example.com"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
+trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
+trm_fetch="$(command -v curl)"
 
 # login with credentials
 #
-response="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait/6)) --data "username=${user}&password=${password}" --header "Content-Type:application/x-www-form-urlencoded" "http://${trm_domain}")"
-if [ -n "$(printf "%s" "${response}" | grep "${success}")" ]
-then
-       exit 0
-else
-       exit 2
+raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --silent --show-error --header "Content-Type:application/x-www-form-urlencoded" --data "username=${user}&password=${password}" "http://${trm_domain}")"
+if [ -n "${raw_html##*${success}*}" ]; then
+       exit 1
 fi
index a72e217f73816e63c9563606645779fd4127e848..fa55f7d36ea25ae92b8e172776d07f794a7554f8 100755 (executable)
@@ -1,43 +1,40 @@
 #!/bin/sh
-# captive portal auto-login script for Telekom hotspots in german h+hotels
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# captive portal auto-login script for Telekom hotspots in h+hotels (DE)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2181,3040
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
-       . "/lib/functions.sh"
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+    . "/lib/functions.sh"
 fi
 
 trm_domain="hotspot.t-mobile.net"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
 trm_fetch="$(command -v curl)"
 
-# initial get request to receive & extract valid security tokens
+# get security tokens
 #
-"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait/6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "https://${trm_domain}/wlan/rest/freeLogin"
-if [ -r "/tmp/${trm_domain}.cookie" ]
-then
-       ses_id="$(awk '/JSESSIONID/{print $7}' "/tmp/${trm_domain}.cookie")"
-       sec_id="$(awk '/DT_H/{print $7}' "/tmp/${trm_domain}.cookie")"
-       dev_id="$(sha256sum /etc/config/wireless | awk '{printf "%s",substr($1,1,13)}')"
-       rm -f "/tmp/${trm_domain}.cookie"
-else
-       exit 2
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait / 6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "https://${trm_domain}/wlan/rest/freeLogin"
+ses_id="$(awk '/JSESSIONID/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+sec_id="$(awk '/DT_H/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+dev_id="$(sha256sum /etc/config/wireless 2>/dev/null | awk '{printf "%s",substr($1,1,13)}' 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${ses_id}" ] || [ -z "${sec_id}" ] || [ -z "${dev_id}" ]; then
+       exit 1
 fi
 
-# final post request/login with valid session cookie/security token
+# final post request
 #
-if [ -n "${ses_id}" ] && [ -n "${sec_id}" ] && [ -n "${dev_id}" ]
-then
-       "${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}/TD/hotspot/H_Hotels/en_GB/index.html" --silent --connect-timeout $((trm_maxwait/6)) --header "Cookie: JSESSIONID=${ses_id}; DT_DEV_ID=${dev_id}; DT_H=${sec_id}" --data "rememberMe=true" --output /dev/null "https://${trm_domain}/wlan/rest/freeLogin"
-else
-       exit 3
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}/TD/hotspot/H_Hotels/en_GB/index.html" --silent --connect-timeout $((trm_maxwait / 6)) --header "Cookie: JSESSIONID=${ses_id}; DT_DEV_ID=${dev_id}; DT_H=${sec_id}" --data "rememberMe=true" --output /dev/null "https://${trm_domain}/wlan/rest/freeLogin"
+if [ "${?}" != "0" ]; then
+       exit 2
 fi
diff --git a/net/travelmate/files/julianahoeve.login b/net/travelmate/files/julianahoeve.login
new file mode 100755 (executable)
index 0000000..f4927c3
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# captive portal auto-login script for Julianahoeve beach resort (NL)
+# Copyright (c) 2021 Dirk Brenken (dev@brenken.org)
+# This is free software, licensed under the GNU General Public License v3.
+
+# set (s)hellcheck exceptions
+# shellcheck disable=1091,2039,2181,3040
+
+export LC_ALL=C
+export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+set -o pipefail
+
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+       . "/lib/functions.sh"
+fi
+
+trm_domain="n23.network-auth.com"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
+trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
+trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
+trm_fetch="$(command -v curl)"
+
+# get redirect url
+#
+redirect_url="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --write-out "%{redirect_url}" --silent --show-error --output /dev/null "${trm_captiveurl}")"
+if [ -z "${redirect_url}" ]; then
+       exit 1
+fi
+
+# get session cookie
+#
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://${trm_domain}" --silent --connect-timeout $((trm_maxwait / 6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "${redirect_url}"
+session_id="$(awk '/p_splash_session/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${session_id}" ]; then
+       exit 2
+fi
+
+# final login request
+#
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "${redirect_url}" --silent --connect-timeout $((trm_maxwait / 6)) --header "Cookie: p_splash_session=${session_id};" --output /dev/null "https://${trm_domain}/Camping-Julianah/hi/IHYW9cx/grant"
+if [ "${?}" != "0" ]; then
+       exit 3
+fi
diff --git a/net/travelmate/files/telekom.login b/net/travelmate/files/telekom.login
new file mode 100755 (executable)
index 0000000..060bce7
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# captive portal auto-login script for telekom hotspots (DE)
+# Copyright (c) 2021 Dirk Brenken (dev@brenken.org)
+# This is free software, licensed under the GNU General Public License v3.
+
+# set (s)hellcheck exceptions
+# shellcheck disable=1091,3040,3043,3057
+
+export LC_ALL=C
+export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+set -o pipefail
+
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+    . "/lib/functions.sh"
+fi
+
+# url encoding function
+#
+urlencode()
+{
+    local chr str="${1}" len="${#1}" pos=0
+
+    while [ "${pos}" -lt "${len}" ]; do
+        chr="${str:pos:1}"
+        case "${chr}" in
+            [a-zA-Z0-9.~_-])
+                printf "%s" "${chr}"
+                ;;
+            " ")
+                printf "%%20"
+                ;;
+            *)
+                printf "%%%02X" "'${chr}"
+                ;;
+        esac
+        pos=$((pos + 1))
+    done
+}
+
+username="$(urlencode "${1}")"
+password="$(urlencode "${2}")"
+trm_domain="telekom.portal.fon.com"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
+trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
+trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
+trm_fetch="$(command -v curl)"
+
+# get redirect url
+#
+raw_html="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --location --silent --show-error "${trm_captiveurl}")"
+redirect_url="$(printf "%s" "${raw_html}" | awk 'match(tolower($0),/<loginurl>.*<\/loginurl>/){printf "%s",substr($0,RSTART+10,RLENGTH-21)}' 2>/dev/null | awk '{gsub("&amp;","\\&");printf "%s",$0}' 2>/dev/null)"
+if [ -z "${redirect_url}" ]; then
+    exit 1
+fi
+
+# final login request
+#
+raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}" --connect-timeout $((trm_maxwait / 6)) --header "content-type: application/x-www-form-urlencoded" --location --silent --show-error --data "UserName=${username}&Password=${password}&FNAME=0&button=Login&OriginatingServer=http%3A%2F%2F${trm_captiveurl}" "${redirect_url}")"
+login_url="$(printf "%s" "${raw_html}" | awk 'match(tolower($0),/<logoffurl>.*<\/logoffurl>/){printf "%s",substr($0,RSTART+11,RLENGTH-23)}' 2>/dev/null)"
+if [ -z "${login_url}" ]; then
+    exit 2
+fi
index 1346bc6dcc3ad44beec2e213699974d9752d0f9c..2017ba9331b731fd196192d2d79d374c0e6c8c64 100755 (executable)
@@ -3,7 +3,7 @@
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2034,2039,2059,2086,2143,2154,2181,2188
+# shellcheck disable=2034,2086,2154,3043,3060
 
 START=25
 USE_PROCD=1
@@ -17,19 +17,16 @@ trm_pidfile="/var/run/travelmate.pid"
 
 boot()
 {
-       if [ -s "${trm_pidfile}" ]
-       then
-               > "${trm_pidfile}"
+       if [ -s "${trm_pidfile}" ]; then
+               : >"${trm_pidfile}"
        fi
        rc_procd start_service
 }
 
 start_service()
 {
-       if [ "$("${trm_init}" enabled; printf "%u" ${?})" = "0" ]
-       then
-               if [ "${action}" = "boot" ]
-               then
+       if "${trm_init}" enabled; then
+               if [ "${action}" = "boot" ]; then
                        return 0
                fi
                procd_open_instance "travelmate"
@@ -45,17 +42,14 @@ start_service()
 reload_service()
 {
        local ppid pid timeout
-       
+
        timeout="$(uci_get travelmate global trm_timeout)"
 
-       if [ -s "${trm_pidfile}" ]
-       then
+       if [ -s "${trm_pidfile}" ]; then
                ppid="$(cat "${trm_pidfile}" 2>/dev/null)"
-               if [ -n "${ppid}" ]
-               then
+               if [ -n "${ppid}" ]; then
                        pid="$(pgrep -xnf "sleep ${timeout:-60} 0" -P ${ppid} 2>/dev/null)"
-                       if [ -n "${pid}" ]
-                       then
+                       if [ -n "${pid}" ]; then
                                kill -INT ${pid} 2>/dev/null
                        fi
                fi
@@ -73,13 +67,10 @@ status_service()
 
        rtfile="$(uci_get travelmate global trm_rtfile "/tmp/trm_runtime.json")"
        json_load_file "${rtfile}" >/dev/null 2>&1
-       json_select data >/dev/null 2>&1
-       if [ "${?}" = "0" ]
-       then
+       if json_select data >/dev/null 2>&1; then
                printf "%s\n" "::: travelmate runtime information"
                json_get_keys keylist
-               for key in ${keylist}
-               do
+               for key in ${keylist}; do
                        json_get_var value "${key}"
                        printf "  + %-18s : %s\n" "${key}" "${value}"
                done
@@ -92,21 +83,20 @@ scan()
 {
        local result scan_dev radio="${1:-"radio0"}"
 
-       scan_dev="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -l1 -e "@.${radio}.interfaces[0].ifname")"
-       result="$(iwinfo "${scan_dev:-${radio}}" scan 2>/dev/null | \
+       scan_dev="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e "@.${radio}.interfaces[0].ifname")"
+       result="$(iwinfo "${scan_dev:-${radio}}" scan 2>/dev/null |
                awk 'BEGIN{FS="[[:space:]]"}/Address:/{var1=$NF}/ESSID:/{var2="";
                for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i}}/Channel:/{var3=$NF}/Quality:/{split($NF,var0,"/")}/Encryption:/{var4="";
-               for(j=12;j<=NF;j++)if(var4==""){var4=$j}else{var4=var4" "$j};printf "    %-11i%-10s%-35s%-20s%s\n",(var0[1]*100/var0[2]),var3,var2,var1,var4}' | \
+               for(j=12;j<=NF;j++)if(var4==""){var4=$j}else{var4=var4" "$j};printf "    %-11i%-10s%-35s%-20s%s\n",(var0[1]*100/var0[2]),var3,var2,var1,var4}' |
                sort -rn)"
-       printf "%s\\n" "::: Available nearby uplinks on '${scan_dev:-${radio}}'"
-       printf "%s\\n" ":::"
-       if [ -n "${result}" ]
-       then
-               printf "%-15s%-10s%-35s%-20s%s\\n" "    Strength" "Channel" "ESSID" "BSSID" "Encryption"
-               printf "%s\\n" "    --------------------------------------------------------------------------------------"
-               printf "%s\\n" "${result}"
+       printf '%s\n' "::: Available nearby uplinks on '${scan_dev:-${radio}}'"
+       printf '%s\n' ":::"
+       if [ -n "${result}" ]; then
+               printf '%-15s%-10s%-35s%-20s%s\n' "    Strength" "Channel" "ESSID" "BSSID" "Encryption"
+               printf '%s\n' "    --------------------------------------------------------------------------------------"
+               printf '%s\n' "${result}"
        else
-               printf "%s\\n" "::: No scan results"
+               printf '%s\n' "::: No scan results"
        fi
 }
 
@@ -119,13 +109,10 @@ setup()
        zone="${zone//[+*~%&\$@\"\' ]/}"
        metric="${metric//[^0-9]/}"
 
-       if [ -n "${iface}" ] && [ "${iface}" = "${input}" ]
-       then
+       if [ -n "${iface}" ] && [ "${iface}" = "${input}" ]; then
                printf "%s\n" "The uplink interface '${input}' has been already configured"
-       elif [ -n "${input}" ]
-       then
-               if [ -n "${iface}" ]
-               then
+       elif [ -n "${input}" ]; then
+               if [ -n "${iface}" ]; then
                        uci -q batch <<-EOC
                                del network."${iface}"
                                del network."${iface}6"
@@ -144,12 +131,9 @@ setup()
                        commit network
                EOC
 
-               while [ -n "$(uci -q get firewall.@zone["${cnt}"].name)" ]
-               do
-                       if [ "$(uci -q get firewall.@zone["${cnt}"].name)" = "${zone}" ]
-                       then
-                               if [ -n "${iface}" ]
-                               then
+               while [ -n "$(uci -q get firewall.@zone["${cnt}"].name)" ]; do
+                       if [ "$(uci -q get firewall.@zone["${cnt}"].name)" = "${zone}" ]; then
+                               if [ -n "${iface}" ]; then
                                        uci -q batch <<-EOC
                                                del_list firewall.@zone["${cnt}"].network="${iface}"
                                                del_list firewall.@zone["${cnt}"].network="${iface}6"
@@ -162,19 +146,16 @@ setup()
                                EOC
                                break
                        fi
-                       cnt=$((cnt+1))
+                       cnt=$((cnt + 1))
                done
 
-               if [ -n "${iface}" ]
-               then
+               if [ -n "${iface}" ]; then
                        cnt=0
-                       while [ -n "$(uci -q get wireless.@wifi-iface["${cnt}"].network)" ]
-                       do
-                               if [ "$(uci -q get wireless.@wifi-iface["${cnt}"].network)" = "${iface}" ]
-                               then
+                       while [ -n "$(uci -q get wireless.@wifi-iface["${cnt}"].network)" ]; do
+                               if [ "$(uci -q get wireless.@wifi-iface["${cnt}"].network)" = "${iface}" ]; then
                                        uci -q set wireless.@wifi-iface["${cnt}"].network="${input}"
                                fi
-                               cnt=$((cnt+1))
+                               cnt=$((cnt + 1))
                        done
                        uci -q commit wireless
                fi
@@ -192,8 +173,7 @@ service_triggers()
        delay="$(uci_get travelmate global trm_triggerdelay "2")"
        PROCD_RELOAD_DELAY=$((delay * 1000))
 
-       if [ -n "${iface}" ]
-       then
+       if [ -n "${iface}" ]; then
                procd_add_interface_trigger "interface.*.down" "${iface}" "${trm_init}" reload
        fi
        procd_add_raw_trigger "interface.*.up" "${PROCD_RELOAD_DELAY}" "${trm_init}" start
index 42da3ccf33d75be53c11c0c1f4aa6359f6d87cbf..ec789625aa90d6c11581fe4678ed1789dcd3741e 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 # send mail script for travelmate notifications
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,3040
 
 # Please note: you have to setup the package 'msmtp' before using this script
 
@@ -12,8 +12,9 @@ export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
        . "/lib/functions.sh"
 fi
 
@@ -25,32 +26,21 @@ trm_rtfile="$(uci_get travelmate global trm_rtfile "/tmp/trm_runtime.json")"
 trm_mailpgm="$(command -v msmtp)"
 trm_logger="$(command -v logger)"
 
-f_log()
-{
-       local class="${1}" log_msg="${2}"
-
-       if [ -x "${trm_logger}" ]
-       then
-               "${trm_logger}" -p "${class}" -t "trm-mail [${$}]" "${log_msg}"
-       else
-               printf "%s %s %s\\n" "${class}" "trm-mail [${$}]" "${log_msg}"
-       fi
-}
-
-if [ -z "${trm_mailreceiver}" ]
-then
-       f_log "err" "please set the mail receiver with the 'trm_mailreceiver' option"
+if [ -z "${trm_mailreceiver}" ]; then
+       "${trm_logger}" -p "err" -t "trm-mail [${$}]" "please set the mail receiver with the 'trm_mailreceiver' option" 2>/dev/null
        exit 1
 fi
 
-if [ "${trm_debug}" = "1" ]
-then
+if [ "${trm_debug}" = "1" ]; then
        debug="--debug"
 fi
 
 # info preparation
 #
-sys_info="$(strings /etc/banner 2>/dev/null; ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/  \t/' | sed '/^$/d' 2>/dev/null)"
+sys_info="$(
+       strings /etc/banner 2>/dev/null
+       ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/  \t/' | sed '/^$/d' 2>/dev/null
+)"
 trm_info="$(/etc/init.d/travelmate status 2>/dev/null)"
 sta_info="$(jsonfilter -i "${trm_rtfile}" -l1 -e '@.data.station_id')"
 trm_mailtopic="$(uci_get travelmate global trm_mailtopic "travelmate connection to '${sta_info}'")"
@@ -66,6 +56,4 @@ trm_mailtext="${trm_mailtext}</pre></body></html>"
 # send mail
 #
 printf "%b" "${trm_mailhead}${trm_mailtext}" 2>/dev/null | "${trm_mailpgm}" ${debug} -a "${trm_mailprofile}" "${trm_mailreceiver}" >/dev/null 2>&1
-mail_rc="${?}"
-f_log "info" "mail sent to '${trm_mailreceiver}' with rc '${mail_rc}'"
-exit ${mail_rc}
+"${trm_logger}" -p "info" -t "trm-mail [${$}]" "mail sent to '${trm_mailreceiver}' with rc '${?}'"  2>/dev/null
index 37dacfce33b03ebd8d414694a0c743626db24bf6..cd4313989ee57a99a58adbdb9e16b05a6a230ab7 100755 (executable)
@@ -4,13 +4,13 @@
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2086,3040,3043,3057,3060
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-trm_ver="2.0.3"
+trm_ver="2.0.4"
 trm_enabled=0
 trm_debug=0
 trm_iface=""
@@ -38,8 +38,8 @@ trm_fetch="$(command -v curl)"
 trm_iwinfo="$(command -v iwinfo)"
 trm_logger="$(command -v logger)"
 trm_wpa="$(command -v wpa_supplicant)"
-trm_captiveurl="http://captive.apple.com"
-trm_useragent="Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0"
+trm_captiveurl="http://detectportal.firefox.com"
+trm_useragent="Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
 trm_ntpfile="/var/state/travelmate.ntp"
 trm_vpnfile="/var/state/travelmate.vpn"
 trm_mailfile="/var/state/travelmate.mail"
@@ -55,8 +55,7 @@ f_env()
 
        # do nothing on stop
        #
-       if [ "${trm_action}" = "stop" ]
-       then
+       if [ "${trm_action}" = "stop" ]; then
                return
        fi
 
@@ -66,13 +65,12 @@ f_env()
 
        # get system information
        #
-       trm_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -e '@.model' -e '@.release.description' | \
+       trm_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -q -e '@.model' -e '@.release.description' |
                awk 'BEGIN{ORS=", "}{print $0}' | awk '{print substr($0,1,length($0)-2)}')"
 
        # check travelmate config
        #
-       if [ ! -r "/etc/config/travelmate" ] || [ -z "$(uci -q show travelmate.global.trm_vpn)" ]
-       then
+       if [ ! -r "/etc/config/travelmate" ] || [ -z "$(uci -q show travelmate.global.trm_vpn)" ]; then
                f_log "err" "invalid travelmate config, please re-install the package via opkg with the '--force-reinstall --force-maintainer' options"
        fi
 
@@ -81,8 +79,7 @@ f_env()
        config_cb()
        {
                local name="${1}" type="${2}"
-               if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]
-               then
+               if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]; then
                        option_cb()
                        {
                                local option="${1}" value="${2}"
@@ -99,19 +96,16 @@ f_env()
 
        # check 'enabled' option
        #
-       if [ "${trm_enabled}" != "1" ]
-       then
+       if [ "${trm_enabled}" != "1" ]; then
                f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
                /etc/init.d/travelmate stop
        fi
 
        # check ubus network interface
        #
-       if [ -n "${trm_iface}" ]
-       then
+       if [ -n "${trm_iface}" ]; then
                ubus_check="$(ubus -t "${trm_maxwait}" wait_for network.wireless network.interface."${trm_iface}" 2>&1)"
-               if [ -n "${ubus_check}" ]
-               then
+               if [ -n "${ubus_check}" ]; then
                        f_log "info" "travelmate interface '${trm_iface}' does not appear on ubus, please check your network setup"
                        /etc/init.d/travelmate stop
                fi
@@ -123,22 +117,20 @@ f_env()
        # check wpa capabilities
        #
        wpa_checks="sae owe eap suiteb192"
-       for check in ${wpa_checks}
-       do
-               if [ -x "${trm_wpa}" ]
-               then
-                       result="$("${trm_wpa}" -v${check} >/dev/null 2>&1; printf "%u" "${?}")"
-                       if [ -z "${trm_wpaflags}" ]
-                       then
-                               if [ "${result}" = "0" ]
-                               then
+       for check in ${wpa_checks}; do
+               if [ -x "${trm_wpa}" ]; then
+                       result="$(
+                               "${trm_wpa}" -v${check} >/dev/null 2>&1
+                               printf "%u" "${?}"
+                       )"
+                       if [ -z "${trm_wpaflags}" ]; then
+                               if [ "${result}" = "0" ]; then
                                        trm_wpaflags="${check}: $(f_char 1)"
                                else
                                        trm_wpaflags="${check}: $(f_char 0)"
                                fi
                        else
-                               if [ "${result}" = "0" ]
-                               then
+                               if [ "${result}" = "0" ]; then
                                        trm_wpaflags="$(f_trim "${trm_wpaflags}, ${check}: $(f_char 1)")"
                                else
                                        trm_wpaflags="$(f_trim "${trm_wpaflags}, ${check}: $(f_char 0)")"
@@ -151,8 +143,7 @@ f_env()
        #
        config_load wireless
        config_foreach f_prepdev wifi-device
-       if [ -n "$(uci -q changes "wireless")" ]
-       then
+       if [ -n "$(uci -q changes "wireless")" ]; then
                uci_commit "wireless"
                f_reconf
        fi
@@ -160,10 +151,9 @@ f_env()
        # load json runtime file
        #
        json_load_file "${trm_rtfile}" >/dev/null 2>&1
-       json_select data >/dev/null 2>&1
-       if [ "${?}" != "0" ]
-       then
-               > "${trm_rtfile}"
+
+       if ! json_select data >/dev/null 2>&1; then
+               : >"${trm_rtfile}"
                json_init
                json_add_object "data"
        fi
@@ -187,8 +177,7 @@ f_char()
 {
        local result input="${1}"
 
-       if [ "${input}" = "1" ]
-       then
+       if [ "${input}" = "1" ]; then
                result="✔"
        else
                result="✘"
@@ -203,20 +192,16 @@ f_reconf()
        local radio tmp_radio cnt="0"
 
        "${trm_wifi}" reconf
-       for radio in ${trm_radiolist}
-       do
-               while [ "$(ubus -S call network.wireless status | jsonfilter -l1 -e "@.${radio}.up")" != "true" ]
-               do
-                       if [ "${cnt}" -ge "${trm_maxwait}" ]
-                       then
+       for radio in ${trm_radiolist}; do
+               while [ "$(ubus -S call network.wireless status | jsonfilter -q -l1 -e "@.${radio}.up")" != "true" ]; do
+                       if [ "${cnt}" -ge "${trm_maxwait}" ]; then
                                break 2
                        fi
-                       if [ "${radio}" != "${tmp_radio}" ]
-                       then
+                       if [ "${radio}" != "${tmp_radio}" ]; then
                                "${trm_wifi}" up "${radio}"
                                tmp_radio="${radio}"
                        fi
-                       cnt="$((cnt+1))"
+                       cnt="$((cnt + 1))"
                        sleep 1
                done
        done
@@ -229,18 +214,16 @@ f_vpn()
 {
        local IFS rc action="${1}"
 
-       if [ "${trm_vpn}" = "1" ] && [ -x "${trm_vpnpgm}" ]
-       then
-               if [ "${action}" = "disable" ] || { [ "${action}" = "enable" ] && [ ! -f "${trm_vpnfile}" ]; }
-               then
+       if [ "${trm_vpn}" = "1" ] && [ -x "${trm_vpnpgm}" ]; then
+               if [ "${action}" = "disable" ] || {
+                       [ "${action}" = "enable" ] && [ ! -f "${trm_vpnfile}" ]
+               }; then
                        "${trm_vpnpgm}" "${action}" >/dev/null 2>&1
                        rc="${?}"
                fi
-               if [ "${action}" = "enable" ] && [ "${rc}" = "0" ]
-               then
-                       > "${trm_vpnfile}"
-               elif [ "${action}" = "disable" ] && [ -f "${trm_vpnfile}" ]
-               then
+               if [ "${action}" = "enable" ] && [ "${rc}" = "0" ]; then
+                       : >"${trm_vpnfile}"
+               elif [ "${action}" = "disable" ] && [ -f "${trm_vpnfile}" ]; then
                        rm -f "${trm_vpnfile}"
                fi
        fi
@@ -253,16 +236,14 @@ f_mac()
 {
        local result ifname action="${1}" section="${2}"
 
-       if [ "${trm_randomize}" = "1" ] && [ "${action}" = "set" ]
-       then
-               result="$(hexdump -n6 -ve '/1 "%.02X "' /dev/random 2>/dev/null | \
+       if [ "${trm_randomize}" = "1" ] && [ "${action}" = "set" ]; then
+               result="$(hexdump -n6 -ve '/1 "%.02X "' /dev/random 2>/dev/null |
                        awk -v local="2,6,A,E" -v seed="$(date +%s)" 'BEGIN{srand(seed)}NR==1{split(local,b,",");seed=int(rand()*4+1);printf "%s%s:%s:%s:%s:%s:%s",substr($1,0,1),b[seed],$2,$3,$4,$5,$6}')"
                uci_set "wireless" "${section}" "macaddr" "${result}"
        else
                result="$(uci_get "wireless" "${section}" "macaddr")"
-               if [ -z "${result}" ]
-               then
-                       ifname="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
+               if [ -z "${result}" ]; then
+                       ifname="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
                        result="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk '/Access Point:/{printf "%s",$3}')"
                fi
        fi
@@ -276,73 +257,65 @@ f_contrack()
 {
        local uplink_config radio_config essid_config bssid_config expiry action="${1}" radio="${2}" essid="${3}" bssid="${4}" cnt=0
 
-       while [ "$(uci_get "travelmate" "@uplink[$cnt]" >/dev/null 2>&1; echo $?)" = "0" ]
-       do
+       while [ "$(
+               uci_get "travelmate" "@uplink[$cnt]" >/dev/null 2>&1
+               echo $?
+       )" = "0" ]; do
                radio_config="$(uci_get "travelmate" "@uplink[$cnt]" "device")"
                essid_config="$(uci_get "travelmate" "@uplink[$cnt]" "ssid")"
                bssid_config="$(uci_get "travelmate" "@uplink[$cnt]" "bssid")"
-               if [ "${radio_config}" = "${radio}" ] && [ "${essid_config}" = "${essid}" ] && [ "${bssid_config}" = "${bssid}" ]
-               then
+               if [ "${radio_config}" = "${radio}" ] && [ "${essid_config}" = "${essid}" ] && [ "${bssid_config}" = "${bssid}" ]; then
                        uplink_config="@uplink[$cnt]"
                fi
-               cnt="$((cnt+1))"
+               cnt="$((cnt + 1))"
        done
-       if [ -n "${uplink_config}" ]
-       then
+       if [ -n "${uplink_config}" ]; then
                case "${action}" in
                        "start")
                                uci_remove "travelmate" "${uplink_config}" "con_start" 2>/dev/null
                                uci_remove "travelmate" "${uplink_config}" "con_end" 2>/dev/null
-                               if [ -f "${trm_ntpfile}" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${uplink_config}" "con_start" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
-                       ;;
+                               ;;
                        "refresh")
-                               if [ -f "${trm_ntpfile}" ] && [ -z "$(uci_get "travelmate" "${uplink_config}" "con_start")" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ] && [ -z "$(uci_get "travelmate" "${uplink_config}" "con_start")" ]; then
                                        uci_set "travelmate" "${uplink_config}" "con_start" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
-                       ;;
+                               ;;
                        "end")
-                               if [ -f "${trm_ntpfile}" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${uplink_config}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
-                       ;;
+                               ;;
                        "start_expiry")
-                               if [ -f "${trm_ntpfile}" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ]; then
                                        expiry="$(uci_get "travelmate" "${uplink_config}" "con_start_expiry")"
                                        uci_set "travelmate" "${uplink_config}" "enabled" "0"
                                        uci_set "travelmate" "${uplink_config}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                        f_log "info" "uplink '${radio}/${essid}/${bssid:-"-"}' expired after ${expiry} minutes"
                                fi
-                       ;;
+                               ;;
                        "end_expiry")
-                               if [ -f "${trm_ntpfile}" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ]; then
                                        expiry="$(uci_get "travelmate" "${uplink_config}" "con_end_expiry")"
                                        uci_set "travelmate" "${uplink_config}" "enabled" "1"
                                        uci_remove "travelmate" "${uplink_config}" "con_start" 2>/dev/null
                                        uci_remove "travelmate" "${uplink_config}" "con_end" 2>/dev/null
                                        f_log "info" "uplink '${radio}/${essid}/${bssid:-"-"}' re-enabled after ${expiry} minutes"
                                fi
-                       ;;
+                               ;;
                        "disabled")
                                uci_set "travelmate" "${uplink_config}" "enabled" "0"
-                               if [ -f "${trm_ntpfile}" ]
-                               then
+                               if [ -f "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${uplink_config}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
-                       ;;
+                               ;;
                esac
-               if [ -n "$(uci -q changes "travelmate")" ]
-               then
+               if [ -n "$(uci -q changes "travelmate")" ]; then
                        uci_commit "travelmate"
-                       if [ ! -f "${trm_refreshfile}" ]
-                       then
-                               printf "%s" "cfg_reload" > "${trm_refreshfile}"
+                       if [ ! -f "${trm_refreshfile}" ]; then
+                               printf "%s" "cfg_reload" >"${trm_refreshfile}"
                        fi
                fi
        fi
@@ -354,18 +327,19 @@ f_uplink()
 {
        local IFS result t_radio t_essid t_bssid t_option="${1}" w_radio="${2}" w_essid="${3}" w_bssid="${4}" cnt=0
 
-       while [ "$(uci_get "travelmate" "@uplink[$cnt]" >/dev/null 2>&1; echo $?)" = "0" ]
-       do
+       while [ "$(
+               uci_get "travelmate" "@uplink[$cnt]" >/dev/null 2>&1
+               echo $?
+       )" = "0" ]; do
                t_radio="$(uci_get "travelmate" "@uplink[$cnt]" "device")"
                t_essid="$(uci_get "travelmate" "@uplink[$cnt]" "ssid")"
                t_bssid="$(uci_get "travelmate" "@uplink[$cnt]" "bssid")"
-               if [ -n "${w_radio}" ] && [ -n "${w_essid}" ] && \
-                       [ "${t_radio}" = "${w_radio}" ] && [ "${t_essid}" = "${w_essid}" ] && [ "${t_bssid}" = "${w_bssid}" ]
-               then
+               if [ -n "${w_radio}" ] && [ -n "${w_essid}" ] &&
+                       [ "${t_radio}" = "${w_radio}" ] && [ "${t_essid}" = "${w_essid}" ] && [ "${t_bssid}" = "${w_bssid}" ]; then
                        result="$(uci_get "travelmate" "@uplink[$cnt]" "${t_option}")"
                        break
                fi
-               cnt="$((cnt+1))"
+               cnt="$((cnt + 1))"
        done
        printf "%s" "${result}"
        f_log "debug" "f_uplink  ::: option: ${t_option}, result: ${result}"
@@ -378,17 +352,14 @@ f_prepdev()
        local IFS disabled radio="${1}"
 
        disabled="$(uci_get "wireless" "${radio}" "disabled")"
-       if [ "${disabled}" = "1" ]
-       then
+       if [ "${disabled}" = "1" ]; then
                uci_set wireless "${radio}" disabled 0
        fi
 
-       if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
-       then
+       if [ -z "${trm_radio}" ] && ! printf "%s" "${trm_radiolist}" | grep -q "${radio}"; then
                trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
-       elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
-       then
-               trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
+       elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]; then
+               trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" |
                        awk '{while(match(tolower($0),/[a-z0-9_]+/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
        fi
        f_log "debug" "f_prepdev ::: trm_radio: ${trm_radio:-"-"}, radio: ${radio}, radio_list: ${trm_radiolist:-"-"}, disabled: ${disabled:-"-"}"
@@ -403,26 +374,21 @@ f_addif()
        config_cb()
        {
                local type="${1}" name="${2}"
-               if [ "${type}" = "wifi-iface" ]
-               then
-                       if [ "$(uci -q get "wireless.${name}.ssid")" = "${essid}" ]
-                       then
+               if [ "${type}" = "wifi-iface" ]; then
+                       if [ "$(uci -q get "wireless.${name}.ssid")" = "${essid}" ]; then
                                offset=0
-                       elif [ "${offset}" != "0" ]
-                       then
-                               offset="$((offset+1))"
+                       elif [ "${offset}" != "0" ]; then
+                               offset="$((offset + 1))"
                        fi
                fi
                return "${offset}"
        }
        config_load wireless
 
-       if [ "${offset}" != "0" ]
-       then
+       if [ "${offset}" != "0" ]; then
                uci_cfg="trm_uplink${offset}"
-               while [ -n "$(uci -q get "wireless.${uci_cfg}")" ]
-               do
-                       offset="$((offset+1))"
+               while [ -n "$(uci -q get "wireless.${uci_cfg}")" ]; do
+                       offset="$((offset + 1))"
                        uci_cfg="trm_uplink${offset}"
                done
                uci -q batch <<-EOC
@@ -442,14 +408,12 @@ f_addif()
                        set travelmate."${uci_cfg}".con_end_expiry="0"
                        set travelmate."${uci_cfg}".enabled="1"
                EOC
-               if [ -n "$(uci -q changes "travelmate")" ] || [ -n "$(uci -q changes "wireless")" ]
-               then
+               if [ -n "$(uci -q changes "travelmate")" ] || [ -n "$(uci -q changes "wireless")" ]; then
                        uci_commit "travelmate"
                        uci_commit "wireless"
                        f_reconf
-                       if [ ! -f "${trm_refreshfile}" ]
-                       then
-                               printf "%s" "ui_reload" > "${trm_refreshfile}"
+                       if [ ! -f "${trm_refreshfile}" ]; then
+                               printf "%s" "ui_reload" >"${trm_refreshfile}"
                        fi
                        f_log "info" "open uplink '${radio}/${essid}' added to wireless config"
                fi
@@ -474,45 +438,42 @@ f_prepif()
        con_start_expiry="$(f_uplink "con_start_expiry" "${radio}" "${essid}" "${bssid}")"
        con_end_expiry="$(f_uplink "con_end_expiry" "${radio}" "${essid}" "${bssid}")"
 
-       if [ "${status}" = "0" ] && [ -n "${con_end}" ] && [ -n "${con_end_expiry}" ] && [ "${con_end_expiry}" != "0" ]
-       then
+       if [ "${status}" = "0" ] && [ -n "${con_end}" ] && [ -n "${con_end_expiry}" ] && [ "${con_end_expiry}" != "0" ]; then
                d1="$(date -d "${con_end}" "+%s")"
                d2="$(date "+%s")"
-               d3="$(((d2-d1)/60))"
-               if [ "${d3}" -ge "${con_end_expiry}" ]
-               then
+               d3="$(((d2 - d1) / 60))"
+               if [ "${d3}" -ge "${con_end_expiry}" ]; then
                        status="1"
                        f_contrack "end_expiry" "${radio}" "${essid}" "${bssid}"
                fi
-       elif [ "${status}" = "1" ] && [ -n "${con_start}" ] && [ -n "${con_start_expiry}" ] && [ "${con_start_expiry}" != "0" ]
-       then
+       elif [ "${status}" = "1" ] && [ -n "${con_start}" ] && [ -n "${con_start_expiry}" ] && [ "${con_start_expiry}" != "0" ]; then
                d1="$(date -d "${con_start}" "+%s")"
                d2="$(date "+%s")"
-               d3="$((d1+(con_start_expiry*60)))"
-               if [ "${d2}" -gt "${d3}" ]
-               then
+               d3="$((d1 + (con_start_expiry * 60)))"
+               if [ "${d2}" -gt "${d3}" ]; then
                        status="0"
                        f_contrack "start_expiry" "${radio}" "${essid}" "${bssid}"
                fi
        fi
 
-       if [ "${mode}" = "sta" ]
-       then
-               if [ "${status}" = "0" ] || \
-                       { { [ -z "${disabled}" ] || [ "${disabled}" = "0" ]; } && { [ "${proactive}" = "0" ] || [ "${trm_ifstatus}" != "true" ]; } }
-               then
+       if [ "${mode}" = "sta" ]; then
+               if [ "${status}" = "0" ] ||
+                       {
+                               {
+                                       [ -z "${disabled}" ] || [ "${disabled}" = "0" ]
+                               } && {
+                                       [ "${proactive}" = "0" ] || [ "${trm_ifstatus}" != "true" ]
+                               }
+                       }; then
                        uci_set "wireless" "${section}" "disabled" "1"
-               elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ "${proactive}" = "1" ]
-               then
-                       if [ -z "${trm_activesta}" ]
-                       then
+               elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ "${proactive}" = "1" ]; then
+                       if [ -z "${trm_activesta}" ]; then
                                trm_activesta="${section}"
                        else
                                uci_set "wireless" "${section}" "disabled" "1"
                        fi
                fi
-               if [ "${status}" = "1" ]
-               then
+               if [ "${status}" = "1" ]; then
                        trm_stalist="$(f_trim "${trm_stalist} ${section}-${radio}")"
                fi
        fi
@@ -523,41 +484,39 @@ f_prepif()
 #
 f_net()
 {
-       local IFS err err_rc err_domain json_raw json_cp json_rc cp_domain result="net nok"
+       local IFS err err_rc err_domain raw html_raw html_cp json_raw json_cp json_rc result="net nok"
 
-       json_raw="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --write-out "%{json}" --silent --show-error --connect-timeout $((trm_maxwait/10)) "${trm_captiveurl}" 2>/tmp/trm_fetch.err)"
-       json_raw="${json_raw#*\{}"
-       if [ -s "/tmp/trm_fetch.err" ]
-       then
+       raw="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate" --header "Pragma: no-cache" --header "Expires: 0" --write-out "%{json}" --silent --show-error --connect-timeout $((trm_maxwait / 10)) "${trm_captiveurl}" 2>/tmp/trm_fetch.err)"
+       json_raw="${raw#*\{}"
+       html_raw="${raw%%\{*}"
+       if [ -s "/tmp/trm_fetch.err" ]; then
                err="$(awk 'BEGIN{FS="[()'\'' ]"}{printf "%s %s",$3,$(NF-1)}' "/tmp/trm_fetch.err")"
                err_rc="${err% *}"
                err_domain="${err#* }"
-               if [ "${err_rc}" = "6" ]
-               then
-                       if [ -n "${err_domain}" ] && [ "${err_domain}" != "timed" ] && [ "${err_domain}" != "${trm_captiveurl#http*://*}" ]
-                       then
+               if [ "${err_rc}" = "6" ]; then
+                       if [ -n "${err_domain}" ] && [ "${err_domain}" != "timed" ] && [ "${err_domain}" != "${trm_captiveurl#http*://*}" ]; then
                                result="net cp '${err_domain}'"
                        fi
                fi
-       elif [ -n "${json_raw}" ]
-       then
-               json_cp="$(printf "%s" "{${json_raw}" | jsonfilter -l1 -e '@.redirect_url' 2>/dev/null)"
-               json_rc="$(printf "%s" "{${json_raw}" | jsonfilter -l1 -e '@.response_code' 2>/dev/null)"
-               if [ -n "${json_cp}" ]
-               then
-                       cp_domain="${json_cp#http*://*}"
-                       cp_domain="${cp_domain%%/*}"
-                       result="net cp '${cp_domain}'"
+       elif [ -n "${json_raw}" ]; then
+               json_cp="$(printf "%s" "{${json_raw}" | jsonfilter -q -l1 -e '@.redirect_url' | awk 'BEGIN{FS="/"}{printf "%s",$3}')"
+               json_rc="$(printf "%s" "{${json_raw}" | jsonfilter -q -l1 -e '@.response_code')"
+               if [ -n "${json_cp}" ]; then
+                       result="net cp '${json_cp}'"
                else
-                       if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]
-                       then
-                               result="net ok"
+                       if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]; then
+                               html_cp="$(printf "%s" "${html_raw}" | awk 'match(tolower($0),/^.*<meta[ \t]+http-equiv=["]*refresh.*[ \t;]url=/){print substr(tolower($0),RLENGTH+1)}' | awk 'BEGIN{FS="[:/]"}{printf "%s",$4;exit}')"
+                               if [ -n "${html_cp}" ]; then
+                                       result="net cp '${html_cp}'"
+                               else
+                                       result="net ok"
+                               fi
                        fi
                fi
        fi
        rm -f "/tmp/trm_fetch.err"
        printf "%s" "${result}"
-       f_log "debug" "f_net     ::: fetch: ${trm_fetch}, timeout: $((trm_maxwait/6)), url: ${trm_captiveurl}, user_agent: ${trm_useragent}, result: ${result}, error: ${err:-"-"}"
+       f_log "debug" "f_net     ::: fetch: ${trm_fetch}, timeout: $((trm_maxwait / 6)), url: ${trm_captiveurl}, user_agent: ${trm_useragent}, cp (json/html): ${json_cp:-"-"}/${html_cp:-"-"}, result: ${result}, error: ${err:-"-"}"
 }
 
 # check interface status
@@ -566,8 +525,7 @@ f_check()
 {
        local IFS ifname radio dev_status result login_script login_script_args cp_domain wait_time="1" enabled="1" mode="${1}" status="${2}" sta_radio="${3}" sta_essid="${4}" sta_bssid="${5}"
 
-       if [ "${mode}" = "initial" ] || [ "${mode}" = "dev" ]
-       then
+       if [ "${mode}" = "initial" ] || [ "${mode}" = "dev" ]; then
                json_get_var station_id "station_id"
                sta_radio="${station_id%%/*}"
                sta_essid="${station_id%/*}"
@@ -575,77 +533,68 @@ f_check()
                sta_bssid="${station_id##*/}"
                sta_bssid="${sta_bssid//-/}"
        fi
-       if [ "${mode}" != "rev" ] && [ -n "${sta_radio}" ] && [ "${sta_radio}" != "-" ] && [ -n "${sta_essid}" ] && [ "${sta_essid}" != "-" ]
-       then
+       if [ "${mode}" != "rev" ] && [ -n "${sta_radio}" ] && [ "${sta_radio}" != "-" ] && [ -n "${sta_essid}" ] && [ "${sta_essid}" != "-" ]; then
                enabled="$(f_uplink "enabled" "${sta_radio}" "${sta_essid}" "${sta_bssid}")"
        fi
-       if { [ "${mode}" != "initial" ] && [ "${mode}" != "dev" ] && [ "${status}" = "false" ]; } || \
-               { [ "${mode}" = "dev" ] && { [ "${status}" = "false" ] || { [ "${trm_ifstatus}" != "${status}" ] && [ "${enabled}" = "0" ]; }; }; }
-       then
+       if {
+               [ "${mode}" != "initial" ] && [ "${mode}" != "dev" ] && [ "${status}" = "false" ]
+       } ||
+               {
+                       [ "${mode}" = "dev" ] && {
+                               [ "${status}" = "false" ] || {
+                                       [ "${trm_ifstatus}" != "${status}" ] && [ "${enabled}" = "0" ]
+                               }
+                       }
+               }; then
                f_reconf
        fi
-       while [ "${wait_time}" -le "${trm_maxwait}" ]
-       do
+       while [ "${wait_time}" -le "${trm_maxwait}" ]; do
                dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
-               if [ -n "${dev_status}" ]
-               then
-                       if [ "${mode}" = "dev" ]
-                       then
-                               if [ "${trm_ifstatus}" != "${status}" ]
-                               then
+               if [ -n "${dev_status}" ]; then
+                       if [ "${mode}" = "dev" ]; then
+                               if [ "${trm_ifstatus}" != "${status}" ]; then
                                        trm_ifstatus="${status}"
                                        f_jsnup
                                fi
-                               if [ "${status}" = "false" ]
-                               then
-                                       sleep "$((trm_maxwait/5))"
+                               if [ "${status}" = "false" ]; then
+                                       sleep "$((trm_maxwait / 5))"
                                fi
                                break
-                       elif [ "${mode}" = "rev" ]
-                       then
+                       elif [ "${mode}" = "rev" ]; then
                                break
                        else
-                               ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
-                               if [ -n "${ifname}" ] && [ "${enabled}" = "1" ]
-                               then
+                               ifname="$(printf "%s" "${dev_status}" | jsonfilter -q -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
+                               if [ -n "${ifname}" ] && [ "${enabled}" = "1" ]; then
                                        result="$(f_net)"
                                        trm_ifquality="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk -F '[ ]' '/Link Quality:/{split($NF,var0,"/");printf "%i\n",(var0[1]*100/var0[2])}')"
-                                       if [ "${trm_ifquality}" -ge "${trm_minquality}" ]
-                                       then
-                                               trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
-                                               if [ "${trm_ifstatus}" = "true" ]
-                                               then
-                                                       if [ "${trm_captive}" = "1" ]
-                                                       then
+                                       if [ "${trm_ifquality}" -ge "${trm_minquality}" ]; then
+                                               trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -q -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
+                                               if [ "${trm_ifstatus}" = "true" ]; then
+                                                       if [ "${trm_captive}" = "1" ]; then
                                                                cp_domain="$(printf "%s" "${result}" | awk -F '['\''| ]' '/^net cp/{printf "%s",$4}')"
-                                                               if [ -x "/etc/init.d/dnsmasq" ] && [ -f "/etc/config/dhcp" ] && \
-                                                                       [ -n "${cp_domain}" ] && [ -z "$(uci_get "dhcp" "@dnsmasq[0]" "rebind_domain" | grep -Fo "${cp_domain}")" ]
-                                                               then
+                                                               if [ -x "/etc/init.d/dnsmasq" ] && [ -f "/etc/config/dhcp" ] &&
+                                                                       [ -n "${cp_domain}" ] && ! uci_get "dhcp" "@dnsmasq[0]" "rebind_domain" | grep -q "${cp_domain}"; then
                                                                        uci_add_list "dhcp" "@dnsmasq[0]" "rebind_domain" "${cp_domain}"
                                                                        uci_commit "dhcp"
                                                                        /etc/init.d/dnsmasq reload
                                                                        f_log "info" "captive portal domain '${cp_domain}' added to to dhcp rebind whitelist"
                                                                fi
-                                                               if [ -n "${cp_domain}" ] && [ "${trm_captive}" = "1" ]
-                                                               then
+                                                               if [ -n "${cp_domain}" ] && [ "${trm_captive}" = "1" ]; then
                                                                        trm_connection="${result:-"-"}/${trm_ifquality}"
                                                                        f_jsnup
                                                                        login_script="$(f_uplink "script" "${sta_radio}" "${sta_essid}" "${sta_bssid}")"
-                                                                       if [ -x "${login_script}" ]
-                                                                       then
+                                                                       if [ -x "${login_script}" ]; then
                                                                                login_script_args="$(f_uplink "script_args" "${sta_radio}" "${sta_essid}" "${sta_bssid}")"
                                                                                "${login_script}" ${login_script_args} >/dev/null 2>&1
                                                                                rc="${?}"
-                                                                               f_log "info" "captive portal login '${login_script:0:40} ${login_script_args:0:20}' for '${cp_domain}' has been executed with rc '${rc}'"
-                                                                               if [ "${rc}" = "0" ]
-                                                                               then
+                                                                               f_log "info" "captive portal login for '${cp_domain}' has been executed with rc '${rc}'"
+                                                                               if [ "${rc}" = "0" ]; then
                                                                                        result="$(f_net)"
                                                                                fi
                                                                        fi
                                                                fi
                                                        fi
-                                                       if [ "${trm_netcheck}" = "1" ] && [ "${result}" = "net nok" ]
-                                                       then
+                                                       if [ "${trm_netcheck}" = "1" ] && [ "${result}" = "net nok" ]; then
                                                                f_log "info" "uplink has no internet (new connection)"
                                                                f_vpn "disable"
                                                                trm_ifstatus="${status}"
@@ -656,17 +605,14 @@ f_check()
                                                        f_jsnup
                                                        break
                                                fi
-                                       elif [ -n "${trm_connection}" ]
-                                       then
-                                               if [ "${trm_ifquality}" -lt "${trm_minquality}" ]
-                                               then
+                                       elif [ -n "${trm_connection}" ]; then
+                                               if [ "${trm_ifquality}" -lt "${trm_minquality}" ]; then
                                                        f_log "info" "uplink is out of range (${trm_ifquality}/${trm_minquality})"
                                                        f_vpn "disable"
                                                        unset trm_connection
                                                        trm_ifstatus="${status}"
                                                        f_contrack "end" "${sta_radio}" "${sta_essid}" "${sta_bssid}"
-                                               elif [ "${trm_netcheck}" = "1" ] && [ "${result}" = "net nok" ]
-                                               then
+                                               elif [ "${trm_netcheck}" = "1" ] && [ "${result}" = "net nok" ]; then
                                                        f_log "info" "uplink has no internet (existing connection)"
                                                        f_vpn "disable"
                                                        unset trm_connection
@@ -674,34 +620,30 @@ f_check()
                                                fi
                                                f_jsnup
                                                break
-                                       elif [ "${mode}" = "initial" ]
-                                       then
+                                       elif [ "${mode}" = "initial" ]; then
                                                trm_ifstatus="${status}"
                                                f_jsnup
                                                break
                                        fi
-                               elif [ -n "${trm_connection}" ]
-                               then
+                               elif [ -n "${trm_connection}" ]; then
                                        f_vpn "disable"
                                        unset trm_connection
                                        trm_ifstatus="${status}"
                                        f_jsnup
                                        break
-                               elif [ "${mode}" = "initial" ]
-                               then
+                               elif [ "${mode}" = "initial" ]; then
                                        trm_ifstatus="${status}"
                                        f_jsnup
                                        break
                                fi
                        fi
                fi
-               if [ "${mode}" = "initial" ]
-               then
+               if [ "${mode}" = "initial" ]; then
                        trm_ifstatus="${status}"
                        f_jsnup
                        break
                fi
-               wait_time="$((wait_time+1))"
+               wait_time="$((wait_time + 1))"
                sleep 1
        done
        f_log "debug" "f_check   ::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, enabled: ${enabled}, connection: ${trm_connection:-"-"}, wait: ${wait_time}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
@@ -713,15 +655,12 @@ f_jsnup()
 {
        local IFS section last_date last_station sta_iface sta_radio sta_essid sta_bssid sta_mac dev_status last_status status="${trm_ifstatus}" ntp_done="0" vpn_done="0" mail_done="0"
 
-       if [ "${status}" = "true" ]
-       then
+       if [ "${status}" = "true" ]; then
                status="connected (${trm_connection:-"-"})"
                dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
-               if [ -n "${dev_status}" ]
-               then
-                       section="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
-                       if [ -n "${section}" ]
-                       then
+               if [ -n "${dev_status}" ]; then
+                       section="$(printf "%s" "${dev_status}" | jsonfilter -q -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
+                       if [ -n "${section}" ]; then
                                sta_iface="$(uci_get "wireless" "${section}" "network")"
                                sta_radio="$(uci_get "wireless" "${section}" "device")"
                                sta_essid="$(uci_get "wireless" "${section}" "ssid")"
@@ -733,17 +672,18 @@ f_jsnup()
                json_get_var last_station "station_id"
                json_get_var last_status "travelmate_status"
 
-               if { [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]; } || [ "${last_status}" = "running (not connected)" ] || \
-                       { [ -n "${last_station}" ] && [ "${last_station}" != "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}" ]; }
-               then
+               if {
+                       [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]
+               } || [ "${last_status}" = "running (not connected)" ] ||
+                       {
+                               [ -n "${last_station}" ] && [ "${last_station}" != "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}" ]
+                       }; then
                        last_date="$(date "+%Y.%m.%d-%H:%M:%S")"
-                       if [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]
-                       then
-                               printf "%s" "${last_date}" > "${trm_ntpfile}"
+                       if [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]; then
+                               printf "%s" "${last_date}" >"${trm_ntpfile}"
                        fi
                fi
-       elif [ "${status}" = "error" ]
-       then
+       elif [ "${status}" = "error" ]; then
                unset trm_connection
                status="program error"
        else
@@ -751,20 +691,16 @@ f_jsnup()
                status="running (not connected)"
        fi
 
-       if [ -z "${last_date}" ]
-       then
+       if [ -z "${last_date}" ]; then
                last_date="$(date "+%Y.%m.%d-%H:%M:%S")"
        fi
-       if [ -s "${trm_ntpfile}" ]
-       then
+       if [ -s "${trm_ntpfile}" ]; then
                ntp_done="1"
        fi
-       if [ "${trm_vpn}" = "1" ] && [ -f "${trm_vpnfile}" ]
-       then
+       if [ "${trm_vpn}" = "1" ] && [ -f "${trm_vpnfile}" ]; then
                vpn_done="1"
        fi
-       if [ "${trm_mail}" = "1" ] && [ -f "${trm_mailfile}" ]
-       then
+       if [ "${trm_mail}" = "1" ] && [ -f "${trm_mailfile}" ]; then
                mail_done="1"
        fi
        json_add_string "travelmate_status" "${status}"
@@ -777,16 +713,13 @@ f_jsnup()
        json_add_string "ext_hooks" "ntp: $(f_char ${ntp_done}), vpn: $(f_char ${vpn_done}), mail: $(f_char ${mail_done})"
        json_add_string "last_run" "${last_date}"
        json_add_string "system" "${trm_sysver}"
-       json_dump > "${trm_rtfile}"
+       json_dump >"${trm_rtfile}"
 
-       if [ "${status%% (net ok/*}" = "connected" ]
-       then
+       if [ "${status%% (net ok/*}" = "connected" ]; then
                f_vpn "enable"
-               if [ "${trm_mail}" = "1" ] && [ -x "${trm_mailpgm}" ] && [ "${ntp_done}" = "1" ] && [ "${mail_done}" = "0" ]
-               then
-                       if [ "${trm_vpn}" = "0" ] || [ "${vpn_done}" = "1" ]
-                       then
-                               > "${trm_mailfile}"
+               if [ "${trm_mail}" = "1" ] && [ -x "${trm_mailpgm}" ] && [ "${ntp_done}" = "1" ] && [ "${mail_done}" = "0" ]; then
+                       if [ "${trm_vpn}" = "0" ] || [ "${vpn_done}" = "1" ]; then
+                               : >"${trm_mailfile}"
                                "${trm_mailpgm}" >/dev/null 2>&1
                        fi
                fi
@@ -802,19 +735,18 @@ f_log()
 {
        local IFS class="${1}" log_msg="${2}"
 
-       if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${trm_debug}" = "1" ]; }
-       then
-               if [ -x "${trm_logger}" ]
-               then
+       if [ -n "${log_msg}" ] && {
+               [ "${class}" != "debug" ] || [ "${trm_debug}" = "1" ]
+       }; then
+               if [ -x "${trm_logger}" ]; then
                        "${trm_logger}" -p "${class}" -t "trm-${trm_ver}[${$}]" "${log_msg}"
                else
-                       printf "%s %s %s\\n" "${class}" "trm-${trm_ver}[${$}]" "${log_msg}"
+                       printf '%s %s %s\n' "${class}" "trm-${trm_ver}[${$}]" "${log_msg}"
                fi
-               if [ "${class}" = "err" ]
-               then
+               if [ "${class}" = "err" ]; then
                        trm_ifstatus="error"
                        f_jsnup
-                       "${trm_pidfile}"
+                       : >"${trm_pidfile}"
                        exit 1
                fi
        fi
@@ -829,12 +761,10 @@ f_main()
 
        f_check "initial" "false"
        f_log "debug" "f_main    ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
-       if [ "${trm_ifstatus}" != "true" ] || [ "${trm_proactive}" = "1" ]
-       then
+       if [ "${trm_ifstatus}" != "true" ] || [ "${trm_proactive}" = "1" ]; then
                config_load wireless
                config_foreach f_prepif wifi-iface ${trm_proactive}
-               if [ "${trm_ifstatus}" = "true" ] && [ -n "${trm_activesta}" ] && [ "${trm_proactive}" = "1" ]
-               then
+               if [ "${trm_ifstatus}" = "true" ] && [ -n "${trm_activesta}" ] && [ "${trm_proactive}" = "1" ]; then
                        json_get_var station_id "station_id"
                        config_radio="${station_id%%/*}"
                        config_essid="${station_id%/*}"
@@ -847,50 +777,43 @@ f_main()
                        uci_commit "wireless"
                        f_check "dev" "false"
                fi
-               f_log "debug" "f_main    ::: radio_list: ${trm_radiolist}, sta_list: ${trm_stalist:0:${trm_scanbuffer}}"
+               f_log "debug" "f_main    ::: radio_list: ${trm_radiolist}, sta_list: ${trm_stalist:0:trm_scanbuffer}"
 
                # radio loop
                #
-               for radio in ${trm_radiolist}
-               do
-                       if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\\-${radio}")" ]
-                       then
+               for radio in ${trm_radiolist}; do
+                       if ! printf "%s" "${trm_stalist}" | grep -q "\\-${radio}"; then
                                f_log "info" "no station on radio '${radio}'"
                                continue
                        fi
 
                        # station loop
                        #
-                       for sta in ${trm_stalist}
-                       do
+                       for sta in ${trm_stalist}; do
                                section="${sta%%-*}"
                                sta_radio="$(uci_get "wireless" "${section}" "device")"
                                sta_essid="$(uci_get "wireless" "${section}" "ssid")"
                                sta_bssid="$(uci_get "wireless" "${section}" "bssid")"
                                sta_iface="$(uci_get "wireless" "${section}" "network")"
                                sta_mac="$(f_mac "get" "${section}")"
-                               if [ -z "${sta_radio}" ] || [ -z "${sta_essid}" ] || [ -z "${sta_iface}" ]
-                               then
+                               if [ -z "${sta_radio}" ] || [ -z "${sta_essid}" ] || [ -z "${sta_iface}" ]; then
                                        f_log "info" "invalid wireless section '${section}'"
                                        continue
                                fi
-                               if [ "${sta_radio}" = "${config_radio}" ] && [ "${sta_essid}" = "${config_essid}" ] && [ "${sta_bssid}" = "${config_bssid}" ]
-                               then
+                               if [ "${sta_radio}" = "${config_radio}" ] && [ "${sta_essid}" = "${config_essid}" ] && [ "${sta_bssid}" = "${config_bssid}" ]; then
                                        f_contrack "refresh" "${config_radio}" "${config_essid}" "${config_bssid}"
                                        f_log "info" "uplink still in range '${config_radio}/${config_essid}/${config_bssid:-"-"}' with mac '${sta_mac:-"-"}'"
                                        break 2
                                fi
                                f_log "debug" "f_main    ::: sta_radio: ${sta_radio}, sta_essid: \"${sta_essid}\", sta_bssid: ${sta_bssid:-"-"}"
-                               if [ -z "${scan_list}" ]
-                               then
-                                       scan_dev="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -l1 -e "@.${radio}.interfaces[0].ifname")"
-                                       scan_list="$("${trm_iwinfo}" "${scan_dev:-${radio}}" scan 2>/dev/null | \
+                               if [ -z "${scan_list}" ]; then
+                                       scan_dev="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e "@.${radio}.interfaces[0].ifname")"
+                                       scan_list="$("${trm_iwinfo}" "${scan_dev:-${radio}}" scan 2>/dev/null |
                                                awk 'BEGIN{FS="[[:space:]]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i};
-                                               gsub(/,/,".",var2)}/Quality:/{split($NF,var0,"/")}/Encryption:/{if($NF=="none"){var3="+"}else{var3="-"};printf "%i,%s,%s,%s\n",(var0[1]*100/var0[2]),var1,var2,var3}' | \
+                                               gsub(/,/,".",var2)}/Quality:/{split($NF,var0,"/")}/Encryption:/{if($NF=="none"){var3="+"}else{var3="-"};printf "%i,%s,%s,%s\n",(var0[1]*100/var0[2]),var1,var2,var3}' |
                                                sort -rn | awk -v buf="${trm_scanbuffer}" 'BEGIN{ORS=","}{print substr($0,1,buf)}')"
                                        f_log "debug" "f_main    ::: radio: ${radio}, scan_device: ${scan_dev}, scan_buffer: ${trm_scanbuffer}, scan_list: ${scan_list:-"-"}"
-                                       if [ -z "${scan_list}" ]
-                                       then
+                                       if [ -z "${scan_list}" ]; then
                                                f_log "info" "no scan results on '${radio}'"
                                                continue 2
                                        fi
@@ -899,32 +822,31 @@ f_main()
                                # scan loop
                                #
                                IFS=","
-                               for spec in ${scan_list}
-                               do
-                                       if [ -z "${scan_quality}" ]
-                                       then
+                               for spec in ${scan_list}; do
+                                       if [ -z "${scan_quality}" ]; then
                                                scan_quality="${spec}"
-                                       elif [ -z "${scan_bssid}" ]
-                                       then
+                                       elif [ -z "${scan_bssid}" ]; then
                                                scan_bssid="${spec}"
-                                       elif [ -z "${scan_essid}" ]
-                                       then
+                                       elif [ -z "${scan_essid}" ]; then
                                                scan_essid="${spec}"
-                                       elif [ -z "${scan_open}" ]
-                                       then
+                                       elif [ -z "${scan_open}" ]; then
                                                scan_open="${spec}"
                                        fi
-                                       if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ] && [ -n "${scan_open}" ]
-                                       then
-                                               if [ "${scan_quality}" -ge "${trm_minquality}" ]
-                                               then
-                                                       if { { [ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && { [ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ]; } } || \
-                                                               { [ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ]; } } && [ "${radio}" = "${sta_radio}" ]
-                                                       then
+                                       if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ] && [ -n "${scan_open}" ]; then
+                                               if [ "${scan_quality}" -ge "${trm_minquality}" ]; then
+                                                       if {
+                                                               {
+                                                                       [ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && {
+                                                                               [ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ]
+                                                                       }
+                                                               } ||
+                                                                       {
+                                                                               [ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ]
+                                                                       }
+                                                       } && [ "${radio}" = "${sta_radio}" ]; then
                                                                f_vpn "disable"
                                                                f_log "debug" "f_main    ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}, scan_open: ${scan_open}"
-                                                               if [ -n "${config_radio}" ]
-                                                               then
+                                                               if [ -n "${config_radio}" ]; then
                                                                        uci_set "wireless" "${trm_activesta}" "disabled" "1"
                                                                        uci_commit "wireless"
                                                                        f_contrack "end" "${config_radio}" "${config_essid}" "${config_bssid}"
@@ -936,22 +858,18 @@ f_main()
                                                                #
                                                                retrycnt=1
                                                                trm_radio="${sta_radio}"
-                                                               while [ "${retrycnt}" -le "${trm_maxretry}" ]
-                                                               do
-                                                                       if [ "${trm_randomize}" = "1" ]
-                                                                       then
+                                                               while [ "${retrycnt}" -le "${trm_maxretry}" ]; do
+                                                                       if [ "${trm_randomize}" = "1" ]; then
                                                                                sta_mac="$(f_mac "set" "${section}")"
                                                                        fi
                                                                        uci_set "wireless" "${section}" "disabled" "0"
                                                                        f_check "sta" "false" "${sta_radio}" "${sta_essid}" "${sta_bssid}"
-                                                                       if [ "${trm_ifstatus}" = "true" ]
-                                                                       then
+                                                                       if [ "${trm_ifstatus}" = "true" ]; then
                                                                                unset IFS scan_list
                                                                                rm -f "${trm_mailfile}"
                                                                                uci_commit "wireless"
                                                                                f_contrack "start" "${sta_radio}" "${sta_essid}" "${sta_bssid}"
-                                                                               if [ "${trm_randomize}" = "0" ]
-                                                                               then
+                                                                               if [ "${trm_randomize}" = "0" ]; then
                                                                                        sta_mac="$(f_mac "get" "${section}")"
                                                                                fi
                                                                                f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' with mac '${sta_mac:-"-"}' (${retrycnt}/${trm_maxretry})"
@@ -959,8 +877,7 @@ f_main()
                                                                        else
                                                                                uci -q revert "wireless"
                                                                                f_check "rev" "false"
-                                                                               if [ "${retrycnt}" = "${trm_maxretry}" ]
-                                                                               then
+                                                                               if [ "${retrycnt}" = "${trm_maxretry}" ]; then
                                                                                        f_contrack "disabled" "${sta_radio}" "${sta_essid}" "${sta_bssid}"
                                                                                        f_log "info" "uplink has been disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${retrycnt}/${trm_maxretry})"
                                                                                        break 2
@@ -969,11 +886,10 @@ f_main()
                                                                                        f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${retrycnt}/${trm_maxretry})"
                                                                                fi
                                                                        fi
-                                                                       retrycnt="$((retrycnt+1))"
-                                                                       sleep "$((trm_maxwait/6))"
+                                                                       retrycnt="$((retrycnt + 1))"
+                                                                       sleep "$((trm_maxwait / 6))"
                                                                done
-                                                       elif [ "${trm_autoadd}" = "1" ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]
-                                                       then
+                                                       elif [ "${trm_autoadd}" = "1" ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]; then
                                                                scan_essid="${scan_essid%?}"
                                                                scan_essid="${scan_essid:1}"
                                                                f_addif "${sta_radio}" "${scan_essid}"
@@ -995,8 +911,7 @@ f_main()
 
 # source required system libraries
 #
-if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
-then
+if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]; then
        . "/lib/functions.sh"
        . "/usr/share/libubox/jshn.sh"
 else
@@ -1005,39 +920,32 @@ fi
 
 # control travelmate actions
 #
-if [ "${trm_action}" != "stop" ]
-then
+if [ "${trm_action}" != "stop" ]; then
        f_env
 fi
-while true
-do
-       if [ -z "${trm_action}" ]
-       then
+while true; do
+       if [ -z "${trm_action}" ]; then
                rc=0
-               while true
-               do
-                       if [ "${rc}" = "0" ]
-                       then
+               while true; do
+                       if [ "${rc}" = "0" ]; then
                                f_check "initial" "false"
                        fi
                        sleep "${trm_timeout}" 0
                        rc=${?}
-                       if [ "${rc}" != "0" ]
-                       then
+                       if [ "${rc}" != "0" ]; then
                                f_check "initial" "false"
                        fi
-                       if [ "${rc}" = "0" ] || { [ "${rc}" != "0" ] && [ "${trm_ifstatus}" = "false" ]; }
-                       then
+                       if [ "${rc}" = "0" ] || {
+                               [ "${rc}" != "0" ] && [ "${trm_ifstatus}" = "false" ]
+                       }; then
                                break
                        fi
                done
-       elif [ "${trm_action}" = "stop" ]
-       then
-               if [ -s "${trm_pidfile}" ]
-               then
+       elif [ "${trm_action}" = "stop" ]; then
+               if [ -s "${trm_pidfile}" ]; then
                        f_log "info" "travelmate instance stopped ::: action: ${trm_action}, pid: $(cat ${trm_pidfile} 2>/dev/null)"
-                       "${trm_rtfile}"
-                       "${trm_pidfile}"
+                       : >"${trm_rtfile}"
+                       : >"${trm_pidfile}"
                fi
                break
        else
index 94da997a13fb92adedc8c11f19e47698b35d9427..3ee18fea7f48c0266d555b94398ca2ae2a3ce0ae 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 # vpn switch for travelmate
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,3040,3043
 
 # Please note: you have to setup the package 'wireguard' or 'openvpn' before using this script
 
@@ -12,9 +12,10 @@ export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
-       . "/lib/functions.sh"
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+    . "/lib/functions.sh"
 fi
 
 vpn_action="${1}"
@@ -22,129 +23,93 @@ trm_vpnservice="$(uci_get travelmate global trm_vpnservice)"
 trm_vpniface="$(uci_get travelmate global trm_vpniface)"
 trm_landevice="$(uci_get travelmate global trm_landevice)"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
-trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://captive.apple.com")"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
+trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_iptrule_accept="FORWARD -i ${trm_landevice} -p tcp  --match multiport --dports 80,443 -j ACCEPT"
 trm_iptrule_drop="FORWARD -i ${trm_landevice} -j DROP"
 trm_iptables="$(command -v iptables)"
 trm_logger="$(command -v logger)"
 trm_fetch="$(command -v curl)"
 
-f_log()
-{
-       local class="${1}" log_msg="${2}"
-
-       if [ -x "${trm_logger}" ]
-       then
-               "${trm_logger}" -p "${class}" -t "trm-vpn  [${$}]" "${log_msg}"
-       else
-               printf "%s %s %s\\n" "${class}" "trm-vpn  [${$}]" "${log_msg}"
-       fi
-}
-
 f_net()
 {
-       local IFS json_raw json_rc result="net nok"
+       local IFS json_rc result="net nok"
 
-       json_raw="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --write-out "%{json}" --silent --show-error --connect-timeout $((trm_maxwait/10)) "${trm_captiveurl}" 2>/dev/null)"
-       json_raw="${json_raw#*\{}"
-       if [ -n "${json_raw}" ]
-       then
-               json_rc="$(printf "%s" "{${json_raw}" | jsonfilter -l1 -e '@.response_code' 2>/dev/null)"
-               if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]
-               then
-                       result="net ok"
-               fi
+       json_rc="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 10)) --header "Cache-Control: no-cache, no-store, must-revalidate" --header "Pragma: no-cache" --header "Expires: 0" --write-out "%{response_code}" --silent --show-error --output /dev/null "${trm_captiveurl}")"
+       if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]; then
+               result="net ok"
        fi
        printf "%s" "${result}"
 }
 
-if [ -n "${trm_vpnservice}" ] && [ -n "${trm_vpniface}" ] && [ -n "${trm_landevice}" ] && [ -f "/tmp/trm_runtime.json" ]
-then
+if [ -n "${trm_vpnservice}" ] && [ -n "${trm_vpniface}" ] && [ -n "${trm_landevice}" ] && [ -f "/tmp/trm_runtime.json" ]; then
        status="$(jsonfilter -i "/tmp/trm_runtime.json" -l1 -e '@.data.travelmate_status' 2>/dev/null)"
        vpn_status="$(ubus -S call network.interface."${trm_vpniface}" status 2>/dev/null | jsonfilter -l1 -e '@.up')"
-       if [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]
-       then
-               if [ -n "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_drop} 2>&1)" ] && \
-                       [ -n "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_accept} 2>&1)" ]
-               then
-                       "${trm_iptables}" "-w $((trm_maxwait/6))" -I ${trm_iptrule_drop} 2>&1
-                       f_log "info" "lan forward blocked for device '${trm_landevice}'"
+       if [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]; then
+               if [ -n "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_drop}" 2>&1)" ] &&
+                       [ -n "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_accept}" 2>&1)" ]; then
+                       "${trm_iptables}" "-w $((trm_maxwait / 6))" -I "${trm_iptrule_drop}" 2>&1
+                       "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "lan forward blocked for device '${trm_landevice}'"  2>/dev/null
                fi
        fi
-       if [ "${vpn_action}" = "disable" ] && [ "${status%% (net cp *}" = "connected" ]
-       then
-               if [ -n "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_accept} 2>&1)" ] && \
-                       [ -z "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_drop} 2>&1)" ]
-               then
-                       "${trm_iptables}" "-w $((trm_maxwait/6))" -I ${trm_iptrule_accept} 2>&1
-                       f_log "info" "lan forward on ports 80/443 freed for device '${trm_landevice}'"
+       if [ "${vpn_action}" = "disable" ] && [ "${status%% (net cp *}" = "connected" ]; then
+               if [ -n "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_accept}" 2>&1)" ] &&
+                       [ -z "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_drop}" 2>&1)" ]; then
+                       "${trm_iptables}" "-w $((trm_maxwait / 6))" -I "${trm_iptrule_accept}" 2>&1
+                       "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "lan forward on ports 80/443 freed for device '${trm_landevice}'"  2>/dev/null
                fi
        fi
 
        case "${trm_vpnservice}" in
                "wireguard")
-                       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]
-                       then
+                       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]; then
                                ubus call network.interface."${trm_vpniface}" up
-                       elif [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]
-                       then
+                       elif [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]; then
                                ubus call network.interface."${trm_vpniface}" down
-                               f_log "info" "${trm_vpnservice} client connection disabled"
+                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${trm_vpnservice} client connection disabled"  2>/dev/null
                        fi
-               ;;
+                       ;;
                "openvpn")
-                       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]
-                       then
+                       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]; then
                                ubus call network.interface."${trm_vpniface}" up
                                /etc/init.d/openvpn restart >/dev/null 2>&1
-                       elif [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]
-                       then
+                       elif [ "${vpn_action}" = "disable" ] && [ "${vpn_status}" = "true" ]; then
                                ubus call network.interface."${trm_vpniface}" down
                                /etc/init.d/openvpn stop >/dev/null 2>&1
-                               f_log "info" "${trm_vpnservice} client connection disabled"
+                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${trm_vpnservice} client connection disabled"  2>/dev/null
                        fi
-               ;;
+                       ;;
        esac
 
-       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]
-       then
+       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" != "true" ]; then
                cnt=0
-               while true
-               do
+               while true; do
                        vpn_status="$(ubus -S call network.interface."${trm_vpniface}" status 2>/dev/null | jsonfilter -l1 -e '@.up')"
-                       if [ "${vpn_status}" = "true" ]
-                       then
+                       if [ "${vpn_status}" = "true" ]; then
                                net_status="$(f_net)"
-                               if [ "${net_status}" = "net ok" ]
-                               then
-                                       f_log "info" "${trm_vpnservice} client connection enabled"
-                                       if [ -z "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_drop} 2>&1)" ]
-                                       then
-                                               "${trm_iptables}" "-w $((trm_maxwait/6))" -D ${trm_iptrule_drop} 2>&1
-                                               if [ -z "$("${trm_iptables}" "-w $((trm_maxwait/6))" -C ${trm_iptrule_accept} 2>&1)" ]
-                                               then
-                                                       "${trm_iptables}" "-w $((trm_maxwait/6))" -D ${trm_iptrule_accept} 2>&1
+                               if [ "${net_status}" = "net ok" ]; then
+                                       "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${trm_vpnservice} client connection enabled"  2>/dev/null
+                                       if [ -z "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_drop}" 2>&1)" ]; then
+                                               "${trm_iptables}" "-w $((trm_maxwait / 6))" -D "${trm_iptrule_drop}" 2>&1
+                                               if [ -z "$("${trm_iptables}" "-w $((trm_maxwait / 6))" -C "${trm_iptrule_accept}" 2>&1)" ]; then
+                                                       "${trm_iptables}" "-w $((trm_maxwait / 6))" -D "${trm_iptrule_accept}" 2>&1
                                                fi
-                                               f_log "info" "lan forward freed for device '${trm_landevice}'"
+                                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "lan forward freed for device '${trm_landevice}'"  2>/dev/null
                                        fi
                                        break
                                fi
                        fi
-                       if [ "${cnt}" -ge "$((trm_maxwait/6))" ]
-                       then
-                               f_log "info" "${trm_vpnservice} restart failed, lan forward for device '${trm_landevice}' still blocked"
+                       if [ "${cnt}" -ge "$((trm_maxwait / 6))" ]; then
+                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${trm_vpnservice} restart failed, lan forward for device '${trm_landevice}' still blocked"  2>/dev/null
                                ubus call network.interface."${trm_vpniface}" down
                                exit 2
                        fi
                        sleep 1
-                       cnt="$((cnt+1))"
+                       cnt="$((cnt + 1))"
                done
        fi
-       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" = "true" ]
-       then
-               if [ -f "/etc/init.d/sysntpd" ]
-               then
+       if [ "${vpn_action}" = "enable" ] && [ "${vpn_status}" = "true" ]; then
+               if [ -f "/etc/init.d/sysntpd" ]; then
                        /etc/init.d/sysntpd restart >/dev/null 2>&1
                fi
        fi
index 2a215e4ba4a4b32194542c2847a5e22529d0fee0..6a9be8219a8f1f13cc2b5bc9a0825b6783ad803b 100755 (executable)
@@ -1,34 +1,19 @@
 #!/bin/sh
 # ntp hotplug script for travelmate
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=3023
 
 trm_init="/etc/init.d/travelmate"
 trm_ntpfile="/var/state/travelmate.ntp"
 trm_logger="$(command -v logger)"
 
-f_log()
-{
-       local class="${1}" log_msg="${2}"
-
-       if [ -x "${trm_logger}" ]
-       then
-               "${trm_logger}" -p "${class}" -t "trm-ntp  [${$}]" "${log_msg}"
-       else
-               printf "%s %s %s\\n" "${class}" "trm-ntp  [${$}]" "${log_msg}"
-       fi
-}
-
-if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && [ "$("${trm_init}" enabled; printf "%u" ${?})" = "0" ]
-then
+if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && "${trm_init}" enabled; then
        {
-               flock -xn 1001
-               if [ "$?" = "0" ]
-               then
-                       f_log "info" "get ntp time sync"
+               if flock -xn 1001; then
+                       "${trm_logger}" -p "info" -t "trm-ntp  [${$}]" "get ntp time sync" 2>/dev/null
                        "${trm_init}" restart
                fi
        } 1001>"${trm_ntpfile}"
diff --git a/net/travelmate/files/vodafone.login b/net/travelmate/files/vodafone.login
new file mode 100755 (executable)
index 0000000..17628da
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+# captive portal auto-login script for vodafone hotspots (DE)
+# Copyright (c) 2021 Dirk Brenken (dev@brenken.org)
+# This is free software, licensed under the GNU General Public License v3.
+
+# set (s)hellcheck exceptions
+# shellcheck disable=1091,3040
+
+export LC_ALL=C
+export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+set -o pipefail
+
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+       . "/lib/functions.sh"
+fi
+
+username="${1}"
+password="${2}"
+trm_domain="hotspot.vodafone.de"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
+trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
+trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
+trm_fetch="$(command -v curl)"
+
+# get sid
+#
+raw_html="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --write-out "%{redirect_url}" --silent --show-error --output /dev/null "${trm_captiveurl}")"
+sid="$(printf "%s" "${raw_html}" 2>/dev/null | awk 'BEGIN{FS="[=&]"}{printf "%s",$2}')"
+if [ -z "${sid}" ]; then
+       exit 1
+fi
+
+# get session
+#
+raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://${trm_domain}/portal/?sid=${sid}" --silent --connect-timeout $((trm_maxwait / 6)) "https://${trm_domain}/api/v4/session?sid=${sid}")"
+session="$(printf "%s" "${raw_html}" 2>/dev/null | jsonfilter -q -l1 -e '@.session')"
+if [ -z "${session}" ]; then
+       exit 2
+fi
+
+# final login request
+#
+raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://${trm_domain}/portal/?sid=${sid}" --silent --connect-timeout $((trm_maxwait / 6)) --data "accessType=csc-community&accountType=csc&loginProfile=4&password=${password}&session=${session}&username=${username}&save=true" "https://${trm_domain}/api/v4/login?sid=${sid}")"
+success="$(printf "%s" "${raw_html}" 2>/dev/null | jsonfilter -q -l1 -e '@.success')"
+if [ "${success}" != "true" ]; then
+       exit 3
+fi
index c74a2bf14d66e3304c783981f6c7d15360116597..316c7470138eccd6b679235fcbc650f8dc2b5820 100755 (executable)
@@ -1,41 +1,38 @@
 #!/bin/sh
-# captive portal auto-login script for german ICE hotspots
-# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
+# captive portal auto-login script for ICE hotspots (DE)
+# Copyright (c) 2020-2021 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
+# shellcheck disable=1091,2181,3040
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 set -o pipefail
 
-if [ "$(uci_get 2>/dev/null; printf "%u" "${?}")" = "127" ]
-then
-       . "/lib/functions.sh"
+# source function library if necessary
+#
+if [ -z "${_C}" ]; then
+    . "/lib/functions.sh"
 fi
 
 trm_domain="www.wifionice.de"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
 trm_fetch="$(command -v curl)"
 
-# initial get request to receive & extract a valid security token
+# get security token
 #
-"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait/6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "http://${trm_domain}/en/"
-if [ -f "/tmp/${trm_domain}.cookie" ]
-then
-       sec_token="$(awk '/csrf/{print $7}' "/tmp/${trm_domain}.cookie")"
-       rm -f "/tmp/${trm_domain}.cookie"
-else
-       exit 2
+"${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --silent --connect-timeout $((trm_maxwait / 6)) --cookie-jar "/tmp/${trm_domain}.cookie" --output /dev/null "http://${trm_domain}/en/"
+sec_token="$(awk '/csrf/{print $7}' "/tmp/${trm_domain}.cookie" 2>/dev/null)"
+rm -f "/tmp/${trm_domain}.cookie"
+if [ -z "${sec_token}" ]; then
+       exit 1
 fi
 
-# final post request/login with valid session cookie/security token
+# final post request
 #
-if [ -n "${sec_token}" ]
-then
-       "${trm_fetch}" --user-agent "${trm_useragent}" --silent --connect-timeout $((trm_maxwait/6)) --header "Cookie: csrf=${sec_token}" --data "login=true&CSRFToken=${sec_token}&connect=" --output /dev/null "http://${trm_domain}/en/"
-else
-       exit 3
+"${trm_fetch}" --user-agent "${trm_useragent}" --silent --connect-timeout $((trm_maxwait / 6)) --header "Cookie: csrf=${sec_token}" --data "login=true&CSRFToken=${sec_token}&connect=" --output /dev/null "http://${trm_domain}/en/"
+if [ "${?}" != "0" ]; then
+       exit 2
 fi
index f5ac83338424170aebf06064b64431ad6b4c5b1d..d1476bbc4242a93f2337d8bf9066e1b5ccafa78c 100644 (file)
@@ -4,8 +4,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vpn-policy-routing
-PKG_VERSION:=0.3.2
-PKG_RELEASE:=20
+PKG_VERSION:=0.3.5
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 
@@ -39,8 +39,8 @@ define Package/vpn-policy-routing/install
        $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/firewall $(1)/etc/
        $(INSTALL_BIN) ./files/vpn-policy-routing.init $(1)/etc/init.d/vpn-policy-routing
        $(SED) "s|^\(PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/vpn-policy-routing
-       $(INSTALL_CONF) ./files/vpn-policy-routing.conf $(1)/etc/config/vpn-policy-routing
-       $(INSTALL_DATA) ./files/vpn-policy-routing.firewall.hotplug $(1)/etc/hotplug.d/firewall/99-vpn-policy-routing
+       $(INSTALL_CONF) ./files/vpn-policy-routing.config $(1)/etc/config/vpn-policy-routing
+       $(INSTALL_DATA) ./files/vpn-policy-routing.firewall.hotplug $(1)/etc/hotplug.d/firewall/70-vpn-policy-routing
        $(INSTALL_DATA) ./files/vpn-policy-routing.aws.user $(1)/etc/vpn-policy-routing.aws.user
        $(INSTALL_DATA) ./files/vpn-policy-routing.netflix.user $(1)/etc/vpn-policy-routing.netflix.user
 endef
index a00770be75c0641f3fa5cd61f0f74af8aa92c224..4f99ed5e43f60a5183510f2b611883e2ed043688 100644 (file)
@@ -9,7 +9,7 @@ TARGET_FNAME="/var/vpn-policy-routing_tmp_aws_ip_ranges"
 _ret=1
 
 if [ ! -s "$TARGET_FNAME" ]; then
-       curl "$TARGET_URL" 2>/dev/null | grep "ip_prefix" | sed 's/^.*\"ip_prefix\": \"//; s/\",//' > "$TARGET_FNAME"
+       uclient-fetch --no-check-certificate -qO- "$TARGET_URL" 2>/dev/null | grep "ip_prefix" | sed 's/^.*\"ip_prefix\": \"//; s/\",//' > "$TARGET_FNAME"
 fi
 if [ -s "$TARGET_FNAME" ]; then
        awk -v ipset="$TARGET_IPSET" '{print "add " ipset " " $1}' "$TARGET_FNAME" | ipset restore -! && _ret=0
diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.conf b/net/vpn-policy-routing/files/vpn-policy-routing.conf
deleted file mode 100644 (file)
index ed6f01c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-config vpn-policy-routing 'config'
-       option enabled '0'
-       option verbosity '2'
-       option strict_enforcement '1'
-       option src_ipset '0'
-       option dest_ipset '0'
-       option resolver_ipset 'dnsmasq.ipset'
-       option ipv6_enabled '0'
-       list ignored_interface 'vpnserver wgserver'
-       option boot_timeout '30'
-       option iptables_rule_option 'append'
-       option procd_reload_delay '1'
-       option webui_enable_column '0'
-       option webui_protocol_column '0'
-       option webui_chain_column '0'
-       option webui_show_ignore_target '0'
-       option webui_sorting '1'
-       list webui_supported_protocol 'tcp'
-       list webui_supported_protocol 'udp'
-       list webui_supported_protocol 'tcp udp'
-       list webui_supported_protocol 'icmp'
-       list webui_supported_protocol 'all'
-
-config include
-       option path '/etc/vpn-policy-routing.netflix.user'
-       option enabled 0
-
-config include
-       option path '/etc/vpn-policy-routing.aws.user'
-       option enabled 0
diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.config b/net/vpn-policy-routing/files/vpn-policy-routing.config
new file mode 100644 (file)
index 0000000..ed6f01c
--- /dev/null
@@ -0,0 +1,30 @@
+config vpn-policy-routing 'config'
+       option enabled '0'
+       option verbosity '2'
+       option strict_enforcement '1'
+       option src_ipset '0'
+       option dest_ipset '0'
+       option resolver_ipset 'dnsmasq.ipset'
+       option ipv6_enabled '0'
+       list ignored_interface 'vpnserver wgserver'
+       option boot_timeout '30'
+       option iptables_rule_option 'append'
+       option procd_reload_delay '1'
+       option webui_enable_column '0'
+       option webui_protocol_column '0'
+       option webui_chain_column '0'
+       option webui_show_ignore_target '0'
+       option webui_sorting '1'
+       list webui_supported_protocol 'tcp'
+       list webui_supported_protocol 'udp'
+       list webui_supported_protocol 'tcp udp'
+       list webui_supported_protocol 'icmp'
+       list webui_supported_protocol 'all'
+
+config include
+       option path '/etc/vpn-policy-routing.netflix.user'
+       option enabled 0
+
+config include
+       option path '/etc/vpn-policy-routing.aws.user'
+       option enabled 0
index 0950698232da826b3f92cf1b05918a8aef0e696b..b15b1af498b01cba83f998e5fbd312b972f44fb9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh /etc/rc.common
 # Copyright 2017-2020 Stan Grishin (stangri@melmac.net)
-# shellcheck disable=SC2039,SC1091,SC2018,SC2019
+# shellcheck disable=SC2039,SC1091,SC2018,SC2019,SC3043,SC3057,SC3060
 PKG_VERSION='dev-test'
 
 # sysctl net.ipv4.conf.default.rp_filter=1
@@ -18,9 +18,10 @@ if type extra_command 1>/dev/null 2>&1; then
                        WARNING: while paste.ee uploads are unlisted, they are still publicly available
                List domain names after options to include their lookup in report"
        extra_command 'version' 'Show version information'
+       extra_command 'reload_interface' 'Reload specific interface only'
 else
 # shellcheck disable=SC2034
-       EXTRA_COMMANDS='support version'
+       EXTRA_COMMANDS='reload_interface support version'
 # shellcheck disable=SC2034
        EXTRA_HELP="    support Generates output required to troubleshoot routing issues
                Use '-d' option for more detailed output
@@ -50,15 +51,12 @@ wanIface4=''; wanIface6=''; ifaceMark=''; ifaceTableID='';
 ifAll=''; ifSupported=''; ignoredIfaces=''; supportedIfaces=''; icmpIface='';
 wanGW4=''; wanGW6=''; bootTimeout=''; insertOption='';
 webuiChainColumn=''; webuiShowIgnore=''; dnsmasqIpsetSupported='';
-procdReloadDelay='';
+procdReloadDelay=''; mainTableListing='';
 usedChainsList='PREROUTING'
 ipsetSupported='true'
 configLoaded='false'
 
 version() { echo "$PKG_VERSION"; }
-create_lock() { [ -e "$PIDFile" ] && return 1; touch "$PIDFile"; }
-remove_lock() { [ -e "$PIDFile" ] && rm -f "$PIDFile"; }
-trap remove_lock EXIT
 output_ok() { output 1 "$_OK_"; output 2 "$__OK__\\n"; }
 output_okn() { output 1 "$_OK_\\n"; output 2 "$__OK__\\n"; }
 output_fail() { s=1; output 1 "$_FAIL_"; output 2 "$__FAIL__\\n"; }
@@ -75,7 +73,7 @@ output() {
 # Can take a single parameter (text) to be output at any verbosity
 # Or target verbosity level and text to be output at specifc verbosity
        local msg memmsg logmsg
-       if [ $# -ne 1 ]; then
+       if [ "$#" -ne 1 ]; then
                if [ $((verbosity & $1)) -gt 0 ] || [ "$verbosity" = "$1" ]; then shift; else return 0; fi
        fi
        [ -t 1 ] && printf "%b" "$1"
@@ -125,7 +123,7 @@ vpr_get_gateway6() {
 }
 is_l2tp() { local proto; proto=$(uci -q get network."$1".proto); [ "${proto:0:4}" = "l2tp" ]; }
 is_oc() { local proto; proto=$(uci -q get network."$1".proto); [ "${proto:0:11}" = "openconnect" ]; }
-is_ovpn() { local dev; dev=$(uci -q get network."$1".ifname); [ "${dev:0:3}" = "tun" ] || [ "${dev:0:3}" = "tap" ] || [ -f "/sys/devices/virtual/net/${dev}/tun_flags" ]; }
+is_ovpn() { local dev i; for i in ifname device; do [ -z "$dev" ] && dev="$(uci -q get "network.${1}.${i}")"; done; [ "${dev:0:3}" = "tun" ] || [ "${dev:0:3}" = "tap" ] || [ -f "/sys/devices/virtual/net/${dev}/tun_flags" ]; }
 is_pptp() { local proto; proto=$(uci -q get network."$1".proto); [ "${proto:0:4}" = "pptp" ]; }
 is_tor() { [ "$(str_to_lower "$1")" = "tor" ]; }
 is_tor_running() { 
@@ -160,13 +158,15 @@ dnsmasq_kill() { killall -q -HUP dnsmasq; }
 dnsmasq_restart() { output 3 'Restarting DNSMASQ '; if /etc/init.d/dnsmasq restart >/dev/null 2>&1; then output_okn; else output_failn; fi; }
 is_default_dev() { [ "$1" = "$(ip -4 r | grep -m1 'dev' | grep -Eso 'dev [^ ]*' | awk '{print $2}')" ]; }
 is_supported_iface_dev() {
+       local n
        for n in $ifSupported; do 
                if [ "$1" = "$(uci -q get "network.${n}.ifname" || echo "$n")" ] || \
+                       [ "$1" = "$(uci -q get "network.${n}.device" || echo "$n")" ] || \
                        [ "$1" = "$(uci -q get "network.${n}.proto")-${n}" ] ; then return 0; fi
        done
        return 1
 }
-is_supported_protocol () { grep -o '^[^#]*' /etc/protocols | grep -w -v '0' | grep . | awk '{print $1}' | grep -q "$1"; }
+is_supported_protocol() { grep -o '^[^#]*' /etc/protocols | grep -w -v '0' | grep . | awk '{print $1}' | grep -q "$1"; }
 append_chains_targets() {
        local chain iface name
        config_get name "$1" 'name' 'blank'
@@ -195,6 +195,7 @@ load_package_config() {
        config_get_bool ipv6Enabled         'config' 'ipv6_enabled' 0
        config_get_bool srcIpset            'config' 'src_ipset' 0
        config_get_bool destIpset           'config' 'dest_ipset' 0
+       config_get_bool mainTableListing    'config' 'quick_table_create' 0
        config_get resolverIpset            'config' 'resolver_ipset' 'dnsmasq.ipset'
        config_get verbosity                'config' 'verbosity' '2'
        config_get wanTableID               'config' 'wan_tid' '201'
@@ -220,6 +221,12 @@ load_package_config() {
        mkdir -p "${jsonFile%/*}"
        mkdir -p "${dnsmasqFile%/*}"
 
+       if [ "$mainTableListing" -ne 0 ]; then
+               mainTableListing='default'
+       else
+               mainTableListing=''
+       fi
+
        if [ -n "$icmpIface" ] && ! str_contains_word "$usedChainsList" 'OUTPUT'; then
                usedChainsList="$usedChainsList OUTPUT"
        fi
@@ -482,7 +489,7 @@ insert_policy() {
        return 0
 }
 
-r_process_policy(){
+r_process_policy() {
        local comment="$1" iface="$2" laddr="$3" lport="$4" raddr="$5" rport="$6" proto="$7" chain="$8" resolved_laddr resolved_raddr i ipsFailFlag
        if str_contains "$laddr" '[ ;\{\}]'; then
                for i in $(str_extras_to_space "$laddr"); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$i" "$lport" "$raddr" "$rport" "$proto" "$chain"; done
@@ -546,7 +553,7 @@ r_process_policy(){
        fi
 }
 
-process_policy(){
+process_policy() {
        local name comment iface laddr lport raddr rport param mark processPolicyError processPolicyWarning proto chain enabled
        config_get comment "$1" 'comment'
        config_get name    "$1" 'name' 'blank'
@@ -597,22 +604,18 @@ process_policy(){
        fi
 }
 
-table_destroy(){
+table_destroy() {
        local tid="$1" iface="$2" mark="$3"
        if [ -n "$tid" ] && [ -n "$iface" ] && [ -n "$mark" ]; then
                ipt -t mangle -F "VPR_MARK${mark}"
                ipt -t mangle -X "VPR_MARK${mark}"
-               ip -4 rule del fwmark "$mark" table "$tid" >/dev/null 2>&1
-               ip -6 rule del fwmark "$mark" table "$tid" >/dev/null 2>&1
-               ip -4 rule del table "$tid" >/dev/null 2>&1
-               ip -6 rule del table "$tid" >/dev/null 2>&1
-               ip -4 route flush table "$tid" >/dev/null 2>&1
-               ip -6 route flush table "$tid" >/dev/null 2>&1
+               ip rule del fwmark "$mark" table "$tid" >/dev/null 2>&1
+               ip rule del table "$tid" >/dev/null 2>&1
+               ip route flush table "$tid" >/dev/null 2>&1
                ips 'flush' "${iface}"; ips 'destroy' "${iface}";
                ips 'flush' "${iface}_ip"; ips 'destroy' "${iface}_ip";
                ips 'flush' "${iface}_mac"; ips 'destroy' "${iface}_mac";
-               ip -4 route flush cache
-               ip -6 route flush cache
+               ip route flush cache
                sed -i "/$iface/d" /etc/iproute2/rt_tables
                return 0
        else
@@ -621,31 +624,33 @@ table_destroy(){
 }
 
 # shellcheck disable=SC2086
-table_create(){
-       local tid="$1" mark="$2" iface="$3" gw4="$4" dev="$5" gw6="$6" dev6="$7" dscp s=0 i ipv4_error=0 ipv6_error=1
+table_create() {
+       local tid="$1" mark="$2" iface="$3" gw4="$4" dev="$5" gw6="$6" dev6="$7" match="$8" dscp s=0 i ipv4_error=0 ipv6_error=1
 
        if [ -z "$tid" ] || [ -z "$mark" ] || [ -z "$iface" ]; then
                return 1
        fi
 
-       table_destroy "$tid" "$iface" "$mark"
+       sed -i "/$iface/d" /etc/iproute2/rt_tables
+       ip route flush table "$tid" >/dev/null 2>&1
 
        if [ -n "$gw4" ] || [ "$strictMode" -ne 0 ]; then
-               echo "$tid" "$iface" >> /etc/iproute2/rt_tables
+               echo "$tid $iface" >> /etc/iproute2/rt_tables
                if [ -z "$gw4" ]; then
                        ip -4 route add unreachable default table "$tid" >/dev/null 2>&1 || ipv4_error=1
                else
                        ip -4 route add default via "$gw4" dev "$dev" table "$tid" >/dev/null 2>&1 || ipv4_error=1
                fi
-#              ip -4 route list table main | grep -v 'br-lan' | while read -r i; do
-               ip -4 route list table main | while read -r i; do
+               while read -r i; do
                        idev="$(echo "$i" | grep -Eso 'dev [^ ]*' | awk '{print $2}')"
                        if ! is_supported_iface_dev "$idev"; then
                                ip -4 route add $i table "$tid" >/dev/null 2>&1 || ipv4_error=1
                        fi
-               done
-               ip -4 route flush cache || ipv4_error=1
-               ip -4 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv4_error=1
+               done << EOF
+$(ip -4 route list $mainTableListing table main)
+EOF
+               [ -n "$(ip rule list fwmark "${mark}/${fwMask}" table "$tid")" ] || \
+                       ip rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv4_error=1
                ipt -t mangle -N "VPR_MARK${mark}" || ipv4_error=1
                ipt -t mangle -A "VPR_MARK${mark}" -j MARK --set-xmark "${mark}/${fwMask}" || ipv4_error=1
                ipt -t mangle -A "VPR_MARK${mark}" -j RETURN || ipv4_error=1
@@ -657,16 +662,16 @@ table_create(){
                        if [ -z "$gw6" ] || [ "$gw6" = "::/0" ]; then
                                ip -6 route add unreachable default table "$tid" || ipv6_error=1
                        else
-                               ip -6 route list table main | grep " dev $dev6 " | while read -r i; do
+                               while read -r i; do
                                        ip -6 route add $i table "$tid" >/dev/null 2>&1 || ipv6_error=1
-                               done
+                               done << EOF
+$(ip -6 route list $mainTableListing table main | grep " dev $dev6 ")
+EOF
                        fi
-                       ip -6 route flush cache || ipv6_error=1
-                       ip -6 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv6_error=1
                fi
        fi
 
-       if [ $ipv4_error -eq 0 ] || [ $ipv6_error -eq 0 ]; then
+       if [ "$ipv4_error" -eq 0 ] || [ "$ipv6_error" -eq 0 ]; then
                dscp="$(uci -q get "${packageName}".config."${iface}"_dscp)"
                if [ "${dscp:-0}" -ge 1 ] && [ "${dscp:-0}" -le 63 ]; then
                        ipt -t mangle -I VPR_PREROUTING -m dscp --dscp "${dscp}" -g "VPR_MARK${mark}" || s=1
@@ -704,8 +709,59 @@ table_create(){
        return $s
 }
 
-process_interface(){
-       local gw4 gw6 dev dev6 s=0 dscp iface="$1" action="$2" displayText
+table_reload() {
+       local tid="$1" mark="$2" iface="$3" gw4="$4" dev="$5" gw6="$6" dev6="$7" match="$8" dscp s=0 i ipv4_error=0 ipv6_error=1
+
+       if [ -z "$tid" ] || [ -z "$mark" ] || [ -z "$iface" ]; then
+               return 1
+       fi
+
+       ip -4 route del default table "$tid" >/dev/null 2>&1
+       if [ -n "$gw4" ] || [ "$strictMode" -ne 0 ]; then
+               if [ -z "$gw4" ]; then
+                       ip -4 route add unreachable default table "$tid" >/dev/null 2>&1 || ipv4_error=1
+               else
+                       ip -4 route add default via "$gw4" dev "$dev" table "$tid" >/dev/null 2>&1 || ipv4_error=1
+               fi
+               ip -4 route flush cache || ipv4_error=1
+               ip -4 rule del fwmark "${mark}/${fwMask}" table "$tid" >/dev/null 2>&1
+               ip -4 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv4_error=1
+       fi
+
+       if [ "$ipv6Enabled" -ne 0 ]; then
+               ip -6 route del default table "$tid" >/dev/null 2>&1
+               ipv6_error=0
+               if { [ -n "$gw6" ] && [ "$gw6" != "::/0" ]; } || [ "$strictMode" -ne 0 ]; then
+                       if [ -z "$gw6" ] || [ "$gw6" = "::/0" ]; then
+                               ip -6 route add unreachable default table "$tid" || ipv6_error=1
+                       else
+                               ip -6 route list table main | grep " dev $dev6 " | while read -r i; do
+                                       ip -6 route add "$i" table "$tid" >/dev/null 2>&1 || ipv6_error=1
+                               done
+                       fi
+                       ip -6 route flush cache || ipv6_error=1
+                       ip -6 rule del fwmark "${mark}/${fwMask}" table "$tid" >/dev/null 2>&1
+                       ip -6 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv6_error=1
+               fi
+       fi
+
+       if [ "$ipv4_error" -eq 0 ] || [ "$ipv6_error" -eq 0 ]; then
+               dscp="$(uci -q get "${packageName}".config."${iface}"_dscp)"
+               if [ "${dscp:-0}" -ge 1 ] && [ "${dscp:-0}" -le 63 ]; then
+                       ipt -t mangle -I VPR_PREROUTING -m dscp --dscp "${dscp}" -g "VPR_MARK${mark}" || s=1
+               fi
+               if [ "$iface" = "$icmpIface" ]; then
+                       ipt -t mangle -I VPR_OUTPUT -p icmp -g "VPR_MARK${mark}" || s=1
+               fi
+       else
+               s=1
+       fi
+
+       return $s
+}
+
+process_interface() {
+       local gw4 gw6 dev dev6 s=0 dscp iface="$1" action="$2" match="$3" displayText
 
        is_supported_interface "$iface" || return 0
        is_wan6 "$iface" && return 0
@@ -713,9 +769,11 @@ process_interface(){
 
        network_get_device dev "$iface"
        [ -z "$dev" ] && config_get dev "$iface" 'ifname'
+       [ -z "$dev" ] && config_get dev "$iface" 'device'
        if is_wan "$iface" && [ -n "$wanIface6" ]; then
                network_get_device dev6 "$wanIface6"
                [ -z "$dev6" ] && config_get dev6 "$wanIface6" 'ifname'
+               [ -z "$dev6" ] && config_get dev6 "$wanIface6" 'device'
        fi
        [ -z "$dev6" ] && dev6="$dev"
 
@@ -729,7 +787,6 @@ process_interface(){
                create)
                        eval "mark_${iface//-/_}"='$ifaceMark'
                        eval "tid_${iface//-/_}"='$ifaceTableID'
-                       table_destroy "${ifaceTableID}" "${iface}"
                        vpr_get_gateway gw4 "$iface" "$dev"
                        vpr_get_gateway6 gw6 "$iface" "$dev6"
                        if [ "$iface" = "$dev" ]; then
@@ -738,14 +795,29 @@ process_interface(){
                                displayText="${iface}/${dev}/${gw4:-0.0.0.0}"
                        fi
                        [ "$ipv6Enabled" -ne 0 ] && displayText="${displayText}/${gw6:-::/0}"
-                       output 2 "Creating table '$displayText' "
-                       is_default_dev "$dev" && displayText="${displayText} ${__OK__}"
-                       if table_create "$ifaceTableID" "$ifaceMark" "$iface" "$gw4" "$dev" "$gw6" "$dev6"; then
-                               gatewaySummary="${gatewaySummary}${displayText}\\n"
-                               output_ok
+                       if [ -z "$match" ]; then
+                               output 2 "Creating table '$displayText' "
+                               is_default_dev "$dev" && displayText="${displayText} ${__OK__}"
+                               if table_create "$ifaceTableID" "$ifaceMark" "$iface" "$gw4" "$dev" "$gw6" "$dev6" "$match"; then
+                                       gatewaySummary="${gatewaySummary}${displayText}\\n"
+                                       output_ok
+                               else
+                                       errorSummary="${errorSummary}${_ERROR_}: Failed to set up '$displayText'\\n"
+                                       output_fail
+                               fi
+                       elif [ "$iface" = "$match" ]; then
+                               output 2 "Reloading table '$displayText' "
+                               is_default_dev "$dev" && displayText="${displayText} ${__OK__}"
+                               if table_reload "$ifaceTableID" "$ifaceMark" "$iface" "$gw4" "$dev" "$gw6" "$dev6" "$match"; then
+                                       gatewaySummary="${gatewaySummary}${displayText}\\n"
+                                       output_ok
+                               else
+                                       errorSummary="${errorSummary}${_ERROR_}: Failed to reload '$displayText'\\n"
+                                       output_fail
+                               fi
                        else
-                               errorSummary="${errorSummary}${_ERROR_}: Failed to set up '$displayText'\\n"
-                               output_fail
+                               is_default_dev "$dev" && displayText="${displayText} ${__OK__}"
+                               gatewaySummary="${gatewaySummary}${displayText}\\n"
                        fi
                        ifaceTableID="$((ifaceTableID + 1))"; ifaceMark="$(printf '0x%06x' $((ifaceMark + wanMark)))";
                        ;;
@@ -753,7 +825,7 @@ process_interface(){
        return $s
 }
 
-process_tor_interface(){
+process_tor_interface() {
        local s=0 iface="$1" action="$2" displayText
        case "$action" in
                destroy)
@@ -783,7 +855,7 @@ process_tor_interface(){
                                s=1
                        fi
                        displayText="${iface}/53->${dnsPort}/80,443->${transPort}"
-                       if [ "$s" -eq "0" ]; then
+                       if [ "$s" -eq 0 ]; then
                                gatewaySummary="${gatewaySummary}${displayText}\\n"
                                output_ok
                        else
@@ -795,7 +867,7 @@ process_tor_interface(){
        return $s
 }
 
-convert_config(){
+convert_config() {
        local i src_ipset dest_ipset resolver_ipset
        [ -s "/etc/config/${packageName}" ] || return 0
        grep -q "ignored_interfaces" "/etc/config/${packageName}" && sed -i 's/ignored_interfaces/ignored_interface/g' "/etc/config/${packageName}"
@@ -853,8 +925,8 @@ convert_config(){
        done
 }
 
-check_config(){ local en; config_get_bool en "$1" 'enabled' 1; [ "$en" -gt 0 ] && _cfg_enabled=0; }
-is_config_enabled(){
+check_config() { local en; config_get_bool en "$1" 'enabled' 1; [ "$en" -gt 0 ] && _cfg_enabled=0; }
+is_config_enabled() {
        local cfg="$1" _cfg_enabled=1
        [ -n "$1" ] || return 1
        config_load "$packageName"
@@ -862,7 +934,7 @@ is_config_enabled(){
        return "$_cfg_enabled"
 }
 
-process_user_file(){
+process_user_file() {
        local path enabled shellBin="${SHELL:-/bin/ash}"
        config_get_bool enabled "$1" 'enabled' 1
        config_get      path    "$1" 'path'
@@ -893,37 +965,46 @@ process_user_file(){
        fi
 }
 
+boot() { rc_procd start_service && rc_procd service_triggers; }
+
 start_service() {
-       local dnsmasqStoredHash dnsmasqNewHash i modprobeStatus=0
+       local dnsmasqStoredHash dnsmasqNewHash i modprobeStatus=0 reloadedIface="$1"
        convert_config
        is_enabled 'on_start' || return 1
        is_wan_up || return 1
-       if create_lock; then
-               if [ -s "$dnsmasqFile" ]; then
-                       dnsmasqStoredHash="$(md5sum $dnsmasqFile | awk '{ print $1; }')"
-                       rm -f "$dnsmasqFile"
-               fi
 
-               for i in xt_set ip_set ip_set_hash_ip; do
-                       modprobe "$i" >/dev/null 2>/dev/null || modprobeStatus=$((modprobeStatus + 1))
-               done
+       iptables -t 'mangle' --list 'VPR_PREROUTING' >/dev/null 2>&1 || unset reloadedIface
+       [ -n "$(tmpfs get status)" ] || unset reloadedIface
 
-               if [ "$modprobeStatus" -gt 0 ] && ! is_chaos_calmer; then
-                       errorSummary="${errorSummary}${_ERROR_}: Failed to load kernel modules\\n"
-               fi
+       if [ -s "$dnsmasqFile" ]; then
+               dnsmasqStoredHash="$(md5sum $dnsmasqFile | awk '{ print $1; }')"
+               rm -f "$dnsmasqFile"
+       fi
 
+       for i in xt_set ip_set ip_set_hash_ip; do
+               modprobe "$i" >/dev/null 2>/dev/null || modprobeStatus=$((modprobeStatus + 1))
+       done
+
+       if [ "$modprobeStatus" -gt 0 ] && ! is_chaos_calmer; then
+               errorSummary="${errorSummary}${_ERROR_}: Failed to load kernel modules\\n"
+       fi
+
+       if [ -z "$reloadedIface" ]; then
                for i in $usedChainsList; do
                        ipt -t mangle -N "VPR_${i}"
                        ipt -t mangle "$insertOption" "$i" -m mark --mark "0x0/${fwMask}" -j "VPR_${i}"
                done
+       fi
 
+       if [ -z "$reloadedIface" ]; then
                output 1 'Processing Interfaces '
                config_load 'network'; config_foreach process_interface 'interface' 'create';
                process_tor_interface 'tor' 'destroy'; is_tor_running && process_tor_interface 'tor' 'create';
+               ip route flush cache
                output 1 '\n'
                if is_config_enabled 'policy'; then
                        output 1 'Processing Policies '
-                       config_load "$packageName"; config_foreach process_policy 'policy';
+                       config_load "$packageName"; config_foreach process_policy 'policy' "$reloadedIface";
                        output 1 '\n'
                fi
                if is_config_enabled 'include'; then
@@ -931,38 +1012,37 @@ start_service() {
                        config_load "$packageName"; config_foreach process_user_file 'include';
                        output 1 '\n'
                fi
+       else
+               output 1 "Reloading Interface: $reloadedIface "
+               config_load 'network'; config_foreach process_interface 'interface' 'create' "$reloadedIface";
+               output 1 '\n'
+       fi
 
-               if [ -s "$dnsmasqFile" ]; then
-                       dnsmasqNewHash="$(md5sum $dnsmasqFile | awk '{ print $1; }')"
-               fi
-               [ "$dnsmasqNewHash" != "$dnsmasqStoredHash" ] && dnsmasq_restart
+       if [ -s "$dnsmasqFile" ]; then
+               dnsmasqNewHash="$(md5sum $dnsmasqFile | awk '{ print $1; }')"
+       fi
+       [ "$dnsmasqNewHash" != "$dnsmasqStoredHash" ] && dnsmasq_restart
 
-               if [ -z "$gatewaySummary" ]; then
-                       errorSummary="${errorSummary}${_ERROR_}: failed to set up any gateway!\\n"
-               fi
-               procd_open_instance "main"
-               procd_set_param command /bin/true
-               procd_set_param stdout 1
-               procd_set_param stderr 1
-               procd_open_data
-               json_add_array 'status'
-               json_add_object ''
-               [ -n "$gatewaySummary" ] && json_add_string gateway "$gatewaySummary"
-               [ -n "$errorSummary" ] && json_add_string error "$errorSummary"
-               [ -n "$warningSummary" ] && json_add_string warning "$warningSummary"
-               if [ "$strictMode" -ne 0 ] && str_contains "$gatewaySummary" '0.0.0.0'; then
-                       json_add_string mode "strict"
-               fi
-               json_close_object
-               json_close_array
-               procd_close_data
-               procd_close_instance
-               remove_lock
-       else
-               output "$serviceName: another instance of ${packageName} is currently running "
-               output_failn
-               return 1
+       if [ -z "$gatewaySummary" ]; then
+               errorSummary="${errorSummary}${_ERROR_}: failed to set up any gateway!\\n"
        fi
+       procd_open_instance "main"
+       procd_set_param command /bin/true
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_open_data
+       json_add_array 'status'
+       json_add_object ''
+       [ -n "$gatewaySummary" ] && json_add_string gateway "$gatewaySummary"
+       [ -n "$errorSummary" ] && json_add_string error "$errorSummary"
+       [ -n "$warningSummary" ] && json_add_string warning "$warningSummary"
+       if [ "$strictMode" -ne 0 ] && str_contains "$gatewaySummary" '0.0.0.0'; then
+               json_add_string mode "strict"
+       fi
+       json_close_object
+       json_close_array
+       procd_close_data
+       procd_close_instance
 }
 
 tmpfs() {
@@ -1025,30 +1105,25 @@ service_started() {
 stop_service() {
        local i
        iptables -t mangle -L | grep -q VPR_PREROUTING || return 0
-       if create_lock; then
-               load_package_config
-               for i in PREROUTING FORWARD INPUT OUTPUT; do
-                       ipt -t mangle -D "${i}" -m mark --mark "0x0/${fwMask}" -j "VPR_${i}"
-                       ipt -t mangle -F "VPR_${i}"; ipt -t mangle -X "VPR_${i}";
-               done
-               config_load 'network'; config_foreach process_interface 'interface' 'destroy';
-               process_tor_interface 'tor' 'destroy'
-               unset ifaceTableID; unset ifaceMark;
-               if [ -s "$dnsmasqFile" ]; then
-                       rm -f "$dnsmasqFile"
-                       dnsmasq_restart
-               fi
-               if [ "$serviceEnabled" -ne 0 ]; then
-                       output "$serviceName stopped "; output_okn;
-               fi
-               remove_lock
-       else
-               output "$serviceName: another instance of ${packageName} is currently running "; output_failn;
-               return 1
+       load_package_config
+       for i in PREROUTING FORWARD INPUT OUTPUT; do
+               ipt -t mangle -D "${i}" -m mark --mark "0x0/${fwMask}" -j "VPR_${i}"
+               ipt -t mangle -F "VPR_${i}"; ipt -t mangle -X "VPR_${i}";
+       done
+       config_load 'network'; config_foreach process_interface 'interface' 'destroy';
+       process_tor_interface 'tor' 'destroy'
+       unset ifaceTableID; unset ifaceMark;
+       if [ -s "$dnsmasqFile" ]; then
+               rm -f "$dnsmasqFile"
+               dnsmasq_restart
+       fi
+       if [ "$serviceEnabled" -ne 0 ]; then
+               output "$serviceName stopped "; output_okn;
        fi
 }
 
-# shellcheck disable=SC2119
+reload_interface() { rc_procd start_service "$1"; }
+
 service_triggers() {
        local n
        is_enabled || return 1
@@ -1070,7 +1145,9 @@ service_triggers() {
                        procd_add_service_trigger "service.restart" "firewall" /etc/init.d/${packageName} reload
                fi
                procd_add_config_trigger "config.change" "${packageName}" /etc/init.d/${packageName} reload
-               for n in $ifSupported; do procd_add_reload_interface_trigger "$n"; procd_add_interface_trigger "interface.*" "$n" /etc/init.d/${packageName} reload; done;
+               for n in $ifSupported; do 
+                       procd_add_interface_trigger "interface.*" "$n" /etc/init.d/${packageName} reload_interface "$n"
+               done
        procd_close_trigger
 
        output 3 "$serviceName monitoring interfaces: $ifSupported"; output_okn;
@@ -1085,10 +1162,12 @@ support() {
        json_load "$(ubus call system board)"; json_select release; json_get_var dist distribution; json_get_var vers version
        if [ -n "$wanIface4" ]; then
                network_get_gateway wanGW4 "$wanIface4"
-               dev="$(uci -q get network."${wanIface4}".ifname)"
+               [ -z "$dev" ] && dev="$(uci -q get network."${wanIface4}".ifname)"
+               [ -z "$dev" ] && dev="$(uci -q get network."${wanIface4}".device)"
        fi
        if [ -n "$wanIface6" ]; then
-               dev6="$(uci -q get network."${wanIface6}".ifname)"
+               [ -z "$dev6" ] && dev6="$(uci -q get network."${wanIface6}".ifname)"
+               [ -z "$dev6" ] && dev6="$(uci -q get network."${wanIface6}".device)"
                wanGW6=$(ip -6 route show | grep -m1 " dev $dev6 " | awk '{print $1}')
                [ "$wanGW6" = "default" ] && wanGW6=$(ip -6 route show | grep -m1 " dev $dev6 " | awk '{print $3}')
        fi
index 02335c4b355c393d23b173c5c7544a9ac0e48eb1..1a287d5678ba50a0d0e2b7156e8b39fcb9ed9748 100644 (file)
@@ -15,17 +15,17 @@ _ret=1
 if [ ! -s "$TARGET_FNAME" ]; then
        if [ "$DB_SOURCE" = "ipinfo.io" ]; then
                TARGET_URL="https://ipinfo.io/AS${TARGET_ASN}"
-               curl "$TARGET_URL" 2>/dev/null | grep -E "a href.*${TARGET_ASN}\/" | grep -v ":" | sed "s/^.*<a href=\"\/AS${TARGET_ASN}\///; s/\" >//" > "$TARGET_FNAME"
+               uclient-fetch --no-check-certificate -qO- "$TARGET_URL" 2>/dev/null | grep -E "a href.*${TARGET_ASN}\/" | grep -v ":" | sed "s/^.*<a href=\"\/AS${TARGET_ASN}\///; s/\" >//" > "$TARGET_FNAME"
        fi
 
        if [ "$DB_SOURCE" = "api.hackertarget.com" ]; then
                TARGET_URL="https://api.hackertarget.com/aslookup/?q=AS${TARGET_ASN}"
-               curl "$TARGET_URL" 2>/dev/null | sed '1d' > "$TARGET_FNAME"
+               uclient-fetch --no-check-certificate -qO- "$TARGET_URL" 2>/dev/null | sed '1d' > "$TARGET_FNAME"
        fi
 
        if [ "$DB_SOURCE" = "api.bgpview.io" ]; then
                TARGET_URL="https://api.bgpview.io/asn/${TARGET_ASN}/prefixes"
-               curl -s "$TARGET_URL" 2>/dev/null | jsonfilter -e '@.data.ipv4_prefixes[*].prefix' > "$TARGET_FNAME"
+               uclient-fetch --no-check-certificate -qO- "$TARGET_URL" 2>/dev/null | jsonfilter -e '@.data.ipv4_prefixes[*].prefix' > "$TARGET_FNAME"
        fi
 fi
 
index cf5eac10cdee72685a4ab99dd9e452ec5024fb72..ed3c1a16423e9d48f2dc1ecaf730e70aec96252d 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.2.5
+PKG_VERSION:=1.2.5.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
                http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=09970af05838b30001ca93ba27cb85b24c45056c70a80066c3ece6abe5a19997
+PKG_HASH:=9c169ae37a49295f9b97b92ace772803daf6b6510a19574e0b78f87e562118d0
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-2.0-or-later
index 2afe0c4062664031c3482856cbf647b7811c87b4..86dcd5be0042f448bea13dc6f54f456ca4d5e595 100644 (file)
@@ -18,7 +18,7 @@ PKG_HASH:=321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=LGPL-2.1-or-later
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
index b15a145d457a45061d1578de0537ea9323a69662..ca276fb36ffd37d2fb27c2ab13cb1ccff73f5dd2 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bash
-PKG_VERSION:=5.1
-PKG_RELEASE:=3
+PKG_VERSION:=5.1.8
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/bash
-PKG_HASH:=cc012bc860406dcf42f64431bcd3d2fa7560c02915a601aba9cd597a39329baa
+PKG_HASH:=0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be
 
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 PKG_LICENSE:=GPL-3.0-or-later
diff --git a/utils/bash/patches/101-bash51-001.patch b/utils/bash/patches/101-bash51-001.patch
deleted file mode 100644 (file)
index 02898aa..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-                            BASH PATCH REPORT
-                            =================
-
-Bash-Release:  5.1
-Patch-ID:      bash51-001
-
-Bug-Reported-by:       Fazal Majid <fazal@majid.org>
-Bug-Reference-ID:      <DEAB7D2C-C626-450C-B2E5-281AFF2D26D4@majid.org>
-Bug-Reference-URL:     https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00000.html
-
-Bug-Description:
-
-There is a missing dependency on a constructed file, which can cause highly
-parellel builds to fail.
-
-Patch (apply with `patch -p0'):
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -1315,6 +1315,7 @@ bashline.o: trap.h flags.h assoc.h $(BAS
- bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h
- bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
- bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-+bashline.o: ${DEFDIR}/builtext.h
- bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
- bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
- bracecomp.o: command.h ${BASHINCDIR}/stdc.h error.h
-@@ -1435,6 +1436,7 @@ builtins/evalstring.o: quit.h unwind_pro
- builtins/evalstring.o: dispose_cmd.h make_cmd.h subst.h externs.h 
- builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h
- builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h
-+builtins/evalstring.o: ${DEFDIR}/builtext.h
- builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h
- builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h
- builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
---- a/builtins/Makefile.in
-+++ b/builtins/Makefile.in
-@@ -361,7 +361,7 @@ evalstring.o: $(topdir)/dispose_cmd.h $(
- evalstring.o: $(topdir)/externs.h $(topdir)/jobs.h $(topdir)/builtins.h
- evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h
- evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h
--evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h
-+evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h
- #evalstring.o: $(topdir)/y.tab.h
- getopt.o: ../config.h $(BASHINCDIR)/memalloc.h
- getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/command.h
---- a/patchlevel.h
-+++ b/patchlevel.h
-@@ -1,6 +1,6 @@
- /* patchlevel.h -- current bash patch level */
--/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
-    This file is part of GNU Bash, the Bourne Again SHell.
-@@ -25,6 +25,6 @@
-    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
--#define PATCHLEVEL 0
-+#define PATCHLEVEL 1
- #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/102-bash51-002.patch b/utils/bash/patches/102-bash51-002.patch
deleted file mode 100644 (file)
index 2faa881..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-                            BASH PATCH REPORT
-                            =================
-
-Bash-Release:  5.1
-Patch-ID:      bash51-002
-
-Bug-Reported-by:       oguzismailuysal@gmail.com
-Bug-Reference-ID:      <CAH7i3LoHFUa4aSF5-AD2r80HG-p-YzD_9ZxomarZkhP8NMq63g@mail.gmail.com>
-Bug-Reference-URL:     https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00037.html
-
-Bug-Description:
-
-If there are no jobs, and the `-n' and `-p' options are both supplied to
-`wait', bash can assign a value to the variable name specified with `-p'
-instead of leaving it unset.
-
-Patch (apply with `patch -p0'):
-
---- a/builtins/wait.def
-+++ b/builtins/wait.def
-@@ -213,11 +213,11 @@ wait_builtin (list)
-       }
-       status = wait_for_any_job (wflags, &pstat);
--      if (status < 0)
--      status = 127;
--
-       if (vname && status >= 0)
-       bind_var_to_int (vname, pstat.pid);
-+
-+      if (status < 0)
-+      status = 127;
-       if (list)
-       unset_waitlist ();
-       WAIT_RETURN (status);
---- a/patchlevel.h
-+++ b/patchlevel.h
-@@ -25,6 +25,6 @@
-    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
--#define PATCHLEVEL 1
-+#define PATCHLEVEL 2
- #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/103-bash51-003.patch b/utils/bash/patches/103-bash51-003.patch
deleted file mode 100644 (file)
index 72c251b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-                            BASH PATCH REPORT
-                            =================
-
-Bash-Release:  5.1
-Patch-ID:      bash51-003
-
-Bug-Reported-by:       oguzismailuysal@gmail.com
-Bug-Reference-ID:      <CAH7i3LpG91BnNcDtaTUm2Ph7a+PnJkuh6nAc87cVL7_38tOaMQ@mail.gmail.com>
-Bug-Reference-URL:     https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00050.html
-
-Bug-Description:
-
-Bash does not put a command substitution process that is started to perform an
-expansion in a child process into the right process group where it can receive
-keyboard-generated signals.
-
-Patch (apply with `patch -p0'):
-
---- a/subst.c
-+++ b/subst.c
-@@ -6356,8 +6356,10 @@ command_substitute (string, quoted, flag
- #if defined (JOB_CONTROL)
-   old_pipeline_pgrp = pipeline_pgrp;
--  /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
--  if ((subshell_environment & SUBSHELL_PIPE) == 0)
-+  /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
-+     we've already forked to run a disk command (and are expanding redirections,
-+     for example). */
-+  if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
-     pipeline_pgrp = shell_pgrp;
-   cleanup_the_pipeline ();
- #endif /* JOB_CONTROL */
---- a/patchlevel.h
-+++ b/patchlevel.h
-@@ -25,6 +25,6 @@
-    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
--#define PATCHLEVEL 2
-+#define PATCHLEVEL 3
- #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/104-bash51-004.patch b/utils/bash/patches/104-bash51-004.patch
deleted file mode 100644 (file)
index 218b843..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-                            BASH PATCH REPORT
-                            =================
-
-Bash-Release:  5.1
-Patch-ID:      bash51-004
-
-Bug-Reported-by:       oguzismailuysal@gmail.com
-Bug-Reference-ID:      <CAH7i3LoHGmwaghDpCWRUfcY04gQmeDTH3RiG=bf2b=KbU=gyhw@mail.gmail.com>
-Bug-Reference-URL:     https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00039.html
-
-Bug-Description:
-
-If a key-value compound array assignment to an associative array is supplied
-as an assignment statement argument to the `declare' command that declares the
-array, the assignment doesn't perform the correct word expansions.
-
-This patch makes key-value assignment and subscript assignment perform the
-same expansions when they're supplied as an argument to `declare'.
-
-Patch (apply with `patch -p0'):
-
---- a/arrayfunc.c
-+++ b/arrayfunc.c
-@@ -597,6 +597,27 @@ assign_assoc_from_kvlist (var, nlist, h,
-       free (aval);
-     }
- }
-+
-+/* Return non-zero if L appears to be a key-value pair associative array
-+   compound assignment. */ 
-+int
-+kvpair_assignment_p (l)
-+     WORD_LIST *l;
-+{
-+  return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '[');      /*]*/
-+}
-+
-+char *
-+expand_and_quote_kvpair_word (w)
-+     char *w;
-+{
-+  char *t, *r;
-+
-+  t = w ? expand_assignment_string_to_string (w, 0) : 0;
-+  r = sh_single_quote (t ? t : "");
-+  free (t);
-+  return r;
-+}
- #endif
-      
- /* Callers ensure that VAR is not NULL. Associative array assignments have not
-@@ -640,7 +661,7 @@ assign_compound_array_list (var, nlist,
-   last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0;
- #if ASSOC_KVPAIR_ASSIGNMENT
--  if (assoc_p (var) && nlist && (nlist->word->flags & W_ASSIGNMENT) == 0 && nlist->word->word[0] != '[')      /*]*/
-+  if (assoc_p (var) && kvpair_assignment_p (nlist))
-     {
-       iflags = flags & ~ASS_APPEND;
-       assign_assoc_from_kvlist (var, nlist, nhash, iflags);
---- a/arrayfunc.h
-+++ b/arrayfunc.h
-@@ -67,6 +67,9 @@ extern SHELL_VAR *assign_array_var_from_
- extern char *expand_and_quote_assoc_word PARAMS((char *, int));
- extern void quote_compound_array_list PARAMS((WORD_LIST *, int));
-+extern int kvpair_assignment_p PARAMS((WORD_LIST *));
-+extern char *expand_and_quote_kvpair_word PARAMS((char *));
-+
- extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int));
- extern int skipsubscript PARAMS((const char *, int, int));
---- a/subst.c
-+++ b/subst.c
-@@ -11604,6 +11604,7 @@ expand_oneword (value, flags)
- {
-   WORD_LIST *l, *nl;
-   char *t;
-+  int kvpair;
-   
-   if (flags == 0)
-     {
-@@ -11618,11 +11619,21 @@ expand_oneword (value, flags)
-     {
-       /* Associative array */
-       l = parse_string_to_word_list (value, 1, "array assign");
-+#if ASSOC_KVPAIR_ASSIGNMENT
-+      kvpair = kvpair_assignment_p (l);
-+#endif
-+
-       /* For associative arrays, with their arbitrary subscripts, we have to
-        expand and quote in one step so we don't have to search for the
-        closing right bracket more than once. */
-       for (nl = l; nl; nl = nl->next)
-       {
-+#if ASSOC_KVPAIR_ASSIGNMENT
-+        if (kvpair)
-+          /* keys and values undergo the same set of expansions */
-+          t = expand_and_quote_kvpair_word (nl->word->word);
-+        else
-+#endif
-         if ((nl->word->flags & W_ASSIGNMENT) == 0)
-           t = sh_single_quote (nl->word->word ? nl->word->word : "");
-         else
---- a/patchlevel.h
-+++ b/patchlevel.h
-@@ -25,6 +25,6 @@
-    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
--#define PATCHLEVEL 3
-+#define PATCHLEVEL 4
- #endif /* _PATCHLEVEL_H_ */
index 3e3c89b73553c833b113a47f7c0ab37cfc40019c..6d3407eccce806b1b784f2d369627fb842d1ca84 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez
-PKG_VERSION:=5.56
-PKG_RELEASE:=1
+PKG_VERSION:=5.60
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_HASH:=59c4dba9fc8aae2a6a5f8f12f19bc1b0c2dc27355c7ca3123eed3fe6bd7d0b9d
+PKG_HASH:=710999580d01ee59ec585e5e7c07fd94eddedc001aa26fe7464c546f9d945304
 
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
index 0a2f20eb32e8eec166d11f67b2b3179b7f97cdb8..f6dd7166244cee1642f83449de2bb2511891aa39 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -3225,7 +3225,7 @@ unit_tests = $(am__append_54) unit/test-
+@@ -3326,7 +3326,7 @@ unit_tests = $(am__append_52) unit/test-
  @CLIENT_TRUE@                                 client/gatt.h client/gatt.c
  
  @CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@@ -9,7 +9,7 @@
  
  @ZSH_COMPLETIONS_TRUE@zshcompletiondir = $(ZSH_COMPLETIONDIR)
  @ZSH_COMPLETIONS_TRUE@dist_zshcompletion_DATA = completion/zsh/_bluetoothctl
-@@ -3457,7 +3457,7 @@ unit_tests = $(am__append_54) unit/test-
+@@ -3559,7 +3559,7 @@ unit_tests = $(am__append_52) unit/test-
  
  @MESH_TRUE@@TOOLS_TRUE@tools_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
  @MESH_TRUE@@TOOLS_TRUE@                               lib/libbluetooth-internal.la \
@@ -18,7 +18,7 @@
  
  @MESH_TRUE@@TOOLS_TRUE@tools_mesh_cfgclient_SOURCES = tools/mesh-cfgclient.c \
  @MESH_TRUE@@TOOLS_TRUE@                               tools/mesh/model.h tools/mesh/config-model.h \
-@@ -3524,7 +3524,7 @@ unit_tests = $(am__append_54) unit/test-
+@@ -3630,7 +3630,7 @@ unit_tests = $(am__append_52) unit/test-
  @READLINE_TRUE@                                               tools/obex-client-tool.c
  
  @READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
@@ -27,7 +27,7 @@
  
  @READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
  @READLINE_TRUE@                                               tools/obex-server-tool.c
-@@ -3533,15 +3533,15 @@ unit_tests = $(am__append_54) unit/test-
+@@ -3639,15 +3639,15 @@ unit_tests = $(am__append_52) unit/test-
  @READLINE_TRUE@tools_bluetooth_player_SOURCES = tools/bluetooth-player.c
  @READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
  @READLINE_TRUE@                               src/libshared-glib.la \
@@ -46,7 +46,7 @@
  
  @DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
  @DEPRECATED_TRUE@@READLINE_TRUE@                              attrib/gattrib.c btio/btio.c \
-@@ -3550,7 +3550,7 @@ unit_tests = $(am__append_54) unit/test-
+@@ -3656,7 +3656,7 @@ unit_tests = $(am__append_52) unit/test-
  @DEPRECATED_TRUE@@READLINE_TRUE@                              client/display.h
  
  @DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
index 005684add9580692db9b44d20bbfff853b8973c3..c42739ea8c1242f09e4dda79c4161610f5a2ae84 100644 (file)
@@ -34,7 +34,7 @@ This commit prevents the call to btd_adv_manager_refresh for non-LE devices.
 
 --- a/src/adapter.c
 +++ b/src/adapter.c
-@@ -557,7 +557,8 @@ static void settings_changed(struct btd_
+@@ -560,7 +560,8 @@ static void settings_changed(struct btd_
                g_dbus_emit_property_changed(dbus_conn, adapter->path,
                                        ADAPTER_INTERFACE, "Discoverable");
                store_adapter_info(adapter);
index d1d94229eb47d99b953541a9f1adfac97e921eed..741bbeb9d7967163b3b56a226377b42b98396621 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=canutils
-PKG_VERSION:=2020.12.0
-PKG_RELEASE:=1
+PKG_VERSION:=2021.06.0
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/linux-can/can-utils/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c5c22a00ce2ea7578d7617ac0affef8f47a349be58e708780d703b979f324a2b
+PKG_HASH:=f7874457224c89f8b2eb55ab741935ddb7f1c9bc52de2642330b0799f89d1040
 PKG_BUILD_DIR:=$(BUILD_DIR)/can-utils-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
index c9261f215e7179633267751e29fb7758f0e720bb..b71a65c0dff730f798781adf84380e9aa453600c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ccid
-PKG_VERSION:=1.4.34
+PKG_VERSION:=1.4.35
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://ccid.apdu.fr/files/
-PKG_HASH:=e6f7645b59a9a2844eb4b1a7eff512960d7f04a4654af02f7fd2f8aded5db40a
+PKG_HASH:=7c3e2a7924edda722189ca57c8d1cffa51e7f9354a23e81aecd9d1ae8d9710ca
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
index 7ba4fce6600bf6db7c7aab542053b34bd01629dc..64b9f83813650d0212baf5f0c183d0ff02787646 100644 (file)
@@ -14,7 +14,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/slimm609/checksec.sh/archive/$(PKG_VERSION)
 PKG_HASH:=05bb28e22a916ff5f43d60ddf7b00f233618bbf8f283a059f8e0ceb695bc4ac0
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_INSTALL:=1
diff --git a/utils/clocate/Makefile b/utils/clocate/Makefile
new file mode 100644 (file)
index 0000000..424f75e
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2021 David Bauer <mail@david-bauer.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=clocate
+PKG_SOURCE_DATE:=2021-07-07
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/blocktrron/clocate.git
+PKG_SOURCE_VERSION:=ef531687c16bab959f61dff3755148ac9a0c1464
+PKG_MIRROR_HASH:=1fde4052113a52c018476062a5fad656673b89be95a469fed2d35649a7f1bce3
+
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+PKG_LICENSE:=GPL-2.0-only
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/clocate
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libcurl +libnl-tiny +libjson-c
+  TITLE:=Determine device location using neighbouring WiFi networks
+endef
+
+define Package/clocate/description
+       This program can locate a device by sending the nighbouring WiFI networks
+       to a geolocation Provider. Currently supported providers are Mozilla and Google.
+endef
+
+define Package/clocate/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/clocate $(1)/sbin/clocate
+endef
+
+MAKE_FLAGS += LIBNL_TINY=1
+
+$(eval $(call BuildPackage,clocate))
index fd623c4a71109333b8677122d9cba2edc18d5b13..c17f27595b7a5c75ea6f5357553cc684d80bfee5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptsetup
-PKG_VERSION:=2.3.5
+PKG_VERSION:=2.3.6
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.3
-PKG_HASH:=ced9946f444d132536daf92fc8aca4277638a3c2d96e20540b2bae4d36fd70c1
+PKG_HASH:=b296b7a21ea576c2b180611ccb19d06aec8dddaedf7c704b0c6a81210c25635f
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
index 4486fc8aa3302a8a37bf44ea3b83e7d1947bce76..28fcf926753682ffc63c76a799625b6c8a218b16 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ctop
-PKG_VERSION:=0.7.5
+PKG_VERSION:=0.7.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/bcicen/ctop/archive
-PKG_HASH:=a9a3be0e5eab2fee6b44a5d063188a354f9c0dde3d96a169d1490981f7826e9a
+PKG_HASH:=8ef76a7d4d725f750a5d8a6ee330e81b3b845a91fbd50ae3e746cead74736391
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=MIT
index 455674dbf2f86954a0fb7d106dec826b79b14153..5c937acaf4bbd45ae92b701d43e93728afe6e59f 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fish
-PKG_VERSION:=3.2.2
+PKG_VERSION:=3.3.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
-PKG_HASH:=5944da1a8893d11b0828a4fd9136ee174549daffb3d0adfdd8917856fe6b4009
+PKG_HASH:=b5b4ee1a5269762cbbe993a4bd6507e675e4100ce9bbe84214a5eeb2b19fae89
 
 PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
 PKG_LICENSE:=GPL-2.0-only
index c40b2e5453f11cf353c8e37ae7b3e195f730d336..0f54447339acdce1e8e26145a799c0f1e872ee80 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gptfdisk
-PKG_VERSION:=1.0.6
-PKG_RELEASE:=1
+PKG_VERSION:=1.0.8
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=ddc551d643a53f0bd4440345d3ae32c49b04a797e9c01036ea460b6bb4168ca8
+PKG_HASH:=95d19856f004dabc4b8c342b2612e8d0a9eebdd52004297188369f152e9dc6df
 
 PKG_MAINTAINER:=Alif M. Ahmad <alive4ever@live.com>
 PKG_LICENSE:=GPL-2.0-or-later
index 27473b4b7997f844d3f8415e866809979d7ab7f3..8b1563c2ef0cee8b432a04d70beec9c36c31e370 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2c-tools
-PKG_VERSION:=4.2
+PKG_VERSION:=4.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
-PKG_HASH:=37f2dabc7082d185903ff21d1f584b5dcb4dd2eb2c879bbd8d7c50ae900dacd6
+PKG_HASH:=1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
index f2165019131dcc0a7731b527649b1cf1ad761b58..bc40b4e05edb949bbd25c37b4f2857086b0d58ca 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minicom
-PKG_VERSION:=2.7.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.8
+PKG_RELEASE:=$(AUTORELEASE)
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4215
-PKG_HASH:=532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://salsa.debian.org/minicom-team/minicom/-/archive/$(PKG_VERSION)
+PKG_HASH:=38cea30913a20349326ff3f1763ee1512b7b41601c24f065f365e18e9db0beba
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:minicom:minicom
 
@@ -30,7 +30,7 @@ define Package/minicom
   CATEGORY:=Utilities
   DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +libncurses
   TITLE:=Terminal emulation program
-  URL:=http://alioth.debian.org/projects/minicom/
+  URL:=https://salsa.debian.org/minicom-team/minicom
   SUBMENU:=Terminal
 endef
 
diff --git a/utils/minicom/patches/100-fix_iconv_include.patch b/utils/minicom/patches/100-fix_iconv_include.patch
deleted file mode 100644 (file)
index 88190fa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/src/minicom.c
-+++ b/src/minicom.c
-@@ -31,7 +31,9 @@
- #include <getopt.h>
- #include <wchar.h>
- #include <wctype.h>
-+#ifdef HAVE_ICONV
- #include <iconv.h>
-+#endif
- #include <limits.h>
- #define EXTERN
diff --git a/utils/minicom/patches/101-fix_music_includes.patch b/utils/minicom/patches/101-fix_music_includes.patch
deleted file mode 100644 (file)
index a74d123..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/src/dial.c
-+++ b/src/dial.c
-@@ -39,11 +39,9 @@
- #include "intl.h"
- #ifdef VC_MUSIC
--#  if defined(__GLIBC__)
- #    include <sys/ioctl.h>
- #    include <sys/kd.h>
- #    include <sys/time.h>
--#  endif
- #endif
- enum { CURRENT_VERSION = 6 };
diff --git a/utils/minicom/patches/102-fix_musl_compatibility.patch b/utils/minicom/patches/102-fix_musl_compatibility.patch
deleted file mode 100644 (file)
index 4524b22..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/getsdir.h
-+++ b/src/getsdir.h
-@@ -24,6 +24,10 @@
- #include <dirent.h>
-+#ifndef MAXNAMLEN
-+#define MAXNAMLEN 255
-+#endif
-+
- typedef struct dirEntry {             /* structure of data item */
-   char fname[MAXNAMLEN + 1];          /* filename + terminating null */
-   time_t time;                                /* last modification date */
index 1302f5b81569b30805f9f02347f981e06357f4bb..82aaa13556a29dd7a64de70efbd2d8e3415621c0 100644 (file)
@@ -1,15 +1,15 @@
 --- a/src/minicom.c
 +++ b/src/minicom.c
-@@ -1161,7 +1161,7 @@ int main(int argc, char **argv)
+@@ -1248,7 +1248,7 @@ int main(int argc, char **argv)
        switch(c) {
-       case 'v':
-         printf(_("%s version %s"), PACKAGE, VERSION);
+         case 'v':
+           printf(_("%s version %s"), PACKAGE, VERSION);
 -#ifdef __DATE__
-+#if 0 
-         printf(_(" (compiled %s)"), __DATE__);
++#if 0
+           printf(_(" (compiled %s)"), __DATE__);
  #endif
-         printf("\n");
-@@ -1464,7 +1464,7 @@ int main(int argc, char **argv)
+           printf("\n");
+@@ -1580,7 +1580,7 @@ int main(int argc, char **argv)
  
    mc_wprintf(us, "\n%s %s\r\n", _("Welcome to minicom"), VERSION);
    mc_wprintf(us, "\n%s: %s\r\n", _("OPTIONS"), option_string);
diff --git a/utils/minicom/patches/200-gcc10.patch b/utils/minicom/patches/200-gcc10.patch
deleted file mode 100644 (file)
index 987e16e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/minicom.h
-+++ b/src/minicom.h
-@@ -109,13 +109,13 @@ EXTERN char *dial_tty;     /* tty to use
- EXTERN char *dial_name;           /* System we're conneced to */
- EXTERN char *dial_number;   /* Number we've dialed. */
--EXTERN char *dial_user;     /* Our username there */
--EXTERN char *dial_pass;     /* Our password */
-+extern char *dial_user;     /* Our username there */
-+extern char *dial_pass;     /* Our password */
- #ifdef USE_SOCKET
--EXTERN int portfd_is_socket;  /* File descriptor is a unix socket */
--EXTERN int portfd_is_connected;       /* 1 if the socket is connected */
--EXTERN struct sockaddr_un portfd_sock_addr;   /* the unix socket address */
-+extern int portfd_is_socket;  /* File descriptor is a unix socket */
-+extern int portfd_is_connected;       /* 1 if the socket is connected */
-+extern struct sockaddr_un portfd_sock_addr;   /* the unix socket address */
- #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \
-                            ? -1 : portfd)
- #else
-@@ -141,7 +141,7 @@ EXTERN int sbcolor;     /* Status Bar Ba
- EXTERN int st_attr;   /* Status Bar attributes. */
- /* jl 04.09.97 conversion tables */
--EXTERN unsigned char vt_outmap[256], vt_inmap[256];
-+extern unsigned char vt_outmap[256], vt_inmap[256];
- /* MARK updated 02/17/95 - history buffer */
- EXTERN int num_hist_lines;  /* History buffer size */
index bebc50c51b8e464b9f8216254a758eb8a1b5e6d6..6a93def8731cc62c72fd8d7e8d3386233778147a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ncdu
-PKG_VERSION:=1.15.1
-PKG_RELEASE:=1
+PKG_VERSION:=1.16
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=b02ddc4dbf1db139cc6fbbe2f54a282770380f0ca5c17089855eab52a9ea3fb0
+PKG_HASH:=2b915752a183fae014b5e5b1f0a135b4b408de7488c716e325217c2513980fd4
 
 PKG_MAINTAINER:=Charles E. Lehner <cel@celehner.com>
 PKG_LICENSE:=MIT
index 6d757a2ee54c2b581b6ba795a731a0aaa0920767..fb3fa682f7e59b49bcc3e1353d33d318685d0a1b 100644 (file)
@@ -4,7 +4,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2021.07.04
+PKG_VERSION:=2021.07.24
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
index a3e6c331a2c8b091efa6770a290e294d1dfb8d44..a176b02e8ce1faa55b898efa64ef6d8f94cbf313 100644 (file)
@@ -16,23 +16,29 @@ local function get_wifi_interface_labels()
       handle:close()
 
       local hostapd = {}
+      local bss_idx = -1
       for line in hostapd_status:gmatch("[^\r\n]+") do
         local name, value = string.match(line, "(.+)=(.+)")
-        if name == "phy" then
-          hostapd["vif"] = value
         elseif name == "freq" then
           hostapd["freq"] = value
         elseif name == "channel" then
           hostapd["channel"] = value
-        elseif name == "bssid[0]" then
-          hostapd["bssid"] = value
-        elseif name == "ssid[0]" then
-          hostapd["ssid"] = value
+        -- hostapd gives us all bss on the relevant phy, find the one we're interested in
+        elseif string.match(name, "bss%[%d%]") then
+          if value == cfg['ifname'] then
+            bss_idx = tonumber(string.match(name, "bss%[(%d)%]"))
+          end
+        elseif bss_idx >= 0 then
+          if name == "bssid[" .. bss_idx .. "]" then
+            hostapd["bssid"] = value
+          elseif name == "ssid[" .. bss_idx .. "]" then
+            hostapd["ssid"] = value
+          end
         end
       end
 
       local labels = {
-        vif = hostapd['vif'],
+        vif = cfg['ifname'],
         ssid = hostapd['ssid'],
         bssid = hostapd['bssid'],
         encryption = cfg['encryption'], -- In a mixed scenario it would be good to know if A or B was used
index a031c17d56bcb7c827d354246c2b015eebe60201..171c9b3f3933ac0b5d00b349fdbf59aede473611 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rrdtool1
 PKG_VERSION:=1.0.50
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
 PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz
diff --git a/utils/rrdtool1/patches/050-no-doc.patch b/utils/rrdtool1/patches/050-no-doc.patch
new file mode 100644 (file)
index 0000000..5d450ac
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,7 +17,7 @@ endif
+ # build the following subdirectories
+ SUBDIRS = cgilib-0.4 gd1.3 $(SUBDIRS_1) $(SUBDIRS_2) \
+-          src doc examples contrib tcl
++          src examples contrib tcl
+ # the following files are not mentioned in any other Makefile
+ # LWT 24Jul03 - removed redundant spec file listed
index 1019eba6f019555f2ef9e2f7524c71db9598a739..a60e27468d88fd4813819cb6830008c1407f1a5b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spi-tools
-PKG_VERSION:=0.8.7
+PKG_VERSION:=1.0.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/cpb-/spi-tools/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=550f505cc5c34a50d5cd36c49c69b2709fca3f0be4f0777e3f96a45c1ffdbd79
+PKG_HASH:=5eb24670461dcf2c58471114dc69b5204dab1c0cc5053878f6de79503bd8cc9f
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
 PKG_LICENSE:=GPL-2.0-only
index 687fc413430ff90e7d401c08dad9231fe6890ea9..2235d5e4b9a140322dc42d1540ac7691fec8019d 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squashfs-tools
-PKG_VERSION:=4.4
-PKG_RELEASE:=3
+PKG_VERSION:=4.5
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/plougher/squashfs-tools/tar.gz/${PKG_VERSION}?
-PKG_HASH:=a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3
+PKG_HASH:=b9e16188e6dc1857fe312633920f7d71cc36b0162eb50f3ecb1f0040f02edddd
 
 PKG_BUILD_PARALLEL:=1
 include $(INCLUDE_DIR)/package.mk
@@ -83,11 +83,13 @@ endef
 define Package/squashfs-tools-mksquashfs/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
+       $(LN) mksquashfs $(1)/usr/sbin/sqfstar
 endef
 
 define Package/squashfs-tools-unsquashfs/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
+       $(LN) unsquashfs $(1)/usr/sbin/sqfscat
 endef
 
 $(eval $(call BuildPackage,squashfs-tools-mksquashfs))
diff --git a/utils/squashfs-tools/patches/010-gcc10.patch b/utils/squashfs-tools/patches/010-gcc10.patch
deleted file mode 100644 (file)
index bbd4909..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sun, 26 Jan 2020 18:35:13 +0000
-Subject: [PATCH] squashfs-tools: fix build failure against gcc-10
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-On gcc-10 (and gcc-9 -fno-common) build fails as:
-
-```
-cc ... -o mksquashfs
-ld: read_fs.o:(.bss+0x0):
-  multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
-ld: read_fs.o:(.bss+0x8):
-  multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
-```
-
-gcc-10 will change the default from -fcommon to fno-common:
-https://gcc.gnu.org/PR85678.
-
-The error also happens if CFLAGS=-fno-common passed explicitly.
-
-Reported-by: Toralf Förster
-Bug: https://bugs.gentoo.org/706456
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- squashfs-tools/mksquashfs.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/squashfs-tools/mksquashfs.h
-+++ b/squashfs-tools/mksquashfs.h
-@@ -143,7 +143,7 @@ struct append_file {
- #endif
- extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
--struct cache *bwriter_buffer, *fwriter_buffer;
-+extern struct cache *bwriter_buffer, *fwriter_buffer;
- extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
-       *to_frag, *locked_fragment, *to_process_frag;
- extern struct append_file **file_mapping;
index 9f4a5c07529d73cd39cddaf986d6f69d60361872..1b3ed8222ad4218f7e1915587532e65de6f25e49 100644 (file)
@@ -20,7 +20,7 @@ PKG_BUILD_PARALLEL:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 
index e25b868dd32a7be12bdd48de1e71a1453f88a70c..107ae8e57260e47fee87e431f26e9359dd8ba5c5 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=triggerhappy
 PKG_VERSION:=0.5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/wertarbyte/$(PKG_NAME)/archive/release/$(PKG_VERSION)/
@@ -37,6 +37,7 @@ define Package/triggerhappy/description
 endef
 
 MAKE_FLAGS += \
+       thd th-cmd \
        $(TARGET_CONFIGURE_OPTS) \
        $(1)
 
index f470e51431f3084576fe3f196026d9c67de44da1..f929ba51546f655498d15738fe48927dc1a96437 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uvol
-PKG_VERSION:=0.2
+PKG_VERSION:=0.3
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
@@ -28,6 +28,7 @@ define Package/uvol
   CATEGORY:=Utilities
   SUBMENU:=Disc
   TITLE:=OpenWrt UBI/LVM volume abstraction
+  DEPENDS:=+blockd
   PKGARCH=all
 endef
 
@@ -63,8 +64,9 @@ define Package/autopart/install
 endef
 
 define Package/uvol/install
-       $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/libexec/uvol $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/libexec/uvol $(1)/usr/sbin $(1)/lib/functions
        $(INSTALL_BIN) ./files/uvol.init $(1)/etc/init.d/uvol
+       $(INSTALL_BIN) ./files/common.sh $(1)/lib/functions/uvol.sh
        $(INSTALL_BIN) ./files/ubi.sh $(1)/usr/libexec/uvol/20-ubi.sh
        $(INSTALL_BIN) ./files/lvm.sh $(1)/usr/libexec/uvol/50-lvm.sh
        $(INSTALL_BIN) ./files/uvol $(1)/usr/sbin
diff --git a/utils/uvol/files/common.sh b/utils/uvol/files/common.sh
new file mode 100644 (file)
index 0000000..0eee6d4
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+UCI_SPOOLDIR="/var/spool/uvol"
+
+_uvol_init_spooldir() {
+       [ ! -d "$(dirname "$UCI_SPOOLDIR")" ] && mkdir -p "$(dirname "$UCI_SPOOLDIR")"
+       mkdir -m 0700 -p "$UCI_SPOOLDIR"
+}
+
+uvol_uci_add() {
+       local volname="$1"
+       local devname="$2"
+       local mode="$3"
+       local autofs uuid uciname
+
+       uciname=${volname//-/_}
+       uuid="$(/sbin/block info | grep "^$2" | xargs -n 1 echo | grep "^UUID=.*")"
+       [ "$uuid" ] || return 22
+       _uvol_init_spooldir
+       uuid="${uuid:5}"
+       autofs=0
+       [ "$mode" = "ro" ] && autofs=1
+       if [ -e "${UCI_SPOOLDIR}/remove-$1" ]; then
+               rm "${UCI_SPOOLDIR}/remove-$1"
+       fi
+
+       cat >"${UCI_SPOOLDIR}/add-$1" <<EOF
+set fstab.$uciname=mount
+set fstab.$uciname.uuid=$uuid
+set fstab.$uciname.target=/var/run/uvol/$volname
+set fstab.$uciname.options=$mode
+set fstab.$uciname.autofs=$autofs
+set fstab.$uciname.enabled=1
+commit fstab
+EOF
+}
+
+uvol_uci_remove() {
+       local volname="$1"
+       local uciname
+
+       uciname=${volname//-/_}
+       if [ -e "${UCI_SPOOLDIR}/add-$1" ]; then
+               rm "${UCI_SPOOLDIR}/add-$1"
+               return
+       fi
+       _uvol_init_spooldir
+       cat >"${UCI_SPOOLDIR}/remove-$1" <<EOF
+delete fstab.$uciname
+commit fstab
+EOF
+}
+
+uvol_uci_commit() {
+       local volname="$1"
+
+       if [ -e "${UCI_SPOOLDIR}/add-$1" ]; then
+               uci batch < "${UCI_SPOOLDIR}/add-$1"
+               rm "${UCI_SPOOLDIR}/add-$1"
+       elif [ -e "${UCI_SPOOLDIR}/remove-$1" ]; then
+               uci batch < "${UCI_SPOOLDIR}/remove-$1"
+               rm "${UCI_SPOOLDIR}/remove-$1"
+       fi
+
+       return $?
+}
index cf808aea08fda0f052ea319b4d507438f1c906c3..20ad0bcb5de777c6ffac20fd1e8d80dd2dc74e6c 100644 (file)
@@ -11,6 +11,7 @@ fi
 command -v lvm >/dev/null || return 1
 
 . /lib/functions.sh
+. /lib/functions/uvol.sh
 . /lib/upgrade/common.sh
 . /usr/share/libubox/jshn.sh
 
@@ -146,9 +147,20 @@ exportlv() {
 }
 
 getdev() {
+       local dms dm_name
+
+       for dms in /sys/devices/virtual/block/dm-* ; do
+               [ "$dms" = "/sys/devices/virtual/block/dm-*" ] && break
+               read -r dm_name < "$dms/dm/name"
+               [ $(basename "$lv_dm_path") = "$dm_name" ] && echo "$(basename "$dms")"
+       done
+}
+
+getuserdev() {
+       local dms dm_name
        existvol "$1" || return 1
        exportlv "$1"
-       echo "$lv_dm_path"
+       getdev "$@"
 }
 
 getsize() {
@@ -166,9 +178,9 @@ activatevol() {
                        ;;
                *)
                        [ "$lv_active" = "active" ] && return 0
+                       uvol_uci_commit "$1"
                        lvm_cmd lvchange -k n "$lv_full_name" || return $?
                        lvm_cmd lvchange -a y "$lv_full_name" || return $?
-                       ubus send block.volume "{\"name\": \"$1\", \"action\": \"up\", \"mode\": \"${lv_name:0:2}\", \"device\": \"$lv_dm_path\"}"
                        return 0
                        ;;
        esac
@@ -176,6 +188,7 @@ activatevol() {
 
 disactivatevol() {
        exportlv "$1"
+       local devname
        [ "$lv_path" ] || return 2
        case "$lv_path" in
                /dev/*/wo_*|\
@@ -184,9 +197,10 @@ disactivatevol() {
                        ;;
                *)
                        [ "$lv_active" = "active" ] || return 0
-                       lvm_cmd lvchange -a n "$lv_full_name" || return $?
+                       devname="$(getdev "$1")"
+                       [ "$devname" ] && /sbin/block umount "$devname"
+                       lvm_cmd lvchange -a n "$lv_full_name"
                        lvm_cmd lvchange -k y "$lv_full_name" || return $?
-                       ubus send block.volume "{\"name\": \"$1\", \"action\": \"down\", \"mode\": \"${lv_name:0:2}\", \"device\": \"$lv_dm_path\"}"
                        return 0
                        ;;
        esac
@@ -222,30 +236,41 @@ createvol() {
                        ;;
        esac
 
-       lvm_cmd lvcreate -p "$lvmode" -a n -y -W n -Z n -n "${mode}_$1" -l "$size_ext" "$vg_name"
+       lvm_cmd lvcreate -p "$lvmode" -a n -y -W n -Z n -n "${mode}_$1" -l "$size_ext" "$vg_name" || return $?
        ret=$?
        if [ ! $ret -eq 0 ] || [ "$lvmode" = "r" ]; then
                return $ret
        fi
        exportlv "$1"
        [ "$lv_full_name" ] || return 22
-       lvm_cmd lvchange -a y "$lv_full_name" || return 1
+       lvm_cmd lvchange -a y "$lv_full_name" || return $?
        if [ "$lv_size" -gt $(( 100 * 1024 * 1024 )) ]; then
                mkfs.f2fs -f -l "$1" "$lv_path"
                ret=$?
-               [ $ret != 0 ] && [ $ret != 134 ] && return 1
+               [ $ret != 0 ] && [ $ret != 134 ] && {
+                       lvm_cmd lvchange -a n "$lv_full_name" || return $?
+                       return $ret
+               }
        else
-               mke2fs -F -L "$1" "$lv_path" || return 1
+               mke2fs -F -L "$1" "$lv_path" || {
+                       ret=$?
+                       lvm_cmd lvchange -a n "$lv_full_name" || return $?
+                       return $ret
+               }
        fi
-       lvm_cmd lvrename "$vg_name" "wp_$1" "rw_$1"
-       exportlv "$1"
+       uvol_uci_add "$1" "/dev/$(getdev "$1")" "rw"
+       lvm_cmd lvchange -a n "$lv_full_name" || return $?
+       lvm_cmd lvrename "$vg_name" "wp_$1" "rw_$1" || return $?
        return 0
 }
 
 removevol() {
        exportlv "$1"
        [ "$lv_full_name" ] || return 2
-       lvm_cmd lvremove -y "$lv_full_name"
+       [ "$lv_active" = "active" ] && return 16
+       lvm_cmd lvremove -y "$lv_full_name" || return $?
+       uvol_uci_remove "$1"
+       uvol_uci_commit "$1"
 }
 
 updatevol() {
@@ -254,12 +279,13 @@ updatevol() {
        [ "$lv_size" -ge "$2" ] || return 27
        case "$lv_path" in
                /dev/*/wo_*)
-                       lvm_cmd lvchange -p rw "$lv_full_name"
-                       lvm_cmd lvchange -a y "$lv_full_name"
+                       lvm_cmd lvchange -p rw "$lv_full_name" || return $?
+                       lvm_cmd lvchange -a y "$lv_full_name" || return $?
                        dd of="$lv_path"
-                       lvm_cmd lvchange -a n "$lv_full_name"
-                       lvm_cmd lvchange -p r "$lv_full_name"
-                       lvm_cmd lvrename "$lv_full_name" "${lv_full_name%%/*}/ro_$1"
+                       uvol_uci_add "$1" "/dev/$(getdev "$1")" "ro"
+                       lvm_cmd lvchange -a n "$lv_full_name" || return $?
+                       lvm_cmd lvchange -p r "$lv_full_name" || return $?
+                       lvm_cmd lvrename "$lv_full_name" "${lv_full_name%%/*}/ro_$1" || return $?
                        return 0
                        ;;
                default)
@@ -308,7 +334,6 @@ boot() {
                        json_get_vars lv_name lv_dm_path
                        lv_mode="${lv_name:0:2}"
                        lv_name="${lv_name:3}"
-                       ubus send block.volume "{\"name\": \"$lv_name\", \"action\": \"up\", \"mode\": \"$lv_mode\", \"device\": \"$lv_dm_path\"}"
                        json_select ..
                done
                json_select ..
@@ -342,7 +367,7 @@ case "$cmd" in
                removevol "$@"
                ;;
        device)
-               getdev "$@"
+               getuserdev "$@"
                ;;
        size)
                getsize "$@"
index 3eb79adb95fa69a79da9c5dc98b6e25e370922f5..0a43224fbb87fd47bf316a9acdf1e6e2823a694c 100644 (file)
@@ -17,6 +17,8 @@ ubidev=$(ls -1 /sys/devices/virtual/ubi | head -n 1)
 
 read -r ebsize < "/sys/devices/virtual/ubi/${ubidev}/eraseblock_size"
 
+. /lib/functions/uvol.sh
+
 freebytes() {
        read -r availeb < "/sys/devices/virtual/ubi/${ubidev}/avail_eraseblocks"
        echo $((availeb * ebsize))
@@ -87,9 +89,10 @@ getuserdev() {
 mkubifs() {
        local tmp_mp
        tmp_mp="$(mktemp -d)"
-       mount -t ubifs "$1" "$tmp_mp"
-       umount "$tmp_mp"
-       rmdir "$tmp_mp"
+       mount -t ubifs "$1" "$tmp_mp" || return $?
+       umount "$tmp_mp" || return $?
+       rmdir "$tmp_mp" || return $?
+       return 0
 }
 
 createvol() {
@@ -107,22 +110,33 @@ createvol() {
                        return 22
                        ;;
        esac
-       ubimkvol "/dev/$ubidev" -N "uvol-$mode-$1" -s "$2"
+       ubimkvol "/dev/$ubidev" -N "uvol-$mode-$1" -s "$2" || return $?
        ret=$?
        [ $ret -eq 0 ] || return $ret
        voldev="$(getdev "$@")"
-       ubiupdatevol -t "/dev/$voldev"
+       ubiupdatevol -t "/dev/$voldev" || return $?
        [ "$mode" = "wp" ] || return 0
-       mkubifs "/dev/$voldev"
-       ubirename "/dev/$ubidev" "uvol-wp-$1" "uvol-wd-$1"
+       mkubifs "/dev/$voldev" || return $?
+       uvol_uci_add "$1" "/dev/$voldev" "rw"
+       ubirename "/dev/$ubidev" "uvol-wp-$1" "uvol-wd-$1" || return $?
 }
 
 removevol() {
-       local voldev
+       local voldev volnum
        voldev=$(getdev "$@")
        [ "$voldev" ] || return 2
-       local volnum="${voldev#${ubidev}_}"
+       vol_is_mode "$voldev" rw && return 16
+       vol_is_mode "$voldev" ro && return 16
+       volnum="${voldev#${ubidev}_}"
        ubirmvol "/dev/$ubidev" -n "$volnum" || return $?
+       uvol_uci_remove "$1"
+       uvol_uci_commit "$1"
+}
+
+block_hotplug() {
+       export ACTION="$1"
+       export DEVNAME="$2"
+       /sbin/block hotplug
 }
 
 activatevol() {
@@ -133,12 +147,14 @@ activatevol() {
        vol_is_mode "$voldev" ro && return 0
        vol_is_mode "$voldev" wo && return 22
        vol_is_mode "$voldev" wp && return 16
+       uvol_uci_commit "$1"
        if vol_is_mode "$voldev" rd; then
-               ubirename "/dev/$ubidev" "uvol-rd-$1" "uvol-ro-$1"
-               ubiblock --create "/dev/$voldev"
+               ubirename "/dev/$ubidev" "uvol-rd-$1" "uvol-ro-$1" || return $?
+               ubiblock --create "/dev/$voldev" || return $?
                return 0
        elif vol_is_mode "$voldev" wd; then
-               ubirename "/dev/$ubidev" "uvol-wd-$1" "uvol-rw-$1"
+               ubirename "/dev/$ubidev" "uvol-wd-$1" "uvol-rw-$1" || return $?
+               block_hotplug add "$voldev"
                return 0
        fi
 }
@@ -152,12 +168,14 @@ disactivatevol() {
        vol_is_mode "$voldev" wo && return 22
        vol_is_mode "$voldev" wp && return 16
        if vol_is_mode "$voldev" ro; then
-               [ -e "/dev/ubiblock${voldev:3}" ] || return 0
-               ubiblock --remove "/dev/$voldev" || return $?
+               /sbin/block umount "ubiblock${voldev:3}"
+               ubiblock --remove "/dev/$voldev"
                ubirename "/dev/$ubidev" "uvol-ro-$1" "uvol-rd-$1" || return $?
                return 0
        elif vol_is_mode "$voldev" rw; then
+               /sbin/block umount "$voldev"
                ubirename "/dev/$ubidev" "uvol-rw-$1" "uvol-wd-$1" || return $?
+               block_hotplug remove "$voldev"
                return 0
        fi
 }
@@ -169,6 +187,9 @@ updatevol() {
        [ "$2" ] || return 22
        vol_is_mode "$voldev" wo || return 22
        ubiupdatevol -s "$2" "/dev/$voldev" -
+       ubiblock --create "/dev/$voldev"
+       uvol_uci_add "$1" "/dev/ubiblock${voldev:3}" "ro"
+       ubiblock --remove "/dev/$voldev"
        ubirename "/dev/$ubidev" "uvol-wo-$1" "uvol-rd-$1"
 }
 
@@ -198,8 +219,7 @@ bootvols() {
                fstype=
                case "$volname" in
                        uvol-ro-*)
-                               voldev="/dev/ubiblock${voldev:3}"
-                               ubiblock --create "/dev/$voldev"
+                               ubiblock --create "/dev/$voldev" || return $?
                                ;;
                        *)
                                continue
index 7c290d732396cbaeee85bca5ec99fee1cf3e1908..1f6e2aac0800592ffcdf71ea3cb31e15e3e3051a 100644 (file)
@@ -6,7 +6,7 @@ NAME=uvol
 PROG=/usr/sbin/uvol
 
 start_service() {
-       [ "${__BOOT_UVOL}" = "1" ] || return 0
+       [ "${__BOOT_UVOL}" = "1" ] && return 0
        procd_open_instance "$NAME"
        procd_set_param command "$PROG" boot
        procd_close_instance
@@ -16,3 +16,8 @@ boot() {
        __BOOT_UVOL=1
        start
 }
+
+service_triggers() {
+       procd_add_raw_trigger "mount.ready" 200 /etc/init.d/uvol start
+}
+
index 9eae278c8d0ad2a7f62fc700b22187215c9e3a67..87fc2432b27f0c67b21f3d708b5dbb0f46f8bda4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yara
-PKG_VERSION:=4.0.5
+PKG_VERSION:=4.1.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=ea7ebefad05831faf6f780cab721611b0135803f03a84c27eeba7bfe0afc3aae
+PKG_HASH:=5f85c69606fad5cdb42e8f8101c96f6962a4928667395d9471e5aaea961e9b1d
 
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/utils/yara/patches/010-openssl.patch b/utils/yara/patches/010-openssl.patch
deleted file mode 100644 (file)
index a54b000..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/libyara/include/yara/pe_utils.h
-+++ b/libyara/include/yara/pe_utils.h
-@@ -102,7 +102,7 @@ char *ord_lookup(
- #if HAVE_LIBCRYPTO
- #include <openssl/asn1.h>
--time_t ASN1_get_time_t(ASN1_TIME* time);
-+time_t ASN1_get_time_t(const ASN1_TIME* time);
- #endif
- #endif
---- a/libyara/modules/pe/pe.c
-+++ b/libyara/modules/pe/pe.c
-@@ -44,8 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
- #endif
- #if OPENSSL_VERSION_NUMBER < 0x10100000L
--#define X509_getm_notBefore X509_get_notBefore
--#define X509_getm_notAfter X509_get_notAfter
-+#define X509_get0_notBefore X509_get_notBefore
-+#define X509_get0_notAfter X509_get_notAfter
- #endif
- #endif
-@@ -1433,10 +1433,10 @@ void _parse_pkcs7(
-       }
-     }
--    date_time = ASN1_get_time_t(X509_get_notBefore(cert));
-+    date_time = ASN1_get_time_t(X509_get0_notBefore(cert));
-     set_integer(date_time, pe->object, "signatures[%i].not_before", *counter);
--    date_time = ASN1_get_time_t(X509_get_notAfter(cert));
-+    date_time = ASN1_get_time_t(X509_get0_notAfter(cert));
-     set_integer(date_time, pe->object, "signatures[%i].not_after", *counter);
-     (*counter)++;
---- a/libyara/modules/pe/pe_utils.c
-+++ b/libyara/modules/pe/pe_utils.c
-@@ -307,7 +307,7 @@ time_t timegm(
- // and cleaned up. Also uses timegm(3) instead of mktime(3).
- time_t ASN1_get_time_t(
--      ASN1_TIME* time)
-+      const ASN1_TIME* time)
- {
-   struct tm t;
-   const char* str = (const char*) time->data;
index 2e7af5cd48834812d3f6a7b4d08ac1a27a764945..f1aeda645c187f58d033282d35b98a4fe9f119cc 100644 (file)
@@ -2,15 +2,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ykclient
 PKG_VERSION:=2.15
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=ykclient-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c-client/Releases/
 PKG_HASH:=f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016
+
 PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
 PKG_LICENSE_FILES:=COPYING
 PKG_LICENSE:=BSD-2-Clause
-PKG_BUILD_DEPENDS:=curl
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -19,7 +19,7 @@ define Package/ykclient
   CATEGORY:=Utilities
   TITLE:=The Yubico yubikey c client library
   URL:=https://developers.yubico.com/yubico-c-client/
-  DEPENDS:=curl
+  DEPENDS:=+curl
 endef
 
 define Package/ykclient/description
index 067fa888b9e0dab5641a68f3d0684acc52631e32..ceb26399bf3bee9c5e1624c1f013721c106d210d 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yq
-PKG_VERSION:=4.11.0
+PKG_VERSION:=4.11.2
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0201719fcdce5e98f7620e854825fb3e81d16abf6108df424dcb00de33b26c21
+PKG_HASH:=910f64ceceabed5f63550a29923c158612be94f2855b0d10fdb549d8ad826a5f
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=MIT