Summary: | app-emulation/runc-1.0.0_rc6_p20181203-r1 : failed to initialize build cache at /.../go-build: mkdir /.../cache: permission denied | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mrueg, parona, philippe.marti, speedjack95 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 567192 | ||
Attachments: |
emerge-info.txt
app-emulation:runc-1.0.0_rc6_p20181203-r1:20190301-015852.log emerge-history.txt environment etc.portage.tbz2 temp.tbz2 |
Description
Toralf Förster
2019-03-01 07:28:58 UTC
Created attachment 567134 [details]
emerge-info.txt
Created attachment 567136 [details]
app-emulation:runc-1.0.0_rc6_p20181203-r1:20190301-015852.log
Created attachment 567138 [details]
emerge-history.txt
Created attachment 567140 [details]
environment
Created attachment 567142 [details]
etc.portage.tbz2
Created attachment 567144 [details]
temp.tbz2
Bug is still present in app-emulation/runc-1.0.0_rc10, but it only manifests if I become root through 'su'. In this case, it looks like it is trying to use my users tmp directory for the cache. go build -buildmode=pie -ldflags "-X main.gitCommit=dc9208a3303feef5b3839f4323d9beb36df0a9dd -X main.version=1.0.0-rc10 " -tags "ambient seccomp" -o runc . failed to initialize build cache at /tmp/philippe/.cache/go-build: mkdir /tmp/philippe/.cache/go-build: permission denied When logged in as root, the problem disappears and I could successfully emerge runc. I get a similar issue in app-emulation/containerd-1.2.13 when 'su' is used. I think the reason for why the tinderbox failed is because it has XDG_CACHE_HOME set to "/root/cache" which is read by go to determine the value of GOCACHE, leading to go to use an illegal path. https://github.com/golang/go/blob/47fb1fbd554a76dc961bfdedaa85efcb68646ed1/src/cmd/go/internal/cache/default.go#L60 https://github.com/golang/go/blob/master/src/os/file.go#L406 This error could be completely avoided by explicitly setting a valid GOCACHE path in golang-base eclass. May it be closed in 1.0.0 version? |