From patchwork Tue Oct 26 10:22:16 2021 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: 516193 Delivered-To: patch@linaro.org Received: by 2002:ac0:c404:0:0:0:0:0 with SMTP id t4csp147405imj; Tue, 26 Oct 2021 03:36:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyhWwNeViJlYqPmtzAeTyUiaoVCwcgTbjxZFR8rHoaVJSfaE5yD6VxKuEKM/bcU6j3ws9k X-Received: by 2002:a05:6830:11ca:: with SMTP id v10mr18263303otq.188.1635244586230; Tue, 26 Oct 2021 03:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635244586; cv=none; d=google.com; s=arc-20160816; b=wGGKJlPbgrlyQHSZnMTQCr2mvejb/y9YPuZnu+pSlXv7MBfShRajbKZy4j4Kbh6asH Ch4oUbKZftCtzROk3UtvD9h9YQGkOUvui2h39xtZwqmmzfjBwfWKaxBFqlP6qcpO30dl bABtEVNYwAFmuJBXCUCafrT/Zp1QIoKiQ2j+NQ7zujj7wjCLETTIqkDu06Shc8rjJUhP 5Qd6HqHavC9n3P10gRsK/smd/ySGyG0o/Q9bTf2OUCzwAmEQpp6OObJSKecGBlezy/UT dB1c0+WeFj+KW2uk1W2QfekpBJV0psf47cJK/LKmxJATWOB9PJ38Au3v07wEqmmHtlCS S/5A== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+nzfSAkBBnW95G1HHY0jfzp30Kl0kRtuu1gHbOZwLl8=; b=hAj5Y/YOBuTol5NhHeQQANnSXyGN5A0yXawlZDo4G2zOYxnKFYVOnkFNFYxya9qc3d b9Se5imr/eoDJqkCKiXPvLONd/Sp7fGiVah7wDW7MAlOsTLc+UAsUMgMf7dbMAgjh3vp efkQ4roikCLGEghvMr66vggeCtDdzoHDDGDaaVW/8GTrJFVn2qAR3SY+Wz0iaNAlB6uc tl6V+dFGVJgSPvk5BBhuW83w1FEREXcVvJ43uBbrbpqgftJfc2KrE7c2WsMow/OvcNgK RJNtQBA2EeTdK3DJ+wTEVLD5E7eIAWmn3WHTlm7JfhPo8f3ohSKYyE5+q0TGXOsshnaj YglA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LsiI3iGn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id q2si9272112oiv.98.2021.10.26.03.36.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Oct 2021 03:36:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LsiI3iGn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:60130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfJof-0004UY-IG for patch@linaro.org; Tue, 26 Oct 2021 06:36:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfJbZ-0000x2-Os for qemu-devel@nongnu.org; Tue, 26 Oct 2021 06:22:53 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfJbX-0007R9-Up for qemu-devel@nongnu.org; Tue, 26 Oct 2021 06:22:53 -0400 Received: by mail-wr1-x42c.google.com with SMTP id o14so1004785wra.12 for ; Tue, 26 Oct 2021 03:22:51 -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=+nzfSAkBBnW95G1HHY0jfzp30Kl0kRtuu1gHbOZwLl8=; b=LsiI3iGnLoQmxDgb98ObsxOE52D4KcgVrmTaUzWCuho+OZiQII6FOMWKumju8VUsog yx/av0zwf8llGLsTLsErNzXhX+QVB9aSEdWfaYSSeBsxk+FpQ/fJo5ky8uYR5PdsFVNf ZsyFcC49mXwa6Fmwl0z/IwNG4l+OBaSgvrwq7qFAYg2zjp0gAgP9NtSxsGKmZcOqe6sH f1KefDaKyUvnkuy17iSMKyVNAnPWN1ZjdpOd6ABXHSEPAFfnZjszeXqPxjywYeL/p0Le ozm533dzgE6WA/biR6GQmvIG7EFv11CbZZAwDGiKPG8oP26fwrY8yCpMSprqSjywyKS3 IiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+nzfSAkBBnW95G1HHY0jfzp30Kl0kRtuu1gHbOZwLl8=; b=e5E9tgYQqnN+QyCmqa392/GPldbg10DB9tEXYtrKU3M0bCtMtvyZjkQ/3HW6XMXoHI il0T+GYk1B2bDiLtfhEfxsG7CfyEVGDjn5IKEx0CPIKkHfsqNFHckLvu6Mj85fRWrwJy 7shFgX6vjW+dzyDMmxv6IG1X/pGOq/qA0D+EPinhwWah/1IPr+/knd4SO1z2v1Hyckzh Qfe+zsWk0ZtB0KnpEoOwWS3SEp5uTcaVkB9YBcl8tlGnO23mV8cnvB7dPD9kpi9kp/Ms aeMqYEkn8wMl5UDwW8WZl2P1zurpeV2KqFl3XlYPG9LL1usbbC/+CV8NrU/KWxgX6wLR MXeg== X-Gm-Message-State: AOAM531dGpsMu3Gb6DWZzuoO+vhyMl/sLOQ9tmBQXgQoiPuhnBLkQ9RC Fep74EMXivxAFQrvnhLvuaaiHQ== X-Received: by 2002:a5d:64c9:: with SMTP id f9mr12533839wri.416.1635243770557; Tue, 26 Oct 2021 03:22:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m35sm1683375wms.2.2021.10.26.03.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 03:22:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A0C071FFA6; Tue, 26 Oct 2021 11:22:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 10/28] tests/docker: allow non-unique userid Date: Tue, 26 Oct 2021 11:22:16 +0100 Message-Id: <20211026102234.3961636-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211026102234.3961636-1-alex.bennee@linaro.org> References: <20211026102234.3961636-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , minyihh@uci.edu, berrange@redhat.com, kuhn.chenqun@huawei.com, f4bug@amsat.org, robhenry@microsoft.com, Willian Rampazzo , mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, ma.mandourr@gmail.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a bit of a band-aid against hand-built images that have been accidentally polluted by a user build. All images pulled from the registry shouldn't have the user defined. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.30.2 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 78dd13171e..5eadf0bb7b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -336,7 +336,7 @@ def build_image(self, tag, docker_dir, dockerfile, uid = os.getuid() uname = getpwuid(uid).pw_name tmp_df.write("\n") - tmp_df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + tmp_df.write("RUN id %s 2>/dev/null || useradd -o -u %d -U %s" % (uname, uid, uname)) tmp_df.write("\n") @@ -590,7 +590,7 @@ def run(self, args, argv): uid = os.getuid() uname = getpwuid(uid).pw_name df.write("\n") - df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + df.write("RUN id %s 2>/dev/null || useradd -o -u %d -U %s" % (uname, uid, uname)) df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8"))