From d591708f12e685fd2dad12afbde9e519e46f776c Mon Sep 17 00:00:00 2001 From: John Harrison Date: Sun, 25 Dec 2016 20:56:37 -0500 Subject: [PATCH] Allow s390x non-root users to build fabric The uid of the user invoking the make commands is passed into docker containers during the build process. For s390x, if the uid does not exist within the docker container's /etc/passwd file, "git clone" commands fail. This patch resolves this issue and would then allow Jenkins Fabric verify jobs to successfully run on z. Change-Id: Ic66cebb863f27c8aa372872248135e0dafa1d78a Signed-off-by: John Harrison --- docker-env.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-env.mk b/docker-env.mk index 07941c1a4e5..772c02bf3ec 100644 --- a/docker-env.mk +++ b/docker-env.mk @@ -19,6 +19,12 @@ ifneq ($(shell uname),Darwin) DOCKER_RUN_FLAGS=--user=$(shell id -u) endif +ifeq ($(shell uname -m),s390x) +ifneq ($(shell id -u),0) +DOCKER_RUN_FLAGS+=-v /etc/passwd:/etc/passwd:ro +endif +endif + ifneq ($(http_proxy),) DOCKER_BUILD_FLAGS+=--build-arg http_proxy=$(http_proxy) DOCKER_RUN_FLAGS+=-e http_proxy=$(http_proxy) @@ -82,6 +88,3 @@ DOCKER_GO_LDFLAGS += -linkmode external -extldflags '-static -lpthread' # file to differentiate different tags to fix FAB-1145 # DUMMY = .dummy-$(DOCKER_TAG) - - -