diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-12-09 01:50:29 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-12-08 20:57:44 -0500 |
| commit | 2bee001d6ddcafba7d384ac7ee241b16a1449681 (patch) | |
| tree | b5b189854614bc810240af43e66f3c85b48b8e2c /scripts/data | |
| parent | 2385a741401386d129a0cd4dc4c332d3d54af4b3 (diff) | |
| download | meta-virtualization-2bee001d6ddcafba7d384ac7ee241b16a1449681.tar.gz | |
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'scripts/data')
| -rw-r--r-- | scripts/data/hybrid-config.json | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ | |||
| 1 | { | ||
| 2 | "_comment": "Configuration for oe-go-mod-fetcher-hybrid.py recommendations", | ||
| 3 | "_comment2": "Prefixes listed here are suggested for git:// (VCS provenance) vs gomod:// (fast proxy)", | ||
| 4 | |||
| 5 | "vcs_priority_prefixes": [ | ||
| 6 | "github.com/containerd", | ||
| 7 | "github.com/rancher", | ||
| 8 | "github.com/k3s-io", | ||
| 9 | "k8s.io", | ||
| 10 | "sigs.k8s.io" | ||
| 11 | ], | ||
| 12 | |||
| 13 | "_vcs_priority_comment": "These prefixes are suggested to keep as git:// for VCS provenance and auditability", | ||
| 14 | |||
| 15 | "size_threshold_bytes": 1048576, | ||
| 16 | "_size_threshold_comment": "Modules larger than this (1MB) are suggested for gomod:// conversion", | ||
| 17 | |||
| 18 | "default_git_prefixes": [ | ||
| 19 | "github.com/containerd", | ||
| 20 | "k8s.io", | ||
| 21 | "sigs.k8s.io" | ||
| 22 | ], | ||
| 23 | "_default_git_comment": "Default --git prefixes suggested when no VCS priority matches are found" | ||
| 24 | } | ||
