openvswitch: fix intree tunnel recursive dependency

Remove PROVIDES from all OVS kernel packages. The provider-
alternation logic in scripts/package-metadata.pl generates
recursive Kconfig dependencies when kmod-openvswitch-intree
provides kmod-openvswitch, because userspace packages
(openvswitch, ovsd, ovn-host) that +depend on kmod-openvswitch
get cross-referenced against the intree provider via
PACKAGE_<provider> < PACKAGE_<requester> conditions.

Verified locally: make defconfig produces zero OVS-related
recursive dependency errors with PROVIDES removed entirely.
The previous selective approach (keeping PROVIDES only for
openvswitch-intree) did not resolve the userspace recursion.

Users must install kmod-openvswitch-intree explicitly instead
of relying on provider alternation.

Fixes: openwrt/openwrt#22664
Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joshua Klinesmith
2026-03-29 16:35:56 -04:00
committed by Florian Eckert
parent df1aacbfc7
commit 39c9a7bff9

View File

@@ -17,7 +17,7 @@ include ./openvswitch.mk
#
PKG_NAME:=openvswitch
PKG_VERSION:=$(ovs_version)
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
PKG_HASH:=e1b3fa472676626853f22d63f959e5ad061e1bf57e1bbd444d0ed88f947ef8b1
@@ -54,6 +54,12 @@ ovs_kmod_package_name=$(if $(filter openvswitch,$(1)),openvswitch,$(1))
ovs_kmod_is_intree=$(filter %-intree,$(1))
ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
# Do not use PROVIDES for any OVS kmod. The provider-alternation logic in
# scripts/package-metadata.pl generates recursive Kconfig dependencies when
# kmod-openvswitch-intree provides kmod-openvswitch, because userspace
# packages (openvswitch, ovsd, ovn-host) that +depend on kmod-openvswitch
# get cross-referenced against the intree provider via PACKAGE_<provider>
# < PACKAGE_<requester> conditions (#22664).
define OvsKmodPackageTemplate
ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
define KernelPackage/$(call ovs_kmod_package_name,$(1))
@@ -62,7 +68,6 @@ ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
SUBMENU:=Network Support
TITLE:=$(ovs_kmod_$(1)_title)
DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@IPV6 @DEVEL)
PROVIDES:=$(call ovs_kmod_package_provides,$(1))
KCONFIG:=$(ovs_kmod_$(1)_kconfig)
FILES:=$(ovs_kmod_$(1)_files)
AUTOLOAD:=$(call AutoProbe,$(foreach m,$(ovs_kmod_$(1)_files),$(notdir $(patsubst %.ko,%,$(basename $(m))))))