]> git.99rst.org Git - openwrt-packages.git/commitdiff
zabbix: reorganize files dir for clarity and to better follow the FHS
authorDaniel F. Dickinson <redacted>
Fri, 17 Jul 2026 03:56:31 +0000 (23:56 -0400)
committerJosef Schlehofer <redacted>
Wed, 22 Jul 2026 23:04:06 +0000 (01:04 +0200)
Reorganize the extra files under the 'files' dir so that it is more
clear where they go and what they are for, and to avoid having a
disorganized mass of files.

Move the extra C source file out of files and into 'src-extra'.

Avoid treating openwrt-supplied params files as configuration data.
Instead have them in a separate directory under /usr/share which is
included in the zabbix_agentd configuration by default. This also better
follows the FHS.

Hopefully these changes make sense on their own, as well as helping the
CI accept the changes.

Signed-off-by: Daniel F. Dickinson <redacted>
admin/zabbix/Makefile
admin/zabbix/files/usr/share/acl.d/zabbix-network-ubus-acl.json [moved from admin/zabbix/files/zabbix-network-ubus-acl.json with 100% similarity]
admin/zabbix/files/usr/share/acl.d/zabbix-wifi-ubus-acl.json [moved from admin/zabbix/files/zabbix-wifi-ubus-acl.json with 100% similarity]
admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/mac80211 [moved from admin/zabbix/files/mac80211 with 100% similarity]
admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/network [moved from admin/zabbix/files/network with 100% similarity]
admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/wifi [moved from admin/zabbix/files/wifi with 100% similarity]
admin/zabbix/patches/010-change-agentd-config.patch
admin/zabbix/src-extra/zabbix_helper_mac80211.c [moved from admin/zabbix/files/zabbix_helper_mac80211.c with 100% similarity]

index 4c875d2f5a1bb0fdc2dfecf6b49a94cca2260ef7..b53ea9df9d9716810b4ff3a99cc4838f7431b139 100644 (file)
@@ -446,7 +446,7 @@ ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
 define Build/Prepare
        $(call Build/Prepare/Default)
        mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211
-       $(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/
+       $(CP) ./src-extra/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/
 endef
 
 define Build/Configure
@@ -486,8 +486,8 @@ define Package/zabbix/install/init.d
 endef
 
 define Package/zabbix/install/zabbix.conf.d
-       $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
-       $(INSTALL_BIN) ./files/$(2) $(1)/etc/zabbix_agentd.conf.d/$(2)
+       $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
+       $(INSTALL_DATA) ./files/usr/share/zabbix_agentd.openwrt-params.d/$(2) $(1)/usr/share/zabbix_agentd.openwrt-params.d/$(2)
 endef
 
 define Package/zabbix-agentd/conffiles
@@ -497,6 +497,7 @@ endef
 
 define Package/zabbix-agentd/install
        $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
+       $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
        $(call Package/zabbix/install/sbin,$(1),agentd)
        $(call Package/zabbix/install/etc,$(1),agentd)
        $(call Package/zabbix/install/init.d,$(1),agentd)
@@ -509,6 +510,7 @@ endef
 
 define Package/zabbix-agentd-basic/install
        $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
+       $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
        $(call Package/zabbix/install/sbin,$(1),agentd)
        $(call Package/zabbix/install/etc,$(1),agentd)
        $(call Package/zabbix/install/init.d,$(1),agentd)
@@ -580,7 +582,7 @@ endef
 define Package/zabbix-extra-network/install
        $(call Package/zabbix/install/zabbix.conf.d,$(1),network)
        $(INSTALL_DIR) $(1)/usr/share/acl.d
-       $(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
+       $(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
 endef
 
 define Package/zabbix-extra-network/postinst
@@ -593,7 +595,7 @@ endef
 define Package/zabbix-extra-wifi/install
        $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi)
        $(INSTALL_DIR) $(1)/usr/share/acl.d
-       $(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
+       $(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
 endef
 
 define Package/zabbix-extra-wifi/postinst
index 7450e81e623261ff96757c386fdd300a79253e8b..b94fbe693fdff13a0790b67e5eae04cae2667695 100644 (file)
@@ -83,10 +83,11 @@ Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
  
  ####### USER-DEFINED MONITORED PARAMETERS #######
  
-@@ -547,5 +541,5 @@ Hostname=Zabbix server
+@@ -547,5 +541,6 @@ Hostname=Zabbix server
  # Include=
  
  # Include=/usr/local/etc/zabbix_agentd.userparams.conf
 -# Include=/usr/local/etc/zabbix_agentd.conf.d/
  # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
++Include=/usr/share/zabbix_agentd.openwrt-params.d/
 +Include=/etc/zabbix_agentd.conf.d/
git clone https://git.99rst.org/PROJECT