Merge pull request #18631 from mhei/php8-update
authorMichael Heimpold <mhei@heimpold.de>
Mon, 30 May 2022 21:07:33 +0000 (23:07 +0200)
committerGitHub <noreply@github.com>
Mon, 30 May 2022 21:07:33 +0000 (23:07 +0200)
php8: update to 8.1.6

libs/libxml2/Makefile
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua

index f3609eddf9abc1c80c1a0416938bfdec7b76aca0..28e53667e3b7d781ed15b21d805b7036551027e4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.9.13
+PKG_VERSION:=2.9.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e
+PKG_HASH:=60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index b5472c68f53c51b74850da6e79f8167edc4d6ea3..e59413da032612f4f7d3fc12eb13870a85299f02 100644 (file)
@@ -4,7 +4,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2022.04.23
+PKG_VERSION:=2022.04.30
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
index 88a993c54fdf0768fd6221e3c3986dc2797cb00b..3ae441474c3af4cdb1f4274a38318a35d3d89af5 100644 (file)
@@ -1,14 +1,13 @@
 local ubus = require "ubus"
 local bit = require "bit"
 
-local function get_wifi_interfaces() -- based on hostapd_stations.lua
-  local u = ubus.connect()
-  local status = u:call("network.wireless", "status", {})
+local function get_wifi_hostapd_interfaces(u)
+  local ubuslist = u:objects()
   local interfaces = {}
 
-  for _, dev_table in pairs(status) do
-    for _, intf in ipairs(dev_table['interfaces']) do
-      table.insert(interfaces, intf['ifname'])
+  for _,net in ipairs(ubuslist) do
+    if net.find(net,"hostapd.") then
+      table.insert(interfaces, net)
     end
   end
 
@@ -16,6 +15,7 @@ local function get_wifi_interfaces() -- based on hostapd_stations.lua
 end
 
 local function scrape()
+  local u = ubus.connect()
   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 =
@@ -55,14 +55,15 @@ local function scrape()
     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 _, hostapd_int in ipairs(get_wifi_hostapd_interfaces(u)) do
+    local clients_call = u:call(hostapd_int, "get_clients", {})
+    local ifname = hostapd_int:gsub("hostapd.", "")
 
     for client, client_table in pairs(clients_call['clients']) do
       evaluate_metrics(ifname,  clients_call['freq'], client, client_table)
     end
   end
+  u:close()
 end
 
 return { scrape = scrape }