zabbix: remove unneeded postinsts - #30425
Conversation
48f0657 to
d25bc5d
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit. The premise checks out — default_postinst in package/base-files/files/lib/functions.sh sources and removes /etc/uci-defaults/* before it sources the package's own postinst-pkg, so these per-package postinsts are redundant and do produce the reported error. PKG_RELEASE bump is correct, and leaving the zabbix-extra-network / zabbix-extra-wifi postinsts alone is right since those do killall -s HUP ubusd, not uci-defaults handling.
One incomplete-removal issue inline.
Generated by Claude Code
Handling uci-defaults scripts in package postinst is not needed in modern OpenWrt and in fact results in error messages on install since the common postinst processes and deletes uci-defaults scripts before package-specific postinsts are executed. Therefore remove the unneeded postinsts in this package. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
d25bc5d to
7d598ff
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit; no new issues found.
The force-push resolves my earlier finding — both dangling aliases (Package/zabbix-agentd-basic/postinst= and Package/zabbix-proxy-basic-sqlite/postinst=) are now removed along with the defines, so no empty postinst-pkg is emitted for those variants. The .../conffiles= aliases are correctly left in place.
Re-confirmed the premise against default_postinst in package/base-files/files/lib/functions.sh: /etc/uci-defaults/* are sourced and removed before postinst-pkg is sourced, so the removed postinsts were redundant. add_group_and_user also runs before that loop, so the chown zabbix-agent:zabbix-agent in files/zabbix_agentd.defaults still has its user when the defaults script runs. PKG_RELEASE bump to 2 and the retained zabbix-extra-network / zabbix-extra-wifi postinsts (which do killall -s HUP ubusd, not uci-defaults handling) are both correct.
FYI on CI: the single red job (Test x86_64) fails on wget: exited with error 4 / libopenssl3: ADB integrity error while pulling test dependencies for net/apache — a download flake unrelated to this change. Your call whether to re-run it.
Generated by Claude Code
📦 Package Details
Maintainer: @danielfdickinson
Description:
Handling uci-defaults scripts in postinst is not needed in modern OpenWrt and in fact results in error messages on install since the common postinst processes and deletes uci-defaults scripts before package-specific postinsts are executed.
Therefore remove the unneeded postinsts in this package.
In response to: https://forum.openwrt.org/t/zabbix-agentd-fails-to-properly-install-with-newest-version/253198
🧪 Run Testing Details
✅ Formalities