Skip to content

Conversation

@danielfdickinson
Copy link
Contributor

@danielfdickinson danielfdickinson commented Jan 26, 2026

📦 Package Details

Maintainer: @danielfdickinson

Description:

This is intended to be cherry-picked to go with PR #28426, once this PR has gone through the buildbots.

  • It removes the wrongly committed cspell.json.
  • It fixes and erroneous use of BUILD_VARIANT where VARIANT should be used.
  • In preparation for further changes, deduplicate package definitions,
    and reorganize them. At the same time make use of provides to ensure
    both existing names are preserved, and that it is possible to be
    specific about the variant of the package one wants.
  • It also condenses the package conffiles, install, postinst, etc handling.
    This is more maintainable (less copy and paste and less to modify).

🧪 Run Testing Details

To be done

  • OpenWrt Version:
  • OpenWrt Target/Subtarget:
  • OpenWrt Device:

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

@danielfdickinson danielfdickinson force-pushed the pr-zabbix-fixes-and-packaging-cleanup branch from 9cd71f6 to 9766406 Compare January 27, 2026 05:08
@danielfdickinson danielfdickinson force-pushed the pr-zabbix-fixes-and-packaging-cleanup branch from 9766406 to 0cddc88 Compare January 27, 2026 05:17
cspell.json was accidentally include in a previous commit, so remove it.

VARIANT is to be used in package definitions, and BUILD_VARIANT
for checking which VARIANT is currently being built. BUILD_VARIANT was
incorrectly used in a package definition, so we fix that.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
@danielfdickinson danielfdickinson force-pushed the pr-zabbix-fixes-and-packaging-cleanup branch from 0cddc88 to 834de71 Compare January 27, 2026 05:22
define Package/zabbix-proxy-anossl/description
This should be named zabbix-proxy-nossl, but due to the sort order
used by the tools which scans package definitions to create the
menuconfig, zabbix-agent-gnutls becomes a parent of this package instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hu, this sounds strange. Is this by design or do we consider it a bug? Then maybe raise an issue upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhei I don't think is is an upstream issue as upstream doesn't generate Kconfig from other sources (in our case Makefiles are parsed by Perl scripts) but create the Kconfig directly and check that in.

The issue, as I recall from looking at this years ago, is the the Perl scripts dump all the packages into one great big list that is sorted alphabetically. This can result in some strange behaviour of an item lower in the list is preceded by a package from a different Makefile that is a child of something in that Makefile. The later package ends up (in certain situations) getting the indentation / submenu settings (I don't remember exactly) from the preceding package.

I think a resolution would require an update to the Perl scripts which probably haven't been touched for almost a decade, and would require a rewrite of the process, I think. Maybe a GSoC project, but whether it is worth it is another thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what it looks like if I change anossl to nossl:

image

Copy link
Contributor Author

@danielfdickinson danielfdickinson Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tmp/.config-package.in (a generated file), one sees:

        config PACKAGE_zabbix-agentd-gnutls
                tristate "zabbix-agentd-gnutls......................... Zabbix agentd (with GnuTLS)"
                default y if DEFAULT_zabbix-agentd-gnutls
                default m if ALL
                select PACKAGE_libc
                select PACKAGE_libevent2-pthreads
                select PACKAGE_libgnutls
                select PACKAGE_libiconv-full if BUILD_NLS
                select PACKAGE_libpcre2
                select PACKAGE_zlib
                help
                 Zabbix agentd (with GnuTLS)

        config PACKAGE_zabbix-agentd-nossl
                tristate "zabbix-agentd-nossl............................... Zabbix agentd (no SSL)"
                default y if DEFAULT_zabbix-agentd-nossl
                default m if ALL
                select PACKAGE_libc
                select PACKAGE_libevent2-pthreads
                select PACKAGE_libiconv-full if BUILD_NLS
                select PACKAGE_libpcre2
                select PACKAGE_zlib
                depends on m || (PACKAGE_zabbix-agentd-openssl != y)
                depends on m || (PACKAGE_zabbix-agentd-gnutls != y)
                help
                 Zabbix agentd (no SSL)

        config PACKAGE_zabbix-agentd-openssl
                tristate "zabbix-agentd-openssl....................... Zabbix agentd (with OpenSSL)"
                default y if DEFAULT_zabbix-agentd-openssl
                default m if ALL
                select PACKAGE_libc
                select PACKAGE_libevent2-pthreads
                select PACKAGE_libiconv-full if BUILD_NLS
                select PACKAGE_libopenssl
                select PACKAGE_libpcre2
                select PACKAGE_zlib
                help

Copy link
Contributor Author

@danielfdickinson danielfdickinson Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I didn't remember quite correctly. This is generated this way using tmp/.packageinfo and/or temp.packagedeps which are each one big sorted list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the problem is in scripts/package-metadata.pl .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created openwrt/openwrt#21734 for this.

In preparation for further changes, deduplicate package definitions,
and reorganize them. At the same time make use of provides to ensure
both existing names are preserved, and that it is possible to be
specific about the variant of the package one wants.

Also, condense the package conffiles, install, postinst, etc handling.
This is more maintainable (less copy and paste and less to modify).

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
@danielfdickinson danielfdickinson force-pushed the pr-zabbix-fixes-and-packaging-cleanup branch from 834de71 to 49dbc09 Compare January 27, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants