-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)type: bug
Description
Description of the problem:
Bazel checked out git repositories lose executable permissions when running under root.
Google Cloud Container Builder assumes the container runs under root, causes our repository is not buildable.
If possible, provide a minimal example to reproduce the problem:
In a Ubuntu 16.04 VM:
sudo su -
git clone https://github.com/istio/proxy /workspace
cd /workspace
bazel build //...
Environment info
-
Operating System:
Ubuntu 16.04 -
Bazel version (output of
bazel info release):
release 0.5.4
Have you found anything relevant by searching the web?
I believe this is the relevant bug in jgit:
https://www.eclipse.org/forums/index.php/t/1078227/
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The output of the repro step above is:
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: com_github_golang_protobuf: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: com_github_golang_glog: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: org_golang_google_grpc: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: org_golang_x_net: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: com_github_gogo_protobuf: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/build_defs/pkg/pkg.bzl:196:9: pkg_tar: renaming non-dict `files` attribute to `srcs`
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/build_defs/pkg/pkg.bzl:196:9: pkg_tar: renaming non-dict `files` attribute to `srcs`
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/build_defs/pkg/pkg.bzl:196:9: pkg_tar: renaming non-dict `files` attribute to `srcs`
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy/bazel/repositories.bzl:18:5: Fetching external dependencies...
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy/bazel/repositories.bzl:24:5:
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy/bazel/repositories.bzl:25:5: java.io.IOException: Cannot run program "/root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy_deps/./repositories.sh" (in directory "/root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy_deps"): error=13, Permission denied
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy/bazel/repositories.bzl:26:5: External dep build exited with return code: 256
WARNING: /root/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/envoy/bazel/repositories.bzl:28:9: External dependency build failed, check above log for errors and ensure all prerequisites at https://github.com/envoyproxy/envoy/blob/master/bazel/README.md#quick-start-bazel-build-for-developers are met.
ERROR: error loading package 'src/envoy/mixer': Encountered error while reading extension file 'protobuf.bzl': no such package '@protobuf_bzl//': no such package '@envoy_deps//thirdparty/protobuf': External dep build failed
ERROR: error loading package 'src/envoy/mixer': Encountered error while reading extension file 'protobuf.bzl': no such package '@protobuf_bzl//': no such package '@envoy_deps//thirdparty/protobuf': External dep build failed
INFO: Elapsed time: 0.184s
FAILED: Build did NOT complete successfully (3 packages loaded)
currently loading: src/envoy/mixer ... (2 packages)
The build rule
https://github.com/envoyproxy/envoy/blob/master/bazel/repositories.bzl#L19
tries to run repositories.sh in the repo, but it doesn't have executable permission when envoy repo checked out as root.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)type: bug