Skip to content
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

test: set safe.directory for git repo in apache container #13920

Merged
merged 2 commits into from
May 16, 2024

Conversation

weihanglo
Copy link
Member

@weihanglo weihanglo commented May 16, 2024

What does this PR try to resolve?

Failure in container tests due to a new version of git package in Alpine Linux Package repository.

See also #13913 (comment)

How should we test and review this PR?

Alpine Linux Package repository 3.19 just bumped git package to 2.43.4 from 2.43.0.
The docker image httpd:2.4-alpine we use in container tests failed due to the git version bump.
The httpd log shown that

240.10.0.1 - - [16/May/2024:03:52:36 +0000] "GET /repos/bar.git/info/refs?service=git-upload-pack HTTP/1.1" 500 -
[16/May/2024:03:52:36 +0000] 240.10.0.1 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /repos/bar.git/info/refs?service=git-upload-pack HTTP/1.1" -
fatal: detected dubious ownership in repository at '/repos/bar.git'
To add an exception for this directory, call:

        git config --global --add safe.directory /repos/bar.git

git/git@f4aa8c8 is likely the commit causing problems.

So I ended up adding git config --system --add safe.directory '*' to the Dockerfile of apache container.
Note that we need --system instead of --global because httpd are running under the other user www-data, not root.

@rustbot
Copy link
Collaborator

rustbot commented May 16, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 16, 2024
@weihanglo weihanglo changed the title test: add * to git safe.directory for all container tests test: set safe.directory for git repo in apache container May 16, 2024
@ehuss
Copy link
Contributor

ehuss commented May 16, 2024

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented May 16, 2024

📌 Commit 2fd4b44 has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 16, 2024
@bors
Copy link
Contributor

bors commented May 16, 2024

⌛ Testing commit 2fd4b44 with merge 8d68ed4...

@bors
Copy link
Contributor

bors commented May 16, 2024

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 8d68ed4 to master...

@bors bors merged commit 8d68ed4 into rust-lang:master May 16, 2024
21 checks passed
@weihanglo weihanglo deleted the git-safe-directory branch May 16, 2024 14:30
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2024
Update cargo

6 commits in 4de0094ac78743d2c8ff682489e35c8a7cafe8e4..0de7f2ec6c39d68022e6b97a39559d2f4dbf3930
2024-05-09 16:09:22 +0000 to 2024-05-17 16:54:54 +0000
- Add special `check-cfg` lint config for the `unexpected_cfgs` lint (rust-lang/cargo#13913)
- refactor: more comments and variable rename (rust-lang/cargo#13924)
- test: set safe.directory for git repo in apache container (rust-lang/cargo#13920)
- refactor: misc refactors for `ops::resolve` (rust-lang/cargo#13917)
- Preserve file permissions on unix during `write_atomic` (rust-lang/cargo#13898)
- Update benchmark formatting for new nightly (rust-lang/cargo#13901)

r? ghost
@rustbot rustbot added this to the 1.80.0 milestone May 18, 2024
bors added a commit that referenced this pull request May 22, 2024
[beta-1.79] fix(toml): Don't warn on lints.rust.unexpected_cfgs.check-cfg

Beta backports:
- #13913 (sort of): removes just the lint warning (in a different way to be minimal) so we reduce warning noise for people using this key on nightly

In order to make CI pass, the following PRs are also cherry-picked:
- #13865
- #13834 (only `time` due to rust-lang/rust#125319)
- #13901
- #13931
- #13920
- #13890
- disable link check (not a cherry pick)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants