From a2557b0b053639305f5958acdb7ddd90e01ae1dc Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 28 Sep 2018 12:58:57 -0500 Subject: [PATCH] Don't require sudo during build If we really want this, we could detect it in configure or something. But it was already pretty ugly, so let's ask users to belong to the docker group. --- build/makefile_base.mak | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 5a2154c5..a4b99524 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -50,12 +50,8 @@ endif export CC export CXX -# If set below, we're invoking some build steps in a container that requires sudo -- will test sudo and show a warning -# at build start. -USING_SUDO_CONTAINER := - # Selected container mode shell -DOCKER_SHELL_BASE = sudo docker run --rm --init -v $(HOME):$(HOME) -w $(CURDIR) -e HOME=$(HOME) \ +DOCKER_SHELL_BASE = docker run --rm --init -v $(HOME):$(HOME) -w $(CURDIR) -e HOME=$(HOME) \ -v /etc/passwd:/etc/passwd:ro -u $(shell id -u):$(shell id -g) -h $(shell hostname) \ -v /tmp:/tmp $(SELECT_DOCKER_IMAGE) /dev/init -sg -- /bin/bash @@ -64,14 +60,12 @@ DOCKER_SHELL_BASE = sudo docker run --rm --init -v $(HOME):$(HOME) -w $(CURDIR) ifeq ($(STEAMRT64_MODE),docker) SELECT_DOCKER_IMAGE := $(STEAMRT64_IMAGE) CONTAINER_SHELL64 := $(DOCKER_SHELL_BASE) - USING_SUDO_CONTAINER := 1 else ifneq ($(STEAMRT64_MODE),) foo := $(error Unrecognized STEAMRT64_MODE $(STEAMRT64_MODE)) endif ifeq ($(STEAMRT32_MODE),docker) SELECT_DOCKER_IMAGE := $(STEAMRT32_IMAGE) CONTAINER_SHELL32 := $(DOCKER_SHELL_BASE) - USING_SUDO_CONTAINER := 1 else ifneq ($(STEAMRT32_MODE),) foo := $(error Unrecognized STEAMRT32_MODE $(STEAMRT32_MODE)) endif @@ -93,16 +87,6 @@ ifndef CONTAINER_SHELL32 CONTAINER_SHELL32 := $(SHELL) endif -# Using a sudo container? Make sure we have sudo and show warning -ifeq ($(USING_SUDO_CONTAINER),1) -$(info :: NOTE: Some build steps will run in a container, which invokes sudo automatically) -$(info :: If building in parallel (-j) this can result in sudo prompts buried in the output) -$(info :: Testing sudo access now) -ifneq ($(shell sudo echo hi),hi) -$(error Failed to invoke sudo) -endif -endif - # Helper to test .PHONY: test-container test-container32 test-container64 test-container: test-container64 test-container32