From patchwork Fri Jun 15 19:46:18 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: 138769 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1256910lji; Fri, 15 Jun 2018 12:59:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLkZAGmtf+QtG3b7LwqHXUNUDBFsGAuKVTAePSqhZO4HcETwr2bouLDHx/513oghVXa0Qfd X-Received: by 2002:ac8:3441:: with SMTP id v1-v6mr2816853qtb.315.1529092753899; Fri, 15 Jun 2018 12:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529092753; cv=none; d=google.com; s=arc-20160816; b=lKpMdnP1q2Q0q7tYEVk6S/6H/Yu/3LtCv9pBqrHKABmwrJd6dwnLfqi0nrDsGLK5Oi lme6zHFFaUeoHn541vFVaiQ36sWPGlNrzyN/CMosQOLnr7gJXaS5A656GX3nEeQYubOo UCbQYuzy2UujgAt5J1u7u4JVDn+qnitJrHx4DZKZxKYoRk8gYlahp0nQVwASyy8WsG7k nQRCVKAs+PzyAjRHd5Z7MMwn5wJG1SrLQnpHzvxDYiBGebCt5yZwUoJPMy0VG6/xRzMm O46hfw+MWK7jX9QieH7UUJb4jYwQKdeDv5NU9ii5y3PGJxgICRmaQHEGhoyyCj+wxJza YMug== 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=RSP5eqkQNwptuq4lPD33K39JzkY2J7sMdSmKB/i3gy0=; b=w26lDMIjuPoSjv1pSmoNxM5W+E39gFKp2qHPA+TWuOD0ij2QSEHCAmje1dWbDvjs05 TsFrmQZNS/wrfz3Er4138+NjwmnL6GS/GO+3epFKsHJPJSIXNZIbjgIRywzmyKHBT0PB LRupk1tk1YCBljCSUs5ip8iMomyYGlDQJ4QjyoKiOpxQNtMNhCIdTPov3z6nZuHJsrwa CrVWFTSFyuPINgFb3TsyRKY3MXzKwHB/aob+6oRHk7Ycv64Qoyjn88HR0hYY97GBxXRY /KITVqDzEl9eqYCgKn1noz2Daalkh+WBP8DKcm9jJpTZYqLOeWoXRN+5rk79O6D2k4v/ Lf3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=c3h4Y0dI; 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 r23-v6si1056694qtj.405.2018.06.15.12.59.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Jun 2018 12:59: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=c3h4Y0dI; 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]:49038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTusL-000414-D0 for patch@linaro.org; Fri, 15 Jun 2018 15:59:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTugl-0002WP-90 for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTugk-0005L8-ET for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:15 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:46490) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTugk-0005Jc-8Q for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:14 -0400 Received: by mail-wr0-x244.google.com with SMTP id v13-v6so10940429wrp.13 for ; Fri, 15 Jun 2018 12:47:14 -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=RSP5eqkQNwptuq4lPD33K39JzkY2J7sMdSmKB/i3gy0=; b=c3h4Y0dI1fi0oub6/PXMrmnOeEfUpWWsjzGf09sW5COR6b/0hYqb43HwWI/tkGYnEf KaBB7wTqSurWEBi3hKYlc9N3C5mIg36Fpl9gL1ZVsrkHXZAAJjX0HxU1vFq5eLekeydF KmXnj6ssXCNtVndo81TC1vW/ZfdVLFeLvA/g0= 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=RSP5eqkQNwptuq4lPD33K39JzkY2J7sMdSmKB/i3gy0=; b=PEaZ5T0r78QkvrbnOa5w00xwN8p5rRTeIK6ob+kzzPinqyUBiQ9GiMuD5zonkULeHc 6ksx0b8fKjD4ZMYNuFPGRGS0hIyMMgq4lpRlBrhOBgfh2DRGQoVlwa4Bt9jKRSt+G+ij 1lco44rs/7d19hRqouKDDSYvQoLD2CftzxXKVBSzaDuZ9oTxjhXih7eE7tx2fgTrCsaJ bCVuVq0/ichdY4GUGsUNWgvyXHK4s8mVGw6SkgDk/BbphkRipfx6hAt+IXQFZR+njgeJ hm70KPNe+2Ai3Tk6cQQiSRgjI2kEPsy5J6UVukVgl3xLJC4Tif4orTJsAGv4Nss6HggN +UCQ== X-Gm-Message-State: APt69E3dMiYm3XyqeniBmfx2utEHkJtTSsDxcGxnqdWeKjg8YVRxjfHn etTBqwiLknSWw01hU7S0lMtv9Q== X-Received: by 2002:adf:f712:: with SMTP id r18-v6mr2938355wrp.85.1529092033108; Fri, 15 Jun 2018 12:47:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g16-v6sm7172313wro.86.2018.06.15.12.47.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 12:47:10 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 040393E072F; Fri, 15 Jun 2018 20:47:06 +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, peter.maydell@linaro.org Date: Fri, 15 Jun 2018 20:46:18 +0100 Message-Id: <20180615194705.28019-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615194705.28019-1-alex.bennee@linaro.org> References: <20180615194705.28019-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:c0c::244 Subject: [Qemu-devel] [PATCH v7 07/54] 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 663dfcba4b..c83fd89985 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -418,6 +418,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""") @@ -431,6 +433,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)