From 2bee001d6ddcafba7d384ac7ee241b16a1449681 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 9 Dec 2025 01:50:29 +0000 Subject: go-mod: introduce hybrid mode Introduce the ability to have hybrid gomod:// and git:// repositories. This allows SRCREV bumping when fixing bugs, and using the git archiver for some, all or none of the modules in a go mod project. Example: k3s Hybrid Conversion 1. Ensure VCS mode works first bitbake k3s 2. Get recommendations bitbake k3s -c go_mod_recommend 3. Convert with recommended prefixes (keep containerd, k8s.io as git://) python3 ./meta-virtualization/scripts/oe-go-mod-fetcher-hybrid.py \ --recipedir ./meta-virtualization/recipes-containers/k3s/ \ --git "github.com/containerd,k8s.io,sigs.k8s.io,github.com/rancher" Signed-off-by: Bruce Ashfield --- scripts/data/hybrid-config.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/data/hybrid-config.json (limited to 'scripts/data') diff --git a/scripts/data/hybrid-config.json b/scripts/data/hybrid-config.json new file mode 100644 index 00000000..751e566f --- /dev/null +++ b/scripts/data/hybrid-config.json @@ -0,0 +1,24 @@ +{ + "_comment": "Configuration for oe-go-mod-fetcher-hybrid.py recommendations", + "_comment2": "Prefixes listed here are suggested for git:// (VCS provenance) vs gomod:// (fast proxy)", + + "vcs_priority_prefixes": [ + "github.com/containerd", + "github.com/rancher", + "github.com/k3s-io", + "k8s.io", + "sigs.k8s.io" + ], + + "_vcs_priority_comment": "These prefixes are suggested to keep as git:// for VCS provenance and auditability", + + "size_threshold_bytes": 1048576, + "_size_threshold_comment": "Modules larger than this (1MB) are suggested for gomod:// conversion", + + "default_git_prefixes": [ + "github.com/containerd", + "k8s.io", + "sigs.k8s.io" + ], + "_default_git_comment": "Default --git prefixes suggested when no VCS priority matches are found" +} -- cgit v1.2.3-54-g00ecf