aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/muninlite/Makefile4
-rw-r--r--admin/sudo/Makefile6
-rw-r--r--admin/sudo/patches/010-cross-compile-fixes.patch2
-rw-r--r--devel/gitlab-runner/Makefile8
-rw-r--r--lang/golang/golang/Makefile4
-rw-r--r--lang/lua-curl-v3/Makefile43
-rw-r--r--lang/node/Makefile4
-rw-r--r--lang/node/patches/003-path.patch2
-rw-r--r--lang/perl-net-dns/Makefile4
-rw-r--r--lang/php7/Makefile4
-rw-r--r--lang/php8/Makefile4
-rw-r--r--lang/php8/test.sh23
-rw-r--r--lang/python/Flask/Makefile4
-rw-r--r--lang/python/Jinja2/Makefile4
-rw-r--r--lang/python/MarkupSafe/Makefile6
-rw-r--r--lang/python/Werkzeug/Makefile4
-rw-r--r--lang/python/click/Makefile4
-rw-r--r--lang/python/host-pip-requirements/Cython.txt2
-rw-r--r--lang/python/itsdangerous/Makefile6
-rw-r--r--lang/python/numpy/Makefile42
-rw-r--r--lang/python/pyodbc/Makefile4
-rw-r--r--lang/python/python-apipkg/Makefile2
-rw-r--r--lang/python/python-atomicwrites/Makefile2
-rw-r--r--lang/python/python-augeas/Makefile2
-rw-r--r--lang/python/python-bidict/Makefile2
-rw-r--r--lang/python/python-dateutil/Makefile6
-rw-r--r--lang/python/python-distro/Makefile8
-rw-r--r--lang/python/python-engineio/Makefile2
-rw-r--r--lang/python/python-eventlet/Makefile2
-rw-r--r--lang/python/python-execnet/Makefile2
-rw-r--r--lang/python/python-flask-httpauth/Makefile2
-rw-r--r--lang/python/python-flask-login/Makefile2
-rw-r--r--lang/python/python-flask-socketio/Makefile2
-rw-r--r--lang/python/python-greenlet/Makefile2
-rw-r--r--lang/python/python-iniconfig/Makefile2
-rw-r--r--lang/python/python-more-itertools/Makefile2
-rw-r--r--lang/python/python-msgpack/Makefile2
-rw-r--r--lang/python/python-packaging/Makefile2
-rw-r--r--lang/python/python-pluggy/Makefile2
-rw-r--r--lang/python/python-psutil/Makefile2
-rw-r--r--lang/python/python-py/Makefile2
-rw-r--r--lang/python/python-pyparsing/Makefile2
-rw-r--r--lang/python/python-pysocks/Makefile2
-rw-r--r--lang/python/python-pytest-forked/Makefile2
-rw-r--r--lang/python/python-pytest-xdist/Makefile2
-rw-r--r--lang/python/python-pytest/Makefile2
-rw-r--r--lang/python/python-requests/Makefile6
-rw-r--r--lang/python/python-requests/patches/0001-idna-dependency-bump.patch25
-rw-r--r--lang/python/python-requests/patches/0002-idna-dependency-bump.patch25
-rw-r--r--lang/python/python-socketio/Makefile2
-rw-r--r--lang/python/python-toml/Makefile2
-rw-r--r--lang/python/python-twisted/Makefile6
-rw-r--r--lang/python/python-twisted/patches/001-omit-tkconch.patch2
-rw-r--r--lang/python/python-twisted/patches/002-omit-tests.patch4
-rw-r--r--lang/python/python-typing-extensions/Makefile2
-rw-r--r--lang/python/python-wcwidth/Makefile2
-rw-r--r--lang/python/python-zipp/Makefile2
-rw-r--r--lang/python/python3-maxminddb/Makefile2
-rw-r--r--libs/alsa-lib/Makefile9
-rw-r--r--libs/alsa-ucm-conf/Makefile6
-rw-r--r--libs/cyrus-sasl/Makefile31
-rw-r--r--libs/czmq/Makefile2
-rw-r--r--libs/gnutls/Makefile6
-rw-r--r--libs/gnutls/patches/010-m4.patch2
-rw-r--r--libs/gpgme/Makefile4
-rw-r--r--libs/jsoncpp/Makefile2
-rw-r--r--libs/libinput/Makefile4
-rw-r--r--libs/libksba/Makefile4
-rw-r--r--libs/libmaxminddb/Makefile2
-rw-r--r--libs/libndpi/Makefile21
-rw-r--r--libs/libopusenc/patches/0001-Fix-ope_encoder_drain-assertion-failure.patch27
-rw-r--r--libs/libopusenc/patches/0002-Fix-use-of-uninitialized-fields.patch78
-rw-r--r--libs/libopusenc/patches/0003-Fix-use-of-uninitialized-serialno.patch47
-rw-r--r--libs/librouteros/Makefile2
-rw-r--r--libs/librouteros/patches/010-no-doc.patch7
-rw-r--r--libs/libudev-zero/Makefile4
-rw-r--r--libs/libwebsockets/Makefile5
-rw-r--r--libs/libxslt/patches/010-fix-xml2-config-check.patch11
-rw-r--r--libs/libyaml-cpp/Makefile8
-rw-r--r--libs/lmdb/Makefile2
-rw-r--r--libs/nghttp2/Makefile4
-rw-r--r--libs/openblas/Makefile106
-rw-r--r--libs/p11-kit/Makefile6
-rw-r--r--libs/p11-kit/patches/010-stdint.patch22
-rw-r--r--libs/pcre2/Makefile6
-rw-r--r--libs/postgresql/Makefile4
-rw-r--r--libs/redis/Makefile2
-rw-r--r--net/adblock/Makefile2
-rwxr-xr-xnet/adblock/files/adblock.sh2
-rw-r--r--net/atlas-probe/Makefile2
-rw-r--r--net/atlas-sw-probe/Makefile4
-rw-r--r--net/atlas-sw-probe/files/atlas.init5
-rw-r--r--net/curl/Config.in2
-rw-r--r--net/dawn/Makefile6
-rw-r--r--net/dnsproxy/Makefile14
-rw-r--r--net/dnsproxy/files/dnsproxy.config41
-rw-r--r--net/dnsproxy/files/dnsproxy.init115
-rw-r--r--net/dnstap/Makefile2
-rw-r--r--net/gateway-go/Makefile4
-rw-r--r--net/git-lfs/Makefile2
-rw-r--r--net/hs20/Makefile1
-rw-r--r--net/https-dns-proxy/Makefile13
-rw-r--r--net/https-dns-proxy/files/https-dns-proxy.hotplug.iface6
-rwxr-xr-xnet/https-dns-proxy/files/https-dns-proxy.init125
-rw-r--r--net/iperf/Makefile6
-rw-r--r--net/iperf/patches/0003-fix-non-ipv6-builds.patch20
-rw-r--r--net/iperf/patches/010-libcxx.patch12
-rw-r--r--net/iperf/patches/020-math.patch24
-rw-r--r--net/irssi/Makefile8
-rw-r--r--net/irssi/test.sh3
-rw-r--r--net/knot-resolver/Makefile10
-rw-r--r--net/knot-resolver/patches/030-fix-policy-hack.patch2
-rw-r--r--net/knot/Makefile6
-rw-r--r--net/knot/patches/01_zscanner_tests.patch2
-rw-r--r--net/ksmbd-tools/Makefile4
-rw-r--r--net/lksctp-tools/Makefile6
-rw-r--r--net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch30
-rw-r--r--net/nextdns/Makefile4
-rw-r--r--net/onionshare-cli/Makefile2
-rw-r--r--net/ooniprobe/Makefile2
-rw-r--r--net/opentracker/Makefile6
-rw-r--r--net/opentracker/patches/100-makefile.patch9
-rw-r--r--net/openvswitch/Config.in8
-rw-r--r--net/openvswitch/Makefile11
-rw-r--r--net/openvswitch/README.md37
-rw-r--r--net/openvswitch/files/openvswitch.config14
-rwxr-xr-xnet/openvswitch/files/openvswitch.init84
-rw-r--r--net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch2
-rw-r--r--net/openvswitch/patches/0004-build-trim-build.patch2
-rw-r--r--net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch4
-rw-r--r--net/pdns/Makefile6
-rw-r--r--net/pdns/files/pdns.conf-dist166
-rw-r--r--net/pdns/patches/010-time_t-check.patch10
-rw-r--r--net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch18
-rw-r--r--net/simple-adblock/Makefile2
-rw-r--r--net/simple-adblock/files/simple-adblock.init38
-rw-r--r--net/snort3/Makefile8
-rw-r--r--net/snort3/files/snort.config2
-rw-r--r--net/sshfs/Makefile6
-rw-r--r--net/stubby/Makefile2
-rwxr-xr-xnet/stubby/files/stubby.init11
-rw-r--r--net/tailscale/Makefile6
-rw-r--r--net/tor-hs/Makefile2
-rw-r--r--net/tor/Makefile4
-rw-r--r--net/torsocks/Makefile2
-rw-r--r--net/transmission/Makefile4
-rw-r--r--net/transmission/files/transmission.init28
-rw-r--r--net/transmission/patches/001-apply-dscp-to-udp-sockets.patch68
-rw-r--r--net/travelmate/Makefile4
-rwxr-xr-xnet/travelmate/files/chs-hotel.login41
-rwxr-xr-xnet/travelmate/files/db-bahn.login62
-rwxr-xr-xnet/travelmate/files/generic-user-pass.login27
-rwxr-xr-xnet/travelmate/files/h-hotels.login43
-rwxr-xr-xnet/travelmate/files/julianahoeve.login46
-rwxr-xr-xnet/travelmate/files/telekom.login64
-rwxr-xr-xnet/travelmate/files/travelmate.init86
-rwxr-xr-xnet/travelmate/files/travelmate.mail38
-rwxr-xr-xnet/travelmate/files/travelmate.sh580
-rwxr-xr-xnet/travelmate/files/travelmate.vpn127
-rwxr-xr-xnet/travelmate/files/travelmate_ntp.hotplug25
-rwxr-xr-xnet/travelmate/files/vodafone.login49
-rwxr-xr-xnet/travelmate/files/wifionice.login39
-rw-r--r--net/vpn-policy-routing/Makefile8
-rw-r--r--net/vpn-policy-routing/files/vpn-policy-routing.aws.user2
-rw-r--r--net/vpn-policy-routing/files/vpn-policy-routing.config (renamed from net/vpn-policy-routing/files/vpn-policy-routing.conf)0
-rwxr-xr-xnet/vpn-policy-routing/files/vpn-policy-routing.init311
-rw-r--r--net/vpn-policy-routing/files/vpn-policy-routing.netflix.user6
-rw-r--r--sound/alsa-utils/Makefile4
-rw-r--r--utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults2
-rw-r--r--utils/augeas/Makefile2
-rw-r--r--utils/bash/Makefile6
-rw-r--r--utils/bash/patches/101-bash51-001.patch64
-rw-r--r--utils/bash/patches/102-bash51-002.patch45
-rw-r--r--utils/bash/patches/103-bash51-003.patch43
-rw-r--r--utils/bash/patches/104-bash51-004.patch114
-rw-r--r--utils/bluez/Makefile6
-rw-r--r--utils/bluez/patches/201-readline.patch10
-rw-r--r--utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch2
-rw-r--r--utils/canutils/Makefile6
-rw-r--r--utils/ccid/Makefile4
-rw-r--r--utils/checksec/Makefile2
-rw-r--r--utils/clocate/Makefile43
-rw-r--r--utils/cryptsetup/Makefile4
-rw-r--r--utils/ctop/Makefile4
-rw-r--r--utils/fish/Makefile4
-rw-r--r--utils/fuse-overlayfs/Makefile39
-rw-r--r--utils/gnuplot/Makefile6
-rw-r--r--utils/gptfdisk/Makefile6
-rw-r--r--utils/i2c-tools/Makefile4
-rw-r--r--utils/lvm2/Makefile2
-rw-r--r--utils/lvm2/files/lvm2.hotplug6
-rw-r--r--utils/minicom/Makefile14
-rw-r--r--utils/minicom/patches/100-fix_iconv_include.patch12
-rw-r--r--utils/minicom/patches/101-fix_music_includes.patch14
-rw-r--r--utils/minicom/patches/102-fix_musl_compatibility.patch13
-rw-r--r--utils/minicom/patches/110-reproducible-builds.patch14
-rw-r--r--utils/minicom/patches/200-gcc10.patch30
-rw-r--r--utils/ncdu/Makefile6
-rw-r--r--utils/prometheus-node-exporter-lua/Makefile2
-rw-r--r--utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua20
-rw-r--r--utils/rrdtool1/Makefile2
-rw-r--r--utils/rrdtool1/patches/050-no-doc.patch11
-rw-r--r--utils/spi-tools/Makefile4
-rw-r--r--utils/squashfs-tools/Makefile8
-rw-r--r--utils/squashfs-tools/patches/010-gcc10.patch41
-rw-r--r--utils/ssdeep/Makefile2
-rw-r--r--utils/stress-ng/Makefile6
-rw-r--r--utils/triggerhappy/Makefile3
-rw-r--r--utils/uvol/Makefile6
-rw-r--r--utils/uvol/files/common.sh66
-rw-r--r--utils/uvol/files/lvm.sh61
-rw-r--r--utils/uvol/files/ubi.sh52
-rw-r--r--utils/uvol/files/uvol.init7
-rw-r--r--utils/yara/Makefile4
-rw-r--r--utils/yara/patches/010-openssl.patch48
-rw-r--r--utils/ykclient/Makefile6
-rw-r--r--utils/yq/Makefile4
217 files changed, 2420 insertions, 1827 deletions
diff --git a/admin/muninlite/Makefile b/admin/muninlite/Makefile
index f02a1083a..d7f0918b4 100644
--- a/admin/muninlite/Makefile
+++ b/admin/muninlite/Makefile
@@ -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
diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile
index f4155a940..72960e3fd 100644
--- a/admin/sudo/Makefile
+++ b/admin/sudo/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
-PKG_VERSION:=1.9.7
-PKG_RELEASE:=1
+PKG_VERSION:=1.9.7p2
+PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.sudo.ws/dist
-PKG_HASH:=2bbe7c2d6699b84d950ef9a43f09d4d967b8bc244b73bc095c4202068ddbe549
+PKG_HASH:=28b5ee725dbf89a7852f42f309ca877d2810a9531b4eecfe59f3a84b6b4afca8
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
diff --git a/admin/sudo/patches/010-cross-compile-fixes.patch b/admin/sudo/patches/010-cross-compile-fixes.patch
index 6dbc0f900..b0e83fd7a 100644
--- a/admin/sudo/patches/010-cross-compile-fixes.patch
+++ b/admin/sudo/patches/010-cross-compile-fixes.patch
@@ -1,6 +1,6 @@
--- a/lib/util/Makefile.in
+++ b/lib/util/Makefile.in
-@@ -221,10 +221,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
+@@ -223,10 +223,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
esac
siglist.c: mksiglist
diff --git a/devel/gitlab-runner/Makefile b/devel/gitlab-runner/Makefile
index 1d572aa5d..e9cc886e9 100644
--- a/devel/gitlab-runner/Makefile
+++ b/devel/gitlab-runner/Makefile
@@ -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/golang/golang/Makefile b/lang/golang/golang/Makefile
index 2beff8ca9..f09cac0a8 100644
--- a/lang/golang/golang/Makefile
+++ b/lang/golang/golang/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
GO_VERSION_MAJOR_MINOR:=1.16
-GO_VERSION_PATCH:=6
+GO_VERSION_PATCH:=7
PKG_NAME:=golang
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
@@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=a3a5d4bc401b51db065e4f93b523347a4d343ae0c0b08a65c3423b05a138037d
+PKG_HASH:=1a9f2894d3d878729f7045072f30becebe243524cf2fce4e0a7b248b1e0654ac
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=BSD-3-Clause
diff --git a/lang/lua-curl-v3/Makefile b/lang/lua-curl-v3/Makefile
new file mode 100644
index 000000000..5855b61a4
--- /dev/null
+++ b/lang/lua-curl-v3/Makefile
@@ -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))
+
diff --git a/lang/node/Makefile b/lang/node/Makefile
index 9b86e7aef..660ed31c1 100644
--- a/lang/node/Makefile
+++ b/lang/node/Makefile
@@ -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
diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch
index 8110a4a46..2572c5f9c 100644
--- a/lang/node/patches/003-path.patch
+++ b/lang/node/patches/003-path.patch
@@ -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, '..', '..');
diff --git a/lang/perl-net-dns/Makefile b/lang/perl-net-dns/Makefile
index a91db7322..0871602c9 100644
--- a/lang/perl-net-dns/Makefile
+++ b/lang/perl-net-dns/Makefile
@@ -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)
diff --git a/lang/php7/Makefile b/lang/php7/Makefile
index b525f4db4..4b1667897 100644
--- a/lang/php7/Makefile
+++ b/lang/php7/Makefile
@@ -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
diff --git a/lang/php8/Makefile b/lang/php8/Makefile
index 2907a9941..ff3e112fd 100644
--- a/lang/php8/Makefile
+++ b/lang/php8/Makefile
@@ -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
index 000000000..7b2de6ee7
--- /dev/null
+++ b/lang/php8/test.sh
@@ -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
diff --git a/lang/python/Flask/Makefile b/lang/python/Flask/Makefile
index 82c0b1c01..4b5aa476f 100644
--- a/lang/python/Flask/Makefile
+++ b/lang/python/Flask/Makefile
@@ -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
diff --git a/lang/python/Jinja2/Makefile b/lang/python/Jinja2/Makefile
index a3bc52c83..0ee931e99 100644
--- a/lang/python/Jinja2/Makefile
+++ b/lang/python/Jinja2/Makefile
@@ -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
diff --git a/lang/python/MarkupSafe/Makefile b/lang/python/MarkupSafe/Makefile
index cd9518545..9b18d857a 100644
--- a/lang/python/MarkupSafe/Makefile
+++ b/lang/python/MarkupSafe/Makefile
@@ -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
diff --git a/lang/python/Werkzeug/Makefile b/lang/python/Werkzeug/Makefile
index 1d2951f64..252c2d35d 100644
--- a/lang/python/Werkzeug/Makefile
+++ b/lang/python/Werkzeug/Makefile
@@ -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
diff --git a/lang/python/click/Makefile b/lang/python/click/Makefile
index 97c6307bf..004973f3a 100644
--- a/lang/python/click/Makefile
+++ b/lang/python/click/Makefile
@@ -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
diff --git a/lang/python/host-pip-requirements/Cython.txt b/lang/python/host-pip-requirements/Cython.txt
index fb7a7f472..bf3e50114 100644
--- a/lang/python/host-pip-requirements/Cython.txt
+++ b/lang/python/host-pip-requirements/Cython.txt
@@ -1 +1 @@
-Cython==0.29.21 --hash=sha256:e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad
+Cython==0.29.23 --hash=sha256:6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e
diff --git a/lang/python/itsdangerous/Makefile b/lang/python/itsdangerous/Makefile
index 65d49d5d5..423d80adc 100644
--- a/lang/python/itsdangerous/Makefile
+++ b/lang/python/itsdangerous/Makefile
@@ -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
diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile
index 6b417a775..f3b38a819 100644
--- a/lang/python/numpy/Makefile
+++ b/lang/python/numpy/Makefile
@@ -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
diff --git a/lang/python/pyodbc/Makefile b/lang/python/pyodbc/Makefile
index c554015c8..047c6c6b2 100644
--- a/lang/python/pyodbc/Makefile
+++ b/lang/python/pyodbc/Makefile
@@ -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
diff --git a/lang/python/python-apipkg/Makefile b/lang/python/python-apipkg/Makefile
index ee2e05d9d..2e905a893 100644
--- a/lang/python/python-apipkg/Makefile
+++ b/lang/python/python-apipkg/Makefile
@@ -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
diff --git a/lang/python/python-atomicwrites/Makefile b/lang/python/python-atomicwrites/Makefile
index e29d0ec7d..0a9481a40 100644
--- a/lang/python/python-atomicwrites/Makefile
+++ b/lang/python/python-atomicwrites/Makefile
@@ -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
diff --git a/lang/python/python-augeas/Makefile b/lang/python/python-augeas/Makefile
index 09f8fdcf0..dab2d5e91 100644
--- a/lang/python/python-augeas/Makefile
+++ b/lang/python/python-augeas/Makefile
@@ -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
diff --git a/lang/python/python-bidict/Makefile b/lang/python/python-bidict/Makefile
index 78066a53a..b6735b82f 100644
--- a/lang/python/python-bidict/Makefile
+++ b/lang/python/python-bidict/Makefile
@@ -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
diff --git a/lang/python/python-dateutil/Makefile b/lang/python/python-dateutil/Makefile
index 7c8de8167..394a307b6 100644
--- a/lang/python/python-dateutil/Makefile
+++ b/lang/python/python-dateutil/Makefile
@@ -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
diff --git a/lang/python/python-distro/Makefile b/lang/python/python-distro/Makefile
index bef80d63e..8d8aa1809 100644
--- a/lang/python/python-distro/Makefile
+++ b/lang/python/python-distro/Makefile
@@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=python-distro
-PKG_VERSION:=1.5.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.6.0
+PKG_RELEASE:=1
PYPI_NAME:=distro
-PKG_HASH:=0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92
+PKG_HASH:=83f5e5a09f9c5f68f60173de572930effbcc0287bb84fdc4426cb4168c088424
PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
PKG_LICENSE:=Apache-2.0
@@ -20,7 +20,7 @@ define Package/python3-distro
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Distro - an OS platform information API
- URL:=https://github.com/nir0s/distro
+ URL:=https://github.com/python-distro/distro
DEPENDS:=+python3-light +python3-logging
endef
diff --git a/lang/python/python-engineio/Makefile b/lang/python/python-engineio/Makefile
index d819dc585..ab4b44908 100644
--- a/lang/python/python-engineio/Makefile
+++ b/lang/python/python-engineio/Makefile
@@ -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
diff --git a/lang/python/python-eventlet/Makefile b/lang/python/python-eventlet/Makefile
index 286a5f325..a2d364aad 100644
--- a/lang/python/python-eventlet/Makefile
+++ b/lang/python/python-eventlet/Makefile
@@ -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
diff --git a/lang/python/python-execnet/Makefile b/lang/python/python-execnet/Makefile
index 76b5d0f06..1b45788d4 100644
--- a/lang/python/python-execnet/Makefile
+++ b/lang/python/python-execnet/Makefile
@@ -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
diff --git a/lang/python/python-flask-httpauth/Makefile b/lang/python/python-flask-httpauth/Makefile
index 6dc8ed667..dd8536c5a 100644
--- a/lang/python/python-flask-httpauth/Makefile
+++ b/lang/python/python-flask-httpauth/Makefile
@@ -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
diff --git a/lang/python/python-flask-login/Makefile b/lang/python/python-flask-login/Makefile
index 283622760..4678edb50 100644
--- a/lang/python/python-flask-login/Makefile
+++ b/lang/python/python-flask-login/Makefile
@@ -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
diff --git a/lang/python/python-flask-socketio/Makefile b/lang/python/python-flask-socketio/Makefile
index 945d57aa3..385cb8a9c 100644
--- a/lang/python/python-flask-socketio/Makefile
+++ b/lang/python/python-flask-socketio/Makefile
@@ -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
diff --git a/lang/python/python-greenlet/Makefile b/lang/python/python-greenlet/Makefile
index efcaf901a..a9d16df50 100644
--- a/lang/python/python-greenlet/Makefile
+++ b/lang/python/python-greenlet/Makefile
@@ -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
diff --git a/lang/python/python-iniconfig/Makefile b/lang/python/python-iniconfig/Makefile
index b5d196748..5d5da7617 100644
--- a/lang/python/python-iniconfig/Makefile
+++ b/lang/python/python-iniconfig/Makefile
@@ -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
diff --git a/lang/python/python-more-itertools/Makefile b/lang/python/python-more-itertools/Makefile
index 59eddc31e..2b007627a 100644
--- a/lang/python/python-more-itertools/Makefile
+++ b/lang/python/python-more-itertools/Makefile
@@ -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
diff --git a/lang/python/python-msgpack/Makefile b/lang/python/python-msgpack/Makefile
index c872c3e4e..00dd55db4 100644
--- a/lang/python/python-msgpack/Makefile
+++ b/lang/python/python-msgpack/Makefile
@@ -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
diff --git a/lang/python/python-packaging/Makefile b/lang/python/python-packaging/Makefile
index 96465e5c7..6a0eaad75 100644
--- a/lang/python/python-packaging/Makefile
+++ b/lang/python/python-packaging/Makefile
@@ -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
diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile
index ca9fea4a7..f9d3c39d6 100644
--- a/lang/python/python-pluggy/Makefile
+++ b/lang/python/python-pluggy/Makefile
@@ -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
diff --git a/lang/python/python-psutil/Makefile b/lang/python/python-psutil/Makefile
index 2a7aacc47..cf3e2f86c 100644
--- a/lang/python/python-psutil/Makefile
+++ b/lang/python/python-psutil/Makefile
@@ -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
diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile
index 35c9389e4..ca20dbba6 100644
--- a/lang/python/python-py/Makefile
+++ b/lang/python/python-py/Makefile
@@ -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
diff --git a/lang/python/python-pyparsing/Makefile b/lang/python/python-pyparsing/Makefile
index 0c4365c18..6862e087d 100644
--- a/lang/python/python-pyparsing/Makefile
+++ b/lang/python/python-pyparsing/Makefile
@@ -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
diff --git a/lang/python/python-pysocks/Makefile b/lang/python/python-pysocks/Makefile
index 56ad79741..cf3e05bb2 100644
--- a/lang/python/python-pysocks/Makefile
+++ b/lang/python/python-pysocks/Makefile
@@ -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
diff --git a/lang/python/python-pytest-forked/Makefile b/lang/python/python-pytest-forked/Makefile
index 60b162e8f..dba2daa8f 100644
--- a/lang/python/python-pytest-forked/Makefile
+++ b/lang/python/python-pytest-forked/Makefile
@@ -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
diff --git a/lang/python/python-pytest-xdist/Makefile b/lang/python/python-pytest-xdist/Makefile
index a872a9c45..c73229bee 100644
--- a/lang/python/python-pytest-xdist/Makefile
+++ b/lang/python/python-pytest-xdist/Makefile
@@ -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
diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile
index 44b7b2704..7a91b4f63 100644
--- a/lang/python/python-pytest/Makefile
+++ b/lang/python/python-pytest/Makefile
@@ -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
diff --git a/lang/python/python-requests/Makefile b/lang/python/python-requests/Makefile
index a32e590a5..5853897be 100644
--- a/lang/python/python-requests/Makefile
+++ b/lang/python/python-requests/Makefile
@@ -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
index 72ffb4526..000000000
--- a/lang/python/python-requests/patches/0001-idna-dependency-bump.patch
+++ /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
index 9df2ddc89..000000000
--- a/lang/python/python-requests/patches/0002-idna-dependency-bump.patch
+++ /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'
-
diff --git a/lang/python/python-socketio/Makefile b/lang/python/python-socketio/Makefile
index 8e19f41ec..9fde114ae 100644
--- a/lang/python/python-socketio/Makefile
+++ b/lang/python/python-socketio/Makefile
@@ -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
diff --git a/lang/python/python-toml/Makefile b/lang/python/python-toml/Makefile
index aecc9bd64..262ac066a 100644
--- a/lang/python/python-toml/Makefile
+++ b/lang/python/python-toml/Makefile
@@ -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
diff --git a/lang/python/python-twisted/Makefile b/lang/python/python-twisted/Makefile
index 22f3527db..949a5cbf1 100644
--- a/lang/python/python-twisted/Makefile
+++ b/lang/python/python-twisted/Makefile
@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=python-twisted
-PKG_VERSION:=21.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=21.7.0
+PKG_RELEASE:=1
PYPI_NAME:=Twisted
-PKG_HASH:=77544a8945cf69b98d2946689bbe0c75de7d145cdf11f391dd487eae8fc95a12
+PKG_HASH:=2cd652542463277378b0d349f47c62f20d9306e57d1247baabd6d1d38a109006
PKG_BUILD_DEPENDS:=libtirpc
diff --git a/lang/python/python-twisted/patches/001-omit-tkconch.patch b/lang/python/python-twisted/patches/001-omit-tkconch.patch
index 8aee0fd6b..0216a86a6 100644
--- a/lang/python/python-twisted/patches/001-omit-tkconch.patch
+++ b/lang/python/python-twisted/patches/001-omit-tkconch.patch
@@ -1,6 +1,6 @@
--- a/setup.cfg
+++ b/setup.cfg
-@@ -98,7 +98,6 @@ console_scripts =
+@@ -105,7 +105,6 @@ console_scripts =
conch = twisted.conch.scripts.conch:run
mailmail = twisted.mail.scripts.mailmail:run
pyhtmlizer = twisted.scripts.htmlizer:run
diff --git a/lang/python/python-twisted/patches/002-omit-tests.patch b/lang/python/python-twisted/patches/002-omit-tests.patch
index 54397cc00..a03846472 100644
--- a/lang/python/python-twisted/patches/002-omit-tests.patch
+++ b/lang/python/python-twisted/patches/002-omit-tests.patch
@@ -1,6 +1,6 @@
--- a/setup.cfg
+++ b/setup.cfg
-@@ -90,6 +90,9 @@ osx_platform =
+@@ -97,6 +97,9 @@ mypy =
[options.packages.find]
where = src
@@ -10,7 +10,7 @@
[options.entry_points]
console_scripts =
-@@ -109,6 +112,7 @@ console_scripts =
+@@ -116,6 +119,7 @@ console_scripts =
*.pxi
*.pyx
build.bat
diff --git a/lang/python/python-typing-extensions/Makefile b/lang/python/python-typing-extensions/Makefile
index 498ef3210..b60c9ad10 100644
--- a/lang/python/python-typing-extensions/Makefile
+++ b/lang/python/python-typing-extensions/Makefile
@@ -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
diff --git a/lang/python/python-wcwidth/Makefile b/lang/python/python-wcwidth/Makefile
index b6adea101..6ded8e065 100644
--- a/lang/python/python-wcwidth/Makefile
+++ b/lang/python/python-wcwidth/Makefile
@@ -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
diff --git a/lang/python/python-zipp/Makefile b/lang/python/python-zipp/Makefile
index 365fe6a32..17c442952 100644
--- a/lang/python/python-zipp/Makefile
+++ b/lang/python/python-zipp/Makefile
@@ -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
diff --git a/lang/python/python3-maxminddb/Makefile b/lang/python/python3-maxminddb/Makefile
index 7cf914710..8310f4a24 100644
--- a/lang/python/python3-maxminddb/Makefile
+++ b/lang/python/python3-maxminddb/Makefile
@@ -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
diff --git a/libs/alsa-lib/Makefile b/libs/alsa-lib/Makefile
index 691ab4fbf..c7ca612ea 100644
--- a/libs/alsa-lib/Makefile
+++ b/libs/alsa-lib/Makefile
@@ -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,11 +100,14 @@ 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/
$(CP) \
diff --git a/libs/alsa-ucm-conf/Makefile b/libs/alsa-ucm-conf/Makefile
index d30b3cd97..7b4984ab7 100644
--- a/libs/alsa-ucm-conf/Makefile
+++ b/libs/alsa-ucm-conf/Makefile
@@ -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
diff --git a/libs/cyrus-sasl/Makefile b/libs/cyrus-sasl/Makefile
index f0ae3c218..5d5171400 100644
--- a/libs/cyrus-sasl/Makefile
+++ b/libs/cyrus-sasl/Makefile
@@ -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))
diff --git a/libs/czmq/Makefile b/libs/czmq/Makefile
index 45b74bfb4..857f0ceea 100644
--- a/libs/czmq/Makefile
+++ b/libs/czmq/Makefile
@@ -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
diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile
index b57e2b5d4..f68671fcf 100644
--- a/libs/gnutls/Makefile
+++ b/libs/gnutls/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
-PKG_VERSION:=3.7.2
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=3.7.1
+PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7
-PKG_HASH:=646e6c5a9a185faa4cea796d378a1ba8e1148dbb197ca6605f95986a25af2752
+PKG_HASH:=3777d7963eca5e06eb315686163b7b3f5045e2baac5e54e038ace9835e5cac6f
PKG_FIXUP:=autoreconf gettext-version
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPL-2.1-or-later
diff --git a/libs/gnutls/patches/010-m4.patch b/libs/gnutls/patches/010-m4.patch
index a1f38bb07..eb5d83c56 100644
--- a/libs/gnutls/patches/010-m4.patch
+++ b/libs/gnutls/patches/010-m4.patch
@@ -62,7 +62,7 @@
[AC_COMPILE_IFELSE(
--- a/src/gl/m4/gnulib-comp.m4
+++ b/src/gl/m4/gnulib-comp.m4
-@@ -1164,7 +1164,7 @@ changequote([, ])dnl
+@@ -1064,7 +1064,7 @@ changequote([, ])dnl
gl_UNISTD_MODULE_INDICATOR([sleep])
AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gt_TYPE_WCHAR_T])
diff --git a/libs/gpgme/Makefile b/libs/gpgme/Makefile
index 74209fe39..54b7c1550 100644
--- a/libs/gpgme/Makefile
+++ b/libs/gpgme/Makefile
@@ -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
diff --git a/libs/jsoncpp/Makefile b/libs/jsoncpp/Makefile
index 75f4a8568..94d31a86d 100644
--- a/libs/jsoncpp/Makefile
+++ b/libs/jsoncpp/Makefile
@@ -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
diff --git a/libs/libinput/Makefile b/libs/libinput/Makefile
index 0b47b6c4a..b95ab1d78 100644
--- a/libs/libinput/Makefile
+++ b/libs/libinput/Makefile
@@ -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
diff --git a/libs/libksba/Makefile b/libs/libksba/Makefile
index 56dc53706..f91829005 100644
--- a/libs/libksba/Makefile
+++ b/libs/libksba/Makefile
@@ -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
diff --git a/libs/libmaxminddb/Makefile b/libs/libmaxminddb/Makefile
index d142967bf..fae54ba51 100644
--- a/libs/libmaxminddb/Makefile
+++ b/libs/libmaxminddb/Makefile
@@ -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
diff --git a/libs/libndpi/Makefile b/libs/libndpi/Makefile
index bc4437dfa..772c2d76b 100644
--- a/libs/libndpi/Makefile
+++ b/libs/libndpi/Makefile
@@ -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
diff --git a/libs/libopusenc/patches/0001-Fix-ope_encoder_drain-assertion-failure.patch b/libs/libopusenc/patches/0001-Fix-ope_encoder_drain-assertion-failure.patch
new file mode 100644
index 000000000..7c0ba068a
--- /dev/null
+++ b/libs/libopusenc/patches/0001-Fix-ope_encoder_drain-assertion-failure.patch
@@ -0,0 +1,27 @@
+From 205552370e058d99452fd34983942e10f2db6dff Mon Sep 17 00:00:00 2001
+From: Mark Harris <mark.hsj@gmail.com>
+Date: Mon, 28 Dec 2020 12:58:17 -0800
+Subject: [PATCH] Fix ope_encoder_drain() assertion failure
+
+If the stream is drained without writing any audio and the frame size is
+smaller than the encoder latency, the assertion (enc->streams == NULL)
+would fail because pad_samples was computed using an incorrect value of
+enc->global_granule_offset before it was set in init_stream(), causing
+the padding to be insufficient to drain the stream.
+---
+ src/opusenc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/opusenc.c
++++ b/src/opusenc.c
+@@ -808,9 +808,9 @@ int ope_encoder_drain(OggOpusEnc *enc) {
+ if (enc->unrecoverable) return enc->unrecoverable;
+ /* Check if it's already been drained. */
+ if (enc->streams == NULL) return OPE_TOO_LATE;
++ if (!enc->streams->stream_is_init) init_stream(enc);
+ if (enc->re) resampler_drain = speex_resampler_get_output_latency(enc->re);
+ pad_samples = MAX(LPC_PADDING, enc->global_granule_offset + enc->frame_size + resampler_drain + 1);
+- if (!enc->streams->stream_is_init) init_stream(enc);
+ shift_buffer(enc);
+ assert(enc->buffer_end + pad_samples <= BUFFER_SAMPLES);
+ memset(&enc->buffer[enc->channels*enc->buffer_end], 0, pad_samples*enc->channels*sizeof(enc->buffer[0]));
diff --git a/libs/libopusenc/patches/0002-Fix-use-of-uninitialized-fields.patch b/libs/libopusenc/patches/0002-Fix-use-of-uninitialized-fields.patch
new file mode 100644
index 000000000..8642e2fff
--- /dev/null
+++ b/libs/libopusenc/patches/0002-Fix-use-of-uninitialized-fields.patch
@@ -0,0 +1,78 @@
+From 6d46f2d7f7617852bab7cbb2f7cae8350b99204e Mon Sep 17 00:00:00 2001
+From: Mark Harris <mark.hsj@gmail.com>
+Date: Mon, 28 Dec 2020 17:01:39 -0800
+Subject: [PATCH] Fix use of uninitialized fields
+
+enc->streams->end_granule used uninitialized in encode_buffer() if the
+stream contains no audio (opusenc_example /dev/null out.opus).
+
+enc->frame_size_request used uninitialized in encode_buffer() if the
+frame size was not explicitly set.
+
+enc->callbacks used uninitialized if the encoder is created with
+ope_encoder_create_callbacks() and callbacks is NULL.
+---
+ src/opusenc.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+--- a/src/opusenc.c
++++ b/src/opusenc.c
+@@ -361,8 +361,7 @@ static void stream_destroy(EncStream *st
+ free(stream);
+ }
+
+-/* Create a new OggOpus file (callback-based). */
+-OggOpusEnc *ope_encoder_create_callbacks(const OpusEncCallbacks *callbacks, void *user_data,
++static OggOpusEnc *ope_encoder_create_callbacks_impl(const OpusEncCallbacks *callbacks, void *user_data,
+ OggOpusComments *comments, opus_int32 rate, int channels, int family, int *error) {
+ OggOpusEnc *enc=NULL;
+ int ret;
+@@ -395,11 +394,11 @@ OggOpusEnc *ope_encoder_create_callbacks
+ enc->oggp = NULL;
+ /* Not initializing anything is an unrecoverable error. */
+ enc->unrecoverable = family == -1 ? OPE_TOO_LATE : 0;
+- enc->pull_api = 0;
+ enc->packet_callback = NULL;
+ enc->rate = rate;
+ enc->channels = channels;
+ enc->frame_size = 960;
++ enc->frame_size_request = OPUS_FRAMESIZE_20_MS;
+ enc->decision_delay = 96000;
+ enc->max_ogg_delay = 48000;
+ enc->chaining_keyframe = NULL;
+@@ -447,8 +446,12 @@ OggOpusEnc *ope_encoder_create_callbacks
+ if (callbacks != NULL)
+ {
+ enc->callbacks = *callbacks;
++ enc->pull_api = 0;
++ } else {
++ enc->pull_api = 1;
+ }
+ enc->streams->user_data = user_data;
++ enc->streams->end_granule = 0;
+ if (error) *error = OPE_OK;
+ return enc;
+ fail:
+@@ -462,11 +465,19 @@ fail:
+ return NULL;
+ }
+
++/* Create a new OggOpus stream (callback-based). */
++OggOpusEnc *ope_encoder_create_callbacks(const OpusEncCallbacks *callbacks, void *user_data,
++ OggOpusComments *comments, opus_int32 rate, int channels, int family, int *error) {
++ if (callbacks == NULL) {
++ if (error) *error = OPE_BAD_ARG;
++ return NULL;
++ }
++ return ope_encoder_create_callbacks_impl(callbacks, user_data, comments, rate, channels, family, error);
++}
++
+ /* Create a new OggOpus stream, pulling one page at a time. */
+ OggOpusEnc *ope_encoder_create_pull(OggOpusComments *comments, opus_int32 rate, int channels, int family, int *error) {
+- OggOpusEnc *enc = ope_encoder_create_callbacks(NULL, NULL, comments, rate, channels, family, error);
+- if (enc) enc->pull_api = 1;
+- return enc;
++ return ope_encoder_create_callbacks_impl(NULL, NULL, comments, rate, channels, family, error);
+ }
+
+ int ope_encoder_deferred_init_with_mapping(OggOpusEnc *enc, int family, int streams,
diff --git a/libs/libopusenc/patches/0003-Fix-use-of-uninitialized-serialno.patch b/libs/libopusenc/patches/0003-Fix-use-of-uninitialized-serialno.patch
new file mode 100644
index 000000000..cf5cf5608
--- /dev/null
+++ b/libs/libopusenc/patches/0003-Fix-use-of-uninitialized-serialno.patch
@@ -0,0 +1,47 @@
+From 427d61131a1af5eed48d5428e723ab4602b56cc1 Mon Sep 17 00:00:00 2001
+From: Mark Harris <mark.hsj@gmail.com>
+Date: Tue, 29 Dec 2020 01:43:37 -0800
+Subject: [PATCH] Fix use of uninitialized serialno
+
+Also do not crash if OPE_GET_SERIALNO_REQUEST is used after draining.
+---
+ src/opusenc.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+--- a/src/opusenc.c
++++ b/src/opusenc.c
+@@ -356,6 +356,11 @@ fail:
+ return NULL;
+ }
+
++static void stream_generate_serialno(EncStream *stream) {
++ stream->serialno = rand();
++ stream->serialno_is_set = 1;
++}
++
+ static void stream_destroy(EncStream *stream) {
+ if (stream->comment) free(stream->comment);
+ free(stream);
+@@ -512,9 +517,7 @@ int ope_encoder_deferred_init_with_mappi
+
+ static void init_stream(OggOpusEnc *enc) {
+ assert(!enc->streams->stream_is_init);
+- if (!enc->streams->serialno_is_set) {
+- enc->streams->serialno = rand();
+- }
++ if (!enc->streams->serialno_is_set) stream_generate_serialno(enc->streams);
+
+ if (enc->oggp != NULL) oggp_chain(enc->oggp, enc->streams->serialno);
+ else {
+@@ -1071,6 +1074,11 @@ int ope_encoder_ctl(OggOpusEnc *enc, int
+ case OPE_GET_SERIALNO_REQUEST:
+ {
+ opus_int32 *value = va_arg(ap, opus_int32*);
++ if (!enc->last_stream) {
++ ret = OPE_TOO_LATE;
++ break;
++ }
++ if (!enc->last_stream->serialno_is_set) stream_generate_serialno(enc->last_stream);
+ *value = enc->last_stream->serialno;
+ }
+ break;
diff --git a/libs/librouteros/Makefile b/libs/librouteros/Makefile
index 2908de077..1d5a6b454 100644
--- a/libs/librouteros/Makefile
+++ b/libs/librouteros/Makefile
@@ -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
index 000000000..8a07e30b2
--- /dev/null
+++ b/libs/librouteros/patches/010-no-doc.patch
@@ -0,0 +1,7 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,3 +1,3 @@
+-SUBDIRS = src doc
++SUBDIRS = src
+
+ README: README.md
diff --git a/libs/libudev-zero/Makefile b/libs/libudev-zero/Makefile
index ec64e34b2..e903932a7 100644
--- a/libs/libudev-zero/Makefile
+++ b/libs/libudev-zero/Makefile
@@ -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
diff --git a/libs/libwebsockets/Makefile b/libs/libwebsockets/Makefile
index 365e54128..df1f0a4d2 100644
--- a/libs/libwebsockets/Makefile
+++ b/libs/libwebsockets/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
-PKG_VERSION:=4.1.6
+PKG_VERSION:=4.2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=402e9a8df553c9cd2aff5d7a9758e9e5285bf3070c82539082864633db3deb83
+PKG_HASH:=842da21f73ccba2be59e680de10a8cce7928313048750eb6ad73b6fa50763c51
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
@@ -29,6 +29,7 @@ include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS += -DLWS_IPV6=$(if $(CONFIG_IPV6),ON,OFF)
CMAKE_OPTIONS += -DISABLE_WERROR=ON
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release
+CMAKE_OPTIONS += -DLWS_WITH_ULOOP=ON
# turn off all test apps
CMAKE_OPTIONS += -DLWS_WITHOUT_TESTAPPS=ON
diff --git a/libs/libxslt/patches/010-fix-xml2-config-check.patch b/libs/libxslt/patches/010-fix-xml2-config-check.patch
new file mode 100644
index 000000000..657705e91
--- /dev/null
+++ b/libs/libxslt/patches/010-fix-xml2-config-check.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -546,7 +546,7 @@ dnl make sure xml2-config is executable,
+ dnl test version and init our variables
+ dnl
+
+-if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1
++if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs > /dev/null 2>&1
+ then
+ AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
+ XMLVERS=`$XML_CONFIG --version`
diff --git a/libs/libyaml-cpp/Makefile b/libs/libyaml-cpp/Makefile
index e50f6d709..829ec7dd5 100644
--- a/libs/libyaml-cpp/Makefile
+++ b/libs/libyaml-cpp/Makefile
@@ -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
diff --git a/libs/lmdb/Makefile b/libs/lmdb/Makefile
index c888338d7..b32dcb7fe 100644
--- a/libs/lmdb/Makefile
+++ b/libs/lmdb/Makefile
@@ -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/nghttp2/Makefile b/libs/nghttp2/Makefile
index eb5d1a792..ab4c1cd5c 100644
--- a/libs/nghttp2/Makefile
+++ b/libs/nghttp2/Makefile
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nghttp2
-PKG_VERSION:=1.43.0
+PKG_VERSION:=1.44.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/nghttp2/nghttp2/releases/download/v$(PKG_VERSION)
-PKG_HASH:=f7d54fa6f8aed29f695ca44612136fa2359013547394d5dffeffca9e01a26b0f
+PKG_HASH:=5699473b29941e8dafed10de5c8cb37a3581edf62ba7d04b911ca247d4de3c5d
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=MIT
diff --git a/libs/openblas/Makefile b/libs/openblas/Makefile
new file mode 100644
index 000000000..1bc6d8177
--- /dev/null
+++ b/libs/openblas/Makefile
@@ -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))
diff --git a/libs/p11-kit/Makefile b/libs/p11-kit/Makefile
index 21c63ac19..bf5724144 100644
--- a/libs/p11-kit/Makefile
+++ b/libs/p11-kit/Makefile
@@ -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
index 546c062b5..000000000
--- a/libs/p11-kit/patches/010-stdint.patch
+++ /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>
diff --git a/libs/pcre2/Makefile b/libs/pcre2/Makefile
index 4d4ffb110..4e75a1cda 100644
--- a/libs/pcre2/Makefile
+++ b/libs/pcre2/Makefile
@@ -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
diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile
index b94fd5205..dd40d8847 100644
--- a/libs/postgresql/Makefile
+++ b/libs/postgresql/Makefile
@@ -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
diff --git a/libs/redis/Makefile b/libs/redis/Makefile
index 9e06370d3..845a0cd7e 100644
--- a/libs/redis/Makefile
+++ b/libs/redis/Makefile
@@ -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
diff --git a/net/adblock/Makefile b/net/adblock/Makefile
index 3d3b2940e..c8e0e536b 100644
--- a/net/adblock/Makefile
+++ b/net/adblock/Makefile
@@ -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>
diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh
index 139aefb4f..916de3c1f 100755
--- a/net/adblock/files/adblock.sh
+++ b/net/adblock/files/adblock.sh
@@ -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}"
diff --git a/net/atlas-probe/Makefile b/net/atlas-probe/Makefile
index eafebcde9..4833328ee 100644
--- a/net/atlas-probe/Makefile
+++ b/net/atlas-probe/Makefile
@@ -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
diff --git a/net/atlas-sw-probe/Makefile b/net/atlas-sw-probe/Makefile
index 13f224a4f..d300317d8 100644
--- a/net/atlas-sw-probe/Makefile
+++ b/net/atlas-sw-probe/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=atlas-sw-probe
PKG_VERSION:=5020
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/RIPE-NCC/ripe-atlas-software-probe.git
@@ -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
diff --git a/net/atlas-sw-probe/files/atlas.init b/net/atlas-sw-probe/files/atlas.init
index a833a9510..a0fe8192d 100644
--- a/net/atlas-sw-probe/files/atlas.init
+++ b/net/atlas-sw-probe/files/atlas.init
@@ -100,7 +100,7 @@ create_key() {
#Link priv/pub key
[ -f $PRIV_KEY_FILE ] || ln -s $probe_key $PRIV_KEY_FILE
- [ -f $PRIV_KEY_FILE ] || ln -s $probe_pub_key $PUB_KEY_FILE
+ [ -f $PUB_KEY_FILE ] || ln -s $probe_pub_key $PUB_KEY_FILE
#Fix permission
chown atlas $probe_key $probe_pub_key
@@ -177,6 +177,9 @@ stop_service() {
kill "$tunnel_pid"
fi
fi
+
+ # Clean run dir
+ rm -r $TMP_BASE_DIR
}
safe_mkdir() {
diff --git a/net/curl/Config.in b/net/curl/Config.in
index 0c4fcb7cf..afb7f8151 100644
--- a/net/curl/Config.in
+++ b/net/curl/Config.in
@@ -103,7 +103,7 @@ config LIBCURL_TFTP
config LIBCURL_NGHTTP2
bool "HTTP2 protocol"
- default n
+ default y
comment "Miscellaneous"
diff --git a/net/dawn/Makefile b/net/dawn/Makefile
index c260ad9eb..99eeb351c 100644
--- a/net/dawn/Makefile
+++ b/net/dawn/Makefile
@@ -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
diff --git a/net/dnsproxy/Makefile b/net/dnsproxy/Makefile
index 3b5557b52..7afc83b35 100644
--- a/net/dnsproxy/Makefile
+++ b/net/dnsproxy/Makefile
@@ -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
index 000000000..a9fa02028
--- /dev/null
+++ b/net/dnsproxy/files/dnsproxy.config
@@ -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
index 000000000..9ac2751b3
--- /dev/null
+++ b/net/dnsproxy/files/dnsproxy.init
@@ -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"
+}
diff --git a/net/dnstap/Makefile b/net/dnstap/Makefile
index b9c553cd5..774c84a4c 100644
--- a/net/dnstap/Makefile
+++ b/net/dnstap/Makefile
@@ -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
diff --git a/net/gateway-go/Makefile b/net/gateway-go/Makefile
index 465d86755..dd8430393 100644
--- a/net/gateway-go/Makefile
+++ b/net/gateway-go/Makefile
@@ -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
diff --git a/net/git-lfs/Makefile b/net/git-lfs/Makefile
index 55cc0c0fb..150ce3301 100644
--- a/net/git-lfs/Makefile
+++ b/net/git-lfs/Makefile
@@ -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
diff --git a/net/hs20/Makefile b/net/hs20/Makefile
index 330fb335a..e244f50a1 100644
--- a/net/hs20/Makefile
+++ b/net/hs20/Makefile
@@ -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>
diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile
index 73d0a07cf..aa7e2f31c 100644
--- a/net/https-dns-proxy/Makefile
+++ b/net/https-dns-proxy/Makefile
@@ -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
index 000000000..542a8b34f
--- /dev/null
+++ b/net/https-dns-proxy/files/https-dns-proxy.hotplug.iface
@@ -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
diff --git a/net/https-dns-proxy/files/https-dns-proxy.init b/net/https-dns-proxy/files/https-dns-proxy.init
index 8b8680763..7cefff92e 100755
--- a/net/https-dns-proxy/files/https-dns-proxy.init
+++ b/net/https-dns-proxy/files/https-dns-proxy.init
@@ -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
diff --git a/net/iperf/Makefile b/net/iperf/Makefile
index 575787596..d071d0c03 100644
--- a/net/iperf/Makefile
+++ b/net/iperf/Makefile
@@ -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
index c6afa3e16..000000000
--- a/net/iperf/patches/0003-fix-non-ipv6-builds.patch
+++ /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
index cf0124232..000000000
--- a/net/iperf/patches/010-libcxx.patch
+++ /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
index da255c204..000000000
--- a/net/iperf/patches/020-math.patch
+++ /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)));
- }
diff --git a/net/irssi/Makefile b/net/irssi/Makefile
index 95e841f48..554f3115d 100644
--- a/net/irssi/Makefile
+++ b/net/irssi/Makefile
@@ -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
index 000000000..31804af79
--- /dev/null
+++ b/net/irssi/test.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+irssi --version 2>&1 | grep "$2"
diff --git a/net/knot-resolver/Makefile b/net/knot-resolver/Makefile
index dc215d4dd..4d1ede85d 100644
--- a/net/knot-resolver/Makefile
+++ b/net/knot-resolver/Makefile
@@ -10,14 +10,14 @@ PKG_RELRO_FULL:=0
include $(TOPDIR)/rules.mk
PKG_NAME:=knot-resolver
-PKG_VERSION:=5.3.2
-PKG_RELEASE:=2
+PKG_VERSION:=5.4.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-resolver
-PKG_HASH:=8b6f447d5fe93422d4c129a2d4004a977369c3aa6e55258ead1cbd488bc01436
+PKG_HASH:=534af671b98433b23b57039acc9d7d3c100a4888a8cf9aeba36161774ca0815e
-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
@@ -57,6 +57,7 @@ define Package/knot-resolver/config
source "$(SOURCE)/Config.in"
endef
+# kres_gen_test breaks on cross, fix is already upstream
MESON_ARGS+= \
$(if $(CONFIG_PACKAGE_knot-resolver_dnstap), -Ddnstap=enabled,-Ddnstap=disabled) \
-Dcapng=disabled \
@@ -69,6 +70,7 @@ MESON_ARGS+= \
-Dkeyfile_default=/etc/knot-resolver/root.keys \
-Dprefix=/usr \
-Dunit_tests=disabled \
+ -Dkres_gen_test=false \
-Dutils=disabled
define Package/knot-resolver/install
diff --git a/net/knot-resolver/patches/030-fix-policy-hack.patch b/net/knot-resolver/patches/030-fix-policy-hack.patch
index a4eac6c8d..88f5c06d1 100644
--- a/net/knot-resolver/patches/030-fix-policy-hack.patch
+++ b/net/knot-resolver/patches/030-fix-policy-hack.patch
@@ -2,7 +2,7 @@ This patch fixes the problem with forwarding in knot-resolver v4.3.0.
It reintroduces a fix which enables policy related hack (knot/knot-resolver#205 (comment 94566) )
--- a/modules/policy/policy.lua
+++ b/modules/policy/policy.lua
-@@ -982,7 +982,7 @@ policy.layer = {
+@@ -984,7 +984,7 @@ policy.layer = {
if bit.band(state, bit.bor(kres.FAIL, kres.DONE)) ~= 0 then return state end
local qry = req:initial() -- same as :current() but more descriptive
return policy.evaluate(policy.rules, req, qry, state)
diff --git a/net/knot/Makefile b/net/knot/Makefile
index 12fda0964..35dd0fb45 100644
--- a/net/knot/Makefile
+++ b/net/knot/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2014-2019 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+# Copyright (C) 2014-2021 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=3.0.8
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=df723949c19ebecf9a7118894c3127e292eb09dc7274b5ce9b527409f42edfb0
+PKG_HASH:=54323712e3cbc3d4c70a15777818fd2ff0de30cebb6c22e2946372b15b2653ed
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
diff --git a/net/knot/patches/01_zscanner_tests.patch b/net/knot/patches/01_zscanner_tests.patch
index efcb12224..50d83ada6 100644
--- a/net/knot/patches/01_zscanner_tests.patch
+++ b/net/knot/patches/01_zscanner_tests.patch
@@ -19,5 +19,5 @@
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
+ZSCANNER_TOOL="$SOURCE"/zscanner-tool
- plan 84
+ plan 86
diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile
index fa366fe1d..04867f7b5 100644
--- a/net/ksmbd-tools/Makefile
+++ b/net/ksmbd-tools/Makefile
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ksmbd-tools
-PKG_VERSION:=3.3.9
+PKG_VERSION:=3.4.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7c2c86130912d780df69f26d797d4bd88cf31876a86fdad17032ab684bfe7d8a
+PKG_HASH:=e701936f7c8f04fc89704cd78bea4e9d7038c67523506ddfc89d176d71b0463e
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
diff --git a/net/lksctp-tools/Makefile b/net/lksctp-tools/Makefile
index a57c336d6..1cb4ea973 100644
--- a/net/lksctp-tools/Makefile
+++ b/net/lksctp-tools/Makefile
@@ -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
index 389138a81..000000000
--- a/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch
+++ /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
diff --git a/net/nextdns/Makefile b/net/nextdns/Makefile
index c2cdd7f70..850f90aa1 100644
--- a/net/nextdns/Makefile
+++ b/net/nextdns/Makefile
@@ -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
diff --git a/net/onionshare-cli/Makefile b/net/onionshare-cli/Makefile
index 6ee595865..60e7b3b12 100644
--- a/net/onionshare-cli/Makefile
+++ b/net/onionshare-cli/Makefile
@@ -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
diff --git a/net/ooniprobe/Makefile b/net/ooniprobe/Makefile
index b76698375..1860f4bfa 100644
--- a/net/ooniprobe/Makefile
+++ b/net/ooniprobe/Makefile
@@ -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
diff --git a/net/opentracker/Makefile b/net/opentracker/Makefile
index 26faa0ac2..560006686 100644
--- a/net/opentracker/Makefile
+++ b/net/opentracker/Makefile
@@ -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
diff --git a/net/opentracker/patches/100-makefile.patch b/net/opentracker/patches/100-makefile.patch
index c48320224..ff597d661 100644
--- a/net/opentracker/patches/100-makefile.patch
+++ b/net/opentracker/patches/100-makefile.patch
@@ -19,12 +19,3 @@
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
index 000000000..ba17072f8
--- /dev/null
+++ b/net/openvswitch/Config.in
@@ -0,0 +1,8 @@
+menu "Configuration"
+ depends on PACKAGE_openvswitch
+
+ config OPENVSWITCH_WITH_LIBUNBOUND
+ bool
+ default y
+ prompt "Build with libunbound library."
+endmenu
diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile
index 312cae463..6883ba4ba 100644
--- a/net/openvswitch/Makefile
+++ b/net/openvswitch/Makefile
@@ -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) \
diff --git a/net/openvswitch/README.md b/net/openvswitch/README.md
index 9008a886b..5cc8bbffe 100644
--- a/net/openvswitch/README.md
+++ b/net/openvswitch/README.md
@@ -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, ... |
diff --git a/net/openvswitch/files/openvswitch.config b/net/openvswitch/files/openvswitch.config
index 88c2ebc25..c812b7dd6 100644
--- a/net/openvswitch/files/openvswitch.config
+++ b/net/openvswitch/files/openvswitch.config
@@ -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'
diff --git a/net/openvswitch/files/openvswitch.init b/net/openvswitch/files/openvswitch.init
index 23b75c38f..229e6869b 100755
--- a/net/openvswitch/files/openvswitch.init
+++ b/net/openvswitch/files/openvswitch.init
@@ -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"
+}
diff --git a/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch b/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
index 2c86a3048..434b56e67 100644
--- a/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
+++ b/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
@@ -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])
diff --git a/net/openvswitch/patches/0004-build-trim-build.patch b/net/openvswitch/patches/0004-build-trim-build.patch
index 19ea959ef..3e0eca515 100644
--- a/net/openvswitch/patches/0004-build-trim-build.patch
+++ b/net/openvswitch/patches/0004-build-trim-build.patch
@@ -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
diff --git a/net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch b/net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch
index 86c1d41bf..1491af51d 100644
--- a/net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch
+++ b/net/openvswitch/patches/0007-build-only-link-libopenvswitch-with-libunwind-libunb.patch
@@ -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.])
diff --git a/net/pdns/Makefile b/net/pdns/Makefile
index 4b0a2e7fd..55a663294 100644
--- a/net/pdns/Makefile
+++ b/net/pdns/Makefile
@@ -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 \
diff --git a/net/pdns/files/pdns.conf-dist b/net/pdns/files/pdns.conf-dist
index 3d416adb0..12e805e19 100644
--- a/net/pdns/files/pdns.conf-dist
+++ b/net/pdns/files/pdns.conf-dist
@@ -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
#
@@ -20,7 +26,12 @@
# 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=
@@ -50,6 +61,11 @@
# 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
#
# axfr-fetch-timeout=10
@@ -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
@@ -105,6 +121,11 @@
# 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
#
# control-console=no
@@ -130,24 +151,29 @@
# 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
@@ -205,14 +231,9 @@
# 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
@@ -235,7 +256,7 @@
# 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
@@ -267,7 +288,7 @@
#################################
# 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
@@ -275,16 +296,6 @@
# 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
#
# local-port=53
@@ -325,6 +336,16 @@
# 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-prequery-script=
@@ -335,7 +356,7 @@
# lua-records-exec-limit=1000
#################################
-# master Act as a master
+# master Act as a primary
#
# master=no
@@ -350,9 +371,14 @@
# 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
@@ -430,19 +456,19 @@
# 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
@@ -480,12 +506,22 @@
# 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
@@ -510,7 +546,7 @@
# signing-threads=3
#################################
-# slave Act as a slave
+# slave Act as a secondary
#
# slave=no
@@ -520,39 +556,24 @@
# 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
@@ -600,6 +621,11 @@
# 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
#
# version-string=full
@@ -650,8 +676,22 @@
# 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
index 000000000..ba477c5b7
--- /dev/null
+++ b/net/pdns/patches/010-time_t-check.patch
@@ -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
+
diff --git a/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch b/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch
index 9ac7ab8e7..d32d84aa9 100644
--- a/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch
+++ b/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch
@@ -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 > $@
diff --git a/net/simple-adblock/Makefile b/net/simple-adblock/Makefile
index f9b4d235b..d521a2e80 100644
--- a/net/simple-adblock/Makefile
+++ b/net/simple-adblock/Makefile
@@ -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
diff --git a/net/simple-adblock/files/simple-adblock.init b/net/simple-adblock/files/simple-adblock.init
index 211412069..799987705 100644
--- a/net/simple-adblock/files/simple-adblock.init
+++ b/net/simple-adblock/files/simple-adblock.init
@@ -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
}
diff --git a/net/snort3/Makefile b/net/snort3/Makefile
index 8c4025f87..2c675bc2f 100644
--- a/net/snort3/Makefile
+++ b/net/snort3/Makefile
@@ -59,6 +59,7 @@ TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/daq3 -ltirpc
define Package/snort3/conffiles
/etc/config/snort
+/etc/snort/
endef
define Package/snort3/install
@@ -68,6 +69,10 @@ define Package/snort3/install
$(1)/usr/bin/
$(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/snort2lua \
+ $(1)/usr/bin/
+
+ $(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
$(1)/usr/bin/
@@ -86,6 +91,9 @@ define Package/snort3/install
$(1)/usr/share/lua/
$(INSTALL_DIR) $(1)/etc/snort
+ $(INSTALL_CONF) \
+ $(PKG_INSTALL_DIR)/usr/etc/snort/*.lua \
+ $(1)/etc/snort
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) \
diff --git a/net/snort3/files/snort.config b/net/snort3/files/snort.config
index c402ec5a3..92e42959d 100644
--- a/net/snort3/files/snort.config
+++ b/net/snort3/files/snort.config
@@ -1,4 +1,4 @@
config snort 'snort'
- option config_dir '/etc/snort/etc/'
+ option config_dir '/etc/snort/'
option alert_module 'alert_syslog'
option interface 'eth0'
diff --git a/net/sshfs/Makefile b/net/sshfs/Makefile
index df165e5e0..0dcc741d7 100644
--- a/net/sshfs/Makefile
+++ b/net/sshfs/Makefile
@@ -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
diff --git a/net/stubby/Makefile b/net/stubby/Makefile
index ed0de7cb6..79d5ebc6c 100644
--- a/net/stubby/Makefile
+++ b/net/stubby/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=stubby
PKG_VERSION:=0.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME)
diff --git a/net/stubby/files/stubby.init b/net/stubby/files/stubby.init
index d08997caf..26cf170ed 100755
--- a/net/stubby/files/stubby.init
+++ b/net/stubby/files/stubby.init
@@ -266,9 +266,12 @@ service_triggers()
trigger="$(uci_get stubby global trigger)"
delay="$(uci_get stubby global triggerdelay "2")"
- if [ "$trigger" != "none" ] && [ "$trigger" != "timed" ]; then
- PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.up" "$trigger" "$stubby_init" start
- fi
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+
+ for trigger_item in $trigger
+ do
+ procd_add_interface_trigger "interface.*.up" "$trigger_item" "$stubby_init" start
+ done
+
procd_add_reload_trigger "stubby"
}
diff --git a/net/tailscale/Makefile b/net/tailscale/Makefile
index 8a8993e34..588fffd8e 100644
--- a/net/tailscale/Makefile
+++ b/net/tailscale/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tailscale
-PKG_VERSION:=1.8.7
+PKG_VERSION:=1.12.1
PKG_RELEASE:=1
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_HASH:=9a94e6073f5e171c9ba6c3f5ca291bdae688c8e26fb586c3df4302204af77e86
-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
diff --git a/net/tor-hs/Makefile b/net/tor-hs/Makefile
index 18979bc3c..047ba3efa 100644
--- a/net/tor-hs/Makefile
+++ b/net/tor-hs/Makefile
@@ -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
diff --git a/net/tor/Makefile b/net/tor/Makefile
index 1164e0435..125155aa8 100644
--- a/net/tor/Makefile
+++ b/net/tor/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tor
-PKG_VERSION:=0.4.5.8
+PKG_VERSION:=0.4.6.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
https://archive.torproject.org/tor-package-archive
-PKG_HASH:=57ded091e8bcdcebb0013fe7ef4a4439827cb169358c7874fd05fa00d813e227
+PKG_HASH:=3423189ba455372021ed44e0be576d181f2908cbd9bdef202d9c11c950882e12
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
Peter Wagner <tripolar@gmx.at>
PKG_LICENSE_FILES:=LICENSE
diff --git a/net/torsocks/Makefile b/net/torsocks/Makefile
index 7cd132396..b0bcbedb1 100644
--- a/net/torsocks/Makefile
+++ b/net/torsocks/Makefile
@@ -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
diff --git a/net/transmission/Makefile b/net/transmission/Makefile
index 4fafe228b..7926486a8 100644
--- a/net/transmission/Makefile
+++ b/net/transmission/Makefile
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
PKG_VERSION:=3.00
-PKG_RELEASE:=12
+PKG_RELEASE:=14
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_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
diff --git a/net/transmission/files/transmission.init b/net/transmission/files/transmission.init
index 242157277..3c4c7d805 100644
--- a/net/transmission/files/transmission.init
+++ b/net/transmission/files/transmission.init
@@ -173,6 +173,32 @@ reload_service() {
procd_send_signal "$PROG"
}
+transmission_mount_triggers() {
+ local cfg="$1"
+
+ local enabled
+ config_get_bool enabled "$cfg" enabled 0
+ [ "$enabled" -gt 0 ] || return 0
+
+ local config_dir download_dir incomplete_dir incomplete_dir_enabled \
+ watch_dir watch_dir_enabled web_home service_dirs
+ config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'
+ config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission'
+ config_get incomplete_dir_enabled "$cfg" 'incomplete_dir_enabled' 0
+ config_get incomplete_dir "$cfg" 'incomplete_dir' '/var/etc/transmission'
+ config_get watch_dir_enabled "$cfg" 'watch_dir_enabled' 0
+ config_get watch_dir "$cfg" 'watch_dir' '/var/etc/transmission'
+ config_get web_home "$cfg" 'web_home'
+
+ service_dirs="$config_dir $download_dir $web_home"
+ [ "$incomplete_dir_enabled" = "0" ] || service_dirs="$service_dirs $incomplete_dir"
+ [ "$watch_dir_enabled" = "0" ] || service_dirs="$service_dirs $watch_dir"
+
+ procd_add_restart_mount_trigger $service_dirs
+}
+
service_triggers() {
- procd_add_reload_trigger "transmission"
+ procd_add_reload_trigger 'transmission'
+ config_load 'transmission'
+ config_foreach transmission_mount_triggers '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
index 000000000..a3fd63441
--- /dev/null
+++ b/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch
@@ -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);
diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile
index 8a31e5e16..00caaf467 100644
--- a/net/travelmate/Makefile
+++ b/net/travelmate/Makefile
@@ -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>
diff --git a/net/travelmate/files/chs-hotel.login b/net/travelmate/files/chs-hotel.login
index 3b23f467c..905824ad7 100755
--- a/net/travelmate/files/chs-hotel.login
+++ b/net/travelmate/files/chs-hotel.login
@@ -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
diff --git a/net/travelmate/files/db-bahn.login b/net/travelmate/files/db-bahn.login
index a0ab505b5..2b4bf30f5 100755
--- a/net/travelmate/files/db-bahn.login
+++ b/net/travelmate/files/db-bahn.login
@@ -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
diff --git a/net/travelmate/files/generic-user-pass.login b/net/travelmate/files/generic-user-pass.login
index 60c3b5a92..687a18358 100755
--- a/net/travelmate/files/generic-user-pass.login
+++ b/net/travelmate/files/generic-user-pass.login
@@ -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
diff --git a/net/travelmate/files/h-hotels.login b/net/travelmate/files/h-hotels.login
index a72e217f7..fa55f7d36 100755
--- a/net/travelmate/files/h-hotels.login
+++ b/net/travelmate/files/h-hotels.login
@@ -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
index 000000000..f4927c336
--- /dev/null
+++ b/net/travelmate/files/julianahoeve.login
@@ -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
index 000000000..060bce7ff
--- /dev/null
+++ b/net/travelmate/files/telekom.login
@@ -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
diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init
index 1346bc6dc..2017ba933 100755
--- a/net/travelmate/files/travelmate.init
+++ b/net/travelmate/files/travelmate.init
@@ -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
diff --git a/net/travelmate/files/travelmate.mail b/net/travelmate/files/travelmate.mail
index 42da3ccf3..ec789625a 100755
--- a/net/travelmate/files/travelmate.mail
+++ b/net/travelmate/files/travelmate.mail
@@ -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
diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh
index 37dacfce3..cd4313989 100755
--- a/net/travelmate/files/travelmate.sh
+++ b/net/travelmate/files/travelmate.sh
@@ -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
diff --git a/net/travelmate/files/travelmate.vpn b/net/travelmate/files/travelmate.vpn
index 94da997a1..3ee18fea7 100755
--- a/net/travelmate/files/travelmate.vpn
+++ b/net/travelmate/files/travelmate.vpn
@@ -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
diff --git a/net/travelmate/files/travelmate_ntp.hotplug b/net/travelmate/files/travelmate_ntp.hotplug
index 2a215e4ba..6a9be8219 100755
--- a/net/travelmate/files/travelmate_ntp.hotplug
+++ b/net/travelmate/files/travelmate_ntp.hotplug
@@ -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
index 000000000..17628da62
--- /dev/null
+++ b/net/travelmate/files/vodafone.login
@@ -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
diff --git a/net/travelmate/files/wifionice.login b/net/travelmate/files/wifionice.login
index c74a2bf14..316c74701 100755
--- a/net/travelmate/files/wifionice.login
+++ b/net/travelmate/files/wifionice.login
@@ -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
diff --git a/net/vpn-policy-routing/Makefile b/net/vpn-policy-routing/Makefile
index f5ac83338..d1476bbc4 100644
--- a/net/vpn-policy-routing/Makefile
+++ b/net/vpn-policy-routing/Makefile
@@ -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
diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.aws.user b/net/vpn-policy-routing/files/vpn-policy-routing.aws.user
index a00770be7..4f99ed5e4 100644
--- a/net/vpn-policy-routing/files/vpn-policy-routing.aws.user
+++ b/net/vpn-policy-routing/files/vpn-policy-routing.aws.user
@@ -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.config
index ed6f01cdd..ed6f01cdd 100644
--- a/net/vpn-policy-routing/files/vpn-policy-routing.conf
+++ b/net/vpn-policy-routing/files/vpn-policy-routing.config
diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.init b/net/vpn-policy-routing/files/vpn-policy-routing.init
index 095069823..b15b1af49 100755
--- a/net/vpn-policy-routing/files/vpn-policy-routing.init
+++ b/net/vpn-policy-routing/files/vpn-policy-routing.init
@@ -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
diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user b/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user
index 02335c4b3..1a287d567 100644
--- a/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user
+++ b/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user
@@ -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
diff --git a/sound/alsa-utils/Makefile b/sound/alsa-utils/Makefile
index cf5eac10c..ed3c1a164 100644
--- a/sound/alsa-utils/Makefile
+++ b/sound/alsa-utils/Makefile
@@ -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
diff --git a/utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults b/utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults
index 3d65afba3..b20401361 100644
--- a/utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults
+++ b/utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults
@@ -6,7 +6,7 @@ touch /etc/config/attendedsysupgrade
uci -q batch <<EOF
set attendedsysupgrade.server=server
-set attendedsysupgrade.server.url='https://chef.libremesh.org'
+set attendedsysupgrade.server.url='https://asu.aparcar.org'
set attendedsysupgrade.client=client
set attendedsysupgrade.client.upgrade_packages='1'
diff --git a/utils/augeas/Makefile b/utils/augeas/Makefile
index 2afe0c406..86dcd5be0 100644
--- a/utils/augeas/Makefile
+++ b/utils/augeas/Makefile
@@ -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
diff --git a/utils/bash/Makefile b/utils/bash/Makefile
index b15a145d4..ca276fb36 100644
--- a/utils/bash/Makefile
+++ b/utils/bash/Makefile
@@ -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
index 02898aaf3..000000000
--- a/utils/bash/patches/101-bash51-001.patch
+++ /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
index 2faa88189..000000000
--- a/utils/bash/patches/102-bash51-002.patch
+++ /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
index 72c251b98..000000000
--- a/utils/bash/patches/103-bash51-003.patch
+++ /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
index 218b8434c..000000000
--- a/utils/bash/patches/104-bash51-004.patch
+++ /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_ */
diff --git a/utils/bluez/Makefile b/utils/bluez/Makefile
index 3e3c89b73..6d3407ecc 100644
--- a/utils/bluez/Makefile
+++ b/utils/bluez/Makefile
@@ -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
diff --git a/utils/bluez/patches/201-readline.patch b/utils/bluez/patches/201-readline.patch
index 0a2f20eb3..f6dd71662 100644
--- a/utils/bluez/patches/201-readline.patch
+++ b/utils/bluez/patches/201-readline.patch
@@ -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 \
diff --git a/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch b/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch
index 005684add..c42739ea8 100644
--- a/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch
+++ b/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch
@@ -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);
diff --git a/utils/canutils/Makefile b/utils/canutils/Makefile
index d1d94229e..741bbeb9d 100644
--- a/utils/canutils/Makefile
+++ b/utils/canutils/Makefile
@@ -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>
diff --git a/utils/ccid/Makefile b/utils/ccid/Makefile
index c9261f215..b71a65c0d 100644
--- a/utils/ccid/Makefile
+++ b/utils/ccid/Makefile
@@ -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
diff --git a/utils/checksec/Makefile b/utils/checksec/Makefile
index 7ba4fce66..64b9f8381 100644
--- a/utils/checksec/Makefile
+++ b/utils/checksec/Makefile
@@ -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
index 000000000..424f75e97
--- /dev/null
+++ b/utils/clocate/Makefile
@@ -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))
diff --git a/utils/cryptsetup/Makefile b/utils/cryptsetup/Makefile
index fd623c4a7..c17f27595 100644
--- a/utils/cryptsetup/Makefile
+++ b/utils/cryptsetup/Makefile
@@ -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
diff --git a/utils/ctop/Makefile b/utils/ctop/Makefile
index 4486fc8aa..28fcf9267 100644
--- a/utils/ctop/Makefile
+++ b/utils/ctop/Makefile
@@ -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
diff --git a/utils/fish/Makefile b/utils/fish/Makefile
index 455674dbf..5c937acaf 100644
--- a/utils/fish/Makefile
+++ b/utils/fish/Makefile
@@ -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
diff --git a/utils/fuse-overlayfs/Makefile b/utils/fuse-overlayfs/Makefile
new file mode 100644
index 000000000..8cc285f91
--- /dev/null
+++ b/utils/fuse-overlayfs/Makefile
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fuse-overlayfs
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/containers/fuse-overlayfs/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=6c81b65b71067b303aaa9871f512c2cabc23e2b793f19c6c854d01a492b5a923
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fuse-overlayfs
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libfuse3
+ TITLE:=fuse-overlayfs
+ URL:=https://github.com/containers/fuse-overlayfs
+endef
+
+define Package/fuse-overlayfs/description
+ FUSE overlay+shiftfs implementation for rootless containers
+endef
+
+define Package/fuse-overlayfs/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fuse-overlayfs $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,fuse-overlayfs))
diff --git a/utils/gnuplot/Makefile b/utils/gnuplot/Makefile
index 5789a532f..3b57cc257 100644
--- a/utils/gnuplot/Makefile
+++ b/utils/gnuplot/Makefile
@@ -1,14 +1,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gnuplot
-PKG_VERSION:=5.4.1
-PKG_RELEASE:=1
+PKG_VERSION:=5.4.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=Matteo Cicuttin <datafl4sh@toxicnet.eu>
PKG_BUILD_DIR:=$(BUILD_DIR)/gnuplot-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/gnuplot
-PKG_HASH:=6b690485567eaeb938c26936e5e0681cf70c856d273cc2c45fabf64d8bc6590e
+PKG_HASH:=e57c75e1318133951d32a83bcdc4aff17fed28722c4e71f2305cfc2ae1cae7ba
PKG_CAT:=zcat
PKG_FIXUP:=autoreconf
diff --git a/utils/gptfdisk/Makefile b/utils/gptfdisk/Makefile
index c40b2e545..0f5444733 100644
--- a/utils/gptfdisk/Makefile
+++ b/utils/gptfdisk/Makefile
@@ -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
diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile
index 27473b4b7..8b1563c2e 100644
--- a/utils/i2c-tools/Makefile
+++ b/utils/i2c-tools/Makefile
@@ -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
diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile
index 3ec9c42e6..e4a06ffc0 100644
--- a/utils/lvm2/Makefile
+++ b/utils/lvm2/Makefile
@@ -144,6 +144,8 @@ define Package/lvm2/install
$(INSTALL_DATA) ./files/lvm2.preinit $(1)/lib/preinit/80_lvm2
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/block
+ $(INSTALL_DATA) ./files/lvm2.hotplug $(1)/etc/hotplug.d/block/20-lvm2
$(FIND) $(PKG_INSTALL_DIR)/usr/sbin/ -type l -exec $(CP) -a {} $(1)/sbin/ \;
endef
diff --git a/utils/lvm2/files/lvm2.hotplug b/utils/lvm2/files/lvm2.hotplug
new file mode 100644
index 000000000..0ef48c540
--- /dev/null
+++ b/utils/lvm2/files/lvm2.hotplug
@@ -0,0 +1,6 @@
+
+[ "$ACTION" = "add" ] || return 0
+[ -e "/dev/$DEVNAME" ] || return 0
+
+/sbin/lvm vgscan --mknodes --devices /dev/$DEVNAME || :
+/sbin/lvm vgchange -aly --devices /dev/$DEVNAME || :
diff --git a/utils/minicom/Makefile b/utils/minicom/Makefile
index f21650191..bc40b4e05 100644
--- a/utils/minicom/Makefile
+++ b/utils/minicom/Makefile
@@ -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
index 88190faae..000000000
--- a/utils/minicom/patches/100-fix_iconv_include.patch
+++ /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
index a74d1233d..000000000
--- a/utils/minicom/patches/101-fix_music_includes.patch
+++ /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
index 4524b22d8..000000000
--- a/utils/minicom/patches/102-fix_musl_compatibility.patch
+++ /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 */
diff --git a/utils/minicom/patches/110-reproducible-builds.patch b/utils/minicom/patches/110-reproducible-builds.patch
index 1302f5b81..82aaa1355 100644
--- a/utils/minicom/patches/110-reproducible-builds.patch
+++ b/utils/minicom/patches/110-reproducible-builds.patch
@@ -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
index 987e16e1a..000000000
--- a/utils/minicom/patches/200-gcc10.patch
+++ /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 */
diff --git a/utils/ncdu/Makefile b/utils/ncdu/Makefile
index bebc50c51..6a93def87 100644
--- a/utils/ncdu/Makefile
+++ b/utils/ncdu/Makefile
@@ -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
diff --git a/utils/prometheus-node-exporter-lua/Makefile b/utils/prometheus-node-exporter-lua/Makefile
index 6d757a2ee..fb3fa682f 100644
--- a/utils/prometheus-node-exporter-lua/Makefile
+++ b/utils/prometheus-node-exporter-lua/Makefile
@@ -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>
diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
index a3e6c331a..a176b02e8 100644
--- a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
+++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
@@ -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
diff --git a/utils/rrdtool1/Makefile b/utils/rrdtool1/Makefile
index a031c17d5..171c9b3f3 100644
--- a/utils/rrdtool1/Makefile
+++ b/utils/rrdtool1/Makefile
@@ -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
index 000000000..5d450ac0d
--- /dev/null
+++ b/utils/rrdtool1/patches/050-no-doc.patch
@@ -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
diff --git a/utils/spi-tools/Makefile b/utils/spi-tools/Makefile
index 1019eba6f..a60e27468 100644
--- a/utils/spi-tools/Makefile
+++ b/utils/spi-tools/Makefile
@@ -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
diff --git a/utils/squashfs-tools/Makefile b/utils/squashfs-tools/Makefile
index 687fc4134..2235d5e4b 100644
--- a/utils/squashfs-tools/Makefile
+++ b/utils/squashfs-tools/Makefile
@@ -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
index bbd4909ba..000000000
--- a/utils/squashfs-tools/patches/010-gcc10.patch
+++ /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;
diff --git a/utils/ssdeep/Makefile b/utils/ssdeep/Makefile
index 9f4a5c075..1b3ed8222 100644
--- a/utils/ssdeep/Makefile
+++ b/utils/ssdeep/Makefile
@@ -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
diff --git a/utils/stress-ng/Makefile b/utils/stress-ng/Makefile
index 646e74237..246c93f8c 100644
--- a/utils/stress-ng/Makefile
+++ b/utils/stress-ng/Makefile
@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=stress-ng
-PKG_VERSION:=0.12.10
-PKG_RELEASE:=1
+PKG_VERSION:=0.13.00
+PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://kernel.ubuntu.com/~cking/tarballs/stress-ng
-PKG_HASH:=bd167b6559fa8a28680371b1defd3ffe2344eb550129d58dd7d5e2d568f2786e
+PKG_HASH:=1cefe4a3057c1522b146e62f61b80ce6e2e99da2d85ebe25bc03fc45228e58cd
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=GPL-2.0-only
diff --git a/utils/triggerhappy/Makefile b/utils/triggerhappy/Makefile
index e25b868dd..107ae8e57 100644
--- a/utils/triggerhappy/Makefile
+++ b/utils/triggerhappy/Makefile
@@ -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)
diff --git a/utils/uvol/Makefile b/utils/uvol/Makefile
index f470e5143..f929ba515 100644
--- a/utils/uvol/Makefile
+++ b/utils/uvol/Makefile
@@ -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
index 000000000..0eee6d432
--- /dev/null
+++ b/utils/uvol/files/common.sh
@@ -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 $?
+}
diff --git a/utils/uvol/files/lvm.sh b/utils/uvol/files/lvm.sh
index cf808aea0..20ad0bcb5 100644
--- a/utils/uvol/files/lvm.sh
+++ b/utils/uvol/files/lvm.sh
@@ -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 "$@"
diff --git a/utils/uvol/files/ubi.sh b/utils/uvol/files/ubi.sh
index 3eb79adb9..0a43224fb 100644
--- a/utils/uvol/files/ubi.sh
+++ b/utils/uvol/files/ubi.sh
@@ -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
diff --git a/utils/uvol/files/uvol.init b/utils/uvol/files/uvol.init
index 7c290d732..1f6e2aac0 100644
--- a/utils/uvol/files/uvol.init
+++ b/utils/uvol/files/uvol.init
@@ -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
+}
+
diff --git a/utils/yara/Makefile b/utils/yara/Makefile
index 9eae278c8..87fc2432b 100644
--- a/utils/yara/Makefile
+++ b/utils/yara/Makefile
@@ -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
index a54b0001a..000000000
--- a/utils/yara/patches/010-openssl.patch
+++ /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;
diff --git a/utils/ykclient/Makefile b/utils/ykclient/Makefile
index 2e7af5cd4..f1aeda645 100644
--- a/utils/ykclient/Makefile
+++ b/utils/ykclient/Makefile
@@ -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
diff --git a/utils/yq/Makefile b/utils/yq/Makefile
index 067fa888b..ceb26399b 100644
--- a/utils/yq/Makefile
+++ b/utils/yq/Makefile
@@ -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