Skip to content

Commit f389979

Browse files
committed
Add support for SELinux Systems.
* Gave the false trail that the file does not exist.
1 parent e757e74 commit f389979

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ $(1)
1313

1414
endef
1515

16+
# Make docker work when running on SELinux Enforcing Systems.
17+
ifeq ($(shell getenforce),Enforcing)
18+
USE_MOUNT_OPTION := :Z
19+
else
20+
USE_MOUNT_OPTION :=
21+
endif
22+
1623
# Generate all implementations
1724
.PHONY: gen-all
1825
gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-php gen-python gen-ruby
1926

2027
OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0
21-
PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
28+
PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD}$(USE_MOUNT_OPTION) -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
2229

2330
PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp
2431
PROTO_GEN_CSHARP_DIR ?= $(GENDIR)/csharp

0 commit comments

Comments
 (0)