trafficshaper: avoid recursive dependency - #30074
Conversation
|
geoip-shell and miniumnpd follows similar approach |
|
@luizluca what do you say about this approach? |
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
c707ba9"Merge branch 'master' into trafficshaper-fix-nftables-dependency" — this is a merge commit; OpenWrt PRs must not contain merge commits. Rebase onto currentmasterand force-push so the series is just the single61f2ebcchange commit. (Also flagged by the formality bot.)
The functional change itself looks correct: splitting into a default trafficshaper (nftables) variant plus a trafficshaper-iptables variant via Package/trafficshaper/Default + VARIANT/DEFAULT_VARIANT/CONFLICTS matches the established in-tree pattern (e.g. net/geoip-shell and net/miniupnpd), and the DEPENDS split reproduces the original conditional dependencies (nftables vs. iptables/ip6tables/iptables-mod-conntrack-extra). Depending on +nftables directly rather than the PACKAGE_nftables-json||PACKAGE_nftables-nojson conditional resolves the recursive Kconfig dependency. No further issues found in the diff.
Generated by Claude Code
|
There is merge commit, thus formality check is failing. This needs to be resolved first. |
|
@dhrm1k Please fix this PR, thanks. |
The conditional nftables dependency causes Kconfig to select PACKAGE_nftables-nojson from itself: symbol PACKAGE_nftables-nojson is selected by PACKAGE_nftables-nojson Split the firewall dependencies into nftables and iptables variants. Keep trafficshaper as the default nftables variant and provide trafficshaper-iptables for older systems. Fixes: 2e945de ("trafficshaper: add nftables firewall backend") Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
c707ba9 to
eeb3441
Compare
|
@dhrm1k , it was my mistake. I might have clicked the update button (with merge) while scrolling down in a touch screen device. Sorry. I rebased now to get rid of it. |
|
should we merge it now? |
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit; no new issues found.
The rebase resolved the merge-commit finding from my previous review — the series is now just the single eeb3441, and FormalityCheck / Git & Commits is green. The net/trafficshaper/Makefile diff is byte-identical to what I reviewed at c707ba9, and the commit message matches the change (the Fixes: 2e945de232bd ("trafficshaper: add nftables firewall backend") trailer resolves correctly).
Re-confirmed a few points against in-tree references while re-checking the final state:
- The
Package/trafficshaper/Default+PROVIDES/VARIANT/DEFAULT_VARIANT/CONFLICTSlayout matchesnet/geoip-shell/Makefile:18-42almost line for line, including the plain-named default variant plus a-iptablesvariant carryingCONFLICTS. PROVIDES:=trafficshaperin theDefaultblock is inherited byPackage/trafficshaperitself, but that self-provide is filtered out bySanitizeProvides/FormatProvidesin package-pack.mk:156-158, so it is a no-op rather than the redundant self-provide apk objects to. It is meaningful ontrafficshaper-iptables, which is what makes the two mutually exclusive.- Sharing one install recipe between the variants is safe because the init script selects its backend at runtime via
command -v nftat trafficshaper.init:68, so the split only changes which userspace packages get pulled in. PKG_RELEASE4 → 5 is correct for a dependency/packaging-only change with noPKG_VERSIONbump.
Nothing blocking from my side.
Generated by Claude Code
| $(call Package/trafficshaper/Default) | ||
| TITLE+= (nftables) | ||
| DEPENDS+= +nftables | ||
| VARIANT:=nftables |
There was a problem hiding this comment.
I'm not sure VARIANT works here as we don't have a build step. Anyway, it is, at most, innocuous.
|
This works for me,thanks @dhrm1k |
|
LGTM |
|
Thank you! This removes the make menuconfig
WARNING: Makefile 'package/feeds/video/sdl3/Makefile' has a build dependency on 'libwayland', which does not exist
-tmp/.config-package.in:106766:error: recursive dependency detected!
-tmp/.config-package.in:106766: symbol PACKAGE_nftables-nojson is selected by PACKAGE_nftables-nojson
-For a resolution refer to Documentation/kbuild/kconfig-language.rst
-subsection "Kconfig recursive dependency limitations"Any advice or fix for the remaining |
Follow-up to #29830 and the discussion after it was merged.
The conditional nftables dependency causes a recursive Kconfig dependency when
it resolves to
nftables-nojson.Split it into nftables and iptables variants instead.
Package Details
Maintainer: Luiz Angelo Daros de Luca luizluca@gmail.com (@luizluca)
Description:
Both install the same init script and config. The iptables backend stays
available for older systems, while the normal package does not pull the
iptables userspace packages into nftables installations.
Run Testing Details
I selected both variants as modules and ran
make defconfig. The recursivedependency is gone and both APKs build.
I also checked the generated dependencies. For the firewall backend, the normal
package only pulls
nftables. The iptables variant pullsiptables,ip6tables, andiptables-mod-conntrack-extra.Also checked with:
Formalities
If your PR contains a patch:
Not applicable. This PR does not add or modify an upstream source patch.