zabbix: avoid unnecessary configure/compile
authorDaniel F. Dickinson <redacted>
Fri, 16 Jan 2026 06:55:41 +0000 (01:55 -0500)
committerHannu Nyman <redacted>
Sun, 18 Jan 2026 05:21:18 +0000 (07:21 +0200)
For items which are only copied from the source code, avoid the
prepare, configure, and compile steps, while preserving the special
behaviour of the mac80211 addon, which has a unique prepare and
compile.

Signed-off-by: Daniel F. Dickinson <redacted>
admin/zabbix/Makefile
admin/zabbix/cspell.json [new file with mode: 0644]

index 8b46f3c87e56e47699d981b04e67ddb6f9b8e0a3..80346b2b08b30ab9a8809e2fa18027cc2584a072 100644 (file)
@@ -91,18 +91,21 @@ define Package/zabbix-extra-mac80211
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for mac80211
   DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
+  BUILD_VARIANT:=no-configure
 endef
 
 define Package/zabbix-extra-network
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for network
   DEPENDS = +zabbix-agentd +libubus-lua +lua
+  BUILD_VARIANT:=no-configure
 endef
 
 define Package/zabbix-extra-wifi
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for wifi
   DEPENDS = +zabbix-agentd +libiwinfo-lua +libubus-lua +lua
+  BUILD_VARIANT:=no-configure
 endef
 
 define Package/zabbix-sender
@@ -208,6 +211,7 @@ define Package/zabbix-server-frontend
     +ZABBIX_POSTGRESQL:php8-mod-pgsql \
     +ZABBIX_MYSQL:php8-mod-mysqli \
     @(!ZABBIX_SQLITE)
+  BUILD_VARIANT:=no-configure
 endef
 
 define Package/zabbix-proxy/Default
@@ -263,6 +267,8 @@ As it uses libiwinfo, it works with all wifi devices supported by openwrt.
 See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
 endef
 
+ifneq ($(BUILD_VARIANT),no-configure)
+
 CONFIGURE_ARGS+= \
        --enable-agent \
        $(if $(CONFIG_ZABBIX_SQLITE),--disable-server,--enable-server) \
@@ -284,6 +290,20 @@ ifeq ($(BUILD_VARIANT),gnutls)
        CONFIGURE_ARGS+= --with-gnutls="$(STAGING_DIR)/usr"
 endif
 
+else
+
+define Build/Prepare
+       true
+endef
+define Build/Configure
+       true
+endef
+define Build/Compile
+       true
+endef
+
+endif
+
 MAKE_FLAGS += ARCH="linux"
 
 define Package/zabbix/install/sbin
@@ -352,25 +372,21 @@ Package/zabbix-proxy-openssl/conffiles = $(Package/zabbix-proxy/conffiles)
 Package/zabbix-proxy-gnutls/conffiles = $(Package/zabbix-proxy/conffiles)
 
 ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
-define Build/Prepare/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/
 endef
 
-define Build/Compile/zabbix-extra-mac80211
-       $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211
-endef
-endif
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(call Build/Prepare/zabbix-extra-mac80211)
+define Build/Configure
+       $(call Build/Configure/Default)
 endef
 
 define Build/Compile
        $(call Build/Compile/Default)
-       $(call Build/Compile/zabbix-extra-mac80211)
+       $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211
 endef
+endif
 
 define Package/zabbix-agentd/install
        $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
diff --git a/admin/zabbix/cspell.json b/admin/zabbix/cspell.json
new file mode 100644 (file)
index 0000000..6d8a2b5
--- /dev/null
@@ -0,0 +1,43 @@
+{
+    "version": "0.2",
+    "ignorePaths": [],
+    "dictionaryDefinitions": [],
+    "dictionaries": [],
+    "words": [
+        "agentd",
+        "bcmath",
+        "conffiles",
+        "ctype",
+        "DEBUGFS",
+        "endchoice",
+        "fping",
+        "gnutls",
+        "INSTROOT",
+        "IPKG",
+        "killall",
+        "libevent",
+        "libgnutls",
+        "libiwinfo",
+        "libmariadbclient",
+        "libopenssl",
+        "libpcre",
+        "libpq",
+        "libsqlite",
+        "libubus",
+        "mbstring",
+        "mysqli",
+        "nossl",
+        "pgsql",
+        "postinst",
+        "pthreads",
+        "TOPDIR",
+        "ubus",
+        "ubusd",
+        "userparameters",
+        "wlan",
+        "xmlreader",
+        "xmlwriter"
+    ],
+    "ignoreWords": [],
+    "import": []
+}
git clone https://git.99rst.org/PROJECT