include $(TOPDIR)/rules.mk
PKG_NAME:=click
-PKG_VERSION:=7.0
-PKG_RELEASE:=2
+PKG_VERSION:=7.1.2
+PKG_RELEASE:=1
-PYPI_NAME:=$(PKG_NAME)
-PYPI_SOURCE_NAME:=Click
-PKG_HASH:=5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7
+PYPI_NAME:=click
+PKG_HASH:=d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_NAME:=boost
PKG_VERSION:=1.74.0
PKG_SOURCE_VERSION:=1_74_0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
- locale (Requires kernel being compiled with full language support)
- log
- math
+ - nowide
- program_options
- python3
- random
See more at http://www.boost.org/doc/libs/1_74_0/
endef
-PKG_BUILD_DEPENDS:=boost/host PACKAGE_python3:python3
+PKG_BUILD_DEPENDS:=boost/host PACKAGE_boost-python3:python3
include ../../lang/python/python3-version.mk
BOOST_PYTHON3_VER=$(PYTHON3_VERSION)
select PACKAGE_boost-graph
default m if ALL
- $(foreach lib,$(BOOST_LIBS), \
- config PACKAGE_boost-$(lib)
+ $(foreach lib,$(BOOST_LIBS),
+ config PACKAGE_boost-$(lib)
prompt "Boost $(lib) $(if $(findstring python3,$(lib)),$(paren_left)v$(BOOST_PYTHON3_VER)$(paren_right) ,)library."
default m if ALL
$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
- $(if $(findstring python3,$(lib)),depends on PACKAGE_python3,)\
$(if $(findstring fiber,$(lib)),depends on !boost-fiber-exclude,)\
$(if $(findstring context,$(lib)),depends on !boost-context-exclude,)
$(if $(findstring coroutine,$(lib)),depends on !boost-coroutine-exclude,)
define Package/boost-$(1)
$(call Package/boost/Default)
TITLE+= ($(1))
- DEPENDS+= $$(foreach lib,$(2),+boost-$$(lib)) $(3) $(if $(4),@$(4),)
+ DEPENDS+= $$(foreach lib,$(2),+boost-$$(lib)) $(3) $(if $(4),@$(4),) $(patsubst %,+PACKAGE_boost-$(1):%,$(5))
HIDDEN:=1
endef
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system))
$(eval $(call DefineBoostLibrary,graph,regex))
-$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +libzstd))
+$(eval $(call DefineBoostLibrary,iostreams,,,,zlib liblzma libbz2 libzstd))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex))
$(eval $(call DefineBoostLibrary,math))
#$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
+$(eval $(call DefineBoostLibrary,nowide))
$(eval $(call DefineBoostLibrary,program_options))
-$(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
+$(eval $(call DefineBoostLibrary,python3))
$(eval $(call DefineBoostLibrary,random,system))
$(eval $(call DefineBoostLibrary,regex))
$(eval $(call DefineBoostLibrary,serialization))
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
+PKG_VERSION:=3.5.7
PKG_RELEASE:=1
-PKG_VERSION:=3.5.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
http://ftp.porcupine.org/mirrors/postfix-release/official/
+PKG_HASH:=b7a474f14e153dc7cbf6af38419729bc5af5c3c37aecf6b327a8f962158f0961
-PKG_HASH:=22ac929733449a294252ac8deda4b264ff48a997ff3847007291a2ee53ef55cc
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=IPL-1.0
PKG_LICENSE_FILES:=LICENSE
endmenu
endef
-CCARGS=-DNO_NIS
+CCARGS=-DNO_NIS -fcommon
AUXLIBS=-L$(STAGING_DIR)/usr/lib
ifdef CONFIG_POSTFIX_TLS
PKG_NAME:=imagemagick
PKG_VERSION:=7.0.9
PKG_REVISION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
--with-png \
--with-tiff
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),,-flto)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
include $(TOPDIR)/rules.mk
PKG_NAME:=go-ethereum
-PKG_VERSION:=1.9.14
+PKG_VERSION:=1.9.22
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=2bb8dda5dcfceebb31d1e1def1bdc6bf999ac8883a7235b4b242f55e930bcb3c
+PKG_HASH:=cda67de8e76afaad28b8bb4d3e5a95d01f88f69ab2c25964bc8ee2d368794d8c
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=GPL-3.0-or-later LGPL-3.0-or-later
GO_PKG_BUILD_PKG:=github.com/ethereum/go-ethereum/cmd/geth
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
include ../../lang/golang/golang-package.mk
define Package/geth
TITLE:=Ethereum Go client
URL:=https://geth.ethereum.org/
DEPENDS:=$(GO_ARCH_DEPENDS)
- PKGARCH:=all
endef
define Package/geth/description
fraud or third party interference.
endef
+TARGET_LDFLAGS += -liconv
+
define Package/geth/install
$(call GoPackage/Package/Install/Bin,$(1))
PKG_NAME:=pdns-recursor
PKG_VERSION:=4.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
SUBMENU:=IP Addresses and Names
USERID:=pdns:pdns
TITLE:=PowerDNS Recursor
- DEPENDS:=+boost +boost-context +boost-filesystem +libatomic +liblua +libopenssl +protobuf
+ DEPENDS:=+boost +boost-context +boost-filesystem +libatomic +liblua +libopenssl +protobuf +libfstrm
URL:=https://www.powerdns.com/recursor.html
endef
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=static-neighbor-reports
+PKG_VERSION:=1
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+PKG_LICENSE:=GPL-2.0-only
+
+include $(INCLUDE_DIR)/package.mk
+
+Build/Compile=
+
+define Package/static-neighbor-reports/Default
+endef
+
+define Package/static-neighbor-reports
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Configure static 802.11k neighbor reports
+ PKGARCH:=all
+ DEPENDS:=+libuci-lua +libubus-lua
+endef
+
+define Package/static-neighbor-reports/install
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/static-neighbor-report.conf $(1)/etc/config/static-neighbor-report
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/static-neighbor-reports.init $(1)/etc/init.d/static-neighbor-reports
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) ./files/reload-neighbor-reports.lua $(1)/usr/lib/reload-neighbor-reports.lua
+endef
+
+define Package/static-neighbor-reports/conffiles
+/etc/config/static-neighbor-report
+endef
+
+define Package/static-neighbor-reports/description
+ Allows to configure static neighbor reports for hostapd interfaces.
+
+ These neighbor reports are avilable to clients using IEEE 802.11k.
+endef
+
+$(eval $(call BuildPackage,static-neighbor-reports))
--- /dev/null
+# static-neighbor-reports
+The `static-neighbor-reports` package allows a user to configure static neighbor reports which
+are available for clients to be polled in case they support IEEE802.11k. This greatly improves
+the wireless experiences in terms of mobility.
+
+Make sure to enable `ieee80211k` for each VAP neighbor reports should be installed to.
+
+## Configuring
+The uci config name is `static-neighbor-report`. There's currently only the section
+type `neighbor`.
+
+### neighbor
+The followign options are supported for `neighbor` sections:
+
+#### neighbor_report
+This is the binary neighbor report element from a foreign AP. It is required for each neighbor.
+
+#### disabled
+Values other than `0` disable the neighbor. It won't be installed into hostapd in this case.
+If this option is missing, the neighbor is implicitly active.
+
+#### bssid
+The BSSID of the foreign AP. This option can usually be omitted, as it's implicitly present in
+the first 6 bytes of the binary neighbor report element.
+
+#### ssid
+The SSID of the foreign AP. This option can be omitted, in case it matches the SSID used on the local AP.
+
+#### iface
+Space seperated list of hostapd interfaces the neighbor should be installed to.
+
+## Retrieving neighbor information
+To retrieve the neighbor informations of an AP to be isntalled on a foreign AP, make sure the UCI option
+`ieee80211k` is set to `1` on the VAP.
+
+Execute `ubus call hostapd.<ifname> rrm_nr_get_own` on the AP. To get a list of all available interfaces,
+execute `ubus list`.
+
+The returned information follows this format:
+
+```json
+{
+ "value": [
+ "<BSSID>",
+ "<SSID>",
+ "<Neighbot report element>"
+ ]
+}
+```
--- /dev/null
+#!/usr/bin/lua
+
+local uci = require 'uci'.cursor()
+local ubus = require('ubus').connect()
+
+local neighbor_reports = {}
+
+local function hasKey(tab, key)
+ for k, _ in pairs(tab) do
+ if k == key then return true end
+ end
+ return false
+end
+
+uci:foreach('static-neighbor-report', 'neighbor', function (config)
+ if hasKey(config, "disabled") and config.disabled ~= '0' then
+ return
+ end
+
+ local bssid = ''
+ local ssid = ''
+ local neighbor_report = config['neighbor_report']
+
+ if hasKey(config, 'bssid') then bssid = config.bssid end
+ if hasKey(config, 'ssid') then ssid = config.ssid end
+
+ for iface in config.iface:gmatch("%S+") do
+ if not hasKey(neighbor_reports, iface) then
+ neighbor_reports[iface] = {}
+ end
+ table.insert(neighbor_reports[iface], {bssid, ssid, neighbor_report})
+ end
+end)
+
+for k, v in pairs(neighbor_reports) do
+ ubus:call('hostapd.' .. k, 'rrm_nr_set', {list=v})
+end
--- /dev/null
+config neighbor ap1
+ option bssid 'f2:9e:c0:a5:a9:2c'
+ option ssid 'Network'
+ option neighbor_report 'f29ec0a5a92cff1900007a64090603016600'
+ option iface 'net0 net1'
+ option disabled '1'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=60
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+
+ procd_set_param command /usr/lib/reload-neighbor-reports.lua
+
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+
+ procd_close_instance
+}
+
+reload_service() {
+ stop
+ start
+}
+
+service_triggers() {
+ procd_add_raw_trigger "hostapd.*" 3000 /etc/init.d/static-neighbor-reports restart
+}
PKG_NAME:=canutils
PKG_VERSION:=2020.02.04
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/linux-can/can-utils/tar.gz/v$(PKG_VERSION)?
--- /dev/null
+From 8d2ed4c959039abdcfeaa3fe1e70af0e75be8809 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 11 Oct 2020 22:02:23 -0700
+Subject: [PATCH] jcat: remove bzero
+
+bzero is removed in POSIX 2008. malloc/bzero can also be replaced with
+calloc.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ jcat.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/jcat.c b/jcat.c
+index 8335d6e..81ffe04 100644
+--- a/jcat.c
++++ b/jcat.c
+@@ -644,12 +644,10 @@ int main(int argc, char *argv[])
+ struct jcat_priv *priv;
+ int ret;
+
+- priv = malloc(sizeof(*priv));
++ priv = calloc(1, sizeof(*priv));
+ if (!priv)
+ err(EXIT_FAILURE, "can't allocate priv");
+
+- bzero(priv, sizeof(*priv));
+-
+ priv->todo_prio = -1;
+ priv->infile = STDIN_FILENO;
+ priv->outfile = STDOUT_FILENO;
--- /dev/null
+From d7df79e6876bed9df9522255f9d24ad5a76b65ce Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 11 Oct 2020 22:00:32 -0700
+Subject: [PATCH] convert usleep to nanosleep
+
+usleep is removed in POSIX 2008.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ bcmserver.c | 7 ++++++-
+ canlogserver.c | 6 +++++-
+ isotpserver.c | 7 ++++++-
+ 3 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/bcmserver.c b/bcmserver.c
+index b51cb2c..3fe092c 100644
+--- a/bcmserver.c
++++ b/bcmserver.c
+@@ -114,6 +114,7 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h>
+
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -180,8 +181,12 @@ int main(void)
+ saddr.sin_port = htons(PORT);
+
+ while(bind(sl,(struct sockaddr*)&saddr, sizeof(saddr)) < 0) {
++ struct timespec f = {
++ .tv_nsec = 100 * 1000 * 1000,
++ };
++
+ printf(".");fflush(NULL);
+- usleep(100000);
++ nanosleep(&f, NULL);
+ }
+
+ if (listen(sl,3) != 0) {
+diff --git a/canlogserver.c b/canlogserver.c
+index 4bcf991..ef338d1 100644
+--- a/canlogserver.c
++++ b/canlogserver.c
+@@ -280,8 +280,12 @@ int main(int argc, char **argv)
+ inaddr.sin_port = htons(port);
+
+ while(bind(socki, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) {
++ struct timespec f = {
++ .tv_nsec = 100 * 1000 * 1000,
++ };
++
+ printf(".");fflush(NULL);
+- usleep(100000);
++ nanosleep(&f, NULL);
+ }
+
+ if (listen(socki, 3) != 0) {
+diff --git a/isotpserver.c b/isotpserver.c
+index 91719f0..946169e 100644
+--- a/isotpserver.c
++++ b/isotpserver.c
+@@ -64,6 +64,7 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h>
+
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -298,9 +299,13 @@ int main(int argc, char **argv)
+ saddr.sin_port = htons(local_port);
+
+ while(bind(sl,(struct sockaddr*)&saddr, sizeof(saddr)) < 0) {
++ struct timespec f = {
++ .tv_nsec = 100 * 1000 * 1000,
++ };
++
+ printf(".");
+ fflush(NULL);
+- usleep(100000);
++ nanosleep(&f, NULL);
+ }
+
+ if (listen(sl, 3) != 0) {
PKG_NAME:=mariadb
PKG_VERSION:=10.4.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL := \
--- /dev/null
+--- a/support-files/CMakeLists.txt
++++ b/support-files/CMakeLists.txt
+@@ -61,7 +61,7 @@ IF(UNIX)
+ INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
+ INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles)
+ FIND_PROGRAM(CHECKMODULE checkmodule)
+- FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
++# FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
+ MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE)
+
+ # Build pp files in policy/selinux
--- /dev/null
+#!/bin/sh
+
+# shellcheck disable=SC1090
+. "$CI_HELPER"
+
+check_version() {
+ bin="$1"
+ ver="$2"
+ com="$3"
+
+ if [ -x "$bin" ]; then
+ if "$bin" --version | grep " $ver-MariaDB"; then
+ success "MariaDB $com is in version $2"
+ else
+ err_die "MariaDB $com seems to be in wrong version"
+ fi
+ else
+ err_die "Can't find $com server binary"
+ fi
+}
+
+case "$PKG_NAME" in
+ mariadb-server) check_version /usr/bin/mysqld "$PKG_VERSION" "server" ;;
+ mariadb-client) check_version /usr/bin/mysql "$PKG_VERSION" "client";;
+ *) info "Skipping $PKG_NAME" ;;
+esac
PKG_NAME:=picocom
PKG_VERSION:=3.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/npat-efault/picocom/tar.gz/$(PKG_VERSION)?
--- /dev/null
+From 84fdd943aee9fdf199f6668145246d3021527c29 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 11 Oct 2020 22:10:45 -0700
+Subject: [PATCH] remove usleep
+
+usleep is removed in POSIX 2008.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ term.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/term.c b/term.c
+index b45ab3d..23afd4f 100644
+--- a/term.c
++++ b/term.c
+@@ -33,6 +33,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
++#include <time.h>
+ #include <unistd.h>
+ #include <termios.h>
+ #ifdef USE_FLOCK
+@@ -1588,6 +1589,8 @@ term_drain(int fd)
+
+ rval = 0;
+
++ struct timespec s;
++
+ do { /* dummy */
+
+ r = term_find(fd);
+@@ -1614,7 +1617,10 @@ term_drain(int fd)
+ the port is immediately reconfigured, even after a
+ drain. (I guess, drain does not wait for everything to
+ actually be transitted on the wire). */
+- if ( DRAIN_DELAY ) usleep(DRAIN_DELAY);
++ if ( DRAIN_DELAY ) {
++ struct timespec d = {0, DRAIN_DELAY * 1000};
++ nanosleep(&d, &s);
++ }
+
+ } while (0);
+
+@@ -1627,6 +1633,7 @@ int
+ term_fake_flush(int fd)
+ {
+ struct termios tio;
++ struct timespec s;
+ int rval, i, r;
+
+ rval = 0;
+@@ -1666,7 +1673,10 @@ term_fake_flush(int fd)
+ break;
+ }
+ /* see comment in term_drain */
+- if ( DRAIN_DELAY ) usleep(DRAIN_DELAY);
++ if ( DRAIN_DELAY ) {
++ struct timespec d = {0, DRAIN_DELAY * 1000};
++ nanosleep(&d, &s);
++ }
+ /* Reset flow-control to original setting. */
+ r = tcsetattr(fd, TCSANOW, &term.currtermios[i]);
+ if ( r < 0 ) {
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2020.10.01
+PKG_VERSION:=2020.10.10
PKG_RELEASE:=1
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua $(1)/usr/lib/lua/prometheus-collectors/
endef
+define Package/prometheus-node-exporter-lua-hostapd_ubus_stations
+ $(call Package/prometheus-node-exporter-lua/Default)
+ TITLE+= (hostapd_ubus_stations collector)
+ DEPENDS:=prometheus-node-exporter-lua +luabitop +libubus-lua
+endef
+
+define Package/prometheus-node-exporter-lua-hostapd_ubus_stations/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
+ $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua $(1)/usr/lib/lua/prometheus-collectors/
+endef
+
define Package/prometheus-node-exporter-lua-ltq-dsl
$(call Package/prometheus-node-exporter-lua/Default)
TITLE+= (lantiq dsl collector)
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-dawn))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations))
+$(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_ubus_stations))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-ltq-dsl))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-nat_traffic))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-netstat))
--- /dev/null
+local ubus = require "ubus"
+local bit = require "bit32"
+
+local function get_wifi_interfaces() -- based on hostapd_stations.lua
+ local u = ubus.connect()
+ local status = u:call("network.wireless", "status", {})
+ local interfaces = {}
+
+ for _, dev_table in pairs(status) do
+ for _, intf in ipairs(dev_table['interfaces']) do
+ table.insert(interfaces, intf['ifname'])
+ end
+ end
+
+ return interfaces
+end
+
+local function scrape()
+ local metric_hostapd_ubus_station_rrm_caps_link_measurement =
+ metric("hostapd_ubus_station_rrm_caps_link_measurement", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_neighbor_report =
+ metric("hostapd_ubus_station_rrm_caps_neighbor_report", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_beacon_report_passive =
+ metric("hostapd_ubus_station_rrm_caps_beacon_report_passive", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_beacon_report_active =
+ metric("hostapd_ubus_station_rrm_caps_beacon_report_active", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_beacon_report_table =
+ metric("hostapd_ubus_station_rrm_caps_beacon_report_table", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_lci_measurement =
+ metric("hostapd_ubus_station_rrm_caps_lci_measurement", "gauge")
+ local metric_hostapd_ubus_station_rrm_caps_ftm_range_report =
+ metric("hostapd_ubus_station_rrm_caps_ftm_range_report", "gauge")
+
+ local function evaluate_metrics(ifname, freq, station, vals)
+ local label_station = {
+ ifname = ifname,
+ freq = freq,
+ station = station
+ }
+ local rrm_caps_link_measurement = bit.band(bit.lshift(1, 0), vals['rrm'][1]) > 0 and 1 or 0
+ local rrm_caps_neighbor_report = bit.band(bit.lshift(1, 1), vals['rrm'][1]) > 0 and 1 or 0
+ local rrm_caps_beacon_report_passive = bit.band(bit.lshift(1, 4), vals['rrm'][1]) > 0 and 1 or 0
+ local rrm_caps_beacon_report_active = bit.band(bit.lshift(1, 5), vals['rrm'][1]) > 0 and 1 or 0
+ local rrm_caps_beacon_report_table = bit.band(bit.lshift(1, 6), vals['rrm'][1]) > 0 and 1 or 0
+ local rrm_caps_lci_measurement = bit.band(bit.lshift(1, 4), vals['rrm'][2]) > 0 and 1 or 0
+ local rrm_caps_ftm_range_report = bit.band(bit.lshift(1, 2), vals['rrm'][5]) > 0 and 1 or 0
+
+ metric_hostapd_ubus_station_rrm_caps_link_measurement(label_station, rrm_caps_link_measurement)
+ metric_hostapd_ubus_station_rrm_caps_neighbor_report(label_station, rrm_caps_neighbor_report)
+ metric_hostapd_ubus_station_rrm_caps_beacon_report_passive(label_station, rrm_caps_beacon_report_passive)
+ metric_hostapd_ubus_station_rrm_caps_beacon_report_active(label_station, rrm_caps_beacon_report_active)
+ metric_hostapd_ubus_station_rrm_caps_beacon_report_table(label_station, rrm_caps_beacon_report_table)
+
+ metric_hostapd_ubus_station_rrm_caps_lci_measurement(label_station, rrm_caps_lci_measurement)
+ metric_hostapd_ubus_station_rrm_caps_ftm_range_report(label_station, rrm_caps_ftm_range_report)
+ end
+
+ for _, ifname in ipairs(get_wifi_interfaces()) do
+ local u = ubus.connect()
+ local clients_call = u:call("hostapd." .. ifname, "get_clients", {})
+
+ for client, client_table in pairs(clients_call['clients']) do
+ evaluate_metrics(ifname, clients_call['freq'], client, client_table)
+ end
+ end
+end
+
+return { scrape = scrape }
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
-PKG_VERSION:=2020a
+PKG_VERSION:=2020b
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=547161eca24d344e0b5f96aff6a76b454da295dc14ed4ca50c2355043fb899a2
+PKG_HASH:=9b053f951d245ce89d850b96ee4711d82d833559b1fc96ba19f90bc4d745e809
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- HASH:=7d2af7120ee03df71fbca24031ccaf42404752e639196fe93c79a41b38a6d669
+ HASH:=47eff8944de4a64f7629b851e4a32338ab12c9b73edd62063795167ff1fe43da
endef
$(eval $(call Download,tzcode))