From patchwork Fri Jun 8 12:32:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 137978 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp839416lji; Fri, 8 Jun 2018 05:58:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1Bip4nvQbwuuttMCnxgKdKHJToBzw/BHizP+k9IcgzXA99cm9O47ujhDujhovC4Ub7c7T X-Received: by 2002:ac8:fd9:: with SMTP id f25-v6mr5797986qtk.181.1528462693976; Fri, 08 Jun 2018 05:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528462693; cv=none; d=google.com; s=arc-20160816; b=tcaJwE4fBPf8ui69vyR7RtVEuW41WD2vtqjztYoDaQrNL2QKJPJVUBbuYs6o7iGU6N 9WhgwDPDGwSgcfVx12n4OEx3bGbznluspH3vVdKN2WRqieqhwRWpG9VqnPHfdo7fyCYg x52ucZIzGtOtpwHBfcmUKo93aW4803I4AESQdA3/ePIUYRuMSjf2K9c1+O3Ny6zO6uPp vIPfNNe5BC2e0FAzPhfAsGn7mQ72pkbFbM4+8igjeNqN9RtIx2rTLCW8e6Cv1eAD9FrL RuDCteZYbyprtoHTvCCa2AlgzJEROPQYD90oZm5h7kghBAswXa3E1/NAgYa9ElPIRdFi 9ZhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=ygZm1uOYWejW863uTf20CSrqAvtRi+fq0rbvjNYW9+Q=; b=yvjj6ANOMpPH62SY30rH6raBQcSEJ2ircAYdj9i/kW/cjTJPoDNejnhk0kG6jDrzTf ekgS9Py0VO/TFM42yuRY3jb5rLxxRgby45WMUJgaiFOoy2dnJVfzQWPbAZyr+rgic8ej 21kCws+80gaaYjBrf7htl/yeEML5n2CvS0PULAHkUHido+xnoHL29qT0uXczbO8dJ9BD zVDAb+1gvEbTG0ITe1BfFli17uv3OzUs2fOyuc+WrRkzY52oBb7Bf4M5rAP26DYq6LQx 0sARxxIGzl9LvWupNeV2jPY78yPIt+XW6LTJ7CqSmnTLfUhCvy3jn8mXSlSdpRHfwR6M BLTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=en3g8q04; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y7-v6si665207qth.349.2018.06.08.05.58.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 05:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=en3g8q04; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGy5-0005Mb-Dt for patch@linaro.org; Fri, 08 Jun 2018 08:58:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGZx-0001BK-Qi for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRGZw-0006Di-Vc for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:17 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:51032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRGZw-0006DA-OV for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:16 -0400 Received: by mail-wm0-x242.google.com with SMTP id e16-v6so3076099wmd.0 for ; Fri, 08 Jun 2018 05:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ygZm1uOYWejW863uTf20CSrqAvtRi+fq0rbvjNYW9+Q=; b=en3g8q04K63ftevKxYEsb8RGp6+FgDQlAdFxFz2IxwW2ruG8q2SFrs8HShho526IbQ +x54k3+2G5zAuNZL39w1CqqBr7eEqw9lnM+PrpT84kJg8UdYwiEYhfFu6j0ZjEwbYSuB dAxbIQe2GIxkQvB1AkkMT4EiCQ5vfqgSGzYUM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ygZm1uOYWejW863uTf20CSrqAvtRi+fq0rbvjNYW9+Q=; b=rfA1vFIWgE0xUR2CNTuzCf6tpmcunv0X8MKWU8iKjWzrC+baTviciyl4gsjMMk3gVt x6rLHe8nXqEDETNbhgXz6kPFcAgndFFnGPTnl/B9E2aWKekaF+MGA8IUuOSEYeff++Ci fL+T6iDU9g3Jlafi0U6dM8wBLsUH/1a6Ngn/Pyn7a5/3bdA0ddYO5CqvxvILu2+cMpxV V9gcpw1/RAmka9Al8wp9EA5F8c9TW907EIKvOXB6oht6u5SAksv0dGHCwyAip6dxm0mK NQXedvVNRFRHRtjneqpyu99+Y0D2STkLrhLXHxYfDx0bJfpYjtmlbtNyFhGRUHlwKTj2 6KLw== X-Gm-Message-State: APt69E2j3O0FQQkappCJ0vmEOXO0BSBsXGySn9M7oLcKl6wGIg8D7vRa zavJX5Qa/lm2FrHnmuhtYyo0oQ== X-Received: by 2002:a1c:4203:: with SMTP id p3-v6mr1595873wma.111.1528461195723; Fri, 08 Jun 2018 05:33:15 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m185-v6sm1844810wma.36.2018.06.08.05.33.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 05:33:13 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9EA963E0382; Fri, 8 Jun 2018 13:33:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 13:32:25 +0100 Message-Id: <20180608123307.24773-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608123307.24773-1-alex.bennee@linaro.org> References: <20180608123307.24773-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v6 07/49] docker: allow "cc" command to run in user context X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 59bce9f19a..37bfa98005 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -417,6 +417,8 @@ class CcCommand(SubCommand): help="The docker image in which to run cc") parser.add_argument("--cc", default="cc", help="The compiler executable to call") + parser.add_argument("--user", + help="The user-id to run under") parser.add_argument("--source-path", "-s", nargs="*", dest="paths", help="""Extra paths to (ro) mount into container for reading sources""") @@ -430,6 +432,8 @@ class CcCommand(SubCommand): if args.paths: for p in args.paths: cmd += ["-v", "%s:%s:ro,z" % (p, p)] + if args.user: + cmd += ["-u", args.user] cmd += [args.image, args.cc] cmd += argv return Docker().command("run", cmd, args.quiet)