Merge pull request #13641 from TDT-AG/pr/20201012-keepalived
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 13 Oct 2020 09:42:52 +0000 (11:42 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 09:42:52 +0000 (11:42 +0200)
keepalived: update to 2.1.5

22 files changed:
lang/python/click/Makefile
libs/boost/Makefile
mail/postfix/Makefile
multimedia/imagemagick/Makefile
net/geth/Makefile
net/pdns-recursor/Makefile
net/static-neighbor-reports/Makefile [new file with mode: 0644]
net/static-neighbor-reports/README.md [new file with mode: 0644]
net/static-neighbor-reports/files/reload-neighbor-reports.lua [new file with mode: 0644]
net/static-neighbor-reports/files/static-neighbor-report.conf [new file with mode: 0644]
net/static-neighbor-reports/files/static-neighbor-reports.init [new file with mode: 0644]
utils/canutils/Makefile
utils/canutils/patches/010-bzero.patch [new file with mode: 0644]
utils/canutils/patches/020-usleep.patch [new file with mode: 0644]
utils/mariadb/Makefile
utils/mariadb/patches/200-no-selinux.patch [new file with mode: 0644]
utils/mariadb/test.sh [new file with mode: 0755]
utils/picocom/Makefile
utils/picocom/patches/030-usleep.patch [new file with mode: 0644]
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua [new file with mode: 0644]
utils/zoneinfo/Makefile

index fff235d8c77a91a757e438a363e5bc436db3174f..97c6307bf16998eb740b112272a7417933016d5e 100644 (file)
@@ -5,12 +5,11 @@
 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
index b8b8f9ef7e48f8d06c7ff8ece85d502967606678..414785567114f306d2a7d57d7d9e46c68ed2f981 100644 (file)
@@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk
 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/
@@ -63,6 +63,7 @@ This package provides the following run-time libraries:
  - locale (Requires kernel being compiled with full language support)
  - log
  - math
+ - nowide
  - program_options
  - python3
  - random
@@ -79,7 +80,7 @@ There are many more header-only libraries supported by Boost.
 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)
@@ -277,12 +278,11 @@ define Package/boost/config
                        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,)
@@ -316,7 +316,7 @@ define DefineBoostLibrary
   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
 
@@ -336,13 +336,14 @@ $(eval $(call DefineBoostLibrary,date_time))
 $(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))
index 4b9add1ea1cc6e9c604fdddd9550553e0976aed3..8aad4f9ee82db62ba7604d3184e4a3c649917596 100644 (file)
@@ -8,14 +8,15 @@
 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
@@ -110,7 +111,7 @@ define Package/postfix/config
        endmenu
 endef
 
-CCARGS=-DNO_NIS
+CCARGS=-DNO_NIS -fcommon
 AUXLIBS=-L$(STAGING_DIR)/usr/lib
 
 ifdef CONFIG_POSTFIX_TLS
index 3da216080e30850eb3a209bd072e90ff89a31e02..48242513182d354e65f59f1c8aedb41448a7e3d1 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 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
@@ -109,7 +109,7 @@ CONFIGURE_ARGS += \
        --with-png \
        --with-tiff
 
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),,-flto)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
index f8f18def9cec33829c4759834f0233a6f461f263..1b879aea1fe78b064b1304e48987130a5dd165bf 100644 (file)
@@ -8,12 +8,12 @@
 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
@@ -27,6 +27,7 @@ GO_PKG:=github.com/ethereum/go-ethereum
 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
@@ -35,7 +36,6 @@ define Package/geth
   TITLE:=Ethereum Go client
   URL:=https://geth.ethereum.org/
   DEPENDS:=$(GO_ARCH_DEPENDS)
-  PKGARCH:=all
 endef
 
 define Package/geth/description
@@ -44,6 +44,8 @@ that run exactly as programmed without possibility of downtime, censorship,
 fraud or third party interference.
 endef
 
+TARGET_LDFLAGS += -liconv
+
 define Package/geth/install
        $(call GoPackage/Package/Install/Bin,$(1))
 
index 6d0ed51544f8307a8760000d923e575a30b9a5e2..65a7ebb7889836ab5dc97e2c7d0df2345ed923e9 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 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/
@@ -26,7 +26,7 @@ define Package/pdns-recursor
   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
 
diff --git a/net/static-neighbor-reports/Makefile b/net/static-neighbor-reports/Makefile
new file mode 100644 (file)
index 0000000..293ae18
--- /dev/null
@@ -0,0 +1,44 @@
+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))
diff --git a/net/static-neighbor-reports/README.md b/net/static-neighbor-reports/README.md
new file mode 100644 (file)
index 0000000..575d282
--- /dev/null
@@ -0,0 +1,49 @@
+# 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>"
+    ]
+}
+```
diff --git a/net/static-neighbor-reports/files/reload-neighbor-reports.lua b/net/static-neighbor-reports/files/reload-neighbor-reports.lua
new file mode 100644 (file)
index 0000000..52b490e
--- /dev/null
@@ -0,0 +1,37 @@
+#!/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
diff --git a/net/static-neighbor-reports/files/static-neighbor-report.conf b/net/static-neighbor-reports/files/static-neighbor-report.conf
new file mode 100644 (file)
index 0000000..e9c01dc
--- /dev/null
@@ -0,0 +1,6 @@
+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'
diff --git a/net/static-neighbor-reports/files/static-neighbor-reports.init b/net/static-neighbor-reports/files/static-neighbor-reports.init
new file mode 100644 (file)
index 0000000..a23c14a
--- /dev/null
@@ -0,0 +1,24 @@
+#!/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
+}
index f4048e23cba58967ea3e72682ef853c03e81e1b6..758dac525907a1471c3dc037b628d2064ce06c34 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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)?
diff --git a/utils/canutils/patches/010-bzero.patch b/utils/canutils/patches/010-bzero.patch
new file mode 100644 (file)
index 0000000..cfeebc6
--- /dev/null
@@ -0,0 +1,31 @@
+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;
diff --git a/utils/canutils/patches/020-usleep.patch b/utils/canutils/patches/020-usleep.patch
new file mode 100644 (file)
index 0000000..4feb5b8
--- /dev/null
@@ -0,0 +1,85 @@
+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) {
index 96b01fe2faca0109d96c9e7f4b3d0418198f9c16..321ee70a9b6280d7adaf436722a82e15a7b6e3b1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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 := \
diff --git a/utils/mariadb/patches/200-no-selinux.patch b/utils/mariadb/patches/200-no-selinux.patch
new file mode 100644 (file)
index 0000000..d7ed569
--- /dev/null
@@ -0,0 +1,11 @@
+--- 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
diff --git a/utils/mariadb/test.sh b/utils/mariadb/test.sh
new file mode 100755 (executable)
index 0000000..cb33bba
--- /dev/null
@@ -0,0 +1,26 @@
+#!/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
index 4569a72fd83c6596482d116ff2e15da635af8f4e..40f152d688b1d5c4755f8660e028221f9a9d656a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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)?
diff --git a/utils/picocom/patches/030-usleep.patch b/utils/picocom/patches/030-usleep.patch
new file mode 100644 (file)
index 0000000..15388d5
--- /dev/null
@@ -0,0 +1,65 @@
+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 ) {
index 371d2f776b624a26ec3abc57925080ae0db5fea9..6e380ea9f32a9868d8279b36446b815960ff9b17 100644 (file)
@@ -4,7 +4,7 @@
 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>
@@ -100,6 +100,17 @@ define Package/prometheus-node-exporter-lua-hostapd_stations/install
        $(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)
@@ -193,6 +204,7 @@ $(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6))
 $(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))
diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua
new file mode 100644 (file)
index 0000000..b9719c8
--- /dev/null
@@ -0,0 +1,68 @@
+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 }
index 608b1f0d2e5ed9f0e79d8af08da281493d80a1ca..3e6e48d15448681d5fed0d6be8aa5d599cfd726d 100644 (file)
@@ -9,7 +9,7 @@
 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"
@@ -19,14 +19,14 @@ PKG_LICENSE:=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))