@@ -5,6 +5,14 @@ GOPATH_GENDIR := $(GOPATH_DIR)/$(GENDIR)
5
5
# Find all .proto files.
6
6
PROTO_FILES := $(wildcard opentelemetry/proto/* /* /* .proto opentelemetry/proto/* /* /* /* .proto)
7
7
8
+ # Make docker work when running on SELinux Enforcing Systems.
9
+ # https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
10
+ ifeq ($(shell getenforce) ,Enforcing)
11
+ USE_MOUNT_OPTION := :z
12
+ else
13
+ USE_MOUNT_OPTION :=
14
+ endif
15
+
8
16
# Function to execute a command. Note the empty line before endef to make sure each command
9
17
# gets executed separately instead of concatenated with previous one.
10
18
# Accepts command to execute as first parameter.
@@ -23,8 +31,8 @@ gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-
23
31
OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0
24
32
BUF_DOCKER ?= bufbuild/buf:1.7.0
25
33
26
- PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
27
- BUF := docker run --rm -v "${PWD}:/workspace" -w /workspace ${BUF_DOCKER}
34
+ PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD}$( USE_MOUNT_OPTION ) -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
35
+ BUF := docker run --rm -v "${PWD}:/workspace${USE_MOUNT_OPTION} " -w /workspace ${BUF_DOCKER}
28
36
# When checking for protobuf breaking changes, check against the latest release tag
29
37
LAST_RELEASE_TAG := $(shell git tag --sort=committerdate | tail -1)
30
38
# Options are described in https://docs.buf.build/breaking/usage#git
@@ -150,7 +158,7 @@ gen-ruby:
150
158
$(PROTOC ) --ruby_out=./$(PROTO_GEN_RUBY_DIR ) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR ) opentelemetry/proto/collector/trace/v1/trace_service.proto
151
159
$(PROTOC ) --ruby_out=./$(PROTO_GEN_RUBY_DIR ) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR ) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
152
160
$(PROTOC ) --ruby_out=./$(PROTO_GEN_RUBY_DIR ) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR ) opentelemetry/proto/collector/logs/v1/logs_service.proto
153
-
161
+
154
162
.PHONY : breaking-change
155
163
breaking-change :
156
164
$(BUF ) breaking --against $(BUF_AGAINST ) $(BUF_FLAGS )
0 commit comments