package/xtables-addons: use kernel-module infra
PATCH 1/2 package/xtables-addons: use kernel-module infra
This package does not need the kernel-module infra because the kernel module is build by autoconf but the MIPS fix from buildroot commit 1d8d9e8d6cd824b2a43a0b92d71cfb25a3f9300a is not added to _LINUX_CONFIG_ FIXUPS causing a build error with this defconfig:
BR2_mips64el=y
# BR2_MIPS_SOFT_FLOAT is not set BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_STABLE=y BR2_PER_PACKAGE_DIRECTORIES=y
BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.156" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_XTABLES_ADDONS=y
# BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
MODPOST /home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/Module.symvers
ERROR: modpost: "memcmp" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/compat_xtables.ko] undefined!
ERROR: modpost: "register_pernet_subsys" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "_printk" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "nf_register_sockopt" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "unregister_pernet_subsys" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "xt_register_target" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "nf_unregister_sockopt" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "kfree" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "free_pages" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "xt_unregister_target" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
WARNING: modpost: suppressed 342 unresolved symbol warnings because there were too many)
To fix the problem we add the kernel-module infra to the package.
--- package/xtables-addons/Config.in | 2 +- package/xtables-addons/xtables-addons.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
package/xtables-addons/Config.in +1 -1
@@ -10,7 +10,7 @@ config BR2_PACKAGE_XTABLES_ADDONS depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_STATIC_LIBS # extensions are .so select BR2_PACKAGE_IPTABLES - select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + select BR2_LINUX_NEEDS_MODULES help Xtables-addons is the successor to patch-o-matic(-ng). Likewise, it contains extensions that were not, or are not
package/xtables-addons/xtables-addons.mk +1 -0
@@ -39,4 +39,5 @@ define XTABLES_ADDONS_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT) endef +$(eval $(kernel-module)) $(eval $(autotools-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/xtables-addons: bump version to 3.31
https://codeberg.org/jengelh/xtables-addons/src/tag/v3.31/doc/changelog.rst
Upstream switched tarball format to zst.
Enabled CONFIG_NETFILTER_XT_MATCH_STRING in kernel config to provide the new upstream dependency CONFIG_TEXTSEARCH_BM:
https://codeberg.org/jengelh/xtables-addons/commit/6b7c62d83ea1b589c3115d959867e0fcbfcf74ea
Enabled CONFIG_XFRM_USER to fix build errors detected by the Gitlab pipelines:
ERROR: modpost: "crypto_alloc_shash" [pknock/xt_pknock.ko] undefined!
ERROR: modpost: "crypto_shash_setkey" [pknock/xt_pknock.ko] undefined!
ERROR: modpost: "crypto_shash_init" [pknock/xt_pknock.ko] undefined!
ERROR: modpost: "crypto_shash_finup" [pknock/xt_pknock.ko] undefined!
ERROR: modpost: "crypto_destroy_tfm" [pknock/xt_pknock.ko] undefined!
Upstream uses these functions for > 10 years so recent changes in the Linux kernel dependency handling are responsible for the build errors.
Enabled CONFIG_{INET, NET} to fix a build error detected by the Gitlab pipelines for bootlin-powerpc-e500mc-uclibc:
In file included from pknock/xt_pknock.c:31:./pknock/../compat_xtables.h:19:9: warning: #warning You need
CONFIG_NF_CONNTRACK. [-Wcpp]
19 | # warning You need CONFIG_NF_CONNTRACK.
ACCOUNT/xt_ACCOUNT.c:1179:10: error: 'struct nf_sockopt_ops' has no
member named 'set_optmin'
1179 | .set_optmin = IPT_SO_SET_ACCOUNT_HANDLE_FREE,
---
Gitlab pipelines passed
https://gitlab.com/bkuhls/buildroot/-/commits/248d6daa7cf04e09479dd9b1ad2ea434d9b151a4
with these unrelated build errors:
bootlin-aarch64-glibc-old/build/linux-7.2.4/.stamp_dotconfig:
*** C compiler is too old.
*** Your GCC version: 6.3.0
*** Minimum GCC version: 8.1.0
bootlin-m68k-68040-uclibc/build/linux-7.2.4/.stamp_built:
{standard input}: Assembler messages:
{standard input}:107: Error: operands mismatch -- statement `movec
%d2,%caar' ignored
make[5]: *** [scripts/Makefile.build:289:
arch/m68k/kernel/sys_m68k.o] Error 1
bootlin-microblazeel-uclibc:linux/linux.mk:690:
*** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.
package/xtables-addons/xtables-addons.hash | 2 +- package/xtables-addons/xtables-addons.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-)
package/xtables-addons/xtables-addons.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 3e823f71720519ced31c4c7d2bfaf7120d9c01c59a0843dfcbe93c95c64d81c1 xtables-addons-3.24.tar.xz +sha256 e22efc25b7bbb3436d1b7cdc309b1857ea933f7e5c7d88fbe6951a1e3e582a80 xtables-addons-3.31.tar.zst sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE
package/xtables-addons/xtables-addons.mk +6 -2
@@ -4,8 +4,8 @@ # ################################################################################ -XTABLES_ADDONS_VERSION = 3.24 -XTABLES_ADDONS_SOURCE = xtables-addons-$(XTABLES_ADDONS_VERSION).tar.xz +XTABLES_ADDONS_VERSION = 3.31 +XTABLES_ADDONS_SOURCE = xtables-addons-$(XTABLES_ADDONS_VERSION).tar.zst XTABLES_ADDONS_SITE = https://inai.de/files/xtables-addons XTABLES_ADDONS_DEPENDENCIES = iptables linux host-pkgconf XTABLES_ADDONS_LICENSE = GPL-2.0+
@@ -33,10 +33,14 @@ endef XTABLES_ADDONS_POST_INSTALL_TARGET_HOOKS += XTABLES_ADDONS_REMOVE_GEOIP_HELPERS define XTABLES_ADDONS_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_INET) + $(call KCONFIG_ENABLE_OPT,CONFIG_NET) $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED) + $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_STRING) $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK) $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK) $(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT) + $(call KCONFIG_ENABLE_OPT,CONFIG_XFRM_USER) endef $(eval $(kernel-module))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 33 lines · Bernd Kuhls
This package does not need the kernel-module infra because the kernel module is build by autoconf but the MIPS fix from buildroot commit
1d8d9e8d6cd824b2a43a0b92d71cfb25a3f9300ais not added to _LINUX_CONFIG_ FIXUPS causing a build error with this defconfig:BR2_mips64el=y
#BR2_MIPS_SOFT_FLOATis not set BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_STABLE=y BR2_PER_PACKAGE_DIRECTORIES=y
BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.156" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_XTABLES_ADDONS=y
#BR2_TARGET_ROOTFS_TARis not set BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=yMODPOST
/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/Module.symvers
ERROR: modpost: "memcmp" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/compat_xtables.ko] undefined!
ERROR: modpost: "register_pernet_subsys" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "_printk" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "nf_register_sockopt" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "unregister_pernet_subsys" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "xt_register_target" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "nf_unregister_sockopt" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "kfree" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "free_pages" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
ERROR: modpost: "xt_unregister_target" [/home/buildroot/buildroot/output/build/xtables-addons-3.24/extensions/ACCOUNT/xt_ACCOUNT.ko] undefined!
WARNING: modpost: suppressed 342 unresolved symbol warnings because there were too many)
Quoted 1 line
To fix the problem we add the kernel-module infra to the package.
Can you explain a bit more how this works? Does this mean that we will be building the modules twice, once through the kernel-module infra, and once through the autotools build system?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot