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
[C++] C++ build sometimes changes .git
ownership
#37767
Comments
@assignUser @kou Do you have an idea where it might come from? |
IIRC this is due to the docker build running with root user... e.g. we have to sudo/chown outputfiles to bundle them in r-binary-packages. Why it would change something in .git I am not sure... |
Yes, but this doesn't answer the question why. This seems to happen specifically during the CMake phase (either setup or build, I'm not sure). |
Hm probably externalProject in thirdpartytoolchain? That would be cached until you clean the build tree. |
As I said, this happens specifically during the C++ |
Interesting. We have two codes that call arrow/cpp/cmake_modules/DefineOptions.cmake Lines 743 to 755 in 25fa89d
I tried |
That works, thank you. |
We run "git describe --tag --dirty" implicitly in cpp/cmake_modules/DefineOptions.cmake. If we use "--dirty", .git/index's owner may be changed. Because "git describe" touches .git/index for "--dirty". We can avoid changing .git/index's owner by not using "--dirty".
### Rationale for this change We run "git describe --tag --dirty" implicitly in cpp/cmake_modules/DefineOptions.cmake. If we use "--dirty", .git/index's owner may be changed. Because "git describe" touches .git/index for "--dirty". We can avoid changing .git/index's owner by not using "--dirty". ### What changes are included in this PR? Remove "--dirty". ### Are these changes tested? Yes. I used "strace git describe ...". ### Are there any user-facing changes? No. * Closes: #37767 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
### Rationale for this change We run "git describe --tag --dirty" implicitly in cpp/cmake_modules/DefineOptions.cmake. If we use "--dirty", .git/index's owner may be changed. Because "git describe" touches .git/index for "--dirty". We can avoid changing .git/index's owner by not using "--dirty". ### What changes are included in this PR? Remove "--dirty". ### Are these changes tested? Yes. I used "strace git describe ...". ### Are there any user-facing changes? No. * Closes: apache#37767 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
### Rationale for this change We run "git describe --tag --dirty" implicitly in cpp/cmake_modules/DefineOptions.cmake. If we use "--dirty", .git/index's owner may be changed. Because "git describe" touches .git/index for "--dirty". We can avoid changing .git/index's owner by not using "--dirty". ### What changes are included in this PR? Remove "--dirty". ### Are these changes tested? Yes. I used "strace git describe ...". ### Are there any user-facing changes? No. * Closes: apache#37767 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
### Rationale for this change We run "git describe --tag --dirty" implicitly in cpp/cmake_modules/DefineOptions.cmake. If we use "--dirty", .git/index's owner may be changed. Because "git describe" touches .git/index for "--dirty". We can avoid changing .git/index's owner by not using "--dirty". ### What changes are included in this PR? Remove "--dirty". ### Are these changes tested? Yes. I used "strace git describe ...". ### Are there any user-facing changes? No. * Closes: apache#37767 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Describe the bug, including details regarding any error messages, version, and platform.
When I run the
conda-integration
docker build, the C++ build step sometimes changes ownership of files in the.git
directory (which later breaksgit
commands until I fix it withchown
):It also doesn't happen everytime...
Component(s)
C++
The text was updated successfully, but these errors were encountered: