Commit 850645b
committed
fix(platform): skip recursive chown in containers to avoid overlayfs exec race
PreserveOwnershipRecursive walks the freshly-extracted source tree and
chowns every file from root to the original sudo user. On overlayfs (k3s
Jenkins pods on Fedora CoreOS), each chown triggers a copy-up that can
race with a subsequent execve, making the kernel return ENOEXEC on a
perfectly valid '#!/bin/bash' script — observed as 'fork/exec
.../configure: exec format error' a few ms into the build step.
In containerised builds (YAP_IN_CONTAINER=1, baked into every yap image
by build/deploy/generate.sh) the runtime user already owns the workspace
end-to-end; the chown is pure overhead. Skip it there.1 parent 9fa41a1 commit 850645b
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
158 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
159 | 173 | | |
160 | 174 | | |
161 | 175 | | |
| |||
0 commit comments