<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/classes/go-mod-vcs.bbclass, branch master-next</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-03-26T17:55:14+00:00</updated>
<entry>
<title>go-mod-vcs.bbclass: handle pure hybrid mode gracefully</title>
<updated>2026-03-26T17:55:14+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-03-26T17:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=c5670da69b765c4c16bc663cbfb6777ae98f602f'/>
<id>urn:sha1:c5670da69b765c4c16bc663cbfb6777ae98f602f</id>
<content type='text'>
When a recipe uses only gomod:// fetches with no VCS (git://) modules,
GO_MODULE_CACHE_DATA is an empty list. Previously do_create_module_cache
would run with nothing to process and do_sync_go_files would fatal with
"No modules found in cache".

Detect the empty module list and return early with an informational
message in both tasks, allowing pure hybrid recipes (like yq) to
build without workarounds.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>go-mod-vcs: fix do_rm_work permission failure on module cache</title>
<updated>2026-02-09T05:07:01+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-09T05:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=ed5b33932e5f9ad8dc530a53fddfc865fc60d60c'/>
<id>urn:sha1:ed5b33932e5f9ad8dc530a53fddfc865fc60d60c</id>
<content type='text'>
go build creates read-only files in the module cache during
do_compile. The previous do_fix_go_mod_permissions task ran before
do_compile, so it could not catch these files, causing do_rm_work
to fail with permission errors.

Replace the standalone task with a do_compile postfunc that fixes
module cache permissions after compilation finishes. This covers
all go-mod-vcs recipes regardless of how they invoke go build.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>go-mod: introduce hybrid mode</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-09T01:50:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=2bee001d6ddcafba7d384ac7ee241b16a1449681'/>
<id>urn:sha1:2bee001d6ddcafba7d384ac7ee241b16a1449681</id>
<content type='text'>
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 &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>go-mod: make extracted files writeable</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-07T03:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=5760ab3c502fef3363b8aa76c71707e8ff1f5470'/>
<id>urn:sha1:5760ab3c502fef3363b8aa76c71707e8ff1f5470</id>
<content type='text'>
Make extracted files writable so BitBake can clean them later
Go's module cache is read-only by design, but this breaks rm -rf
and our subsquent task runs will fail.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>go-mod-vcs: declare cache defaults</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-07T02:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=aee553e9d9c32a58be7b37ccb7daa43b87c78b8d'/>
<id>urn:sha1:aee553e9d9c32a58be7b37ccb7daa43b87c78b8d</id>
<content type='text'>
There are variables which are common to all recipes, declare defaults
to make recipe integration simpler.

Also, when creating the cache the messages are normal about synthesis,
etc, so reduce them to bb.note.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>go-mod-vcs: missing go.mod is not a warning</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-06T18:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=d2044c0e7b8e43b3abbe4c536d3e90d0faaadecf'/>
<id>urn:sha1:d2044c0e7b8e43b3abbe4c536d3e90d0faaadecf</id>
<content type='text'>
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>discover: manage go.* files</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-05T19:33:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=df651f904ee91b3cf9face353af8219223442e6b'/>
<id>urn:sha1:df651f904ee91b3cf9face353af8219223442e6b</id>
<content type='text'>
The discovery repository can be in an incosistent state
after a build. By restoring the go.* files, we ensure a stable
start point.

Add automatic removal of go.sum files from git-fetched
dependencies in vcs_cache during do_create_module_cache.
This prevents checksum mismatch errors caused by stale
go.sum files in dependencies having different checksums
than the git-sourced modules.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>classes: add go-mod-vcs and go-mod-discovery for Go module builds</title>
<updated>2025-12-09T01:57:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2025-12-04T22:19:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=9f40ce9b277a677ad3cddd8bf1c1d15fbd035251'/>
<id>urn:sha1:9f40ce9b277a677ad3cddd8bf1c1d15fbd035251</id>
<content type='text'>
Add two new bbclass files that enable building Go applications using
git-based module resolution instead of network proxy fetches:

go-mod-vcs.bbclass:
  - Provides do_create_module_cache task to build GOMODCACHE from git sources
  - Implements pure Python h1: hash calculation with go-dirhash-native fallback
  - Creates properly structured module zip files and hash files
  - Handles module path transformations and case encoding

go-mod-discovery.bbclass:
  - Runs module discovery using the oe-go-mod-fetcher tool
  - Generates go-mod-git.inc and go-mod-cache.inc files
  - Supports bootstrap mode for initial recipe conversion

Together these classes enable fully offline, reproducible Go builds
by fetching module sources via git and constructing the module cache
during the build rather than relying on network access to module proxies.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
