nerdctl: use -modcacherw to avoid do_rm_work failure
PATCH 1/1 nerdctl: use -modcacherw to avoid do_rm_work failure
From: Chen Qi <[email protected]>
When rm_work is enabled, building nerdctl fails because do_rm_work fails to remove the contents under pkg/mod/ as they are readonly. Use '-modcacherw' to fix this issue.
--- recipes-containers/nerdctl/nerdctl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/nerdctl/nerdctl_git.bb +1 -1
@@ -78,7 +78,7 @@ do_compile() { export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" # -trimpath removes build paths from the binary (required for reproducible builds) - oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath" binaries + oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" GO_BUILD_FLAGS="-trimpath -modcacherw" binaries } do_install() {
Signature · 1 line
2.34.1
Quoted 6 lines · Chen Qi via lists.yoctoproject.org
From: Chen Qi <[email protected]>
When
rm_workis enabled, building nerdctl fails becausedo_rm_workfails to remove the contents under pkg/mod/ as they are readonly. Use '-modcacherw' to fix this issue.
I'm going a different way to fix this.
I've avoided using modcacherw so far, and would like to continue as having it on can mask some issues.
I have permissions fixups, they should be firing for this, and I'm sorting that out now as I work through some package updates.
Bruce
Quoted 38 lines
Signed-off-by Chen Qi <[email protected]>--- recipes-containers/nerdctl/nerdctl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-containers/nerdctl/nerdctl_git.bb +0
-1@@ -78,7 +78,7 @@ do_compile() { export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" # -trimpath removes build paths from the binary (required for reproducible builds) - oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}"GO_BUILD_FLAGS="-trimpath" binaries
+oe_runmakeGO=${GO} BUILDTAGS="${BUILDTAGS}"
GO_BUILD_FLAGS="-trimpath -modcacherw" binaries
}
do_install(){
--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9554):
https://lists.yoctoproject.org/g/meta-virtualization/message/9554
Mute This Topic: https://lists.yoctoproject.org/mt/117611093/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
In message: Re: [meta-virtualization][PATCH] nerdctl: use -modcacherw to avoid do_rm_work failure
Quoted 10 lines · on 04/02/2026 Bruce Ashfield wrote:
Quoted 6 lines · Chen Qi via lists.yoctoproject.org
From: Chen Qi <[email protected]>
When
rm_workis enabled, building nerdctl fails becausedo_rm_workfails to remove the contents under pkg/mod/ as they are readonly. Use '-modcacherw' to fix this issue.
Quoted 7 lines
I'm going a different way to fix this.
I've avoided using modcacherw so far, and would like to continue as having it on can mask some issues.
I have permissions fixups, they should be firing for this, and I'm sorting that out now as I work through some package updates.
I moved where the permissions fixups fire, so they should now run after do_compile (which may change the permissions).
This means we don't need per-recipe fixes, and it covers all types of builds (directly invoked, makefiles, ones that don't inherit our variables etc).
Bruce
Quoted 47 lines
Bruce
Quoted 38 lines
Signed-off-by Chen Qi <[email protected]>--- recipes-containers/nerdctl/nerdctl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-containers/nerdctl/nerdctl_git.bb +0
-1@@ -78,7 +78,7 @@ do_compile() { export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" # -trimpath removes build paths from the binary (required for reproducible builds) - oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}"GO_BUILD_FLAGS="-trimpath" binaries
+oe_runmakeGO=${GO} BUILDTAGS="${BUILDTAGS}"
GO_BUILD_FLAGS="-trimpath -modcacherw" binaries
}
do_install(){
--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9554):
https://lists.yoctoproject.org/g/meta-virtualization/message/9554
Mute This Topic: https://lists.yoctoproject.org/mt/117611093/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Got it. Thanks Bruce.
Regards,
Qi
-----Original Message-----
From: Bruce Ashfield <[email protected]>
Sent: Tuesday, February 10, 2026 4:07 AM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [meta-virtualization][PATCH] nerdctl: use -modcacherw to avoid do_rm_work failure
Quoted 10 lines · In message: Re: [meta-virtualization][PATCH] nerdctl: use -modcacherw to avoid…
Quoted 6 lines · Chen Qi via lists.yoctoproject.org
From: Chen Qi <[email protected]>
When
rm_workis enabled, building nerdctl fails becausedo_rm_workfails to remove the contents under pkg/mod/ as they are readonly. Use '-modcacherw' to fix this issue.
Quoted 7 lines
I'm going a different way to fix this.
I've avoided using modcacherw so far, and would like to continue as having it on can mask some issues.
I have permissions fixups, they should be firing for this, and I'm sorting that out now as I work through some package updates.
I moved where the permissions fixups fire, so they should now run after do_compile (which may change the permissions).
This means we don't need per-recipe fixes, and it covers all types of builds (directly invoked, makefiles, ones that don't inherit our variables etc).
Bruce
Quoted 47 lines
Bruce
Quoted 26 lines
Signed-off-by Chen Qi <[email protected]>--- recipes-containers/nerdctl/nerdctl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-containers/nerdctl/nerdctl_git.bb +0
-1@@ -78,7 +78,7 @@ do_compile() { export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" # -trimpath removes build paths from the binary (required for reproducible builds) - oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}"GO_BUILD_FLAGS="-trimpath" binaries
+oe_runmakeGO=${GO} BUILDTAGS="${BUILDTAGS}"
GO_BUILD_FLAGS="-trimpath -modcacherw" binaries }
do_install(){
--
2.34.1Quoted 12 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9554):
https://lists.yoctoproject.org/g/meta-virtualization/message/9554
Mute This Topic: https://lists.yoctoproject.org/mt/117611093/1050810
Group Owner: [email protected] Unsubscribe:
https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=---
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II