-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GOCACHE in build.sh #116
Conversation
🤔 hmmm... CI fail is kinda related, I wonder if it is due to base not being rebuilt. |
@techknowlogick what do you mean by "base not being rebuilt"? |
@leventov the base docker image, however I've toggled it on to build fresh for this PR and it still fails in same way, so that sadly wasn't the issue. Now I am rather confused as in theory that directory should be writeable, I wonder if it fails because it is created inside the docker container with root permissions and perhaps outside the docker container the CI runs with non-root user |
the problems seems to be that the $ ls -la . | grep .xgo
drwxr-xr-x 2 root root 4096 Jun 15 2020 .xgo-cache so it's not writable by this code: if err := os.MkdirAll(gocache, 0641); err != nil {
log.Fatalf("Failed to create gocache dir: %v.", err)
} I think |
xgo.go
Outdated
@@ -315,11 +315,17 @@ func compile(image string, config *ConfigFlags, flags *BuildFlags, folder string | |||
re := regexp.MustCompile("([A-Z]):") | |||
folder_w := filepath.ToSlash(re.ReplaceAllString(folder, "/$1")) | |||
depsCache_w := filepath.ToSlash(re.ReplaceAllString(depsCache, "/$1")) | |||
gocache := filepath.Join(depsCache, "gocache") | |||
if err := os.MkdirAll(gocache, 0641); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this 0641
intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an attempt to shrink down from 644 suggested above: #116 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to be a directory 0644 = rw-r--r-- which means you can't actually traverse the directory
This should be 0755 or 0750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna push up an update
@bearsh please feel free to recreate or fix this PR if you understand how to fix it. |
I think I've fixed this now. |
Refixed conflicts |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
I'll rebase this once #194 is in. |
Conflicts re-resolved |
Fixes #108