-
Notifications
You must be signed in to change notification settings - Fork 13.3k
When running CI locally with src/ci/docker/run.sh bootstrap can't access git history, requires a local LLVM build #118930
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
Comments
That script should set the uid of the processes inside the container to match what you use outside of the container and thus who owns the source repo: Lines 238 to 245 in 9d49eb7
Podman in docker version ? And can you run id outside and inside the container?
|
I am not using Podman |
Outside the container:
After
|
I assume this is related with your docker privileges (the user group assigned on docker). Can't reproduce this on my side. |
That seems reasonable? What should that be instead? |
#119165 should be able to handle this |
That's very nice of you, but if I have a scuffed Docker setup on my dev machine I'd like to know in what way it's scuffed if you don't mind 😅 |
By default, docker runs under root mode, and I believe this is the main issue here. On the other hand, podman runs in rootless mode by default: ubuntu@1b5e08672118:/checkout/obj$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu) I was able to reproduce the problem by running podman under root privileges. I believe the problem here is more related to the nature of docker rather than an issue with your docker setup. |
The snippet I mentioned in #118930 (comment) should ensure that the programs inside the container run as the same user as the one with which |
And when the user is root (e.g., running the script with root user), you get |
Rollup merge of rust-lang#119165 - onur-ozkan:update-container-entrypoint, r=Kobzol improve container runner script First commit fixes rust-lang#118930 Second commit is mostly for development purposes. In read-only mode submodules cannot be initialized due to access limitations (see the log below), which means that tools cannot be built. ```sh Updating submodule src/tools/cargo error: could not lock config file .git/config: Read-only file system error: could not lock config file .git/config: Read-only file system fatal: Failed to register url for submodule path 'src/tools/cargo' error: could not lock config file .git/config: Read-only file system error: could not lock config file .git/config: Read-only file system fatal: Failed to register url for submodule path 'src/tools/cargo' Build completed unsuccessfully in 0:00:00 ```
I have this totally normal config:
Then I want to run
Then inside the container,
Bootstrap is compiled, but then emits this:
My repository history is not too shallow. The only way to use the CI scripts seems to be to set
download-ci-llvm = false
.The reason download-ci-llvm doesn't work seems to be the ownership of the mount:
So maybe this is an easy fix? Can we just run that somewhere? It seems to work, I'm just not sure where it would be run.
The text was updated successfully, but these errors were encountered: