External BR overriding upstream packages
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Andy, ALL
Definitely an interesting idea.
Quoted 3 lines · Andrew Barnes
External BR projects can curate their own packages, but they can't easily modify a package if it already exists upstream.
I use a lot of overlays for existing Buildroot packages. Things like checking dependencies, deleting unnecessary files or modifying content in the target root filesystem are mostly done from hooks defined in these overlays.
Quoted 5 lines
Ideally such modifications should be made to buildroots package and upstreamed.
but if the modification is not to be accepted upstream, then we need another way.
Quoted 9 lines
Real examples for just one project i'm working on:
1. downgrade libinput version (Touch screen doesn't work with later versions, pending investigation)
2. mesa3d - enable legacy api for wpewebkit/cog (wpewebkit will be adopting the new mesa3d api soon)
3. odd fix for getting QT6 to compile (raised already in mailing list, could be an upstream patch)
4. complete instrumentation of wpewebkit options (unsure if is worth upstreaming, will discuss it later)
5. I am currently confronted with a package requiring mbedtls-4.
Quoted 9 lines
All these changes can be managed as patches that are applied ontop of BR, once the changes stablise that can work too.
However, in an IRC discussion, I suggested it could be that BR allows duplicate packages, and uses the version from the external project instead of the internal one.
here is a patch to do that:
Ideally, only _complete_ external packages should be filtered, something like this:
Makefile ifneq ($(PACKAGE_OVERRIDE_FILE),) · line 535
Quoted 9 lines
Makefile +0
-1@@ -532,7 +532,11 @@ ifneq ($(PACKAGE_OVERRIDE_FILE),) -include $(PACKAGE_OVERRIDE_FILE) endif -include $(sort $(wildcard package/*/*.mk))
+define _is_complete
+ $(shell grep -q '\$$(eval \$$([a-z]*-package))' $(1) && echo $(1))
+endef
Makefile ifneq ($(PACKAGE_OVERRIDE_FILE),) · line 536
Quoted 2 lines
Makefile +1
-0+EXTERNAL_PACKAGE_MKS = $(foreach dir,$(BR2_EXTERNAL_DIRS),$(wildcard $(dir)/package/*/*.mk))
+COMPLETE_PACKAGE_MKS = $(foreach file,$(EXTERNAL_PACKAGE_MKS),$(call _is_complete,$(file)))
Quoted 11 lines
Makefile +4
-0+EXTERNAL_PROVIDED_PACKAGES = $(sort $(notdir $(patsubst %/,%,$(dir $(COMPLETE_PACKAGE_MKS))))) +BUILTIN_PACKAGE_MKS = $(filter-out $(addprefix package/,$(addsuffix /%,$(EXTERNAL_PROVIDED_PACKAGES))),$(sort $(wildcard package/*/*.mk))) + +include $(BUILTIN_PACKAGE_MKS)include
boot/common.mk
includelinux/linux.mk
Quoted 6 lines
Happy to turn this into a proper patch email, I haven't done that this time because I think it's more for interest than a serious suggestion.
Kind regards,
Andy
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot